diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock
index 1a6685c5..034d24c2 100755
--- a/.speakeasy/gen.lock
+++ b/.speakeasy/gen.lock
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 16f22cbf-f23f-4419-8924-3a4b06381947
management:
- docChecksum: 4ca36f4a819fe210480b785673b6572a
+ docChecksum: 4a7c64e455521ea3ac1e4957e621f694
docVersion: 0.0.3
- speakeasyVersion: 1.555.2
- generationVersion: 2.620.2
- releaseVersion: 0.38.0
- configChecksum: 02a6d5f470beebea481df5593c220566
+ speakeasyVersion: 1.557.0
+ generationVersion: 2.623.0
+ releaseVersion: 0.39.0
+ configChecksum: c9d9bac185a14ad9101fd40b22d08017
repoURL: https://github.com/LukeHagar/plexjs.git
repoSubDirectory: .
installationURL: https://github.com/LukeHagar/plexjs
@@ -22,7 +22,7 @@ features:
enumUnions: 0.1.0
enums: 2.82.1
envVarSecurityUsage: 0.1.2
- errors: 2.84.1
+ errors: 2.85.0
flattening: 2.82.1
globalSecurity: 2.82.13
globalSecurityCallbacks: 0.1.0
@@ -405,9 +405,7 @@ generatedFiles:
- docs/sdk/models/operations/director.md
- docs/sdk/models/operations/directory.md
- docs/sdk/models/operations/download.md
- - docs/sdk/models/operations/enablecreditsmarkergeneration.md
- docs/sdk/models/operations/enablepapertrailresponse.md
- - docs/sdk/models/operations/episodesort.md
- docs/sdk/models/operations/extras.md
- docs/sdk/models/operations/feature.md
- docs/sdk/models/operations/field.md
@@ -503,17 +501,11 @@ generatedFiles:
- 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/getlibraryitemslibraryactivedirection.md
- - docs/sdk/models/operations/getlibraryitemslibrarydefaultdirection.md
- - docs/sdk/models/operations/getlibraryitemslibraryfield.md
- - docs/sdk/models/operations/getlibraryitemslibraryfieldtype.md
- - docs/sdk/models/operations/getlibraryitemslibraryfilter.md
- - docs/sdk/models/operations/getlibraryitemslibraryoperator.md
- - docs/sdk/models/operations/getlibraryitemslibraryresponse200type.md
+ - docs/sdk/models/operations/getlibraryitemslibraryoptimizedforstreaming.md
- docs/sdk/models/operations/getlibraryitemslibraryresponsetype.md
- - docs/sdk/models/operations/getlibraryitemslibrarysort.md
- docs/sdk/models/operations/getlibraryitemslibrarytype.md
- docs/sdk/models/operations/getlibraryitemslocation.md
- docs/sdk/models/operations/getlibraryitemsmedia.md
@@ -522,15 +514,17 @@ generatedFiles:
- 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/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/getlibraryitemsstream.md
- docs/sdk/models/operations/getlibraryitemstype.md
- docs/sdk/models/operations/getlibraryitemsultrablurcolors.md
- docs/sdk/models/operations/getlibraryitemswriter.md
@@ -556,6 +550,7 @@ generatedFiles:
- 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
@@ -565,7 +560,6 @@ generatedFiles:
- docs/sdk/models/operations/getlibrarysectionsallrole.md
- docs/sdk/models/operations/getlibrarysectionsallsort.md
- docs/sdk/models/operations/getlibrarysectionsallstream.md
- - docs/sdk/models/operations/getlibrarysectionsallstreamtype.md
- docs/sdk/models/operations/getlibrarysectionsalltype.md
- docs/sdk/models/operations/getlibrarysectionsallultrablurcolors.md
- docs/sdk/models/operations/getlibrarysectionsallwriter.md
@@ -574,8 +568,11 @@ generatedFiles:
- 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
@@ -583,6 +580,7 @@ generatedFiles:
- 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
@@ -591,13 +589,13 @@ generatedFiles:
- 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/getmediametadatastreamtype.md
- docs/sdk/models/operations/getmediametadatatype.md
- docs/sdk/models/operations/getmediametadataultrablurcolors.md
- docs/sdk/models/operations/getmediametadatawriter.md
@@ -685,23 +683,23 @@ generatedFiles:
- docs/sdk/models/operations/getresourcesstatisticsrequest.md
- docs/sdk/models/operations/getresourcesstatisticsresponse.md
- docs/sdk/models/operations/getresourcesstatisticsresponsebody.md
- - docs/sdk/models/operations/getsearchalllibrariescollection.md
- docs/sdk/models/operations/getsearchalllibrariescountry.md
- docs/sdk/models/operations/getsearchalllibrariesdirector.md
- - docs/sdk/models/operations/getsearchalllibrariesenablecreditsmarkergeneration.md
- - docs/sdk/models/operations/getsearchalllibrariesepisodesort.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/getsearchalllibrariesmediaguid.md
- docs/sdk/models/operations/getsearchalllibrariesmetadata.md
- - docs/sdk/models/operations/getsearchalllibrariesmetadatarating.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
@@ -710,7 +708,6 @@ generatedFiles:
- docs/sdk/models/operations/getsearchalllibrariesresponsebody.md
- docs/sdk/models/operations/getsearchalllibrariesrole.md
- docs/sdk/models/operations/getsearchalllibrariesshowordering.md
- - docs/sdk/models/operations/getsearchalllibrariesstream.md
- docs/sdk/models/operations/getsearchalllibrariestype.md
- docs/sdk/models/operations/getsearchalllibrariesultrablurcolors.md
- docs/sdk/models/operations/getsearchalllibrarieswriter.md
@@ -843,12 +840,10 @@ generatedFiles:
- docs/sdk/models/operations/markunplayedresponse.md
- docs/sdk/models/operations/media.md
- docs/sdk/models/operations/mediacontainer.md
- - docs/sdk/models/operations/mediaguid.md
- docs/sdk/models/operations/mediaprovider.md
- docs/sdk/models/operations/mediareviewsvisibility.md
- docs/sdk/models/operations/meta.md
- docs/sdk/models/operations/metadata.md
- - docs/sdk/models/operations/metadatarating.md
- docs/sdk/models/operations/minsize.md
- docs/sdk/models/operations/myplex.md
- docs/sdk/models/operations/one.md
@@ -940,7 +935,6 @@ generatedFiles:
- docs/sdk/models/operations/stoptranscodesessionrequest.md
- docs/sdk/models/operations/stoptranscodesessionresponse.md
- docs/sdk/models/operations/stream.md
- - docs/sdk/models/operations/streamtype.md
- docs/sdk/models/operations/subscription.md
- docs/sdk/models/operations/tag.md
- docs/sdk/models/operations/taskname.md
@@ -1166,7 +1160,9 @@ generatedFiles:
- 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
@@ -1777,7 +1773,7 @@ examples:
X-Plex-Container-Size: 50
responses:
"200":
- application/json: {"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, "activeDirection": "asc", "defaultDirection": "asc", "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": 70, "totalSize": 170, "offset": 0, "content": "secondary", "allowSync": true, "nocache": true, "art": "/:/resources/movie-fanart.jpg", "identifier": "com.plexapp.plugins.library", "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionUUID": "322a231a-b7f7-49f5-920f-14c61199cd30", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1701731894, "thumb": "/:/resources/movie.png", "title1": "Movies", "title2": "Recently Released", "viewGroup": "movie", "viewMode": 65592, "mixedParents": true, "Metadata": [{"ratingKey": "58683", "key": "/library/metadata/58683", "guid": "plex://movie/5d7768ba96b655001fdc0408", "studio": "20th Century Studios", "skipChildren": false, "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionKey": "/library/sections/1", "type": "movie", "title": "Avatar: The Way of Water", "slug": "4-for-texas", "contentRating": "PG-13", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.", "rating": 7.6, "audienceRating": 9.2, "year": 2022, "seasonCount": 2022, "tagline": "Return to Pandora.", "flattenSeasons": "1", "episodeSort": "0", "enableCreditsMarkerGeneration": "-1", "showOrdering": "absolute", "thumb": "/library/metadata/58683/thumb/1703239236", "art": "/library/metadata/58683/art/1703239236", "banner": "/library/metadata/58683/banner/1703239236", "duration": 11558112, "originallyAvailableAt": "2022-12-14T00:00:00Z", "addedAt": 1556281940, "updatedAt": 1556281940, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/58684", "ratingImage": "rottentomatoes://image.rating.ripe", "grandparentRatingKey": "66", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentKey": "/library/metadata/66", "grandparentTitle": "Caprica", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "parentSlug": "alice-in-borderland-2020", "grandparentSlug": "alice-in-borderland-2020", "grandparentArt": "/library/metadata/66/art/1705716261", "grandparentTheme": "/library/metadata/66/theme/1705716261", "Media": [{"id": 119534, "duration": 11558112, "bitrate": 25025, "width": 3840, "height": 2072, "aspectRatio": 1.85, "audioProfile": "dts", "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "optimizedForStreaming": 1, "has64bitOffsets": false, "Part": [{"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "1", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}]}], "Genre": [{"tag": "Adventure"}], "Country": [{"tag": "United States of America"}], "Director": [{"tag": "James Cameron"}], "Writer": [{"tag": "James Cameron"}], "Collection": [{"tag": "Working NL Subs"}], "Role": [{"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}], "Location": [{"path": "/TV Shows/House"}], "Guid": [{"id": "imdb://tt13015952"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Rating": [{"image": "themoviedb://image.rating", "value": 3, "type": "audience"}], "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "titleSort": "Whale", "viewCount": 1, "lastViewedAt": 1682752242, "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "viewOffset": 5222500, "skipCount": 1, "index": 1, "theme": "/library/metadata/1/theme/1705636920", "leafCount": 14, "viewedLeafCount": 0, "childCount": 1, "hasPremiumExtras": "1", "hasPremiumPrimaryExtra": "1", "parentRatingKey": "66", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "parentStudio": "UCP", "parentKey": "/library/metadata/66", "parentTitle": "Caprica", "parentIndex": 1, "parentYear": 2010, "parentThumb": "/library/metadata/66/thumb/1705716261", "parentTheme": "/library/metadata/66/theme/1705716261"}], "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, "activeDirection": "asc", "defaultDirection": "asc", "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": []}]}}}
+ application/json: {"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": [{"ratingKey": "58683", "key": "/library/metadata/58683", "guid": "plex://movie/5d7768ba96b655001fdc0408", "slug": "4-for-texas", "studio": "20th Century Studios", "type": "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. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.", "rating": 7.6, "audienceRating": 9.2, "year": 2022, "tagline": "Return to Pandora.", "thumb": "/library/metadata/58683/thumb/1703239236", "art": "/library/metadata/58683/art/1703239236", "theme": "/library/metadata/1/theme/1705636920", "index": 1, "leafCount": 14, "viewedLeafCount": 0, "childCount": 1, "seasonCount": 2022, "duration": 11558112, "originallyAvailableAt": "2022-12-14T00:00:00Z", "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, "lastViewedAt": 1682752242, "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Guid": [{"id": "imdb://tt13015952"}], "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionKey": "/library/sections/1", "showOrdering": "absolute", "flattenSeasons": "1", "skipChildren": false, "Media": [{"id": 119534, "duration": 11558112, "bitrate": 25025, "width": 3840, "height": 2072, "aspectRatio": 1.85, "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "audioProfile": "dts", "optimizedForStreaming": 1, "has64bitOffsets": false, "Part": [{"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "indexes": "sd", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "hasThumbnail": "1"}]}], "Genre": [{"id": 259, "tag": "Adventure"}], "Country": [{"id": 259, "tag": "United States of America"}], "Director": [{"id": 126522, "tag": "James Cameron"}], "Writer": [{"id": 126522, "tag": "James Cameron"}], "Collection": [{"tag": "Working NL Subs"}], "Role": [{"id": 294129, "tag": "Mike Smith", "role": "Self", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg"}], "Rating": [{"image": "themoviedb://image.rating", "value": 3, "type": "audience"}], "Location": [{"path": "/TV Shows/House"}]}], "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, "activeDirection": "asc", "defaultDirection": "asc", "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": []}]}}}
"400":
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
"401":
@@ -1883,7 +1879,7 @@ examples:
X-Plex-Client-Identifier: "3381b62b-9ab7-4e37-827b-203e9809eb58"
responses:
"200":
- application/json: {"MediaContainer": {"size": 5709.89, "SearchResult": []}}
+ application/json: {"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": []}}
"400":
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
"401":
diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml
index ccc2f625..a003cd0c 100755
--- a/.speakeasy/gen.yaml
+++ b/.speakeasy/gen.yaml
@@ -17,13 +17,14 @@ generation:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: false
typescript:
- version: 0.38.0
+ version: 0.39.0
additionalDependencies:
dependencies: {}
devDependencies: {}
peerDependencies: {}
additionalPackageJSON: {}
author: LukeHagar
+ baseErrorName: PlexAPIError
clientServerStatusCodesAsErrors: true
defaultErrorName: SDKError
enableCustomCodeRegions: false
diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock
index 954dedcb..b572eb39 100644
--- a/.speakeasy/workflow.lock
+++ b/.speakeasy/workflow.lock
@@ -1,4 +1,4 @@
-speakeasyVersion: 1.555.2
+speakeasyVersion: 1.557.0
sources:
my-source:
sourceNamespace: my-source
@@ -9,20 +9,20 @@ sources:
- main
plexapi:
sourceNamespace: plexapi
- sourceRevisionDigest: sha256:78d07ad78ff60d0e9918696208d8c68a562e170d4e9c431797c02995fb8816d0
- sourceBlobDigest: sha256:d38dd2a36c1b2fd73409267f7b30c2d5d45d709616141803ea01db424ec68ae4
+ sourceRevisionDigest: sha256:dafcc1192236829b85bc924e0462432c0eb7318a17c542f46e3dd05a9a6265df
+ sourceBlobDigest: sha256:bc072115d585e1695cb8393db901a3d36be1dcd57a69bad2b91a1ba7ac3c9c4b
tags:
- latest
- - speakeasy-sdk-regen-1748995899
+ - speakeasy-sdk-regen-1749427947
- 0.0.3
targets:
plexjs:
source: plexapi
sourceNamespace: plexapi
- sourceRevisionDigest: sha256:78d07ad78ff60d0e9918696208d8c68a562e170d4e9c431797c02995fb8816d0
- sourceBlobDigest: sha256:d38dd2a36c1b2fd73409267f7b30c2d5d45d709616141803ea01db424ec68ae4
+ sourceRevisionDigest: sha256:dafcc1192236829b85bc924e0462432c0eb7318a17c542f46e3dd05a9a6265df
+ sourceBlobDigest: sha256:bc072115d585e1695cb8393db901a3d36be1dcd57a69bad2b91a1ba7ac3c9c4b
codeSamplesNamespace: code-samples-typescript-plexjs
- codeSamplesRevisionDigest: sha256:132446d6299798fab8378bc875b16290ef126cdb50befe85a0a88bee8bf35799
+ codeSamplesRevisionDigest: sha256:a072e24cc6ba68e95422b17fb50672ce9d87d17794f824301314d9c7a6c772b6
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
diff --git a/README.md b/README.md
index 137ec9ca..52324c24 100644
--- a/README.md
+++ b/README.md
@@ -267,16 +267,15 @@ run();
## Error Handling
-This table shows properties which are common on error classes. For full details see [error classes](#error-classes).
+[`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.name` | `string` | Error class name eg `SDKError` |
| `error.message` | `string` | Error message |
-| `error.statusCode` | `number` | HTTP status code eg `404` |
-| `error.contentType` | `string` | HTTP content type eg `application/json` |
+| `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. Access to headers and more. |
+| `error.rawResponse` | `Response` | Raw HTTP response |
| `error.data$` | | Optional. Some errors may contain structured data. [See Error Classes](#error-classes). |
### Example
@@ -294,19 +293,18 @@ async function run() {
console.log(result);
} catch (error) {
- // Depending on the method different errors may be thrown
- if (error instanceof errors.GetServerCapabilitiesBadRequest) {
- console.log(error.message);
- console.log(error.data$.errors); // Errors[]
- console.log(error.data$.rawResponse); // Response
- }
-
- // Fallback error class, if no other more specific error class is matched
- if (error instanceof errors.SDKError) {
+ // 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.rawResponse.headers);
+ 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
+ }
}
}
}
@@ -316,17 +314,22 @@ run();
```
### Error Classes
-* `SDKError`: The fallback error class, if no other more specific error class is matched.
-* `SDKValidationError`: Type mismatch between the data returned from the server and the structure expected by the SDK. This can also be thrown for invalid method arguments. See `error.rawValue` for the raw value and `error.pretty()` for a nicely formatted multi-line string.
-* Network errors:
- * `ConnectionError`: HTTP client was unable to make a request to a server.
- * `RequestTimeoutError`: HTTP request timed out due to an AbortSignal signal.
- * `RequestAbortedError`: HTTP request was aborted by the client.
- * `InvalidRequestError`: Any input used to create a request is invalid.
- * `UnexpectedClientError`: Unrecognised or unexpected error.
+**Primary error:**
+* [`PlexAPIError`](./src/sdk/models/errors/plexapierror.ts): The base class for HTTP error responses.
-Less common errors, applicable to a subset of methods (156)
+Less common errors (162)
+
+
+**Network errors:**
+* [`ConnectionError`](./src/sdk/models/errors/httpclienterrors.ts): HTTP client was unable to make a request to a server.
+* [`RequestTimeoutError`](./src/sdk/models/errors/httpclienterrors.ts): HTTP request timed out due to an AbortSignal signal.
+* [`RequestAbortedError`](./src/sdk/models/errors/httpclienterrors.ts): HTTP request was aborted by the client.
+* [`InvalidRequestError`](./src/sdk/models/errors/httpclienterrors.ts): Any input used to create a request is invalid.
+* [`UnexpectedClientError`](./src/sdk/models/errors/httpclienterrors.ts): Unrecognised or unexpected error.
+
+
+**Inherit from [`PlexAPIError`](./src/sdk/models/errors/plexapierror.ts)**:
* [`GetServerCapabilitiesBadRequest`](docs/sdk/models/errors/getservercapabilitiesbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
* [`GetServerPreferencesBadRequest`](docs/sdk/models/errors/getserverpreferencesbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
* [`GetAvailableClientsBadRequest`](docs/sdk/models/errors/getavailableclientsbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
@@ -483,8 +486,9 @@ run();
* [`GetUsersUnauthorized`](docs/sdk/models/errors/getusersunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
* [`GetTokenByPinIdResponseBody`](docs/sdk/models/errors/gettokenbypinidresponsebody.md): Not Found or Expired. Status code `404`. Applicable to 1 of 84 methods.*
* [`GetServerIdentityRequestTimeout`](docs/sdk/models/errors/getserveridentityrequesttimeout.md): 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.
diff --git a/RELEASES.md b/RELEASES.md
index 069b9351..ea113b56 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -1348,4 +1348,14 @@ Based on:
### Generated
- [typescript v0.38.0] .
### Releases
-- [NPM v0.38.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.38.0 - .
\ No newline at end of file
+- [NPM v0.38.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.38.0 - .
+
+## 2025-06-09 00:12:06
+### Changes
+Based on:
+- OpenAPI Doc
+- Speakeasy CLI 1.557.0 (2.623.0) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [typescript v0.39.0] .
+### Releases
+- [NPM v0.39.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.39.0 - .
\ No newline at end of file
diff --git a/docs/sdk/models/operations/enablecreditsmarkergeneration.md b/docs/sdk/models/operations/enablecreditsmarkergeneration.md
deleted file mode 100644
index d4a436cc..00000000
--- a/docs/sdk/models/operations/enablecreditsmarkergeneration.md
+++ /dev/null
@@ -1,22 +0,0 @@
-# EnableCreditsMarkerGeneration
-
-Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
-
-## Example Usage
-
-```typescript
-import { EnableCreditsMarkerGeneration } from "@lukehagar/plexjs/sdk/models/operations";
-
-let value: EnableCreditsMarkerGeneration =
- EnableCreditsMarkerGeneration.LibraryDefault;
-```
-
-## Values
-
-This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type.
-
-| Name | Value |
-| ---------------------- | ---------------------- |
-| `LibraryDefault` | -1 |
-| `Disabled` | 0 |
-| - | `Unrecognized` |
\ No newline at end of file
diff --git a/docs/sdk/models/operations/episodesort.md b/docs/sdk/models/operations/episodesort.md
deleted file mode 100644
index 0a982bee..00000000
--- a/docs/sdk/models/operations/episodesort.md
+++ /dev/null
@@ -1,22 +0,0 @@
-# EpisodeSort
-
-Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
-
-## Example Usage
-
-```typescript
-import { EpisodeSort } from "@lukehagar/plexjs/sdk/models/operations";
-
-let value: EpisodeSort = EpisodeSort.OldestFirst;
-```
-
-## Values
-
-This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type.
-
-| Name | Value |
-| ---------------------- | ---------------------- |
-| `LibraryDefault` | -1 |
-| `OldestFirst` | 0 |
-| `NewestFirst` | 1 |
-| - | `Unrecognized` |
\ No newline at end of file
diff --git a/docs/sdk/models/operations/flattenseasons.md b/docs/sdk/models/operations/flattenseasons.md
index 80030063..c69fee70 100644
--- a/docs/sdk/models/operations/flattenseasons.md
+++ b/docs/sdk/models/operations/flattenseasons.md
@@ -2,6 +2,7 @@
Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
+
## Example Usage
```typescript
diff --git a/docs/sdk/models/operations/getactorslibrarymediacontainer.md b/docs/sdk/models/operations/getactorslibrarymediacontainer.md
index 286384dc..bd26d38f 100644
--- a/docs/sdk/models/operations/getactorslibrarymediacontainer.md
+++ b/docs/sdk/models/operations/getactorslibrarymediacontainer.md
@@ -45,5 +45,5 @@ let value: GetActorsLibraryMediaContainer = {
| `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_check_mark: | Identifier for the view mode. | 131131 |
+| `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/getlibraryitemscollection.md b/docs/sdk/models/operations/getlibraryitemscollection.md
index cca94489..3b64f633 100644
--- a/docs/sdk/models/operations/getlibraryitemscollection.md
+++ b/docs/sdk/models/operations/getlibraryitemscollection.md
@@ -6,12 +6,12 @@
import { GetLibraryItemsCollection } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetLibraryItemsCollection = {
- tag: "Working NL Subs",
+ tag: "My Awesome Collection",
};
```
## Fields
-| Field | Type | Required | Description | Example |
-| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
-| `tag` | *string* | :heavy_minus_sign: | N/A | Working NL Subs |
\ No newline at end of file
+| 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
index 5a406107..baf8f935 100644
--- a/docs/sdk/models/operations/getlibraryitemscountry.md
+++ b/docs/sdk/models/operations/getlibraryitemscountry.md
@@ -6,12 +6,14 @@
import { GetLibraryItemsCountry } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetLibraryItemsCountry = {
+ id: 259,
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
+| 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/getlibraryitemsdirector.md b/docs/sdk/models/operations/getlibraryitemsdirector.md
index b06f70a9..a00e8182 100644
--- a/docs/sdk/models/operations/getlibraryitemsdirector.md
+++ b/docs/sdk/models/operations/getlibraryitemsdirector.md
@@ -6,12 +6,17 @@
import { GetLibraryItemsDirector } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetLibraryItemsDirector = {
- tag: "James Cameron",
+ id: 126522,
+ tag: "Danny Boyle",
+ thumb:
+ "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg",
};
```
## Fields
-| Field | Type | Required | Description | Example |
-| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
-| `tag` | *string* | :heavy_minus_sign: | N/A | James Cameron |
\ No newline at end of file
+| 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/getlibraryitemsfilter.md b/docs/sdk/models/operations/getlibraryitemsfilter.md
index ce7d95c3..87ae32d8 100644
--- a/docs/sdk/models/operations/getlibraryitemsfilter.md
+++ b/docs/sdk/models/operations/getlibraryitemsfilter.md
@@ -11,7 +11,6 @@ let value: GetLibraryItemsFilter = {
key: "/library/sections/2/genre?type=2",
title: "Genre",
type: "filter",
- advanced: true,
};
```
@@ -23,5 +22,4 @@ let value: GetLibraryItemsFilter = {
| `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
+| `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
index fede3b9d..31f5f78c 100644
--- a/docs/sdk/models/operations/getlibraryitemsgenre.md
+++ b/docs/sdk/models/operations/getlibraryitemsgenre.md
@@ -6,12 +6,14 @@
import { GetLibraryItemsGenre } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetLibraryItemsGenre = {
- tag: "Adventure",
+ id: 259,
+ tag: "Crime",
};
```
## Fields
-| Field | Type | Required | Description | Example |
-| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
-| `tag` | *string* | :heavy_minus_sign: | N/A | Adventure |
\ No newline at end of file
+| 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/getlibraryitemsguids.md b/docs/sdk/models/operations/getlibraryitemsguids.md
new file mode 100644
index 00000000..91bc572e
--- /dev/null
+++ b/docs/sdk/models/operations/getlibraryitemsguids.md
@@ -0,0 +1,18 @@
+# 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
index 4d2088c6..a7a9e9c3 100644
--- a/docs/sdk/models/operations/getlibraryitemshasthumbnail.md
+++ b/docs/sdk/models/operations/getlibraryitemshasthumbnail.md
@@ -1,5 +1,8 @@
# GetLibraryItemsHasThumbnail
+Indicates if the part has a thumbnail.
+
+
## Example Usage
```typescript
diff --git a/docs/sdk/models/operations/getlibraryitemsimage.md b/docs/sdk/models/operations/getlibraryitemsimage.md
index 6a1abacb..998a8ae2 100644
--- a/docs/sdk/models/operations/getlibraryitemsimage.md
+++ b/docs/sdk/models/operations/getlibraryitemsimage.md
@@ -3,19 +3,19 @@
## Example Usage
```typescript
-import { GetLibraryItemsImage, GetLibraryItemsLibraryResponse200Type } from "@lukehagar/plexjs/sdk/models/operations";
+import { GetLibraryItemsImage, GetLibraryItemsLibraryResponseType } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetLibraryItemsImage = {
alt: "Episode 1",
- type: GetLibraryItemsLibraryResponse200Type.Background,
+ 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.GetLibraryItemsLibraryResponse200Type](../../../sdk/models/operations/getlibraryitemslibraryresponse200type.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
+| 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/getlibraryitemslibraryactivedirection.md b/docs/sdk/models/operations/getlibraryitemslibraryactivedirection.md
deleted file mode 100644
index ca0a4217..00000000
--- a/docs/sdk/models/operations/getlibraryitemslibraryactivedirection.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# GetLibraryItemsLibraryActiveDirection
-
-The direction of the sort. Can be either `asc` or `desc`.
-
-
-## Example Usage
-
-```typescript
-import { GetLibraryItemsLibraryActiveDirection } from "@lukehagar/plexjs/sdk/models/operations";
-
-let value: GetLibraryItemsLibraryActiveDirection =
- GetLibraryItemsLibraryActiveDirection.Ascending;
-```
-
-## Values
-
-| Name | Value |
-| ------------ | ------------ |
-| `Ascending` | asc |
-| `Descending` | desc |
\ No newline at end of file
diff --git a/docs/sdk/models/operations/getlibraryitemslibrarydefaultdirection.md b/docs/sdk/models/operations/getlibraryitemslibrarydefaultdirection.md
deleted file mode 100644
index edd76437..00000000
--- a/docs/sdk/models/operations/getlibraryitemslibrarydefaultdirection.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# GetLibraryItemsLibraryDefaultDirection
-
-The direction of the sort. Can be either `asc` or `desc`.
-
-
-## Example Usage
-
-```typescript
-import { GetLibraryItemsLibraryDefaultDirection } from "@lukehagar/plexjs/sdk/models/operations";
-
-let value: GetLibraryItemsLibraryDefaultDirection =
- GetLibraryItemsLibraryDefaultDirection.Ascending;
-```
-
-## Values
-
-| Name | Value |
-| ------------ | ------------ |
-| `Ascending` | asc |
-| `Descending` | desc |
\ No newline at end of file
diff --git a/docs/sdk/models/operations/getlibraryitemslibraryfield.md b/docs/sdk/models/operations/getlibraryitemslibraryfield.md
deleted file mode 100644
index f26e3b83..00000000
--- a/docs/sdk/models/operations/getlibraryitemslibraryfield.md
+++ /dev/null
@@ -1,23 +0,0 @@
-# GetLibraryItemsLibraryField
-
-## Example Usage
-
-```typescript
-import { GetLibraryItemsLibraryField } from "@lukehagar/plexjs/sdk/models/operations";
-
-let value: GetLibraryItemsLibraryField = {
- 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/getlibraryitemslibraryfieldtype.md b/docs/sdk/models/operations/getlibraryitemslibraryfieldtype.md
deleted file mode 100644
index 58866d23..00000000
--- a/docs/sdk/models/operations/getlibraryitemslibraryfieldtype.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# GetLibraryItemsLibraryFieldType
-
-## Example Usage
-
-```typescript
-import { GetLibraryItemsLibraryFieldType } from "@lukehagar/plexjs/sdk/models/operations";
-
-let value: GetLibraryItemsLibraryFieldType = {
- type: "tag",
- operator: [],
-};
-```
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
-| `type` | *string* | :heavy_check_mark: | N/A | tag |
-| `operator` | [operations.GetLibraryItemsLibraryOperator](../../../sdk/models/operations/getlibraryitemslibraryoperator.md)[] | :heavy_check_mark: | N/A | |
\ No newline at end of file
diff --git a/docs/sdk/models/operations/getlibraryitemslibraryfilter.md b/docs/sdk/models/operations/getlibraryitemslibraryfilter.md
deleted file mode 100644
index c07e32d3..00000000
--- a/docs/sdk/models/operations/getlibraryitemslibraryfilter.md
+++ /dev/null
@@ -1,25 +0,0 @@
-# GetLibraryItemsLibraryFilter
-
-## Example Usage
-
-```typescript
-import { GetLibraryItemsLibraryFilter } from "@lukehagar/plexjs/sdk/models/operations";
-
-let value: GetLibraryItemsLibraryFilter = {
- 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/getlibraryitemslibraryoperator.md b/docs/sdk/models/operations/getlibraryitemslibraryoperator.md
deleted file mode 100644
index 546e8099..00000000
--- a/docs/sdk/models/operations/getlibraryitemslibraryoperator.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# GetLibraryItemsLibraryOperator
-
-## Example Usage
-
-```typescript
-import { GetLibraryItemsLibraryOperator } from "@lukehagar/plexjs/sdk/models/operations";
-
-let value: GetLibraryItemsLibraryOperator = {
- 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/getlibraryitemslibraryoptimizedforstreaming.md b/docs/sdk/models/operations/getlibraryitemslibraryoptimizedforstreaming.md
new file mode 100644
index 00000000..94d5d9fe
--- /dev/null
+++ b/docs/sdk/models/operations/getlibraryitemslibraryoptimizedforstreaming.md
@@ -0,0 +1,21 @@
+# 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/getlibraryitemslibraryresponse200type.md b/docs/sdk/models/operations/getlibraryitemslibraryresponse200type.md
deleted file mode 100644
index 78664910..00000000
--- a/docs/sdk/models/operations/getlibraryitemslibraryresponse200type.md
+++ /dev/null
@@ -1,22 +0,0 @@
-# GetLibraryItemsLibraryResponse200Type
-
-## Example Usage
-
-```typescript
-import { GetLibraryItemsLibraryResponse200Type } from "@lukehagar/plexjs/sdk/models/operations";
-
-let value: GetLibraryItemsLibraryResponse200Type =
- GetLibraryItemsLibraryResponse200Type.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/getlibraryitemslibraryresponsetype.md b/docs/sdk/models/operations/getlibraryitemslibraryresponsetype.md
index 7340feb5..ec9c386f 100644
--- a/docs/sdk/models/operations/getlibraryitemslibraryresponsetype.md
+++ b/docs/sdk/models/operations/getlibraryitemslibraryresponsetype.md
@@ -5,49 +5,18 @@
```typescript
import { GetLibraryItemsLibraryResponseType } from "@lukehagar/plexjs/sdk/models/operations";
-let value: GetLibraryItemsLibraryResponseType = {
- 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",
- },
- ],
-};
+let value: GetLibraryItemsLibraryResponseType =
+ GetLibraryItemsLibraryResponseType.Background;
```
-## Fields
+## Values
-| 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.GetLibraryItemsLibraryFilter](../../../sdk/models/operations/getlibraryitemslibraryfilter.md)[] | :heavy_minus_sign: | N/A | |
-| `sort` | [operations.GetLibraryItemsLibrarySort](../../../sdk/models/operations/getlibraryitemslibrarysort.md)[] | :heavy_minus_sign: | N/A | |
-| `field` | [operations.GetLibraryItemsLibraryField](../../../sdk/models/operations/getlibraryitemslibraryfield.md)[] | :heavy_minus_sign: | N/A | |
\ No newline at end of file
+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/getlibraryitemslibrarysort.md b/docs/sdk/models/operations/getlibraryitemslibrarysort.md
deleted file mode 100644
index 82151085..00000000
--- a/docs/sdk/models/operations/getlibraryitemslibrarysort.md
+++ /dev/null
@@ -1,29 +0,0 @@
-# GetLibraryItemsLibrarySort
-
-## Example Usage
-
-```typescript
-import { GetLibraryItemsLibrarySort } from "@lukehagar/plexjs/sdk/models/operations";
-
-let value: GetLibraryItemsLibrarySort = {
- 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.GetLibraryItemsLibraryActiveDirection](../../../sdk/models/operations/getlibraryitemslibraryactivedirection.md) | :heavy_minus_sign: | The direction of the sort. Can be either `asc` or `desc`.
| asc |
-| `defaultDirection` | [operations.GetLibraryItemsLibraryDefaultDirection](../../../sdk/models/operations/getlibraryitemslibrarydefaultdirection.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/getlibraryitemslibrarytype.md b/docs/sdk/models/operations/getlibraryitemslibrarytype.md
index 8a2e0adf..d25c87b2 100644
--- a/docs/sdk/models/operations/getlibraryitemslibrarytype.md
+++ b/docs/sdk/models/operations/getlibraryitemslibrarytype.md
@@ -1,30 +1,53 @@
# GetLibraryItemsLibraryType
-The type of media content in the Plex library. This can represent videos, music, or photos.
-
-
## Example Usage
```typescript
import { GetLibraryItemsLibraryType } from "@lukehagar/plexjs/sdk/models/operations";
-let value: GetLibraryItemsLibraryType = GetLibraryItemsLibraryType.Movie;
+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",
+ },
+ ],
+};
```
-## Values
+## Fields
-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
+| 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
index 57db286d..ffaa0bc0 100644
--- a/docs/sdk/models/operations/getlibraryitemslocation.md
+++ b/docs/sdk/models/operations/getlibraryitemslocation.md
@@ -1,17 +1,19 @@
# 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/House",
+ path: "/TV Shows/Clarkson's Farm",
};
```
## Fields
-| Field | Type | Required | Description | Example |
-| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
-| `path` | *string* | :heavy_minus_sign: | N/A | /TV Shows/House |
\ No newline at end of file
+| 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
index 3dba366a..baf17051 100644
--- a/docs/sdk/models/operations/getlibraryitemsmedia.md
+++ b/docs/sdk/models/operations/getlibraryitemsmedia.md
@@ -3,49 +3,67 @@
## Example Usage
```typescript
-import { GetLibraryItemsMedia, GetLibraryItemsOptimizedForStreaming } from "@lukehagar/plexjs/sdk/models/operations";
+import { GetLibraryItemsHasThumbnail, GetLibraryItemsMedia } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetLibraryItemsMedia = {
- id: 119534,
- duration: 11558112,
- bitrate: 25025,
+ id: 387322,
+ duration: 9610350,
+ bitrate: 25512,
width: 3840,
- height: 2072,
- aspectRatio: 1.85,
- audioProfile: "dts",
+ height: 1602,
+ aspectRatio: 2.35,
audioChannels: 6,
- audioCodec: "eac3",
+ displayOffset: 50,
+ audioCodec: "aac",
videoCodec: "hevc",
videoResolution: "4k",
- container: "mkv",
+ container: "mp4",
videoFrameRate: "24p",
videoProfile: "main 10",
hasVoiceActivity: false,
- optimizedForStreaming: GetLibraryItemsOptimizedForStreaming.Enable,
+ audioProfile: "dts",
has64bitOffsets: false,
- part: [],
+ 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: | N/A | 119534 |
-| `duration` | *number* | :heavy_minus_sign: | N/A | 11558112 |
-| `bitrate` | *number* | :heavy_minus_sign: | N/A | 25025 |
-| `width` | *number* | :heavy_minus_sign: | N/A | 3840 |
-| `height` | *number* | :heavy_minus_sign: | N/A | 2072 |
-| `aspectRatio` | *number* | :heavy_minus_sign: | N/A | 1.85 |
-| `audioProfile` | *string* | :heavy_minus_sign: | N/A | dts |
-| `audioChannels` | *number* | :heavy_minus_sign: | N/A | 6 |
-| `audioCodec` | *string* | :heavy_minus_sign: | N/A | eac3 |
-| `videoCodec` | *string* | :heavy_minus_sign: | N/A | hevc |
-| `videoResolution` | *string* | :heavy_minus_sign: | N/A | 4k |
-| `container` | *string* | :heavy_check_mark: | N/A | mkv |
-| `videoFrameRate` | *string* | :heavy_minus_sign: | N/A | 24p |
-| `videoProfile` | *string* | :heavy_minus_sign: | N/A | main 10 |
-| `hasVoiceActivity` | *boolean* | :heavy_minus_sign: | N/A | false |
-| `optimizedForStreaming` | [operations.GetLibraryItemsOptimizedForStreaming](../../../sdk/models/operations/getlibraryitemsoptimizedforstreaming.md) | :heavy_minus_sign: | N/A | 1 |
-| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | false |
-| `part` | [operations.GetLibraryItemsPart](../../../sdk/models/operations/getlibraryitemspart.md)[] | :heavy_check_mark: | N/A | |
\ No newline at end of file
+| 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
index c08f3445..1730e591 100644
--- a/docs/sdk/models/operations/getlibraryitemsmediacontainer.md
+++ b/docs/sdk/models/operations/getlibraryitemsmediacontainer.md
@@ -1,244 +1,31 @@
# GetLibraryItemsMediaContainer
-The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
-
-
## Example Usage
```typescript
-import {
- EnableCreditsMarkerGeneration,
- EpisodeSort,
- FlattenSeasons,
- GetLibraryItemsLibraryResponse200Type,
- GetLibraryItemsLibraryType,
- GetLibraryItemsMediaContainer,
- GetLibraryItemsOptimizedForStreaming,
- ShowOrdering,
-} from "@lukehagar/plexjs/sdk/models/operations";
-import { RFCDate } from "@lukehagar/plexjs/sdk/types";
+import { GetLibraryItemsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetLibraryItemsMediaContainer = {
- 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: [],
- },
- ],
- size: 70,
- totalSize: 170,
+ size: 50,
+ totalSize: 50,
offset: 0,
content: "secondary",
- allowSync: true,
+ allowSync: false,
nocache: true,
- art: "/:/resources/movie-fanart.jpg",
+ art: "/:/resources/show-fanart.jpg",
identifier: "com.plexapp.plugins.library",
- librarySectionID: 1,
- librarySectionTitle: "Movies",
- librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30",
+ librarySectionID: 2,
+ librarySectionTitle: "TV Series",
+ librarySectionUUID: "e69655a2-ef48-4aba-bb19-0cc34d1e7d36",
mediaTagPrefix: "/system/bundle/media/flags/",
- mediaTagVersion: 1701731894,
- thumb: "/:/resources/movie.png",
- title1: "Movies",
- title2: "Recently Released",
- viewGroup: "movie",
- viewMode: 65592,
+ mediaTagVersion: 1734362201,
+ thumb: "/:/resources/show.png",
+ title1: "TV Series",
+ title2: "By Starring Actor",
+ viewGroup: "secondary",
+ viewMode: "131131",
mixedParents: true,
- metadata: [
- {
- ratingKey: "58683",
- key: "/library/metadata/58683",
- guid: "plex://movie/5d7768ba96b655001fdc0408",
- studio: "20th Century Studios",
- skipChildren: false,
- librarySectionID: 1,
- librarySectionTitle: "Movies",
- librarySectionKey: "/library/sections/1",
- type: GetLibraryItemsLibraryType.Movie,
- title: "Avatar: The Way of Water",
- slug: "4-for-texas",
- contentRating: "PG-13",
- summary:
- "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.",
- rating: 7.6,
- audienceRating: 9.2,
- year: 2022,
- seasonCount: 2022,
- tagline: "Return to Pandora.",
- flattenSeasons: FlattenSeasons.Show,
- episodeSort: EpisodeSort.OldestFirst,
- enableCreditsMarkerGeneration:
- EnableCreditsMarkerGeneration.LibraryDefault,
- showOrdering: ShowOrdering.TvdbAbsolute,
- thumb: "/library/metadata/58683/thumb/1703239236",
- art: "/library/metadata/58683/art/1703239236",
- banner: "/library/metadata/58683/banner/1703239236",
- duration: 11558112,
- originallyAvailableAt: new RFCDate("2022-12-14T00:00:00Z"),
- addedAt: 1556281940,
- updatedAt: 1556281940,
- audienceRatingImage: "rottentomatoes://image.rating.upright",
- chapterSource: "media",
- primaryExtraKey: "/library/metadata/58684",
- ratingImage: "rottentomatoes://image.rating.ripe",
- grandparentRatingKey: "66",
- grandparentGuid: "plex://show/5d9c081b170e24001f2a7be4",
- grandparentKey: "/library/metadata/66",
- grandparentTitle: "Caprica",
- grandparentThumb: "/library/metadata/66/thumb/1705716261",
- parentSlug: "alice-in-borderland-2020",
- grandparentSlug: "alice-in-borderland-2020",
- grandparentArt: "/library/metadata/66/art/1705716261",
- grandparentTheme: "/library/metadata/66/theme/1705716261",
- media: [
- {
- id: 119534,
- duration: 11558112,
- bitrate: 25025,
- width: 3840,
- height: 2072,
- aspectRatio: 1.85,
- audioProfile: "dts",
- audioChannels: 6,
- audioCodec: "eac3",
- videoCodec: "hevc",
- videoResolution: "4k",
- container: "mkv",
- videoFrameRate: "24p",
- videoProfile: "main 10",
- hasVoiceActivity: false,
- optimizedForStreaming: GetLibraryItemsOptimizedForStreaming.Enable,
- has64bitOffsets: false,
- part: [],
- },
- ],
- genre: [
- {
- tag: "Adventure",
- },
- ],
- country: [
- {
- tag: "United States of America",
- },
- ],
- director: [
- {
- tag: "James Cameron",
- },
- ],
- writer: [
- {
- tag: "James Cameron",
- },
- ],
- collection: [
- {
- tag: "Working NL Subs",
- },
- ],
- role: [
- {
- id: 294129,
- filter: "actor=294129",
- thumb:
- "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg",
- tag: "Mike Smith",
- tagKey: "668e7e7b22bcad9064350c91",
- role: "Self",
- },
- ],
- location: [
- {
- path: "/TV Shows/House",
- },
- ],
- mediaGuid: [
- {
- id: "imdb://tt13015952",
- },
- ],
- ultraBlurColors: {
- topLeft: "11333b",
- topRight: "0a232d",
- bottomRight: "73958",
- bottomLeft: "1f5066",
- },
- metaDataRating: [
- {
- image: "themoviedb://image.rating",
- value: 3,
- type: "audience",
- },
- ],
- image: [
- {
- alt: "Episode 1",
- type: GetLibraryItemsLibraryResponse200Type.Background,
- url: "/library/metadata/45521/thumb/1644710589",
- },
- ],
- titleSort: "Whale",
- viewCount: 1,
- lastViewedAt: 1682752242,
- originalTitle: "映画 ブラッククローバー 魔法帝の剣",
- viewOffset: 5222500,
- skipCount: 1,
- index: 1,
- theme: "/library/metadata/1/theme/1705636920",
- leafCount: 14,
- viewedLeafCount: 0,
- childCount: 1,
- hasPremiumExtras: "1",
- hasPremiumPrimaryExtra: "1",
- parentRatingKey: "66",
- parentGuid: "plex://show/5d9c081b170e24001f2a7be4",
- parentStudio: "UCP",
- parentKey: "/library/metadata/66",
- parentTitle: "Caprica",
- parentIndex: 1,
- parentYear: 2010,
- parentThumb: "/library/metadata/66/thumb/1705716261",
- parentTheme: "/library/metadata/66/theme/1705716261",
- },
- ],
+ metadata: [],
meta: {
type: [
{
@@ -287,28 +74,26 @@ let value: GetLibraryItemsMediaContainer = {
## Fields
-| Field | Type | Required | Description | Example |
-| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| `type` | [operations.GetLibraryItemsType](../../../sdk/models/operations/getlibraryitemstype.md)[] | :heavy_minus_sign: | N/A | |
-| `fieldType` | [operations.GetLibraryItemsFieldType](../../../sdk/models/operations/getlibraryitemsfieldtype.md)[] | :heavy_minus_sign: | N/A | |
-| `size` | *number* | :heavy_check_mark: | N/A | 70 |
-| `totalSize` | *number* | :heavy_check_mark: | N/A | 170 |
-| `offset` | *number* | :heavy_check_mark: | N/A | 0 |
-| `content` | *string* | :heavy_check_mark: | N/A | secondary |
-| `allowSync` | *boolean* | :heavy_check_mark: | N/A | true |
-| `nocache` | *boolean* | :heavy_minus_sign: | N/A | true |
-| `art` | *string* | :heavy_check_mark: | N/A | /:/resources/movie-fanart.jpg |
-| `identifier` | *string* | :heavy_check_mark: | N/A | com.plexapp.plugins.library |
-| `librarySectionID` | *number* | :heavy_check_mark: | N/A | 1 |
-| `librarySectionTitle` | *string* | :heavy_check_mark: | N/A | Movies |
-| `librarySectionUUID` | *string* | :heavy_check_mark: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
-| `mediaTagPrefix` | *string* | :heavy_check_mark: | N/A | /system/bundle/media/flags/ |
-| `mediaTagVersion` | *number* | :heavy_check_mark: | N/A | 1701731894 |
-| `thumb` | *string* | :heavy_check_mark: | N/A | /:/resources/movie.png |
-| `title1` | *string* | :heavy_check_mark: | N/A | Movies |
-| `title2` | *string* | :heavy_check_mark: | N/A | Recently Released |
-| `viewGroup` | *string* | :heavy_check_mark: | N/A | movie |
-| `viewMode` | *number* | :heavy_minus_sign: | N/A | 65592 |
-| `mixedParents` | *boolean* | :heavy_minus_sign: | N/A | true |
-| `metadata` | [operations.GetLibraryItemsMetadata](../../../sdk/models/operations/getlibraryitemsmetadata.md)[] | :heavy_minus_sign: | N/A | |
-| `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
+| 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
index 4382d53f..d9244eb3 100644
--- a/docs/sdk/models/operations/getlibraryitemsmeta.md
+++ b/docs/sdk/models/operations/getlibraryitemsmeta.md
@@ -55,7 +55,7 @@ let value: GetLibraryItemsMeta = {
## Fields
-| Field | Type | Required | Description |
-| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
-| `type` | [operations.GetLibraryItemsLibraryResponseType](../../../sdk/models/operations/getlibraryitemslibraryresponsetype.md)[] | :heavy_minus_sign: | N/A |
-| `fieldType` | [operations.GetLibraryItemsLibraryFieldType](../../../sdk/models/operations/getlibraryitemslibraryfieldtype.md)[] | :heavy_minus_sign: | N/A |
\ No newline at end of file
+| 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
index 27bfa7c1..cd1039ee 100644
--- a/docs/sdk/models/operations/getlibraryitemsmetadata.md
+++ b/docs/sdk/models/operations/getlibraryitemsmetadata.md
@@ -1,16 +1,17 @@
# GetLibraryItemsMetadata
+Unknown
+
+
## Example Usage
```typescript
import {
- EnableCreditsMarkerGeneration,
- EpisodeSort,
FlattenSeasons,
- GetLibraryItemsLibraryResponse200Type,
- GetLibraryItemsLibraryType,
+ GetLibraryItemsHasThumbnail,
+ GetLibraryItemsLibraryResponseType,
GetLibraryItemsMetadata,
- GetLibraryItemsOptimizedForStreaming,
+ GetLibraryItemsType,
ShowOrdering,
} from "@lukehagar/plexjs/sdk/models/operations";
import { RFCDate } from "@lukehagar/plexjs/sdk/types";
@@ -19,112 +20,67 @@ let value: GetLibraryItemsMetadata = {
ratingKey: "58683",
key: "/library/metadata/58683",
guid: "plex://movie/5d7768ba96b655001fdc0408",
- studio: "20th Century Studios",
- skipChildren: false,
- librarySectionID: 1,
- librarySectionTitle: "Movies",
- librarySectionKey: "/library/sections/1",
- type: GetLibraryItemsLibraryType.Movie,
- title: "Avatar: The Way of Water",
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. 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.",
+ "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,
- seasonCount: 2022,
tagline: "Return to Pandora.",
- flattenSeasons: FlattenSeasons.Show,
- episodeSort: EpisodeSort.OldestFirst,
- enableCreditsMarkerGeneration: EnableCreditsMarkerGeneration.LibraryDefault,
- showOrdering: ShowOrdering.TvdbAbsolute,
thumb: "/library/metadata/58683/thumb/1703239236",
art: "/library/metadata/58683/art/1703239236",
- banner: "/library/metadata/58683/banner/1703239236",
+ theme: "/library/metadata/1/theme/1705636920",
+ index: 1,
+ leafCount: 14,
+ viewedLeafCount: 0,
+ childCount: 1,
+ seasonCount: 2022,
duration: 11558112,
- originallyAvailableAt: new RFCDate("2022-12-14T00:00:00Z"),
+ originallyAvailableAt: new RFCDate("2022-12-14"),
addedAt: 1556281940,
updatedAt: 1556281940,
audienceRatingImage: "rottentomatoes://image.rating.upright",
chapterSource: "media",
primaryExtraKey: "/library/metadata/58684",
- ratingImage: "rottentomatoes://image.rating.ripe",
+ 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",
- parentSlug: "alice-in-borderland-2020",
- grandparentSlug: "alice-in-borderland-2020",
- grandparentArt: "/library/metadata/66/art/1705716261",
grandparentTheme: "/library/metadata/66/theme/1705716261",
- media: [
+ 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: [
{
- id: 119534,
- duration: 11558112,
- bitrate: 25025,
- width: 3840,
- height: 2072,
- aspectRatio: 1.85,
- audioProfile: "dts",
- audioChannels: 6,
- audioCodec: "eac3",
- videoCodec: "hevc",
- videoResolution: "4k",
- container: "mkv",
- videoFrameRate: "24p",
- videoProfile: "main 10",
- hasVoiceActivity: false,
- optimizedForStreaming: GetLibraryItemsOptimizedForStreaming.Enable,
- has64bitOffsets: false,
- part: [],
- },
- ],
- genre: [
- {
- tag: "Adventure",
- },
- ],
- country: [
- {
- tag: "United States of America",
- },
- ],
- director: [
- {
- tag: "James Cameron",
- },
- ],
- writer: [
- {
- tag: "James Cameron",
- },
- ],
- collection: [
- {
- tag: "Working NL Subs",
- },
- ],
- role: [
- {
- id: 294129,
- filter: "actor=294129",
- thumb:
- "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg",
- tag: "Mike Smith",
- tagKey: "668e7e7b22bcad9064350c91",
- role: "Self",
- },
- ],
- location: [
- {
- path: "/TV Shows/House",
- },
- ],
- mediaGuid: [
- {
- id: "imdb://tt13015952",
+ alt: "Episode 1",
+ type: GetLibraryItemsLibraryResponseType.Background,
+ url: "/library/metadata/45521/thumb/1644710589",
},
],
ultraBlurColors: {
@@ -133,122 +89,237 @@ let value: GetLibraryItemsMetadata = {
bottomRight: "73958",
bottomLeft: "1f5066",
},
- metaDataRating: [
+ guids: [
{
- image: "themoviedb://image.rating",
- value: 3,
+ 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",
},
],
- image: [
+ similar: [
{
- alt: "Episode 1",
- type: GetLibraryItemsLibraryResponse200Type.Background,
- url: "/library/metadata/45521/thumb/1644710589",
+ id: 26,
+ filter: "similar=26",
+ tag: "Breaking Bad",
},
],
- titleSort: "Whale",
- viewCount: 1,
- lastViewedAt: 1682752242,
- originalTitle: "映画 ブラッククローバー 魔法帝の剣",
- viewOffset: 5222500,
- skipCount: 1,
- index: 1,
- theme: "/library/metadata/1/theme/1705636920",
- leafCount: 14,
- viewedLeafCount: 0,
- childCount: 1,
- hasPremiumExtras: "1",
- hasPremiumPrimaryExtra: "1",
- parentRatingKey: "66",
- parentGuid: "plex://show/5d9c081b170e24001f2a7be4",
- parentStudio: "UCP",
- parentKey: "/library/metadata/66",
- parentTitle: "Caprica",
- parentIndex: 1,
- parentYear: 2010,
- parentThumb: "/library/metadata/66/thumb/1705716261",
- parentTheme: "/library/metadata/66/theme/1705716261",
+ 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: This is always an integer, but is represented as a string in the API.
| 58683 |
-| `key` | *string* | :heavy_check_mark: | N/A | /library/metadata/58683 |
-| `guid` | *string* | :heavy_check_mark: | N/A | plex://movie/5d7768ba96b655001fdc0408 |
-| `studio` | *string* | :heavy_minus_sign: | N/A | 20th Century Studios |
-| `skipChildren` | *boolean* | :heavy_minus_sign: | N/A | false |
-| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 |
-| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies |
-| `librarySectionKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/1 |
-| `type` | [operations.GetLibraryItemsLibraryType](../../../sdk/models/operations/getlibraryitemslibrarytype.md) | :heavy_check_mark: | The type of media content in the Plex library. This can represent videos, music, or photos.
| movie |
-| `title` | *string* | :heavy_check_mark: | N/A | Avatar: The Way of Water |
-| `slug` | *string* | :heavy_minus_sign: | N/A | 4-for-texas |
-| `contentRating` | *string* | :heavy_minus_sign: | N/A | PG-13 |
-| `summary` | *string* | :heavy_check_mark: | N/A | 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_minus_sign: | N/A | 7.6 |
-| `audienceRating` | *number* | :heavy_minus_sign: | N/A | 9.2 |
-| `year` | *number* | :heavy_minus_sign: | N/A | 2022 |
-| `seasonCount` | *number* | :heavy_minus_sign: | N/A | 2022 |
-| `tagline` | *string* | :heavy_minus_sign: | N/A | Return to Pandora. |
-| `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 |
-| `episodeSort` | [operations.EpisodeSort](../../../sdk/models/operations/episodesort.md) | :heavy_minus_sign: | Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). | 0 |
-| `enableCreditsMarkerGeneration` | [operations.EnableCreditsMarkerGeneration](../../../sdk/models/operations/enablecreditsmarkergeneration.md) | :heavy_minus_sign: | Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). | -1 |
-| `showOrdering` | [operations.ShowOrdering](../../../sdk/models/operations/showordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show.
None = Library default,
tmdbAiring = The Movie Database (Aired),
aired = TheTVDB (Aired),
dvd = TheTVDB (DVD),
absolute = TheTVDB (Absolute)).
| absolute |
-| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 |
-| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 |
-| `banner` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/banner/1703239236 |
-| `duration` | *number* | :heavy_minus_sign: | N/A | 11558112 |
-| `originallyAvailableAt` | [RFCDate](../../../types/rfcdate.md) | :heavy_minus_sign: | N/A | 2022-12-14 00:00:00 +0000 UTC |
-| `addedAt` | *number* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
-| `updatedAt` | *number* | :heavy_minus_sign: | Unix epoch datetime in seconds | 1556281940 |
-| `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/58684 |
-| `ratingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe |
-| `grandparentRatingKey` | *string* | :heavy_minus_sign: | N/A | 66 |
-| `grandparentGuid` | *string* | :heavy_minus_sign: | N/A | plex://show/5d9c081b170e24001f2a7be4 |
-| `grandparentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66 |
-| `grandparentTitle` | *string* | :heavy_minus_sign: | N/A | Caprica |
-| `grandparentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 |
-| `parentSlug` | *string* | :heavy_minus_sign: | N/A | alice-in-borderland-2020 |
-| `grandparentSlug` | *string* | :heavy_minus_sign: | N/A | alice-in-borderland-2020 |
-| `grandparentArt` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/art/1705716261 |
-| `grandparentTheme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 |
-| `media` | [operations.GetLibraryItemsMedia](../../../sdk/models/operations/getlibraryitemsmedia.md)[] | :heavy_minus_sign: | The Media object is only included when type query is `4` or higher.
| |
-| `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 | |
-| `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 | |
-| `location` | [operations.GetLibraryItemsLocation](../../../sdk/models/operations/getlibraryitemslocation.md)[] | :heavy_minus_sign: | N/A | |
-| `mediaGuid` | [operations.MediaGuid](../../../sdk/models/operations/mediaguid.md)[] | :heavy_minus_sign: | The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.
| |
-| `ultraBlurColors` | [operations.GetLibraryItemsUltraBlurColors](../../../sdk/models/operations/getlibraryitemsultrablurcolors.md) | :heavy_minus_sign: | N/A | |
-| `metaDataRating` | [operations.MetaDataRating](../../../sdk/models/operations/metadatarating.md)[] | :heavy_minus_sign: | N/A | |
-| `image` | [operations.GetLibraryItemsImage](../../../sdk/models/operations/getlibraryitemsimage.md)[] | :heavy_minus_sign: | N/A | |
-| `titleSort` | *string* | :heavy_minus_sign: | N/A | Whale |
-| `viewCount` | *number* | :heavy_minus_sign: | N/A | 1 |
-| `lastViewedAt` | *number* | :heavy_minus_sign: | N/A | 1682752242 |
-| `originalTitle` | *string* | :heavy_minus_sign: | N/A | 映画 ブラッククローバー 魔法帝の剣 |
-| `viewOffset` | *number* | :heavy_minus_sign: | N/A | 5222500 |
-| `skipCount` | *number* | :heavy_minus_sign: | N/A | 1 |
-| `index` | *number* | :heavy_minus_sign: | N/A | 1 |
-| `theme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/1/theme/1705636920 |
-| `leafCount` | *number* | :heavy_minus_sign: | N/A | 14 |
-| `viewedLeafCount` | *number* | :heavy_minus_sign: | N/A | 0 |
-| `childCount` | *number* | :heavy_minus_sign: | N/A | 1 |
-| `hasPremiumExtras` | *string* | :heavy_minus_sign: | N/A | 1 |
-| `hasPremiumPrimaryExtra` | *string* | :heavy_minus_sign: | N/A | 1 |
-| `parentRatingKey` | *string* | :heavy_minus_sign: | The rating key of the parent item.
| 66 |
-| `parentGuid` | *string* | :heavy_minus_sign: | N/A | plex://show/5d9c081b170e24001f2a7be4 |
-| `parentStudio` | *string* | :heavy_minus_sign: | N/A | UCP |
-| `parentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66 |
-| `parentTitle` | *string* | :heavy_minus_sign: | N/A | Caprica |
-| `parentIndex` | *number* | :heavy_minus_sign: | N/A | 1 |
-| `parentYear` | *number* | :heavy_minus_sign: | N/A | 2010 |
-| `parentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 |
-| `parentTheme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 |
\ No newline at end of file
+| 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/getlibraryitemsoptimizedforstreaming.md b/docs/sdk/models/operations/getlibraryitemsoptimizedforstreaming.md
index a0a9cba7..2ea3846e 100644
--- a/docs/sdk/models/operations/getlibraryitemsoptimizedforstreaming.md
+++ b/docs/sdk/models/operations/getlibraryitemsoptimizedforstreaming.md
@@ -1,17 +1,19 @@
# GetLibraryItemsOptimizedForStreaming
-## Example Usage
+Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
+
+
+## Supported Types
+
+### `operations.OptimizedForStreaming1`
```typescript
-import { GetLibraryItemsOptimizedForStreaming } from "@lukehagar/plexjs/sdk/models/operations";
-
-let value: GetLibraryItemsOptimizedForStreaming =
- GetLibraryItemsOptimizedForStreaming.Enable;
+const value: operations.OptimizedForStreaming1 = OptimizedForStreaming1.One;
```
-## Values
+### `boolean`
+
+```typescript
+const value: boolean = true;
+```
-| Name | Value |
-| --------- | --------- |
-| `Disable` | 0 |
-| `Enable` | 1 |
\ No newline at end of file
diff --git a/docs/sdk/models/operations/getlibraryitemsoptimizedforstreaming1.md b/docs/sdk/models/operations/getlibraryitemsoptimizedforstreaming1.md
new file mode 100644
index 00000000..dc9ea553
--- /dev/null
+++ b/docs/sdk/models/operations/getlibraryitemsoptimizedforstreaming1.md
@@ -0,0 +1,17 @@
+# 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
index adb07e07..c35d5580 100644
--- a/docs/sdk/models/operations/getlibraryitemspart.md
+++ b/docs/sdk/models/operations/getlibraryitemspart.md
@@ -6,78 +6,39 @@
import { GetLibraryItemsHasThumbnail, GetLibraryItemsPart } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetLibraryItemsPart = {
- id: 119542,
- key: "/library/parts/119542/1680457526/file.mkv",
- duration: 11558112,
- file:
- "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv",
- size: 36158371307,
+ 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,
- optimizedForStreaming: false,
- videoProfile: "main 10",
- indexes: "sd",
hasThumbnail: GetLibraryItemsHasThumbnail.True,
- stream: [
- {
- id: 272796,
- streamType: 1,
- default: true,
- selected: true,
- codec: "h264",
- index: 0,
- bitrate: 6273,
- colorPrimaries: "bt709",
- colorRange: "tv",
- colorSpace: "bt709",
- colorTrc: "bt709",
- bitDepth: 8,
- chromaLocation: "left",
- streamIdentifier: "2",
- chromaSubsampling: "4:2:0",
- codedHeight: 1088,
- codedWidth: 1920,
- frameRate: 29.97,
- hasScalingMatrix: false,
- hearingImpaired: false,
- closedCaptions: false,
- embeddedInVideo: "1",
- height: 1080,
- level: 40,
- profile: "main",
- refFrames: 4,
- scanType: "progressive",
- width: 1920,
- displayTitle: "1080p (H.264)",
- extendedDisplayTitle: "1080p (H.264)",
- channels: 2,
- language: "English",
- languageTag: "en",
- languageCode: "eng",
- audioChannelLayout: "stereo",
- samplingRate: 48000,
- title: "English",
- canAutoSync: false,
- },
- ],
};
```
## Fields
-| Field | Type | Required | Description | Example |
-| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
-| `id` | *number* | :heavy_check_mark: | N/A | 119542 |
-| `key` | *string* | :heavy_check_mark: | N/A | /library/parts/119542/1680457526/file.mkv |
-| `duration` | *number* | :heavy_minus_sign: | N/A | 11558112 |
-| `file` | *string* | :heavy_check_mark: | N/A | /movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv |
-| `size` | *number* | :heavy_check_mark: | N/A | 36158371307 |
-| `container` | *string* | :heavy_check_mark: | The container format of the media file.
| mkv |
-| `audioProfile` | *string* | :heavy_minus_sign: | N/A | dts |
-| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | false |
-| `optimizedForStreaming` | *boolean* | :heavy_minus_sign: | N/A | false |
-| `videoProfile` | *string* | :heavy_minus_sign: | N/A | main 10 |
-| `indexes` | *string* | :heavy_minus_sign: | N/A | sd |
-| `hasThumbnail` | [operations.GetLibraryItemsHasThumbnail](../../../sdk/models/operations/getlibraryitemshasthumbnail.md) | :heavy_minus_sign: | N/A | 1 |
-| `stream` | [operations.GetLibraryItemsStream](../../../sdk/models/operations/getlibraryitemsstream.md)[] | :heavy_minus_sign: | N/A | |
\ No newline at end of file
+| 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
new file mode 100644
index 00000000..9c1e5605
--- /dev/null
+++ b/docs/sdk/models/operations/getlibraryitemsproducer.md
@@ -0,0 +1,28 @@
+# 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/getlibraryitemsresponsebody.md b/docs/sdk/models/operations/getlibraryitemsresponsebody.md
index 06f2a144..b6579337 100644
--- a/docs/sdk/models/operations/getlibraryitemsresponsebody.md
+++ b/docs/sdk/models/operations/getlibraryitemsresponsebody.md
@@ -5,240 +5,30 @@ The contents of the library by section and tag
## Example Usage
```typescript
-import {
- EnableCreditsMarkerGeneration,
- EpisodeSort,
- FlattenSeasons,
- GetLibraryItemsLibraryResponse200Type,
- GetLibraryItemsLibraryType,
- GetLibraryItemsOptimizedForStreaming,
- GetLibraryItemsResponseBody,
- ShowOrdering,
-} from "@lukehagar/plexjs/sdk/models/operations";
-import { RFCDate } from "@lukehagar/plexjs/sdk/types";
+import { GetLibraryItemsResponseBody } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetLibraryItemsResponseBody = {
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: [],
- },
- ],
- size: 70,
- totalSize: 170,
+ size: 50,
+ totalSize: 50,
offset: 0,
content: "secondary",
- allowSync: true,
+ allowSync: false,
nocache: true,
- art: "/:/resources/movie-fanart.jpg",
+ art: "/:/resources/show-fanart.jpg",
identifier: "com.plexapp.plugins.library",
- librarySectionID: 1,
- librarySectionTitle: "Movies",
- librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30",
+ librarySectionID: 2,
+ librarySectionTitle: "TV Series",
+ librarySectionUUID: "e69655a2-ef48-4aba-bb19-0cc34d1e7d36",
mediaTagPrefix: "/system/bundle/media/flags/",
- mediaTagVersion: 1701731894,
- thumb: "/:/resources/movie.png",
- title1: "Movies",
- title2: "Recently Released",
- viewGroup: "movie",
- viewMode: 65592,
+ mediaTagVersion: 1734362201,
+ thumb: "/:/resources/show.png",
+ title1: "TV Series",
+ title2: "By Starring Actor",
+ viewGroup: "secondary",
+ viewMode: "131131",
mixedParents: true,
- metadata: [
- {
- ratingKey: "58683",
- key: "/library/metadata/58683",
- guid: "plex://movie/5d7768ba96b655001fdc0408",
- studio: "20th Century Studios",
- skipChildren: false,
- librarySectionID: 1,
- librarySectionTitle: "Movies",
- librarySectionKey: "/library/sections/1",
- type: GetLibraryItemsLibraryType.Movie,
- title: "Avatar: The Way of Water",
- slug: "4-for-texas",
- contentRating: "PG-13",
- summary:
- "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.",
- rating: 7.6,
- audienceRating: 9.2,
- year: 2022,
- seasonCount: 2022,
- tagline: "Return to Pandora.",
- flattenSeasons: FlattenSeasons.Show,
- episodeSort: EpisodeSort.OldestFirst,
- enableCreditsMarkerGeneration:
- EnableCreditsMarkerGeneration.LibraryDefault,
- showOrdering: ShowOrdering.TvdbAbsolute,
- thumb: "/library/metadata/58683/thumb/1703239236",
- art: "/library/metadata/58683/art/1703239236",
- banner: "/library/metadata/58683/banner/1703239236",
- duration: 11558112,
- originallyAvailableAt: new RFCDate("2022-12-14T00:00:00Z"),
- addedAt: 1556281940,
- updatedAt: 1556281940,
- audienceRatingImage: "rottentomatoes://image.rating.upright",
- chapterSource: "media",
- primaryExtraKey: "/library/metadata/58684",
- ratingImage: "rottentomatoes://image.rating.ripe",
- grandparentRatingKey: "66",
- grandparentGuid: "plex://show/5d9c081b170e24001f2a7be4",
- grandparentKey: "/library/metadata/66",
- grandparentTitle: "Caprica",
- grandparentThumb: "/library/metadata/66/thumb/1705716261",
- parentSlug: "alice-in-borderland-2020",
- grandparentSlug: "alice-in-borderland-2020",
- grandparentArt: "/library/metadata/66/art/1705716261",
- grandparentTheme: "/library/metadata/66/theme/1705716261",
- media: [
- {
- id: 119534,
- duration: 11558112,
- bitrate: 25025,
- width: 3840,
- height: 2072,
- aspectRatio: 1.85,
- audioProfile: "dts",
- audioChannels: 6,
- audioCodec: "eac3",
- videoCodec: "hevc",
- videoResolution: "4k",
- container: "mkv",
- videoFrameRate: "24p",
- videoProfile: "main 10",
- hasVoiceActivity: false,
- optimizedForStreaming: GetLibraryItemsOptimizedForStreaming.Enable,
- has64bitOffsets: false,
- part: [],
- },
- ],
- genre: [
- {
- tag: "Adventure",
- },
- ],
- country: [
- {
- tag: "United States of America",
- },
- ],
- director: [
- {
- tag: "James Cameron",
- },
- ],
- writer: [
- {
- tag: "James Cameron",
- },
- ],
- collection: [
- {
- tag: "Working NL Subs",
- },
- ],
- role: [
- {
- id: 294129,
- filter: "actor=294129",
- thumb:
- "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg",
- tag: "Mike Smith",
- tagKey: "668e7e7b22bcad9064350c91",
- role: "Self",
- },
- ],
- location: [
- {
- path: "/TV Shows/House",
- },
- ],
- mediaGuid: [
- {
- id: "imdb://tt13015952",
- },
- ],
- ultraBlurColors: {
- topLeft: "11333b",
- topRight: "0a232d",
- bottomRight: "73958",
- bottomLeft: "1f5066",
- },
- metaDataRating: [
- {
- image: "themoviedb://image.rating",
- value: 3,
- type: "audience",
- },
- ],
- image: [
- {
- alt: "Episode 1",
- type: GetLibraryItemsLibraryResponse200Type.Background,
- url: "/library/metadata/45521/thumb/1644710589",
- },
- ],
- titleSort: "Whale",
- viewCount: 1,
- lastViewedAt: 1682752242,
- originalTitle: "映画 ブラッククローバー 魔法帝の剣",
- viewOffset: 5222500,
- skipCount: 1,
- index: 1,
- theme: "/library/metadata/1/theme/1705636920",
- leafCount: 14,
- viewedLeafCount: 0,
- childCount: 1,
- hasPremiumExtras: "1",
- hasPremiumPrimaryExtra: "1",
- parentRatingKey: "66",
- parentGuid: "plex://show/5d9c081b170e24001f2a7be4",
- parentStudio: "UCP",
- parentKey: "/library/metadata/66",
- parentTitle: "Caprica",
- parentIndex: 1,
- parentYear: 2010,
- parentThumb: "/library/metadata/66/thumb/1705716261",
- parentTheme: "/library/metadata/66/theme/1705716261",
- },
- ],
+ metadata: [],
meta: {
type: [
{
diff --git a/docs/sdk/models/operations/getlibraryitemsrole.md b/docs/sdk/models/operations/getlibraryitemsrole.md
index 86154b28..083f8283 100644
--- a/docs/sdk/models/operations/getlibraryitemsrole.md
+++ b/docs/sdk/models/operations/getlibraryitemsrole.md
@@ -6,23 +6,19 @@
import { GetLibraryItemsRole } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetLibraryItemsRole = {
- id: 294129,
- filter: "actor=294129",
+ id: 126522,
+ tag: "Teller",
+ role: "Self - Judge",
thumb:
- "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg",
- tag: "Mike Smith",
- tagKey: "668e7e7b22bcad9064350c91",
- role: "Self",
+ "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg",
};
```
## Fields
-| Field | Type | Required | Description | Example |
-| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
-| `id` | *number* | :heavy_minus_sign: | The ID of the tag or actor. | 294129 |
-| `filter` | *string* | :heavy_minus_sign: | The filter used to find the actor or tag. | actor=294129 |
-| `thumb` | *string* | :heavy_minus_sign: | The thumbnail of the actor | https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg |
-| `tag` | *string* | :heavy_minus_sign: | The name of the tag or actor. | Mike Smith |
-| `tagKey` | *string* | :heavy_minus_sign: | Unique identifier for the tag. | 668e7e7b22bcad9064350c91 |
-| `role` | *string* | :heavy_minus_sign: | The role of the actor or tag in the media. | Self |
\ No newline at end of file
+| 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
new file mode 100644
index 00000000..fc3bcef9
--- /dev/null
+++ b/docs/sdk/models/operations/getlibraryitemssimilar.md
@@ -0,0 +1,21 @@
+# 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/getlibraryitemsstream.md b/docs/sdk/models/operations/getlibraryitemsstream.md
deleted file mode 100644
index bb2cdac5..00000000
--- a/docs/sdk/models/operations/getlibraryitemsstream.md
+++ /dev/null
@@ -1,91 +0,0 @@
-# GetLibraryItemsStream
-
-## Example Usage
-
-```typescript
-import { GetLibraryItemsStream } from "@lukehagar/plexjs/sdk/models/operations";
-
-let value: GetLibraryItemsStream = {
- id: 272796,
- streamType: 1,
- default: true,
- selected: true,
- codec: "h264",
- index: 0,
- bitrate: 6273,
- colorPrimaries: "bt709",
- colorRange: "tv",
- colorSpace: "bt709",
- colorTrc: "bt709",
- bitDepth: 8,
- chromaLocation: "left",
- streamIdentifier: "2",
- chromaSubsampling: "4:2:0",
- codedHeight: 1088,
- codedWidth: 1920,
- frameRate: 29.97,
- hasScalingMatrix: false,
- hearingImpaired: false,
- closedCaptions: false,
- embeddedInVideo: "1",
- height: 1080,
- level: 40,
- profile: "main",
- refFrames: 4,
- scanType: "progressive",
- width: 1920,
- displayTitle: "1080p (H.264)",
- extendedDisplayTitle: "1080p (H.264)",
- channels: 2,
- language: "English",
- languageTag: "en",
- languageCode: "eng",
- audioChannelLayout: "stereo",
- samplingRate: 48000,
- title: "English",
- canAutoSync: false,
-};
-```
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- |
-| `id` | *number* | :heavy_check_mark: | N/A | 272796 |
-| `streamType` | *number* | :heavy_check_mark: | Type of stream (1 = video, 2 = audio, 3 = subtitle) | 1 |
-| `default` | *boolean* | :heavy_minus_sign: | Indicates if this is the default stream | true |
-| `selected` | *boolean* | :heavy_minus_sign: | Indicates if the stream is selected | true |
-| `codec` | *string* | :heavy_check_mark: | Codec used by the stream | h264 |
-| `index` | *number* | :heavy_check_mark: | The index of the stream | 0 |
-| `bitrate` | *number* | :heavy_minus_sign: | The bitrate of the stream in kbps | 6273 |
-| `colorPrimaries` | *string* | :heavy_minus_sign: | The color primaries of the video stream | bt709 |
-| `colorRange` | *string* | :heavy_minus_sign: | The color range of the video stream | tv |
-| `colorSpace` | *string* | :heavy_minus_sign: | The color space of the video stream | bt709 |
-| `colorTrc` | *string* | :heavy_minus_sign: | The transfer characteristics (TRC) of the video stream | bt709 |
-| `bitDepth` | *number* | :heavy_minus_sign: | The bit depth of the video stream | 8 |
-| `chromaLocation` | *string* | :heavy_minus_sign: | The chroma location of the video stream | left |
-| `streamIdentifier` | *string* | :heavy_minus_sign: | The identifier of the video stream | 2 |
-| `chromaSubsampling` | *string* | :heavy_minus_sign: | The chroma subsampling format | 4:2:0 |
-| `codedHeight` | *number* | :heavy_minus_sign: | The coded height of the video stream | 1088 |
-| `codedWidth` | *number* | :heavy_minus_sign: | The coded width of the video stream | 1920 |
-| `frameRate` | *number* | :heavy_minus_sign: | The frame rate of the video stream | 29.97 |
-| `hasScalingMatrix` | *boolean* | :heavy_minus_sign: | Indicates if the stream has a scaling matrix | false |
-| `hearingImpaired` | *boolean* | :heavy_minus_sign: | N/A | false |
-| `closedCaptions` | *boolean* | :heavy_minus_sign: | N/A | false |
-| `embeddedInVideo` | *string* | :heavy_minus_sign: | N/A | 1 |
-| `height` | *number* | :heavy_minus_sign: | The height of the video stream | 1080 |
-| `level` | *number* | :heavy_minus_sign: | The level of the video codec | 40 |
-| `profile` | *string* | :heavy_minus_sign: | The profile of the video codec | main |
-| `refFrames` | *number* | :heavy_minus_sign: | Number of reference frames | 4 |
-| `scanType` | *string* | :heavy_minus_sign: | The scan type (progressive or interlaced) | progressive |
-| `width` | *number* | :heavy_minus_sign: | The width of the video stream | 1920 |
-| `displayTitle` | *string* | :heavy_minus_sign: | Display title of the stream | 1080p (H.264) |
-| `extendedDisplayTitle` | *string* | :heavy_minus_sign: | Extended display title of the stream | 1080p (H.264) |
-| `channels` | *number* | :heavy_minus_sign: | Number of audio channels (for audio streams) | 2 |
-| `language` | *string* | :heavy_minus_sign: | The language of the stream (for audio/subtitle streams) | English |
-| `languageTag` | *string* | :heavy_minus_sign: | Language tag of the stream | en |
-| `languageCode` | *string* | :heavy_minus_sign: | Language code of the stream | eng |
-| `audioChannelLayout` | *string* | :heavy_minus_sign: | The audio channel layout | stereo |
-| `samplingRate` | *number* | :heavy_minus_sign: | Sampling rate of the audio stream in Hz | 48000 |
-| `title` | *string* | :heavy_minus_sign: | Title of the subtitle track (for subtitle streams) | English |
-| `canAutoSync` | *boolean* | :heavy_minus_sign: | Indicates if the subtitle stream can auto-sync | false |
\ No newline at end of file
diff --git a/docs/sdk/models/operations/getlibraryitemstype.md b/docs/sdk/models/operations/getlibraryitemstype.md
index ec8023f3..320e9f0c 100644
--- a/docs/sdk/models/operations/getlibraryitemstype.md
+++ b/docs/sdk/models/operations/getlibraryitemstype.md
@@ -1,56 +1,30 @@
# 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 = {
- 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",
- },
- ],
-};
+let value: GetLibraryItemsType = GetLibraryItemsType.Movie;
```
-## Fields
+## Values
-| 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.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
+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/getlibraryitemswriter.md b/docs/sdk/models/operations/getlibraryitemswriter.md
index 4a6d11b2..72cbdba0 100644
--- a/docs/sdk/models/operations/getlibraryitemswriter.md
+++ b/docs/sdk/models/operations/getlibraryitemswriter.md
@@ -6,12 +6,17 @@
import { GetLibraryItemsWriter } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetLibraryItemsWriter = {
- tag: "James Cameron",
+ id: 126522,
+ tag: "Jamie P. Hanson",
+ thumb:
+ "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg",
};
```
## Fields
-| Field | Type | Required | Description | Example |
-| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
-| `tag` | *string* | :heavy_minus_sign: | N/A | James Cameron |
\ No newline at end of file
+| 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/getlibrarysectionsalllibraryoptimizedforstreaming.md b/docs/sdk/models/operations/getlibrarysectionsalllibraryoptimizedforstreaming.md
index d9ac9ec8..282473bc 100644
--- a/docs/sdk/models/operations/getlibrarysectionsalllibraryoptimizedforstreaming.md
+++ b/docs/sdk/models/operations/getlibrarysectionsalllibraryoptimizedforstreaming.md
@@ -5,11 +5,11 @@ Has this media been optimized for streaming. NOTE: This can be 0, 1, false or tr
## Supported Types
-### `operations.GetLibrarySectionsAllOptimizedForStreaming1`
+### `operations.GetLibrarySectionsAllOptimizedForStreamingLibrary1`
```typescript
-const value: operations.GetLibrarySectionsAllOptimizedForStreaming1 =
- GetLibrarySectionsAllOptimizedForStreaming1.Zero;
+const value: operations.GetLibrarySectionsAllOptimizedForStreamingLibrary1 =
+ GetLibrarySectionsAllOptimizedForStreamingLibrary1.One;
```
### `boolean`
diff --git a/docs/sdk/models/operations/getlibrarysectionsallmedia.md b/docs/sdk/models/operations/getlibrarysectionsallmedia.md
index f54c7992..90f8a170 100644
--- a/docs/sdk/models/operations/getlibrarysectionsallmedia.md
+++ b/docs/sdk/models/operations/getlibrarysectionsallmedia.md
@@ -3,11 +3,7 @@
## Example Usage
```typescript
-import {
- GetLibrarySectionsAllHasThumbnail,
- GetLibrarySectionsAllMedia,
- GetLibrarySectionsAllStreamType,
-} from "@lukehagar/plexjs/sdk/models/operations";
+import { GetLibrarySectionsAllHasThumbnail, GetLibrarySectionsAllMedia } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetLibrarySectionsAllMedia = {
id: 387322,
@@ -46,7 +42,6 @@ let value: GetLibrarySectionsAllMedia = {
stream: [
{
id: 1002625,
- streamType: GetLibrarySectionsAllStreamType.Video,
format: "srt",
default: true,
codec: "hevc",
diff --git a/docs/sdk/models/operations/getlibrarysectionsallmediacontainer.md b/docs/sdk/models/operations/getlibrarysectionsallmediacontainer.md
index 993847ac..9abe8bfa 100644
--- a/docs/sdk/models/operations/getlibrarysectionsallmediacontainer.md
+++ b/docs/sdk/models/operations/getlibrarysectionsallmediacontainer.md
@@ -8,7 +8,6 @@ import {
GetLibrarySectionsAllLibraryResponseType,
GetLibrarySectionsAllLibraryType,
GetLibrarySectionsAllMediaContainer,
- GetLibrarySectionsAllStreamType,
} from "@lukehagar/plexjs/sdk/models/operations";
import { RFCDate } from "@lukehagar/plexjs/sdk/types";
@@ -197,7 +196,6 @@ let value: GetLibrarySectionsAllMediaContainer = {
stream: [
{
id: 1002625,
- streamType: GetLibrarySectionsAllStreamType.Video,
format: "srt",
default: true,
codec: "hevc",
@@ -299,8 +297,8 @@ let value: GetLibrarySectionsAllMediaContainer = {
| `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_check_mark: | The unique identifier for the library section. | 2 |
-| `librarySectionTitle` | *string* | :heavy_check_mark: | The title of the library section. | TV Series |
+| `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 |
diff --git a/docs/sdk/models/operations/getlibrarysectionsallmetadata.md b/docs/sdk/models/operations/getlibrarysectionsallmetadata.md
index d307bc1e..67721ec6 100644
--- a/docs/sdk/models/operations/getlibrarysectionsallmetadata.md
+++ b/docs/sdk/models/operations/getlibrarysectionsallmetadata.md
@@ -11,7 +11,6 @@ import {
GetLibrarySectionsAllLibraryResponseType,
GetLibrarySectionsAllLibraryType,
GetLibrarySectionsAllMetadata,
- GetLibrarySectionsAllStreamType,
} from "@lukehagar/plexjs/sdk/models/operations";
import { RFCDate } from "@lukehagar/plexjs/sdk/types";
@@ -131,7 +130,6 @@ let value: GetLibrarySectionsAllMetadata = {
stream: [
{
id: 1002625,
- streamType: GetLibrarySectionsAllStreamType.Video,
format: "srt",
default: true,
codec: "hevc",
@@ -247,7 +245,7 @@ let value: GetLibrarySectionsAllMetadata = {
| `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_check_mark: | The original release date of the media item. | 2022-12-14 |
+| `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 |
diff --git a/docs/sdk/models/operations/getlibrarysectionsalloptimizedforstreaming.md b/docs/sdk/models/operations/getlibrarysectionsalloptimizedforstreaming.md
index 8961f0ee..58fc2710 100644
--- a/docs/sdk/models/operations/getlibrarysectionsalloptimizedforstreaming.md
+++ b/docs/sdk/models/operations/getlibrarysectionsalloptimizedforstreaming.md
@@ -5,10 +5,11 @@ Has this media been optimized for streaming. NOTE: This can be 0, 1, false or tr
## Supported Types
-### `operations.OptimizedForStreaming1`
+### `operations.GetLibrarySectionsAllOptimizedForStreaming1`
```typescript
-const value: operations.OptimizedForStreaming1 = OptimizedForStreaming1.One;
+const value: operations.GetLibrarySectionsAllOptimizedForStreaming1 =
+ GetLibrarySectionsAllOptimizedForStreaming1.Zero;
```
### `boolean`
diff --git a/docs/sdk/models/operations/getlibrarysectionsalloptimizedforstreaminglibrary1.md b/docs/sdk/models/operations/getlibrarysectionsalloptimizedforstreaminglibrary1.md
new file mode 100644
index 00000000..f176d5c3
--- /dev/null
+++ b/docs/sdk/models/operations/getlibrarysectionsalloptimizedforstreaminglibrary1.md
@@ -0,0 +1,17 @@
+# 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
index 8df5716b..00ce4287 100644
--- a/docs/sdk/models/operations/getlibrarysectionsallpart.md
+++ b/docs/sdk/models/operations/getlibrarysectionsallpart.md
@@ -3,11 +3,7 @@
## Example Usage
```typescript
-import {
- GetLibrarySectionsAllHasThumbnail,
- GetLibrarySectionsAllPart,
- GetLibrarySectionsAllStreamType,
-} from "@lukehagar/plexjs/sdk/models/operations";
+import { GetLibrarySectionsAllHasThumbnail, GetLibrarySectionsAllPart } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetLibrarySectionsAllPart = {
accessible: true,
@@ -27,7 +23,6 @@ let value: GetLibrarySectionsAllPart = {
stream: [
{
id: 1002625,
- streamType: GetLibrarySectionsAllStreamType.Video,
format: "srt",
default: true,
codec: "hevc",
diff --git a/docs/sdk/models/operations/getlibrarysectionsallresponsebody.md b/docs/sdk/models/operations/getlibrarysectionsallresponsebody.md
index 47d20b87..8e5c8d3e 100644
--- a/docs/sdk/models/operations/getlibrarysectionsallresponsebody.md
+++ b/docs/sdk/models/operations/getlibrarysectionsallresponsebody.md
@@ -10,7 +10,6 @@ import {
GetLibrarySectionsAllLibraryResponseType,
GetLibrarySectionsAllLibraryType,
GetLibrarySectionsAllResponseBody,
- GetLibrarySectionsAllStreamType,
} from "@lukehagar/plexjs/sdk/models/operations";
import { RFCDate } from "@lukehagar/plexjs/sdk/types";
@@ -200,7 +199,6 @@ let value: GetLibrarySectionsAllResponseBody = {
stream: [
{
id: 1002625,
- streamType: GetLibrarySectionsAllStreamType.Video,
format: "srt",
default: true,
codec: "hevc",
diff --git a/docs/sdk/models/operations/getlibrarysectionsallstream.md b/docs/sdk/models/operations/getlibrarysectionsallstream.md
index 895a9628..51aabbe0 100644
--- a/docs/sdk/models/operations/getlibrarysectionsallstream.md
+++ b/docs/sdk/models/operations/getlibrarysectionsallstream.md
@@ -3,11 +3,10 @@
## Example Usage
```typescript
-import { GetLibrarySectionsAllStream, GetLibrarySectionsAllStreamType } from "@lukehagar/plexjs/sdk/models/operations";
+import { GetLibrarySectionsAllStream } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetLibrarySectionsAllStream = {
id: 1002625,
- streamType: GetLibrarySectionsAllStreamType.Video,
format: "srt",
default: true,
codec: "hevc",
@@ -62,56 +61,56 @@ let value: GetLibrarySectionsAllStream = {
## Fields
-| Field | Type | Required | Description | Example |
-| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
-| `id` | *number* | :heavy_check_mark: | Unique stream identifier. | 1002625 |
-| `streamType` | [operations.GetLibrarySectionsAllStreamType](../../../sdk/models/operations/getlibrarysectionsallstreamtype.md) | :heavy_check_mark: | Stream type:
- 1 = video
- 2 = audio
- 3 = subtitle
| 1 |
-| `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
+| 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/getlibrarysectionsallstreamtype.md b/docs/sdk/models/operations/getlibrarysectionsallstreamtype.md
deleted file mode 100644
index 65ee0819..00000000
--- a/docs/sdk/models/operations/getlibrarysectionsallstreamtype.md
+++ /dev/null
@@ -1,27 +0,0 @@
-# GetLibrarySectionsAllStreamType
-
-Stream type:
- - 1 = video
- - 2 = audio
- - 3 = subtitle
-
-
-## Example Usage
-
-```typescript
-import { GetLibrarySectionsAllStreamType } from "@lukehagar/plexjs/sdk/models/operations";
-
-let value: GetLibrarySectionsAllStreamType =
- GetLibrarySectionsAllStreamType.Video;
-```
-
-## Values
-
-This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type.
-
-| Name | Value |
-| ---------------------- | ---------------------- |
-| `Video` | 1 |
-| `Audio` | 2 |
-| `Subtitle` | 3 |
-| - | `Unrecognized` |
\ No newline at end of file
diff --git a/docs/sdk/models/operations/getmediametadataattributes.md b/docs/sdk/models/operations/getmediametadataattributes.md
new file mode 100644
index 00000000..12ec7542
--- /dev/null
+++ b/docs/sdk/models/operations/getmediametadataattributes.md
@@ -0,0 +1,21 @@
+# 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
new file mode 100644
index 00000000..dd8d8390
--- /dev/null
+++ b/docs/sdk/models/operations/getmediametadatachapter.md
@@ -0,0 +1,29 @@
+# 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/getmediametadataextras.md b/docs/sdk/models/operations/getmediametadataextras.md
new file mode 100644
index 00000000..56ca8bcf
--- /dev/null
+++ b/docs/sdk/models/operations/getmediametadataextras.md
@@ -0,0 +1,17 @@
+# 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/getmediametadatahasthumbnail.md b/docs/sdk/models/operations/getmediametadatahasthumbnail.md
index a1419e1b..35bf59ca 100644
--- a/docs/sdk/models/operations/getmediametadatahasthumbnail.md
+++ b/docs/sdk/models/operations/getmediametadatahasthumbnail.md
@@ -2,6 +2,7 @@
Indicates if the part has a thumbnail.
+
## Example Usage
```typescript
diff --git a/docs/sdk/models/operations/getmediametadatalibraryoptimizedforstreaming.md b/docs/sdk/models/operations/getmediametadatalibraryoptimizedforstreaming.md
index 78366fdc..7f71701b 100644
--- a/docs/sdk/models/operations/getmediametadatalibraryoptimizedforstreaming.md
+++ b/docs/sdk/models/operations/getmediametadatalibraryoptimizedforstreaming.md
@@ -3,6 +3,7 @@
Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
+
## Supported Types
### `operations.GetMediaMetaDataOptimizedForStreamingLibrary1`
diff --git a/docs/sdk/models/operations/getmediametadatamarker.md b/docs/sdk/models/operations/getmediametadatamarker.md
new file mode 100644
index 00000000..b7b40578
--- /dev/null
+++ b/docs/sdk/models/operations/getmediametadatamarker.md
@@ -0,0 +1,32 @@
+# 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
index ddb19af0..5c12459f 100644
--- a/docs/sdk/models/operations/getmediametadatamedia.md
+++ b/docs/sdk/models/operations/getmediametadatamedia.md
@@ -3,7 +3,7 @@
## Example Usage
```typescript
-import { GetMediaMetaDataHasThumbnail, GetMediaMetaDataMedia, GetMediaMetaDataStreamType } from "@lukehagar/plexjs/sdk/models/operations";
+import { GetMediaMetaDataHasThumbnail, GetMediaMetaDataMedia } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetMediaMetaDataMedia = {
id: 387322,
@@ -14,10 +14,10 @@ let value: GetMediaMetaDataMedia = {
aspectRatio: 2.35,
audioChannels: 6,
displayOffset: 50,
- audioCodec: "eac3",
+ audioCodec: "aac",
videoCodec: "hevc",
videoResolution: "4k",
- container: "mkv",
+ container: "mp4",
videoFrameRate: "24p",
videoProfile: "main 10",
hasVoiceActivity: false,
@@ -42,7 +42,6 @@ let value: GetMediaMetaDataMedia = {
stream: [
{
id: 1002625,
- streamType: GetMediaMetaDataStreamType.Video,
format: "srt",
default: true,
codec: "hevc",
@@ -101,24 +100,24 @@ let value: GetMediaMetaDataMedia = {
## 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.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: | N/A | false |
-| `part` | [operations.GetMediaMetaDataPart](../../../sdk/models/operations/getmediametadatapart.md)[] | :heavy_minus_sign: | An array of parts for this media item. | |
\ No newline at end of file
+| 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
index 338cc8b9..eca630d5 100644
--- a/docs/sdk/models/operations/getmediametadatamediacontainer.md
+++ b/docs/sdk/models/operations/getmediametadatamediacontainer.md
@@ -25,8 +25,8 @@ let value: GetMediaMetaDataMediaContainer = {
| `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_check_mark: | The unique identifier for the library section. | 2 |
-| `librarySectionTitle` | *string* | :heavy_check_mark: | The title of the library section. | TV Series |
+| `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 |
diff --git a/docs/sdk/models/operations/getmediametadatametadata.md b/docs/sdk/models/operations/getmediametadatametadata.md
index 34f95d32..d283d6be 100644
--- a/docs/sdk/models/operations/getmediametadatametadata.md
+++ b/docs/sdk/models/operations/getmediametadatametadata.md
@@ -10,7 +10,6 @@ import {
GetMediaMetaDataHasThumbnail,
GetMediaMetaDataLibraryType,
GetMediaMetaDataMetadata,
- GetMediaMetaDataStreamType,
GetMediaMetaDataType,
} from "@lukehagar/plexjs/sdk/models/operations";
import { RFCDate } from "@lukehagar/plexjs/sdk/types";
@@ -106,10 +105,10 @@ let value: GetMediaMetaDataMetadata = {
aspectRatio: 2.35,
audioChannels: 6,
displayOffset: 50,
- audioCodec: "eac3",
+ audioCodec: "aac",
videoCodec: "hevc",
videoResolution: "4k",
- container: "mkv",
+ container: "mp4",
videoFrameRate: "24p",
videoProfile: "main 10",
hasVoiceActivity: false,
@@ -134,7 +133,6 @@ let value: GetMediaMetaDataMetadata = {
stream: [
{
id: 1002625,
- streamType: GetMediaMetaDataStreamType.Video,
format: "srt",
default: true,
codec: "hevc",
@@ -321,7 +319,7 @@ let value: GetMediaMetaDataMetadata = {
| `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_check_mark: | The original release date of the media item. | 2022-12-14 |
+| `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 |
@@ -354,9 +352,9 @@ let value: GetMediaMetaDataMetadata = {
| `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_check_mark: | The identifier for the library section. | 1 |
-| `librarySectionTitle` | *string* | :heavy_check_mark: | The title of the library section. | Movies |
-| `librarySectionKey` | *string* | :heavy_check_mark: | The key corresponding to the library section. | /library/sections/1 |
+| `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 | |
@@ -365,9 +363,9 @@ let value: GetMediaMetaDataMetadata = {
| `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.Ratings](../../../sdk/models/operations/ratings.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.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
+| `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/getmediametadatapart.md b/docs/sdk/models/operations/getmediametadatapart.md
index c8a08175..82023bea 100644
--- a/docs/sdk/models/operations/getmediametadatapart.md
+++ b/docs/sdk/models/operations/getmediametadatapart.md
@@ -3,7 +3,7 @@
## Example Usage
```typescript
-import { GetMediaMetaDataHasThumbnail, GetMediaMetaDataPart, GetMediaMetaDataStreamType } from "@lukehagar/plexjs/sdk/models/operations";
+import { GetMediaMetaDataHasThumbnail, GetMediaMetaDataPart } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetMediaMetaDataPart = {
accessible: true,
@@ -23,7 +23,6 @@ let value: GetMediaMetaDataPart = {
stream: [
{
id: 1002625,
- streamType: GetMediaMetaDataStreamType.Video,
format: "srt",
default: true,
codec: "hevc",
@@ -85,16 +84,16 @@ let value: GetMediaMetaDataPart = {
| `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 |
+| `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_check_mark: | File path for the part. | /mnt/Movies_1/W/Wicked (2024).mkv |
-| `size` | *number* | :heavy_check_mark: | File size in bytes. | 30649952104 |
+| `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 | |
+| `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: | An array of streams for this part. | |
\ No newline at end of file
+| `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/metadatarating.md b/docs/sdk/models/operations/getmediametadataratings.md
similarity index 74%
rename from docs/sdk/models/operations/metadatarating.md
rename to docs/sdk/models/operations/getmediametadataratings.md
index cca82d42..66fa806c 100644
--- a/docs/sdk/models/operations/metadatarating.md
+++ b/docs/sdk/models/operations/getmediametadataratings.md
@@ -1,13 +1,13 @@
-# MetaDataRating
+# GetMediaMetaDataRatings
## Example Usage
```typescript
-import { MetaDataRating } from "@lukehagar/plexjs/sdk/models/operations";
+import { GetMediaMetaDataRatings } from "@lukehagar/plexjs/sdk/models/operations";
-let value: MetaDataRating = {
- image: "themoviedb://image.rating",
- value: 3,
+let value: GetMediaMetaDataRatings = {
+ image: "imdb://image.rating",
+ value: 9,
type: "audience",
};
```
@@ -16,6 +16,6 @@ let value: MetaDataRating = {
| Field | Type | Required | Description | Example |
| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- |
-| `image` | *string* | :heavy_check_mark: | A URI or path to the rating image. | themoviedb://image.rating |
-| `value` | *number* | :heavy_check_mark: | The value of the rating. | 3 |
+| `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/getmediametadatastream.md b/docs/sdk/models/operations/getmediametadatastream.md
index 968e1008..ac75efdf 100644
--- a/docs/sdk/models/operations/getmediametadatastream.md
+++ b/docs/sdk/models/operations/getmediametadatastream.md
@@ -3,11 +3,10 @@
## Example Usage
```typescript
-import { GetMediaMetaDataStream, GetMediaMetaDataStreamType } from "@lukehagar/plexjs/sdk/models/operations";
+import { GetMediaMetaDataStream } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetMediaMetaDataStream = {
id: 1002625,
- streamType: GetMediaMetaDataStreamType.Video,
format: "srt",
default: true,
codec: "hevc",
@@ -62,56 +61,56 @@ let value: GetMediaMetaDataStream = {
## Fields
-| Field | Type | Required | Description | Example |
-| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
-| `id` | *number* | :heavy_check_mark: | Unique stream identifier. | 1002625 |
-| `streamType` | [operations.GetMediaMetaDataStreamType](../../../sdk/models/operations/getmediametadatastreamtype.md) | :heavy_check_mark: | Stream type:
- 1 = video
- 2 = audio
- 3 = subtitle
| 1 |
-| `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
+| 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/getmediametadatastreamtype.md b/docs/sdk/models/operations/getmediametadatastreamtype.md
deleted file mode 100644
index 842b625b..00000000
--- a/docs/sdk/models/operations/getmediametadatastreamtype.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# GetMediaMetaDataStreamType
-
-Stream type:
- - 1 = video
- - 2 = audio
- - 3 = subtitle
-
-
-## Example Usage
-
-```typescript
-import { GetMediaMetaDataStreamType } from "@lukehagar/plexjs/sdk/models/operations";
-
-let value: GetMediaMetaDataStreamType = GetMediaMetaDataStreamType.Video;
-```
-
-## Values
-
-This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type.
-
-| Name | Value |
-| ---------------------- | ---------------------- |
-| `Video` | 1 |
-| `Audio` | 2 |
-| `Subtitle` | 3 |
-| - | `Unrecognized` |
\ No newline at end of file
diff --git a/docs/sdk/models/operations/getrecentlyaddedmediacontainer.md b/docs/sdk/models/operations/getrecentlyaddedmediacontainer.md
index 46a38b24..9666ebb1 100644
--- a/docs/sdk/models/operations/getrecentlyaddedmediacontainer.md
+++ b/docs/sdk/models/operations/getrecentlyaddedmediacontainer.md
@@ -8,7 +8,6 @@ import {
GetRecentlyAddedHubsType,
GetRecentlyAddedMediaContainer,
HasThumbnail,
- StreamType,
} from "@lukehagar/plexjs/sdk/models/operations";
import { RFCDate } from "@lukehagar/plexjs/sdk/types";
@@ -192,7 +191,6 @@ let value: GetRecentlyAddedMediaContainer = {
stream: [
{
id: 1002625,
- streamType: StreamType.Video,
format: "srt",
default: true,
codec: "hevc",
diff --git a/docs/sdk/models/operations/getrecentlyaddedmetadata.md b/docs/sdk/models/operations/getrecentlyaddedmetadata.md
index 09cdbe43..785dff32 100644
--- a/docs/sdk/models/operations/getrecentlyaddedmetadata.md
+++ b/docs/sdk/models/operations/getrecentlyaddedmetadata.md
@@ -11,7 +11,6 @@ import {
GetRecentlyAddedHubsType,
GetRecentlyAddedMetadata,
HasThumbnail,
- StreamType,
} from "@lukehagar/plexjs/sdk/models/operations";
import { RFCDate } from "@lukehagar/plexjs/sdk/types";
@@ -138,7 +137,6 @@ let value: GetRecentlyAddedMetadata = {
stream: [
{
id: 1002625,
- streamType: StreamType.Video,
format: "srt",
default: true,
codec: "hevc",
@@ -304,11 +302,11 @@ let value: GetRecentlyAddedMetadata = {
| `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_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 |
+| `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_check_mark: | The original release date of the media item. | 2022-12-14 |
+| `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 |
diff --git a/docs/sdk/models/operations/getrecentlyaddedresponsebody.md b/docs/sdk/models/operations/getrecentlyaddedresponsebody.md
index ac65518f..597126c7 100644
--- a/docs/sdk/models/operations/getrecentlyaddedresponsebody.md
+++ b/docs/sdk/models/operations/getrecentlyaddedresponsebody.md
@@ -10,7 +10,6 @@ import {
GetRecentlyAddedHubsType,
GetRecentlyAddedResponseBody,
HasThumbnail,
- StreamType,
} from "@lukehagar/plexjs/sdk/models/operations";
import { RFCDate } from "@lukehagar/plexjs/sdk/types";
@@ -195,7 +194,6 @@ let value: GetRecentlyAddedResponseBody = {
stream: [
{
id: 1002625,
- streamType: StreamType.Video,
format: "srt",
default: true,
codec: "hevc",
diff --git a/docs/sdk/models/operations/getsearchalllibrariescollection.md b/docs/sdk/models/operations/getsearchalllibrariescollection.md
deleted file mode 100644
index 2bd31df4..00000000
--- a/docs/sdk/models/operations/getsearchalllibrariescollection.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# GetSearchAllLibrariesCollection
-
-## Example Usage
-
-```typescript
-import { GetSearchAllLibrariesCollection } from "@lukehagar/plexjs/sdk/models/operations";
-
-let value: GetSearchAllLibrariesCollection = {
- tag: "Working NL Subs",
-};
-```
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
-| `tag` | *string* | :heavy_minus_sign: | N/A | Working NL Subs |
\ No newline at end of file
diff --git a/docs/sdk/models/operations/getsearchalllibrariescountry.md b/docs/sdk/models/operations/getsearchalllibrariescountry.md
index e57256a6..7824acb0 100644
--- a/docs/sdk/models/operations/getsearchalllibrariescountry.md
+++ b/docs/sdk/models/operations/getsearchalllibrariescountry.md
@@ -6,12 +6,14 @@
import { GetSearchAllLibrariesCountry } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetSearchAllLibrariesCountry = {
+ id: 259,
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
+| 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
index cada70aa..54c16fa2 100644
--- a/docs/sdk/models/operations/getsearchalllibrariesdirector.md
+++ b/docs/sdk/models/operations/getsearchalllibrariesdirector.md
@@ -6,12 +6,17 @@
import { GetSearchAllLibrariesDirector } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetSearchAllLibrariesDirector = {
- tag: "James Cameron",
+ id: 126522,
+ tag: "Danny Boyle",
+ thumb:
+ "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg",
};
```
## Fields
-| Field | Type | Required | Description | Example |
-| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
-| `tag` | *string* | :heavy_minus_sign: | N/A | James Cameron |
\ No newline at end of file
+| 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
new file mode 100644
index 00000000..c52c6962
--- /dev/null
+++ b/docs/sdk/models/operations/getsearchalllibrariesdirectory.md
@@ -0,0 +1,40 @@
+# 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/getsearchalllibrariesenablecreditsmarkergeneration.md b/docs/sdk/models/operations/getsearchalllibrariesenablecreditsmarkergeneration.md
deleted file mode 100644
index 4e184474..00000000
--- a/docs/sdk/models/operations/getsearchalllibrariesenablecreditsmarkergeneration.md
+++ /dev/null
@@ -1,22 +0,0 @@
-# GetSearchAllLibrariesEnableCreditsMarkerGeneration
-
-Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
-
-## Example Usage
-
-```typescript
-import { GetSearchAllLibrariesEnableCreditsMarkerGeneration } from "@lukehagar/plexjs/sdk/models/operations";
-
-let value: GetSearchAllLibrariesEnableCreditsMarkerGeneration =
- GetSearchAllLibrariesEnableCreditsMarkerGeneration.LibraryDefault;
-```
-
-## Values
-
-This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type.
-
-| Name | Value |
-| ---------------------- | ---------------------- |
-| `LibraryDefault` | -1 |
-| `Disabled` | 0 |
-| - | `Unrecognized` |
\ No newline at end of file
diff --git a/docs/sdk/models/operations/getsearchalllibrariesepisodesort.md b/docs/sdk/models/operations/getsearchalllibrariesepisodesort.md
deleted file mode 100644
index 36fce199..00000000
--- a/docs/sdk/models/operations/getsearchalllibrariesepisodesort.md
+++ /dev/null
@@ -1,23 +0,0 @@
-# GetSearchAllLibrariesEpisodeSort
-
-Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
-
-## Example Usage
-
-```typescript
-import { GetSearchAllLibrariesEpisodeSort } from "@lukehagar/plexjs/sdk/models/operations";
-
-let value: GetSearchAllLibrariesEpisodeSort =
- GetSearchAllLibrariesEpisodeSort.OldestFirst;
-```
-
-## Values
-
-This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type.
-
-| Name | Value |
-| ---------------------- | ---------------------- |
-| `LibraryDefault` | -1 |
-| `OldestFirst` | 0 |
-| `NewestFirst` | 1 |
-| - | `Unrecognized` |
\ No newline at end of file
diff --git a/docs/sdk/models/operations/getsearchalllibrariesflattenseasons.md b/docs/sdk/models/operations/getsearchalllibrariesflattenseasons.md
index 46df29f8..b43f702f 100644
--- a/docs/sdk/models/operations/getsearchalllibrariesflattenseasons.md
+++ b/docs/sdk/models/operations/getsearchalllibrariesflattenseasons.md
@@ -2,6 +2,7 @@
Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
+
## Example Usage
```typescript
diff --git a/docs/sdk/models/operations/getsearchalllibrariesgenre.md b/docs/sdk/models/operations/getsearchalllibrariesgenre.md
index 8ad3a0a1..a3a1254c 100644
--- a/docs/sdk/models/operations/getsearchalllibrariesgenre.md
+++ b/docs/sdk/models/operations/getsearchalllibrariesgenre.md
@@ -6,12 +6,14 @@
import { GetSearchAllLibrariesGenre } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetSearchAllLibrariesGenre = {
- tag: "Adventure",
+ id: 259,
+ tag: "Crime",
};
```
## Fields
-| Field | Type | Required | Description | Example |
-| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
-| `tag` | *string* | :heavy_minus_sign: | N/A | Adventure |
\ No newline at end of file
+| 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
new file mode 100644
index 00000000..77d206ba
--- /dev/null
+++ b/docs/sdk/models/operations/getsearchalllibrariesguids.md
@@ -0,0 +1,18 @@
+# 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
index 27ce9179..6d2d43c4 100644
--- a/docs/sdk/models/operations/getsearchalllibrarieshasthumbnail.md
+++ b/docs/sdk/models/operations/getsearchalllibrarieshasthumbnail.md
@@ -1,5 +1,8 @@
# GetSearchAllLibrariesHasThumbnail
+Indicates if the part has a thumbnail.
+
+
## Example Usage
```typescript
diff --git a/docs/sdk/models/operations/getsearchalllibrarieslibraryoptimizedforstreaming.md b/docs/sdk/models/operations/getsearchalllibrarieslibraryoptimizedforstreaming.md
new file mode 100644
index 00000000..46d33d06
--- /dev/null
+++ b/docs/sdk/models/operations/getsearchalllibrarieslibraryoptimizedforstreaming.md
@@ -0,0 +1,21 @@
+# 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/getsearchalllibrarieslocation.md b/docs/sdk/models/operations/getsearchalllibrarieslocation.md
index 00f0e48f..2cc98a1a 100644
--- a/docs/sdk/models/operations/getsearchalllibrarieslocation.md
+++ b/docs/sdk/models/operations/getsearchalllibrarieslocation.md
@@ -1,17 +1,19 @@
# 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/House",
+ path: "/TV Shows/Clarkson's Farm",
};
```
## Fields
-| Field | Type | Required | Description | Example |
-| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
-| `path` | *string* | :heavy_minus_sign: | N/A | /TV Shows/House |
\ No newline at end of file
+| 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
index ea2a8454..54dbb3ca 100644
--- a/docs/sdk/models/operations/getsearchalllibrariesmedia.md
+++ b/docs/sdk/models/operations/getsearchalllibrariesmedia.md
@@ -3,49 +3,67 @@
## Example Usage
```typescript
-import { GetSearchAllLibrariesMedia, GetSearchAllLibrariesOptimizedForStreaming } from "@lukehagar/plexjs/sdk/models/operations";
+import { GetSearchAllLibrariesHasThumbnail, GetSearchAllLibrariesMedia } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetSearchAllLibrariesMedia = {
- id: 119534,
- duration: 11558112,
- bitrate: 25025,
+ id: 387322,
+ duration: 9610350,
+ bitrate: 25512,
width: 3840,
- height: 2072,
- aspectRatio: 1.85,
- audioProfile: "dts",
+ height: 1602,
+ aspectRatio: 2.35,
audioChannels: 6,
- audioCodec: "eac3",
+ displayOffset: 50,
+ audioCodec: "aac",
videoCodec: "hevc",
videoResolution: "4k",
- container: "mkv",
+ container: "mp4",
videoFrameRate: "24p",
videoProfile: "main 10",
hasVoiceActivity: false,
- optimizedForStreaming: GetSearchAllLibrariesOptimizedForStreaming.Enable,
+ audioProfile: "dts",
has64bitOffsets: false,
- part: [],
+ 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: | N/A | 119534 |
-| `duration` | *number* | :heavy_minus_sign: | N/A | 11558112 |
-| `bitrate` | *number* | :heavy_minus_sign: | N/A | 25025 |
-| `width` | *number* | :heavy_minus_sign: | N/A | 3840 |
-| `height` | *number* | :heavy_minus_sign: | N/A | 2072 |
-| `aspectRatio` | *number* | :heavy_minus_sign: | N/A | 1.85 |
-| `audioProfile` | *string* | :heavy_minus_sign: | N/A | dts |
-| `audioChannels` | *number* | :heavy_minus_sign: | N/A | 6 |
-| `audioCodec` | *string* | :heavy_minus_sign: | N/A | eac3 |
-| `videoCodec` | *string* | :heavy_minus_sign: | N/A | hevc |
-| `videoResolution` | *string* | :heavy_minus_sign: | N/A | 4k |
-| `container` | *string* | :heavy_check_mark: | N/A | mkv |
-| `videoFrameRate` | *string* | :heavy_minus_sign: | N/A | 24p |
-| `videoProfile` | *string* | :heavy_minus_sign: | N/A | main 10 |
-| `hasVoiceActivity` | *boolean* | :heavy_minus_sign: | N/A | false |
-| `optimizedForStreaming` | [operations.GetSearchAllLibrariesOptimizedForStreaming](../../../sdk/models/operations/getsearchalllibrariesoptimizedforstreaming.md) | :heavy_minus_sign: | N/A | 1 |
-| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | false |
-| `part` | [operations.GetSearchAllLibrariesPart](../../../sdk/models/operations/getsearchalllibrariespart.md)[] | :heavy_check_mark: | N/A | |
\ No newline at end of file
+| 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
index aabe3412..375e1e5a 100644
--- a/docs/sdk/models/operations/getsearchalllibrariesmediacontainer.md
+++ b/docs/sdk/models/operations/getsearchalllibrariesmediacontainer.md
@@ -6,14 +6,28 @@
import { GetSearchAllLibrariesMediaContainer } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetSearchAllLibrariesMediaContainer = {
- size: 1598.12,
+ 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 |
-| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
-| `size` | *number* | :heavy_check_mark: | N/A |
-| `searchResult` | [operations.SearchResult](../../../sdk/models/operations/searchresult.md)[] | :heavy_check_mark: | N/A |
\ No newline at end of file
+| 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/getsearchalllibrariesmediaguid.md b/docs/sdk/models/operations/getsearchalllibrariesmediaguid.md
deleted file mode 100644
index 1c9cb393..00000000
--- a/docs/sdk/models/operations/getsearchalllibrariesmediaguid.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# GetSearchAllLibrariesMediaGuid
-
-## Example Usage
-
-```typescript
-import { GetSearchAllLibrariesMediaGuid } from "@lukehagar/plexjs/sdk/models/operations";
-
-let value: GetSearchAllLibrariesMediaGuid = {
- id: "imdb://tt13015952",
-};
-```
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
-| `id` | *string* | :heavy_check_mark: | Can be one of the following formats:
imdb://tt13015952, tmdb://2434012, tvdb://7945991
| imdb://tt13015952 |
\ No newline at end of file
diff --git a/docs/sdk/models/operations/getsearchalllibrariesmetadata.md b/docs/sdk/models/operations/getsearchalllibrariesmetadata.md
index 1c61b594..904494e0 100644
--- a/docs/sdk/models/operations/getsearchalllibrariesmetadata.md
+++ b/docs/sdk/models/operations/getsearchalllibrariesmetadata.md
@@ -1,16 +1,16 @@
# GetSearchAllLibrariesMetadata
+Unknown
+
+
## Example Usage
```typescript
import {
- GetSearchAllLibrariesEnableCreditsMarkerGeneration,
- GetSearchAllLibrariesEpisodeSort,
GetSearchAllLibrariesFlattenSeasons,
GetSearchAllLibrariesHasThumbnail,
GetSearchAllLibrariesLibraryType,
GetSearchAllLibrariesMetadata,
- GetSearchAllLibrariesOptimizedForStreaming,
GetSearchAllLibrariesShowOrdering,
GetSearchAllLibrariesType,
} from "@lukehagar/plexjs/sdk/models/operations";
@@ -20,171 +20,68 @@ let value: GetSearchAllLibrariesMetadata = {
ratingKey: "58683",
key: "/library/metadata/58683",
guid: "plex://movie/5d7768ba96b655001fdc0408",
+ slug: "4-for-texas",
studio: "20th Century Studios",
- skipChildren: false,
- librarySectionID: 1,
- librarySectionTitle: "Movies",
- librarySectionKey: "/library/sections/1",
type: GetSearchAllLibrariesType.Movie,
title: "Avatar: The Way of Water",
- slug: "4-for-texas",
+ 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. 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.",
+ "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,
- seasonCount: 2022,
tagline: "Return to Pandora.",
- flattenSeasons: GetSearchAllLibrariesFlattenSeasons.Show,
- episodeSort: GetSearchAllLibrariesEpisodeSort.OldestFirst,
- enableCreditsMarkerGeneration:
- GetSearchAllLibrariesEnableCreditsMarkerGeneration.LibraryDefault,
- showOrdering: GetSearchAllLibrariesShowOrdering.TvdbAbsolute,
thumb: "/library/metadata/58683/thumb/1703239236",
art: "/library/metadata/58683/art/1703239236",
- banner: "/library/metadata/58683/banner/1703239236",
+ theme: "/library/metadata/1/theme/1705636920",
+ index: 1,
+ leafCount: 14,
+ viewedLeafCount: 0,
+ childCount: 1,
+ seasonCount: 2022,
duration: 11558112,
- originallyAvailableAt: new RFCDate("2022-12-14T00:00:00Z"),
+ originallyAvailableAt: new RFCDate("2022-12-14"),
addedAt: 1556281940,
updatedAt: 1556281940,
+ parentYear: 2010,
audienceRatingImage: "rottentomatoes://image.rating.upright",
chapterSource: "media",
primaryExtraKey: "/library/metadata/58684",
- ratingImage: "rottentomatoes://image.rating.ripe",
+ 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",
- parentSlug: "alice-in-borderland-2020",
- grandparentSlug: "alice-in-borderland-2020",
- grandparentArt: "/library/metadata/66/art/1705716261",
grandparentTheme: "/library/metadata/66/theme/1705716261",
- media: [
+ 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: [
{
- id: 119534,
- duration: 11558112,
- bitrate: 25025,
- width: 3840,
- height: 2072,
- aspectRatio: 1.85,
- audioProfile: "dts",
- audioChannels: 6,
- audioCodec: "eac3",
- videoCodec: "hevc",
- videoResolution: "4k",
- container: "mkv",
- videoFrameRate: "24p",
- videoProfile: "main 10",
- hasVoiceActivity: false,
- optimizedForStreaming: GetSearchAllLibrariesOptimizedForStreaming.Enable,
- has64bitOffsets: false,
- part: [
- {
- id: 119542,
- key: "/library/parts/119542/1680457526/file.mkv",
- duration: 11558112,
- file:
- "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv",
- size: 36158371307,
- container: "mkv",
- audioProfile: "dts",
- has64bitOffsets: false,
- optimizedForStreaming: false,
- videoProfile: "main 10",
- indexes: "sd",
- hasThumbnail: GetSearchAllLibrariesHasThumbnail.True,
- stream: [
- {
- id: 272796,
- streamType: 1,
- default: true,
- selected: true,
- codec: "h264",
- index: 0,
- bitrate: 6273,
- colorPrimaries: "bt709",
- colorRange: "tv",
- colorSpace: "bt709",
- colorTrc: "bt709",
- bitDepth: 8,
- chromaLocation: "left",
- streamIdentifier: "2",
- chromaSubsampling: "4:2:0",
- codedHeight: 1088,
- codedWidth: 1920,
- frameRate: 29.97,
- hasScalingMatrix: false,
- hearingImpaired: false,
- closedCaptions: false,
- embeddedInVideo: "1",
- height: 1080,
- level: 40,
- profile: "main",
- refFrames: 4,
- scanType: "progressive",
- width: 1920,
- displayTitle: "1080p (H.264)",
- extendedDisplayTitle: "1080p (H.264)",
- channels: 2,
- language: "English",
- languageTag: "en",
- languageCode: "eng",
- audioChannelLayout: "stereo",
- samplingRate: 48000,
- title: "English",
- canAutoSync: false,
- },
- ],
- },
- ],
- },
- ],
- genre: [
- {
- tag: "Adventure",
- },
- ],
- country: [
- {
- tag: "United States of America",
- },
- ],
- director: [
- {
- tag: "James Cameron",
- },
- ],
- writer: [
- {
- tag: "James Cameron",
- },
- ],
- collection: [
- {
- tag: "Working NL Subs",
- },
- ],
- role: [
- {
- id: 294129,
- filter: "actor=294129",
- thumb:
- "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg",
- tag: "Mike Smith",
- tagKey: "668e7e7b22bcad9064350c91",
- role: "Self",
- },
- ],
- location: [
- {
- path: "/TV Shows/House",
- },
- ],
- mediaGuid: [
- {
- id: "imdb://tt13015952",
+ alt: "Episode 1",
+ type: GetSearchAllLibrariesLibraryType.Background,
+ url: "/library/metadata/45521/thumb/1644710589",
},
],
ultraBlurColors: {
@@ -193,122 +90,175 @@ let value: GetSearchAllLibrariesMetadata = {
bottomRight: "73958",
bottomLeft: "1f5066",
},
- metaDataRating: [
+ guids: [
{
- image: "themoviedb://image.rating",
- value: 3,
- type: "audience",
+ id:
+ "{\"imdbExample\":{\"summary\":\"IMDB example\",\"value\":\"imdb://tt13015952\"},\"tmdbExample\":{\"summary\":\"TMDB example\",\"value\":\"tmdb://2434012\"},\"tvdbExample\":{\"summary\":\"TVDB example\",\"value\":\"tvdb://7945991\"}}",
},
],
- image: [
+ librarySectionID: 1,
+ librarySectionTitle: "Movies",
+ librarySectionKey: "/library/sections/1",
+ showOrdering: GetSearchAllLibrariesShowOrdering.TvdbAbsolute,
+ flattenSeasons: GetSearchAllLibrariesFlattenSeasons.Show,
+ skipChildren: false,
+ media: [
{
- alt: "Episode 1",
- type: GetSearchAllLibrariesLibraryType.Background,
- url: "/library/metadata/45521/thumb/1644710589",
+ 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",
},
],
- titleSort: "Whale",
- viewCount: 1,
- lastViewedAt: 1682752242,
- originalTitle: "映画 ブラッククローバー 魔法帝の剣",
- viewOffset: 5222500,
- skipCount: 1,
- index: 1,
- theme: "/library/metadata/1/theme/1705636920",
- leafCount: 14,
- viewedLeafCount: 0,
- childCount: 1,
- hasPremiumExtras: "1",
- hasPremiumPrimaryExtra: "1",
- parentRatingKey: "66",
- parentGuid: "plex://show/5d9c081b170e24001f2a7be4",
- parentStudio: "UCP",
- parentKey: "/library/metadata/66",
- parentTitle: "Caprica",
- parentIndex: 1,
- parentYear: 2010,
- parentThumb: "/library/metadata/66/thumb/1705716261",
- parentTheme: "/library/metadata/66/theme/1705716261",
};
```
## Fields
-| Field | Type | Required | Description | Example |
-| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `ratingKey` | *string* | :heavy_check_mark: | The rating key (Media ID) of this media item.
Note: This is always an integer, but is represented as a string in the API.
| 58683 |
-| `key` | *string* | :heavy_check_mark: | N/A | /library/metadata/58683 |
-| `guid` | *string* | :heavy_check_mark: | N/A | plex://movie/5d7768ba96b655001fdc0408 |
-| `studio` | *string* | :heavy_minus_sign: | N/A | 20th Century Studios |
-| `skipChildren` | *boolean* | :heavy_minus_sign: | N/A | false |
-| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 |
-| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies |
-| `librarySectionKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/1 |
-| `type` | [operations.GetSearchAllLibrariesType](../../../sdk/models/operations/getsearchalllibrariestype.md) | :heavy_check_mark: | The type of media content in the Plex library. This can represent videos, music, or photos.
| movie |
-| `title` | *string* | :heavy_check_mark: | N/A | Avatar: The Way of Water |
-| `slug` | *string* | :heavy_minus_sign: | N/A | 4-for-texas |
-| `contentRating` | *string* | :heavy_minus_sign: | N/A | PG-13 |
-| `summary` | *string* | :heavy_check_mark: | N/A | 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_minus_sign: | N/A | 7.6 |
-| `audienceRating` | *number* | :heavy_minus_sign: | N/A | 9.2 |
-| `year` | *number* | :heavy_minus_sign: | N/A | 2022 |
-| `seasonCount` | *number* | :heavy_minus_sign: | N/A | 2022 |
-| `tagline` | *string* | :heavy_minus_sign: | N/A | Return to Pandora. |
-| `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 |
-| `episodeSort` | [operations.GetSearchAllLibrariesEpisodeSort](../../../sdk/models/operations/getsearchalllibrariesepisodesort.md) | :heavy_minus_sign: | Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). | 0 |
-| `enableCreditsMarkerGeneration` | [operations.GetSearchAllLibrariesEnableCreditsMarkerGeneration](../../../sdk/models/operations/getsearchalllibrariesenablecreditsmarkergeneration.md) | :heavy_minus_sign: | Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). | -1 |
-| `showOrdering` | [operations.GetSearchAllLibrariesShowOrdering](../../../sdk/models/operations/getsearchalllibrariesshowordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show.
None = Library default,
tmdbAiring = The Movie Database (Aired),
aired = TheTVDB (Aired),
dvd = TheTVDB (DVD),
absolute = TheTVDB (Absolute)).
| absolute |
-| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 |
-| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 |
-| `banner` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/banner/1703239236 |
-| `duration` | *number* | :heavy_minus_sign: | N/A | 11558112 |
-| `originallyAvailableAt` | [RFCDate](../../../types/rfcdate.md) | :heavy_minus_sign: | N/A | 2022-12-14 00:00:00 +0000 UTC |
-| `addedAt` | *number* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
-| `updatedAt` | *number* | :heavy_minus_sign: | Unix epoch datetime in seconds | 1556281940 |
-| `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/58684 |
-| `ratingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe |
-| `grandparentRatingKey` | *string* | :heavy_minus_sign: | N/A | 66 |
-| `grandparentGuid` | *string* | :heavy_minus_sign: | N/A | plex://show/5d9c081b170e24001f2a7be4 |
-| `grandparentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66 |
-| `grandparentTitle` | *string* | :heavy_minus_sign: | N/A | Caprica |
-| `grandparentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 |
-| `parentSlug` | *string* | :heavy_minus_sign: | N/A | alice-in-borderland-2020 |
-| `grandparentSlug` | *string* | :heavy_minus_sign: | N/A | alice-in-borderland-2020 |
-| `grandparentArt` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/art/1705716261 |
-| `grandparentTheme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 |
-| `media` | [operations.GetSearchAllLibrariesMedia](../../../sdk/models/operations/getsearchalllibrariesmedia.md)[] | :heavy_minus_sign: | The Media object is only included when type query is `4` or higher.
| |
-| `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 | |
-| `collection` | [operations.GetSearchAllLibrariesCollection](../../../sdk/models/operations/getsearchalllibrariescollection.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 | |
-| `mediaGuid` | [operations.GetSearchAllLibrariesMediaGuid](../../../sdk/models/operations/getsearchalllibrariesmediaguid.md)[] | :heavy_minus_sign: | The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.
| |
-| `ultraBlurColors` | [operations.GetSearchAllLibrariesUltraBlurColors](../../../sdk/models/operations/getsearchalllibrariesultrablurcolors.md) | :heavy_minus_sign: | N/A | |
-| `metaDataRating` | [operations.GetSearchAllLibrariesMetaDataRating](../../../sdk/models/operations/getsearchalllibrariesmetadatarating.md)[] | :heavy_minus_sign: | N/A | |
-| `image` | [operations.GetSearchAllLibrariesImage](../../../sdk/models/operations/getsearchalllibrariesimage.md)[] | :heavy_minus_sign: | N/A | |
-| `titleSort` | *string* | :heavy_minus_sign: | N/A | Whale |
-| `viewCount` | *number* | :heavy_minus_sign: | N/A | 1 |
-| `lastViewedAt` | *number* | :heavy_minus_sign: | N/A | 1682752242 |
-| `originalTitle` | *string* | :heavy_minus_sign: | N/A | 映画 ブラッククローバー 魔法帝の剣 |
-| `viewOffset` | *number* | :heavy_minus_sign: | N/A | 5222500 |
-| `skipCount` | *number* | :heavy_minus_sign: | N/A | 1 |
-| `index` | *number* | :heavy_minus_sign: | N/A | 1 |
-| `theme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/1/theme/1705636920 |
-| `leafCount` | *number* | :heavy_minus_sign: | N/A | 14 |
-| `viewedLeafCount` | *number* | :heavy_minus_sign: | N/A | 0 |
-| `childCount` | *number* | :heavy_minus_sign: | N/A | 1 |
-| `hasPremiumExtras` | *string* | :heavy_minus_sign: | N/A | 1 |
-| `hasPremiumPrimaryExtra` | *string* | :heavy_minus_sign: | N/A | 1 |
-| `parentRatingKey` | *string* | :heavy_minus_sign: | The rating key of the parent item.
| 66 |
-| `parentGuid` | *string* | :heavy_minus_sign: | N/A | plex://show/5d9c081b170e24001f2a7be4 |
-| `parentStudio` | *string* | :heavy_minus_sign: | N/A | UCP |
-| `parentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66 |
-| `parentTitle` | *string* | :heavy_minus_sign: | N/A | Caprica |
-| `parentIndex` | *number* | :heavy_minus_sign: | N/A | 1 |
-| `parentYear` | *number* | :heavy_minus_sign: | N/A | 2010 |
-| `parentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 |
-| `parentTheme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 |
\ No newline at end of file
+| 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/getsearchalllibrariesmetadatarating.md b/docs/sdk/models/operations/getsearchalllibrariesmetadatarating.md
deleted file mode 100644
index da1b7172..00000000
--- a/docs/sdk/models/operations/getsearchalllibrariesmetadatarating.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# GetSearchAllLibrariesMetaDataRating
-
-## Example Usage
-
-```typescript
-import { GetSearchAllLibrariesMetaDataRating } from "@lukehagar/plexjs/sdk/models/operations";
-
-let value: GetSearchAllLibrariesMetaDataRating = {
- image: "themoviedb://image.rating",
- value: 3,
- type: "audience",
-};
-```
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- |
-| `image` | *string* | :heavy_check_mark: | A URI or path to the rating image. | themoviedb://image.rating |
-| `value` | *number* | :heavy_check_mark: | The value of the rating. | 3 |
-| `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/getsearchalllibrariesoptimizedforstreaming.md b/docs/sdk/models/operations/getsearchalllibrariesoptimizedforstreaming.md
index e1c88c21..ff3ac76a 100644
--- a/docs/sdk/models/operations/getsearchalllibrariesoptimizedforstreaming.md
+++ b/docs/sdk/models/operations/getsearchalllibrariesoptimizedforstreaming.md
@@ -1,17 +1,20 @@
# GetSearchAllLibrariesOptimizedForStreaming
-## Example Usage
+Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
+
+
+## Supported Types
+
+### `operations.GetSearchAllLibrariesOptimizedForStreaming1`
```typescript
-import { GetSearchAllLibrariesOptimizedForStreaming } from "@lukehagar/plexjs/sdk/models/operations";
-
-let value: GetSearchAllLibrariesOptimizedForStreaming =
- GetSearchAllLibrariesOptimizedForStreaming.Enable;
+const value: operations.GetSearchAllLibrariesOptimizedForStreaming1 =
+ GetSearchAllLibrariesOptimizedForStreaming1.One;
```
-## Values
+### `boolean`
+
+```typescript
+const value: boolean = true;
+```
-| Name | Value |
-| --------- | --------- |
-| `Disable` | 0 |
-| `Enable` | 1 |
\ No newline at end of file
diff --git a/docs/sdk/models/operations/getsearchalllibrariesoptimizedforstreaming1.md b/docs/sdk/models/operations/getsearchalllibrariesoptimizedforstreaming1.md
new file mode 100644
index 00000000..0b86a3e8
--- /dev/null
+++ b/docs/sdk/models/operations/getsearchalllibrariesoptimizedforstreaming1.md
@@ -0,0 +1,17 @@
+# 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
new file mode 100644
index 00000000..e145beaa
--- /dev/null
+++ b/docs/sdk/models/operations/getsearchalllibrariesoptimizedforstreaminglibrary1.md
@@ -0,0 +1,17 @@
+# 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
index a64f83bd..03ab656a 100644
--- a/docs/sdk/models/operations/getsearchalllibrariespart.md
+++ b/docs/sdk/models/operations/getsearchalllibrariespart.md
@@ -6,78 +6,39 @@
import { GetSearchAllLibrariesHasThumbnail, GetSearchAllLibrariesPart } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetSearchAllLibrariesPart = {
- id: 119542,
- key: "/library/parts/119542/1680457526/file.mkv",
- duration: 11558112,
- file:
- "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv",
- size: 36158371307,
+ 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,
- optimizedForStreaming: false,
- videoProfile: "main 10",
- indexes: "sd",
hasThumbnail: GetSearchAllLibrariesHasThumbnail.True,
- stream: [
- {
- id: 272796,
- streamType: 1,
- default: true,
- selected: true,
- codec: "h264",
- index: 0,
- bitrate: 6273,
- colorPrimaries: "bt709",
- colorRange: "tv",
- colorSpace: "bt709",
- colorTrc: "bt709",
- bitDepth: 8,
- chromaLocation: "left",
- streamIdentifier: "2",
- chromaSubsampling: "4:2:0",
- codedHeight: 1088,
- codedWidth: 1920,
- frameRate: 29.97,
- hasScalingMatrix: false,
- hearingImpaired: false,
- closedCaptions: false,
- embeddedInVideo: "1",
- height: 1080,
- level: 40,
- profile: "main",
- refFrames: 4,
- scanType: "progressive",
- width: 1920,
- displayTitle: "1080p (H.264)",
- extendedDisplayTitle: "1080p (H.264)",
- channels: 2,
- language: "English",
- languageTag: "en",
- languageCode: "eng",
- audioChannelLayout: "stereo",
- samplingRate: 48000,
- title: "English",
- canAutoSync: false,
- },
- ],
};
```
## Fields
-| Field | Type | Required | Description | Example |
-| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
-| `id` | *number* | :heavy_check_mark: | N/A | 119542 |
-| `key` | *string* | :heavy_check_mark: | N/A | /library/parts/119542/1680457526/file.mkv |
-| `duration` | *number* | :heavy_minus_sign: | N/A | 11558112 |
-| `file` | *string* | :heavy_check_mark: | N/A | /movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv |
-| `size` | *number* | :heavy_check_mark: | N/A | 36158371307 |
-| `container` | *string* | :heavy_check_mark: | The container format of the media file.
| mkv |
-| `audioProfile` | *string* | :heavy_minus_sign: | N/A | dts |
-| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | false |
-| `optimizedForStreaming` | *boolean* | :heavy_minus_sign: | N/A | false |
-| `videoProfile` | *string* | :heavy_minus_sign: | N/A | main 10 |
-| `indexes` | *string* | :heavy_minus_sign: | N/A | sd |
-| `hasThumbnail` | [operations.GetSearchAllLibrariesHasThumbnail](../../../sdk/models/operations/getsearchalllibrarieshasthumbnail.md) | :heavy_minus_sign: | N/A | 1 |
-| `stream` | [operations.GetSearchAllLibrariesStream](../../../sdk/models/operations/getsearchalllibrariesstream.md)[] | :heavy_minus_sign: | N/A | |
\ No newline at end of file
+| 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/getsearchalllibrariesresponsebody.md b/docs/sdk/models/operations/getsearchalllibrariesresponsebody.md
index 21652de9..fe171e98 100644
--- a/docs/sdk/models/operations/getsearchalllibrariesresponsebody.md
+++ b/docs/sdk/models/operations/getsearchalllibrariesresponsebody.md
@@ -5,12 +5,213 @@ The libraries available on the Server
## Example Usage
```typescript
-import { GetSearchAllLibrariesResponseBody } from "@lukehagar/plexjs/sdk/models/operations";
+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: 8897.34,
- searchResult: [],
+ 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",
+ },
+ ],
+ },
+ },
+ ],
},
};
```
diff --git a/docs/sdk/models/operations/getsearchalllibrariesrole.md b/docs/sdk/models/operations/getsearchalllibrariesrole.md
index 80492895..6691149f 100644
--- a/docs/sdk/models/operations/getsearchalllibrariesrole.md
+++ b/docs/sdk/models/operations/getsearchalllibrariesrole.md
@@ -6,23 +6,19 @@
import { GetSearchAllLibrariesRole } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetSearchAllLibrariesRole = {
- id: 294129,
- filter: "actor=294129",
+ id: 126522,
+ tag: "Teller",
+ role: "Self - Judge",
thumb:
- "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg",
- tag: "Mike Smith",
- tagKey: "668e7e7b22bcad9064350c91",
- role: "Self",
+ "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg",
};
```
## Fields
-| Field | Type | Required | Description | Example |
-| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
-| `id` | *number* | :heavy_minus_sign: | The ID of the tag or actor. | 294129 |
-| `filter` | *string* | :heavy_minus_sign: | The filter used to find the actor or tag. | actor=294129 |
-| `thumb` | *string* | :heavy_minus_sign: | The thumbnail of the actor | https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg |
-| `tag` | *string* | :heavy_minus_sign: | The name of the tag or actor. | Mike Smith |
-| `tagKey` | *string* | :heavy_minus_sign: | Unique identifier for the tag. | 668e7e7b22bcad9064350c91 |
-| `role` | *string* | :heavy_minus_sign: | The role of the actor or tag in the media. | Self |
\ No newline at end of file
+| 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
index 236e7753..39b1d624 100644
--- a/docs/sdk/models/operations/getsearchalllibrariesshowordering.md
+++ b/docs/sdk/models/operations/getsearchalllibrariesshowordering.md
@@ -1,11 +1,12 @@
# GetSearchAllLibrariesShowOrdering
Setting that indicates the episode ordering for the show.
-None = Library default,
-tmdbAiring = The Movie Database (Aired),
-aired = TheTVDB (Aired),
-dvd = TheTVDB (DVD),
-absolute = TheTVDB (Absolute)).
+Options:
+ - None = Library default
+ - tmdbAiring = The Movie Database (Aired)
+ - aired = TheTVDB (Aired)
+ - dvd = TheTVDB (DVD)
+ - absolute = TheTVDB (Absolute)
## Example Usage
diff --git a/docs/sdk/models/operations/getsearchalllibrariesstream.md b/docs/sdk/models/operations/getsearchalllibrariesstream.md
deleted file mode 100644
index 3a00f969..00000000
--- a/docs/sdk/models/operations/getsearchalllibrariesstream.md
+++ /dev/null
@@ -1,91 +0,0 @@
-# GetSearchAllLibrariesStream
-
-## Example Usage
-
-```typescript
-import { GetSearchAllLibrariesStream } from "@lukehagar/plexjs/sdk/models/operations";
-
-let value: GetSearchAllLibrariesStream = {
- id: 272796,
- streamType: 1,
- default: true,
- selected: true,
- codec: "h264",
- index: 0,
- bitrate: 6273,
- colorPrimaries: "bt709",
- colorRange: "tv",
- colorSpace: "bt709",
- colorTrc: "bt709",
- bitDepth: 8,
- chromaLocation: "left",
- streamIdentifier: "2",
- chromaSubsampling: "4:2:0",
- codedHeight: 1088,
- codedWidth: 1920,
- frameRate: 29.97,
- hasScalingMatrix: false,
- hearingImpaired: false,
- closedCaptions: false,
- embeddedInVideo: "1",
- height: 1080,
- level: 40,
- profile: "main",
- refFrames: 4,
- scanType: "progressive",
- width: 1920,
- displayTitle: "1080p (H.264)",
- extendedDisplayTitle: "1080p (H.264)",
- channels: 2,
- language: "English",
- languageTag: "en",
- languageCode: "eng",
- audioChannelLayout: "stereo",
- samplingRate: 48000,
- title: "English",
- canAutoSync: false,
-};
-```
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- |
-| `id` | *number* | :heavy_check_mark: | N/A | 272796 |
-| `streamType` | *number* | :heavy_check_mark: | Type of stream (1 = video, 2 = audio, 3 = subtitle) | 1 |
-| `default` | *boolean* | :heavy_minus_sign: | Indicates if this is the default stream | true |
-| `selected` | *boolean* | :heavy_minus_sign: | Indicates if the stream is selected | true |
-| `codec` | *string* | :heavy_check_mark: | Codec used by the stream | h264 |
-| `index` | *number* | :heavy_check_mark: | The index of the stream | 0 |
-| `bitrate` | *number* | :heavy_minus_sign: | The bitrate of the stream in kbps | 6273 |
-| `colorPrimaries` | *string* | :heavy_minus_sign: | The color primaries of the video stream | bt709 |
-| `colorRange` | *string* | :heavy_minus_sign: | The color range of the video stream | tv |
-| `colorSpace` | *string* | :heavy_minus_sign: | The color space of the video stream | bt709 |
-| `colorTrc` | *string* | :heavy_minus_sign: | The transfer characteristics (TRC) of the video stream | bt709 |
-| `bitDepth` | *number* | :heavy_minus_sign: | The bit depth of the video stream | 8 |
-| `chromaLocation` | *string* | :heavy_minus_sign: | The chroma location of the video stream | left |
-| `streamIdentifier` | *string* | :heavy_minus_sign: | The identifier of the video stream | 2 |
-| `chromaSubsampling` | *string* | :heavy_minus_sign: | The chroma subsampling format | 4:2:0 |
-| `codedHeight` | *number* | :heavy_minus_sign: | The coded height of the video stream | 1088 |
-| `codedWidth` | *number* | :heavy_minus_sign: | The coded width of the video stream | 1920 |
-| `frameRate` | *number* | :heavy_minus_sign: | The frame rate of the video stream | 29.97 |
-| `hasScalingMatrix` | *boolean* | :heavy_minus_sign: | Indicates if the stream has a scaling matrix | false |
-| `hearingImpaired` | *boolean* | :heavy_minus_sign: | N/A | false |
-| `closedCaptions` | *boolean* | :heavy_minus_sign: | N/A | false |
-| `embeddedInVideo` | *string* | :heavy_minus_sign: | N/A | 1 |
-| `height` | *number* | :heavy_minus_sign: | The height of the video stream | 1080 |
-| `level` | *number* | :heavy_minus_sign: | The level of the video codec | 40 |
-| `profile` | *string* | :heavy_minus_sign: | The profile of the video codec | main |
-| `refFrames` | *number* | :heavy_minus_sign: | Number of reference frames | 4 |
-| `scanType` | *string* | :heavy_minus_sign: | The scan type (progressive or interlaced) | progressive |
-| `width` | *number* | :heavy_minus_sign: | The width of the video stream | 1920 |
-| `displayTitle` | *string* | :heavy_minus_sign: | Display title of the stream | 1080p (H.264) |
-| `extendedDisplayTitle` | *string* | :heavy_minus_sign: | Extended display title of the stream | 1080p (H.264) |
-| `channels` | *number* | :heavy_minus_sign: | Number of audio channels (for audio streams) | 2 |
-| `language` | *string* | :heavy_minus_sign: | The language of the stream (for audio/subtitle streams) | English |
-| `languageTag` | *string* | :heavy_minus_sign: | Language tag of the stream | en |
-| `languageCode` | *string* | :heavy_minus_sign: | Language code of the stream | eng |
-| `audioChannelLayout` | *string* | :heavy_minus_sign: | The audio channel layout | stereo |
-| `samplingRate` | *number* | :heavy_minus_sign: | Sampling rate of the audio stream in Hz | 48000 |
-| `title` | *string* | :heavy_minus_sign: | Title of the subtitle track (for subtitle streams) | English |
-| `canAutoSync` | *boolean* | :heavy_minus_sign: | Indicates if the subtitle stream can auto-sync | false |
\ No newline at end of file
diff --git a/docs/sdk/models/operations/getsearchalllibrarieswriter.md b/docs/sdk/models/operations/getsearchalllibrarieswriter.md
index c780fdc0..d02d1136 100644
--- a/docs/sdk/models/operations/getsearchalllibrarieswriter.md
+++ b/docs/sdk/models/operations/getsearchalllibrarieswriter.md
@@ -6,12 +6,17 @@
import { GetSearchAllLibrariesWriter } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetSearchAllLibrariesWriter = {
- tag: "James Cameron",
+ id: 126522,
+ tag: "Jamie P. Hanson",
+ thumb:
+ "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg",
};
```
## Fields
-| Field | Type | Required | Description | Example |
-| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
-| `tag` | *string* | :heavy_minus_sign: | N/A | James Cameron |
\ No newline at end of file
+| 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/media.md b/docs/sdk/models/operations/media.md
index 9c0adac2..e6ec0b04 100644
--- a/docs/sdk/models/operations/media.md
+++ b/docs/sdk/models/operations/media.md
@@ -3,7 +3,7 @@
## Example Usage
```typescript
-import { HasThumbnail, Media, StreamType } from "@lukehagar/plexjs/sdk/models/operations";
+import { HasThumbnail, Media } from "@lukehagar/plexjs/sdk/models/operations";
let value: Media = {
id: 387322,
@@ -42,7 +42,6 @@ let value: Media = {
stream: [
{
id: 1002625,
- streamType: StreamType.Video,
format: "srt",
default: true,
codec: "hevc",
diff --git a/docs/sdk/models/operations/mediaguid.md b/docs/sdk/models/operations/mediaguid.md
deleted file mode 100644
index eb94124d..00000000
--- a/docs/sdk/models/operations/mediaguid.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# MediaGuid
-
-## Example Usage
-
-```typescript
-import { MediaGuid } from "@lukehagar/plexjs/sdk/models/operations";
-
-let value: MediaGuid = {
- id: "imdb://tt13015952",
-};
-```
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
-| `id` | *string* | :heavy_check_mark: | Can be one of the following formats:
imdb://tt13015952, tmdb://2434012, tvdb://7945991
| imdb://tt13015952 |
\ No newline at end of file
diff --git a/docs/sdk/models/operations/part.md b/docs/sdk/models/operations/part.md
index 76aa115a..801ff212 100644
--- a/docs/sdk/models/operations/part.md
+++ b/docs/sdk/models/operations/part.md
@@ -3,7 +3,7 @@
## Example Usage
```typescript
-import { HasThumbnail, Part, StreamType } from "@lukehagar/plexjs/sdk/models/operations";
+import { HasThumbnail, Part } from "@lukehagar/plexjs/sdk/models/operations";
let value: Part = {
accessible: true,
@@ -23,7 +23,6 @@ let value: Part = {
stream: [
{
id: 1002625,
- streamType: StreamType.Video,
format: "srt",
default: true,
codec: "hevc",
diff --git a/docs/sdk/models/operations/searchresult.md b/docs/sdk/models/operations/searchresult.md
index 46e1f477..64b5a007 100644
--- a/docs/sdk/models/operations/searchresult.md
+++ b/docs/sdk/models/operations/searchresult.md
@@ -4,12 +4,9 @@
```typescript
import {
- GetSearchAllLibrariesEnableCreditsMarkerGeneration,
- GetSearchAllLibrariesEpisodeSort,
GetSearchAllLibrariesFlattenSeasons,
GetSearchAllLibrariesHasThumbnail,
GetSearchAllLibrariesLibraryType,
- GetSearchAllLibrariesOptimizedForStreaming,
GetSearchAllLibrariesShowOrdering,
GetSearchAllLibrariesType,
SearchResult,
@@ -17,177 +14,87 @@ import {
import { RFCDate } from "@lukehagar/plexjs/sdk/types";
let value: SearchResult = {
- score: 922.83,
+ 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",
- skipChildren: false,
- librarySectionID: 1,
- librarySectionTitle: "Movies",
- librarySectionKey: "/library/sections/1",
type: GetSearchAllLibrariesType.Movie,
title: "Avatar: The Way of Water",
- slug: "4-for-texas",
+ 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. 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.",
+ "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,
- seasonCount: 2022,
tagline: "Return to Pandora.",
- flattenSeasons: GetSearchAllLibrariesFlattenSeasons.Show,
- episodeSort: GetSearchAllLibrariesEpisodeSort.OldestFirst,
- enableCreditsMarkerGeneration:
- GetSearchAllLibrariesEnableCreditsMarkerGeneration.LibraryDefault,
- showOrdering: GetSearchAllLibrariesShowOrdering.TvdbAbsolute,
thumb: "/library/metadata/58683/thumb/1703239236",
art: "/library/metadata/58683/art/1703239236",
- banner: "/library/metadata/58683/banner/1703239236",
+ theme: "/library/metadata/1/theme/1705636920",
+ index: 1,
+ leafCount: 14,
+ viewedLeafCount: 0,
+ childCount: 1,
+ seasonCount: 2022,
duration: 11558112,
- originallyAvailableAt: new RFCDate("2022-12-14T00:00:00Z"),
+ originallyAvailableAt: new RFCDate("2022-12-14"),
addedAt: 1556281940,
updatedAt: 1556281940,
+ parentYear: 2010,
audienceRatingImage: "rottentomatoes://image.rating.upright",
chapterSource: "media",
primaryExtraKey: "/library/metadata/58684",
- ratingImage: "rottentomatoes://image.rating.ripe",
+ 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",
- parentSlug: "alice-in-borderland-2020",
- grandparentSlug: "alice-in-borderland-2020",
- grandparentArt: "/library/metadata/66/art/1705716261",
grandparentTheme: "/library/metadata/66/theme/1705716261",
- media: [
+ 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: [
{
- id: 119534,
- duration: 11558112,
- bitrate: 25025,
- width: 3840,
- height: 2072,
- aspectRatio: 1.85,
- audioProfile: "dts",
- audioChannels: 6,
- audioCodec: "eac3",
- videoCodec: "hevc",
- videoResolution: "4k",
- container: "mkv",
- videoFrameRate: "24p",
- videoProfile: "main 10",
- hasVoiceActivity: false,
- optimizedForStreaming:
- GetSearchAllLibrariesOptimizedForStreaming.Enable,
- has64bitOffsets: false,
- part: [
- {
- id: 119542,
- key: "/library/parts/119542/1680457526/file.mkv",
- duration: 11558112,
- file:
- "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv",
- size: 36158371307,
- container: "mkv",
- audioProfile: "dts",
- has64bitOffsets: false,
- optimizedForStreaming: false,
- videoProfile: "main 10",
- indexes: "sd",
- hasThumbnail: GetSearchAllLibrariesHasThumbnail.True,
- stream: [
- {
- id: 272796,
- streamType: 1,
- default: true,
- selected: true,
- codec: "h264",
- index: 0,
- bitrate: 6273,
- colorPrimaries: "bt709",
- colorRange: "tv",
- colorSpace: "bt709",
- colorTrc: "bt709",
- bitDepth: 8,
- chromaLocation: "left",
- streamIdentifier: "2",
- chromaSubsampling: "4:2:0",
- codedHeight: 1088,
- codedWidth: 1920,
- frameRate: 29.97,
- hasScalingMatrix: false,
- hearingImpaired: false,
- closedCaptions: false,
- embeddedInVideo: "1",
- height: 1080,
- level: 40,
- profile: "main",
- refFrames: 4,
- scanType: "progressive",
- width: 1920,
- displayTitle: "1080p (H.264)",
- extendedDisplayTitle: "1080p (H.264)",
- channels: 2,
- language: "English",
- languageTag: "en",
- languageCode: "eng",
- audioChannelLayout: "stereo",
- samplingRate: 48000,
- title: "English",
- canAutoSync: false,
- },
- ],
- },
- ],
- },
- ],
- genre: [
- {
- tag: "Adventure",
- },
- ],
- country: [
- {
- tag: "United States of America",
- },
- ],
- director: [
- {
- tag: "James Cameron",
- },
- ],
- writer: [
- {
- tag: "James Cameron",
- },
- ],
- collection: [
- {
- tag: "Working NL Subs",
- },
- ],
- role: [
- {
- id: 294129,
- filter: "actor=294129",
- thumb:
- "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg",
- tag: "Mike Smith",
- tagKey: "668e7e7b22bcad9064350c91",
- role: "Self",
- },
- ],
- location: [
- {
- path: "/TV Shows/House",
- },
- ],
- mediaGuid: [
- {
- id: "imdb://tt13015952",
+ alt: "Episode 1",
+ type: GetSearchAllLibrariesLibraryType.Background,
+ url: "/library/metadata/45521/thumb/1644710589",
},
],
ultraBlurColors: {
@@ -196,49 +103,107 @@ let value: SearchResult = {
bottomRight: "73958",
bottomLeft: "1f5066",
},
- metaDataRating: [
+ guids: [
{
- image: "themoviedb://image.rating",
- value: 3,
- type: "audience",
+ id:
+ "{\"imdbExample\":{\"summary\":\"IMDB example\",\"value\":\"imdb://tt13015952\"},\"tmdbExample\":{\"summary\":\"TMDB example\",\"value\":\"tmdb://2434012\"},\"tvdbExample\":{\"summary\":\"TVDB example\",\"value\":\"tvdb://7945991\"}}",
},
],
- image: [
+ librarySectionID: 1,
+ librarySectionTitle: "Movies",
+ librarySectionKey: "/library/sections/1",
+ showOrdering: GetSearchAllLibrariesShowOrdering.TvdbAbsolute,
+ flattenSeasons: GetSearchAllLibrariesFlattenSeasons.Show,
+ skipChildren: false,
+ media: [
{
- alt: "Episode 1",
- type: GetSearchAllLibrariesLibraryType.Background,
- url: "/library/metadata/45521/thumb/1644710589",
+ 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",
},
],
- titleSort: "Whale",
- viewCount: 1,
- lastViewedAt: 1682752242,
- originalTitle: "映画 ブラッククローバー 魔法帝の剣",
- viewOffset: 5222500,
- skipCount: 1,
- index: 1,
- theme: "/library/metadata/1/theme/1705636920",
- leafCount: 14,
- viewedLeafCount: 0,
- childCount: 1,
- hasPremiumExtras: "1",
- hasPremiumPrimaryExtra: "1",
- parentRatingKey: "66",
- parentGuid: "plex://show/5d9c081b170e24001f2a7be4",
- parentStudio: "UCP",
- parentKey: "/library/metadata/66",
- parentTitle: "Caprica",
- parentIndex: 1,
- parentYear: 2010,
- parentThumb: "/library/metadata/66/thumb/1705716261",
- parentTheme: "/library/metadata/66/theme/1705716261",
},
};
```
## Fields
-| Field | Type | Required | Description |
-| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
-| `score` | *number* | :heavy_check_mark: | N/A |
-| `metadata` | [operations.GetSearchAllLibrariesMetadata](../../../sdk/models/operations/getsearchalllibrariesmetadata.md) | :heavy_check_mark: | N/A |
\ No newline at end of file
+| 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/showordering.md b/docs/sdk/models/operations/showordering.md
index 9dc6f0af..a3778816 100644
--- a/docs/sdk/models/operations/showordering.md
+++ b/docs/sdk/models/operations/showordering.md
@@ -1,11 +1,12 @@
# ShowOrdering
Setting that indicates the episode ordering for the show.
-None = Library default,
-tmdbAiring = The Movie Database (Aired),
-aired = TheTVDB (Aired),
-dvd = TheTVDB (DVD),
-absolute = TheTVDB (Absolute)).
+Options:
+ - None = Library default
+ - tmdbAiring = The Movie Database (Aired)
+ - aired = TheTVDB (Aired)
+ - dvd = TheTVDB (DVD)
+ - absolute = TheTVDB (Absolute)
## Example Usage
diff --git a/docs/sdk/models/operations/stream.md b/docs/sdk/models/operations/stream.md
index 585bc832..3a2975aa 100644
--- a/docs/sdk/models/operations/stream.md
+++ b/docs/sdk/models/operations/stream.md
@@ -3,11 +3,10 @@
## Example Usage
```typescript
-import { Stream, StreamType } from "@lukehagar/plexjs/sdk/models/operations";
+import { Stream } from "@lukehagar/plexjs/sdk/models/operations";
let value: Stream = {
id: 1002625,
- streamType: StreamType.Video,
format: "srt",
default: true,
codec: "hevc",
@@ -62,56 +61,56 @@ let value: Stream = {
## Fields
-| Field | Type | Required | Description | Example |
-| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
-| `id` | *number* | :heavy_check_mark: | Unique stream identifier. | 1002625 |
-| `streamType` | [operations.StreamType](../../../sdk/models/operations/streamtype.md) | :heavy_check_mark: | Stream type:
- 1 = video
- 2 = audio
- 3 = subtitle
| 1 |
-| `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
+| 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/streamtype.md b/docs/sdk/models/operations/streamtype.md
deleted file mode 100644
index 8f00be58..00000000
--- a/docs/sdk/models/operations/streamtype.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# StreamType
-
-Stream type:
- - 1 = video
- - 2 = audio
- - 3 = subtitle
-
-
-## Example Usage
-
-```typescript
-import { StreamType } from "@lukehagar/plexjs/sdk/models/operations";
-
-let value: StreamType = StreamType.Video;
-```
-
-## Values
-
-This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type.
-
-| Name | Value |
-| ---------------------- | ---------------------- |
-| `Video` | 1 |
-| `Audio` | 2 |
-| `Subtitle` | 3 |
-| - | `Unrecognized` |
\ No newline at end of file
diff --git a/jsr.json b/jsr.json
index 800e06c0..65d541d7 100644
--- a/jsr.json
+++ b/jsr.json
@@ -2,7 +2,7 @@
{
"name": "@lukehagar/plexjs",
- "version": "0.38.0",
+ "version": "0.39.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 fdaa634b..1de8f209 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@lukehagar/plexjs",
- "version": "0.38.0",
+ "version": "0.39.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@lukehagar/plexjs",
- "version": "0.38.0",
+ "version": "0.39.0",
"devDependencies": {
"@eslint/js": "^9.19.0",
"eslint": "^9.19.0",
diff --git a/package.json b/package.json
index 3c74a99c..5b1bb4a1 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@lukehagar/plexjs",
- "version": "0.38.0",
+ "version": "0.39.0",
"author": "LukeHagar",
"main": "./index.js",
"sideEffects": false,
diff --git a/src/funcs/activitiesCancelServerActivities.ts b/src/funcs/activitiesCancelServerActivities.ts
index 774e5333..23fedb86 100644
--- a/src/funcs/activitiesCancelServerActivities.ts
+++ b/src/funcs/activitiesCancelServerActivities.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -39,13 +40,14 @@ export function activitiesCancelServerActivities(
operations.CancelServerActivitiesResponse,
| errors.CancelServerActivitiesBadRequest
| errors.CancelServerActivitiesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -65,13 +67,14 @@ async function $do(
operations.CancelServerActivitiesResponse,
| errors.CancelServerActivitiesBadRequest
| errors.CancelServerActivitiesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -162,20 +165,21 @@ async function $do(
operations.CancelServerActivitiesResponse,
| errors.CancelServerActivitiesBadRequest
| errors.CancelServerActivitiesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | 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, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/activitiesGetServerActivities.ts b/src/funcs/activitiesGetServerActivities.ts
index c118c784..6bb0f05c 100644
--- a/src/funcs/activitiesGetServerActivities.ts
+++ b/src/funcs/activitiesGetServerActivities.ts
@@ -16,7 +16,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -36,13 +37,14 @@ export function activitiesGetServerActivities(
operations.GetServerActivitiesResponse,
| errors.GetServerActivitiesBadRequest
| errors.GetServerActivitiesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -60,13 +62,14 @@ async function $do(
operations.GetServerActivitiesResponse,
| errors.GetServerActivitiesBadRequest
| errors.GetServerActivitiesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -133,13 +136,14 @@ async function $do(
operations.GetServerActivitiesResponse,
| errors.GetServerActivitiesBadRequest
| errors.GetServerActivitiesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetServerActivitiesResponse$inboundSchema, {
key: "object",
@@ -148,7 +152,7 @@ async function $do(
M.jsonErr(401, errors.GetServerActivitiesUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/authenticationGetSourceConnectionInformation.ts b/src/funcs/authenticationGetSourceConnectionInformation.ts
index 07c2bef2..26f338ba 100644
--- a/src/funcs/authenticationGetSourceConnectionInformation.ts
+++ b/src/funcs/authenticationGetSourceConnectionInformation.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -40,13 +41,14 @@ export function authenticationGetSourceConnectionInformation(
operations.GetSourceConnectionInformationResponse,
| errors.GetSourceConnectionInformationBadRequest
| errors.GetSourceConnectionInformationUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -66,13 +68,14 @@ async function $do(
operations.GetSourceConnectionInformationResponse,
| errors.GetSourceConnectionInformationBadRequest
| errors.GetSourceConnectionInformationUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -163,13 +166,14 @@ async function $do(
operations.GetSourceConnectionInformationResponse,
| errors.GetSourceConnectionInformationBadRequest
| errors.GetSourceConnectionInformationUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.nil(200, operations.GetSourceConnectionInformationResponse$inboundSchema),
M.jsonErr(
@@ -182,7 +186,7 @@ async function $do(
),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/authenticationGetTokenDetails.ts b/src/funcs/authenticationGetTokenDetails.ts
index 5a791bb0..c0eb5c35 100644
--- a/src/funcs/authenticationGetTokenDetails.ts
+++ b/src/funcs/authenticationGetTokenDetails.ts
@@ -16,7 +16,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { 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";
@@ -37,13 +38,14 @@ export function authenticationGetTokenDetails(
operations.GetTokenDetailsResponse,
| errors.GetTokenDetailsBadRequest
| errors.GetTokenDetailsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -61,13 +63,14 @@ async function $do(
operations.GetTokenDetailsResponse,
| errors.GetTokenDetailsBadRequest
| errors.GetTokenDetailsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -137,13 +140,14 @@ async function $do(
operations.GetTokenDetailsResponse,
| errors.GetTokenDetailsBadRequest
| errors.GetTokenDetailsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetTokenDetailsResponse$inboundSchema, {
key: "UserPlexAccount",
@@ -152,7 +156,7 @@ async function $do(
M.jsonErr(401, errors.GetTokenDetailsUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/authenticationGetTransientToken.ts b/src/funcs/authenticationGetTransientToken.ts
index 5dccd802..5468fa59 100644
--- a/src/funcs/authenticationGetTransientToken.ts
+++ b/src/funcs/authenticationGetTransientToken.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -40,13 +41,14 @@ export function authenticationGetTransientToken(
operations.GetTransientTokenResponse,
| errors.GetTransientTokenBadRequest
| errors.GetTransientTokenUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -68,13 +70,14 @@ async function $do(
operations.GetTransientTokenResponse,
| errors.GetTransientTokenBadRequest
| errors.GetTransientTokenUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -164,20 +167,21 @@ async function $do(
operations.GetTransientTokenResponse,
| errors.GetTransientTokenBadRequest
| errors.GetTransientTokenUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | 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, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/authenticationPostUsersSignInData.ts b/src/funcs/authenticationPostUsersSignInData.ts
index 1f51226c..e7c0ba55 100644
--- a/src/funcs/authenticationPostUsersSignInData.ts
+++ b/src/funcs/authenticationPostUsersSignInData.ts
@@ -17,7 +17,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } 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";
@@ -39,13 +40,14 @@ export function authenticationPostUsersSignInData(
operations.PostUsersSignInDataResponse,
| errors.PostUsersSignInDataBadRequest
| errors.PostUsersSignInDataUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -65,13 +67,14 @@ async function $do(
operations.PostUsersSignInDataResponse,
| errors.PostUsersSignInDataBadRequest
| errors.PostUsersSignInDataUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -176,13 +179,14 @@ async function $do(
operations.PostUsersSignInDataResponse,
| errors.PostUsersSignInDataBadRequest
| errors.PostUsersSignInDataUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(201, operations.PostUsersSignInDataResponse$inboundSchema, {
key: "UserPlexAccount",
@@ -191,7 +195,7 @@ async function $do(
M.jsonErr(401, errors.PostUsersSignInDataUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/butlerGetButlerTasks.ts b/src/funcs/butlerGetButlerTasks.ts
index 2a9f0670..dac515e4 100644
--- a/src/funcs/butlerGetButlerTasks.ts
+++ b/src/funcs/butlerGetButlerTasks.ts
@@ -16,7 +16,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -36,13 +37,14 @@ export function butlerGetButlerTasks(
operations.GetButlerTasksResponse,
| errors.GetButlerTasksBadRequest
| errors.GetButlerTasksUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -60,13 +62,14 @@ async function $do(
operations.GetButlerTasksResponse,
| errors.GetButlerTasksBadRequest
| errors.GetButlerTasksUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -133,13 +136,14 @@ async function $do(
operations.GetButlerTasksResponse,
| errors.GetButlerTasksBadRequest
| errors.GetButlerTasksUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetButlerTasksResponse$inboundSchema, {
key: "object",
@@ -148,7 +152,7 @@ async function $do(
M.jsonErr(401, errors.GetButlerTasksUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/butlerStartAllTasks.ts b/src/funcs/butlerStartAllTasks.ts
index baf644ee..d8f0b50f 100644
--- a/src/funcs/butlerStartAllTasks.ts
+++ b/src/funcs/butlerStartAllTasks.ts
@@ -16,7 +16,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -40,13 +41,14 @@ export function butlerStartAllTasks(
operations.StartAllTasksResponse,
| errors.StartAllTasksBadRequest
| errors.StartAllTasksUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -64,13 +66,14 @@ async function $do(
operations.StartAllTasksResponse,
| errors.StartAllTasksBadRequest
| errors.StartAllTasksUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -137,20 +140,21 @@ async function $do(
operations.StartAllTasksResponse,
| errors.StartAllTasksBadRequest
| errors.StartAllTasksUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | 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, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/butlerStartTask.ts b/src/funcs/butlerStartTask.ts
index 71f304d2..9a4b04fe 100644
--- a/src/funcs/butlerStartTask.ts
+++ b/src/funcs/butlerStartTask.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -43,13 +44,14 @@ export function butlerStartTask(
operations.StartTaskResponse,
| errors.StartTaskBadRequest
| errors.StartTaskUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -69,13 +71,14 @@ async function $do(
operations.StartTaskResponse,
| errors.StartTaskBadRequest
| errors.StartTaskUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -165,20 +168,21 @@ async function $do(
operations.StartTaskResponse,
| errors.StartTaskBadRequest
| errors.StartTaskUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | 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("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/butlerStopAllTasks.ts b/src/funcs/butlerStopAllTasks.ts
index 734e577a..e22a7763 100644
--- a/src/funcs/butlerStopAllTasks.ts
+++ b/src/funcs/butlerStopAllTasks.ts
@@ -16,7 +16,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -36,13 +37,14 @@ export function butlerStopAllTasks(
operations.StopAllTasksResponse,
| errors.StopAllTasksBadRequest
| errors.StopAllTasksUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -60,13 +62,14 @@ async function $do(
operations.StopAllTasksResponse,
| errors.StopAllTasksBadRequest
| errors.StopAllTasksUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -133,20 +136,21 @@ async function $do(
operations.StopAllTasksResponse,
| errors.StopAllTasksBadRequest
| errors.StopAllTasksUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | 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, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/butlerStopTask.ts b/src/funcs/butlerStopTask.ts
index fdb65a7a..1c724d23 100644
--- a/src/funcs/butlerStopTask.ts
+++ b/src/funcs/butlerStopTask.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -39,13 +40,14 @@ export function butlerStopTask(
operations.StopTaskResponse,
| errors.StopTaskBadRequest
| errors.StopTaskUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -65,13 +67,14 @@ async function $do(
operations.StopTaskResponse,
| errors.StopTaskBadRequest
| errors.StopTaskUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -161,20 +164,21 @@ async function $do(
operations.StopTaskResponse,
| errors.StopTaskBadRequest
| errors.StopTaskUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | 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, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/hubsGetGlobalHubs.ts b/src/funcs/hubsGetGlobalHubs.ts
index 2c74d87d..d2e86881 100644
--- a/src/funcs/hubsGetGlobalHubs.ts
+++ b/src/funcs/hubsGetGlobalHubs.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -40,13 +41,14 @@ export function hubsGetGlobalHubs(
operations.GetGlobalHubsResponse,
| errors.GetGlobalHubsBadRequest
| errors.GetGlobalHubsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -68,13 +70,14 @@ async function $do(
operations.GetGlobalHubsResponse,
| errors.GetGlobalHubsBadRequest
| errors.GetGlobalHubsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -164,13 +167,14 @@ async function $do(
operations.GetGlobalHubsResponse,
| errors.GetGlobalHubsBadRequest
| errors.GetGlobalHubsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetGlobalHubsResponse$inboundSchema, {
key: "object",
@@ -179,7 +183,7 @@ async function $do(
M.jsonErr(401, errors.GetGlobalHubsUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/hubsGetLibraryHubs.ts b/src/funcs/hubsGetLibraryHubs.ts
index b56a0ecd..37b60334 100644
--- a/src/funcs/hubsGetLibraryHubs.ts
+++ b/src/funcs/hubsGetLibraryHubs.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -41,13 +42,14 @@ export function hubsGetLibraryHubs(
operations.GetLibraryHubsResponse,
| errors.GetLibraryHubsBadRequest
| errors.GetLibraryHubsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -71,13 +73,14 @@ async function $do(
operations.GetLibraryHubsResponse,
| errors.GetLibraryHubsBadRequest
| errors.GetLibraryHubsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -175,13 +178,14 @@ async function $do(
operations.GetLibraryHubsResponse,
| errors.GetLibraryHubsBadRequest
| errors.GetLibraryHubsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetLibraryHubsResponse$inboundSchema, {
key: "object",
@@ -190,7 +194,7 @@ async function $do(
M.jsonErr(401, errors.GetLibraryHubsUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/hubsGetRecentlyAdded.ts b/src/funcs/hubsGetRecentlyAdded.ts
index dcf9aa85..23c16233 100644
--- a/src/funcs/hubsGetRecentlyAdded.ts
+++ b/src/funcs/hubsGetRecentlyAdded.ts
@@ -17,7 +17,8 @@ import {
RequestTimeoutError,
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -36,13 +37,14 @@ export function hubsGetRecentlyAdded(
): APIPromise<
Result<
operations.GetRecentlyAddedResponse,
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -60,13 +62,14 @@ async function $do(
[
Result<
operations.GetRecentlyAddedResponse,
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -154,20 +157,21 @@ async function $do(
const [result] = await M.match<
operations.GetRecentlyAddedResponse,
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetRecentlyAddedResponse$inboundSchema, {
key: "object",
}),
M.fail([400, 401, "4XX"]),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/libraryDeleteLibrary.ts b/src/funcs/libraryDeleteLibrary.ts
index 456a1828..d3e88d30 100644
--- a/src/funcs/libraryDeleteLibrary.ts
+++ b/src/funcs/libraryDeleteLibrary.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -39,13 +40,14 @@ export function libraryDeleteLibrary(
operations.DeleteLibraryResponse,
| errors.DeleteLibraryBadRequest
| errors.DeleteLibraryUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -65,13 +67,14 @@ async function $do(
operations.DeleteLibraryResponse,
| errors.DeleteLibraryBadRequest
| errors.DeleteLibraryUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -161,20 +164,21 @@ async function $do(
operations.DeleteLibraryResponse,
| errors.DeleteLibraryBadRequest
| errors.DeleteLibraryUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | 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, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/libraryGetActorsLibrary.ts b/src/funcs/libraryGetActorsLibrary.ts
index 10291125..c0b409f6 100644
--- a/src/funcs/libraryGetActorsLibrary.ts
+++ b/src/funcs/libraryGetActorsLibrary.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -40,13 +41,14 @@ export function libraryGetActorsLibrary(
operations.GetActorsLibraryResponse,
| errors.GetActorsLibraryBadRequest
| errors.GetActorsLibraryUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -68,13 +70,14 @@ async function $do(
operations.GetActorsLibraryResponse,
| errors.GetActorsLibraryBadRequest
| errors.GetActorsLibraryUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -170,13 +173,14 @@ async function $do(
operations.GetActorsLibraryResponse,
| errors.GetActorsLibraryBadRequest
| errors.GetActorsLibraryUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetActorsLibraryResponse$inboundSchema, {
key: "object",
@@ -185,7 +189,7 @@ async function $do(
M.jsonErr(401, errors.GetActorsLibraryUnauthorized$inboundSchema),
M.fail([404, "4XX"]),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/libraryGetAllLibraries.ts b/src/funcs/libraryGetAllLibraries.ts
index 7a7ae7a6..adbe8705 100644
--- a/src/funcs/libraryGetAllLibraries.ts
+++ b/src/funcs/libraryGetAllLibraries.ts
@@ -16,7 +16,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -41,13 +42,14 @@ export function libraryGetAllLibraries(
operations.GetAllLibrariesResponse,
| errors.GetAllLibrariesBadRequest
| errors.GetAllLibrariesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -65,13 +67,14 @@ async function $do(
operations.GetAllLibrariesResponse,
| errors.GetAllLibrariesBadRequest
| errors.GetAllLibrariesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -138,13 +141,14 @@ async function $do(
operations.GetAllLibrariesResponse,
| errors.GetAllLibrariesBadRequest
| errors.GetAllLibrariesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetAllLibrariesResponse$inboundSchema, {
key: "object",
@@ -153,7 +157,7 @@ async function $do(
M.jsonErr(401, errors.GetAllLibrariesUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/libraryGetCountriesLibrary.ts b/src/funcs/libraryGetCountriesLibrary.ts
index abecfc92..d081aa1a 100644
--- a/src/funcs/libraryGetCountriesLibrary.ts
+++ b/src/funcs/libraryGetCountriesLibrary.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -40,13 +41,14 @@ export function libraryGetCountriesLibrary(
operations.GetCountriesLibraryResponse,
| errors.GetCountriesLibraryBadRequest
| errors.GetCountriesLibraryUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -68,13 +70,14 @@ async function $do(
operations.GetCountriesLibraryResponse,
| errors.GetCountriesLibraryBadRequest
| errors.GetCountriesLibraryUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -171,13 +174,14 @@ async function $do(
operations.GetCountriesLibraryResponse,
| errors.GetCountriesLibraryBadRequest
| errors.GetCountriesLibraryUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetCountriesLibraryResponse$inboundSchema, {
key: "object",
@@ -186,7 +190,7 @@ async function $do(
M.jsonErr(401, errors.GetCountriesLibraryUnauthorized$inboundSchema),
M.fail([404, "4XX"]),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/libraryGetFileHash.ts b/src/funcs/libraryGetFileHash.ts
index 24e2c89d..52c2d497 100644
--- a/src/funcs/libraryGetFileHash.ts
+++ b/src/funcs/libraryGetFileHash.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -40,13 +41,14 @@ export function libraryGetFileHash(
operations.GetFileHashResponse,
| errors.GetFileHashBadRequest
| errors.GetFileHashUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -68,13 +70,14 @@ async function $do(
operations.GetFileHashResponse,
| errors.GetFileHashBadRequest
| errors.GetFileHashUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -164,20 +167,21 @@ async function $do(
operations.GetFileHashResponse,
| errors.GetFileHashBadRequest
| errors.GetFileHashUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | 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, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/libraryGetGenresLibrary.ts b/src/funcs/libraryGetGenresLibrary.ts
index 63121b08..0e46ce9d 100644
--- a/src/funcs/libraryGetGenresLibrary.ts
+++ b/src/funcs/libraryGetGenresLibrary.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -40,13 +41,14 @@ export function libraryGetGenresLibrary(
operations.GetGenresLibraryResponse,
| errors.GetGenresLibraryBadRequest
| errors.GetGenresLibraryUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -68,13 +70,14 @@ async function $do(
operations.GetGenresLibraryResponse,
| errors.GetGenresLibraryBadRequest
| errors.GetGenresLibraryUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -170,13 +173,14 @@ async function $do(
operations.GetGenresLibraryResponse,
| errors.GetGenresLibraryBadRequest
| errors.GetGenresLibraryUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetGenresLibraryResponse$inboundSchema, {
key: "object",
@@ -185,7 +189,7 @@ async function $do(
M.jsonErr(401, errors.GetGenresLibraryUnauthorized$inboundSchema),
M.fail([404, "4XX"]),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/libraryGetLibraryDetails.ts b/src/funcs/libraryGetLibraryDetails.ts
index 54a0e670..1d7a2614 100644
--- a/src/funcs/libraryGetLibraryDetails.ts
+++ b/src/funcs/libraryGetLibraryDetails.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -78,13 +79,14 @@ export function libraryGetLibraryDetails(
operations.GetLibraryDetailsResponse,
| errors.GetLibraryDetailsBadRequest
| errors.GetLibraryDetailsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -106,13 +108,14 @@ async function $do(
operations.GetLibraryDetailsResponse,
| errors.GetLibraryDetailsBadRequest
| errors.GetLibraryDetailsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -208,13 +211,14 @@ async function $do(
operations.GetLibraryDetailsResponse,
| errors.GetLibraryDetailsBadRequest
| errors.GetLibraryDetailsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetLibraryDetailsResponse$inboundSchema, {
key: "object",
@@ -223,7 +227,7 @@ async function $do(
M.jsonErr(401, errors.GetLibraryDetailsUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/libraryGetLibraryItems.ts b/src/funcs/libraryGetLibraryItems.ts
index df654d22..e55b05bd 100644
--- a/src/funcs/libraryGetLibraryItems.ts
+++ b/src/funcs/libraryGetLibraryItems.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -59,13 +60,14 @@ export function libraryGetLibraryItems(
operations.GetLibraryItemsResponse,
| errors.GetLibraryItemsBadRequest
| errors.GetLibraryItemsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -85,13 +87,14 @@ async function $do(
operations.GetLibraryItemsResponse,
| errors.GetLibraryItemsBadRequest
| errors.GetLibraryItemsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -190,13 +193,14 @@ async function $do(
operations.GetLibraryItemsResponse,
| errors.GetLibraryItemsBadRequest
| errors.GetLibraryItemsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetLibraryItemsResponse$inboundSchema, {
key: "object",
@@ -205,7 +209,7 @@ async function $do(
M.jsonErr(401, errors.GetLibraryItemsUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/libraryGetLibrarySectionsAll.ts b/src/funcs/libraryGetLibrarySectionsAll.ts
index d263d46e..60b12248 100644
--- a/src/funcs/libraryGetLibrarySectionsAll.ts
+++ b/src/funcs/libraryGetLibrarySectionsAll.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -39,13 +40,14 @@ export function libraryGetLibrarySectionsAll(
operations.GetLibrarySectionsAllResponse,
| errors.GetLibrarySectionsAllBadRequest
| errors.GetLibrarySectionsAllUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -65,13 +67,14 @@ async function $do(
operations.GetLibrarySectionsAllResponse,
| errors.GetLibrarySectionsAllBadRequest
| errors.GetLibrarySectionsAllUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -170,13 +173,14 @@ async function $do(
operations.GetLibrarySectionsAllResponse,
| errors.GetLibrarySectionsAllBadRequest
| errors.GetLibrarySectionsAllUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetLibrarySectionsAllResponse$inboundSchema, {
key: "object",
@@ -185,7 +189,7 @@ async function $do(
M.jsonErr(401, errors.GetLibrarySectionsAllUnauthorized$inboundSchema),
M.fail([404, "4XX"]),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/libraryGetMediaArts.ts b/src/funcs/libraryGetMediaArts.ts
index a532ad51..0f66fe7e 100644
--- a/src/funcs/libraryGetMediaArts.ts
+++ b/src/funcs/libraryGetMediaArts.ts
@@ -17,7 +17,8 @@ import {
RequestTimeoutError,
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -36,13 +37,14 @@ export function libraryGetMediaArts(
): APIPromise<
Result<
operations.GetMediaArtsResponse,
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -60,13 +62,14 @@ async function $do(
[
Result<
operations.GetMediaArtsResponse,
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -154,20 +157,21 @@ async function $do(
const [result] = await M.match<
operations.GetMediaArtsResponse,
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetMediaArtsResponse$inboundSchema, {
key: "object",
}),
M.fail([404, "4XX"]),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/libraryGetMediaMetaData.ts b/src/funcs/libraryGetMediaMetaData.ts
index 520bcc97..8f0573d3 100644
--- a/src/funcs/libraryGetMediaMetaData.ts
+++ b/src/funcs/libraryGetMediaMetaData.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -40,13 +41,14 @@ export function libraryGetMediaMetaData(
operations.GetMediaMetaDataResponse,
| errors.GetMediaMetaDataBadRequest
| errors.GetMediaMetaDataUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -66,13 +68,14 @@ async function $do(
operations.GetMediaMetaDataResponse,
| errors.GetMediaMetaDataBadRequest
| errors.GetMediaMetaDataUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -175,13 +178,14 @@ async function $do(
operations.GetMediaMetaDataResponse,
| errors.GetMediaMetaDataBadRequest
| errors.GetMediaMetaDataUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetMediaMetaDataResponse$inboundSchema, {
key: "object",
@@ -190,7 +194,7 @@ async function $do(
M.jsonErr(401, errors.GetMediaMetaDataUnauthorized$inboundSchema),
M.fail([404, "4XX"]),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/libraryGetMediaPosters.ts b/src/funcs/libraryGetMediaPosters.ts
index 4fa00784..b0dd921e 100644
--- a/src/funcs/libraryGetMediaPosters.ts
+++ b/src/funcs/libraryGetMediaPosters.ts
@@ -17,7 +17,8 @@ import {
RequestTimeoutError,
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -36,13 +37,14 @@ export function libraryGetMediaPosters(
): APIPromise<
Result<
operations.GetMediaPostersResponse,
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -60,13 +62,14 @@ async function $do(
[
Result<
operations.GetMediaPostersResponse,
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -154,20 +157,21 @@ async function $do(
const [result] = await M.match<
operations.GetMediaPostersResponse,
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetMediaPostersResponse$inboundSchema, {
key: "object",
}),
M.fail([404, "4XX"]),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/libraryGetMetadataChildren.ts b/src/funcs/libraryGetMetadataChildren.ts
index f87d7447..fbe5a97f 100644
--- a/src/funcs/libraryGetMetadataChildren.ts
+++ b/src/funcs/libraryGetMetadataChildren.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -40,13 +41,14 @@ export function libraryGetMetadataChildren(
operations.GetMetadataChildrenResponse,
| errors.GetMetadataChildrenBadRequest
| errors.GetMetadataChildrenUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -68,13 +70,14 @@ async function $do(
operations.GetMetadataChildrenResponse,
| errors.GetMetadataChildrenBadRequest
| errors.GetMetadataChildrenUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -171,13 +174,14 @@ async function $do(
operations.GetMetadataChildrenResponse,
| errors.GetMetadataChildrenBadRequest
| errors.GetMetadataChildrenUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetMetadataChildrenResponse$inboundSchema, {
key: "object",
@@ -186,7 +190,7 @@ async function $do(
M.jsonErr(401, errors.GetMetadataChildrenUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/libraryGetRecentlyAddedLibrary.ts b/src/funcs/libraryGetRecentlyAddedLibrary.ts
index a10d928b..c68933fc 100644
--- a/src/funcs/libraryGetRecentlyAddedLibrary.ts
+++ b/src/funcs/libraryGetRecentlyAddedLibrary.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -39,13 +40,14 @@ export function libraryGetRecentlyAddedLibrary(
operations.GetRecentlyAddedLibraryResponse,
| errors.GetRecentlyAddedLibraryBadRequest
| errors.GetRecentlyAddedLibraryUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -65,13 +67,14 @@ async function $do(
operations.GetRecentlyAddedLibraryResponse,
| errors.GetRecentlyAddedLibraryBadRequest
| errors.GetRecentlyAddedLibraryUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -162,13 +165,14 @@ async function $do(
operations.GetRecentlyAddedLibraryResponse,
| errors.GetRecentlyAddedLibraryBadRequest
| errors.GetRecentlyAddedLibraryUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetRecentlyAddedLibraryResponse$inboundSchema, {
key: "object",
@@ -177,7 +181,7 @@ async function $do(
M.jsonErr(401, errors.GetRecentlyAddedLibraryUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/libraryGetRefreshLibraryMetadata.ts b/src/funcs/libraryGetRefreshLibraryMetadata.ts
index e5129919..78cf4224 100644
--- a/src/funcs/libraryGetRefreshLibraryMetadata.ts
+++ b/src/funcs/libraryGetRefreshLibraryMetadata.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -40,13 +41,14 @@ export function libraryGetRefreshLibraryMetadata(
operations.GetRefreshLibraryMetadataResponse,
| errors.GetRefreshLibraryMetadataBadRequest
| errors.GetRefreshLibraryMetadataUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -68,13 +70,14 @@ async function $do(
operations.GetRefreshLibraryMetadataResponse,
| errors.GetRefreshLibraryMetadataBadRequest
| errors.GetRefreshLibraryMetadataUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -171,20 +174,21 @@ async function $do(
operations.GetRefreshLibraryMetadataResponse,
| errors.GetRefreshLibraryMetadataBadRequest
| errors.GetRefreshLibraryMetadataUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | 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, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/libraryGetSearchAllLibraries.ts b/src/funcs/libraryGetSearchAllLibraries.ts
index 6dc245b1..bbe9106b 100644
--- a/src/funcs/libraryGetSearchAllLibraries.ts
+++ b/src/funcs/libraryGetSearchAllLibraries.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -39,13 +40,14 @@ export function libraryGetSearchAllLibraries(
operations.GetSearchAllLibrariesResponse,
| errors.GetSearchAllLibrariesBadRequest
| errors.GetSearchAllLibrariesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -65,13 +67,14 @@ async function $do(
operations.GetSearchAllLibrariesResponse,
| errors.GetSearchAllLibrariesBadRequest
| errors.GetSearchAllLibrariesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -169,13 +172,14 @@ async function $do(
operations.GetSearchAllLibrariesResponse,
| errors.GetSearchAllLibrariesBadRequest
| errors.GetSearchAllLibrariesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetSearchAllLibrariesResponse$inboundSchema, {
key: "object",
@@ -184,7 +188,7 @@ async function $do(
M.jsonErr(401, errors.GetSearchAllLibrariesUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/libraryGetSearchLibrary.ts b/src/funcs/libraryGetSearchLibrary.ts
index b7432417..8559404f 100644
--- a/src/funcs/libraryGetSearchLibrary.ts
+++ b/src/funcs/libraryGetSearchLibrary.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -57,13 +58,14 @@ export function libraryGetSearchLibrary(
operations.GetSearchLibraryResponse,
| errors.GetSearchLibraryBadRequest
| errors.GetSearchLibraryUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -85,13 +87,14 @@ async function $do(
operations.GetSearchLibraryResponse,
| errors.GetSearchLibraryBadRequest
| errors.GetSearchLibraryUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -187,13 +190,14 @@ async function $do(
operations.GetSearchLibraryResponse,
| errors.GetSearchLibraryBadRequest
| errors.GetSearchLibraryUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetSearchLibraryResponse$inboundSchema, {
key: "object",
@@ -202,7 +206,7 @@ async function $do(
M.jsonErr(401, errors.GetSearchLibraryUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/libraryGetTopWatchedContent.ts b/src/funcs/libraryGetTopWatchedContent.ts
index 2144de2a..e549225f 100644
--- a/src/funcs/libraryGetTopWatchedContent.ts
+++ b/src/funcs/libraryGetTopWatchedContent.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -42,13 +43,14 @@ export function libraryGetTopWatchedContent(
operations.GetTopWatchedContentResponse,
| errors.GetTopWatchedContentBadRequest
| errors.GetTopWatchedContentUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -72,13 +74,14 @@ async function $do(
operations.GetTopWatchedContentResponse,
| errors.GetTopWatchedContentBadRequest
| errors.GetTopWatchedContentUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -169,13 +172,14 @@ async function $do(
operations.GetTopWatchedContentResponse,
| errors.GetTopWatchedContentBadRequest
| errors.GetTopWatchedContentUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetTopWatchedContentResponse$inboundSchema, {
key: "object",
@@ -184,7 +188,7 @@ async function $do(
M.jsonErr(401, errors.GetTopWatchedContentUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/libraryPostMediaArts.ts b/src/funcs/libraryPostMediaArts.ts
index bc38930d..a828640f 100644
--- a/src/funcs/libraryPostMediaArts.ts
+++ b/src/funcs/libraryPostMediaArts.ts
@@ -17,7 +17,8 @@ import {
RequestTimeoutError,
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -43,13 +44,14 @@ export function libraryPostMediaArts(
): APIPromise<
Result<
operations.PostMediaArtsResponse,
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -76,13 +78,14 @@ async function $do(
[
Result<
operations.PostMediaArtsResponse,
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -178,18 +181,19 @@ async function $do(
const [result] = await M.match<
operations.PostMediaArtsResponse,
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.nil(200, operations.PostMediaArtsResponse$inboundSchema),
M.fail([404, "4XX"]),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/libraryPostMediaPoster.ts b/src/funcs/libraryPostMediaPoster.ts
index e9905bfa..2493ff35 100644
--- a/src/funcs/libraryPostMediaPoster.ts
+++ b/src/funcs/libraryPostMediaPoster.ts
@@ -17,7 +17,8 @@ import {
RequestTimeoutError,
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -43,13 +44,14 @@ export function libraryPostMediaPoster(
): APIPromise<
Result<
operations.PostMediaPosterResponse,
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -76,13 +78,14 @@ async function $do(
[
Result<
operations.PostMediaPosterResponse,
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -178,18 +181,19 @@ async function $do(
const [result] = await M.match<
operations.PostMediaPosterResponse,
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.nil(200, operations.PostMediaPosterResponse$inboundSchema),
M.fail([404, "4XX"]),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/logEnablePaperTrail.ts b/src/funcs/logEnablePaperTrail.ts
index 82db2f9f..02267725 100644
--- a/src/funcs/logEnablePaperTrail.ts
+++ b/src/funcs/logEnablePaperTrail.ts
@@ -16,7 +16,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -36,13 +37,14 @@ export function logEnablePaperTrail(
operations.EnablePaperTrailResponse,
| errors.EnablePaperTrailBadRequest
| errors.EnablePaperTrailUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -60,13 +62,14 @@ async function $do(
operations.EnablePaperTrailResponse,
| errors.EnablePaperTrailBadRequest
| errors.EnablePaperTrailUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -133,20 +136,21 @@ async function $do(
operations.EnablePaperTrailResponse,
| errors.EnablePaperTrailBadRequest
| errors.EnablePaperTrailUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | 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, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/logLogLine.ts b/src/funcs/logLogLine.ts
index 3c14b9f2..c13699bb 100644
--- a/src/funcs/logLogLine.ts
+++ b/src/funcs/logLogLine.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -41,13 +42,14 @@ export function logLogLine(
operations.LogLineResponse,
| errors.LogLineBadRequest
| errors.LogLineUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -71,13 +73,14 @@ async function $do(
operations.LogLineResponse,
| errors.LogLineBadRequest
| errors.LogLineUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -169,20 +172,21 @@ async function $do(
operations.LogLineResponse,
| errors.LogLineBadRequest
| errors.LogLineUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | 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, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/logLogMultiLine.ts b/src/funcs/logLogMultiLine.ts
index 05cbe1b6..9f389c6c 100644
--- a/src/funcs/logLogMultiLine.ts
+++ b/src/funcs/logLogMultiLine.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -59,13 +60,14 @@ export function logLogMultiLine(
operations.LogMultiLineResponse,
| errors.LogMultiLineBadRequest
| errors.LogMultiLineUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -85,13 +87,14 @@ async function $do(
operations.LogMultiLineResponse,
| errors.LogMultiLineBadRequest
| errors.LogMultiLineUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -171,20 +174,21 @@ async function $do(
operations.LogMultiLineResponse,
| errors.LogMultiLineBadRequest
| errors.LogMultiLineUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | 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, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/mediaGetBannerImage.ts b/src/funcs/mediaGetBannerImage.ts
index 174d04de..500751ce 100644
--- a/src/funcs/mediaGetBannerImage.ts
+++ b/src/funcs/mediaGetBannerImage.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -39,13 +40,14 @@ export function mediaGetBannerImage(
operations.GetBannerImageResponse,
| errors.GetBannerImageBadRequest
| errors.GetBannerImageUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -65,13 +67,14 @@ async function $do(
operations.GetBannerImageResponse,
| errors.GetBannerImageBadRequest
| errors.GetBannerImageUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -169,13 +172,14 @@ async function $do(
operations.GetBannerImageResponse,
| errors.GetBannerImageBadRequest
| errors.GetBannerImageUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.stream(200, operations.GetBannerImageResponse$inboundSchema, {
ctype: "image/jpeg",
@@ -186,7 +190,7 @@ async function $do(
M.jsonErr(401, errors.GetBannerImageUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/mediaGetThumbImage.ts b/src/funcs/mediaGetThumbImage.ts
index 911a9139..bd7986c8 100644
--- a/src/funcs/mediaGetThumbImage.ts
+++ b/src/funcs/mediaGetThumbImage.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -39,13 +40,14 @@ export function mediaGetThumbImage(
operations.GetThumbImageResponse,
| errors.GetThumbImageBadRequest
| errors.GetThumbImageUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -65,13 +67,14 @@ async function $do(
operations.GetThumbImageResponse,
| errors.GetThumbImageBadRequest
| errors.GetThumbImageUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -169,13 +172,14 @@ async function $do(
operations.GetThumbImageResponse,
| errors.GetThumbImageBadRequest
| errors.GetThumbImageUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.stream(200, operations.GetThumbImageResponse$inboundSchema, {
ctype: "image/jpeg",
@@ -186,7 +190,7 @@ async function $do(
M.jsonErr(401, errors.GetThumbImageUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/mediaMarkPlayed.ts b/src/funcs/mediaMarkPlayed.ts
index 18185afd..a39f14a0 100644
--- a/src/funcs/mediaMarkPlayed.ts
+++ b/src/funcs/mediaMarkPlayed.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -39,13 +40,14 @@ export function mediaMarkPlayed(
operations.MarkPlayedResponse,
| errors.MarkPlayedBadRequest
| errors.MarkPlayedUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -65,13 +67,14 @@ async function $do(
operations.MarkPlayedResponse,
| errors.MarkPlayedBadRequest
| errors.MarkPlayedUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -159,20 +162,21 @@ async function $do(
operations.MarkPlayedResponse,
| errors.MarkPlayedBadRequest
| errors.MarkPlayedUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | 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, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/mediaMarkUnplayed.ts b/src/funcs/mediaMarkUnplayed.ts
index a3d84a8e..5075b5da 100644
--- a/src/funcs/mediaMarkUnplayed.ts
+++ b/src/funcs/mediaMarkUnplayed.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -39,13 +40,14 @@ export function mediaMarkUnplayed(
operations.MarkUnplayedResponse,
| errors.MarkUnplayedBadRequest
| errors.MarkUnplayedUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -65,13 +67,14 @@ async function $do(
operations.MarkUnplayedResponse,
| errors.MarkUnplayedBadRequest
| errors.MarkUnplayedUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -159,20 +162,21 @@ async function $do(
operations.MarkUnplayedResponse,
| errors.MarkUnplayedBadRequest
| errors.MarkUnplayedUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | 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, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/mediaUpdatePlayProgress.ts b/src/funcs/mediaUpdatePlayProgress.ts
index 5969c4f7..7b1fd6ac 100644
--- a/src/funcs/mediaUpdatePlayProgress.ts
+++ b/src/funcs/mediaUpdatePlayProgress.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -41,13 +42,14 @@ export function mediaUpdatePlayProgress(
operations.UpdatePlayProgressResponse,
| errors.UpdatePlayProgressBadRequest
| errors.UpdatePlayProgressUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -71,13 +73,14 @@ async function $do(
operations.UpdatePlayProgressResponse,
| errors.UpdatePlayProgressBadRequest
| errors.UpdatePlayProgressUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -169,20 +172,21 @@ async function $do(
operations.UpdatePlayProgressResponse,
| errors.UpdatePlayProgressBadRequest
| errors.UpdatePlayProgressUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | 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, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/playlistsAddPlaylistContents.ts b/src/funcs/playlistsAddPlaylistContents.ts
index bde9490f..fe3422ca 100644
--- a/src/funcs/playlistsAddPlaylistContents.ts
+++ b/src/funcs/playlistsAddPlaylistContents.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -42,13 +43,14 @@ export function playlistsAddPlaylistContents(
operations.AddPlaylistContentsResponse,
| errors.AddPlaylistContentsBadRequest
| errors.AddPlaylistContentsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -72,13 +74,14 @@ async function $do(
operations.AddPlaylistContentsResponse,
| errors.AddPlaylistContentsBadRequest
| errors.AddPlaylistContentsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -177,13 +180,14 @@ async function $do(
operations.AddPlaylistContentsResponse,
| errors.AddPlaylistContentsBadRequest
| errors.AddPlaylistContentsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.AddPlaylistContentsResponse$inboundSchema, {
key: "object",
@@ -192,7 +196,7 @@ async function $do(
M.jsonErr(401, errors.AddPlaylistContentsUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/playlistsClearPlaylistContents.ts b/src/funcs/playlistsClearPlaylistContents.ts
index 8449d6cf..4c38b83a 100644
--- a/src/funcs/playlistsClearPlaylistContents.ts
+++ b/src/funcs/playlistsClearPlaylistContents.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -39,13 +40,14 @@ export function playlistsClearPlaylistContents(
operations.ClearPlaylistContentsResponse,
| errors.ClearPlaylistContentsBadRequest
| errors.ClearPlaylistContentsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -65,13 +67,14 @@ async function $do(
operations.ClearPlaylistContentsResponse,
| errors.ClearPlaylistContentsBadRequest
| errors.ClearPlaylistContentsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -162,20 +165,21 @@ async function $do(
operations.ClearPlaylistContentsResponse,
| errors.ClearPlaylistContentsBadRequest
| errors.ClearPlaylistContentsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | 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, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/playlistsCreatePlaylist.ts b/src/funcs/playlistsCreatePlaylist.ts
index f08d3f8b..91d2d3bf 100644
--- a/src/funcs/playlistsCreatePlaylist.ts
+++ b/src/funcs/playlistsCreatePlaylist.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -41,13 +42,14 @@ export function playlistsCreatePlaylist(
operations.CreatePlaylistResponse,
| errors.CreatePlaylistBadRequest
| errors.CreatePlaylistUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -67,13 +69,14 @@ async function $do(
operations.CreatePlaylistResponse,
| errors.CreatePlaylistBadRequest
| errors.CreatePlaylistUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -161,13 +164,14 @@ async function $do(
operations.CreatePlaylistResponse,
| errors.CreatePlaylistBadRequest
| errors.CreatePlaylistUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.CreatePlaylistResponse$inboundSchema, {
key: "object",
@@ -176,7 +180,7 @@ async function $do(
M.jsonErr(401, errors.CreatePlaylistUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/playlistsDeletePlaylist.ts b/src/funcs/playlistsDeletePlaylist.ts
index b58754cd..0c4d64e5 100644
--- a/src/funcs/playlistsDeletePlaylist.ts
+++ b/src/funcs/playlistsDeletePlaylist.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -39,13 +40,14 @@ export function playlistsDeletePlaylist(
operations.DeletePlaylistResponse,
| errors.DeletePlaylistBadRequest
| errors.DeletePlaylistUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -65,13 +67,14 @@ async function $do(
operations.DeletePlaylistResponse,
| errors.DeletePlaylistBadRequest
| errors.DeletePlaylistUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -161,20 +164,21 @@ async function $do(
operations.DeletePlaylistResponse,
| errors.DeletePlaylistBadRequest
| errors.DeletePlaylistUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | 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, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/playlistsGetPlaylist.ts b/src/funcs/playlistsGetPlaylist.ts
index 44e7f22c..204999df 100644
--- a/src/funcs/playlistsGetPlaylist.ts
+++ b/src/funcs/playlistsGetPlaylist.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -40,13 +41,14 @@ export function playlistsGetPlaylist(
operations.GetPlaylistResponse,
| errors.GetPlaylistBadRequest
| errors.GetPlaylistUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -66,13 +68,14 @@ async function $do(
operations.GetPlaylistResponse,
| errors.GetPlaylistBadRequest
| errors.GetPlaylistUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -162,13 +165,14 @@ async function $do(
operations.GetPlaylistResponse,
| errors.GetPlaylistBadRequest
| errors.GetPlaylistUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetPlaylistResponse$inboundSchema, {
key: "object",
@@ -177,7 +181,7 @@ async function $do(
M.jsonErr(401, errors.GetPlaylistUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/playlistsGetPlaylistContents.ts b/src/funcs/playlistsGetPlaylistContents.ts
index 6a5c3c79..c83dacfd 100644
--- a/src/funcs/playlistsGetPlaylistContents.ts
+++ b/src/funcs/playlistsGetPlaylistContents.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -43,13 +44,14 @@ export function playlistsGetPlaylistContents(
operations.GetPlaylistContentsResponse,
| errors.GetPlaylistContentsBadRequest
| errors.GetPlaylistContentsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -71,13 +73,14 @@ async function $do(
operations.GetPlaylistContentsResponse,
| errors.GetPlaylistContentsBadRequest
| errors.GetPlaylistContentsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -174,13 +177,14 @@ async function $do(
operations.GetPlaylistContentsResponse,
| errors.GetPlaylistContentsBadRequest
| errors.GetPlaylistContentsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetPlaylistContentsResponse$inboundSchema, {
key: "object",
@@ -189,7 +193,7 @@ async function $do(
M.jsonErr(401, errors.GetPlaylistContentsUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/playlistsGetPlaylists.ts b/src/funcs/playlistsGetPlaylists.ts
index a7388d1b..27b8289b 100644
--- a/src/funcs/playlistsGetPlaylists.ts
+++ b/src/funcs/playlistsGetPlaylists.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -40,13 +41,14 @@ export function playlistsGetPlaylists(
operations.GetPlaylistsResponse,
| errors.GetPlaylistsBadRequest
| errors.GetPlaylistsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -68,13 +70,14 @@ async function $do(
operations.GetPlaylistsResponse,
| errors.GetPlaylistsBadRequest
| errors.GetPlaylistsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -164,13 +167,14 @@ async function $do(
operations.GetPlaylistsResponse,
| errors.GetPlaylistsBadRequest
| errors.GetPlaylistsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetPlaylistsResponse$inboundSchema, {
key: "object",
@@ -179,7 +183,7 @@ async function $do(
M.jsonErr(401, errors.GetPlaylistsUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/playlistsUpdatePlaylist.ts b/src/funcs/playlistsUpdatePlaylist.ts
index 6a877524..4ef41c5b 100644
--- a/src/funcs/playlistsUpdatePlaylist.ts
+++ b/src/funcs/playlistsUpdatePlaylist.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -41,13 +42,14 @@ export function playlistsUpdatePlaylist(
operations.UpdatePlaylistResponse,
| errors.UpdatePlaylistBadRequest
| errors.UpdatePlaylistUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -71,13 +73,14 @@ async function $do(
operations.UpdatePlaylistResponse,
| errors.UpdatePlaylistBadRequest
| errors.UpdatePlaylistUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -175,20 +178,21 @@ async function $do(
operations.UpdatePlaylistResponse,
| errors.UpdatePlaylistBadRequest
| errors.UpdatePlaylistUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | 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, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/playlistsUploadPlaylist.ts b/src/funcs/playlistsUploadPlaylist.ts
index 0924db31..6ff0e944 100644
--- a/src/funcs/playlistsUploadPlaylist.ts
+++ b/src/funcs/playlistsUploadPlaylist.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -41,13 +42,14 @@ export function playlistsUploadPlaylist(
operations.UploadPlaylistResponse,
| errors.UploadPlaylistBadRequest
| errors.UploadPlaylistUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -71,13 +73,14 @@ async function $do(
operations.UploadPlaylistResponse,
| errors.UploadPlaylistBadRequest
| errors.UploadPlaylistUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -169,20 +172,21 @@ async function $do(
operations.UploadPlaylistResponse,
| errors.UploadPlaylistBadRequest
| errors.UploadPlaylistUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | 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, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/plexGetCompanionsData.ts b/src/funcs/plexGetCompanionsData.ts
index 011031b5..4db6ec77 100644
--- a/src/funcs/plexGetCompanionsData.ts
+++ b/src/funcs/plexGetCompanionsData.ts
@@ -16,7 +16,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { 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";
@@ -37,13 +38,14 @@ export function plexGetCompanionsData(
operations.GetCompanionsDataResponse,
| errors.GetCompanionsDataBadRequest
| errors.GetCompanionsDataUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -61,13 +63,14 @@ async function $do(
operations.GetCompanionsDataResponse,
| errors.GetCompanionsDataBadRequest
| errors.GetCompanionsDataUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -139,13 +142,14 @@ async function $do(
operations.GetCompanionsDataResponse,
| errors.GetCompanionsDataBadRequest
| errors.GetCompanionsDataUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetCompanionsDataResponse$inboundSchema, {
key: "responseBodies",
@@ -154,7 +158,7 @@ async function $do(
M.jsonErr(401, errors.GetCompanionsDataUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/plexGetGeoData.ts b/src/funcs/plexGetGeoData.ts
index 62ef4f00..963fb64d 100644
--- a/src/funcs/plexGetGeoData.ts
+++ b/src/funcs/plexGetGeoData.ts
@@ -15,7 +15,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { 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";
@@ -36,13 +37,14 @@ export function plexGetGeoData(
operations.GetGeoDataResponse,
| errors.GetGeoDataBadRequest
| errors.GetGeoDataUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -60,13 +62,14 @@ async function $do(
operations.GetGeoDataResponse,
| errors.GetGeoDataBadRequest
| errors.GetGeoDataUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -131,13 +134,14 @@ async function $do(
operations.GetGeoDataResponse,
| errors.GetGeoDataBadRequest
| errors.GetGeoDataUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetGeoDataResponse$inboundSchema, {
key: "GeoData",
@@ -146,7 +150,7 @@ async function $do(
M.jsonErr(401, errors.GetGeoDataUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/plexGetHomeData.ts b/src/funcs/plexGetHomeData.ts
index 59b23a4c..4c73b8f6 100644
--- a/src/funcs/plexGetHomeData.ts
+++ b/src/funcs/plexGetHomeData.ts
@@ -16,7 +16,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -36,13 +37,14 @@ export function plexGetHomeData(
operations.GetHomeDataResponse,
| errors.GetHomeDataBadRequest
| errors.GetHomeDataUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -60,13 +62,14 @@ async function $do(
operations.GetHomeDataResponse,
| errors.GetHomeDataBadRequest
| errors.GetHomeDataUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -133,13 +136,14 @@ async function $do(
operations.GetHomeDataResponse,
| errors.GetHomeDataBadRequest
| errors.GetHomeDataUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetHomeDataResponse$inboundSchema, {
key: "object",
@@ -148,7 +152,7 @@ async function $do(
M.jsonErr(401, errors.GetHomeDataUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/plexGetPin.ts b/src/funcs/plexGetPin.ts
index 9c9bd032..80de40e5 100644
--- a/src/funcs/plexGetPin.ts
+++ b/src/funcs/plexGetPin.ts
@@ -17,7 +17,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { 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";
@@ -38,13 +39,14 @@ export function plexGetPin(
Result<
operations.GetPinResponse,
| errors.GetPinBadRequest
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -63,13 +65,14 @@ async function $do(
Result<
operations.GetPinResponse,
| errors.GetPinBadRequest
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -171,13 +174,14 @@ async function $do(
const [result] = await M.match<
operations.GetPinResponse,
| errors.GetPinBadRequest
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(201, operations.GetPinResponse$inboundSchema, {
key: "AuthPinContainer",
@@ -185,7 +189,7 @@ async function $do(
M.jsonErr(400, errors.GetPinBadRequest$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/plexGetServerResources.ts b/src/funcs/plexGetServerResources.ts
index c9bd0c87..646148ef 100644
--- a/src/funcs/plexGetServerResources.ts
+++ b/src/funcs/plexGetServerResources.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { 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";
@@ -43,13 +44,14 @@ export function plexGetServerResources(
operations.GetServerResourcesResponse,
| errors.GetServerResourcesBadRequest
| errors.GetServerResourcesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -75,13 +77,14 @@ async function $do(
operations.GetServerResourcesResponse,
| errors.GetServerResourcesBadRequest
| errors.GetServerResourcesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -184,13 +187,14 @@ async function $do(
operations.GetServerResourcesResponse,
| errors.GetServerResourcesBadRequest
| errors.GetServerResourcesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetServerResourcesResponse$inboundSchema, {
key: "PlexDevices",
@@ -199,7 +203,7 @@ async function $do(
M.jsonErr(401, errors.GetServerResourcesUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/plexGetTokenByPinId.ts b/src/funcs/plexGetTokenByPinId.ts
index 1b51fecc..c140dfa6 100644
--- a/src/funcs/plexGetTokenByPinId.ts
+++ b/src/funcs/plexGetTokenByPinId.ts
@@ -17,7 +17,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { 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";
@@ -39,13 +40,14 @@ export function plexGetTokenByPinId(
operations.GetTokenByPinIdResponse,
| errors.GetTokenByPinIdBadRequest
| errors.GetTokenByPinIdResponseBody
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -65,13 +67,14 @@ async function $do(
operations.GetTokenByPinIdResponse,
| errors.GetTokenByPinIdBadRequest
| errors.GetTokenByPinIdResponseBody
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -176,13 +179,14 @@ async function $do(
operations.GetTokenByPinIdResponse,
| errors.GetTokenByPinIdBadRequest
| errors.GetTokenByPinIdResponseBody
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetTokenByPinIdResponse$inboundSchema, {
key: "AuthPinContainer",
@@ -191,7 +195,7 @@ async function $do(
M.jsonErr(404, errors.GetTokenByPinIdResponseBody$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/plexGetUserFriends.ts b/src/funcs/plexGetUserFriends.ts
index 7f9dabec..24f0a5de 100644
--- a/src/funcs/plexGetUserFriends.ts
+++ b/src/funcs/plexGetUserFriends.ts
@@ -16,7 +16,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { 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";
@@ -37,13 +38,14 @@ export function plexGetUserFriends(
operations.GetUserFriendsResponse,
| errors.GetUserFriendsBadRequest
| errors.GetUserFriendsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -61,13 +63,14 @@ async function $do(
operations.GetUserFriendsResponse,
| errors.GetUserFriendsBadRequest
| errors.GetUserFriendsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -137,13 +140,14 @@ async function $do(
operations.GetUserFriendsResponse,
| errors.GetUserFriendsBadRequest
| errors.GetUserFriendsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetUserFriendsResponse$inboundSchema, {
key: "Friends",
@@ -152,7 +156,7 @@ async function $do(
M.jsonErr(401, errors.GetUserFriendsUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/searchGetSearchResults.ts b/src/funcs/searchGetSearchResults.ts
index 17c0e3fa..1e41ed06 100644
--- a/src/funcs/searchGetSearchResults.ts
+++ b/src/funcs/searchGetSearchResults.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -39,13 +40,14 @@ export function searchGetSearchResults(
operations.GetSearchResultsResponse,
| errors.GetSearchResultsBadRequest
| errors.GetSearchResultsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -65,13 +67,14 @@ async function $do(
operations.GetSearchResultsResponse,
| errors.GetSearchResultsBadRequest
| errors.GetSearchResultsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -159,13 +162,14 @@ async function $do(
operations.GetSearchResultsResponse,
| errors.GetSearchResultsBadRequest
| errors.GetSearchResultsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetSearchResultsResponse$inboundSchema, {
key: "object",
@@ -174,7 +178,7 @@ async function $do(
M.jsonErr(401, errors.GetSearchResultsUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/searchPerformSearch.ts b/src/funcs/searchPerformSearch.ts
index babd92e5..26a358de 100644
--- a/src/funcs/searchPerformSearch.ts
+++ b/src/funcs/searchPerformSearch.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -52,13 +53,14 @@ export function searchPerformSearch(
operations.PerformSearchResponse,
| errors.PerformSearchBadRequest
| errors.PerformSearchUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -82,13 +84,14 @@ async function $do(
operations.PerformSearchResponse,
| errors.PerformSearchBadRequest
| errors.PerformSearchUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -180,20 +183,21 @@ async function $do(
operations.PerformSearchResponse,
| errors.PerformSearchBadRequest
| errors.PerformSearchUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | 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, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/searchPerformVoiceSearch.ts b/src/funcs/searchPerformVoiceSearch.ts
index a9721f4e..51f3a6a7 100644
--- a/src/funcs/searchPerformVoiceSearch.ts
+++ b/src/funcs/searchPerformVoiceSearch.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -44,13 +45,14 @@ export function searchPerformVoiceSearch(
operations.PerformVoiceSearchResponse,
| errors.PerformVoiceSearchBadRequest
| errors.PerformVoiceSearchUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -74,13 +76,14 @@ async function $do(
operations.PerformVoiceSearchResponse,
| errors.PerformVoiceSearchBadRequest
| errors.PerformVoiceSearchUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -172,20 +175,21 @@ async function $do(
operations.PerformVoiceSearchResponse,
| errors.PerformVoiceSearchBadRequest
| errors.PerformVoiceSearchUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | 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, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/serverGetAvailableClients.ts b/src/funcs/serverGetAvailableClients.ts
index 0db85f5c..acf929b7 100644
--- a/src/funcs/serverGetAvailableClients.ts
+++ b/src/funcs/serverGetAvailableClients.ts
@@ -16,7 +16,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -36,13 +37,14 @@ export function serverGetAvailableClients(
operations.GetAvailableClientsResponse,
| errors.GetAvailableClientsBadRequest
| errors.GetAvailableClientsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -60,13 +62,14 @@ async function $do(
operations.GetAvailableClientsResponse,
| errors.GetAvailableClientsBadRequest
| errors.GetAvailableClientsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -133,13 +136,14 @@ async function $do(
operations.GetAvailableClientsResponse,
| errors.GetAvailableClientsBadRequest
| errors.GetAvailableClientsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetAvailableClientsResponse$inboundSchema, {
key: "object",
@@ -148,7 +152,7 @@ async function $do(
M.jsonErr(401, errors.GetAvailableClientsUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/serverGetDevices.ts b/src/funcs/serverGetDevices.ts
index eeb08394..878a7b0d 100644
--- a/src/funcs/serverGetDevices.ts
+++ b/src/funcs/serverGetDevices.ts
@@ -16,7 +16,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -36,13 +37,14 @@ export function serverGetDevices(
operations.GetDevicesResponse,
| errors.GetDevicesBadRequest
| errors.GetDevicesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -60,13 +62,14 @@ async function $do(
operations.GetDevicesResponse,
| errors.GetDevicesBadRequest
| errors.GetDevicesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -133,20 +136,21 @@ async function $do(
operations.GetDevicesResponse,
| errors.GetDevicesBadRequest
| errors.GetDevicesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | 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, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/serverGetMediaProviders.ts b/src/funcs/serverGetMediaProviders.ts
index 92dd12a9..9702482e 100644
--- a/src/funcs/serverGetMediaProviders.ts
+++ b/src/funcs/serverGetMediaProviders.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -39,13 +40,14 @@ export function serverGetMediaProviders(
operations.GetMediaProvidersResponse,
| errors.GetMediaProvidersBadRequest
| errors.GetMediaProvidersUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -65,13 +67,14 @@ async function $do(
operations.GetMediaProvidersResponse,
| errors.GetMediaProvidersBadRequest
| errors.GetMediaProvidersUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -158,13 +161,14 @@ async function $do(
operations.GetMediaProvidersResponse,
| errors.GetMediaProvidersBadRequest
| errors.GetMediaProvidersUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetMediaProvidersResponse$inboundSchema, {
key: "object",
@@ -173,7 +177,7 @@ async function $do(
M.jsonErr(401, errors.GetMediaProvidersUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/serverGetMyPlexAccount.ts b/src/funcs/serverGetMyPlexAccount.ts
index 3cfbe328..8f5c7934 100644
--- a/src/funcs/serverGetMyPlexAccount.ts
+++ b/src/funcs/serverGetMyPlexAccount.ts
@@ -16,7 +16,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -36,13 +37,14 @@ export function serverGetMyPlexAccount(
operations.GetMyPlexAccountResponse,
| errors.GetMyPlexAccountBadRequest
| errors.GetMyPlexAccountUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -60,13 +62,14 @@ async function $do(
operations.GetMyPlexAccountResponse,
| errors.GetMyPlexAccountBadRequest
| errors.GetMyPlexAccountUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -133,13 +136,14 @@ async function $do(
operations.GetMyPlexAccountResponse,
| errors.GetMyPlexAccountBadRequest
| errors.GetMyPlexAccountUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetMyPlexAccountResponse$inboundSchema, {
key: "object",
@@ -148,7 +152,7 @@ async function $do(
M.jsonErr(401, errors.GetMyPlexAccountUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/serverGetResizedPhoto.ts b/src/funcs/serverGetResizedPhoto.ts
index 359696ef..e950c72f 100644
--- a/src/funcs/serverGetResizedPhoto.ts
+++ b/src/funcs/serverGetResizedPhoto.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -39,13 +40,14 @@ export function serverGetResizedPhoto(
operations.GetResizedPhotoResponse,
| errors.GetResizedPhotoBadRequest
| errors.GetResizedPhotoUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -65,13 +67,14 @@ async function $do(
operations.GetResizedPhotoResponse,
| errors.GetResizedPhotoBadRequest
| errors.GetResizedPhotoUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -161,20 +164,21 @@ async function $do(
operations.GetResizedPhotoResponse,
| errors.GetResizedPhotoBadRequest
| errors.GetResizedPhotoUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | 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, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/serverGetServerCapabilities.ts b/src/funcs/serverGetServerCapabilities.ts
index a2e62184..c8688014 100644
--- a/src/funcs/serverGetServerCapabilities.ts
+++ b/src/funcs/serverGetServerCapabilities.ts
@@ -16,7 +16,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -36,13 +37,14 @@ export function serverGetServerCapabilities(
operations.GetServerCapabilitiesResponse,
| errors.GetServerCapabilitiesBadRequest
| errors.GetServerCapabilitiesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -60,13 +62,14 @@ async function $do(
operations.GetServerCapabilitiesResponse,
| errors.GetServerCapabilitiesBadRequest
| errors.GetServerCapabilitiesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -133,13 +136,14 @@ async function $do(
operations.GetServerCapabilitiesResponse,
| errors.GetServerCapabilitiesBadRequest
| errors.GetServerCapabilitiesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetServerCapabilitiesResponse$inboundSchema, {
key: "object",
@@ -148,7 +152,7 @@ async function $do(
M.jsonErr(401, errors.GetServerCapabilitiesUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/serverGetServerIdentity.ts b/src/funcs/serverGetServerIdentity.ts
index 4ef6ebff..491b1828 100644
--- a/src/funcs/serverGetServerIdentity.ts
+++ b/src/funcs/serverGetServerIdentity.ts
@@ -15,7 +15,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -34,13 +35,14 @@ export function serverGetServerIdentity(
Result<
operations.GetServerIdentityResponse,
| errors.GetServerIdentityRequestTimeout
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -57,13 +59,14 @@ async function $do(
Result<
operations.GetServerIdentityResponse,
| errors.GetServerIdentityRequestTimeout
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -124,13 +127,14 @@ async function $do(
const [result] = await M.match<
operations.GetServerIdentityResponse,
| errors.GetServerIdentityRequestTimeout
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetServerIdentityResponse$inboundSchema, {
key: "object",
@@ -138,7 +142,7 @@ async function $do(
M.jsonErr(408, errors.GetServerIdentityRequestTimeout$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/serverGetServerList.ts b/src/funcs/serverGetServerList.ts
index 10d59b40..18436cf5 100644
--- a/src/funcs/serverGetServerList.ts
+++ b/src/funcs/serverGetServerList.ts
@@ -16,7 +16,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -36,13 +37,14 @@ export function serverGetServerList(
operations.GetServerListResponse,
| errors.GetServerListBadRequest
| errors.GetServerListUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -60,13 +62,14 @@ async function $do(
operations.GetServerListResponse,
| errors.GetServerListBadRequest
| errors.GetServerListUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -133,13 +136,14 @@ async function $do(
operations.GetServerListResponse,
| errors.GetServerListBadRequest
| errors.GetServerListUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetServerListResponse$inboundSchema, {
key: "object",
@@ -148,7 +152,7 @@ async function $do(
M.jsonErr(401, errors.GetServerListUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/serverGetServerPreferences.ts b/src/funcs/serverGetServerPreferences.ts
index 9ab8b4cf..5305dd23 100644
--- a/src/funcs/serverGetServerPreferences.ts
+++ b/src/funcs/serverGetServerPreferences.ts
@@ -16,7 +16,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -36,13 +37,14 @@ export function serverGetServerPreferences(
operations.GetServerPreferencesResponse,
| errors.GetServerPreferencesBadRequest
| errors.GetServerPreferencesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -60,13 +62,14 @@ async function $do(
operations.GetServerPreferencesResponse,
| errors.GetServerPreferencesBadRequest
| errors.GetServerPreferencesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -133,13 +136,14 @@ async function $do(
operations.GetServerPreferencesResponse,
| errors.GetServerPreferencesBadRequest
| errors.GetServerPreferencesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetServerPreferencesResponse$inboundSchema, {
key: "object",
@@ -148,7 +152,7 @@ async function $do(
M.jsonErr(401, errors.GetServerPreferencesUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/sessionsGetSessionHistory.ts b/src/funcs/sessionsGetSessionHistory.ts
index 50897a20..43825876 100644
--- a/src/funcs/sessionsGetSessionHistory.ts
+++ b/src/funcs/sessionsGetSessionHistory.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -42,13 +43,14 @@ export function sessionsGetSessionHistory(
operations.GetSessionHistoryResponse,
| errors.GetSessionHistoryBadRequest
| errors.GetSessionHistoryUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -74,13 +76,14 @@ async function $do(
operations.GetSessionHistoryResponse,
| errors.GetSessionHistoryBadRequest
| errors.GetSessionHistoryUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -174,13 +177,14 @@ async function $do(
operations.GetSessionHistoryResponse,
| errors.GetSessionHistoryBadRequest
| errors.GetSessionHistoryUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetSessionHistoryResponse$inboundSchema, {
key: "object",
@@ -189,7 +193,7 @@ async function $do(
M.jsonErr(401, errors.GetSessionHistoryUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/sessionsGetSessions.ts b/src/funcs/sessionsGetSessions.ts
index f3112fe2..5e5151fd 100644
--- a/src/funcs/sessionsGetSessions.ts
+++ b/src/funcs/sessionsGetSessions.ts
@@ -16,7 +16,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -36,13 +37,14 @@ export function sessionsGetSessions(
operations.GetSessionsResponse,
| errors.GetSessionsBadRequest
| errors.GetSessionsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -60,13 +62,14 @@ async function $do(
operations.GetSessionsResponse,
| errors.GetSessionsBadRequest
| errors.GetSessionsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -133,13 +136,14 @@ async function $do(
operations.GetSessionsResponse,
| errors.GetSessionsBadRequest
| errors.GetSessionsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetSessionsResponse$inboundSchema, {
key: "object",
@@ -148,7 +152,7 @@ async function $do(
M.jsonErr(401, errors.GetSessionsUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/sessionsGetTranscodeSessions.ts b/src/funcs/sessionsGetTranscodeSessions.ts
index 6327fe16..576a075f 100644
--- a/src/funcs/sessionsGetTranscodeSessions.ts
+++ b/src/funcs/sessionsGetTranscodeSessions.ts
@@ -16,7 +16,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -36,13 +37,14 @@ export function sessionsGetTranscodeSessions(
operations.GetTranscodeSessionsResponse,
| errors.GetTranscodeSessionsBadRequest
| errors.GetTranscodeSessionsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -60,13 +62,14 @@ async function $do(
operations.GetTranscodeSessionsResponse,
| errors.GetTranscodeSessionsBadRequest
| errors.GetTranscodeSessionsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -133,13 +136,14 @@ async function $do(
operations.GetTranscodeSessionsResponse,
| errors.GetTranscodeSessionsBadRequest
| errors.GetTranscodeSessionsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetTranscodeSessionsResponse$inboundSchema, {
key: "object",
@@ -148,7 +152,7 @@ async function $do(
M.jsonErr(401, errors.GetTranscodeSessionsUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/sessionsStopTranscodeSession.ts b/src/funcs/sessionsStopTranscodeSession.ts
index 92b69783..5c897f89 100644
--- a/src/funcs/sessionsStopTranscodeSession.ts
+++ b/src/funcs/sessionsStopTranscodeSession.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -39,13 +40,14 @@ export function sessionsStopTranscodeSession(
operations.StopTranscodeSessionResponse,
| errors.StopTranscodeSessionBadRequest
| errors.StopTranscodeSessionUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -65,13 +67,14 @@ async function $do(
operations.StopTranscodeSessionResponse,
| errors.StopTranscodeSessionBadRequest
| errors.StopTranscodeSessionUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -162,20 +165,21 @@ async function $do(
operations.StopTranscodeSessionResponse,
| errors.StopTranscodeSessionBadRequest
| errors.StopTranscodeSessionUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | 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, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/statisticsGetBandwidthStatistics.ts b/src/funcs/statisticsGetBandwidthStatistics.ts
index 0200cea1..ebd7ad80 100644
--- a/src/funcs/statisticsGetBandwidthStatistics.ts
+++ b/src/funcs/statisticsGetBandwidthStatistics.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -39,13 +40,14 @@ export function statisticsGetBandwidthStatistics(
operations.GetBandwidthStatisticsResponse,
| errors.GetBandwidthStatisticsBadRequest
| errors.GetBandwidthStatisticsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -65,13 +67,14 @@ async function $do(
operations.GetBandwidthStatisticsResponse,
| errors.GetBandwidthStatisticsBadRequest
| errors.GetBandwidthStatisticsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -160,13 +163,14 @@ async function $do(
operations.GetBandwidthStatisticsResponse,
| errors.GetBandwidthStatisticsBadRequest
| errors.GetBandwidthStatisticsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetBandwidthStatisticsResponse$inboundSchema, {
key: "object",
@@ -175,7 +179,7 @@ async function $do(
M.jsonErr(401, errors.GetBandwidthStatisticsUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/statisticsGetResourcesStatistics.ts b/src/funcs/statisticsGetResourcesStatistics.ts
index f9765f0d..c100d8c3 100644
--- a/src/funcs/statisticsGetResourcesStatistics.ts
+++ b/src/funcs/statisticsGetResourcesStatistics.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -39,13 +40,14 @@ export function statisticsGetResourcesStatistics(
operations.GetResourcesStatisticsResponse,
| errors.GetResourcesStatisticsBadRequest
| errors.GetResourcesStatisticsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -65,13 +67,14 @@ async function $do(
operations.GetResourcesStatisticsResponse,
| errors.GetResourcesStatisticsBadRequest
| errors.GetResourcesStatisticsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -160,13 +163,14 @@ async function $do(
operations.GetResourcesStatisticsResponse,
| errors.GetResourcesStatisticsBadRequest
| errors.GetResourcesStatisticsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetResourcesStatisticsResponse$inboundSchema, {
key: "object",
@@ -175,7 +179,7 @@ async function $do(
M.jsonErr(401, errors.GetResourcesStatisticsUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/statisticsGetStatistics.ts b/src/funcs/statisticsGetStatistics.ts
index 7e122eb8..5979ec84 100644
--- a/src/funcs/statisticsGetStatistics.ts
+++ b/src/funcs/statisticsGetStatistics.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -39,13 +40,14 @@ export function statisticsGetStatistics(
operations.GetStatisticsResponse,
| errors.GetStatisticsBadRequest
| errors.GetStatisticsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -65,13 +67,14 @@ async function $do(
operations.GetStatisticsResponse,
| errors.GetStatisticsBadRequest
| errors.GetStatisticsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -159,13 +162,14 @@ async function $do(
operations.GetStatisticsResponse,
| errors.GetStatisticsBadRequest
| errors.GetStatisticsUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetStatisticsResponse$inboundSchema, {
key: "object",
@@ -174,7 +178,7 @@ async function $do(
M.jsonErr(401, errors.GetStatisticsUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/updaterApplyUpdates.ts b/src/funcs/updaterApplyUpdates.ts
index 520e344d..f342af39 100644
--- a/src/funcs/updaterApplyUpdates.ts
+++ b/src/funcs/updaterApplyUpdates.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -40,13 +41,14 @@ export function updaterApplyUpdates(
operations.ApplyUpdatesResponse,
| errors.ApplyUpdatesBadRequest
| errors.ApplyUpdatesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -68,13 +70,14 @@ async function $do(
operations.ApplyUpdatesResponse,
| errors.ApplyUpdatesBadRequest
| errors.ApplyUpdatesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -164,20 +167,21 @@ async function $do(
operations.ApplyUpdatesResponse,
| errors.ApplyUpdatesBadRequest
| errors.ApplyUpdatesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.nil(200, operations.ApplyUpdatesResponse$inboundSchema),
M.jsonErr(400, errors.ApplyUpdatesBadRequest$inboundSchema),
M.jsonErr(401, errors.ApplyUpdatesUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail([500, "5XX"]),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/updaterCheckForUpdates.ts b/src/funcs/updaterCheckForUpdates.ts
index c936735d..4342ce8d 100644
--- a/src/funcs/updaterCheckForUpdates.ts
+++ b/src/funcs/updaterCheckForUpdates.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -39,13 +40,14 @@ export function updaterCheckForUpdates(
operations.CheckForUpdatesResponse,
| errors.CheckForUpdatesBadRequest
| errors.CheckForUpdatesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -65,13 +67,14 @@ async function $do(
operations.CheckForUpdatesResponse,
| errors.CheckForUpdatesBadRequest
| errors.CheckForUpdatesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -159,20 +162,21 @@ async function $do(
operations.CheckForUpdatesResponse,
| errors.CheckForUpdatesBadRequest
| errors.CheckForUpdatesUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | 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, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/updaterGetUpdateStatus.ts b/src/funcs/updaterGetUpdateStatus.ts
index d6e39cb2..e00b33c1 100644
--- a/src/funcs/updaterGetUpdateStatus.ts
+++ b/src/funcs/updaterGetUpdateStatus.ts
@@ -16,7 +16,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -36,13 +37,14 @@ export function updaterGetUpdateStatus(
operations.GetUpdateStatusResponse,
| errors.GetUpdateStatusBadRequest
| errors.GetUpdateStatusUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -60,13 +62,14 @@ async function $do(
operations.GetUpdateStatusResponse,
| errors.GetUpdateStatusBadRequest
| errors.GetUpdateStatusUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -133,13 +136,14 @@ async function $do(
operations.GetUpdateStatusResponse,
| errors.GetUpdateStatusBadRequest
| errors.GetUpdateStatusUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetUpdateStatusResponse$inboundSchema, {
key: "object",
@@ -148,7 +152,7 @@ async function $do(
M.jsonErr(401, errors.GetUpdateStatusUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/usersGetUsers.ts b/src/funcs/usersGetUsers.ts
index ccb2caab..a0ad3c7f 100644
--- a/src/funcs/usersGetUsers.ts
+++ b/src/funcs/usersGetUsers.ts
@@ -17,7 +17,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { 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";
@@ -39,13 +40,14 @@ export function usersGetUsers(
operations.GetUsersResponse,
| errors.GetUsersBadRequest
| errors.GetUsersUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -65,13 +67,14 @@ async function $do(
operations.GetUsersResponse,
| errors.GetUsersBadRequest
| errors.GetUsersUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -206,13 +209,14 @@ async function $do(
operations.GetUsersResponse,
| errors.GetUsersBadRequest
| errors.GetUsersUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.bytes(200, operations.GetUsersResponse$inboundSchema, {
ctype: "application/xml",
@@ -222,7 +226,7 @@ async function $do(
M.jsonErr(401, errors.GetUsersUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/videoGetTimeline.ts b/src/funcs/videoGetTimeline.ts
index 946e5ac3..d8e24b74 100644
--- a/src/funcs/videoGetTimeline.ts
+++ b/src/funcs/videoGetTimeline.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -39,13 +40,14 @@ export function videoGetTimeline(
operations.GetTimelineResponse,
| errors.GetTimelineBadRequest
| errors.GetTimelineUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -65,13 +67,14 @@ async function $do(
operations.GetTimelineResponse,
| errors.GetTimelineBadRequest
| errors.GetTimelineUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -164,20 +167,21 @@ async function $do(
operations.GetTimelineResponse,
| errors.GetTimelineBadRequest
| errors.GetTimelineUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | 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, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/videoStartUniversalTranscode.ts b/src/funcs/videoStartUniversalTranscode.ts
index 10c93a59..071e8fe9 100644
--- a/src/funcs/videoStartUniversalTranscode.ts
+++ b/src/funcs/videoStartUniversalTranscode.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { PlexAPIError } from "../sdk/models/errors/plexapierror.js";
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import * as operations from "../sdk/models/operations/index.js";
import { APICall, APIPromise } from "../sdk/types/async.js";
@@ -39,13 +40,14 @@ export function videoStartUniversalTranscode(
operations.StartUniversalTranscodeResponse,
| errors.StartUniversalTranscodeBadRequest
| errors.StartUniversalTranscodeUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -65,13 +67,14 @@ async function $do(
operations.StartUniversalTranscodeResponse,
| errors.StartUniversalTranscodeBadRequest
| errors.StartUniversalTranscodeUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -171,20 +174,21 @@ async function $do(
operations.StartUniversalTranscodeResponse,
| errors.StartUniversalTranscodeBadRequest
| errors.StartUniversalTranscodeUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | 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, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/funcs/watchlistGetWatchList.ts b/src/funcs/watchlistGetWatchList.ts
index 1bb2965a..06ba13eb 100644
--- a/src/funcs/watchlistGetWatchList.ts
+++ b/src/funcs/watchlistGetWatchList.ts
@@ -18,7 +18,8 @@ import {
UnexpectedClientError,
} from "../sdk/models/errors/httpclienterrors.js";
import * as errors from "../sdk/models/errors/index.js";
-import { SDKError } from "../sdk/models/errors/sdkerror.js";
+import { 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";
@@ -40,13 +41,14 @@ export function watchlistGetWatchList(
operations.GetWatchListResponse,
| errors.GetWatchListBadRequest
| errors.GetWatchListUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>
> {
return new APIPromise($do(
@@ -66,13 +68,14 @@ async function $do(
operations.GetWatchListResponse,
| errors.GetWatchListBadRequest
| errors.GetWatchListUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>,
APICall,
]
@@ -176,13 +179,14 @@ async function $do(
operations.GetWatchListResponse,
| errors.GetWatchListBadRequest
| errors.GetWatchListUnauthorized
- | SDKError
- | SDKValidationError
- | UnexpectedClientError
- | InvalidRequestError
+ | PlexAPIError
+ | ResponseValidationError
+ | ConnectionError
| RequestAbortedError
| RequestTimeoutError
- | ConnectionError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
>(
M.json(200, operations.GetWatchListResponse$inboundSchema, {
key: "object",
@@ -191,7 +195,7 @@ async function $do(
M.jsonErr(401, errors.GetWatchListUnauthorized$inboundSchema),
M.fail("4XX"),
M.fail("5XX"),
- )(response, { extraFields: responseFields });
+ )(response, req, { extraFields: responseFields });
if (!result.ok) {
return [result, { status: "complete", request: req, response }];
}
diff --git a/src/lib/config.ts b/src/lib/config.ts
index 53cce7fe..21246729 100644
--- a/src/lib/config.ts
+++ b/src/lib/config.ts
@@ -94,7 +94,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "0.0.3",
- sdkVersion: "0.38.0",
- genVersion: "2.620.2",
- userAgent: "speakeasy-sdk/typescript 0.38.0 2.620.2 0.0.3 @lukehagar/plexjs",
+ sdkVersion: "0.39.0",
+ genVersion: "2.623.0",
+ userAgent: "speakeasy-sdk/typescript 0.39.0 2.623.0 0.0.3 @lukehagar/plexjs",
} as const;
diff --git a/src/lib/matchers.ts b/src/lib/matchers.ts
index e4d0d731..993f7ac7 100644
--- a/src/lib/matchers.ts
+++ b/src/lib/matchers.ts
@@ -2,12 +2,11 @@
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
+import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
import { SDKError } from "../sdk/models/errors/sdkerror.js";
-import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
-import { Result } from "../sdk/types/fp.js";
+import { ERR, OK, Result } from "../sdk/types/fp.js";
import { matchResponse, matchStatusCode, StatusCodePredicate } from "./http.js";
import { isPlainObject } from "./is-plain-object.js";
-import { safeParse } from "./schemas.js";
export type Encoding =
| "jsonl"
@@ -176,17 +175,19 @@ export type MatchedError = Matchers extends Matcher[]
: never;
export type MatchFunc = (
response: Response,
+ request: Request,
options?: { resultKey?: string; extraFields?: Record },
) => Promise<[result: Result, raw: unknown]>;
export function match(
...matchers: Array>
-): MatchFunc {
+): MatchFunc {
return async function matchFunc(
response: Response,
+ request: Request,
options?: { resultKey?: string; extraFields?: Record },
): Promise<
- [result: Result, raw: unknown]
+ [result: Result, raw: unknown]
> {
let raw: unknown;
let matcher: Matcher | undefined;
@@ -205,21 +206,22 @@ export function match(
}
if (!matcher) {
- const responseBody = await response.text();
return [{
ok: false,
- error: new SDKError(
- "Unexpected API response status or content-type",
+ error: new SDKError("Unexpected Status or Content-Type", {
response,
- responseBody,
- ),
- }, responseBody];
+ request,
+ body: await response.text().catch(() => ""),
+ }),
+ }, raw];
}
const encoding = matcher.enc;
+ let body = "";
switch (encoding) {
case "json":
- raw = await response.json();
+ body = await response.text();
+ raw = JSON.parse(body);
break;
case "jsonl":
raw = response.body;
@@ -231,16 +233,19 @@ export function match(
raw = response.body;
break;
case "text":
- raw = await response.text();
+ body = await response.text();
+ raw = body;
break;
case "sse":
raw = response.body;
break;
case "nil":
- raw = await discardResponseBody(response);
+ body = await response.text();
+ raw = undefined;
break;
case "fail":
- raw = await response.text();
+ body = await response.text();
+ raw = body;
break;
default:
encoding satisfies never;
@@ -250,11 +255,7 @@ export function match(
if (matcher.enc === "fail") {
return [{
ok: false,
- error: new SDKError(
- "API error occurred",
- response,
- typeof raw === "string" ? raw : "",
- ),
+ error: new SDKError("API error occurred", { request, response, body }),
}, raw];
}
@@ -266,6 +267,9 @@ export function match(
...options?.extraFields,
...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null),
...(isPlainObject(raw) ? raw : null),
+ request$: request,
+ response$: response,
+ body$: body,
};
} else if (resultKey) {
data = {
@@ -281,18 +285,20 @@ export function match(
}
if ("err" in matcher) {
- const result = safeParse(
+ const result = safeParseResponse(
data,
(v: unknown) => matcher.schema.parse(v),
"Response validation failed",
+ { request, response, body },
);
return [result.ok ? { ok: false, error: result.value } : result, raw];
} else {
return [
- safeParse(
+ safeParseResponse(
data,
(v: unknown) => matcher.schema.parse(v),
"Response validation failed",
+ { request, response, body },
),
raw,
];
@@ -315,25 +321,22 @@ export function unpackHeaders(headers: Headers): Record {
return out;
}
-/**
- * Discards the response body to free up resources.
- *
- * To learn why this is need, see the undici docs:
- * https://undici.nodejs.org/#/?id=garbage-collection
- */
-export async function discardResponseBody(res: Response) {
- const reader = res.body?.getReader();
- if (reader == null) {
- return;
- }
-
+function safeParseResponse(
+ rawValue: Inp,
+ fn: (value: Inp) => Out,
+ errorMessage: string,
+ httpMeta: { response: Response; request: Request; body: string },
+): Result {
try {
- let done = false;
- while (!done) {
- const res = await reader.read();
- done = res.done;
- }
- } finally {
- reader.releaseLock();
+ return OK(fn(rawValue));
+ } catch (err) {
+ return ERR(
+ new ResponseValidationError(errorMessage, {
+ cause: err,
+ rawValue,
+ rawMessage: errorMessage,
+ ...httpMeta,
+ }),
+ );
}
}
diff --git a/src/sdk/models/errors/addplaylistcontents.ts b/src/sdk/models/errors/addplaylistcontents.ts
index 803f37dd..9a85bc96 100644
--- a/src/sdk/models/errors/addplaylistcontents.ts
+++ b/src/sdk/models/errors/addplaylistcontents.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type AddPlaylistContentsUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class AddPlaylistContentsUnauthorized extends Error {
+export class AddPlaylistContentsUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: AddPlaylistContentsUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "AddPlaylistContentsUnauthorized";
}
@@ -72,25 +70,22 @@ export type AddPlaylistContentsBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class AddPlaylistContentsBadRequest extends Error {
+export class AddPlaylistContentsBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: AddPlaylistContentsBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "AddPlaylistContentsBadRequest";
}
@@ -170,13 +165,20 @@ export const AddPlaylistContentsUnauthorized$inboundSchema: z.ZodType<
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);
+ return new AddPlaylistContentsUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -289,13 +291,20 @@ export const AddPlaylistContentsBadRequest$inboundSchema: z.ZodType<
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);
+ return new AddPlaylistContentsBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/applyupdates.ts b/src/sdk/models/errors/applyupdates.ts
index 5133bb85..d7025320 100644
--- a/src/sdk/models/errors/applyupdates.ts
+++ b/src/sdk/models/errors/applyupdates.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type ApplyUpdatesUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class ApplyUpdatesUnauthorized extends Error {
+export class ApplyUpdatesUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: ApplyUpdatesUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "ApplyUpdatesUnauthorized";
}
@@ -72,25 +70,22 @@ export type ApplyUpdatesBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class ApplyUpdatesBadRequest extends Error {
+export class ApplyUpdatesBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: ApplyUpdatesBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "ApplyUpdatesBadRequest";
}
@@ -165,13 +160,20 @@ export const ApplyUpdatesUnauthorized$inboundSchema: z.ZodType<
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);
+ return new ApplyUpdatesUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -282,13 +284,20 @@ export const ApplyUpdatesBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new ApplyUpdatesBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/cancelserveractivities.ts b/src/sdk/models/errors/cancelserveractivities.ts
index c22d1694..48761ee4 100644
--- a/src/sdk/models/errors/cancelserveractivities.ts
+++ b/src/sdk/models/errors/cancelserveractivities.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type CancelServerActivitiesUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class CancelServerActivitiesUnauthorized extends Error {
+export class CancelServerActivitiesUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: CancelServerActivitiesUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "CancelServerActivitiesUnauthorized";
}
@@ -72,25 +70,22 @@ export type CancelServerActivitiesBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class CancelServerActivitiesBadRequest extends Error {
+export class CancelServerActivitiesBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: CancelServerActivitiesBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "CancelServerActivitiesBadRequest";
}
@@ -172,13 +167,20 @@ export const CancelServerActivitiesUnauthorized$inboundSchema: z.ZodType<
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);
+ return new CancelServerActivitiesUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -294,13 +296,20 @@ export const CancelServerActivitiesBadRequest$inboundSchema: z.ZodType<
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);
+ return new CancelServerActivitiesBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/checkforupdates.ts b/src/sdk/models/errors/checkforupdates.ts
index 02f9eeb4..2e8b3737 100644
--- a/src/sdk/models/errors/checkforupdates.ts
+++ b/src/sdk/models/errors/checkforupdates.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type CheckForUpdatesUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class CheckForUpdatesUnauthorized extends Error {
+export class CheckForUpdatesUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: CheckForUpdatesUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "CheckForUpdatesUnauthorized";
}
@@ -72,25 +70,22 @@ export type CheckForUpdatesBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class CheckForUpdatesBadRequest extends Error {
+export class CheckForUpdatesBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: CheckForUpdatesBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "CheckForUpdatesBadRequest";
}
@@ -167,13 +162,20 @@ export const CheckForUpdatesUnauthorized$inboundSchema: z.ZodType<
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);
+ return new CheckForUpdatesUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -284,13 +286,20 @@ export const CheckForUpdatesBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new CheckForUpdatesBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/clearplaylistcontents.ts b/src/sdk/models/errors/clearplaylistcontents.ts
index a59997c4..7c72052f 100644
--- a/src/sdk/models/errors/clearplaylistcontents.ts
+++ b/src/sdk/models/errors/clearplaylistcontents.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type ClearPlaylistContentsUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class ClearPlaylistContentsUnauthorized extends Error {
+export class ClearPlaylistContentsUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: ClearPlaylistContentsUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "ClearPlaylistContentsUnauthorized";
}
@@ -72,25 +70,22 @@ export type ClearPlaylistContentsBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class ClearPlaylistContentsBadRequest extends Error {
+export class ClearPlaylistContentsBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: ClearPlaylistContentsBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "ClearPlaylistContentsBadRequest";
}
@@ -171,13 +166,20 @@ export const ClearPlaylistContentsUnauthorized$inboundSchema: z.ZodType<
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);
+ return new ClearPlaylistContentsUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -293,13 +295,20 @@ export const ClearPlaylistContentsBadRequest$inboundSchema: z.ZodType<
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);
+ return new ClearPlaylistContentsBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/createplaylist.ts b/src/sdk/models/errors/createplaylist.ts
index 4085e919..2d476941 100644
--- a/src/sdk/models/errors/createplaylist.ts
+++ b/src/sdk/models/errors/createplaylist.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type CreatePlaylistUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class CreatePlaylistUnauthorized extends Error {
+export class CreatePlaylistUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: CreatePlaylistUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "CreatePlaylistUnauthorized";
}
@@ -72,25 +70,22 @@ export type CreatePlaylistBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class CreatePlaylistBadRequest extends Error {
+export class CreatePlaylistBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: CreatePlaylistBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "CreatePlaylistBadRequest";
}
@@ -167,13 +162,20 @@ export const CreatePlaylistUnauthorized$inboundSchema: z.ZodType<
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);
+ return new CreatePlaylistUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -285,13 +287,20 @@ export const CreatePlaylistBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new CreatePlaylistBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/deletelibrary.ts b/src/sdk/models/errors/deletelibrary.ts
index b110ca8c..01f6be1e 100644
--- a/src/sdk/models/errors/deletelibrary.ts
+++ b/src/sdk/models/errors/deletelibrary.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type DeleteLibraryUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class DeleteLibraryUnauthorized extends Error {
+export class DeleteLibraryUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: DeleteLibraryUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "DeleteLibraryUnauthorized";
}
@@ -72,25 +70,22 @@ export type DeleteLibraryBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class DeleteLibraryBadRequest extends Error {
+export class DeleteLibraryBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: DeleteLibraryBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "DeleteLibraryBadRequest";
}
@@ -165,13 +160,20 @@ export const DeleteLibraryUnauthorized$inboundSchema: z.ZodType<
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);
+ return new DeleteLibraryUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -282,13 +284,20 @@ export const DeleteLibraryBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new DeleteLibraryBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/deleteplaylist.ts b/src/sdk/models/errors/deleteplaylist.ts
index 83fced30..1dc55b44 100644
--- a/src/sdk/models/errors/deleteplaylist.ts
+++ b/src/sdk/models/errors/deleteplaylist.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type DeletePlaylistUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class DeletePlaylistUnauthorized extends Error {
+export class DeletePlaylistUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: DeletePlaylistUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "DeletePlaylistUnauthorized";
}
@@ -72,25 +70,22 @@ export type DeletePlaylistBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class DeletePlaylistBadRequest extends Error {
+export class DeletePlaylistBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: DeletePlaylistBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "DeletePlaylistBadRequest";
}
@@ -167,13 +162,20 @@ export const DeletePlaylistUnauthorized$inboundSchema: z.ZodType<
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);
+ return new DeletePlaylistUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -285,13 +287,20 @@ export const DeletePlaylistBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new DeletePlaylistBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/enablepapertrail.ts b/src/sdk/models/errors/enablepapertrail.ts
index aa5eb236..7557e18d 100644
--- a/src/sdk/models/errors/enablepapertrail.ts
+++ b/src/sdk/models/errors/enablepapertrail.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type EnablePaperTrailUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class EnablePaperTrailUnauthorized extends Error {
+export class EnablePaperTrailUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: EnablePaperTrailUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "EnablePaperTrailUnauthorized";
}
@@ -72,25 +70,22 @@ export type EnablePaperTrailBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class EnablePaperTrailBadRequest extends Error {
+export class EnablePaperTrailBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: EnablePaperTrailBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "EnablePaperTrailBadRequest";
}
@@ -165,13 +160,20 @@ export const EnablePaperTrailUnauthorized$inboundSchema: z.ZodType<
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);
+ return new EnablePaperTrailUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -283,13 +285,20 @@ export const EnablePaperTrailBadRequest$inboundSchema: z.ZodType<
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);
+ return new EnablePaperTrailBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getactorslibrary.ts b/src/sdk/models/errors/getactorslibrary.ts
index 9ea4fcd4..99ffbf05 100644
--- a/src/sdk/models/errors/getactorslibrary.ts
+++ b/src/sdk/models/errors/getactorslibrary.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetActorsLibraryUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetActorsLibraryUnauthorized extends Error {
+export class GetActorsLibraryUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetActorsLibraryUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetActorsLibraryUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetActorsLibraryBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetActorsLibraryBadRequest extends Error {
+export class GetActorsLibraryBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetActorsLibraryBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetActorsLibraryBadRequest";
}
@@ -167,13 +162,20 @@ export const GetActorsLibraryUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetActorsLibraryUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -286,13 +288,20 @@ export const GetActorsLibraryBadRequest$inboundSchema: z.ZodType<
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);
+ return new GetActorsLibraryBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getalllibraries.ts b/src/sdk/models/errors/getalllibraries.ts
index 75ce524b..309a0c42 100644
--- a/src/sdk/models/errors/getalllibraries.ts
+++ b/src/sdk/models/errors/getalllibraries.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetAllLibrariesUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetAllLibrariesUnauthorized extends Error {
+export class GetAllLibrariesUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetAllLibrariesUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetAllLibrariesUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetAllLibrariesBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetAllLibrariesBadRequest extends Error {
+export class GetAllLibrariesBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetAllLibrariesBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetAllLibrariesBadRequest";
}
@@ -167,13 +162,20 @@ export const GetAllLibrariesUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetAllLibrariesUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -284,13 +286,20 @@ export const GetAllLibrariesBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new GetAllLibrariesBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getavailableclients.ts b/src/sdk/models/errors/getavailableclients.ts
index 13eb1852..4be30c70 100644
--- a/src/sdk/models/errors/getavailableclients.ts
+++ b/src/sdk/models/errors/getavailableclients.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetAvailableClientsUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetAvailableClientsUnauthorized extends Error {
+export class GetAvailableClientsUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetAvailableClientsUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetAvailableClientsUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetAvailableClientsBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetAvailableClientsBadRequest extends Error {
+export class GetAvailableClientsBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetAvailableClientsBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetAvailableClientsBadRequest";
}
@@ -167,13 +162,20 @@ export const GetAvailableClientsUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetAvailableClientsUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -286,13 +288,20 @@ export const GetAvailableClientsBadRequest$inboundSchema: z.ZodType<
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);
+ return new GetAvailableClientsBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getbandwidthstatistics.ts b/src/sdk/models/errors/getbandwidthstatistics.ts
index 7d02a4d0..ac493c3a 100644
--- a/src/sdk/models/errors/getbandwidthstatistics.ts
+++ b/src/sdk/models/errors/getbandwidthstatistics.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetBandwidthStatisticsUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetBandwidthStatisticsUnauthorized extends Error {
+export class GetBandwidthStatisticsUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetBandwidthStatisticsUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetBandwidthStatisticsUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetBandwidthStatisticsBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetBandwidthStatisticsBadRequest extends Error {
+export class GetBandwidthStatisticsBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetBandwidthStatisticsBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetBandwidthStatisticsBadRequest";
}
@@ -172,13 +167,20 @@ export const GetBandwidthStatisticsUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetBandwidthStatisticsUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -294,13 +296,20 @@ export const GetBandwidthStatisticsBadRequest$inboundSchema: z.ZodType<
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);
+ return new GetBandwidthStatisticsBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getbannerimage.ts b/src/sdk/models/errors/getbannerimage.ts
index 12c3da21..102f0e44 100644
--- a/src/sdk/models/errors/getbannerimage.ts
+++ b/src/sdk/models/errors/getbannerimage.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetBannerImageUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetBannerImageUnauthorized extends Error {
+export class GetBannerImageUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetBannerImageUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetBannerImageUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetBannerImageBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetBannerImageBadRequest extends Error {
+export class GetBannerImageBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetBannerImageBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetBannerImageBadRequest";
}
@@ -165,13 +160,20 @@ export const GetBannerImageUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetBannerImageUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -282,13 +284,20 @@ export const GetBannerImageBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new GetBannerImageBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getbutlertasks.ts b/src/sdk/models/errors/getbutlertasks.ts
index 7cc0e553..0e1bbea8 100644
--- a/src/sdk/models/errors/getbutlertasks.ts
+++ b/src/sdk/models/errors/getbutlertasks.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetButlerTasksUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetButlerTasksUnauthorized extends Error {
+export class GetButlerTasksUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetButlerTasksUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetButlerTasksUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetButlerTasksBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetButlerTasksBadRequest extends Error {
+export class GetButlerTasksBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetButlerTasksBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetButlerTasksBadRequest";
}
@@ -165,13 +160,20 @@ export const GetButlerTasksUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetButlerTasksUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -282,13 +284,20 @@ export const GetButlerTasksBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new GetButlerTasksBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getcompanionsdata.ts b/src/sdk/models/errors/getcompanionsdata.ts
index 56fc65e9..84f6517f 100644
--- a/src/sdk/models/errors/getcompanionsdata.ts
+++ b/src/sdk/models/errors/getcompanionsdata.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetCompanionsDataUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetCompanionsDataUnauthorized extends Error {
+export class GetCompanionsDataUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetCompanionsDataUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetCompanionsDataUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetCompanionsDataBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetCompanionsDataBadRequest extends Error {
+export class GetCompanionsDataBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetCompanionsDataBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetCompanionsDataBadRequest";
}
@@ -167,13 +162,20 @@ export const GetCompanionsDataUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetCompanionsDataUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -285,13 +287,20 @@ export const GetCompanionsDataBadRequest$inboundSchema: z.ZodType<
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);
+ return new GetCompanionsDataBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getcountrieslibrary.ts b/src/sdk/models/errors/getcountrieslibrary.ts
index 7f90f8c9..df0f9ca2 100644
--- a/src/sdk/models/errors/getcountrieslibrary.ts
+++ b/src/sdk/models/errors/getcountrieslibrary.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetCountriesLibraryUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetCountriesLibraryUnauthorized extends Error {
+export class GetCountriesLibraryUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetCountriesLibraryUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetCountriesLibraryUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetCountriesLibraryBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetCountriesLibraryBadRequest extends Error {
+export class GetCountriesLibraryBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetCountriesLibraryBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetCountriesLibraryBadRequest";
}
@@ -167,13 +162,20 @@ export const GetCountriesLibraryUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetCountriesLibraryUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -286,13 +288,20 @@ export const GetCountriesLibraryBadRequest$inboundSchema: z.ZodType<
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);
+ return new GetCountriesLibraryBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getdevices.ts b/src/sdk/models/errors/getdevices.ts
index de989838..966100f6 100644
--- a/src/sdk/models/errors/getdevices.ts
+++ b/src/sdk/models/errors/getdevices.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetDevicesUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetDevicesUnauthorized extends Error {
+export class GetDevicesUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetDevicesUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetDevicesUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetDevicesBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetDevicesBadRequest extends Error {
+export class GetDevicesBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetDevicesBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetDevicesBadRequest";
}
@@ -165,13 +160,20 @@ export const GetDevicesUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetDevicesUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -282,13 +284,20 @@ export const GetDevicesBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new GetDevicesBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getfilehash.ts b/src/sdk/models/errors/getfilehash.ts
index 08e8d54d..9360bfdb 100644
--- a/src/sdk/models/errors/getfilehash.ts
+++ b/src/sdk/models/errors/getfilehash.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetFileHashUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetFileHashUnauthorized extends Error {
+export class GetFileHashUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetFileHashUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetFileHashUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetFileHashBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetFileHashBadRequest extends Error {
+export class GetFileHashBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetFileHashBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetFileHashBadRequest";
}
@@ -165,13 +160,20 @@ export const GetFileHashUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetFileHashUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -282,13 +284,20 @@ export const GetFileHashBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new GetFileHashBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getgenreslibrary.ts b/src/sdk/models/errors/getgenreslibrary.ts
index 932a6934..088f7f09 100644
--- a/src/sdk/models/errors/getgenreslibrary.ts
+++ b/src/sdk/models/errors/getgenreslibrary.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetGenresLibraryUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetGenresLibraryUnauthorized extends Error {
+export class GetGenresLibraryUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetGenresLibraryUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetGenresLibraryUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetGenresLibraryBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetGenresLibraryBadRequest extends Error {
+export class GetGenresLibraryBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetGenresLibraryBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetGenresLibraryBadRequest";
}
@@ -167,13 +162,20 @@ export const GetGenresLibraryUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetGenresLibraryUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -286,13 +288,20 @@ export const GetGenresLibraryBadRequest$inboundSchema: z.ZodType<
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);
+ return new GetGenresLibraryBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getgeodata.ts b/src/sdk/models/errors/getgeodata.ts
index 4d9b7a66..c6234616 100644
--- a/src/sdk/models/errors/getgeodata.ts
+++ b/src/sdk/models/errors/getgeodata.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetGeoDataUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetGeoDataUnauthorized extends Error {
+export class GetGeoDataUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetGeoDataUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetGeoDataUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetGeoDataBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetGeoDataBadRequest extends Error {
+export class GetGeoDataBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetGeoDataBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetGeoDataBadRequest";
}
@@ -164,13 +159,20 @@ export const GetGeoDataUnauthorized$inboundSchema: z.ZodType<
> = 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);
+ return new GetGeoDataUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -281,13 +283,20 @@ export const GetGeoDataBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new GetGeoDataBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getglobalhubs.ts b/src/sdk/models/errors/getglobalhubs.ts
index 9df10451..0e1b14c1 100644
--- a/src/sdk/models/errors/getglobalhubs.ts
+++ b/src/sdk/models/errors/getglobalhubs.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetGlobalHubsUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetGlobalHubsUnauthorized extends Error {
+export class GetGlobalHubsUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetGlobalHubsUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetGlobalHubsUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetGlobalHubsBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetGlobalHubsBadRequest extends Error {
+export class GetGlobalHubsBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetGlobalHubsBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetGlobalHubsBadRequest";
}
@@ -165,13 +160,20 @@ export const GetGlobalHubsUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetGlobalHubsUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -282,13 +284,20 @@ export const GetGlobalHubsBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new GetGlobalHubsBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/gethomedata.ts b/src/sdk/models/errors/gethomedata.ts
index 75e49b90..8709ca00 100644
--- a/src/sdk/models/errors/gethomedata.ts
+++ b/src/sdk/models/errors/gethomedata.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetHomeDataUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetHomeDataUnauthorized extends Error {
+export class GetHomeDataUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetHomeDataUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetHomeDataUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetHomeDataBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetHomeDataBadRequest extends Error {
+export class GetHomeDataBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetHomeDataBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetHomeDataBadRequest";
}
@@ -164,13 +159,20 @@ export const GetHomeDataUnauthorized$inboundSchema: z.ZodType<
> = 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);
+ return new GetHomeDataUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -281,13 +283,20 @@ export const GetHomeDataBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new GetHomeDataBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getlibrarydetails.ts b/src/sdk/models/errors/getlibrarydetails.ts
index 9ab31802..31210573 100644
--- a/src/sdk/models/errors/getlibrarydetails.ts
+++ b/src/sdk/models/errors/getlibrarydetails.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetLibraryDetailsUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetLibraryDetailsUnauthorized extends Error {
+export class GetLibraryDetailsUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetLibraryDetailsUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetLibraryDetailsUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetLibraryDetailsBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetLibraryDetailsBadRequest extends Error {
+export class GetLibraryDetailsBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetLibraryDetailsBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetLibraryDetailsBadRequest";
}
@@ -167,13 +162,20 @@ export const GetLibraryDetailsUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetLibraryDetailsUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -286,13 +288,20 @@ export const GetLibraryDetailsBadRequest$inboundSchema: z.ZodType<
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);
+ return new GetLibraryDetailsBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getlibraryhubs.ts b/src/sdk/models/errors/getlibraryhubs.ts
index ffb1a23d..a28910b7 100644
--- a/src/sdk/models/errors/getlibraryhubs.ts
+++ b/src/sdk/models/errors/getlibraryhubs.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetLibraryHubsUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetLibraryHubsUnauthorized extends Error {
+export class GetLibraryHubsUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetLibraryHubsUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetLibraryHubsUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetLibraryHubsBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetLibraryHubsBadRequest extends Error {
+export class GetLibraryHubsBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetLibraryHubsBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetLibraryHubsBadRequest";
}
@@ -165,13 +160,20 @@ export const GetLibraryHubsUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetLibraryHubsUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -282,13 +284,20 @@ export const GetLibraryHubsBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new GetLibraryHubsBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getlibraryitems.ts b/src/sdk/models/errors/getlibraryitems.ts
index a38c39b3..7dd7ded5 100644
--- a/src/sdk/models/errors/getlibraryitems.ts
+++ b/src/sdk/models/errors/getlibraryitems.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetLibraryItemsUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetLibraryItemsUnauthorized extends Error {
+export class GetLibraryItemsUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetLibraryItemsUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetLibraryItemsUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetLibraryItemsBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetLibraryItemsBadRequest extends Error {
+export class GetLibraryItemsBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetLibraryItemsBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetLibraryItemsBadRequest";
}
@@ -167,13 +162,20 @@ export const GetLibraryItemsUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetLibraryItemsUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -284,13 +286,20 @@ export const GetLibraryItemsBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new GetLibraryItemsBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getlibrarysectionsall.ts b/src/sdk/models/errors/getlibrarysectionsall.ts
index b1fc6f55..a54873ba 100644
--- a/src/sdk/models/errors/getlibrarysectionsall.ts
+++ b/src/sdk/models/errors/getlibrarysectionsall.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetLibrarySectionsAllUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetLibrarySectionsAllUnauthorized extends Error {
+export class GetLibrarySectionsAllUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetLibrarySectionsAllUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetLibrarySectionsAllUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetLibrarySectionsAllBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetLibrarySectionsAllBadRequest extends Error {
+export class GetLibrarySectionsAllBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetLibrarySectionsAllBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetLibrarySectionsAllBadRequest";
}
@@ -170,13 +165,20 @@ export const GetLibrarySectionsAllUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetLibrarySectionsAllUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -292,13 +294,20 @@ export const GetLibrarySectionsAllBadRequest$inboundSchema: z.ZodType<
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);
+ return new GetLibrarySectionsAllBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getmediametadata.ts b/src/sdk/models/errors/getmediametadata.ts
index ed247616..e63639a2 100644
--- a/src/sdk/models/errors/getmediametadata.ts
+++ b/src/sdk/models/errors/getmediametadata.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetMediaMetaDataUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetMediaMetaDataUnauthorized extends Error {
+export class GetMediaMetaDataUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetMediaMetaDataUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetMediaMetaDataUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetMediaMetaDataBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetMediaMetaDataBadRequest extends Error {
+export class GetMediaMetaDataBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetMediaMetaDataBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetMediaMetaDataBadRequest";
}
@@ -167,13 +162,20 @@ export const GetMediaMetaDataUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetMediaMetaDataUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -286,13 +288,20 @@ export const GetMediaMetaDataBadRequest$inboundSchema: z.ZodType<
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);
+ return new GetMediaMetaDataBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getmediaproviders.ts b/src/sdk/models/errors/getmediaproviders.ts
index c771b299..a1ca9d24 100644
--- a/src/sdk/models/errors/getmediaproviders.ts
+++ b/src/sdk/models/errors/getmediaproviders.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetMediaProvidersUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetMediaProvidersUnauthorized extends Error {
+export class GetMediaProvidersUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetMediaProvidersUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetMediaProvidersUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetMediaProvidersBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetMediaProvidersBadRequest extends Error {
+export class GetMediaProvidersBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetMediaProvidersBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetMediaProvidersBadRequest";
}
@@ -167,13 +162,20 @@ export const GetMediaProvidersUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetMediaProvidersUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -286,13 +288,20 @@ export const GetMediaProvidersBadRequest$inboundSchema: z.ZodType<
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);
+ return new GetMediaProvidersBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getmetadatachildren.ts b/src/sdk/models/errors/getmetadatachildren.ts
index 7a94aa8c..fb43bac8 100644
--- a/src/sdk/models/errors/getmetadatachildren.ts
+++ b/src/sdk/models/errors/getmetadatachildren.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetMetadataChildrenUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetMetadataChildrenUnauthorized extends Error {
+export class GetMetadataChildrenUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetMetadataChildrenUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetMetadataChildrenUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetMetadataChildrenBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetMetadataChildrenBadRequest extends Error {
+export class GetMetadataChildrenBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetMetadataChildrenBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetMetadataChildrenBadRequest";
}
@@ -167,13 +162,20 @@ export const GetMetadataChildrenUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetMetadataChildrenUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -286,13 +288,20 @@ export const GetMetadataChildrenBadRequest$inboundSchema: z.ZodType<
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);
+ return new GetMetadataChildrenBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getmyplexaccount.ts b/src/sdk/models/errors/getmyplexaccount.ts
index 1071f29d..6ba5d44f 100644
--- a/src/sdk/models/errors/getmyplexaccount.ts
+++ b/src/sdk/models/errors/getmyplexaccount.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetMyPlexAccountUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetMyPlexAccountUnauthorized extends Error {
+export class GetMyPlexAccountUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetMyPlexAccountUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetMyPlexAccountUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetMyPlexAccountBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetMyPlexAccountBadRequest extends Error {
+export class GetMyPlexAccountBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetMyPlexAccountBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetMyPlexAccountBadRequest";
}
@@ -167,13 +162,20 @@ export const GetMyPlexAccountUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetMyPlexAccountUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -285,13 +287,20 @@ export const GetMyPlexAccountBadRequest$inboundSchema: z.ZodType<
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);
+ return new GetMyPlexAccountBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getpin.ts b/src/sdk/models/errors/getpin.ts
index 66148965..50a9a746 100644
--- a/src/sdk/models/errors/getpin.ts
+++ b/src/sdk/models/errors/getpin.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetPinBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetPinBadRequest extends Error {
+export class GetPinBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetPinBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetPinBadRequest";
}
@@ -116,13 +114,20 @@ export const GetPinBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new GetPinBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getplaylist.ts b/src/sdk/models/errors/getplaylist.ts
index fb367e57..0331e16c 100644
--- a/src/sdk/models/errors/getplaylist.ts
+++ b/src/sdk/models/errors/getplaylist.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetPlaylistUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetPlaylistUnauthorized extends Error {
+export class GetPlaylistUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetPlaylistUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetPlaylistUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetPlaylistBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetPlaylistBadRequest extends Error {
+export class GetPlaylistBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetPlaylistBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetPlaylistBadRequest";
}
@@ -165,13 +160,20 @@ export const GetPlaylistUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetPlaylistUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -282,13 +284,20 @@ export const GetPlaylistBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new GetPlaylistBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getplaylistcontents.ts b/src/sdk/models/errors/getplaylistcontents.ts
index bf66b3e4..3fdde0f0 100644
--- a/src/sdk/models/errors/getplaylistcontents.ts
+++ b/src/sdk/models/errors/getplaylistcontents.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetPlaylistContentsUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetPlaylistContentsUnauthorized extends Error {
+export class GetPlaylistContentsUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetPlaylistContentsUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetPlaylistContentsUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetPlaylistContentsBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetPlaylistContentsBadRequest extends Error {
+export class GetPlaylistContentsBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetPlaylistContentsBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetPlaylistContentsBadRequest";
}
@@ -170,13 +165,20 @@ export const GetPlaylistContentsUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetPlaylistContentsUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -289,13 +291,20 @@ export const GetPlaylistContentsBadRequest$inboundSchema: z.ZodType<
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);
+ return new GetPlaylistContentsBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getplaylists.ts b/src/sdk/models/errors/getplaylists.ts
index af6d165b..b48ad64c 100644
--- a/src/sdk/models/errors/getplaylists.ts
+++ b/src/sdk/models/errors/getplaylists.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetPlaylistsUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetPlaylistsUnauthorized extends Error {
+export class GetPlaylistsUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetPlaylistsUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetPlaylistsUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetPlaylistsBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetPlaylistsBadRequest extends Error {
+export class GetPlaylistsBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetPlaylistsBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetPlaylistsBadRequest";
}
@@ -167,13 +162,20 @@ export const GetPlaylistsUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetPlaylistsUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -284,13 +286,20 @@ export const GetPlaylistsBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new GetPlaylistsBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getrecentlyaddedlibrary.ts b/src/sdk/models/errors/getrecentlyaddedlibrary.ts
index 64eec58f..321f5fbb 100644
--- a/src/sdk/models/errors/getrecentlyaddedlibrary.ts
+++ b/src/sdk/models/errors/getrecentlyaddedlibrary.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetRecentlyAddedLibraryUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetRecentlyAddedLibraryUnauthorized extends Error {
+export class GetRecentlyAddedLibraryUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetRecentlyAddedLibraryUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetRecentlyAddedLibraryUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetRecentlyAddedLibraryBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetRecentlyAddedLibraryBadRequest extends Error {
+export class GetRecentlyAddedLibraryBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetRecentlyAddedLibraryBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetRecentlyAddedLibraryBadRequest";
}
@@ -171,13 +166,20 @@ export const GetRecentlyAddedLibraryUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetRecentlyAddedLibraryUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -294,13 +296,20 @@ export const GetRecentlyAddedLibraryBadRequest$inboundSchema: z.ZodType<
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);
+ return new GetRecentlyAddedLibraryBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getrefreshlibrarymetadata.ts b/src/sdk/models/errors/getrefreshlibrarymetadata.ts
index b71a722b..34fb1f8d 100644
--- a/src/sdk/models/errors/getrefreshlibrarymetadata.ts
+++ b/src/sdk/models/errors/getrefreshlibrarymetadata.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetRefreshLibraryMetadataUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetRefreshLibraryMetadataUnauthorized extends Error {
+export class GetRefreshLibraryMetadataUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetRefreshLibraryMetadataUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetRefreshLibraryMetadataUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetRefreshLibraryMetadataBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetRefreshLibraryMetadataBadRequest extends Error {
+export class GetRefreshLibraryMetadataBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetRefreshLibraryMetadataBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetRefreshLibraryMetadataBadRequest";
}
@@ -172,13 +167,20 @@ export const GetRefreshLibraryMetadataUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetRefreshLibraryMetadataUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -295,13 +297,20 @@ export const GetRefreshLibraryMetadataBadRequest$inboundSchema: z.ZodType<
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);
+ return new GetRefreshLibraryMetadataBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getresizedphoto.ts b/src/sdk/models/errors/getresizedphoto.ts
index c707f6c7..d14d89d8 100644
--- a/src/sdk/models/errors/getresizedphoto.ts
+++ b/src/sdk/models/errors/getresizedphoto.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetResizedPhotoUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetResizedPhotoUnauthorized extends Error {
+export class GetResizedPhotoUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetResizedPhotoUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetResizedPhotoUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetResizedPhotoBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetResizedPhotoBadRequest extends Error {
+export class GetResizedPhotoBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetResizedPhotoBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetResizedPhotoBadRequest";
}
@@ -167,13 +162,20 @@ export const GetResizedPhotoUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetResizedPhotoUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -284,13 +286,20 @@ export const GetResizedPhotoBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new GetResizedPhotoBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getresourcesstatistics.ts b/src/sdk/models/errors/getresourcesstatistics.ts
index 95efa93f..3ac4c900 100644
--- a/src/sdk/models/errors/getresourcesstatistics.ts
+++ b/src/sdk/models/errors/getresourcesstatistics.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetResourcesStatisticsUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetResourcesStatisticsUnauthorized extends Error {
+export class GetResourcesStatisticsUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetResourcesStatisticsUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetResourcesStatisticsUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetResourcesStatisticsBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetResourcesStatisticsBadRequest extends Error {
+export class GetResourcesStatisticsBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetResourcesStatisticsBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetResourcesStatisticsBadRequest";
}
@@ -172,13 +167,20 @@ export const GetResourcesStatisticsUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetResourcesStatisticsUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -294,13 +296,20 @@ export const GetResourcesStatisticsBadRequest$inboundSchema: z.ZodType<
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);
+ return new GetResourcesStatisticsBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getsearchalllibraries.ts b/src/sdk/models/errors/getsearchalllibraries.ts
index 27854d7f..076a20f8 100644
--- a/src/sdk/models/errors/getsearchalllibraries.ts
+++ b/src/sdk/models/errors/getsearchalllibraries.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetSearchAllLibrariesUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetSearchAllLibrariesUnauthorized extends Error {
+export class GetSearchAllLibrariesUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetSearchAllLibrariesUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetSearchAllLibrariesUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetSearchAllLibrariesBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetSearchAllLibrariesBadRequest extends Error {
+export class GetSearchAllLibrariesBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetSearchAllLibrariesBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetSearchAllLibrariesBadRequest";
}
@@ -170,13 +165,20 @@ export const GetSearchAllLibrariesUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetSearchAllLibrariesUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -292,13 +294,20 @@ export const GetSearchAllLibrariesBadRequest$inboundSchema: z.ZodType<
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);
+ return new GetSearchAllLibrariesBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getsearchlibrary.ts b/src/sdk/models/errors/getsearchlibrary.ts
index 36da99b9..8f508a15 100644
--- a/src/sdk/models/errors/getsearchlibrary.ts
+++ b/src/sdk/models/errors/getsearchlibrary.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetSearchLibraryUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetSearchLibraryUnauthorized extends Error {
+export class GetSearchLibraryUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetSearchLibraryUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetSearchLibraryUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetSearchLibraryBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetSearchLibraryBadRequest extends Error {
+export class GetSearchLibraryBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetSearchLibraryBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetSearchLibraryBadRequest";
}
@@ -167,13 +162,20 @@ export const GetSearchLibraryUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetSearchLibraryUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -286,13 +288,20 @@ export const GetSearchLibraryBadRequest$inboundSchema: z.ZodType<
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);
+ return new GetSearchLibraryBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getsearchresults.ts b/src/sdk/models/errors/getsearchresults.ts
index 01292dd7..75f07210 100644
--- a/src/sdk/models/errors/getsearchresults.ts
+++ b/src/sdk/models/errors/getsearchresults.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetSearchResultsUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetSearchResultsUnauthorized extends Error {
+export class GetSearchResultsUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetSearchResultsUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetSearchResultsUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetSearchResultsBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetSearchResultsBadRequest extends Error {
+export class GetSearchResultsBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetSearchResultsBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetSearchResultsBadRequest";
}
@@ -167,13 +162,20 @@ export const GetSearchResultsUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetSearchResultsUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -285,13 +287,20 @@ export const GetSearchResultsBadRequest$inboundSchema: z.ZodType<
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);
+ return new GetSearchResultsBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getserveractivities.ts b/src/sdk/models/errors/getserveractivities.ts
index fb33c755..4fc103b2 100644
--- a/src/sdk/models/errors/getserveractivities.ts
+++ b/src/sdk/models/errors/getserveractivities.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetServerActivitiesUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetServerActivitiesUnauthorized extends Error {
+export class GetServerActivitiesUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetServerActivitiesUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetServerActivitiesUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetServerActivitiesBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetServerActivitiesBadRequest extends Error {
+export class GetServerActivitiesBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetServerActivitiesBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetServerActivitiesBadRequest";
}
@@ -171,13 +166,20 @@ export const GetServerActivitiesUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetServerActivitiesUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -290,13 +292,20 @@ export const GetServerActivitiesBadRequest$inboundSchema: z.ZodType<
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);
+ return new GetServerActivitiesBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getservercapabilities.ts b/src/sdk/models/errors/getservercapabilities.ts
index a578a281..149d1032 100644
--- a/src/sdk/models/errors/getservercapabilities.ts
+++ b/src/sdk/models/errors/getservercapabilities.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetServerCapabilitiesUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetServerCapabilitiesUnauthorized extends Error {
+export class GetServerCapabilitiesUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetServerCapabilitiesUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetServerCapabilitiesUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetServerCapabilitiesBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetServerCapabilitiesBadRequest extends Error {
+export class GetServerCapabilitiesBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetServerCapabilitiesBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetServerCapabilitiesBadRequest";
}
@@ -167,13 +162,20 @@ export const GetServerCapabilitiesUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetServerCapabilitiesUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -278,13 +280,20 @@ export const GetServerCapabilitiesBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new GetServerCapabilitiesBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getserveridentity.ts b/src/sdk/models/errors/getserveridentity.ts
index 7ee42528..fbc463de 100644
--- a/src/sdk/models/errors/getserveridentity.ts
+++ b/src/sdk/models/errors/getserveridentity.ts
@@ -4,6 +4,7 @@
import * as z from "zod";
import { remap as remap$ } from "../../../lib/primitives.js";
+import { PlexAPIError } from "./plexapierror.js";
/**
* Request Timeout
@@ -20,23 +21,20 @@ export type GetServerIdentityRequestTimeoutData = {
/**
* Request Timeout
*/
-export class GetServerIdentityRequestTimeout extends Error {
+export class GetServerIdentityRequestTimeout extends PlexAPIError {
code?: number | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetServerIdentityRequestTimeoutData;
- constructor(err: GetServerIdentityRequestTimeoutData) {
+ constructor(
+ err: GetServerIdentityRequestTimeoutData,
+ httpMeta: { response: Response; request: Request; body: string },
+ ) {
const message = err.message || "API error occurred";
- super(message);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.code != null) this.code = err.code;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetServerIdentityRequestTimeout";
}
@@ -51,13 +49,20 @@ export const GetServerIdentityRequestTimeout$inboundSchema: z.ZodType<
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);
+ return new GetServerIdentityRequestTimeout(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getserverlist.ts b/src/sdk/models/errors/getserverlist.ts
index 1e92616d..ac7e03e6 100644
--- a/src/sdk/models/errors/getserverlist.ts
+++ b/src/sdk/models/errors/getserverlist.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetServerListUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetServerListUnauthorized extends Error {
+export class GetServerListUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetServerListUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetServerListUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetServerListBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetServerListBadRequest extends Error {
+export class GetServerListBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetServerListBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetServerListBadRequest";
}
@@ -165,13 +160,20 @@ export const GetServerListUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetServerListUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -282,13 +284,20 @@ export const GetServerListBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new GetServerListBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getserverpreferences.ts b/src/sdk/models/errors/getserverpreferences.ts
index 84c28784..a110d291 100644
--- a/src/sdk/models/errors/getserverpreferences.ts
+++ b/src/sdk/models/errors/getserverpreferences.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetServerPreferencesUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetServerPreferencesUnauthorized extends Error {
+export class GetServerPreferencesUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetServerPreferencesUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetServerPreferencesUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetServerPreferencesBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetServerPreferencesBadRequest extends Error {
+export class GetServerPreferencesBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetServerPreferencesBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetServerPreferencesBadRequest";
}
@@ -167,13 +162,20 @@ export const GetServerPreferencesUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetServerPreferencesUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -286,13 +288,20 @@ export const GetServerPreferencesBadRequest$inboundSchema: z.ZodType<
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);
+ return new GetServerPreferencesBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getserverresources.ts b/src/sdk/models/errors/getserverresources.ts
index d50ea2cc..7c569e4f 100644
--- a/src/sdk/models/errors/getserverresources.ts
+++ b/src/sdk/models/errors/getserverresources.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetServerResourcesUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetServerResourcesUnauthorized extends Error {
+export class GetServerResourcesUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetServerResourcesUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetServerResourcesUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetServerResourcesBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetServerResourcesBadRequest extends Error {
+export class GetServerResourcesBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetServerResourcesBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetServerResourcesBadRequest";
}
@@ -167,13 +162,20 @@ export const GetServerResourcesUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetServerResourcesUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -285,13 +287,20 @@ export const GetServerResourcesBadRequest$inboundSchema: z.ZodType<
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);
+ return new GetServerResourcesBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getsessionhistory.ts b/src/sdk/models/errors/getsessionhistory.ts
index dd5d4f08..1eff8438 100644
--- a/src/sdk/models/errors/getsessionhistory.ts
+++ b/src/sdk/models/errors/getsessionhistory.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetSessionHistoryUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetSessionHistoryUnauthorized extends Error {
+export class GetSessionHistoryUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetSessionHistoryUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetSessionHistoryUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetSessionHistoryBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetSessionHistoryBadRequest extends Error {
+export class GetSessionHistoryBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetSessionHistoryBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetSessionHistoryBadRequest";
}
@@ -167,13 +162,20 @@ export const GetSessionHistoryUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetSessionHistoryUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -286,13 +288,20 @@ export const GetSessionHistoryBadRequest$inboundSchema: z.ZodType<
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);
+ return new GetSessionHistoryBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getsessions.ts b/src/sdk/models/errors/getsessions.ts
index 84d1def3..6353a4c9 100644
--- a/src/sdk/models/errors/getsessions.ts
+++ b/src/sdk/models/errors/getsessions.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetSessionsUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetSessionsUnauthorized extends Error {
+export class GetSessionsUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetSessionsUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetSessionsUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetSessionsBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetSessionsBadRequest extends Error {
+export class GetSessionsBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetSessionsBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetSessionsBadRequest";
}
@@ -165,13 +160,20 @@ export const GetSessionsUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetSessionsUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -282,13 +284,20 @@ export const GetSessionsBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new GetSessionsBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getsourceconnectioninformation.ts b/src/sdk/models/errors/getsourceconnectioninformation.ts
index 7b2b30d8..ad6fc82f 100644
--- a/src/sdk/models/errors/getsourceconnectioninformation.ts
+++ b/src/sdk/models/errors/getsourceconnectioninformation.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -30,27 +31,24 @@ export type GetSourceConnectionInformationUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetSourceConnectionInformationUnauthorized extends Error {
+export class GetSourceConnectionInformationUnauthorized extends PlexAPIError {
errors?:
| Array
| undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetSourceConnectionInformationUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetSourceConnectionInformationUnauthorized";
}
@@ -76,25 +74,22 @@ export type GetSourceConnectionInformationBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetSourceConnectionInformationBadRequest extends Error {
+export class GetSourceConnectionInformationBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetSourceConnectionInformationBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetSourceConnectionInformationBadRequest";
}
@@ -184,13 +179,20 @@ export const GetSourceConnectionInformationUnauthorized$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);
+ return new GetSourceConnectionInformationUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -314,13 +316,20 @@ export const GetSourceConnectionInformationBadRequest$inboundSchema: z.ZodType<
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);
+ return new GetSourceConnectionInformationBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getstatistics.ts b/src/sdk/models/errors/getstatistics.ts
index 900ef9cc..02962a76 100644
--- a/src/sdk/models/errors/getstatistics.ts
+++ b/src/sdk/models/errors/getstatistics.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetStatisticsUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetStatisticsUnauthorized extends Error {
+export class GetStatisticsUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetStatisticsUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetStatisticsUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetStatisticsBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetStatisticsBadRequest extends Error {
+export class GetStatisticsBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetStatisticsBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetStatisticsBadRequest";
}
@@ -167,13 +162,20 @@ export const GetStatisticsUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetStatisticsUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -285,13 +287,20 @@ export const GetStatisticsBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new GetStatisticsBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getthumbimage.ts b/src/sdk/models/errors/getthumbimage.ts
index d6733447..22d8fc3f 100644
--- a/src/sdk/models/errors/getthumbimage.ts
+++ b/src/sdk/models/errors/getthumbimage.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetThumbImageUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetThumbImageUnauthorized extends Error {
+export class GetThumbImageUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetThumbImageUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetThumbImageUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetThumbImageBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetThumbImageBadRequest extends Error {
+export class GetThumbImageBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetThumbImageBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetThumbImageBadRequest";
}
@@ -165,13 +160,20 @@ export const GetThumbImageUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetThumbImageUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -282,13 +284,20 @@ export const GetThumbImageBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new GetThumbImageBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/gettimeline.ts b/src/sdk/models/errors/gettimeline.ts
index 567d8882..2880d009 100644
--- a/src/sdk/models/errors/gettimeline.ts
+++ b/src/sdk/models/errors/gettimeline.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetTimelineUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetTimelineUnauthorized extends Error {
+export class GetTimelineUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetTimelineUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetTimelineUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetTimelineBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetTimelineBadRequest extends Error {
+export class GetTimelineBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetTimelineBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetTimelineBadRequest";
}
@@ -165,13 +160,20 @@ export const GetTimelineUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetTimelineUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -282,13 +284,20 @@ export const GetTimelineBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new GetTimelineBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/gettokenbypinid.ts b/src/sdk/models/errors/gettokenbypinid.ts
index 85289c96..9385f89b 100644
--- a/src/sdk/models/errors/gettokenbypinid.ts
+++ b/src/sdk/models/errors/gettokenbypinid.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -27,25 +28,22 @@ export type GetTokenByPinIdResponseBodyData = {
/**
* Not Found or Expired
*/
-export class GetTokenByPinIdResponseBody extends Error {
+export class GetTokenByPinIdResponseBody extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetTokenByPinIdResponseBodyData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetTokenByPinIdResponseBody";
}
@@ -71,25 +69,22 @@ export type GetTokenByPinIdBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetTokenByPinIdBadRequest extends Error {
+export class GetTokenByPinIdBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetTokenByPinIdBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetTokenByPinIdBadRequest";
}
@@ -161,13 +156,20 @@ export const GetTokenByPinIdResponseBody$inboundSchema: z.ZodType<
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);
+ return new GetTokenByPinIdResponseBody(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -278,13 +280,20 @@ export const GetTokenByPinIdBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new GetTokenByPinIdBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/gettokendetails.ts b/src/sdk/models/errors/gettokendetails.ts
index 9e19df78..8acdf87a 100644
--- a/src/sdk/models/errors/gettokendetails.ts
+++ b/src/sdk/models/errors/gettokendetails.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetTokenDetailsUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetTokenDetailsUnauthorized extends Error {
+export class GetTokenDetailsUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetTokenDetailsUnauthorizedData;
- constructor(err: GetTokenDetailsUnauthorizedData) {
+ 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetTokenDetailsUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetTokenDetailsBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetTokenDetailsBadRequest extends Error {
+export class GetTokenDetailsBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetTokenDetailsBadRequestData;
- constructor(err: GetTokenDetailsBadRequestData) {
+ 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetTokenDetailsBadRequest";
}
@@ -171,13 +166,20 @@ export const GetTokenDetailsUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetTokenDetailsUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -289,13 +291,20 @@ export const GetTokenDetailsBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new GetTokenDetailsBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/gettopwatchedcontent.ts b/src/sdk/models/errors/gettopwatchedcontent.ts
index 32c83de1..56f3c97b 100644
--- a/src/sdk/models/errors/gettopwatchedcontent.ts
+++ b/src/sdk/models/errors/gettopwatchedcontent.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetTopWatchedContentUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetTopWatchedContentUnauthorized extends Error {
+export class GetTopWatchedContentUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetTopWatchedContentUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetTopWatchedContentUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetTopWatchedContentBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetTopWatchedContentBadRequest extends Error {
+export class GetTopWatchedContentBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetTopWatchedContentBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetTopWatchedContentBadRequest";
}
@@ -168,13 +163,20 @@ export const GetTopWatchedContentUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetTopWatchedContentUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -287,13 +289,20 @@ export const GetTopWatchedContentBadRequest$inboundSchema: z.ZodType<
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);
+ return new GetTopWatchedContentBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/gettranscodesessions.ts b/src/sdk/models/errors/gettranscodesessions.ts
index c629633d..faa74311 100644
--- a/src/sdk/models/errors/gettranscodesessions.ts
+++ b/src/sdk/models/errors/gettranscodesessions.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetTranscodeSessionsUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetTranscodeSessionsUnauthorized extends Error {
+export class GetTranscodeSessionsUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetTranscodeSessionsUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetTranscodeSessionsUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetTranscodeSessionsBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetTranscodeSessionsBadRequest extends Error {
+export class GetTranscodeSessionsBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetTranscodeSessionsBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetTranscodeSessionsBadRequest";
}
@@ -170,13 +165,20 @@ export const GetTranscodeSessionsUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetTranscodeSessionsUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -289,13 +291,20 @@ export const GetTranscodeSessionsBadRequest$inboundSchema: z.ZodType<
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);
+ return new GetTranscodeSessionsBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/gettransienttoken.ts b/src/sdk/models/errors/gettransienttoken.ts
index b0b0724b..b7f78ebe 100644
--- a/src/sdk/models/errors/gettransienttoken.ts
+++ b/src/sdk/models/errors/gettransienttoken.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetTransientTokenUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetTransientTokenUnauthorized extends Error {
+export class GetTransientTokenUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetTransientTokenUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetTransientTokenUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetTransientTokenBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetTransientTokenBadRequest extends Error {
+export class GetTransientTokenBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetTransientTokenBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetTransientTokenBadRequest";
}
@@ -171,13 +166,20 @@ export const GetTransientTokenUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetTransientTokenUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -290,13 +292,20 @@ export const GetTransientTokenBadRequest$inboundSchema: z.ZodType<
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);
+ return new GetTransientTokenBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getupdatestatus.ts b/src/sdk/models/errors/getupdatestatus.ts
index 0da32129..0c82df73 100644
--- a/src/sdk/models/errors/getupdatestatus.ts
+++ b/src/sdk/models/errors/getupdatestatus.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetUpdateStatusUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetUpdateStatusUnauthorized extends Error {
+export class GetUpdateStatusUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetUpdateStatusUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetUpdateStatusUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetUpdateStatusBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetUpdateStatusBadRequest extends Error {
+export class GetUpdateStatusBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetUpdateStatusBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetUpdateStatusBadRequest";
}
@@ -167,13 +162,20 @@ export const GetUpdateStatusUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetUpdateStatusUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -284,13 +286,20 @@ export const GetUpdateStatusBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new GetUpdateStatusBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getuserfriends.ts b/src/sdk/models/errors/getuserfriends.ts
index 3f79a6a2..bbeadb12 100644
--- a/src/sdk/models/errors/getuserfriends.ts
+++ b/src/sdk/models/errors/getuserfriends.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetUserFriendsUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetUserFriendsUnauthorized extends Error {
+export class GetUserFriendsUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetUserFriendsUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetUserFriendsUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetUserFriendsBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetUserFriendsBadRequest extends Error {
+export class GetUserFriendsBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetUserFriendsBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetUserFriendsBadRequest";
}
@@ -165,13 +160,20 @@ export const GetUserFriendsUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetUserFriendsUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -282,13 +284,20 @@ export const GetUserFriendsBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new GetUserFriendsBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getusers.ts b/src/sdk/models/errors/getusers.ts
index 1e2b022c..466e85e0 100644
--- a/src/sdk/models/errors/getusers.ts
+++ b/src/sdk/models/errors/getusers.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetUsersUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetUsersUnauthorized extends Error {
+export class GetUsersUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetUsersUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetUsersUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetUsersBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetUsersBadRequest extends Error {
+export class GetUsersBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetUsersBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetUsersBadRequest";
}
@@ -164,13 +159,20 @@ export const GetUsersUnauthorized$inboundSchema: z.ZodType<
> = 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);
+ return new GetUsersUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -277,13 +279,20 @@ export const GetUsersBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new GetUsersBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/getwatchlist.ts b/src/sdk/models/errors/getwatchlist.ts
index a08a6a2b..e8ba611c 100644
--- a/src/sdk/models/errors/getwatchlist.ts
+++ b/src/sdk/models/errors/getwatchlist.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type GetWatchListUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class GetWatchListUnauthorized extends Error {
+export class GetWatchListUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetWatchListUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetWatchListUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetWatchListBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class GetWatchListBadRequest extends Error {
+export class GetWatchListBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetWatchListBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetWatchListBadRequest";
}
@@ -167,13 +162,20 @@ export const GetWatchListUnauthorized$inboundSchema: z.ZodType<
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);
+ return new GetWatchListUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -284,13 +286,20 @@ export const GetWatchListBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new GetWatchListBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/index.ts b/src/sdk/models/errors/index.ts
index b347bd54..9adf7590 100644
--- a/src/sdk/models/errors/index.ts
+++ b/src/sdk/models/errors/index.ts
@@ -73,6 +73,7 @@ export * from "./markunplayed.js";
export * from "./performsearch.js";
export * from "./performvoicesearch.js";
export * from "./postuserssignindata.js";
+export * from "./responsevalidationerror.js";
export * from "./sdkerror.js";
export * from "./sdkvalidationerror.js";
export * from "./startalltasks.js";
diff --git a/src/sdk/models/errors/logline.ts b/src/sdk/models/errors/logline.ts
index cf25d437..b5fe1929 100644
--- a/src/sdk/models/errors/logline.ts
+++ b/src/sdk/models/errors/logline.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type LogLineUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class LogLineUnauthorized extends Error {
+export class LogLineUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: LogLineUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "LogLineUnauthorized";
}
@@ -72,25 +70,22 @@ export type LogLineBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class LogLineBadRequest extends Error {
+export class LogLineBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: LogLineBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "LogLineBadRequest";
}
@@ -164,13 +159,20 @@ export const LogLineUnauthorized$inboundSchema: z.ZodType<
> = 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);
+ return new LogLineUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -276,13 +278,20 @@ export const LogLineBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new LogLineBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/logmultiline.ts b/src/sdk/models/errors/logmultiline.ts
index d728ab0e..cc617edb 100644
--- a/src/sdk/models/errors/logmultiline.ts
+++ b/src/sdk/models/errors/logmultiline.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type LogMultiLineUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class LogMultiLineUnauthorized extends Error {
+export class LogMultiLineUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: LogMultiLineUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "LogMultiLineUnauthorized";
}
@@ -72,25 +70,22 @@ export type LogMultiLineBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class LogMultiLineBadRequest extends Error {
+export class LogMultiLineBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: LogMultiLineBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "LogMultiLineBadRequest";
}
@@ -164,13 +159,20 @@ export const LogMultiLineUnauthorized$inboundSchema: z.ZodType<
> = 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);
+ return new LogMultiLineUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -281,13 +283,20 @@ export const LogMultiLineBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new LogMultiLineBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/markplayed.ts b/src/sdk/models/errors/markplayed.ts
index 782ab979..be58e402 100644
--- a/src/sdk/models/errors/markplayed.ts
+++ b/src/sdk/models/errors/markplayed.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type MarkPlayedUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class MarkPlayedUnauthorized extends Error {
+export class MarkPlayedUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: MarkPlayedUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "MarkPlayedUnauthorized";
}
@@ -72,25 +70,22 @@ export type MarkPlayedBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class MarkPlayedBadRequest extends Error {
+export class MarkPlayedBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: MarkPlayedBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "MarkPlayedBadRequest";
}
@@ -164,13 +159,20 @@ export const MarkPlayedUnauthorized$inboundSchema: z.ZodType<
> = 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);
+ return new MarkPlayedUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -281,13 +283,20 @@ export const MarkPlayedBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new MarkPlayedBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/markunplayed.ts b/src/sdk/models/errors/markunplayed.ts
index 16d9ac20..94c9f876 100644
--- a/src/sdk/models/errors/markunplayed.ts
+++ b/src/sdk/models/errors/markunplayed.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type MarkUnplayedUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class MarkUnplayedUnauthorized extends Error {
+export class MarkUnplayedUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: MarkUnplayedUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "MarkUnplayedUnauthorized";
}
@@ -72,25 +70,22 @@ export type MarkUnplayedBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class MarkUnplayedBadRequest extends Error {
+export class MarkUnplayedBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: MarkUnplayedBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "MarkUnplayedBadRequest";
}
@@ -165,13 +160,20 @@ export const MarkUnplayedUnauthorized$inboundSchema: z.ZodType<
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);
+ return new MarkUnplayedUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -282,13 +284,20 @@ export const MarkUnplayedBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new MarkUnplayedBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/performsearch.ts b/src/sdk/models/errors/performsearch.ts
index 3fd3580b..6a905f90 100644
--- a/src/sdk/models/errors/performsearch.ts
+++ b/src/sdk/models/errors/performsearch.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type PerformSearchUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class PerformSearchUnauthorized extends Error {
+export class PerformSearchUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: PerformSearchUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "PerformSearchUnauthorized";
}
@@ -72,25 +70,22 @@ export type PerformSearchBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class PerformSearchBadRequest extends Error {
+export class PerformSearchBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: PerformSearchBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "PerformSearchBadRequest";
}
@@ -165,13 +160,20 @@ export const PerformSearchUnauthorized$inboundSchema: z.ZodType<
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);
+ return new PerformSearchUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -282,13 +284,20 @@ export const PerformSearchBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new PerformSearchBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/performvoicesearch.ts b/src/sdk/models/errors/performvoicesearch.ts
index 34fc39fe..a5cb897e 100644
--- a/src/sdk/models/errors/performvoicesearch.ts
+++ b/src/sdk/models/errors/performvoicesearch.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type PerformVoiceSearchUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class PerformVoiceSearchUnauthorized extends Error {
+export class PerformVoiceSearchUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: PerformVoiceSearchUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "PerformVoiceSearchUnauthorized";
}
@@ -72,25 +70,22 @@ export type PerformVoiceSearchBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class PerformVoiceSearchBadRequest extends Error {
+export class PerformVoiceSearchBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: PerformVoiceSearchBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "PerformVoiceSearchBadRequest";
}
@@ -167,13 +162,20 @@ export const PerformVoiceSearchUnauthorized$inboundSchema: z.ZodType<
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);
+ return new PerformVoiceSearchUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -286,13 +288,20 @@ export const PerformVoiceSearchBadRequest$inboundSchema: z.ZodType<
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);
+ return new PerformVoiceSearchBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/plexapierror.ts b/src/sdk/models/errors/plexapierror.ts
new file mode 100644
index 00000000..16dec7f3
--- /dev/null
+++ b/src/sdk/models/errors/plexapierror.ts
@@ -0,0 +1,35 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+
+/** The base class for all HTTP error responses */
+export class PlexAPIError extends Error {
+ /** HTTP status code */
+ public readonly statusCode: number;
+ /** HTTP body */
+ public readonly body: string;
+ /** HTTP headers */
+ public readonly headers: Headers;
+ /** HTTP content type */
+ public readonly contentType: string;
+ /** Raw response */
+ public readonly rawResponse: Response;
+
+ constructor(
+ message: string,
+ httpMeta: {
+ response: Response;
+ request: Request;
+ body: string;
+ },
+ ) {
+ super(message);
+ this.statusCode = httpMeta.response.status;
+ this.body = httpMeta.body;
+ this.headers = httpMeta.response.headers;
+ this.contentType = httpMeta.response.headers.get("content-type") || "";
+ this.rawResponse = httpMeta.response;
+
+ this.name = "PlexAPIError";
+ }
+}
diff --git a/src/sdk/models/errors/postuserssignindata.ts b/src/sdk/models/errors/postuserssignindata.ts
index 79041f7b..0018587e 100644
--- a/src/sdk/models/errors/postuserssignindata.ts
+++ b/src/sdk/models/errors/postuserssignindata.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type PostUsersSignInDataUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class PostUsersSignInDataUnauthorized extends Error {
+export class PostUsersSignInDataUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: PostUsersSignInDataUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "PostUsersSignInDataUnauthorized";
}
@@ -72,25 +70,22 @@ export type PostUsersSignInDataBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class PostUsersSignInDataBadRequest extends Error {
+export class PostUsersSignInDataBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: PostUsersSignInDataBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "PostUsersSignInDataBadRequest";
}
@@ -177,13 +172,20 @@ export const PostUsersSignInDataUnauthorized$inboundSchema: z.ZodType<
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);
+ return new PostUsersSignInDataUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -296,13 +298,20 @@ export const PostUsersSignInDataBadRequest$inboundSchema: z.ZodType<
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);
+ return new PostUsersSignInDataBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/responsevalidationerror.ts b/src/sdk/models/errors/responsevalidationerror.ts
new file mode 100644
index 00000000..15eaed32
--- /dev/null
+++ b/src/sdk/models/errors/responsevalidationerror.ts
@@ -0,0 +1,50 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+
+import * as z from "zod";
+import { PlexAPIError } from "./plexapierror.js";
+import { formatZodError } from "./sdkvalidationerror.js";
+
+export class ResponseValidationError extends PlexAPIError {
+ /**
+ * The raw value that failed validation.
+ */
+ public readonly rawValue: unknown;
+
+ /**
+ * The raw message that failed validation.
+ */
+ public readonly rawMessage: unknown;
+
+ constructor(
+ message: string,
+ extra: {
+ response: Response;
+ request: Request;
+ body: string;
+ cause: unknown;
+ rawValue: unknown;
+ rawMessage: unknown;
+ },
+ ) {
+ super(message, extra);
+ this.name = "ResponseValidationError";
+ this.cause = extra.cause;
+ this.rawValue = extra.rawValue;
+ this.rawMessage = extra.rawMessage;
+ }
+
+ /**
+ * Return a pretty-formatted error message if the underlying validation error
+ * is a ZodError or some other recognized error type, otherwise return the
+ * default error message.
+ */
+ public pretty(): string {
+ if (this.cause instanceof z.ZodError) {
+ return `${this.rawMessage}\n${formatZodError(this.cause)}`;
+ } else {
+ return this.toString();
+ }
+ }
+}
diff --git a/src/sdk/models/errors/sdkerror.ts b/src/sdk/models/errors/sdkerror.ts
index ba47f662..0663986b 100644
--- a/src/sdk/models/errors/sdkerror.ts
+++ b/src/sdk/models/errors/sdkerror.ts
@@ -2,41 +2,33 @@
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
-export class SDKError extends Error {
- /**
- * HTTP status code
- */
- public readonly statusCode: number;
- /**
- * HTTP content type
- */
- public readonly contentType: string;
- /**
- * HTTP body
- */
- public readonly body: string;
- /**
- * Raw response
- */
- public readonly rawResponse: Response;
+import { PlexAPIError } from "./plexapierror.js";
+/** The fallback error class if no more specific error class is matched */
+export class SDKError extends PlexAPIError {
constructor(
message: string,
- rawResponse: Response,
- body: string = "",
+ httpMeta: {
+ response: Response;
+ request: Request;
+ body: string;
+ },
) {
- const statusCode = rawResponse.status;
- const contentType = rawResponse.headers.get("content-type") || "";
- const bodyString = body.length > 0 ? `\n${body}` : "";
- super(
- `${message}: Status ${statusCode} Content-Type ${contentType} Body ${bodyString}`,
- );
-
- this.body = body;
- this.rawResponse = rawResponse;
- this.statusCode = statusCode;
- this.contentType = contentType;
-
+ if (message) {
+ message += `: `;
+ }
+ message += `Status ${httpMeta.response.status}`;
+ const contentType = httpMeta.response.headers.get("content-type") || `""`;
+ if (contentType !== "application/json") {
+ message += ` Content-Type ${
+ contentType.includes(" ") ? `"${contentType}"` : contentType
+ }`;
+ }
+ const body = httpMeta.body || `""`;
+ message += body.length > 100 ? "\n" : " ";
+ message += `Body ${body}`;
+ message = message.trim();
+ super(message, httpMeta);
this.name = "SDKError";
}
}
diff --git a/src/sdk/models/errors/sdkvalidationerror.ts b/src/sdk/models/errors/sdkvalidationerror.ts
index 16929b9e..37face8a 100644
--- a/src/sdk/models/errors/sdkvalidationerror.ts
+++ b/src/sdk/models/errors/sdkvalidationerror.ts
@@ -15,6 +15,18 @@ export class SDKValidationError extends Error {
*/
public readonly rawMessage: unknown;
+ // Allows for backwards compatibility for `instanceof` checks of `ResponseValidationError`
+ static override [Symbol.hasInstance](
+ instance: unknown,
+ ): instance is SDKValidationError {
+ if (!(instance instanceof Error)) return false;
+ if (!("rawValue" in instance)) return false;
+ if (!("rawMessage" in instance)) return false;
+ if (!("pretty" in instance)) return false;
+ if (typeof instance.pretty !== "function") return false;
+ return true;
+ }
+
constructor(message: string, cause: unknown, rawValue: unknown) {
super(`${message}: ${cause}`);
this.name = "SDKValidationError";
diff --git a/src/sdk/models/errors/startalltasks.ts b/src/sdk/models/errors/startalltasks.ts
index 486d74a2..0163ce78 100644
--- a/src/sdk/models/errors/startalltasks.ts
+++ b/src/sdk/models/errors/startalltasks.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type StartAllTasksUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class StartAllTasksUnauthorized extends Error {
+export class StartAllTasksUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: StartAllTasksUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "StartAllTasksUnauthorized";
}
@@ -72,25 +70,22 @@ export type StartAllTasksBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class StartAllTasksBadRequest extends Error {
+export class StartAllTasksBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: StartAllTasksBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "StartAllTasksBadRequest";
}
@@ -165,13 +160,20 @@ export const StartAllTasksUnauthorized$inboundSchema: z.ZodType<
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);
+ return new StartAllTasksUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -282,13 +284,20 @@ export const StartAllTasksBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new StartAllTasksBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/starttask.ts b/src/sdk/models/errors/starttask.ts
index 09f63fac..e91e258a 100644
--- a/src/sdk/models/errors/starttask.ts
+++ b/src/sdk/models/errors/starttask.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type StartTaskUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class StartTaskUnauthorized extends Error {
+export class StartTaskUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: StartTaskUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "StartTaskUnauthorized";
}
@@ -72,25 +70,22 @@ export type StartTaskBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class StartTaskBadRequest extends Error {
+export class StartTaskBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: StartTaskBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "StartTaskBadRequest";
}
@@ -164,13 +159,20 @@ export const StartTaskUnauthorized$inboundSchema: z.ZodType<
> = 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);
+ return new StartTaskUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -279,13 +281,20 @@ export const StartTaskBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new StartTaskBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/startuniversaltranscode.ts b/src/sdk/models/errors/startuniversaltranscode.ts
index c1b7c247..ae46ac25 100644
--- a/src/sdk/models/errors/startuniversaltranscode.ts
+++ b/src/sdk/models/errors/startuniversaltranscode.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type StartUniversalTranscodeUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class StartUniversalTranscodeUnauthorized extends Error {
+export class StartUniversalTranscodeUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: StartUniversalTranscodeUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "StartUniversalTranscodeUnauthorized";
}
@@ -72,25 +70,22 @@ export type StartUniversalTranscodeBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class StartUniversalTranscodeBadRequest extends Error {
+export class StartUniversalTranscodeBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: StartUniversalTranscodeBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "StartUniversalTranscodeBadRequest";
}
@@ -170,13 +165,20 @@ export const StartUniversalTranscodeUnauthorized$inboundSchema: z.ZodType<
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);
+ return new StartUniversalTranscodeUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -293,13 +295,20 @@ export const StartUniversalTranscodeBadRequest$inboundSchema: z.ZodType<
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);
+ return new StartUniversalTranscodeBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/stopalltasks.ts b/src/sdk/models/errors/stopalltasks.ts
index 49faefef..b2ec1696 100644
--- a/src/sdk/models/errors/stopalltasks.ts
+++ b/src/sdk/models/errors/stopalltasks.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type StopAllTasksUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class StopAllTasksUnauthorized extends Error {
+export class StopAllTasksUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: StopAllTasksUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "StopAllTasksUnauthorized";
}
@@ -72,25 +70,22 @@ export type StopAllTasksBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class StopAllTasksBadRequest extends Error {
+export class StopAllTasksBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: StopAllTasksBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "StopAllTasksBadRequest";
}
@@ -165,13 +160,20 @@ export const StopAllTasksUnauthorized$inboundSchema: z.ZodType<
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);
+ return new StopAllTasksUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -282,13 +284,20 @@ export const StopAllTasksBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new StopAllTasksBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/stoptask.ts b/src/sdk/models/errors/stoptask.ts
index f8ad8eb9..3a320148 100644
--- a/src/sdk/models/errors/stoptask.ts
+++ b/src/sdk/models/errors/stoptask.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type StopTaskUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class StopTaskUnauthorized extends Error {
+export class StopTaskUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: StopTaskUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "StopTaskUnauthorized";
}
@@ -72,25 +70,22 @@ export type StopTaskBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class StopTaskBadRequest extends Error {
+export class StopTaskBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: StopTaskBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "StopTaskBadRequest";
}
@@ -164,13 +159,20 @@ export const StopTaskUnauthorized$inboundSchema: z.ZodType<
> = 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);
+ return new StopTaskUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -277,13 +279,20 @@ export const StopTaskBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new StopTaskBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/stoptranscodesession.ts b/src/sdk/models/errors/stoptranscodesession.ts
index a0b7faa8..df59a502 100644
--- a/src/sdk/models/errors/stoptranscodesession.ts
+++ b/src/sdk/models/errors/stoptranscodesession.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type StopTranscodeSessionUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class StopTranscodeSessionUnauthorized extends Error {
+export class StopTranscodeSessionUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: StopTranscodeSessionUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "StopTranscodeSessionUnauthorized";
}
@@ -72,25 +70,22 @@ export type StopTranscodeSessionBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class StopTranscodeSessionBadRequest extends Error {
+export class StopTranscodeSessionBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: StopTranscodeSessionBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "StopTranscodeSessionBadRequest";
}
@@ -170,13 +165,20 @@ export const StopTranscodeSessionUnauthorized$inboundSchema: z.ZodType<
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);
+ return new StopTranscodeSessionUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -289,13 +291,20 @@ export const StopTranscodeSessionBadRequest$inboundSchema: z.ZodType<
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);
+ return new StopTranscodeSessionBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/updateplaylist.ts b/src/sdk/models/errors/updateplaylist.ts
index 9d36149e..8423dd7f 100644
--- a/src/sdk/models/errors/updateplaylist.ts
+++ b/src/sdk/models/errors/updateplaylist.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type UpdatePlaylistUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class UpdatePlaylistUnauthorized extends Error {
+export class UpdatePlaylistUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: UpdatePlaylistUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "UpdatePlaylistUnauthorized";
}
@@ -72,25 +70,22 @@ export type UpdatePlaylistBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class UpdatePlaylistBadRequest extends Error {
+export class UpdatePlaylistBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: UpdatePlaylistBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "UpdatePlaylistBadRequest";
}
@@ -167,13 +162,20 @@ export const UpdatePlaylistUnauthorized$inboundSchema: z.ZodType<
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);
+ return new UpdatePlaylistUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -285,13 +287,20 @@ export const UpdatePlaylistBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new UpdatePlaylistBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/updateplayprogress.ts b/src/sdk/models/errors/updateplayprogress.ts
index 0406a391..cab96f28 100644
--- a/src/sdk/models/errors/updateplayprogress.ts
+++ b/src/sdk/models/errors/updateplayprogress.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type UpdatePlayProgressUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class UpdatePlayProgressUnauthorized extends Error {
+export class UpdatePlayProgressUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: UpdatePlayProgressUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "UpdatePlayProgressUnauthorized";
}
@@ -72,25 +70,22 @@ export type UpdatePlayProgressBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class UpdatePlayProgressBadRequest extends Error {
+export class UpdatePlayProgressBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: UpdatePlayProgressBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "UpdatePlayProgressBadRequest";
}
@@ -167,13 +162,20 @@ export const UpdatePlayProgressUnauthorized$inboundSchema: z.ZodType<
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);
+ return new UpdatePlayProgressUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -286,13 +288,20 @@ export const UpdatePlayProgressBadRequest$inboundSchema: z.ZodType<
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);
+ return new UpdatePlayProgressBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/errors/uploadplaylist.ts b/src/sdk/models/errors/uploadplaylist.ts
index 4aaa00c9..5d3698e5 100644
--- a/src/sdk/models/errors/uploadplaylist.ts
+++ b/src/sdk/models/errors/uploadplaylist.ts
@@ -6,6 +6,7 @@ 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 = {
@@ -28,25 +29,22 @@ export type UploadPlaylistUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
-export class UploadPlaylistUnauthorized extends Error {
+export class UploadPlaylistUnauthorized extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: UploadPlaylistUnauthorizedData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "UploadPlaylistUnauthorized";
}
@@ -72,25 +70,22 @@ export type UploadPlaylistBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
-export class UploadPlaylistBadRequest extends Error {
+export class UploadPlaylistBadRequest extends PlexAPIError {
errors?: Array | undefined;
- /**
- * Raw HTTP response; suitable for custom response parsing
- */
- rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: UploadPlaylistBadRequestData;
- constructor(err: 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);
+ super(message, httpMeta);
this.data$ = err;
-
if (err.errors != null) this.errors = err.errors;
- if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "UploadPlaylistBadRequest";
}
@@ -167,13 +162,20 @@ export const UploadPlaylistUnauthorized$inboundSchema: z.ZodType<
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);
+ return new UploadPlaylistUnauthorized(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
@@ -285,13 +287,20 @@ export const UploadPlaylistBadRequest$inboundSchema: z.ZodType<
> = 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);
+ return new UploadPlaylistBadRequest(remapped, {
+ request: v.request$,
+ response: v.response$,
+ body: v.body$,
+ });
});
/** @internal */
diff --git a/src/sdk/models/operations/getactorslibrary.ts b/src/sdk/models/operations/getactorslibrary.ts
index 029443b0..f7db3225 100644
--- a/src/sdk/models/operations/getactorslibrary.ts
+++ b/src/sdk/models/operations/getactorslibrary.ts
@@ -136,7 +136,7 @@ export type GetActorsLibraryMediaContainer = {
/**
* Identifier for the view mode.
*/
- viewMode: string;
+ viewMode?: string | undefined;
/**
* An array of actor entries for media items.
*/
@@ -338,7 +338,7 @@ export const GetActorsLibraryMediaContainer$inboundSchema: z.ZodType<
title1: z.string(),
title2: z.string(),
viewGroup: z.string(),
- viewMode: z.string(),
+ viewMode: z.string().optional(),
Directory: z.array(z.lazy(() => GetActorsLibraryDirectory$inboundSchema))
.optional(),
}).transform((v) => {
@@ -360,7 +360,7 @@ export type GetActorsLibraryMediaContainer$Outbound = {
title1: string;
title2: string;
viewGroup: string;
- viewMode: string;
+ viewMode?: string | undefined;
Directory?: Array | undefined;
};
@@ -381,7 +381,7 @@ export const GetActorsLibraryMediaContainer$outboundSchema: z.ZodType<
title1: z.string(),
title2: z.string(),
viewGroup: z.string(),
- viewMode: z.string(),
+ viewMode: z.string().optional(),
directory: z.array(z.lazy(() => GetActorsLibraryDirectory$outboundSchema))
.optional(),
}).transform((v) => {
diff --git a/src/sdk/models/operations/getlibraryitems.ts b/src/sdk/models/operations/getlibraryitems.ts
index 4a985fe4..d1abbb22 100644
--- a/src/sdk/models/operations/getlibraryitems.ts
+++ b/src/sdk/models/operations/getlibraryitems.ts
@@ -148,13 +148,760 @@ export type GetLibraryItemsRequest = {
xPlexContainerSize?: number | undefined;
};
+/**
+ * The type of media content in the Plex library. This can represent videos, music, or photos.
+ *
+ * @remarks
+ */
+export enum GetLibraryItemsType {
+ Movie = "movie",
+ TvShow = "show",
+ Season = "season",
+ Episode = "episode",
+ Artist = "artist",
+ Album = "album",
+ Track = "track",
+ PhotoAlbum = "photoalbum",
+ Photo = "photo",
+ Collection = "collection",
+}
+/**
+ * The type of media content in the Plex library. This can represent videos, music, or photos.
+ *
+ * @remarks
+ */
+export type GetLibraryItemsTypeOpen = OpenEnum;
+
+export enum GetLibraryItemsLibraryResponseType {
+ CoverPoster = "coverPoster",
+ Background = "background",
+ Snapshot = "snapshot",
+ ClearLogo = "clearLogo",
+}
+export type GetLibraryItemsLibraryResponseTypeOpen = OpenEnum<
+ typeof GetLibraryItemsLibraryResponseType
+>;
+
+export type GetLibraryItemsImage = {
+ alt: string;
+ type: GetLibraryItemsLibraryResponseTypeOpen;
+ url: string;
+};
+
+export type GetLibraryItemsUltraBlurColors = {
+ topLeft: string;
+ topRight: string;
+ bottomRight: string;
+ bottomLeft: string;
+};
+
+export type GetLibraryItemsGuids = {
+ /**
+ * The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
+ *
+ * @remarks
+ */
+ id: string;
+};
+
+/**
+ * Setting that indicates the episode ordering for the show.
+ *
+ * @remarks
+ * Options:
+ * - None = Library default
+ * - tmdbAiring = The Movie Database (Aired)
+ * - aired = TheTVDB (Aired)
+ * - dvd = TheTVDB (DVD)
+ * - absolute = TheTVDB (Absolute)
+ */
+export enum ShowOrdering {
+ None = "None",
+ TmdbAiring = "tmdbAiring",
+ TvdbAired = "aired",
+ TvdbDvd = "dvd",
+ TvdbAbsolute = "absolute",
+}
+/**
+ * Setting that indicates the episode ordering for the show.
+ *
+ * @remarks
+ * Options:
+ * - None = Library default
+ * - tmdbAiring = The Movie Database (Aired)
+ * - aired = TheTVDB (Aired)
+ * - dvd = TheTVDB (DVD)
+ * - absolute = TheTVDB (Absolute)
+ */
+export type ShowOrderingOpen = OpenEnum;
+
+/**
+ * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
+ *
+ * @remarks
+ */
+export enum FlattenSeasons {
+ LibraryDefault = "-1",
+ Hide = "0",
+ Show = "1",
+}
+/**
+ * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
+ *
+ * @remarks
+ */
+export type FlattenSeasonsOpen = OpenEnum;
+
+export enum OptimizedForStreaming1 {
+ Zero = 0,
+ One = 1,
+}
+
+/**
+ * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
+ */
+export type GetLibraryItemsOptimizedForStreaming =
+ | OptimizedForStreaming1
+ | boolean;
+
+export enum GetLibraryItemsOptimizedForStreaming1 {
+ Zero = 0,
+ One = 1,
+}
+
+/**
+ * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
+ *
+ * @remarks
+ */
+export type GetLibraryItemsLibraryOptimizedForStreaming =
+ | GetLibraryItemsOptimizedForStreaming1
+ | boolean;
+
+/**
+ * Indicates if the part has a thumbnail.
+ *
+ * @remarks
+ */
+export enum GetLibraryItemsHasThumbnail {
+ False = "0",
+ True = "1",
+}
+
+export type GetLibraryItemsPart = {
+ /**
+ * Indicates if the part is accessible.
+ */
+ accessible?: boolean | undefined;
+ /**
+ * Indicates if the part exists.
+ */
+ exists?: boolean | undefined;
+ /**
+ * Unique part identifier.
+ */
+ id: number;
+ /**
+ * Key to access this part.
+ */
+ key?: string | undefined;
+ indexes?: string | undefined;
+ /**
+ * Duration of the part in milliseconds.
+ */
+ duration?: number | undefined;
+ /**
+ * File path for the part.
+ */
+ file?: string | undefined;
+ /**
+ * File size in bytes.
+ */
+ size?: number | undefined;
+ packetLength?: number | undefined;
+ /**
+ * Container format of the part.
+ */
+ container?: string | undefined;
+ /**
+ * Video profile for the part.
+ */
+ videoProfile?: string | undefined;
+ /**
+ * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).
+ */
+ audioProfile?: string | undefined;
+ has64bitOffsets?: boolean | undefined;
+ /**
+ * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
+ *
+ * @remarks
+ */
+ optimizedForStreaming?:
+ | GetLibraryItemsOptimizedForStreaming1
+ | boolean
+ | undefined;
+ hasThumbnail?: GetLibraryItemsHasThumbnail | undefined;
+};
+
+export type GetLibraryItemsMedia = {
+ /**
+ * Unique media identifier.
+ */
+ id: number;
+ /**
+ * Duration of the media in milliseconds.
+ */
+ duration?: number | undefined;
+ /**
+ * Bitrate in bits per second.
+ */
+ bitrate?: number | undefined;
+ /**
+ * Video width in pixels.
+ */
+ width?: number | undefined;
+ /**
+ * Video height in pixels.
+ */
+ height?: number | undefined;
+ /**
+ * Aspect ratio of the video.
+ */
+ aspectRatio?: number | undefined;
+ /**
+ * Number of audio channels.
+ */
+ audioChannels?: number | undefined;
+ displayOffset?: number | undefined;
+ /**
+ * Audio codec used.
+ */
+ audioCodec?: string | undefined;
+ /**
+ * Video codec used.
+ */
+ videoCodec?: string | undefined;
+ /**
+ * Video resolution (e.g., 4k).
+ */
+ videoResolution?: string | undefined;
+ /**
+ * Container format of the media.
+ */
+ container?: string | undefined;
+ /**
+ * Frame rate of the video. Values found include NTSC, PAL, 24p
+ *
+ * @remarks
+ */
+ videoFrameRate?: string | undefined;
+ /**
+ * Video profile (e.g., main 10).
+ */
+ videoProfile?: string | undefined;
+ /**
+ * Indicates whether voice activity is detected.
+ */
+ hasVoiceActivity?: boolean | undefined;
+ /**
+ * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).
+ */
+ audioProfile?: string | undefined;
+ /**
+ * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
+ */
+ optimizedForStreaming?: OptimizedForStreaming1 | boolean | undefined;
+ /**
+ * Indicates whether the media has 64-bit offsets.
+ *
+ * @remarks
+ * This is relevant for media files that may require larger offsets than what 32-bit integers can provide.
+ */
+ has64bitOffsets?: boolean | undefined;
+ part?: Array | undefined;
+};
+
+export type GetLibraryItemsGenre = {
+ /**
+ * The unique identifier for the genre.
+ *
+ * @remarks
+ * NOTE: This is different for each Plex server and is not globally unique.
+ */
+ id: number;
+ /**
+ * The genre name of this media-item
+ *
+ * @remarks
+ */
+ tag: string;
+};
+
+export type GetLibraryItemsCountry = {
+ /**
+ * The unique identifier for the country.
+ *
+ * @remarks
+ * NOTE: This is different for each Plex server and is not globally unique.
+ */
+ id: number;
+ /**
+ * The country of origin of this media item
+ */
+ tag: string;
+};
+
+export type GetLibraryItemsDirector = {
+ /**
+ * Unique identifier for the director.
+ */
+ id: number;
+ /**
+ * The role of Director
+ */
+ tag: string;
+ /**
+ * The absolute URL of the thumbnail image for the director.
+ */
+ thumb?: string | undefined;
+};
+
+export type GetLibraryItemsWriter = {
+ /**
+ * Unique identifier for the writer.
+ */
+ id: number;
+ /**
+ * The role of Writer
+ */
+ tag: string;
+ /**
+ * The absolute URL of the thumbnail image for the writer.
+ */
+ thumb?: string | undefined;
+};
+
+export type GetLibraryItemsProducer = {
+ /**
+ * The unique role identifier.
+ */
+ id: number;
+ /**
+ * The filter string for the role.
+ */
+ filter: string;
+ /**
+ * The actor's name.
+ */
+ tag: string;
+ /**
+ * A key associated with the actor tag.
+ */
+ tagKey: string;
+ /**
+ * The character name or role.
+ */
+ role?: string | undefined;
+ /**
+ * URL for the role thumbnail image.
+ */
+ thumb?: string | undefined;
+};
+
+export type GetLibraryItemsCollection = {
+ /**
+ * The user-made collection this media item belongs to
+ */
+ tag: string;
+};
+
+export type GetLibraryItemsRole = {
+ /**
+ * The unique identifier for the role.
+ *
+ * @remarks
+ * NOTE: This is different for each Plex server and is not globally unique.
+ */
+ id: number;
+ /**
+ * The display tag for the actor (typically the actor's name).
+ */
+ tag: string;
+ /**
+ * The role played by the actor in the media item.
+ */
+ role?: string | undefined;
+ /**
+ * The absolute URL of the thumbnail image for the actor.
+ */
+ thumb?: string | undefined;
+};
+
+export type Ratings = {
+ /**
+ * The image or reference for the rating.
+ */
+ image: string;
+ /**
+ * The rating value.
+ */
+ value: number;
+ /**
+ * The type of rating (e.g., audience, critic).
+ */
+ type: string;
+};
+
+export type GetLibraryItemsSimilar = {
+ /**
+ * The unique similar item identifier.
+ */
+ id: number;
+ /**
+ * The filter string for similar items.
+ */
+ filter: string;
+ /**
+ * The tag or title of the similar content.
+ */
+ tag: string;
+};
+
+/**
+ * The folder path for the media item.
+ */
+export type GetLibraryItemsLocation = {
+ path: string;
+};
+
+/**
+ * The thumbnail for the chapter
+ */
+export type Chapter = {
+ id: number;
+ filter: string;
+ index: number;
+ startTimeOffset: number;
+ endTimeOffset: number;
+ thumb: string;
+};
+
+/**
+ * Attributes associated with the marker.
+ */
+export type Attributes = {
+ /**
+ * The identifier for the attributes.
+ */
+ id: number;
+ /**
+ * The version number of the marker attributes.
+ */
+ version?: number | undefined;
+};
+
+/**
+ * The final status of the marker
+ */
+export type Marker = {
+ id: number;
+ type: string;
+ startTimeOffset: number;
+ endTimeOffset: number;
+ final?: boolean | undefined;
+ /**
+ * Attributes associated with the marker.
+ */
+ attributes?: Attributes | undefined;
+};
+
+export type Extras = {
+ /**
+ * The size of the extras.
+ */
+ size?: number | undefined;
+};
+
+/**
+ * Unknown
+ *
+ * @remarks
+ */
+export type GetLibraryItemsMetadata = {
+ /**
+ * 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.
+ */
+ ratingKey: string;
+ /**
+ * The unique key for the media item.
+ */
+ key: string;
+ /**
+ * The globally unique identifier for the media item.
+ */
+ guid: string;
+ /**
+ * A URL‐friendly version of the media title.
+ */
+ slug: string;
+ /**
+ * The studio that produced the media item.
+ */
+ studio?: string | undefined;
+ type: GetLibraryItemsTypeOpen;
+ /**
+ * The title of the media item.
+ */
+ title: string;
+ /**
+ * The banner image URL for the media item.
+ */
+ banner: string;
+ /**
+ * The sort title used for ordering media items.
+ */
+ titleSort: string;
+ /**
+ * The content rating for the media item.
+ */
+ contentRating?: string | undefined;
+ /**
+ * A synopsis of the media item.
+ */
+ summary: string;
+ /**
+ * The critic rating for the media item.
+ */
+ rating: number;
+ /**
+ * The audience rating for the media item.
+ */
+ audienceRating: number;
+ /**
+ * The release year of the media item.
+ */
+ year?: number | undefined;
+ /**
+ * A brief tagline for the media item.
+ */
+ tagline: string;
+ /**
+ * The thumbnail image URL for the media item.
+ */
+ thumb: string;
+ /**
+ * The art image URL for the media item.
+ */
+ art: string;
+ /**
+ * The theme URL for the media item.
+ */
+ theme: string;
+ /**
+ * The index position of the media item.
+ */
+ index: number;
+ /**
+ * The number of leaf items (end nodes) under this media item.
+ */
+ leafCount?: number | undefined;
+ /**
+ * The number of leaf items that have been viewed.
+ */
+ viewedLeafCount?: number | undefined;
+ /**
+ * The number of child items associated with this media item.
+ */
+ childCount: number;
+ /**
+ * The total number of seasons (for TV shows).
+ */
+ seasonCount: number;
+ /**
+ * The duration of the media item in milliseconds.
+ */
+ duration: number;
+ /**
+ * The original release date of the media item.
+ */
+ originallyAvailableAt?: RFCDate | undefined;
+ addedAt: number;
+ /**
+ * Unix epoch datetime in seconds
+ */
+ updatedAt?: number | undefined;
+ /**
+ * The URL for the audience rating image.
+ */
+ audienceRatingImage?: string | undefined;
+ /**
+ * The source from which chapter data is derived.
+ */
+ chapterSource?: string | undefined;
+ /**
+ * The primary extra key associated with this media item.
+ */
+ primaryExtraKey?: string | undefined;
+ /**
+ * The original title of the media item (if different).
+ */
+ originalTitle?: string | undefined;
+ /**
+ * The rating key of the parent media item.
+ */
+ parentRatingKey?: string | undefined;
+ /**
+ * The rating key of the grandparent media item.
+ */
+ grandparentRatingKey?: string | undefined;
+ /**
+ * The GUID of the parent media item.
+ */
+ parentGuid?: string | undefined;
+ /**
+ * The GUID of the grandparent media item.
+ */
+ grandparentGuid?: string | undefined;
+ /**
+ * The slug for the grandparent media item.
+ */
+ grandparentSlug?: string | undefined;
+ /**
+ * The key of the grandparent media item.
+ */
+ grandparentKey?: string | undefined;
+ /**
+ * The key of the parent media item.
+ */
+ parentKey?: string | undefined;
+ /**
+ * The title of the grandparent media item.
+ */
+ grandparentTitle?: string | undefined;
+ /**
+ * The thumbnail URL for the grandparent media item.
+ */
+ grandparentThumb?: string | undefined;
+ /**
+ * The theme URL for the grandparent media item.
+ */
+ grandparentTheme?: string | undefined;
+ /**
+ * The art URL for the grandparent media item.
+ */
+ grandparentArt?: string | undefined;
+ /**
+ * The title of the parent media item.
+ */
+ parentTitle?: string | undefined;
+ /**
+ * The index position of the parent media item.
+ */
+ parentIndex?: number | undefined;
+ /**
+ * The thumbnail URL for the parent media item.
+ */
+ parentThumb?: string | undefined;
+ /**
+ * The URL for the rating image.
+ */
+ ratingImage?: string | undefined;
+ /**
+ * The number of times this media item has been viewed.
+ */
+ viewCount?: number | undefined;
+ /**
+ * The current playback offset (in milliseconds).
+ */
+ viewOffset?: number | undefined;
+ /**
+ * The number of times this media item has been skipped.
+ */
+ skipCount?: number | undefined;
+ /**
+ * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip.
+ */
+ subtype?: string | undefined;
+ /**
+ * The Unix timestamp representing the last time the item was rated.
+ */
+ lastRatedAt?: number | undefined;
+ /**
+ * 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).
+ */
+ createdAtAccuracy?: string | undefined;
+ /**
+ * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC.
+ */
+ createdAtTZOffset?: string | undefined;
+ /**
+ * Unix timestamp for when the media item was last viewed.
+ */
+ lastViewedAt?: number | undefined;
+ /**
+ * The rating provided by a user for the item. This value is expressed as a decimal number.
+ */
+ userRating?: number | undefined;
+ image?: Array | undefined;
+ ultraBlurColors?: GetLibraryItemsUltraBlurColors | undefined;
+ guids?: Array | undefined;
+ /**
+ * The identifier for the library section.
+ */
+ librarySectionID?: number | undefined;
+ /**
+ * The title of the library section.
+ */
+ librarySectionTitle?: string | undefined;
+ /**
+ * The key corresponding to the library section.
+ */
+ librarySectionKey?: string | undefined;
+ /**
+ * Setting that indicates the episode ordering for the show.
+ *
+ * @remarks
+ * Options:
+ * - None = Library default
+ * - tmdbAiring = The Movie Database (Aired)
+ * - aired = TheTVDB (Aired)
+ * - dvd = TheTVDB (DVD)
+ * - absolute = TheTVDB (Absolute)
+ */
+ showOrdering?: ShowOrderingOpen | undefined;
+ /**
+ * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
+ *
+ * @remarks
+ */
+ flattenSeasons?: FlattenSeasonsOpen | undefined;
+ /**
+ * Indicates whether child items should be skipped.
+ */
+ skipChildren?: boolean | undefined;
+ media?: Array | undefined;
+ genre?: Array | undefined;
+ country?: Array | undefined;
+ director?: Array | undefined;
+ writer?: Array | undefined;
+ producer?: Array | undefined;
+ collection?: Array | undefined;
+ role?: Array | undefined;
+ ratings?: Array | undefined;
+ similar?: Array | undefined;
+ location?: Array | undefined;
+ chapter?: Array | undefined;
+ marker?: Array | undefined;
+ extras?: Extras | undefined;
+};
+
export type GetLibraryItemsFilter = {
filter: string;
filterType: string;
key: string;
title: string;
type: string;
- advanced?: boolean | undefined;
};
/**
@@ -205,10 +952,9 @@ export type GetLibraryItemsField = {
subType?: string | undefined;
};
-export type GetLibraryItemsType = {
+export type GetLibraryItemsLibraryType = {
key: string;
type: string;
- subtype?: string | undefined;
title: string;
active: boolean;
filter?: Array | undefined;
@@ -226,639 +972,97 @@ export type GetLibraryItemsFieldType = {
operator: Array;
};
-/**
- * The type of media content in the Plex library. This can represent videos, music, or photos.
- *
- * @remarks
- */
-export enum GetLibraryItemsLibraryType {
- Movie = "movie",
- TvShow = "show",
- Season = "season",
- Episode = "episode",
- Artist = "artist",
- Album = "album",
- Track = "track",
- PhotoAlbum = "photoalbum",
- Photo = "photo",
- Collection = "collection",
-}
-/**
- * The type of media content in the Plex library. This can represent videos, music, or photos.
- *
- * @remarks
- */
-export type GetLibraryItemsLibraryTypeOpen = OpenEnum<
- typeof GetLibraryItemsLibraryType
->;
-
-/**
- * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
- */
-export enum FlattenSeasons {
- LibraryDefault = "-1",
- Hide = "0",
- Show = "1",
-}
-/**
- * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
- */
-export type FlattenSeasonsOpen = OpenEnum;
-
-/**
- * Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
- */
-export enum EpisodeSort {
- LibraryDefault = "-1",
- OldestFirst = "0",
- NewestFirst = "1",
-}
-/**
- * Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
- */
-export type EpisodeSortOpen = OpenEnum;
-
-/**
- * Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
- */
-export enum EnableCreditsMarkerGeneration {
- LibraryDefault = "-1",
- Disabled = "0",
-}
-/**
- * Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
- */
-export type EnableCreditsMarkerGenerationOpen = OpenEnum<
- typeof EnableCreditsMarkerGeneration
->;
-
-/**
- * Setting that indicates the episode ordering for the show.
- *
- * @remarks
- * None = Library default,
- * tmdbAiring = The Movie Database (Aired),
- * aired = TheTVDB (Aired),
- * dvd = TheTVDB (DVD),
- * absolute = TheTVDB (Absolute)).
- */
-export enum ShowOrdering {
- None = "None",
- TmdbAiring = "tmdbAiring",
- TvdbAired = "aired",
- TvdbDvd = "dvd",
- TvdbAbsolute = "absolute",
-}
-/**
- * Setting that indicates the episode ordering for the show.
- *
- * @remarks
- * None = Library default,
- * tmdbAiring = The Movie Database (Aired),
- * aired = TheTVDB (Aired),
- * dvd = TheTVDB (DVD),
- * absolute = TheTVDB (Absolute)).
- */
-export type ShowOrderingOpen = OpenEnum;
-
-export enum GetLibraryItemsOptimizedForStreaming {
- Disable = 0,
- Enable = 1,
-}
-
-export enum GetLibraryItemsHasThumbnail {
- False = "0",
- True = "1",
-}
-
-export type GetLibraryItemsStream = {
- id: number;
- /**
- * Type of stream (1 = video, 2 = audio, 3 = subtitle)
- */
- streamType: number;
- /**
- * Indicates if this is the default stream
- */
- default?: boolean | undefined;
- /**
- * Indicates if the stream is selected
- */
- selected?: boolean | undefined;
- /**
- * Codec used by the stream
- */
- codec: string;
- /**
- * The index of the stream
- */
- index: number;
- /**
- * The bitrate of the stream in kbps
- */
- bitrate?: number | undefined;
- /**
- * The color primaries of the video stream
- */
- colorPrimaries?: string | undefined;
- /**
- * The color range of the video stream
- */
- colorRange?: string | undefined;
- /**
- * The color space of the video stream
- */
- colorSpace?: string | undefined;
- /**
- * The transfer characteristics (TRC) of the video stream
- */
- colorTrc?: string | undefined;
- /**
- * The bit depth of the video stream
- */
- bitDepth?: number | undefined;
- /**
- * The chroma location of the video stream
- */
- chromaLocation?: string | undefined;
- /**
- * The identifier of the video stream
- */
- streamIdentifier?: string | undefined;
- /**
- * The chroma subsampling format
- */
- chromaSubsampling?: string | undefined;
- /**
- * The coded height of the video stream
- */
- codedHeight?: number | undefined;
- /**
- * The coded width of the video stream
- */
- codedWidth?: number | undefined;
- /**
- * The frame rate of the video stream
- */
- frameRate?: number | undefined;
- /**
- * Indicates if the stream has a scaling matrix
- */
- hasScalingMatrix?: boolean | undefined;
- hearingImpaired?: boolean | undefined;
- closedCaptions?: boolean | undefined;
- embeddedInVideo?: string | undefined;
- /**
- * The height of the video stream
- */
- height?: number | undefined;
- /**
- * The level of the video codec
- */
- level?: number | undefined;
- /**
- * The profile of the video codec
- */
- profile?: string | undefined;
- /**
- * Number of reference frames
- */
- refFrames?: number | undefined;
- /**
- * The scan type (progressive or interlaced)
- */
- scanType?: string | undefined;
- /**
- * The width of the video stream
- */
- width?: number | undefined;
- /**
- * Display title of the stream
- */
- displayTitle?: string | undefined;
- /**
- * Extended display title of the stream
- */
- extendedDisplayTitle?: string | undefined;
- /**
- * Number of audio channels (for audio streams)
- */
- channels?: number | undefined;
- /**
- * The language of the stream (for audio/subtitle streams)
- */
- language?: string | undefined;
- /**
- * Language tag of the stream
- */
- languageTag?: string | undefined;
- /**
- * Language code of the stream
- */
- languageCode?: string | undefined;
- /**
- * The audio channel layout
- */
- audioChannelLayout?: string | undefined;
- /**
- * Sampling rate of the audio stream in Hz
- */
- samplingRate?: number | undefined;
- /**
- * Title of the subtitle track (for subtitle streams)
- */
- title?: string | undefined;
- /**
- * Indicates if the subtitle stream can auto-sync
- */
- canAutoSync?: boolean | undefined;
-};
-
-export type GetLibraryItemsPart = {
- id: number;
- key: string;
- duration?: number | undefined;
- file: string;
- size: number;
- /**
- * The container format of the media file.
- *
- * @remarks
- */
- container: string;
- audioProfile?: string | undefined;
- has64bitOffsets?: boolean | undefined;
- optimizedForStreaming?: boolean | undefined;
- videoProfile?: string | undefined;
- indexes?: string | undefined;
- hasThumbnail?: GetLibraryItemsHasThumbnail | undefined;
- stream?: Array | undefined;
-};
-
-export type GetLibraryItemsMedia = {
- id: number;
- duration?: number | undefined;
- bitrate?: number | undefined;
- width?: number | undefined;
- height?: number | undefined;
- aspectRatio?: number | undefined;
- audioProfile?: string | undefined;
- audioChannels?: number | undefined;
- audioCodec?: string | undefined;
- videoCodec?: string | undefined;
- videoResolution?: string | undefined;
- container: string;
- videoFrameRate?: string | undefined;
- videoProfile?: string | undefined;
- hasVoiceActivity?: boolean | undefined;
- optimizedForStreaming?: GetLibraryItemsOptimizedForStreaming | undefined;
- has64bitOffsets?: boolean | undefined;
- part: Array;
-};
-
-export type GetLibraryItemsGenre = {
- tag?: string | undefined;
-};
-
-export type GetLibraryItemsCountry = {
- tag?: string | undefined;
-};
-
-export type GetLibraryItemsDirector = {
- tag?: string | undefined;
-};
-
-export type GetLibraryItemsWriter = {
- tag?: string | undefined;
-};
-
-export type GetLibraryItemsCollection = {
- tag?: string | undefined;
-};
-
-export type GetLibraryItemsRole = {
- /**
- * The ID of the tag or actor.
- */
- id?: number | undefined;
- /**
- * The filter used to find the actor or tag.
- */
- filter?: string | undefined;
- /**
- * The thumbnail of the actor
- */
- thumb?: string | undefined;
- /**
- * The name of the tag or actor.
- */
- tag?: string | undefined;
- /**
- * Unique identifier for the tag.
- */
- tagKey?: string | undefined;
- /**
- * The role of the actor or tag in the media.
- */
- role?: string | undefined;
-};
-
-export type GetLibraryItemsLocation = {
- path?: string | undefined;
-};
-
-export type MediaGuid = {
- /**
- * Can be one of the following formats:
- *
- * @remarks
- * imdb://tt13015952, tmdb://2434012, tvdb://7945991
- */
- id: string;
-};
-
-export type GetLibraryItemsUltraBlurColors = {
- topLeft: string;
- topRight: string;
- bottomRight: string;
- bottomLeft: string;
-};
-
-export type MetaDataRating = {
- /**
- * A URI or path to the rating image.
- */
- image: string;
- /**
- * The value of the rating.
- */
- value: number;
- /**
- * The type of rating (e.g., audience, critic).
- */
- type: string;
-};
-
-export enum GetLibraryItemsLibraryResponse200Type {
- CoverPoster = "coverPoster",
- Background = "background",
- Snapshot = "snapshot",
- ClearLogo = "clearLogo",
-}
-export type GetLibraryItemsLibraryResponse200TypeOpen = OpenEnum<
- typeof GetLibraryItemsLibraryResponse200Type
->;
-
-export type GetLibraryItemsImage = {
- alt: string;
- type: GetLibraryItemsLibraryResponse200TypeOpen;
- url: string;
-};
-
-export type GetLibraryItemsMetadata = {
- /**
- * The rating key (Media ID) of this media item.
- *
- * @remarks
- * Note: This is always an integer, but is represented as a string in the API.
- */
- ratingKey: string;
- key: string;
- guid: string;
- studio?: string | undefined;
- skipChildren?: boolean | undefined;
- librarySectionID?: number | undefined;
- librarySectionTitle?: string | undefined;
- librarySectionKey?: string | undefined;
- /**
- * The type of media content in the Plex library. This can represent videos, music, or photos.
- *
- * @remarks
- */
- type: GetLibraryItemsLibraryTypeOpen;
- title: string;
- slug?: string | undefined;
- contentRating?: string | undefined;
- summary: string;
- rating?: number | undefined;
- audienceRating?: number | undefined;
- year?: number | undefined;
- seasonCount?: number | undefined;
- tagline?: string | undefined;
- /**
- * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
- */
- flattenSeasons?: FlattenSeasonsOpen | undefined;
- /**
- * Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
- */
- episodeSort?: EpisodeSortOpen | undefined;
- /**
- * Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
- */
- enableCreditsMarkerGeneration?: EnableCreditsMarkerGenerationOpen | undefined;
- /**
- * Setting that indicates the episode ordering for the show.
- *
- * @remarks
- * None = Library default,
- * tmdbAiring = The Movie Database (Aired),
- * aired = TheTVDB (Aired),
- * dvd = TheTVDB (DVD),
- * absolute = TheTVDB (Absolute)).
- */
- showOrdering?: ShowOrderingOpen | undefined;
- thumb?: string | undefined;
- art?: string | undefined;
- banner?: string | undefined;
- duration?: number | undefined;
- originallyAvailableAt?: RFCDate | undefined;
- /**
- * Unix epoch datetime in seconds
- */
- addedAt: number;
- /**
- * Unix epoch datetime in seconds
- */
- updatedAt?: number | undefined;
- audienceRatingImage?: string | undefined;
- chapterSource?: string | undefined;
- primaryExtraKey?: string | undefined;
- ratingImage?: string | undefined;
- grandparentRatingKey?: string | undefined;
- grandparentGuid?: string | undefined;
- grandparentKey?: string | undefined;
- grandparentTitle?: string | undefined;
- grandparentThumb?: string | undefined;
- parentSlug?: string | undefined;
- grandparentSlug?: string | undefined;
- grandparentArt?: string | undefined;
- grandparentTheme?: string | undefined;
- /**
- * The Media object is only included when type query is `4` or higher.
- *
- * @remarks
- */
- media?: Array | undefined;
- genre?: Array | undefined;
- country?: Array | undefined;
- director?: Array | undefined;
- writer?: Array | undefined;
- collection?: Array | undefined;
- role?: Array | undefined;
- location?: Array | undefined;
- /**
- * The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.
- *
- * @remarks
- */
- mediaGuid?: Array | undefined;
- ultraBlurColors?: GetLibraryItemsUltraBlurColors | undefined;
- metaDataRating?: Array | undefined;
- image?: Array | undefined;
- titleSort?: string | undefined;
- viewCount?: number | undefined;
- lastViewedAt?: number | undefined;
- originalTitle?: string | undefined;
- viewOffset?: number | undefined;
- skipCount?: number | undefined;
- index?: number | undefined;
- theme?: string | undefined;
- leafCount?: number | undefined;
- viewedLeafCount?: number | undefined;
- childCount?: number | undefined;
- hasPremiumExtras?: string | undefined;
- hasPremiumPrimaryExtra?: string | undefined;
- /**
- * The rating key of the parent item.
- *
- * @remarks
- */
- parentRatingKey?: string | undefined;
- parentGuid?: string | undefined;
- parentStudio?: string | undefined;
- parentKey?: string | undefined;
- parentTitle?: string | undefined;
- parentIndex?: number | undefined;
- parentYear?: number | undefined;
- parentThumb?: string | undefined;
- parentTheme?: string | undefined;
-};
-
-export type GetLibraryItemsLibraryFilter = {
- filter: string;
- filterType: string;
- key: string;
- title: string;
- type: string;
-};
-
-/**
- * The direction of the sort. Can be either `asc` or `desc`.
- *
- * @remarks
- */
-export enum GetLibraryItemsLibraryActiveDirection {
- Ascending = "asc",
- Descending = "desc",
-}
-
-/**
- * The direction of the sort. Can be either `asc` or `desc`.
- *
- * @remarks
- */
-export enum GetLibraryItemsLibraryDefaultDirection {
- Ascending = "asc",
- Descending = "desc",
-}
-
-export type GetLibraryItemsLibrarySort = {
- default?: string | undefined;
- active?: boolean | undefined;
- /**
- * The direction of the sort. Can be either `asc` or `desc`.
- *
- * @remarks
- */
- activeDirection?: GetLibraryItemsLibraryActiveDirection | undefined;
- /**
- * The direction of the sort. Can be either `asc` or `desc`.
- *
- * @remarks
- */
- defaultDirection?: GetLibraryItemsLibraryDefaultDirection | undefined;
- descKey?: string | undefined;
- firstCharacterKey?: string | undefined;
- key: string;
- title: string;
-};
-
-export type GetLibraryItemsLibraryField = {
- key: string;
- title: string;
- type: string;
- subType?: string | undefined;
-};
-
-export type GetLibraryItemsLibraryResponseType = {
- key: string;
- type: string;
- title: string;
- active: boolean;
- filter?: Array | undefined;
- sort?: Array | undefined;
- field?: Array | undefined;
-};
-
-export type GetLibraryItemsLibraryOperator = {
- key: string;
- title: string;
-};
-
-export type GetLibraryItemsLibraryFieldType = {
- type: string;
- operator: Array;
-};
-
/**
* The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
*
* @remarks
*/
export type GetLibraryItemsMeta = {
- type?: Array | undefined;
- fieldType?: Array | undefined;
+ type?: Array | undefined;
+ fieldType?: Array | undefined;
};
-/**
- * The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
- *
- * @remarks
- */
export type GetLibraryItemsMediaContainer = {
- type?: Array | undefined;
- fieldType?: Array | undefined;
+ /**
+ * Number of media items returned in this response.
+ */
size: number;
+ /**
+ * Total number of media items in the library.
+ */
totalSize: number;
+ /**
+ * Offset value for pagination.
+ */
offset: number;
+ /**
+ * The content type or mode.
+ */
content: string;
+ /**
+ * Indicates whether syncing is allowed.
+ */
allowSync: boolean;
- nocache?: boolean | undefined;
+ /**
+ * Specifies whether caching is disabled.
+ */
+ nocache: boolean;
+ /**
+ * URL for the background artwork of the media container.
+ */
art: string;
+ /**
+ * An plugin identifier for the media container.
+ */
identifier: string;
- librarySectionID: number;
- librarySectionTitle: string;
- librarySectionUUID: string;
+ /**
+ * The unique identifier for the library section.
+ */
+ librarySectionID?: number | undefined;
+ /**
+ * The title of the library section.
+ */
+ librarySectionTitle?: string | undefined;
+ /**
+ * The universally unique identifier for the library section.
+ */
+ librarySectionUUID?: string | undefined;
+ /**
+ * The prefix used for media tag resource paths.
+ */
mediaTagPrefix: string;
+ /**
+ * The version number for media tags.
+ */
mediaTagVersion: number;
+ /**
+ * 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;
- viewMode?: number | undefined;
+ /**
+ * Identifier for the view mode.
+ */
+ viewMode?: string | undefined;
+ /**
+ * Indicates if the media container has mixed parents.
+ */
mixedParents?: boolean | undefined;
- metadata?: Array | undefined;
+ /**
+ * An array of metadata items.
+ */
+ metadata: Array;
/**
* The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
*
@@ -1077,6 +1281,1890 @@ export function getLibraryItemsRequestFromJSON(
);
}
+/** @internal */
+export const GetLibraryItemsType$inboundSchema: z.ZodType<
+ GetLibraryItemsTypeOpen,
+ z.ZodTypeDef,
+ unknown
+> = z
+ .union([
+ z.nativeEnum(GetLibraryItemsType),
+ z.string().transform(catchUnrecognizedEnum),
+ ]);
+
+/** @internal */
+export const GetLibraryItemsType$outboundSchema: z.ZodType<
+ GetLibraryItemsTypeOpen,
+ z.ZodTypeDef,
+ GetLibraryItemsTypeOpen
+> = z.union([
+ z.nativeEnum(GetLibraryItemsType),
+ 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 GetLibraryItemsType$ {
+ /** @deprecated use `GetLibraryItemsType$inboundSchema` instead. */
+ export const inboundSchema = GetLibraryItemsType$inboundSchema;
+ /** @deprecated use `GetLibraryItemsType$outboundSchema` instead. */
+ export const outboundSchema = GetLibraryItemsType$outboundSchema;
+}
+
+/** @internal */
+export const GetLibraryItemsLibraryResponseType$inboundSchema: z.ZodType<
+ GetLibraryItemsLibraryResponseTypeOpen,
+ z.ZodTypeDef,
+ unknown
+> = z
+ .union([
+ z.nativeEnum(GetLibraryItemsLibraryResponseType),
+ z.string().transform(catchUnrecognizedEnum),
+ ]);
+
+/** @internal */
+export const GetLibraryItemsLibraryResponseType$outboundSchema: z.ZodType<
+ GetLibraryItemsLibraryResponseTypeOpen,
+ z.ZodTypeDef,
+ GetLibraryItemsLibraryResponseTypeOpen
+> = z.union([
+ z.nativeEnum(GetLibraryItemsLibraryResponseType),
+ 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 GetLibraryItemsLibraryResponseType$ {
+ /** @deprecated use `GetLibraryItemsLibraryResponseType$inboundSchema` instead. */
+ export const inboundSchema = GetLibraryItemsLibraryResponseType$inboundSchema;
+ /** @deprecated use `GetLibraryItemsLibraryResponseType$outboundSchema` instead. */
+ export const outboundSchema =
+ GetLibraryItemsLibraryResponseType$outboundSchema;
+}
+
+/** @internal */
+export const GetLibraryItemsImage$inboundSchema: z.ZodType<
+ GetLibraryItemsImage,
+ z.ZodTypeDef,
+ unknown
+> = z.object({
+ alt: z.string(),
+ type: GetLibraryItemsLibraryResponseType$inboundSchema,
+ url: z.string(),
+});
+
+/** @internal */
+export type GetLibraryItemsImage$Outbound = {
+ alt: string;
+ type: string;
+ url: string;
+};
+
+/** @internal */
+export const GetLibraryItemsImage$outboundSchema: z.ZodType<
+ GetLibraryItemsImage$Outbound,
+ z.ZodTypeDef,
+ GetLibraryItemsImage
+> = z.object({
+ alt: z.string(),
+ type: GetLibraryItemsLibraryResponseType$outboundSchema,
+ url: 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 GetLibraryItemsImage$ {
+ /** @deprecated use `GetLibraryItemsImage$inboundSchema` instead. */
+ export const inboundSchema = GetLibraryItemsImage$inboundSchema;
+ /** @deprecated use `GetLibraryItemsImage$outboundSchema` instead. */
+ export const outboundSchema = GetLibraryItemsImage$outboundSchema;
+ /** @deprecated use `GetLibraryItemsImage$Outbound` instead. */
+ export type Outbound = GetLibraryItemsImage$Outbound;
+}
+
+export function getLibraryItemsImageToJSON(
+ getLibraryItemsImage: GetLibraryItemsImage,
+): string {
+ return JSON.stringify(
+ GetLibraryItemsImage$outboundSchema.parse(getLibraryItemsImage),
+ );
+}
+
+export function getLibraryItemsImageFromJSON(
+ jsonString: string,
+): SafeParseResult {
+ return safeParse(
+ jsonString,
+ (x) => GetLibraryItemsImage$inboundSchema.parse(JSON.parse(x)),
+ `Failed to parse 'GetLibraryItemsImage' from JSON`,
+ );
+}
+
+/** @internal */
+export const GetLibraryItemsUltraBlurColors$inboundSchema: z.ZodType<
+ GetLibraryItemsUltraBlurColors,
+ z.ZodTypeDef,
+ unknown
+> = z.object({
+ topLeft: z.string(),
+ topRight: z.string(),
+ bottomRight: z.string(),
+ bottomLeft: z.string(),
+});
+
+/** @internal */
+export type GetLibraryItemsUltraBlurColors$Outbound = {
+ topLeft: string;
+ topRight: string;
+ bottomRight: string;
+ bottomLeft: string;
+};
+
+/** @internal */
+export const GetLibraryItemsUltraBlurColors$outboundSchema: z.ZodType<
+ GetLibraryItemsUltraBlurColors$Outbound,
+ z.ZodTypeDef,
+ GetLibraryItemsUltraBlurColors
+> = z.object({
+ topLeft: z.string(),
+ topRight: z.string(),
+ bottomRight: z.string(),
+ bottomLeft: 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 GetLibraryItemsUltraBlurColors$ {
+ /** @deprecated use `GetLibraryItemsUltraBlurColors$inboundSchema` instead. */
+ export const inboundSchema = GetLibraryItemsUltraBlurColors$inboundSchema;
+ /** @deprecated use `GetLibraryItemsUltraBlurColors$outboundSchema` instead. */
+ export const outboundSchema = GetLibraryItemsUltraBlurColors$outboundSchema;
+ /** @deprecated use `GetLibraryItemsUltraBlurColors$Outbound` instead. */
+ export type Outbound = GetLibraryItemsUltraBlurColors$Outbound;
+}
+
+export function getLibraryItemsUltraBlurColorsToJSON(
+ getLibraryItemsUltraBlurColors: GetLibraryItemsUltraBlurColors,
+): string {
+ return JSON.stringify(
+ GetLibraryItemsUltraBlurColors$outboundSchema.parse(
+ getLibraryItemsUltraBlurColors,
+ ),
+ );
+}
+
+export function getLibraryItemsUltraBlurColorsFromJSON(
+ jsonString: string,
+): SafeParseResult {
+ return safeParse(
+ jsonString,
+ (x) => GetLibraryItemsUltraBlurColors$inboundSchema.parse(JSON.parse(x)),
+ `Failed to parse 'GetLibraryItemsUltraBlurColors' from JSON`,
+ );
+}
+
+/** @internal */
+export const GetLibraryItemsGuids$inboundSchema: z.ZodType<
+ GetLibraryItemsGuids,
+ z.ZodTypeDef,
+ unknown
+> = z.object({
+ id: z.string(),
+});
+
+/** @internal */
+export type GetLibraryItemsGuids$Outbound = {
+ id: string;
+};
+
+/** @internal */
+export const GetLibraryItemsGuids$outboundSchema: z.ZodType<
+ GetLibraryItemsGuids$Outbound,
+ z.ZodTypeDef,
+ GetLibraryItemsGuids
+> = z.object({
+ id: 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 GetLibraryItemsGuids$ {
+ /** @deprecated use `GetLibraryItemsGuids$inboundSchema` instead. */
+ export const inboundSchema = GetLibraryItemsGuids$inboundSchema;
+ /** @deprecated use `GetLibraryItemsGuids$outboundSchema` instead. */
+ export const outboundSchema = GetLibraryItemsGuids$outboundSchema;
+ /** @deprecated use `GetLibraryItemsGuids$Outbound` instead. */
+ export type Outbound = GetLibraryItemsGuids$Outbound;
+}
+
+export function getLibraryItemsGuidsToJSON(
+ getLibraryItemsGuids: GetLibraryItemsGuids,
+): string {
+ return JSON.stringify(
+ GetLibraryItemsGuids$outboundSchema.parse(getLibraryItemsGuids),
+ );
+}
+
+export function getLibraryItemsGuidsFromJSON(
+ jsonString: string,
+): SafeParseResult {
+ return safeParse(
+ jsonString,
+ (x) => GetLibraryItemsGuids$inboundSchema.parse(JSON.parse(x)),
+ `Failed to parse 'GetLibraryItemsGuids' from JSON`,
+ );
+}
+
+/** @internal */
+export const ShowOrdering$inboundSchema: z.ZodType<
+ ShowOrderingOpen,
+ z.ZodTypeDef,
+ unknown
+> = z
+ .union([
+ z.nativeEnum(ShowOrdering),
+ z.string().transform(catchUnrecognizedEnum),
+ ]);
+
+/** @internal */
+export const ShowOrdering$outboundSchema: z.ZodType<
+ ShowOrderingOpen,
+ z.ZodTypeDef,
+ ShowOrderingOpen
+> = z.union([
+ z.nativeEnum(ShowOrdering),
+ 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 ShowOrdering$ {
+ /** @deprecated use `ShowOrdering$inboundSchema` instead. */
+ export const inboundSchema = ShowOrdering$inboundSchema;
+ /** @deprecated use `ShowOrdering$outboundSchema` instead. */
+ export const outboundSchema = ShowOrdering$outboundSchema;
+}
+
+/** @internal */
+export const FlattenSeasons$inboundSchema: z.ZodType<
+ FlattenSeasonsOpen,
+ z.ZodTypeDef,
+ unknown
+> = z
+ .union([
+ z.nativeEnum(FlattenSeasons),
+ z.string().transform(catchUnrecognizedEnum),
+ ]);
+
+/** @internal */
+export const FlattenSeasons$outboundSchema: z.ZodType<
+ FlattenSeasonsOpen,
+ z.ZodTypeDef,
+ FlattenSeasonsOpen
+> = z.union([
+ z.nativeEnum(FlattenSeasons),
+ z.string().and(z.custom