diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index bd7de088..3170711d 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: 3ace1ac37c7117fbda261cad01e65943 + docChecksum: 911d74baa0d06121d2ce2c71d94e977a docVersion: 0.0.3 - speakeasyVersion: 1.285.1 - generationVersion: 2.326.3 - releaseVersion: 0.15.4 - configChecksum: e9e60c3ad9a0490906b386163e5ce5c6 + speakeasyVersion: 1.295.1 + generationVersion: 2.335.5 + releaseVersion: 0.16.0 + configChecksum: 3944bed5bdaa126637793fcb00b35913 repoURL: https://github.com/LukeHagar/plexjs.git repoSubDirectory: . installationURL: https://github.com/LukeHagar/plexjs @@ -15,7 +15,7 @@ features: typescript: additionalDependencies: 0.1.0 constsAndDefaults: 0.1.5 - core: 3.9.3 + core: 3.9.6 flattening: 2.81.1 globalSecurity: 2.82.9 globalSecurityCallbacks: 0.1.0 @@ -26,7 +26,6 @@ features: nameOverrides: 2.81.2 responseFormat: 0.2.3 sdkHooks: 0.1.0 - unions: 2.85.4 generatedFiles: - src/sdk/server.ts - src/sdk/media.ts @@ -54,6 +53,7 @@ generatedFiles: - src/lib/config.ts - src/lib/encodings.ts - src/lib/http.ts + - src/lib/primitives.ts - src/lib/retries.ts - src/lib/schemas.ts - src/lib/sdks.ts @@ -63,6 +63,7 @@ generatedFiles: - src/models/errors/sdkerror.ts - src/models/errors/sdkvalidationerror.ts - src/types/blobs.ts + - src/types/enums.ts - src/types/index.ts - src/types/operations.ts - src/types/rfcdate.ts @@ -97,6 +98,7 @@ generatedFiles: - src/models/operations/getlibraries.ts - src/models/operations/getlibrary.ts - src/models/operations/deletelibrary.ts + - src/models/operations/getlibraryitems.ts - src/models/operations/refreshlibrary.ts - src/models/operations/searchlibrary.ts - src/models/operations/getmetadata.ts @@ -156,7 +158,9 @@ generatedFiles: - src/models/errors/getlibraries.ts - src/models/errors/getlibrary.ts - src/models/errors/deletelibrary.ts + - src/models/errors/getlibraryitems.ts - src/models/errors/refreshlibrary.ts + - src/models/errors/searchlibrary.ts - src/models/errors/getmetadata.ts - src/models/errors/getmetadatachildren.ts - src/models/errors/getondeck.ts @@ -319,6 +323,19 @@ generatedFiles: - docs/models/operations/getlibraryresponse.md - docs/models/operations/deletelibraryrequest.md - docs/models/operations/deletelibraryresponse.md + - docs/models/operations/tag.md + - docs/models/operations/getlibraryitemsrequest.md + - docs/models/operations/getlibraryitemspart.md + - docs/models/operations/getlibraryitemsmedia.md + - docs/models/operations/getlibraryitemsgenre.md + - docs/models/operations/getlibraryitemscountry.md + - docs/models/operations/getlibraryitemsdirector.md + - docs/models/operations/getlibraryitemswriter.md + - docs/models/operations/getlibraryitemsrole.md + - docs/models/operations/getlibraryitemsmetadata.md + - docs/models/operations/getlibraryitemsmediacontainer.md + - docs/models/operations/getlibraryitemsresponsebody.md + - docs/models/operations/getlibraryitemsresponse.md - docs/models/operations/refreshlibraryrequest.md - docs/models/operations/refreshlibraryresponse.md - docs/models/operations/type.md @@ -362,10 +379,12 @@ generatedFiles: - docs/models/operations/loglineresponse.md - docs/models/operations/logmultilineresponse.md - docs/models/operations/enablepapertrailresponse.md + - docs/models/operations/getpinglobals.md - docs/models/operations/getpinrequest.md - docs/models/operations/location.md - docs/models/operations/getpinresponsebody.md - docs/models/operations/getpinresponse.md + - docs/models/operations/gettokenglobals.md - docs/models/operations/gettokenrequest.md - docs/models/operations/gettokenresponse.md - docs/models/operations/queryparamtype.md @@ -517,8 +536,12 @@ generatedFiles: - docs/models/errors/getlibraryresponsebody.md - docs/models/errors/deletelibraryerrors.md - docs/models/errors/deletelibraryresponsebody.md + - docs/models/errors/getlibraryitemserrors.md + - docs/models/errors/getlibraryitemsresponsebody.md - docs/models/errors/refreshlibraryerrors.md - docs/models/errors/refreshlibraryresponsebody.md + - docs/models/errors/searchlibraryerrors.md + - docs/models/errors/searchlibraryresponsebody.md - docs/models/errors/getmetadataerrors.md - docs/models/errors/getmetadataresponsebody.md - docs/models/errors/getmetadatachildrenerrors.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 69575590..e7fcb9fb 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false typescript: - version: 0.15.4 + version: 0.16.0 additionalDependencies: dependencies: {} devDependencies: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 050e9e6c..8a1c9abf 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.285.1 +speakeasyVersion: 1.295.1 sources: my-source: sourceNamespace: my-source - sourceRevisionDigest: sha256:b3e11a2f45042ee176faddb281b8ec8c3be19971c0633b370b8c59c373ccdbfc - sourceBlobDigest: sha256:275e3929dd5ea3825285d74ebd5c39faded4c996a0b84c09545615b31d1ca381 + sourceRevisionDigest: sha256:95fd08c8ca75c7996156c3b09c40a5ee8cad98b2fd2fd5c64af83701f5d8e118 + sourceBlobDigest: sha256:6760fb8647c9a4f02a2f3e23f563a2de660ae1fc5f6a36958bec130f731cbb01 tags: - latest - main @@ -11,8 +11,8 @@ targets: plexjs: source: my-source sourceNamespace: my-source - sourceRevisionDigest: sha256:b3e11a2f45042ee176faddb281b8ec8c3be19971c0633b370b8c59c373ccdbfc - sourceBlobDigest: sha256:275e3929dd5ea3825285d74ebd5c39faded4c996a0b84c09545615b31d1ca381 + sourceRevisionDigest: sha256:95fd08c8ca75c7996156c3b09c40a5ee8cad98b2fd2fd5c64af83701f5d8e118 + sourceBlobDigest: sha256:6760fb8647c9a4f02a2f3e23f563a2de660ae1fc5f6a36958bec130f731cbb01 outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 diff --git a/README.md b/README.md index 3a3190b0..29c4100f 100644 --- a/README.md +++ b/README.md @@ -104,6 +104,7 @@ run(); * [getLibraries](docs/sdks/library/README.md#getlibraries) - Get All Libraries * [getLibrary](docs/sdks/library/README.md#getlibrary) - Get Library Details * [deleteLibrary](docs/sdks/library/README.md#deletelibrary) - Delete Library Section +* [getLibraryItems](docs/sdks/library/README.md#getlibraryitems) - Get Library Items * [refreshLibrary](docs/sdks/library/README.md#refreshlibrary) - Refresh Library * [searchLibrary](docs/sdks/library/README.md#searchlibrary) - Search Library * [getMetadata](docs/sdks/library/README.md#getmetadata) - Get Items Metadata diff --git a/RELEASES.md b/RELEASES.md index b216e5d4..12af1756 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -568,4 +568,14 @@ Based on: ### Generated - [typescript v0.15.4] . ### Releases -- [NPM v0.15.4] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.15.4 - . \ No newline at end of file +- [NPM v0.15.4] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.15.4 - . + +## 2024-05-23 15:56:57 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.295.1 (2.335.5) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.16.0] . +### Releases +- [NPM v0.16.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.16.0 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index 41a93248..cfe27695 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -3,11 +3,11 @@ info: title: CodeSamples overlay for typescript target version: 0.0.0 actions: - - target: $["paths"]["/search"]["get"] + - target: $["paths"]["/myplex/account"]["get"] update: x-codeSamples: - lang: typescript - label: getSearchResults + label: getMyPlexAccount source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -17,70 +17,7 @@ actions: }); async function run() { - const result = await plexAPI.getSearchResults("110"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/library/metadata/{ratingKey}"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getMetadata - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getMetadata(8382.31); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/statistics/media"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getStatistics - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getStatistics(4); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/playlists/{playlistID}/items"]["delete"] - update: - x-codeSamples: - - lang: typescript - label: clearPlaylistContents - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.clearPlaylistContents(1893.18); + const result = await plexAPI.server.getMyPlexAccount(); // Handle the result console.log(result) @@ -102,50 +39,7 @@ actions: }); async function run() { - const result = await plexAPI.uploadPlaylist("/home/barkley/playlist.m3u", Force.Zero); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/updater/apply"]["put"] - update: - x-codeSamples: - - lang: typescript - label: applyUpdates - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - import { Skip, Tonight } from "@lukehagar/plexjs/models/operations"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.applyUpdates(Tonight.One, Skip.One); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/devices"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getDevices - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getDevices(); + const result = await plexAPI.playlists.uploadPlaylist("/home/barkley/playlist.m3u", Force.Zero); // Handle the result console.log(result) @@ -167,283 +61,7 @@ actions: }); async function run() { - const result = await plexAPI.getTransientToken(GetTransientTokenQueryParamType.Delegation, Scope.All); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getServerCapabilities - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getServerCapabilities(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/library/sections/{sectionId}/refresh"]["get"] - update: - x-codeSamples: - - lang: typescript - label: refreshLibrary - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.refreshLibrary(934.16); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/log"]["post"] - update: - x-codeSamples: - - lang: typescript - label: logMultiLine - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.logMultiLine("level=4&message=Test%20message%201&source=postman - level=3&message=Test%20message%202&source=postman - level=1&message=Test%20message%203&source=postman"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/security/resources"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getSourceConnectionInformation - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getSourceConnectionInformation("server://client-identifier"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/status/sessions"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getSessions - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getSessions(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/transcode/sessions"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getTranscodeSessions - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getTranscodeSessions(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/hubs/search/voice"]["get"] - update: - x-codeSamples: - - lang: typescript - label: performVoiceSearch - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.performVoiceSearch("dead+poop", 4094.8, 5); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/library/sections/{sectionId}"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getLibrary - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - import { IncludeDetails } from "@lukehagar/plexjs/models/operations"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getLibrary(1000, IncludeDetails.Zero); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/playlists/{playlistID}"]["put"] - update: - x-codeSamples: - - lang: typescript - label: updatePlaylist - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.updatePlaylist(3915, "", ""); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/activities"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getServerActivities - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getServerActivities(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/butler"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getButlerTasks - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getButlerTasks(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/transcode/sessions/{sessionKey}"]["delete"] - update: - x-codeSamples: - - lang: typescript - label: stopTranscodeSession - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.stopTranscodeSession("zz7llzqlx8w9vnrsbnwhbmep"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/playlists/{playlistID}/items"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getPlaylistContents - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getPlaylistContents(5004.46, 9403.59); + const result = await plexAPI.authentication.getTransientToken(GetTransientTokenQueryParamType.Delegation, Scope.All); // Handle the result console.log(result) @@ -464,20 +82,21 @@ actions: }); async function run() { - const result = await plexAPI.getServerPreferences(); + const result = await plexAPI.server.getServerPreferences(); // Handle the result console.log(result) } run(); - - target: $["paths"]["/:/unscrobble"]["get"] + - target: $["paths"]["/photo/:/transcode"]["get"] update: x-codeSamples: - lang: typescript - label: markUnplayed + label: getResizedPhoto source: |- import { PlexAPI } from "@lukehagar/plexjs"; + import { MinSize, Upscale } from "@lukehagar/plexjs/models/operations"; const plexAPI = new PlexAPI({ accessToken: "", @@ -485,293 +104,14 @@ actions: }); async function run() { - const result = await plexAPI.markUnplayed(59398); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/butler"]["delete"] - update: - x-codeSamples: - - lang: typescript - label: stopAllTasks - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.stopAllTasks(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/library/sections/{sectionId}/search"]["get"] - update: - x-codeSamples: - - lang: typescript - label: searchLibrary - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - import { Type } from "@lukehagar/plexjs/models/operations"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.searchLibrary(933505, Type.Four); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/log"]["get"] - update: - x-codeSamples: - - lang: typescript - label: logLine - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - import { Level } from "@lukehagar/plexjs/models/operations"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.logLine(Level.Three, "Test log message", "Postman"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/:/progress"]["post"] - update: - x-codeSamples: - - lang: typescript - label: updatePlayProgress - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.updatePlayProgress("", 90000, "played"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/butler"]["post"] - update: - x-codeSamples: - - lang: typescript - label: startAllTasks - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.startAllTasks(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/hubs/sections/{sectionId}"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getLibraryHubs - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - import { QueryParamOnlyTransient } from "@lukehagar/plexjs/models/operations"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getLibraryHubs(6728.76, 9010.22, QueryParamOnlyTransient.Zero); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/pins/{pinID}"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getToken - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getToken("", "Postman"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/playlists"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getPlaylists - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - import { PlaylistType, QueryParamSmart } from "@lukehagar/plexjs/models/operations"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getPlaylists(PlaylistType.Audio, QueryParamSmart.Zero); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/status/sessions/history/all"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getSessionHistory - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getSessionHistory(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/updater/status"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getUpdateStatus - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getUpdateStatus(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/:/scrobble"]["get"] - update: - x-codeSamples: - - lang: typescript - label: markPlayed - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.markPlayed(59398); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/pins"]["post"] - update: - x-codeSamples: - - lang: typescript - label: getPin - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getPin(false, "Postman"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/:/timeline"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getTimeline - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - import { State } from "@lukehagar/plexjs/models/operations"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getTimeline({ - ratingKey: 23409, - key: "/library/metadata/23409", - state: State.Playing, - hasMDE: 1, - time: 2000, - duration: 10000, - context: "home:hub.continueWatching", - playQueueItemID: 1, - playBackTime: 2000, - row: 1, + const result = await plexAPI.server.getResizedPhoto({ + width: 110, + height: 165, + opacity: 100, + blur: 20, + minSize: MinSize.One, + upscale: Upscale.Zero, + url: "/library/metadata/49564/thumb/1654258204", }); // Handle the result @@ -794,18 +134,18 @@ actions: }); async function run() { - const result = await plexAPI.getGlobalHubs(1262.49, OnlyTransient.One); + const result = await plexAPI.hubs.getGlobalHubs(1262.49, OnlyTransient.One); // Handle the result console.log(result) } run(); - - target: $["paths"]["/playlists/{playlistID}"]["delete"] + - target: $["paths"]["/playlists/{playlistID}/items"]["get"] update: x-codeSamples: - lang: typescript - label: deletePlaylist + label: getPlaylistContents source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -815,97 +155,7 @@ actions: }); async function run() { - const result = await plexAPI.deletePlaylist(216.22); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/clients"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getAvailableClients - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getAvailableClients(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/library/hashes"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getFileHash - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getFileHash("file://C:\Image.png&type=13", 4462.17); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/library/recentlyAdded"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getRecentlyAdded - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getRecentlyAdded(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/playlists"]["post"] - update: - x-codeSamples: - - lang: typescript - label: createPlaylist - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - import { QueryParamType, Smart } from "@lukehagar/plexjs/models/operations"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.createPlaylist({ - title: "", - type: QueryParamType.Photo, - smart: Smart.One, - uri: "https://inborn-brochure.biz", - }); + const result = await plexAPI.playlists.getPlaylistContents(5004.46, 9403.59); // Handle the result console.log(result) @@ -926,18 +176,18 @@ actions: }); async function run() { - const result = await plexAPI.getPlaylist(4109.48); + const result = await plexAPI.playlists.getPlaylist(4109.48); // Handle the result console.log(result) } run(); - - target: $["paths"]["/playlists/{playlistID}/items"]["put"] + - target: $["paths"]["/"]["get"] update: x-codeSamples: - lang: typescript - label: addPlaylistContents + label: getServerCapabilities source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -947,7 +197,198 @@ actions: }); async function run() { - const result = await plexAPI.addPlaylistContents(8502.01, "server://12345/com.plexapp.plugins.library/library/metadata/1", 123); + const result = await plexAPI.server.getServerCapabilities(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/devices"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getDevices + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.server.getDevices(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/servers"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getServerList + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.server.getServerList(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/butler"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: stopAllTasks + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.butler.stopAllTasks(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/{tag}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getLibraryItems + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { Tag } from "@lukehagar/plexjs/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.library.getLibraryItems(1, Tag.Genre); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/library/metadata/{ratingKey}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getMetadata + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.library.getMetadata(8382.31); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/library/onDeck"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getOnDeck + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.library.getOnDeck(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/updater/apply"]["put"] + update: + x-codeSamples: + - lang: typescript + label: applyUpdates + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { Skip, Tonight } from "@lukehagar/plexjs/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.updater.applyUpdates(Tonight.One, Skip.One); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/butler"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getButlerTasks + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.butler.getButlerTasks(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/library/sections"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getLibraries + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.library.getLibraries(); // Handle the result console.log(result) @@ -968,7 +409,7 @@ actions: }); async function run() { - const result = await plexAPI.startUniversalTranscode({ + const result = await plexAPI.video.startUniversalTranscode({ hasMDE: 1, path: "/library/metadata/23409", mediaIndex: 0, @@ -991,6 +432,281 @@ actions: console.log(result) } + run(); + - target: $["paths"]["/library/sections/{sectionId}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getLibrary + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { IncludeDetails } from "@lukehagar/plexjs/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.library.getLibrary(1000, IncludeDetails.Zero); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/playlists/{playlistID}/items"]["put"] + update: + x-codeSamples: + - lang: typescript + label: addPlaylistContents + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.playlists.addPlaylistContents(8502.01, "server://12345/com.plexapp.plugins.library/library/metadata/1", 123); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/library/metadata/{ratingKey}/children"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getMetadataChildren + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.library.getMetadataChildren(1539.14); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/log"]["get"] + update: + x-codeSamples: + - lang: typescript + label: logLine + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { Level } from "@lukehagar/plexjs/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.log.logLine(Level.Three, "Test log message", "Postman"); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/pins/{pinID}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getToken + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.plex.getToken("", "Postman"); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/playlists/{playlistID}"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: deletePlaylist + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.playlists.deletePlaylist(216.22); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/security/resources"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getSourceConnectionInformation + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.authentication.getSourceConnectionInformation("server://client-identifier"); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/statistics/media"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getStatistics + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.statistics.getStatistics(4); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/clients"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getAvailableClients + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.server.getAvailableClients(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/hubs/sections/{sectionId}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getLibraryHubs + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { QueryParamOnlyTransient } from "@lukehagar/plexjs/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.hubs.getLibraryHubs(6728.76, 9010.22, QueryParamOnlyTransient.Zero); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/refresh"]["get"] + update: + x-codeSamples: + - lang: typescript + label: refreshLibrary + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.library.refreshLibrary(934.16); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/playlists/{playlistID}/items"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: clearPlaylistContents + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.playlists.clearPlaylistContents(1893.18); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/updater/status"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getUpdateStatus + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.updater.getUpdateStatus(); + + // Handle the result + console.log(result) + } + run(); - target: $["paths"]["/butler/{taskName}"]["delete"] update: @@ -1007,18 +723,18 @@ actions: }); async function run() { - const result = await plexAPI.stopTask(PathParamTaskName.BackupDatabase); + const result = await plexAPI.butler.stopTask(PathParamTaskName.BackupDatabase); // Handle the result console.log(result) } run(); - - target: $["paths"]["/hubs/search"]["get"] + - target: $["paths"]["/search"]["get"] update: x-codeSamples: - lang: typescript - label: performSearch + label: getSearchResults source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -1028,18 +744,38 @@ actions: }); async function run() { - const result = await plexAPI.performSearch("dylan", 1516.53, 5); + const result = await plexAPI.search.getSearchResults("110"); // Handle the result console.log(result) } run(); - - target: $["paths"]["/library/onDeck"]["get"] + - target: $["paths"]["/pins"]["post"] update: x-codeSamples: - lang: typescript - label: getOnDeck + label: getPin + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.plex.getPin(false, "Postman"); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/transcode/sessions/{sessionKey}"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: stopTranscodeSession source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -1049,18 +785,18 @@ actions: }); async function run() { - const result = await plexAPI.getOnDeck(); + const result = await plexAPI.sessions.stopTranscodeSession("zz7llzqlx8w9vnrsbnwhbmep"); // Handle the result console.log(result) } run(); - - target: $["paths"]["/identity"]["get"] + - target: $["paths"]["/:/scrobble"]["get"] update: x-codeSamples: - lang: typescript - label: getServerIdentity + label: markPlayed source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -1070,7 +806,7 @@ actions: }); async function run() { - const result = await plexAPI.getServerIdentity(); + const result = await plexAPI.media.markPlayed(59398); // Handle the result console.log(result) @@ -1091,40 +827,18 @@ actions: }); async function run() { - const result = await plexAPI.deleteLibrary(1000); + const result = await plexAPI.library.deleteLibrary(1000); // Handle the result console.log(result) } run(); - - target: $["paths"]["/updater/check"]["put"] + - target: $["paths"]["/playlists/{playlistID}"]["put"] update: x-codeSamples: - lang: typescript - label: checkForUpdates - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - import { Download } from "@lukehagar/plexjs/models/operations"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.checkForUpdates(Download.One); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/myplex/account"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getMyPlexAccount + label: updatePlaylist source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -1134,79 +848,7 @@ actions: }); async function run() { - const result = await plexAPI.getMyPlexAccount(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/photo/:/transcode"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getResizedPhoto - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - import { MinSize, Upscale } from "@lukehagar/plexjs/models/operations"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getResizedPhoto({ - width: 110, - height: 165, - opacity: 100, - blur: 20, - minSize: MinSize.One, - upscale: Upscale.Zero, - url: "/library/metadata/49564/thumb/1654258204", - }); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/servers"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getServerList - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getServerList(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/activities/{activityUUID}"]["delete"] - update: - x-codeSamples: - - lang: typescript - label: cancelServerActivities - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.cancelServerActivities("25b71ed5-0f9d-461c-baa7-d404e9e10d3e"); + const result = await plexAPI.playlists.updatePlaylist(3915, "", ""); // Handle the result console.log(result) @@ -1228,18 +870,18 @@ actions: }); async function run() { - const result = await plexAPI.startTask(TaskName.CleanOldBundles); + const result = await plexAPI.butler.startTask(TaskName.CleanOldBundles); // Handle the result console.log(result) } run(); - - target: $["paths"]["/library/sections"]["get"] + - target: $["paths"]["/log"]["post"] update: x-codeSamples: - lang: typescript - label: getLibraries + label: logMultiLine source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -1249,18 +891,20 @@ actions: }); async function run() { - const result = await plexAPI.getLibraries(); + const result = await plexAPI.log.logMultiLine("level=4&message=Test%20message%201&source=postman + level=3&message=Test%20message%202&source=postman + level=1&message=Test%20message%203&source=postman"); // Handle the result console.log(result) } run(); - - target: $["paths"]["/library/metadata/{ratingKey}/children"]["get"] + - target: $["paths"]["/transcode/sessions"]["get"] update: x-codeSamples: - lang: typescript - label: getMetadataChildren + label: getTranscodeSessions source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -1270,7 +914,125 @@ actions: }); async function run() { - const result = await plexAPI.getMetadataChildren(1539.14); + const result = await plexAPI.sessions.getTranscodeSessions(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/updater/check"]["put"] + update: + x-codeSamples: + - lang: typescript + label: checkForUpdates + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { Download } from "@lukehagar/plexjs/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.updater.checkForUpdates(Download.One); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/identity"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getServerIdentity + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.server.getServerIdentity(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/:/timeline"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getTimeline + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { State } from "@lukehagar/plexjs/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.video.getTimeline({ + ratingKey: 23409, + key: "/library/metadata/23409", + state: State.Playing, + hasMDE: 1, + time: 2000, + duration: 10000, + context: "home:hub.continueWatching", + playQueueItemID: 1, + playBackTime: 2000, + row: 1, + }); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/activities"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getServerActivities + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.activities.getServerActivities(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/hubs/search"]["get"] + update: + x-codeSamples: + - lang: typescript + label: performSearch + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.search.performSearch("dylan", 1516.53, 5); // Handle the result console.log(result) @@ -1291,7 +1053,267 @@ actions: }); async function run() { - const result = await plexAPI.enablePaperTrail(); + const result = await plexAPI.log.enablePaperTrail(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/playlists"]["post"] + update: + x-codeSamples: + - lang: typescript + label: createPlaylist + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { QueryParamType, Smart } from "@lukehagar/plexjs/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.playlists.createPlaylist({ + title: "", + type: QueryParamType.Photo, + smart: Smart.One, + uri: "https://inborn-brochure.biz", + }); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/playlists"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getPlaylists + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { PlaylistType, QueryParamSmart } from "@lukehagar/plexjs/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.playlists.getPlaylists(PlaylistType.Audio, QueryParamSmart.Zero); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/butler"]["post"] + update: + x-codeSamples: + - lang: typescript + label: startAllTasks + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.butler.startAllTasks(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/hubs/search/voice"]["get"] + update: + x-codeSamples: + - lang: typescript + label: performVoiceSearch + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.search.performVoiceSearch("dead+poop", 4094.8, 5); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/status/sessions"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getSessions + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.sessions.getSessions(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/activities/{activityUUID}"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: cancelServerActivities + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.activities.cancelServerActivities("25b71ed5-0f9d-461c-baa7-d404e9e10d3e"); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/library/hashes"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getFileHash + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.library.getFileHash("file://C:\Image.png&type=13", 4462.17); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/search"]["get"] + update: + x-codeSamples: + - lang: typescript + label: searchLibrary + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { Type } from "@lukehagar/plexjs/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.library.searchLibrary(933505, Type.Four); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/library/recentlyAdded"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getRecentlyAdded + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.library.getRecentlyAdded(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/:/unscrobble"]["get"] + update: + x-codeSamples: + - lang: typescript + label: markUnplayed + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.media.markUnplayed(59398); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/status/sessions/history/all"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getSessionHistory + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.sessions.getSessionHistory(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/:/progress"]["post"] + update: + x-codeSamples: + - lang: typescript + label: updatePlayProgress + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.media.updatePlayProgress("", 90000, "played"); // Handle the result console.log(result) diff --git a/docs/models/errors/getlibraryitemserrors.md b/docs/models/errors/getlibraryitemserrors.md new file mode 100644 index 00000000..55563efd --- /dev/null +++ b/docs/models/errors/getlibraryitemserrors.md @@ -0,0 +1,10 @@ +# GetLibraryItemsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getlibraryitemsresponsebody.md b/docs/models/errors/getlibraryitemsresponsebody.md new file mode 100644 index 00000000..79ec0eba --- /dev/null +++ b/docs/models/errors/getlibraryitemsresponsebody.md @@ -0,0 +1,11 @@ +# GetLibraryItemsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `errors` | [errors.GetLibraryItemsErrors](../../models/errors/getlibraryitemserrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/searchlibraryerrors.md b/docs/models/errors/searchlibraryerrors.md new file mode 100644 index 00000000..fb1f1259 --- /dev/null +++ b/docs/models/errors/searchlibraryerrors.md @@ -0,0 +1,10 @@ +# SearchLibraryErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/searchlibraryresponsebody.md b/docs/models/errors/searchlibraryresponsebody.md new file mode 100644 index 00000000..aa94f1a3 --- /dev/null +++ b/docs/models/errors/searchlibraryresponsebody.md @@ -0,0 +1,11 @@ +# SearchLibraryResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `errors` | [errors.SearchLibraryErrors](../../models/errors/searchlibraryerrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/addplaylistcontentsmediacontainer.md b/docs/models/operations/addplaylistcontentsmediacontainer.md index 80e06a9c..d02b3024 100644 --- a/docs/models/operations/addplaylistcontentsmediacontainer.md +++ b/docs/models/operations/addplaylistcontentsmediacontainer.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 1 | -| `leafCountAdded` | *number* | :heavy_minus_sign: | N/A | 1 | -| `leafCountRequested` | *number* | :heavy_minus_sign: | N/A | 1 | -| `metadata` | [operations.AddPlaylistContentsMetadata](../../models/operations/addplaylistcontentsmetadata.md)[] | :heavy_minus_sign: | N/A | [
{
"ratingKey": "94",
"key": "/playlists/94/items",
"guid": "com.plexapp.agents.none://972e3047-83d6-4848-a000-261f0af26ba2",
"type": "playlist",
"title": "A great playlist",
"summary": "One of my great playlists",
"smart": false,
"playlistType": "video",
"composite": "/playlists/94/composite/1705800070",
"duration": 423000,
"leafCount": 3,
"addedAt": 1705716458,
"updatedAt": 1705800070
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `size` | *number* | :heavy_minus_sign: | N/A | 1 | +| `leafCountAdded` | *number* | :heavy_minus_sign: | N/A | 1 | +| `leafCountRequested` | *number* | :heavy_minus_sign: | N/A | 1 | +| `metadata` | [operations.AddPlaylistContentsMetadata](../../models/operations/addplaylistcontentsmetadata.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/createplaylistmediacontainer.md b/docs/models/operations/createplaylistmediacontainer.md index 47267697..986933ed 100644 --- a/docs/models/operations/createplaylistmediacontainer.md +++ b/docs/models/operations/createplaylistmediacontainer.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `size` | *number* | :heavy_minus_sign: | N/A | 7 | -| `metadata` | [operations.CreatePlaylistMetadata](../../models/operations/createplaylistmetadata.md)[] | :heavy_minus_sign: | N/A | [
{
"ratingKey": "96",
"key": "/playlists/96/items",
"guid": "com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55",
"type": "playlist",
"title": "A Great Playlist",
"summary": "What a great playlist",
"smart": false,
"playlistType": "video",
"icon": "playlist://image.smart",
"viewCount": 1,
"lastViewedAt": 1705719589,
"leafCount": 1,
"addedAt": 1705719589,
"updatedAt": 1705724593,
"composite": "/playlists/96/composite/1705724593",
"duration": 141000
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `size` | *number* | :heavy_minus_sign: | N/A | 7 | +| `metadata` | [operations.CreatePlaylistMetadata](../../models/operations/createplaylistmetadata.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/fieldtype.md b/docs/models/operations/fieldtype.md index 041e89a1..1378d16c 100644 --- a/docs/models/operations/fieldtype.md +++ b/docs/models/operations/fieldtype.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | | `type` | *string* | :heavy_minus_sign: | N/A | resolution | -| `operator` | [operations.Operator](../../models/operations/operator.md)[] | :heavy_minus_sign: | N/A | [
{
"key": "=",
"title": "is"
}
] | \ No newline at end of file +| `operator` | [operations.Operator](../../models/operations/operator.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getglobalhubsmediacontainer.md b/docs/models/operations/getglobalhubsmediacontainer.md index b3fe6b44..dcb77617 100644 --- a/docs/models/operations/getglobalhubsmediacontainer.md +++ b/docs/models/operations/getglobalhubsmediacontainer.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 8 | -| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | true | -| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `hub` | [operations.Hub](../../models/operations/hub.md)[] | :heavy_minus_sign: | N/A | [
{
"hubKey": "/library/metadata/50768,65523,58188,57341,57302,57070",
"key": "/playlists/all?type=15\u0026sort=lastViewedAt:desc\u0026playlistType=video,audio",
"title": "Recent Playlists",
"type": "playlist",
"hubIdentifier": "home.playlists",
"context": "hub.home.playlists",
"size": 6,
"more": true,
"style": "shelf",
"promoted": true,
"Metadata": [
{
"ratingKey": "50768",
"key": "/playlists/50768/items",
"guid": "com.plexapp.agents.none://81658e0d-cd4e-4c73-abb9-832b2ae2037b",
"type": "playlist",
"title": "❤️ Tracks",
"titleSort": "Tracks",
"summary": "All your highly rated tracks, in one convenient place.",
"smart": true,
"playlistType": "audio",
"composite": "/playlists/50768/composite/1704333758",
"icon": "playlist://image.smart",
"viewCount": 47,
"lastViewedAt": 1705329935,
"duration": 42864000,
"leafCount": 178,
"addedAt": 1655309388,
"updatedAt": 1704333758
},
{
"ratingKey": "65523",
"key": "/playlists/65523/items",
"guid": "com.plexapp.agents.none://1bcdd596-892b-4856-9f28-b4338c439300",
"type": "playlist",
"title": "Car Rides",
"summary": "",
"smart": false,
"playlistType": "audio",
"composite": "/playlists/65523/composite/1698597932",
"viewCount": 2,
"lastViewedAt": 1698597949,
"duration": 4864000,
"leafCount": 19,
"addedAt": 1697993545,
"updatedAt": 1698597932
},
{
"ratingKey": "58188",
"key": "/playlists/58188/items",
"guid": "com.plexapp.agents.none://8f0441d3-2a28-4644-a2f1-b7deeb290dff",
"type": "playlist",
"title": "Workout",
"summary": "",
"smart": false,
"playlistType": "audio",
"composite": "/playlists/58188/composite/1680825595",
"viewCount": 4,
"lastViewedAt": 1680825596,
"duration": 12522000,
"leafCount": 56,
"addedAt": 1679616785,
"updatedAt": 1680825595
},
{
"ratingKey": "57341",
"key": "/playlists/57341/items",
"guid": "com.plexapp.agents.none://bf8778c3-20a3-4619-8eb0-3c172c18ffd6",
"type": "playlist",
"title": "January Movie Day",
"summary": "",
"smart": false,
"playlistType": "video",
"composite": "/playlists/57341/composite/1673372385",
"viewCount": 1,
"lastViewedAt": 1673372306,
"duration": 19119000,
"leafCount": 3,
"addedAt": 1673372306,
"updatedAt": 1673372385
},
{
"ratingKey": "57302",
"key": "/playlists/57302/items",
"guid": "com.plexapp.agents.none://f25064ed-05bb-4bcf-b70c-ed7514b70929",
"type": "playlist",
"title": "December Movie Day",
"summary": "",
"smart": false,
"playlistType": "video",
"composite": "/playlists/57302/composite/1671205874",
"viewCount": 2,
"lastViewedAt": 1671206853,
"duration": 23040000,
"leafCount": 3,
"addedAt": 1671197078,
"updatedAt": 1671205874
},
{
"ratingKey": "57070",
"key": "/playlists/57070/items",
"guid": "com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c",
"type": "playlist",
"title": "November Movie Day",
"summary": "",
"smart": false,
"playlistType": "video",
"composite": "/playlists/57070/composite/1668787730",
"viewCount": 2,
"lastViewedAt": 1668787732,
"duration": 16873000,
"leafCount": 3,
"addedAt": 1668779618,
"updatedAt": 1668787730
}
]
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `size` | *number* | :heavy_minus_sign: | N/A | 8 | +| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | true | +| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `hub` | [operations.Hub](../../models/operations/hub.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getlibrariesdirectory.md b/docs/models/operations/getlibrariesdirectory.md index 81ec43c3..87fbc0f7 100644 --- a/docs/models/operations/getlibrariesdirectory.md +++ b/docs/models/operations/getlibrariesdirectory.md @@ -25,4 +25,4 @@ | `directory` | *boolean* | :heavy_minus_sign: | N/A | true | | `contentChangedAt` | *number* | :heavy_minus_sign: | N/A | 3192854 | | `hidden` | *number* | :heavy_minus_sign: | N/A | 0 | -| `location` | [operations.GetLibrariesLocation](../../models/operations/getlibrarieslocation.md)[] | :heavy_minus_sign: | N/A | [
{
"id": 1,
"path": "/movies"
}
] | \ No newline at end of file +| `location` | [operations.GetLibrariesLocation](../../models/operations/getlibrarieslocation.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getlibrariesmediacontainer.md b/docs/models/operations/getlibrariesmediacontainer.md index 7408917a..4def3d8a 100644 --- a/docs/models/operations/getlibrariesmediacontainer.md +++ b/docs/models/operations/getlibrariesmediacontainer.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 5 | -| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | false | -| `title1` | *string* | :heavy_minus_sign: | N/A | Plex Library | -| `directory` | [operations.GetLibrariesDirectory](../../models/operations/getlibrariesdirectory.md)[] | :heavy_minus_sign: | N/A | [
{
"allowSync": true,
"art": "/:/resources/movie-fanart.jpg",
"composite": "/library/sections/1/composite/1705615584",
"filters": true,
"refreshing": false,
"thumb": "/:/resources/movie.png",
"key": "1",
"type": "movie",
"title": "Movies",
"agent": "tv.plex.agents.movie",
"scanner": "Plex Movie",
"language": "en-US",
"uuid": "322a231a-b7f7-49f5-920f-14c61199cd30",
"updatedAt": 1705615634,
"createdAt": 1654131312,
"scannedAt": 1705615584,
"content": true,
"directory": true,
"contentChangedAt": 3192854,
"hidden": 0,
"Location": [
{
"id": 1,
"path": "/movies"
}
]
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `size` | *number* | :heavy_minus_sign: | N/A | 5 | +| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | false | +| `title1` | *string* | :heavy_minus_sign: | N/A | Plex Library | +| `directory` | [operations.GetLibrariesDirectory](../../models/operations/getlibrariesdirectory.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getlibraryhubshub.md b/docs/models/operations/getlibraryhubshub.md index 48e29619..9d9c6c05 100644 --- a/docs/models/operations/getlibraryhubshub.md +++ b/docs/models/operations/getlibraryhubshub.md @@ -3,17 +3,17 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `key` | *string* | :heavy_minus_sign: | N/A | /library/sections/1/all?sort=lastViewedAt:desc&unwatched=0&viewOffset=0 | -| `title` | *string* | :heavy_minus_sign: | N/A | Recently Played Movies | -| `type` | *string* | :heavy_minus_sign: | N/A | movie | -| `hubIdentifier` | *string* | :heavy_minus_sign: | N/A | movie.recentlyviewed.1 | -| `context` | *string* | :heavy_minus_sign: | N/A | hub.movie.recentlyviewed | -| `size` | *number* | :heavy_minus_sign: | N/A | 6 | -| `more` | *boolean* | :heavy_minus_sign: | N/A | true | -| `style` | *string* | :heavy_minus_sign: | N/A | shelf | -| `hubKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66485,66098,57249,11449,5858,14944 | -| `metadata` | [operations.GetLibraryHubsMetadata](../../models/operations/getlibraryhubsmetadata.md)[] | :heavy_minus_sign: | N/A | [
{
"ratingKey": "14944",
"key": "/library/metadata/14944",
"guid": "plex://movie/5d77686eeb5d26001f1eb339",
"studio": "Walt Disney Animation Studios",
"type": "movie",
"title": "Tangled",
"librarySectionTitle": "Movies",
"librarySectionID": 1,
"librarySectionKey": "/library/sections/1",
"contentRating": "PG",
"summary": "The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is.",
"rating": 8.9,
"audienceRating": 8.7,
"viewCount": 1,
"lastViewedAt": 1704936047,
"year": 2010,
"tagline": "They're taking adventure to new lengths.",
"thumb": "/library/metadata/14944/thumb/1705739847",
"art": "/library/metadata/14944/art/1705739847",
"duration": 6017237,
"originallyAvailableAt": "2010-11-24T00:00:00Z",
"addedAt": 1589412494,
"updatedAt": 1705739847,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"primaryExtraKey": "/library/metadata/14952",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 38247,
"duration": 6017237,
"bitrate": 2051,
"width": 1920,
"height": 1080,
"aspectRatio": 1.78,
"audioChannels": 2,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 1,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 38247,
"key": "/library/parts/38247/1589412494/file.mp4",
"duration": 6017237,
"file": "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4",
"size": 1545647447,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": true,
"videoProfile": "high"
}
]
}
],
"Genre": [
{
"tag": "Comedy"
},
{
"tag": "Animation"
}
],
"Country": [
{
"tag": "United States of America"
}
],
"Director": [
{
"tag": "Byron Howard"
},
{
"tag": "Nathan Greno"
}
],
"Role": [
{
"tag": "Mandy Moore"
},
{
"tag": "Zachary Levi"
},
{
"tag": "Donna Murphy"
}
],
"Writer": [
{
"tag": "Jacob Grimm"
},
{
"tag": "Wilhelm Grimm"
}
],
"skipCount": 1,
"chapterSource": "media"
}
] | -| `promoted` | *boolean* | :heavy_minus_sign: | N/A | true | -| `random` | *boolean* | :heavy_minus_sign: | N/A | true | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `key` | *string* | :heavy_minus_sign: | N/A | /library/sections/1/all?sort=lastViewedAt:desc&unwatched=0&viewOffset=0 | +| `title` | *string* | :heavy_minus_sign: | N/A | Recently Played Movies | +| `type` | *string* | :heavy_minus_sign: | N/A | movie | +| `hubIdentifier` | *string* | :heavy_minus_sign: | N/A | movie.recentlyviewed.1 | +| `context` | *string* | :heavy_minus_sign: | N/A | hub.movie.recentlyviewed | +| `size` | *number* | :heavy_minus_sign: | N/A | 6 | +| `more` | *boolean* | :heavy_minus_sign: | N/A | true | +| `style` | *string* | :heavy_minus_sign: | N/A | shelf | +| `hubKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66485,66098,57249,11449,5858,14944 | +| `metadata` | [operations.GetLibraryHubsMetadata](../../models/operations/getlibraryhubsmetadata.md)[] | :heavy_minus_sign: | N/A | | +| `promoted` | *boolean* | :heavy_minus_sign: | N/A | true | +| `random` | *boolean* | :heavy_minus_sign: | N/A | true | \ No newline at end of file diff --git a/docs/models/operations/getlibraryhubsmedia.md b/docs/models/operations/getlibraryhubsmedia.md index c545aee1..e9f8e303 100644 --- a/docs/models/operations/getlibraryhubsmedia.md +++ b/docs/models/operations/getlibraryhubsmedia.md @@ -3,22 +3,22 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `id` | *number* | :heavy_minus_sign: | N/A | 38247 | -| `duration` | *number* | :heavy_minus_sign: | N/A | 6017237 | -| `bitrate` | *number* | :heavy_minus_sign: | N/A | 2051 | -| `width` | *number* | :heavy_minus_sign: | N/A | 1920 | -| `height` | *number* | :heavy_minus_sign: | N/A | 1080 | -| `aspectRatio` | *number* | :heavy_minus_sign: | N/A | 1.78 | -| `audioChannels` | *number* | :heavy_minus_sign: | N/A | 2 | -| `audioCodec` | *string* | :heavy_minus_sign: | N/A | aac | -| `videoCodec` | *string* | :heavy_minus_sign: | N/A | h264 | -| `videoResolution` | *string* | :heavy_minus_sign: | N/A | 1080 | -| `container` | *string* | :heavy_minus_sign: | N/A | mp4 | -| `videoFrameRate` | *string* | :heavy_minus_sign: | N/A | 24p | -| `optimizedForStreaming` | *number* | :heavy_minus_sign: | N/A | 1 | -| `audioProfile` | *string* | :heavy_minus_sign: | N/A | lc | -| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | false | -| `videoProfile` | *string* | :heavy_minus_sign: | N/A | high | -| `part` | [operations.GetLibraryHubsPart](../../models/operations/getlibraryhubspart.md)[] | :heavy_minus_sign: | N/A | [
{
"id": 38247,
"key": "/library/parts/38247/1589412494/file.mp4",
"duration": 6017237,
"file": "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4",
"size": 1545647447,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": true,
"videoProfile": "high"
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | 38247 | +| `duration` | *number* | :heavy_minus_sign: | N/A | 6017237 | +| `bitrate` | *number* | :heavy_minus_sign: | N/A | 2051 | +| `width` | *number* | :heavy_minus_sign: | N/A | 1920 | +| `height` | *number* | :heavy_minus_sign: | N/A | 1080 | +| `aspectRatio` | *number* | :heavy_minus_sign: | N/A | 1.78 | +| `audioChannels` | *number* | :heavy_minus_sign: | N/A | 2 | +| `audioCodec` | *string* | :heavy_minus_sign: | N/A | aac | +| `videoCodec` | *string* | :heavy_minus_sign: | N/A | h264 | +| `videoResolution` | *string* | :heavy_minus_sign: | N/A | 1080 | +| `container` | *string* | :heavy_minus_sign: | N/A | mp4 | +| `videoFrameRate` | *string* | :heavy_minus_sign: | N/A | 24p | +| `optimizedForStreaming` | *number* | :heavy_minus_sign: | N/A | 1 | +| `audioProfile` | *string* | :heavy_minus_sign: | N/A | lc | +| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | false | +| `videoProfile` | *string* | :heavy_minus_sign: | N/A | high | +| `part` | [operations.GetLibraryHubsPart](../../models/operations/getlibraryhubspart.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getlibraryhubsmediacontainer.md b/docs/models/operations/getlibraryhubsmediacontainer.md index d89ce10d..600fedab 100644 --- a/docs/models/operations/getlibraryhubsmediacontainer.md +++ b/docs/models/operations/getlibraryhubsmediacontainer.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `size` | *number* | :heavy_minus_sign: | N/A | 7 | -| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | true | -| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 | -| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | -| `librarySectionUUID` | *string* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | -| `hub` | [operations.GetLibraryHubsHub](../../models/operations/getlibraryhubshub.md)[] | :heavy_minus_sign: | N/A | [
{
"key": "/library/sections/1/all?sort=lastViewedAt:desc\u0026unwatched=0\u0026viewOffset=0",
"title": "Recently Played Movies",
"type": "movie",
"hubIdentifier": "movie.recentlyviewed.1",
"context": "hub.movie.recentlyviewed",
"size": 6,
"more": true,
"style": "shelf",
"hubKey": "/library/metadata/66485,66098,57249,11449,5858,14944",
"Metadata": [
{
"ratingKey": "66485",
"key": "/library/metadata/66485",
"guid": "plex://movie/5d776c3251dd69001fe38bb4",
"studio": "Termite Films",
"type": "movie",
"title": "Kedi",
"librarySectionTitle": "Movies",
"librarySectionID": 1,
"librarySectionKey": "/library/sections/1",
"contentRating": "Not Rated",
"summary": "A profile of an ancient city and its unique people, seen through the eyes of the most mysterious and beloved animal humans have ever known, the Cat.",
"rating": 9.8,
"audienceRating": 8.5,
"viewCount": 2,
"lastViewedAt": 1705786111,
"year": 2017,
"tagline": "A cat meowing at your feet, looking up at you, is life smiling at you...",
"thumb": "/library/metadata/66485/thumb/1702586907",
"art": "/library/metadata/66485/art/1702586907",
"duration": 4736174,
"originallyAvailableAt": "2017-02-10T00:00:00Z",
"addedAt": 1702586905,
"updatedAt": 1702586907,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"primaryExtraKey": "/library/metadata/66486",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 129531,
"duration": 4736174,
"bitrate": 2377,
"width": 1920,
"height": 1080,
"aspectRatio": 1.78,
"audioChannels": 2,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 0,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 129778,
"key": "/library/parts/129778/1702586883/file.mp4",
"duration": 4736174,
"file": "/movies/Kedi (2017)/Kedi (2017) 1080p x264.mp4",
"size": 1410810905,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": false,
"videoProfile": "high"
}
]
}
],
"Genre": [
{
"tag": "Documentary"
}
],
"Country": [
{
"tag": "United States of America"
}
],
"Director": [
{
"tag": "Ceyda Torun"
}
],
"Role": [
{
"tag": "Bülent Üstün"
}
]
},
{
"ratingKey": "66098",
"key": "/library/metadata/66098",
"guid": "plex://movie/5d9f34f4adeb7a0021ce020f",
"studio": "Touchwood Pacific Partners 1",
"type": "movie",
"title": "Homeward Bound: The Incredible Journey",
"librarySectionTitle": "Movies",
"librarySectionID": 1,
"librarySectionKey": "/library/sections/1",
"contentRating": "G",
"summary": "A fun-loving American bulldog pup, a hilarious Himalayan cat, and a wise old golden retriever embark on a long trek through the rugged wilderness of the Sierra Nevada mountains in a quest to reach home and their beloved owners.",
"rating": 8.7,
"audienceRating": 7.1,
"viewCount": 2,
"lastViewedAt": 1705709811,
"year": 1993,
"tagline": "In the classic tradition of Walt Disney Pictures comes a story about courage, adventure and friendship.",
"thumb": "/library/metadata/66098/thumb/1703148781",
"art": "/library/metadata/66098/art/1703148781",
"duration": 5065775,
"originallyAvailableAt": "1993-02-12T00:00:00Z",
"addedAt": 1700434925,
"updatedAt": 1703148781,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"primaryExtraKey": "/library/metadata/66099",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 129003,
"duration": 5065775,
"bitrate": 2444,
"width": 1904,
"height": 1024,
"aspectRatio": 1.85,
"audioChannels": 2,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 1,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 129250,
"key": "/library/parts/129250/1700434864/file.mp4",
"duration": 5065775,
"file": "/movies/Homeward Bound The Incredible Journey (1993)/Homeward Bound The Incredible Journey (1993) [BluRay] [1080p] [YTS.LT].mp4",
"size": 1550855333,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": true,
"videoProfile": "high"
}
]
}
],
"Genre": [
{
"tag": "Adventure"
},
{
"tag": "Comedy"
}
],
"Country": [
{
"tag": "United States of America"
}
],
"Director": [
{
"tag": "Duwayne Dunham"
}
],
"Writer": [
{
"tag": "Caroline Thompson"
},
{
"tag": "Linda Woolverton"
}
],
"Role": [
{
"tag": "Michael J. Fox"
},
{
"tag": "Sally Field"
},
{
"tag": "Don Ameche"
}
]
},
{
"ratingKey": "57249",
"key": "/library/metadata/57249",
"guid": "plex://movie/60eff7d3e22797002c55c1cc",
"studio": "Nickelodeon Movies",
"type": "movie",
"title": "Blue's Big City Adventure",
"librarySectionTitle": "Movies",
"librarySectionID": 1,
"librarySectionKey": "/library/sections/1",
"contentRating": "TV-Y",
"summary": "Josh and Blue skidoo to New York City to audition for Rainbow Puppy's Broadway musical, but they get lost when Josh accidentally left his Handy Dandy Notebook at home. This leads to a game of Blue's Clues to figure out where the audition is. Meanwhile, Tickety Tock and her friends go to New York City to find Josh and Blue and get to the audition with help from Joe and Steve.",
"rating": 8.3,
"audienceRating": 8.6,
"viewCount": 8,
"skipCount": 1,
"lastViewedAt": 1705681955,
"year": 2022,
"tagline": "All They Need is You.",
"thumb": "/library/metadata/57249/thumb/1704274800",
"art": "/library/metadata/57249/art/1704274800",
"duration": 4459050,
"originallyAvailableAt": "2022-11-18T00:00:00Z",
"addedAt": 1669671356,
"updatedAt": 1704274800,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"primaryExtraKey": "/library/metadata/57250",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 115470,
"duration": 4459050,
"bitrate": 6384,
"width": 3840,
"height": 2160,
"aspectRatio": 1.78,
"audioChannels": 6,
"audioCodec": "aac",
"videoCodec": "hevc",
"videoResolution": "4k",
"container": "mkv",
"videoFrameRate": "24p",
"audioProfile": "lc",
"videoProfile": "main 10",
"Part": [
{
"id": 115478,
"key": "/library/parts/115478/1669671340/file.mkv",
"duration": 4459050,
"file": "/movies/Blue's Big City Adventure (2022)/Blues.Big.City.Adventure.2022.2160p.4K.WEB.x265.10bit.AAC5.1-[YTS.MX].mkv",
"size": 3560750664,
"audioProfile": "lc",
"container": "mkv",
"videoProfile": "main 10"
}
]
}
],
"Genre": [
{
"tag": "Comedy"
},
{
"tag": "Family"
}
],
"Country": [
{
"tag": "Canada"
},
{
"tag": "Ireland"
}
],
"Director": [
{
"tag": "Matt Stawski"
}
],
"Writer": [
{
"tag": "Traci Paige Johnson"
},
{
"tag": "Todd Kessler"
}
],
"Role": [
{
"tag": "Joshua Dela Cruz"
},
{
"tag": "Steve Burns"
},
{
"tag": "Donovan Patton"
}
]
},
{
"ratingKey": "11449",
"key": "/library/metadata/11449",
"guid": "plex://movie/5d776edfad5437001f803cf9",
"studio": "Walt Disney Pictures",
"type": "movie",
"title": "Onward",
"librarySectionTitle": "Movies",
"librarySectionID": 1,
"librarySectionKey": "/library/sections/1",
"contentRating": "PG",
"summary": "In a magical world full of technological advances, elven brothers Ian and Barley Lightfoot set out on an adventure to resurrect their late father for a day.",
"rating": 8.8,
"audienceRating": 9.5,
"viewCount": 3,
"lastViewedAt": 1705543126,
"year": 2020,
"tagline": "Their quest begineth.",
"thumb": "/library/metadata/11449/thumb/1705224000",
"art": "/library/metadata/11449/art/1705224000",
"duration": 6141428,
"originallyAvailableAt": "2020-03-04T00:00:00Z",
"addedAt": 1589237130,
"updatedAt": 1705224000,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"chapterSource": "media",
"primaryExtraKey": "/library/metadata/11470",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 29291,
"duration": 6141428,
"bitrate": 10977,
"width": 1920,
"height": 804,
"aspectRatio": 2.35,
"audioChannels": 8,
"audioCodec": "dca-ma",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mkv",
"videoFrameRate": "24p",
"audioProfile": "ma",
"videoProfile": "high",
"Part": [
{
"id": 29291,
"key": "/library/parts/29291/1589237130/file.mkv",
"duration": 6141428,
"file": "/movies/Onward (2020)/Onward (2020) Bluray-1080p.mkv",
"size": 8426669232,
"audioProfile": "ma",
"container": "mkv",
"videoProfile": "high"
}
]
},
{
"id": 29315,
"duration": 6142006,
"bitrate": 2639,
"width": 1920,
"height": 800,
"aspectRatio": 2.35,
"audioChannels": 6,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 1,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 29315,
"key": "/library/parts/29315/1629002847/file.mp4",
"duration": 6142006,
"file": "/movies/Onward (2020)/Onward (2020) WEBRip-1080p.mp4",
"size": 2026154995,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": true,
"videoProfile": "high"
}
]
}
],
"Genre": [
{
"tag": "Animation"
},
{
"tag": "Comedy"
}
],
"Country": [
{
"tag": "United States of America"
}
],
"Director": [
{
"tag": "Dan Scanlon"
}
],
"Writer": [
{
"tag": "Kelsey Mann"
},
{
"tag": "Dan Scanlon"
}
],
"Role": [
{
"tag": "Tom Holland"
},
{
"tag": "Chris Pratt"
},
{
"tag": "Julia Louis-Dreyfus"
}
]
},
{
"ratingKey": "5858",
"key": "/library/metadata/5858",
"guid": "plex://movie/5d776b85594b2b001e6dc641",
"studio": "Walt Disney Pictures",
"type": "movie",
"title": "Frozen II",
"librarySectionTitle": "Movies",
"librarySectionID": 1,
"librarySectionKey": "/library/sections/1",
"contentRating": "PG",
"summary": "Anna, Elsa, Kristoff, Olaf and Sven leave Arendelle to travel to an ancient, autumn-bound forest of an enchanted land. They set out to find the origin of Elsa's powers in order to save their kingdom.",
"rating": 7.7,
"audienceRating": 9.2,
"viewCount": 1,
"skipCount": 1,
"lastViewedAt": 1705337663,
"year": 2019,
"tagline": "The past is not what it seems.",
"thumb": "/library/metadata/5858/thumb/1704621922",
"art": "/library/metadata/5858/art/1704621922",
"duration": 6194042,
"originallyAvailableAt": "2019-11-20T00:00:00Z",
"addedAt": 1588207762,
"updatedAt": 1704621922,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"primaryExtraKey": "/library/metadata/5892",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 14954,
"duration": 6194042,
"bitrate": 2538,
"width": 1920,
"height": 800,
"aspectRatio": 2.35,
"audioChannels": 6,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 1,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 14954,
"key": "/library/parts/14954/1588207762/file.mp4",
"duration": 6194042,
"file": "/movies/Frozen II (2019)/Frozen II (2019) Bluray-1080p.mp4",
"size": 1969230037,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": true,
"videoProfile": "high"
}
]
},
{
"id": 14999,
"duration": 6244271,
"bitrate": 2536,
"width": 1920,
"height": 800,
"aspectRatio": 2.35,
"audioChannels": 6,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 1,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 14999,
"key": "/library/parts/14999/1629001526/file.mp4",
"duration": 6244271,
"file": "/movies/Frozen II (2019)/Frozen II (2019) WEBRip-1080p.mp4",
"size": 1983357282,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": true,
"videoProfile": "high"
}
]
}
],
"Genre": [
{
"tag": "Adventure"
},
{
"tag": "Animation"
}
],
"Country": [
{
"tag": "United States of America"
}
],
"Director": [
{
"tag": "Chris Buck"
},
{
"tag": "Jennifer Lee"
}
],
"Writer": [
{
"tag": "Chris Buck"
},
{
"tag": "Hans Christian Andersen"
}
],
"Role": [
{
"tag": "Idina Menzel"
},
{
"tag": "Kristen Bell"
},
{
"tag": "Josh Gad"
}
]
},
{
"ratingKey": "14944",
"key": "/library/metadata/14944",
"guid": "plex://movie/5d77686eeb5d26001f1eb339",
"studio": "Walt Disney Animation Studios",
"type": "movie",
"title": "Tangled",
"librarySectionTitle": "Movies",
"librarySectionID": 1,
"librarySectionKey": "/library/sections/1",
"contentRating": "PG",
"summary": "The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is.",
"rating": 8.9,
"audienceRating": 8.7,
"viewCount": 1,
"lastViewedAt": 1704936047,
"year": 2010,
"tagline": "They're taking adventure to new lengths.",
"thumb": "/library/metadata/14944/thumb/1705739847",
"art": "/library/metadata/14944/art/1705739847",
"duration": 6017237,
"originallyAvailableAt": "2010-11-24T00:00:00Z",
"addedAt": 1589412494,
"updatedAt": 1705739847,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"primaryExtraKey": "/library/metadata/14952",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 38247,
"duration": 6017237,
"bitrate": 2051,
"width": 1920,
"height": 1080,
"aspectRatio": 1.78,
"audioChannels": 2,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 1,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 38247,
"key": "/library/parts/38247/1589412494/file.mp4",
"duration": 6017237,
"file": "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4",
"size": 1545647447,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": true,
"videoProfile": "high"
}
]
}
],
"Genre": [
{
"tag": "Comedy"
},
{
"tag": "Animation"
}
],
"Country": [
{
"tag": "United States of America"
}
],
"Director": [
{
"tag": "Byron Howard"
},
{
"tag": "Nathan Greno"
}
],
"Writer": [
{
"tag": "Jacob Grimm"
},
{
"tag": "Wilhelm Grimm"
}
],
"Role": [
{
"tag": "Mandy Moore"
},
{
"tag": "Zachary Levi"
},
{
"tag": "Donna Murphy"
}
]
}
],
"promoted": true,
"random": true
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `size` | *number* | :heavy_minus_sign: | N/A | 7 | +| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | true | +| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 | +| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | +| `librarySectionUUID` | *string* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | +| `hub` | [operations.GetLibraryHubsHub](../../models/operations/getlibraryhubshub.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getlibraryhubsmetadata.md b/docs/models/operations/getlibraryhubsmetadata.md index de207caa..4d79877d 100644 --- a/docs/models/operations/getlibraryhubsmetadata.md +++ b/docs/models/operations/getlibraryhubsmetadata.md @@ -3,39 +3,39 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `ratingKey` | *string* | :heavy_minus_sign: | N/A | 14944 | -| `key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/14944 | -| `guid` | *string* | :heavy_minus_sign: | N/A | plex://movie/5d77686eeb5d26001f1eb339 | -| `studio` | *string* | :heavy_minus_sign: | N/A | Walt Disney Animation Studios | -| `type` | *string* | :heavy_minus_sign: | N/A | movie | -| `title` | *string* | :heavy_minus_sign: | N/A | Tangled | -| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | -| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 | -| `librarySectionKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/1 | -| `contentRating` | *string* | :heavy_minus_sign: | N/A | PG | -| `summary` | *string* | :heavy_minus_sign: | N/A | The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is. | -| `rating` | *number* | :heavy_minus_sign: | N/A | 8.9 | -| `audienceRating` | *number* | :heavy_minus_sign: | N/A | 8.7 | -| `viewCount` | *number* | :heavy_minus_sign: | N/A | 1 | -| `lastViewedAt` | *number* | :heavy_minus_sign: | N/A | 1704936047 | -| `year` | *number* | :heavy_minus_sign: | N/A | 2010 | -| `tagline` | *string* | :heavy_minus_sign: | N/A | They're taking adventure to new lengths. | -| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/14944/thumb/1705739847 | -| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/14944/art/1705739847 | -| `duration` | *number* | :heavy_minus_sign: | N/A | 6017237 | -| `originallyAvailableAt` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | N/A | 2010-11-24 00:00:00 +0000 UTC | -| `addedAt` | *number* | :heavy_minus_sign: | N/A | 1589412494 | -| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1705739847 | -| `audienceRatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | -| `primaryExtraKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/14952 | -| `ratingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | -| `media` | [operations.GetLibraryHubsMedia](../../models/operations/getlibraryhubsmedia.md)[] | :heavy_minus_sign: | N/A | [
{
"id": 38247,
"duration": 6017237,
"bitrate": 2051,
"width": 1920,
"height": 1080,
"aspectRatio": 1.78,
"audioChannels": 2,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 1,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 38247,
"key": "/library/parts/38247/1589412494/file.mp4",
"duration": 6017237,
"file": "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4",
"size": 1545647447,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": true,
"videoProfile": "high"
}
]
}
] | -| `genre` | [operations.GetLibraryHubsGenre](../../models/operations/getlibraryhubsgenre.md)[] | :heavy_minus_sign: | N/A | [
{
"tag": "Animation"
}
] | -| `country` | [operations.GetLibraryHubsCountry](../../models/operations/getlibraryhubscountry.md)[] | :heavy_minus_sign: | N/A | [
{
"tag": "United States of America"
}
] | -| `director` | [operations.GetLibraryHubsDirector](../../models/operations/getlibraryhubsdirector.md)[] | :heavy_minus_sign: | N/A | [
{
"tag": "Nathan Greno"
}
] | -| `role` | [operations.GetLibraryHubsRole](../../models/operations/getlibraryhubsrole.md)[] | :heavy_minus_sign: | N/A | [
{
"tag": "Donna Murphy"
}
] | -| `writer` | [operations.GetLibraryHubsWriter](../../models/operations/getlibraryhubswriter.md)[] | :heavy_minus_sign: | N/A | [
{
"tag": "Wilhelm Grimm"
}
] | -| `skipCount` | *number* | :heavy_minus_sign: | N/A | 1 | -| `chapterSource` | *string* | :heavy_minus_sign: | N/A | media | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ratingKey` | *string* | :heavy_minus_sign: | N/A | 14944 | +| `key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/14944 | +| `guid` | *string* | :heavy_minus_sign: | N/A | plex://movie/5d77686eeb5d26001f1eb339 | +| `studio` | *string* | :heavy_minus_sign: | N/A | Walt Disney Animation Studios | +| `type` | *string* | :heavy_minus_sign: | N/A | movie | +| `title` | *string* | :heavy_minus_sign: | N/A | Tangled | +| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | +| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 | +| `librarySectionKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/1 | +| `contentRating` | *string* | :heavy_minus_sign: | N/A | PG | +| `summary` | *string* | :heavy_minus_sign: | N/A | The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is. | +| `rating` | *number* | :heavy_minus_sign: | N/A | 8.9 | +| `audienceRating` | *number* | :heavy_minus_sign: | N/A | 8.7 | +| `viewCount` | *number* | :heavy_minus_sign: | N/A | 1 | +| `lastViewedAt` | *number* | :heavy_minus_sign: | N/A | 1704936047 | +| `year` | *number* | :heavy_minus_sign: | N/A | 2010 | +| `tagline` | *string* | :heavy_minus_sign: | N/A | They're taking adventure to new lengths. | +| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/14944/thumb/1705739847 | +| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/14944/art/1705739847 | +| `duration` | *number* | :heavy_minus_sign: | N/A | 6017237 | +| `originallyAvailableAt` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | N/A | 2010-11-24 00:00:00 +0000 UTC | +| `addedAt` | *number* | :heavy_minus_sign: | N/A | 1589412494 | +| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1705739847 | +| `audienceRatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | +| `primaryExtraKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/14952 | +| `ratingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | +| `media` | [operations.GetLibraryHubsMedia](../../models/operations/getlibraryhubsmedia.md)[] | :heavy_minus_sign: | N/A | | +| `genre` | [operations.GetLibraryHubsGenre](../../models/operations/getlibraryhubsgenre.md)[] | :heavy_minus_sign: | N/A | | +| `country` | [operations.GetLibraryHubsCountry](../../models/operations/getlibraryhubscountry.md)[] | :heavy_minus_sign: | N/A | | +| `director` | [operations.GetLibraryHubsDirector](../../models/operations/getlibraryhubsdirector.md)[] | :heavy_minus_sign: | N/A | | +| `role` | [operations.GetLibraryHubsRole](../../models/operations/getlibraryhubsrole.md)[] | :heavy_minus_sign: | N/A | | +| `writer` | [operations.GetLibraryHubsWriter](../../models/operations/getlibraryhubswriter.md)[] | :heavy_minus_sign: | N/A | | +| `skipCount` | *number* | :heavy_minus_sign: | N/A | 1 | +| `chapterSource` | *string* | :heavy_minus_sign: | N/A | media | \ No newline at end of file diff --git a/docs/models/operations/getlibraryitemscountry.md b/docs/models/operations/getlibraryitemscountry.md new file mode 100644 index 00000000..9b10031b --- /dev/null +++ b/docs/models/operations/getlibraryitemscountry.md @@ -0,0 +1,8 @@ +# GetLibraryItemsCountry + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `tag` | *string* | :heavy_minus_sign: | N/A | United States of America | \ No newline at end of file diff --git a/docs/models/operations/getlibraryitemsdirector.md b/docs/models/operations/getlibraryitemsdirector.md new file mode 100644 index 00000000..a00a0ec1 --- /dev/null +++ b/docs/models/operations/getlibraryitemsdirector.md @@ -0,0 +1,8 @@ +# GetLibraryItemsDirector + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `tag` | *string* | :heavy_minus_sign: | N/A | James Cameron | \ No newline at end of file diff --git a/docs/models/operations/getlibraryitemsgenre.md b/docs/models/operations/getlibraryitemsgenre.md new file mode 100644 index 00000000..3eacc120 --- /dev/null +++ b/docs/models/operations/getlibraryitemsgenre.md @@ -0,0 +1,8 @@ +# GetLibraryItemsGenre + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `tag` | *string* | :heavy_minus_sign: | N/A | Adventure | \ No newline at end of file diff --git a/docs/models/operations/getlibraryitemsmedia.md b/docs/models/operations/getlibraryitemsmedia.md new file mode 100644 index 00000000..eaa6dffe --- /dev/null +++ b/docs/models/operations/getlibraryitemsmedia.md @@ -0,0 +1,21 @@ +# GetLibraryItemsMedia + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | 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 | +| `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_minus_sign: | N/A | mkv | +| `videoFrameRate` | *string* | :heavy_minus_sign: | N/A | 24p | +| `videoProfile` | *string* | :heavy_minus_sign: | N/A | main 10 | +| `part` | [operations.GetLibraryItemsPart](../../models/operations/getlibraryitemspart.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getlibraryitemsmediacontainer.md b/docs/models/operations/getlibraryitemsmediacontainer.md new file mode 100644 index 00000000..2661af47 --- /dev/null +++ b/docs/models/operations/getlibraryitemsmediacontainer.md @@ -0,0 +1,23 @@ +# GetLibraryItemsMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `size` | *number* | :heavy_minus_sign: | N/A | 70 | +| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | true | +| `art` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg | +| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 | +| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | +| `librarySectionUUID` | *string* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | +| `mediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `mediaTagVersion` | *number* | :heavy_minus_sign: | N/A | 1701731894 | +| `thumb` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie.png | +| `title1` | *string* | :heavy_minus_sign: | N/A | Movies | +| `title2` | *string* | :heavy_minus_sign: | N/A | Recently Released | +| `viewGroup` | *string* | :heavy_minus_sign: | N/A | movie | +| `viewMode` | *number* | :heavy_minus_sign: | N/A | 65592 | +| `mixedParents` | *boolean* | :heavy_minus_sign: | N/A | true | +| `metadata` | [operations.GetLibraryItemsMetadata](../../models/operations/getlibraryitemsmetadata.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getlibraryitemsmetadata.md b/docs/models/operations/getlibraryitemsmetadata.md new file mode 100644 index 00000000..62817239 --- /dev/null +++ b/docs/models/operations/getlibraryitemsmetadata.md @@ -0,0 +1,64 @@ +# GetLibraryItemsMetadata + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ratingKey` | *string* | :heavy_minus_sign: | N/A | 58683 | +| `key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683 | +| `guid` | *string* | :heavy_minus_sign: | N/A | plex://movie/5d7768ba96b655001fdc0408 | +| `studio` | *string* | :heavy_minus_sign: | N/A | 20th Century Studios | +| `type` | *string* | :heavy_minus_sign: | N/A | movie | +| `title` | *string* | :heavy_minus_sign: | N/A | Avatar: The Way of Water | +| `contentRating` | *string* | :heavy_minus_sign: | N/A | PG-13 | +| `summary` | *string* | :heavy_minus_sign: | 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 | +| `tagline` | *string* | :heavy_minus_sign: | N/A | Return to Pandora. | +| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 | +| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/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_minus_sign: | N/A | 1680457607 | +| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1703239236 | +| `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 | +| `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](../../models/operations/getlibraryitemsmedia.md)[] | :heavy_minus_sign: | N/A | | +| `genre` | [operations.GetLibraryItemsGenre](../../models/operations/getlibraryitemsgenre.md)[] | :heavy_minus_sign: | N/A | | +| `country` | [operations.GetLibraryItemsCountry](../../models/operations/getlibraryitemscountry.md)[] | :heavy_minus_sign: | N/A | | +| `director` | [operations.GetLibraryItemsDirector](../../models/operations/getlibraryitemsdirector.md)[] | :heavy_minus_sign: | N/A | | +| `writer` | [operations.GetLibraryItemsWriter](../../models/operations/getlibraryitemswriter.md)[] | :heavy_minus_sign: | N/A | | +| `role` | [operations.GetLibraryItemsRole](../../models/operations/getlibraryitemsrole.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: | N/A | 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 diff --git a/docs/models/operations/getlibraryitemspart.md b/docs/models/operations/getlibraryitemspart.md new file mode 100644 index 00000000..233cae16 --- /dev/null +++ b/docs/models/operations/getlibraryitemspart.md @@ -0,0 +1,14 @@ +# GetLibraryItemsPart + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | 119542 | +| `key` | *string* | :heavy_minus_sign: | N/A | /library/parts/119542/1680457526/file.mkv | +| `duration` | *number* | :heavy_minus_sign: | N/A | 11558112 | +| `file` | *string* | :heavy_minus_sign: | 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_minus_sign: | N/A | 36158371307 | +| `container` | *string* | :heavy_minus_sign: | N/A | mkv | +| `videoProfile` | *string* | :heavy_minus_sign: | N/A | main 10 | \ No newline at end of file diff --git a/docs/models/operations/getlibraryitemsrequest.md b/docs/models/operations/getlibraryitemsrequest.md new file mode 100644 index 00000000..3bf666f2 --- /dev/null +++ b/docs/models/operations/getlibraryitemsrequest.md @@ -0,0 +1,9 @@ +# GetLibraryItemsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to query | 1 | +| `tag` | [operations.Tag](../../models/operations/tag.md) | :heavy_check_mark: | A key representing a specific tag within the section. | | \ No newline at end of file diff --git a/docs/models/operations/getlibraryitemsresponse.md b/docs/models/operations/getlibraryitemsresponse.md new file mode 100644 index 00000000..71bc97f0 --- /dev/null +++ b/docs/models/operations/getlibraryitemsresponse.md @@ -0,0 +1,11 @@ +# GetLibraryItemsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [operations.GetLibraryItemsResponseBody](../../models/operations/getlibraryitemsresponsebody.md) | :heavy_minus_sign: | The contents of the library by section and tag | \ No newline at end of file diff --git a/docs/models/operations/getlibraryitemsresponsebody.md b/docs/models/operations/getlibraryitemsresponsebody.md new file mode 100644 index 00000000..c66c9399 --- /dev/null +++ b/docs/models/operations/getlibraryitemsresponsebody.md @@ -0,0 +1,10 @@ +# GetLibraryItemsResponseBody + +The contents of the library by section and tag + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetLibraryItemsMediaContainer](../../models/operations/getlibraryitemsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getlibraryitemsrole.md b/docs/models/operations/getlibraryitemsrole.md new file mode 100644 index 00000000..6e8f1e24 --- /dev/null +++ b/docs/models/operations/getlibraryitemsrole.md @@ -0,0 +1,8 @@ +# GetLibraryItemsRole + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `tag` | *string* | :heavy_minus_sign: | N/A | Sigourney Weaver | \ No newline at end of file diff --git a/docs/models/operations/getlibraryitemswriter.md b/docs/models/operations/getlibraryitemswriter.md new file mode 100644 index 00000000..137e3bfc --- /dev/null +++ b/docs/models/operations/getlibraryitemswriter.md @@ -0,0 +1,8 @@ +# GetLibraryItemsWriter + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `tag` | *string* | :heavy_minus_sign: | N/A | James Cameron | \ No newline at end of file diff --git a/docs/models/operations/getlibrarymediacontainer.md b/docs/models/operations/getlibrarymediacontainer.md index ee82549c..8fa65c68 100644 --- a/docs/models/operations/getlibrarymediacontainer.md +++ b/docs/models/operations/getlibrarymediacontainer.md @@ -3,20 +3,20 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 29 | -| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | false | -| `art` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg | -| `content` | *string* | :heavy_minus_sign: | N/A | secondary | -| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 | -| `mediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | -| `mediaTagVersion` | *number* | :heavy_minus_sign: | N/A | 1701731894 | -| `thumb` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie.png | -| `title1` | *string* | :heavy_minus_sign: | N/A | Movies | -| `viewGroup` | *string* | :heavy_minus_sign: | N/A | secondary | -| `viewMode` | *number* | :heavy_minus_sign: | N/A | 65592 | -| `directory` | [operations.GetLibraryDirectory](../../models/operations/getlibrarydirectory.md)[] | :heavy_minus_sign: | N/A | [
{
"key": "search?type=1",
"title": "Search...",
"secondary": true,
"prompt": "Search Movies",
"search": true
}
] | -| `type` | [operations.GetLibraryType](../../models/operations/getlibrarytype.md)[] | :heavy_minus_sign: | N/A | [
{
"key": "/library/sections/1/all?type=1",
"type": "movie",
"title": "Movies",
"active": false,
"Filter": [
{
"filter": "genre",
"filterType": "string",
"key": "/library/sections/1/genre",
"title": "Genre",
"type": "filter"
},
{
"filter": "year",
"filterType": "integer",
"key": "/library/sections/1/year",
"title": "Year",
"type": "filter"
},
{
"filter": "decade",
"filterType": "integer",
"key": "/library/sections/1/decade",
"title": "Decade",
"type": "filter"
},
{
"filter": "contentRating",
"filterType": "string",
"key": "/library/sections/1/contentRating",
"title": "Content Rating",
"type": "filter"
},
{
"filter": "collection",
"filterType": "string",
"key": "/library/sections/1/collection",
"title": "Collection",
"type": "filter"
},
{
"filter": "director",
"filterType": "string",
"key": "/library/sections/1/director",
"title": "Director",
"type": "filter"
},
{
"filter": "actor",
"filterType": "string",
"key": "/library/sections/1/actor",
"title": "Actor",
"type": "filter"
},
{
"filter": "writer",
"filterType": "string",
"key": "/library/sections/1/writer",
"title": "Writer",
"type": "filter"
},
{
"filter": "producer",
"filterType": "string",
"key": "/library/sections/1/producer",
"title": "Producer",
"type": "filter"
},
{
"filter": "country",
"filterType": "string",
"key": "/library/sections/1/country",
"title": "Country",
"type": "filter"
},
{
"filter": "studio",
"filterType": "string",
"key": "/library/sections/1/studio",
"title": "Studio",
"type": "filter"
},
{
"filter": "resolution",
"filterType": "string",
"key": "/library/sections/1/resolution",
"title": "Resolution",
"type": "filter"
},
{
"filter": "hdr",
"filterType": "boolean",
"key": "/library/sections/1/hdr",
"title": "HDR",
"type": "filter"
},
{
"filter": "unwatched",
"filterType": "boolean",
"key": "/library/sections/1/unwatched",
"title": "Unplayed",
"type": "filter"
},
{
"filter": "inProgress",
"filterType": "boolean",
"key": "/library/sections/1/inProgress",
"title": "In Progress",
"type": "filter"
},
{
"filter": "unmatched",
"filterType": "boolean",
"key": "/library/sections/1/unmatched",
"title": "Unmatched",
"type": "filter"
},
{
"filter": "audioLanguage",
"filterType": "string",
"key": "/library/sections/1/audioLanguage",
"title": "Audio Language",
"type": "filter"
},
{
"filter": "subtitleLanguage",
"filterType": "string",
"key": "/library/sections/1/subtitleLanguage",
"title": "Subtitle Language",
"type": "filter"
},
{
"filter": "editionTitle",
"filterType": "string",
"key": "/library/sections/1/editionTitle",
"title": "Edition",
"type": "filter"
},
{
"filter": "label",
"filterType": "string",
"key": "/library/sections/1/label",
"title": "Labels",
"type": "filter"
}
],
"Sort": [
{
"default": "asc",
"defaultDirection": "asc",
"descKey": "titleSort:desc",
"firstCharacterKey": "/library/sections/1/firstCharacter",
"key": "titleSort",
"title": "Title"
},
{
"defaultDirection": "desc",
"descKey": "originallyAvailableAt:desc",
"key": "originallyAvailableAt",
"title": "Release Date"
},
{
"defaultDirection": "desc",
"descKey": "rating:desc",
"key": "rating",
"title": "Critic Rating"
},
{
"defaultDirection": "desc",
"descKey": "audienceRating:desc",
"key": "audienceRating",
"title": "Audience Rating"
},
{
"defaultDirection": "desc",
"descKey": "duration:desc",
"key": "duration",
"title": "Duration"
},
{
"defaultDirection": "desc",
"descKey": "addedAt:desc",
"key": "addedAt",
"title": "Date Added"
},
{
"defaultDirection": "desc",
"descKey": "lastViewedAt:desc",
"key": "lastViewedAt",
"title": "Date Viewed"
},
{
"defaultDirection": "asc",
"descKey": "mediaHeight:desc",
"key": "mediaHeight",
"title": "Resolution"
},
{
"defaultDirection": "desc",
"descKey": "random:desc",
"key": "random",
"title": "Randomly"
}
],
"Field": [
{
"key": "title",
"title": "Title",
"type": "string"
},
{
"key": "studio",
"title": "Studio",
"type": "string"
},
{
"key": "userRating",
"subType": "rating",
"title": "Rating",
"type": "integer"
},
{
"key": "contentRating",
"title": "Content Rating",
"type": "tag"
},
{
"key": "year",
"subType": "year",
"title": "Year",
"type": "integer"
},
{
"key": "decade",
"subType": "decade",
"title": "Decade",
"type": "integer"
},
{
"key": "originallyAvailableAt",
"title": "Release Date",
"type": "date"
},
{
"key": "duration",
"subType": "duration",
"title": "Duration",
"type": "integer"
},
{
"key": "unmatched",
"title": "Unmatched",
"type": "boolean"
},
{
"key": "duplicate",
"title": "Duplicate",
"type": "boolean"
},
{
"key": "genre",
"title": "Genre",
"type": "tag"
},
{
"key": "collection",
"title": "Collection",
"type": "tag"
},
{
"key": "director",
"title": "Director",
"type": "tag"
},
{
"key": "writer",
"title": "Writer",
"type": "tag"
},
{
"key": "producer",
"title": "Producer",
"type": "tag"
},
{
"key": "actor",
"title": "Actor",
"type": "tag"
},
{
"key": "country",
"title": "Country",
"type": "tag"
},
{
"key": "addedAt",
"title": "Date Added",
"type": "date"
},
{
"key": "viewCount",
"title": "Plays",
"type": "integer"
},
{
"key": "lastViewedAt",
"title": "Last Played",
"type": "date"
},
{
"key": "unwatched",
"title": "Unplayed",
"type": "boolean"
},
{
"key": "resolution",
"title": "Resolution",
"type": "resolution"
},
{
"key": "hdr",
"subType": "hdr",
"title": "HDR",
"type": "boolean"
},
{
"key": "mediaSize",
"subType": "fileSize",
"title": "File Size",
"type": "integer"
},
{
"key": "mediaBitrate",
"subType": "bitrate",
"title": "Bitrate",
"type": "integer"
},
{
"key": "subtitleLanguage",
"title": "Subtitle Language",
"type": "subtitleLanguage"
},
{
"key": "audioLanguage",
"title": "Audio Language",
"type": "audioLanguage"
},
{
"key": "inProgress",
"title": "In Progress",
"type": "boolean"
},
{
"key": "trash",
"title": "Trash",
"type": "boolean"
},
{
"key": "editionTitle",
"title": "Edition",
"type": "string"
},
{
"key": "label",
"title": "Label",
"type": "tag"
}
]
}
] | -| `fieldType` | [operations.FieldType](../../models/operations/fieldtype.md)[] | :heavy_minus_sign: | N/A | [
{
"type": "resolution",
"Operator": [
{
"key": "=",
"title": "is"
}
]
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `size` | *number* | :heavy_minus_sign: | N/A | 29 | +| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | false | +| `art` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg | +| `content` | *string* | :heavy_minus_sign: | N/A | secondary | +| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 | +| `mediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `mediaTagVersion` | *number* | :heavy_minus_sign: | N/A | 1701731894 | +| `thumb` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie.png | +| `title1` | *string* | :heavy_minus_sign: | N/A | Movies | +| `viewGroup` | *string* | :heavy_minus_sign: | N/A | secondary | +| `viewMode` | *number* | :heavy_minus_sign: | N/A | 65592 | +| `directory` | [operations.GetLibraryDirectory](../../models/operations/getlibrarydirectory.md)[] | :heavy_minus_sign: | N/A | | +| `type` | [operations.GetLibraryType](../../models/operations/getlibrarytype.md)[] | :heavy_minus_sign: | N/A | | +| `fieldType` | [operations.FieldType](../../models/operations/fieldtype.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getlibrarytype.md b/docs/models/operations/getlibrarytype.md index 04d2f6ec..672d785f 100644 --- a/docs/models/operations/getlibrarytype.md +++ b/docs/models/operations/getlibrarytype.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `key` | *string* | :heavy_minus_sign: | N/A | /library/sections/1/all?type=1 | -| `type` | *string* | :heavy_minus_sign: | N/A | movie | -| `title` | *string* | :heavy_minus_sign: | N/A | Movies | -| `active` | *boolean* | :heavy_minus_sign: | N/A | false | -| `filter` | [operations.Filter](../../models/operations/filter.md)[] | :heavy_minus_sign: | N/A | [
{
"filter": "label",
"filterType": "string",
"key": "/library/sections/1/label",
"title": "Labels",
"type": "filter"
}
] | -| `sort` | [operations.Sort](../../models/operations/sort.md)[] | :heavy_minus_sign: | N/A | [
{
"default": "asc",
"defaultDirection": "desc",
"descKey": "random:desc",
"firstCharacterKey": "/library/sections/1/firstCharacter",
"key": "random",
"title": "Randomly"
}
] | -| `field` | [operations.Field](../../models/operations/field.md)[] | :heavy_minus_sign: | N/A | [
{
"key": "label",
"title": "Label",
"type": "tag",
"subType": "bitrate"
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `key` | *string* | :heavy_minus_sign: | N/A | /library/sections/1/all?type=1 | +| `type` | *string* | :heavy_minus_sign: | N/A | movie | +| `title` | *string* | :heavy_minus_sign: | N/A | Movies | +| `active` | *boolean* | :heavy_minus_sign: | N/A | false | +| `filter` | [operations.Filter](../../models/operations/filter.md)[] | :heavy_minus_sign: | N/A | | +| `sort` | [operations.Sort](../../models/operations/sort.md)[] | :heavy_minus_sign: | N/A | | +| `field` | [operations.Field](../../models/operations/field.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getmetadatachildrenmediacontainer.md b/docs/models/operations/getmetadatachildrenmediacontainer.md index 628eb96a..930df316 100644 --- a/docs/models/operations/getmetadatachildrenmediacontainer.md +++ b/docs/models/operations/getmetadatachildrenmediacontainer.md @@ -3,28 +3,28 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `size` | *number* | :heavy_minus_sign: | N/A | 3 | -| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | true | -| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/30072/art/1705739923 | -| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `key` | *string* | :heavy_minus_sign: | N/A | 30072 | -| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 2 | -| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | TV Shows | -| `librarySectionUUID` | *string* | :heavy_minus_sign: | N/A | 4bb2521c-8ba9-459b-aaee-8ab8bc35eabd | -| `mediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | -| `mediaTagVersion` | *number* | :heavy_minus_sign: | N/A | 1701731894 | -| `nocache` | *boolean* | :heavy_minus_sign: | N/A | true | -| `parentIndex` | *number* | :heavy_minus_sign: | N/A | 1 | -| `parentTitle` | *string* | :heavy_minus_sign: | N/A | Reacher | -| `parentYear` | *number* | :heavy_minus_sign: | N/A | 2022 | -| `summary` | *string* | :heavy_minus_sign: | N/A | When retired Military Police Officer Jack Reacher is arrested for a murder he did not commit, he finds himself in the middle of a deadly conspiracy full of dirty cops, shady businessmen, and scheming politicians. With nothing but his wits, he must figure out what is happening in Margrave, Georgia. | -| `theme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/30072/theme/1705739923 | -| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/30072/thumb/1705739923 | -| `title1` | *string* | :heavy_minus_sign: | N/A | TV Shows | -| `title2` | *string* | :heavy_minus_sign: | N/A | Reacher | -| `viewGroup` | *string* | :heavy_minus_sign: | N/A | season | -| `viewMode` | *number* | :heavy_minus_sign: | N/A | 65593 | -| `directory` | [operations.GetMetadataChildrenDirectory](../../models/operations/getmetadatachildrendirectory.md)[] | :heavy_minus_sign: | N/A | [
{
"leafCount": 16,
"thumb": "/library/metadata/30072/thumb/1705739923",
"viewedLeafCount": 16,
"key": "/library/metadata/30072/allLeaves",
"title": "All episodes"
}
] | -| `metadata` | [operations.GetMetadataChildrenMetadata](../../models/operations/getmetadatachildrenmetadata.md)[] | :heavy_minus_sign: | N/A | [
{
"ratingKey": "66488",
"key": "/library/metadata/66488/children",
"parentRatingKey": "30072",
"guid": "plex://season/652aea6549508477c34c6000",
"parentGuid": "plex://show/5d9c09190aaccd001f8f42f0",
"parentStudio": "Amazon Studios",
"type": "season",
"title": "Season 2",
"parentKey": "/library/metadata/30072",
"parentTitle": "Reacher",
"summary": "Based on\"Bad Luck and Trouble,\" when members of Reacher's old military unit start turning up dead, Reacher has just one thing on his mind—revenge.",
"index": 2,
"parentIndex": 1,
"viewCount": 11,
"lastViewedAt": 1705646565,
"parentYear": 2022,
"thumb": "/library/metadata/66488/thumb/1703065033",
"art": "/library/metadata/30072/art/1705739923",
"parentThumb": "/library/metadata/30072/thumb/1705739923",
"parentTheme": "/library/metadata/30072/theme/1705739923",
"leafCount": 8,
"viewedLeafCount": 8,
"addedAt": 1702602021,
"updatedAt": 1703065033,
"userRating": 9,
"skipCount": 1,
"lastRatedAt": 1703881224
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `size` | *number* | :heavy_minus_sign: | N/A | 3 | +| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | true | +| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/30072/art/1705739923 | +| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `key` | *string* | :heavy_minus_sign: | N/A | 30072 | +| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 2 | +| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | TV Shows | +| `librarySectionUUID` | *string* | :heavy_minus_sign: | N/A | 4bb2521c-8ba9-459b-aaee-8ab8bc35eabd | +| `mediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `mediaTagVersion` | *number* | :heavy_minus_sign: | N/A | 1701731894 | +| `nocache` | *boolean* | :heavy_minus_sign: | N/A | true | +| `parentIndex` | *number* | :heavy_minus_sign: | N/A | 1 | +| `parentTitle` | *string* | :heavy_minus_sign: | N/A | Reacher | +| `parentYear` | *number* | :heavy_minus_sign: | N/A | 2022 | +| `summary` | *string* | :heavy_minus_sign: | N/A | When retired Military Police Officer Jack Reacher is arrested for a murder he did not commit, he finds himself in the middle of a deadly conspiracy full of dirty cops, shady businessmen, and scheming politicians. With nothing but his wits, he must figure out what is happening in Margrave, Georgia. | +| `theme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/30072/theme/1705739923 | +| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/30072/thumb/1705739923 | +| `title1` | *string* | :heavy_minus_sign: | N/A | TV Shows | +| `title2` | *string* | :heavy_minus_sign: | N/A | Reacher | +| `viewGroup` | *string* | :heavy_minus_sign: | N/A | season | +| `viewMode` | *number* | :heavy_minus_sign: | N/A | 65593 | +| `directory` | [operations.GetMetadataChildrenDirectory](../../models/operations/getmetadatachildrendirectory.md)[] | :heavy_minus_sign: | N/A | [
{
"leafCount": 16,
"thumb": "/library/metadata/30072/thumb/1705739923",
"viewedLeafCount": 16,
"key": "/library/metadata/30072/allLeaves",
"title": "All episodes"
}
] | +| `metadata` | [operations.GetMetadataChildrenMetadata](../../models/operations/getmetadatachildrenmetadata.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getmetadatamedia.md b/docs/models/operations/getmetadatamedia.md index 5c554803..2da9e004 100644 --- a/docs/models/operations/getmetadatamedia.md +++ b/docs/models/operations/getmetadatamedia.md @@ -3,22 +3,22 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `id` | *number* | :heavy_minus_sign: | N/A | 15 | -| `duration` | *number* | :heavy_minus_sign: | N/A | 141417 | -| `bitrate` | *number* | :heavy_minus_sign: | N/A | 2278 | -| `width` | *number* | :heavy_minus_sign: | N/A | 1920 | -| `height` | *number* | :heavy_minus_sign: | N/A | 814 | -| `aspectRatio` | *number* | :heavy_minus_sign: | N/A | 2.35 | -| `audioChannels` | *number* | :heavy_minus_sign: | N/A | 2 | -| `audioCodec` | *string* | :heavy_minus_sign: | N/A | aac | -| `videoCodec` | *string* | :heavy_minus_sign: | N/A | h264 | -| `videoResolution` | *string* | :heavy_minus_sign: | N/A | 1080 | -| `container` | *string* | :heavy_minus_sign: | N/A | mp4 | -| `videoFrameRate` | *string* | :heavy_minus_sign: | N/A | 24p | -| `optimizedForStreaming` | *number* | :heavy_minus_sign: | N/A | 0 | -| `audioProfile` | *string* | :heavy_minus_sign: | N/A | lc | -| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | false | -| `videoProfile` | *string* | :heavy_minus_sign: | N/A | high | -| `part` | [operations.GetMetadataPart](../../models/operations/getmetadatapart.md)[] | :heavy_minus_sign: | N/A | [
{
"id": 15,
"key": "/library/parts/15/1705637151/file.mp4",
"duration": 141417,
"file": "/movies/Serenity (2005)/Serenity (2005).mp4",
"size": 40271948,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": false,
"videoProfile": "high",
"Stream": [
{
"id": 30,
"streamType": 1,
"default": true,
"codec": "h264",
"index": 1,
"bitrate": 2160,
"bitDepth": 8,
"chromaLocation": "left",
"chromaSubsampling": 14520,
"codedHeight": 816,
"codedWidth": 1920,
"colorPrimaries": "bt709",
"colorRange": "tv",
"colorSpace": "bt709",
"colorTrc": "bt709",
"frameRate": 24,
"hasScalingMatrix": false,
"height": 814,
"level": 40,
"profile": "high",
"refFrames": 4,
"scanType": "progressive",
"streamIdentifier": "2",
"width": 1920,
"displayTitle": "1080p (H.264)",
"extendedDisplayTitle": "1080p (H.264)"
},
{
"id": 29,
"streamType": 2,
"selected": true,
"default": true,
"codec": "aac",
"index": 0,
"channels": 2,
"bitrate": 128,
"language": "English",
"languageTag": "en",
"languageCode": "eng",
"profile": "lc",
"samplingRate": 44100,
"streamIdentifier": "1",
"displayTitle": "English (AAC Stereo)",
"extendedDisplayTitle": "English (AAC Stereo)"
}
]
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | 15 | +| `duration` | *number* | :heavy_minus_sign: | N/A | 141417 | +| `bitrate` | *number* | :heavy_minus_sign: | N/A | 2278 | +| `width` | *number* | :heavy_minus_sign: | N/A | 1920 | +| `height` | *number* | :heavy_minus_sign: | N/A | 814 | +| `aspectRatio` | *number* | :heavy_minus_sign: | N/A | 2.35 | +| `audioChannels` | *number* | :heavy_minus_sign: | N/A | 2 | +| `audioCodec` | *string* | :heavy_minus_sign: | N/A | aac | +| `videoCodec` | *string* | :heavy_minus_sign: | N/A | h264 | +| `videoResolution` | *string* | :heavy_minus_sign: | N/A | 1080 | +| `container` | *string* | :heavy_minus_sign: | N/A | mp4 | +| `videoFrameRate` | *string* | :heavy_minus_sign: | N/A | 24p | +| `optimizedForStreaming` | *number* | :heavy_minus_sign: | N/A | 0 | +| `audioProfile` | *string* | :heavy_minus_sign: | N/A | lc | +| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | false | +| `videoProfile` | *string* | :heavy_minus_sign: | N/A | high | +| `part` | [operations.GetMetadataPart](../../models/operations/getmetadatapart.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getmetadatamediacontainer.md b/docs/models/operations/getmetadatamediacontainer.md index b965af01..f092ee5d 100644 --- a/docs/models/operations/getmetadatamediacontainer.md +++ b/docs/models/operations/getmetadatamediacontainer.md @@ -3,14 +3,14 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 1 | -| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | true | -| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 | -| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | -| `librarySectionUUID` | *string* | :heavy_minus_sign: | N/A | cfc899d7-3000-46f6-8489-b9592714ada5 | -| `mediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | -| `mediaTagVersion` | *number* | :heavy_minus_sign: | N/A | 1698860922 | -| `metadata` | [operations.GetMetadataMetadata](../../models/operations/getmetadatametadata.md)[] | :heavy_minus_sign: | N/A | [
{
"ratingKey": "17",
"key": "/library/metadata/17",
"guid": "plex://movie/5d77683f6f4521001ea9dc53",
"studio": "Universal Pictures",
"type": "movie",
"title": "Serenity",
"librarySectionTitle": "Movies",
"librarySectionID": 1,
"librarySectionKey": "/library/sections/1",
"contentRating": "PG-13",
"summary": "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.",
"rating": 8.2,
"audienceRating": 9.1,
"year": 2005,
"tagline": "They aim to misbehave.",
"thumb": "/library/metadata/17/thumb/1705637165",
"art": "/library/metadata/17/art/1705637165",
"duration": 141417,
"originallyAvailableAt": "2005-09-29T00:00:00Z",
"addedAt": 1705637164,
"updatedAt": 1705637165,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"hasPremiumPrimaryExtra": "1",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 15,
"duration": 141417,
"bitrate": 2278,
"width": 1920,
"height": 814,
"aspectRatio": 2.35,
"audioChannels": 2,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 0,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 15,
"key": "/library/parts/15/1705637151/file.mp4",
"duration": 141417,
"file": "/movies/Serenity (2005)/Serenity (2005).mp4",
"size": 40271948,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": false,
"videoProfile": "high",
"Stream": [
{
"id": 30,
"streamType": 1,
"default": true,
"codec": "h264",
"index": 1,
"bitrate": 2160,
"bitDepth": 8,
"chromaLocation": "left",
"chromaSubsampling": 14520,
"codedHeight": 816,
"codedWidth": 1920,
"colorPrimaries": "bt709",
"colorRange": "tv",
"colorSpace": "bt709",
"colorTrc": "bt709",
"frameRate": 24,
"hasScalingMatrix": false,
"height": 814,
"level": 40,
"profile": "high",
"refFrames": 4,
"scanType": "progressive",
"streamIdentifier": "2",
"width": 1920,
"displayTitle": "1080p (H.264)",
"extendedDisplayTitle": "1080p (H.264)"
},
{
"id": 29,
"streamType": 2,
"selected": true,
"default": true,
"codec": "aac",
"index": 0,
"channels": 2,
"bitrate": 128,
"language": "English",
"languageTag": "en",
"languageCode": "eng",
"profile": "lc",
"samplingRate": 44100,
"streamIdentifier": "1",
"displayTitle": "English (AAC Stereo)",
"extendedDisplayTitle": "English (AAC Stereo)"
}
]
}
]
}
],
"Genre": [
{
"id": 5,
"filter": "genre=5",
"tag": "Science Fiction"
}
],
"Country": [
{
"id": 116,
"filter": "country=116",
"tag": "United States of America"
}
],
"Guid": [
{
"id": "imdb://tt0379786"
}
],
"Rating": [
{
"image": "imdb://image.rating",
"value": 7.8,
"type": "audience"
}
],
"Director": [
{
"id": 130,
"filter": "director=130",
"tag": "Joss Whedon",
"tagKey": "5d776828880197001ec90e8f",
"thumb": "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg"
}
],
"Writer": [
{
"id": 132,
"filter": "writer=132",
"tag": "Joss Whedon",
"tagKey": "5d776828880197001ec90e8f",
"thumb": "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg"
}
],
"Role": [
{
"id": 8,
"filter": "actor=8",
"tag": "Nathan Fillion",
"tagKey": "5d7768286f4521001ea9945c",
"role": "Malcolm \"Mal\" Reynolds",
"thumb": "https://metadata-static.plex.tv/4/people/4a2890ca346eb832500b1ed0add89d5e.jpg"
}
],
"Producer": [
{
"id": 221,
"filter": "producer=221",
"tag": "Barry Mendel",
"tagKey": "5d776826961905001eb90e2b",
"thumb": "https://metadata-static.plex.tv/8/people/87877371326a964634d18556d94547e1.jpg"
}
]
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `size` | *number* | :heavy_minus_sign: | N/A | 1 | +| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | true | +| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 | +| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | +| `librarySectionUUID` | *string* | :heavy_minus_sign: | N/A | cfc899d7-3000-46f6-8489-b9592714ada5 | +| `mediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `mediaTagVersion` | *number* | :heavy_minus_sign: | N/A | 1698860922 | +| `metadata` | [operations.GetMetadataMetadata](../../models/operations/getmetadatametadata.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getmetadatametadata.md b/docs/models/operations/getmetadatametadata.md index 6e7589b9..aa84bc6d 100644 --- a/docs/models/operations/getmetadatametadata.md +++ b/docs/models/operations/getmetadatametadata.md @@ -3,38 +3,38 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ratingKey` | *string* | :heavy_minus_sign: | N/A | 17 | -| `key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17 | -| `guid` | *string* | :heavy_minus_sign: | N/A | plex://movie/5d77683f6f4521001ea9dc53 | -| `studio` | *string* | :heavy_minus_sign: | N/A | Universal Pictures | -| `type` | *string* | :heavy_minus_sign: | N/A | movie | -| `title` | *string* | :heavy_minus_sign: | N/A | Serenity | -| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | -| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 | -| `librarySectionKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/1 | -| `contentRating` | *string* | :heavy_minus_sign: | N/A | PG-13 | -| `summary` | *string* | :heavy_minus_sign: | N/A | Serenity continues the story of the TV series it was based upon ("Firefly"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job. | -| `rating` | *number* | :heavy_minus_sign: | N/A | 8.2 | -| `audienceRating` | *number* | :heavy_minus_sign: | N/A | 9.1 | -| `year` | *number* | :heavy_minus_sign: | N/A | 2005 | -| `tagline` | *string* | :heavy_minus_sign: | N/A | They aim to misbehave. | -| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17/thumb/1705637165 | -| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17/art/1705637165 | -| `duration` | *number* | :heavy_minus_sign: | N/A | 141417 | -| `originallyAvailableAt` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | N/A | 2005-09-29 00:00:00 +0000 UTC | -| `addedAt` | *number* | :heavy_minus_sign: | N/A | 1705637164 | -| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1705637165 | -| `audienceRatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | -| `hasPremiumPrimaryExtra` | *string* | :heavy_minus_sign: | N/A | 1 | -| `ratingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | -| `media` | [operations.GetMetadataMedia](../../models/operations/getmetadatamedia.md)[] | :heavy_minus_sign: | N/A | [
{
"id": 15,
"duration": 141417,
"bitrate": 2278,
"width": 1920,
"height": 814,
"aspectRatio": 2.35,
"audioChannels": 2,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 0,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 15,
"key": "/library/parts/15/1705637151/file.mp4",
"duration": 141417,
"file": "/movies/Serenity (2005)/Serenity (2005).mp4",
"size": 40271948,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": false,
"videoProfile": "high",
"Stream": [
{
"id": 30,
"streamType": 1,
"default": true,
"codec": "h264",
"index": 1,
"bitrate": 2160,
"bitDepth": 8,
"chromaLocation": "left",
"chromaSubsampling": 14520,
"codedHeight": 816,
"codedWidth": 1920,
"colorPrimaries": "bt709",
"colorRange": "tv",
"colorSpace": "bt709",
"colorTrc": "bt709",
"frameRate": 24,
"hasScalingMatrix": false,
"height": 814,
"level": 40,
"profile": "high",
"refFrames": 4,
"scanType": "progressive",
"streamIdentifier": "2",
"width": 1920,
"displayTitle": "1080p (H.264)",
"extendedDisplayTitle": "1080p (H.264)"
},
{
"id": 29,
"streamType": 2,
"selected": true,
"default": true,
"codec": "aac",
"index": 0,
"channels": 2,
"bitrate": 128,
"language": "English",
"languageTag": "en",
"languageCode": "eng",
"profile": "lc",
"samplingRate": 44100,
"streamIdentifier": "1",
"displayTitle": "English (AAC Stereo)",
"extendedDisplayTitle": "English (AAC Stereo)"
}
]
}
]
}
] | -| `genre` | [operations.GetMetadataGenre](../../models/operations/getmetadatagenre.md)[] | :heavy_minus_sign: | N/A | [
{
"id": 184,
"filter": "genre=184",
"tag": "Thriller"
}
] | -| `country` | [operations.GetMetadataCountry](../../models/operations/getmetadatacountry.md)[] | :heavy_minus_sign: | N/A | [
{
"id": 116,
"filter": "country=116",
"tag": "United States of America"
}
] | -| `guids` | [operations.Guids](../../models/operations/guids.md)[] | :heavy_minus_sign: | N/A | [
{
"id": "tvdb://2337"
}
] | -| `ratings` | [operations.Ratings](../../models/operations/ratings.md)[] | :heavy_minus_sign: | N/A | [
{
"image": "themoviedb://image.rating",
"value": 7.4,
"type": "audience"
}
] | -| `director` | [operations.GetMetadataDirector](../../models/operations/getmetadatadirector.md)[] | :heavy_minus_sign: | N/A | [
{
"id": 130,
"filter": "director=130",
"tag": "Joss Whedon",
"tagKey": "5d776828880197001ec90e8f",
"thumb": "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg"
}
] | -| `writer` | [operations.GetMetadataWriter](../../models/operations/getmetadatawriter.md)[] | :heavy_minus_sign: | N/A | [
{
"id": 132,
"filter": "writer=132",
"tag": "Joss Whedon",
"tagKey": "5d776828880197001ec90e8f",
"thumb": "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg"
}
] | -| `role` | [operations.GetMetadataRole](../../models/operations/getmetadatarole.md)[] | :heavy_minus_sign: | N/A | [
{
"id": 220,
"filter": "actor=220",
"tag": "Dennis Keiffer",
"tagKey": "5d77683554f42c001f8c4708",
"role": "Bar Guy (uncredited)",
"thumb": "https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg"
}
] | -| `producer` | [operations.Producer](../../models/operations/producer.md)[] | :heavy_minus_sign: | N/A | [
{
"id": 221,
"filter": "producer=221",
"tag": "Barry Mendel",
"tagKey": "5d776826961905001eb90e2b",
"thumb": "https://metadata-static.plex.tv/8/people/87877371326a964634d18556d94547e1.jpg"
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ratingKey` | *string* | :heavy_minus_sign: | N/A | 17 | +| `key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17 | +| `guid` | *string* | :heavy_minus_sign: | N/A | plex://movie/5d77683f6f4521001ea9dc53 | +| `studio` | *string* | :heavy_minus_sign: | N/A | Universal Pictures | +| `type` | *string* | :heavy_minus_sign: | N/A | movie | +| `title` | *string* | :heavy_minus_sign: | N/A | Serenity | +| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | +| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 | +| `librarySectionKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/1 | +| `contentRating` | *string* | :heavy_minus_sign: | N/A | PG-13 | +| `summary` | *string* | :heavy_minus_sign: | N/A | Serenity continues the story of the TV series it was based upon ("Firefly"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job. | +| `rating` | *number* | :heavy_minus_sign: | N/A | 8.2 | +| `audienceRating` | *number* | :heavy_minus_sign: | N/A | 9.1 | +| `year` | *number* | :heavy_minus_sign: | N/A | 2005 | +| `tagline` | *string* | :heavy_minus_sign: | N/A | They aim to misbehave. | +| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17/thumb/1705637165 | +| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17/art/1705637165 | +| `duration` | *number* | :heavy_minus_sign: | N/A | 141417 | +| `originallyAvailableAt` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | N/A | 2005-09-29 00:00:00 +0000 UTC | +| `addedAt` | *number* | :heavy_minus_sign: | N/A | 1705637164 | +| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1705637165 | +| `audienceRatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | +| `hasPremiumPrimaryExtra` | *string* | :heavy_minus_sign: | N/A | 1 | +| `ratingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | +| `media` | [operations.GetMetadataMedia](../../models/operations/getmetadatamedia.md)[] | :heavy_minus_sign: | N/A | | +| `genre` | [operations.GetMetadataGenre](../../models/operations/getmetadatagenre.md)[] | :heavy_minus_sign: | N/A | | +| `country` | [operations.GetMetadataCountry](../../models/operations/getmetadatacountry.md)[] | :heavy_minus_sign: | N/A | | +| `guids` | [operations.Guids](../../models/operations/guids.md)[] | :heavy_minus_sign: | N/A | | +| `ratings` | [operations.Ratings](../../models/operations/ratings.md)[] | :heavy_minus_sign: | N/A | | +| `director` | [operations.GetMetadataDirector](../../models/operations/getmetadatadirector.md)[] | :heavy_minus_sign: | N/A | | +| `writer` | [operations.GetMetadataWriter](../../models/operations/getmetadatawriter.md)[] | :heavy_minus_sign: | N/A | | +| `role` | [operations.GetMetadataRole](../../models/operations/getmetadatarole.md)[] | :heavy_minus_sign: | N/A | | +| `producer` | [operations.Producer](../../models/operations/producer.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getmetadatapart.md b/docs/models/operations/getmetadatapart.md index 76951214..5f45f2e5 100644 --- a/docs/models/operations/getmetadatapart.md +++ b/docs/models/operations/getmetadatapart.md @@ -3,16 +3,16 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_minus_sign: | N/A | 15 | -| `key` | *string* | :heavy_minus_sign: | N/A | /library/parts/15/1705637151/file.mp4 | -| `duration` | *number* | :heavy_minus_sign: | N/A | 141417 | -| `file` | *string* | :heavy_minus_sign: | N/A | /movies/Serenity (2005)/Serenity (2005).mp4 | -| `size` | *number* | :heavy_minus_sign: | N/A | 40271948 | -| `audioProfile` | *string* | :heavy_minus_sign: | N/A | lc | -| `container` | *string* | :heavy_minus_sign: | N/A | mp4 | -| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | false | -| `optimizedForStreaming` | *boolean* | :heavy_minus_sign: | N/A | false | -| `videoProfile` | *string* | :heavy_minus_sign: | N/A | high | -| `stream` | [operations.Stream](../../models/operations/stream.md)[] | :heavy_minus_sign: | N/A | [
{
"id": 29,
"streamType": 2,
"default": true,
"codec": "aac",
"index": 0,
"bitrate": 128,
"bitDepth": 8,
"chromaLocation": "left",
"chromaSubsampling": 14520,
"codedHeight": 816,
"codedWidth": 1920,
"colorPrimaries": "bt709",
"colorRange": "tv",
"colorSpace": "bt709",
"colorTrc": "bt709",
"frameRate": 24,
"hasScalingMatrix": false,
"height": 814,
"level": 40,
"profile": "lc",
"refFrames": 4,
"scanType": "progressive",
"streamIdentifier": "1",
"width": 1920,
"displayTitle": "English (AAC Stereo)",
"extendedDisplayTitle": "English (AAC Stereo)",
"selected": true,
"channels": 2,
"language": "English",
"languageTag": "en",
"languageCode": "eng",
"samplingRate": 44100
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | 15 | +| `key` | *string* | :heavy_minus_sign: | N/A | /library/parts/15/1705637151/file.mp4 | +| `duration` | *number* | :heavy_minus_sign: | N/A | 141417 | +| `file` | *string* | :heavy_minus_sign: | N/A | /movies/Serenity (2005)/Serenity (2005).mp4 | +| `size` | *number* | :heavy_minus_sign: | N/A | 40271948 | +| `audioProfile` | *string* | :heavy_minus_sign: | N/A | lc | +| `container` | *string* | :heavy_minus_sign: | N/A | mp4 | +| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | false | +| `optimizedForStreaming` | *boolean* | :heavy_minus_sign: | N/A | false | +| `videoProfile` | *string* | :heavy_minus_sign: | N/A | high | +| `stream` | [operations.Stream](../../models/operations/stream.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getpinglobals.md b/docs/models/operations/getpinglobals.md new file mode 100644 index 00000000..16f62421 --- /dev/null +++ b/docs/models/operations/getpinglobals.md @@ -0,0 +1,8 @@ +# GetPinGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_check_mark: | The unique identifier for the client application
This is used to track the client application and its usage
(UUID, serial number, or other number unique per device)
| Postman | \ No newline at end of file diff --git a/docs/models/operations/getplaylistcontentsmedia.md b/docs/models/operations/getplaylistcontentsmedia.md index a32492a1..0b52bce8 100644 --- a/docs/models/operations/getplaylistcontentsmedia.md +++ b/docs/models/operations/getplaylistcontentsmedia.md @@ -3,22 +3,22 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_minus_sign: | N/A | 15 | -| `duration` | *number* | :heavy_minus_sign: | N/A | 141416 | -| `bitrate` | *number* | :heavy_minus_sign: | N/A | 2273 | -| `width` | *number* | :heavy_minus_sign: | N/A | 1920 | -| `height` | *number* | :heavy_minus_sign: | N/A | 814 | -| `aspectRatio` | *number* | :heavy_minus_sign: | N/A | 2.35 | -| `audioChannels` | *number* | :heavy_minus_sign: | N/A | 2 | -| `audioCodec` | *string* | :heavy_minus_sign: | N/A | aac | -| `videoCodec` | *string* | :heavy_minus_sign: | N/A | h264 | -| `videoResolution` | *string* | :heavy_minus_sign: | N/A | 1080 | -| `container` | *string* | :heavy_minus_sign: | N/A | mp4 | -| `videoFrameRate` | *string* | :heavy_minus_sign: | N/A | 24p | -| `optimizedForStreaming` | *number* | :heavy_minus_sign: | N/A | 0 | -| `audioProfile` | *string* | :heavy_minus_sign: | N/A | lc | -| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | false | -| `videoProfile` | *string* | :heavy_minus_sign: | N/A | high | -| `part` | [operations.GetPlaylistContentsPart](../../models/operations/getplaylistcontentspart.md)[] | :heavy_minus_sign: | N/A | [
{
"id": 15,
"key": "/library/parts/15/1705637151/file.mp4",
"duration": 141416,
"file": "/movies/Serenity (2005)/Serenity (2005).mp4",
"size": 40271948,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": false,
"videoProfile": "high"
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `id` | *number* | :heavy_minus_sign: | N/A | 15 | +| `duration` | *number* | :heavy_minus_sign: | N/A | 141416 | +| `bitrate` | *number* | :heavy_minus_sign: | N/A | 2273 | +| `width` | *number* | :heavy_minus_sign: | N/A | 1920 | +| `height` | *number* | :heavy_minus_sign: | N/A | 814 | +| `aspectRatio` | *number* | :heavy_minus_sign: | N/A | 2.35 | +| `audioChannels` | *number* | :heavy_minus_sign: | N/A | 2 | +| `audioCodec` | *string* | :heavy_minus_sign: | N/A | aac | +| `videoCodec` | *string* | :heavy_minus_sign: | N/A | h264 | +| `videoResolution` | *string* | :heavy_minus_sign: | N/A | 1080 | +| `container` | *string* | :heavy_minus_sign: | N/A | mp4 | +| `videoFrameRate` | *string* | :heavy_minus_sign: | N/A | 24p | +| `optimizedForStreaming` | *number* | :heavy_minus_sign: | N/A | 0 | +| `audioProfile` | *string* | :heavy_minus_sign: | N/A | lc | +| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | false | +| `videoProfile` | *string* | :heavy_minus_sign: | N/A | high | +| `part` | [operations.GetPlaylistContentsPart](../../models/operations/getplaylistcontentspart.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getplaylistcontentsmediacontainer.md b/docs/models/operations/getplaylistcontentsmediacontainer.md index 5e7c4fed..7e9aa4cf 100644 --- a/docs/models/operations/getplaylistcontentsmediacontainer.md +++ b/docs/models/operations/getplaylistcontentsmediacontainer.md @@ -3,14 +3,14 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 2 | -| `composite` | *string* | :heavy_minus_sign: | N/A | /playlists/95/composite/1705717521 | -| `duration` | *number* | :heavy_minus_sign: | N/A | 282 | -| `leafCount` | *number* | :heavy_minus_sign: | N/A | 2 | -| `playlistType` | *string* | :heavy_minus_sign: | N/A | video | -| `ratingKey` | *string* | :heavy_minus_sign: | N/A | 95 | -| `smart` | *boolean* | :heavy_minus_sign: | N/A | true | -| `title` | *string* | :heavy_minus_sign: | N/A | Smart Movie Playlist | -| `metadata` | [operations.GetPlaylistContentsMetadata](../../models/operations/getplaylistcontentsmetadata.md)[] | :heavy_minus_sign: | N/A | [
{
"ratingKey": "17",
"key": "/library/metadata/17",
"guid": "plex://movie/5d77683f6f4521001ea9dc53",
"studio": "Universal Pictures",
"type": "movie",
"title": "Serenity",
"titleSort": "Amazing Spider-Man 2",
"librarySectionTitle": "Movies",
"librarySectionID": 1,
"librarySectionKey": "/library/sections/1",
"contentRating": "PG-13",
"summary": "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.",
"rating": 8.2,
"audienceRating": 9.1,
"year": 2005,
"tagline": "They aim to misbehave.",
"thumb": "/library/metadata/17/thumb/1705637165",
"art": "/library/metadata/17/art/1705637165",
"duration": 141416,
"originallyAvailableAt": "2005-09-29T00:00:00Z",
"addedAt": 1705637164,
"updatedAt": 1705637165,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"hasPremiumExtras": "1",
"hasPremiumPrimaryExtra": "1",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 15,
"duration": 141416,
"bitrate": 2273,
"width": 1920,
"height": 814,
"aspectRatio": 2.35,
"audioChannels": 2,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 0,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 15,
"key": "/library/parts/15/1705637151/file.mp4",
"duration": 141416,
"file": "/movies/Serenity (2005)/Serenity (2005).mp4",
"size": 40271948,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": false,
"videoProfile": "high"
}
]
}
],
"Genre": [
{
"tag": "Science Fiction"
}
],
"Country": [
{
"tag": "United States of America"
}
],
"Director": [
{
"tag": "Joss Whedon"
}
],
"Writer": [
{
"tag": "Joss Whedon"
}
],
"Role": [
{
"tag": "Nathan Fillion"
}
]
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `size` | *number* | :heavy_minus_sign: | N/A | 2 | +| `composite` | *string* | :heavy_minus_sign: | N/A | /playlists/95/composite/1705717521 | +| `duration` | *number* | :heavy_minus_sign: | N/A | 282 | +| `leafCount` | *number* | :heavy_minus_sign: | N/A | 2 | +| `playlistType` | *string* | :heavy_minus_sign: | N/A | video | +| `ratingKey` | *string* | :heavy_minus_sign: | N/A | 95 | +| `smart` | *boolean* | :heavy_minus_sign: | N/A | true | +| `title` | *string* | :heavy_minus_sign: | N/A | Smart Movie Playlist | +| `metadata` | [operations.GetPlaylistContentsMetadata](../../models/operations/getplaylistcontentsmetadata.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getplaylistcontentsmetadata.md b/docs/models/operations/getplaylistcontentsmetadata.md index 4b2b41ae..87d82189 100644 --- a/docs/models/operations/getplaylistcontentsmetadata.md +++ b/docs/models/operations/getplaylistcontentsmetadata.md @@ -3,37 +3,37 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `ratingKey` | *string* | :heavy_minus_sign: | N/A | 17 | -| `key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17 | -| `guid` | *string* | :heavy_minus_sign: | N/A | plex://movie/5d77683f6f4521001ea9dc53 | -| `studio` | *string* | :heavy_minus_sign: | N/A | Universal Pictures | -| `type` | *string* | :heavy_minus_sign: | N/A | movie | -| `title` | *string* | :heavy_minus_sign: | N/A | Serenity | -| `titleSort` | *string* | :heavy_minus_sign: | N/A | Amazing Spider-Man 2 | -| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | -| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 | -| `librarySectionKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/1 | -| `contentRating` | *string* | :heavy_minus_sign: | N/A | PG-13 | -| `summary` | *string* | :heavy_minus_sign: | N/A | Serenity continues the story of the TV series it was based upon ("Firefly"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job. | -| `rating` | *number* | :heavy_minus_sign: | N/A | 8.2 | -| `audienceRating` | *number* | :heavy_minus_sign: | N/A | 9.1 | -| `year` | *number* | :heavy_minus_sign: | N/A | 2005 | -| `tagline` | *string* | :heavy_minus_sign: | N/A | They aim to misbehave. | -| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17/thumb/1705637165 | -| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17/art/1705637165 | -| `duration` | *number* | :heavy_minus_sign: | N/A | 141416 | -| `originallyAvailableAt` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | N/A | 2005-09-29 00:00:00 +0000 UTC | -| `addedAt` | *number* | :heavy_minus_sign: | N/A | 1705637164 | -| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1705637165 | -| `audienceRatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | -| `hasPremiumExtras` | *string* | :heavy_minus_sign: | N/A | 1 | -| `hasPremiumPrimaryExtra` | *string* | :heavy_minus_sign: | N/A | 1 | -| `ratingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | -| `media` | [operations.GetPlaylistContentsMedia](../../models/operations/getplaylistcontentsmedia.md)[] | :heavy_minus_sign: | N/A | [
{
"id": 15,
"duration": 141416,
"bitrate": 2273,
"width": 1920,
"height": 814,
"aspectRatio": 2.35,
"audioChannels": 2,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 0,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 15,
"key": "/library/parts/15/1705637151/file.mp4",
"duration": 141416,
"file": "/movies/Serenity (2005)/Serenity (2005).mp4",
"size": 40271948,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": false,
"videoProfile": "high"
}
]
}
] | -| `genre` | [operations.GetPlaylistContentsGenre](../../models/operations/getplaylistcontentsgenre.md)[] | :heavy_minus_sign: | N/A | [
{
"tag": "Action"
}
] | -| `country` | [operations.GetPlaylistContentsCountry](../../models/operations/getplaylistcontentscountry.md)[] | :heavy_minus_sign: | N/A | [
{
"tag": "United States of America"
}
] | -| `director` | [operations.GetPlaylistContentsDirector](../../models/operations/getplaylistcontentsdirector.md)[] | :heavy_minus_sign: | N/A | [
{
"tag": "Joss Whedon"
}
] | -| `writer` | [operations.GetPlaylistContentsWriter](../../models/operations/getplaylistcontentswriter.md)[] | :heavy_minus_sign: | N/A | [
{
"tag": "Joss Whedon"
}
] | -| `role` | [operations.GetPlaylistContentsRole](../../models/operations/getplaylistcontentsrole.md)[] | :heavy_minus_sign: | N/A | [
{
"tag": "Gina Torres"
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ratingKey` | *string* | :heavy_minus_sign: | N/A | 17 | +| `key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17 | +| `guid` | *string* | :heavy_minus_sign: | N/A | plex://movie/5d77683f6f4521001ea9dc53 | +| `studio` | *string* | :heavy_minus_sign: | N/A | Universal Pictures | +| `type` | *string* | :heavy_minus_sign: | N/A | movie | +| `title` | *string* | :heavy_minus_sign: | N/A | Serenity | +| `titleSort` | *string* | :heavy_minus_sign: | N/A | Amazing Spider-Man 2 | +| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | +| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 | +| `librarySectionKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/1 | +| `contentRating` | *string* | :heavy_minus_sign: | N/A | PG-13 | +| `summary` | *string* | :heavy_minus_sign: | N/A | Serenity continues the story of the TV series it was based upon ("Firefly"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job. | +| `rating` | *number* | :heavy_minus_sign: | N/A | 8.2 | +| `audienceRating` | *number* | :heavy_minus_sign: | N/A | 9.1 | +| `year` | *number* | :heavy_minus_sign: | N/A | 2005 | +| `tagline` | *string* | :heavy_minus_sign: | N/A | They aim to misbehave. | +| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17/thumb/1705637165 | +| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17/art/1705637165 | +| `duration` | *number* | :heavy_minus_sign: | N/A | 141416 | +| `originallyAvailableAt` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | N/A | 2005-09-29 00:00:00 +0000 UTC | +| `addedAt` | *number* | :heavy_minus_sign: | N/A | 1705637164 | +| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1705637165 | +| `audienceRatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | +| `hasPremiumExtras` | *string* | :heavy_minus_sign: | N/A | 1 | +| `hasPremiumPrimaryExtra` | *string* | :heavy_minus_sign: | N/A | 1 | +| `ratingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | +| `media` | [operations.GetPlaylistContentsMedia](../../models/operations/getplaylistcontentsmedia.md)[] | :heavy_minus_sign: | N/A | | +| `genre` | [operations.GetPlaylistContentsGenre](../../models/operations/getplaylistcontentsgenre.md)[] | :heavy_minus_sign: | N/A | | +| `country` | [operations.GetPlaylistContentsCountry](../../models/operations/getplaylistcontentscountry.md)[] | :heavy_minus_sign: | N/A | | +| `director` | [operations.GetPlaylistContentsDirector](../../models/operations/getplaylistcontentsdirector.md)[] | :heavy_minus_sign: | N/A | | +| `writer` | [operations.GetPlaylistContentsWriter](../../models/operations/getplaylistcontentswriter.md)[] | :heavy_minus_sign: | N/A | | +| `role` | [operations.GetPlaylistContentsRole](../../models/operations/getplaylistcontentsrole.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getplaylistmediacontainer.md b/docs/models/operations/getplaylistmediacontainer.md index 708b1118..64444800 100644 --- a/docs/models/operations/getplaylistmediacontainer.md +++ b/docs/models/operations/getplaylistmediacontainer.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `size` | *number* | :heavy_minus_sign: | N/A | 1 | -| `metadata` | [operations.GetPlaylistMetadata](../../models/operations/getplaylistmetadata.md)[] | :heavy_minus_sign: | N/A | [
{
"content": "library://x/directory/%2Flibrary%2Fsections%2F1%2Fall%3Ftype%3D1%26push%3D1%26title%3D2%26or%3D1%26title%3DSerenity%26pop%3D1",
"ratingKey": "95",
"key": "/playlists/95/items",
"guid": "com.plexapp.agents.none://87425529-380f-44b8-a689-9a0537e7ec91",
"type": "playlist",
"title": "Smart Movie Playlist",
"summary": "",
"smart": true,
"playlistType": "video",
"composite": "/playlists/95/composite/1705717387",
"icon": "playlist://image.smart",
"duration": 282000,
"leafCount": 2,
"addedAt": 1705716493,
"updatedAt": 1705717387
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `size` | *number* | :heavy_minus_sign: | N/A | 1 | +| `metadata` | [operations.GetPlaylistMetadata](../../models/operations/getplaylistmetadata.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getplaylistsmediacontainer.md b/docs/models/operations/getplaylistsmediacontainer.md index b6153bc6..41828ac1 100644 --- a/docs/models/operations/getplaylistsmediacontainer.md +++ b/docs/models/operations/getplaylistsmediacontainer.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 4 | -| `metadata` | [operations.GetPlaylistsMetadata](../../models/operations/getplaylistsmetadata.md)[] | :heavy_minus_sign: | N/A | [
{
"ratingKey": "92",
"key": "/playlists/92/items",
"guid": "com.plexapp.agents.none://7ca5aaef-58e8-4828-9e21-c009c97f2903",
"type": "playlist",
"title": "Static Playlist",
"summary": "A Great Playlist",
"smart": false,
"playlistType": "video",
"composite": "/playlists/92/composite/1705716440",
"icon": "playlist://image.smart",
"viewCount": 1,
"lastViewedAt": 1705716298,
"duration": 7328000,
"leafCount": 32,
"addedAt": 1705716298,
"updatedAt": 1705716440
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `size` | *number* | :heavy_minus_sign: | N/A | 4 | +| `metadata` | [operations.GetPlaylistsMetadata](../../models/operations/getplaylistsmetadata.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getserverpreferencesmediacontainer.md b/docs/models/operations/getserverpreferencesmediacontainer.md index 3333c249..78b97178 100644 --- a/docs/models/operations/getserverpreferencesmediacontainer.md +++ b/docs/models/operations/getserverpreferencesmediacontainer.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 161 | -| `setting` | [operations.Setting](../../models/operations/setting.md)[] | :heavy_minus_sign: | N/A | [
{
"id": "EnableDatabaseTrace",
"label": "",
"summary": "",
"type": "bool",
"default": false,
"value": false,
"hidden": true,
"advanced": false,
"group": "",
"enumValues": "1:admin only\|2:everyone"
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `size` | *number* | :heavy_minus_sign: | N/A | 161 | +| `setting` | [operations.Setting](../../models/operations/setting.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getsessionhistorymediacontainer.md b/docs/models/operations/getsessionhistorymediacontainer.md index 9056f55e..cb182704 100644 --- a/docs/models/operations/getsessionhistorymediacontainer.md +++ b/docs/models/operations/getsessionhistorymediacontainer.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 10855 | -| `metadata` | [operations.GetSessionHistoryMetadata](../../models/operations/getsessionhistorymetadata.md)[] | :heavy_minus_sign: | N/A | [
{
"historyKey": "/status/sessions/history/1",
"key": "/library/metadata/32171",
"ratingKey": "32171",
"librarySectionID": "2",
"parentKey": "/library/metadata/32170",
"grandparentKey": "/library/metadata/32132",
"title": "The Noise That Blue Makes",
"grandparentTitle": "Taskmaster",
"type": "episode",
"thumb": "/library/metadata/32171/thumb/-1",
"parentThumb": "/library/metadata/32170/thumb/1654134301",
"grandparentThumb": "/library/metadata/32132/thumb/1703933346",
"grandparentArt": "/library/metadata/32132/art/1703933346",
"index": 1,
"parentIndex": 13,
"originallyAvailableAt": "2022-04-14T00:00:00Z",
"viewedAt": 1654139223,
"accountID": 1,
"deviceID": 5
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `size` | *number* | :heavy_minus_sign: | N/A | 10855 | +| `metadata` | [operations.GetSessionHistoryMetadata](../../models/operations/getsessionhistorymetadata.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getsessionsmedia.md b/docs/models/operations/getsessionsmedia.md index 9e03394b..01a5bdcf 100644 --- a/docs/models/operations/getsessionsmedia.md +++ b/docs/models/operations/getsessionsmedia.md @@ -3,13 +3,13 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `audioChannels` | *number* | :heavy_minus_sign: | N/A | 2 | -| `audioCodec` | *string* | :heavy_minus_sign: | N/A | flac | -| `bitrate` | *number* | :heavy_minus_sign: | N/A | 1014 | -| `container` | *string* | :heavy_minus_sign: | N/A | flac | -| `duration` | *number* | :heavy_minus_sign: | N/A | 186240 | -| `id` | *string* | :heavy_minus_sign: | N/A | 130355 | -| `selected` | *boolean* | :heavy_minus_sign: | N/A | true | -| `part` | [operations.GetSessionsPart](../../models/operations/getsessionspart.md)[] | :heavy_minus_sign: | N/A | [
{
"container": "flac",
"duration": 186240,
"file": "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac",
"hasThumbnail": "1",
"id": "130625",
"key": "/library/parts/130625/1705543268/file.flac",
"size": 23644000,
"decision": "directplay",
"selected": true,
"Stream": [
{
"albumGain": "-12.94",
"albumPeak": "1.000000",
"albumRange": "4.751014",
"audioChannelLayout": "stereo",
"bitDepth": 16,
"bitrate": 1014,
"channels": 2,
"codec": "flac",
"displayTitle": "FLAC (Stereo)",
"extendedDisplayTitle": "FLAC (Stereo)",
"gain": "-12.94",
"id": "352487",
"index": 0,
"loudness": "-5.94",
"lra": "1.74",
"peak": "1.000000",
"samplingRate": 44100,
"selected": true,
"streamType": 2,
"location": "direct"
}
]
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `audioChannels` | *number* | :heavy_minus_sign: | N/A | 2 | +| `audioCodec` | *string* | :heavy_minus_sign: | N/A | flac | +| `bitrate` | *number* | :heavy_minus_sign: | N/A | 1014 | +| `container` | *string* | :heavy_minus_sign: | N/A | flac | +| `duration` | *number* | :heavy_minus_sign: | N/A | 186240 | +| `id` | *string* | :heavy_minus_sign: | N/A | 130355 | +| `selected` | *boolean* | :heavy_minus_sign: | N/A | true | +| `part` | [operations.GetSessionsPart](../../models/operations/getsessionspart.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getsessionsmediacontainer.md b/docs/models/operations/getsessionsmediacontainer.md index d7581447..363c4996 100644 --- a/docs/models/operations/getsessionsmediacontainer.md +++ b/docs/models/operations/getsessionsmediacontainer.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 1 | -| `metadata` | [operations.GetSessionsMetadata](../../models/operations/getsessionsmetadata.md)[] | :heavy_minus_sign: | N/A | [
{
"addedAt": 1705543312,
"art": "/library/metadata/39904/art/1705310687",
"duration": 186240,
"grandparentArt": "/library/metadata/39904/art/1705310687",
"grandparentGuid": "plex://artist/5d07bbfd403c6402904a6480",
"grandparentKey": "/library/metadata/39904",
"grandparentRatingKey": "39904",
"grandparentThumb": "/library/metadata/39904/thumb/1705310687",
"grandparentTitle": "Green Day",
"guid": "plex://track/6535834f71f22f36f71a8e8f",
"index": 1,
"key": "/library/metadata/67085",
"librarySectionID": "3",
"librarySectionKey": "/library/sections/3",
"librarySectionTitle": "Music",
"musicAnalysisVersion": "1",
"parentGuid": "plex://album/65394d6d472b8ab03ef47f12",
"parentIndex": 1,
"parentKey": "/library/metadata/67084",
"parentRatingKey": "67084",
"parentStudio": "Reprise Records",
"parentThumb": "/library/metadata/67084/thumb/1705543314",
"parentTitle": "Saviors",
"parentYear": 2024,
"ratingCount": 45885,
"ratingKey": "67085",
"sessionKey": "203",
"thumb": "/library/metadata/67084/thumb/1705543314",
"title": "The American Dream Is Killing Me",
"titleSort": "American Dream Is Killing Me",
"type": "track",
"updatedAt": 1705543314,
"viewOffset": 1000,
"Media": [
{
"audioChannels": 2,
"audioCodec": "flac",
"bitrate": 1014,
"container": "flac",
"duration": 186240,
"id": "130355",
"selected": true,
"Part": [
{
"container": "flac",
"duration": 186240,
"file": "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac",
"hasThumbnail": "1",
"id": "130625",
"key": "/library/parts/130625/1705543268/file.flac",
"size": 23644000,
"decision": "directplay",
"selected": true,
"Stream": [
{
"albumGain": "-12.94",
"albumPeak": "1.000000",
"albumRange": "4.751014",
"audioChannelLayout": "stereo",
"bitDepth": 16,
"bitrate": 1014,
"channels": 2,
"codec": "flac",
"displayTitle": "FLAC (Stereo)",
"extendedDisplayTitle": "FLAC (Stereo)",
"gain": "-12.94",
"id": "352487",
"index": 0,
"loudness": "-5.94",
"lra": "1.74",
"peak": "1.000000",
"samplingRate": 44100,
"selected": true,
"streamType": 2,
"location": "direct"
}
]
}
]
}
],
"User": {
"id": "1",
"thumb": "https://plex.tv/users/844780fc6f8a26b5/avatar?c=1705853661",
"title": "Blindkitty38"
},
"Player": {
"address": "10.10.10.171",
"machineIdentifier": "3tsdzir85m2onc3qyr255aq1",
"model": "standalone",
"platform": "windows",
"platformVersion": "10.0.22621",
"product": "Plex for Windows",
"profile": "Plex Desktop",
"remotePublicAddress": "68.248.140.20",
"state": "playing",
"title": "DESKTOP-BL80MTD",
"version": "1.85.0.4071-21128b56",
"local": true,
"relayed": false,
"secure": true,
"userID": 1
},
"Session": {
"id": "93h7e00ncblxncqw9lkfaoxi",
"bandwidth": 1050,
"location": "lan"
}
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `size` | *number* | :heavy_minus_sign: | N/A | 1 | +| `metadata` | [operations.GetSessionsMetadata](../../models/operations/getsessionsmetadata.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getsessionsmetadata.md b/docs/models/operations/getsessionsmetadata.md index 13d278e4..8ed29399 100644 --- a/docs/models/operations/getsessionsmetadata.md +++ b/docs/models/operations/getsessionsmetadata.md @@ -3,42 +3,42 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `addedAt` | *number* | :heavy_minus_sign: | N/A | 1705543312 | -| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/39904/art/1705310687 | -| `duration` | *number* | :heavy_minus_sign: | N/A | 186240 | -| `grandparentArt` | *string* | :heavy_minus_sign: | N/A | /library/metadata/39904/art/1705310687 | -| `grandparentGuid` | *string* | :heavy_minus_sign: | N/A | plex://artist/5d07bbfd403c6402904a6480 | -| `grandparentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/39904 | -| `grandparentRatingKey` | *string* | :heavy_minus_sign: | N/A | 39904 | -| `grandparentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/39904/thumb/1705310687 | -| `grandparentTitle` | *string* | :heavy_minus_sign: | N/A | Green Day | -| `guid` | *string* | :heavy_minus_sign: | N/A | plex://track/6535834f71f22f36f71a8e8f | -| `index` | *number* | :heavy_minus_sign: | N/A | 1 | -| `key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/67085 | -| `librarySectionID` | *string* | :heavy_minus_sign: | N/A | 3 | -| `librarySectionKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/3 | -| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Music | -| `musicAnalysisVersion` | *string* | :heavy_minus_sign: | N/A | 1 | -| `parentGuid` | *string* | :heavy_minus_sign: | N/A | plex://album/65394d6d472b8ab03ef47f12 | -| `parentIndex` | *number* | :heavy_minus_sign: | N/A | 1 | -| `parentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/67084 | -| `parentRatingKey` | *string* | :heavy_minus_sign: | N/A | 67084 | -| `parentStudio` | *string* | :heavy_minus_sign: | N/A | Reprise Records | -| `parentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/67084/thumb/1705543314 | -| `parentTitle` | *string* | :heavy_minus_sign: | N/A | Saviors | -| `parentYear` | *number* | :heavy_minus_sign: | N/A | 2024 | -| `ratingCount` | *number* | :heavy_minus_sign: | N/A | 45885 | -| `ratingKey` | *string* | :heavy_minus_sign: | N/A | 67085 | -| `sessionKey` | *string* | :heavy_minus_sign: | N/A | 203 | -| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/67084/thumb/1705543314 | -| `title` | *string* | :heavy_minus_sign: | N/A | The American Dream Is Killing Me | -| `titleSort` | *string* | :heavy_minus_sign: | N/A | American Dream Is Killing Me | -| `type` | *string* | :heavy_minus_sign: | N/A | track | -| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1705543314 | -| `viewOffset` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `media` | [operations.GetSessionsMedia](../../models/operations/getsessionsmedia.md)[] | :heavy_minus_sign: | N/A | [
{
"audioChannels": 2,
"audioCodec": "flac",
"bitrate": 1014,
"container": "flac",
"duration": 186240,
"id": "130355",
"selected": true,
"Part": [
{
"container": "flac",
"duration": 186240,
"file": "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac",
"hasThumbnail": "1",
"id": "130625",
"key": "/library/parts/130625/1705543268/file.flac",
"size": 23644000,
"decision": "directplay",
"selected": true,
"Stream": [
{
"albumGain": "-12.94",
"albumPeak": "1.000000",
"albumRange": "4.751014",
"audioChannelLayout": "stereo",
"bitDepth": 16,
"bitrate": 1014,
"channels": 2,
"codec": "flac",
"displayTitle": "FLAC (Stereo)",
"extendedDisplayTitle": "FLAC (Stereo)",
"gain": "-12.94",
"id": "352487",
"index": 0,
"loudness": "-5.94",
"lra": "1.74",
"peak": "1.000000",
"samplingRate": 44100,
"selected": true,
"streamType": 2,
"location": "direct"
}
]
}
]
}
] | -| `user` | [operations.User](../../models/operations/user.md) | :heavy_minus_sign: | N/A | | -| `player` | [operations.Player](../../models/operations/player.md) | :heavy_minus_sign: | N/A | | -| `session` | [operations.Session](../../models/operations/session.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `addedAt` | *number* | :heavy_minus_sign: | N/A | 1705543312 | +| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/39904/art/1705310687 | +| `duration` | *number* | :heavy_minus_sign: | N/A | 186240 | +| `grandparentArt` | *string* | :heavy_minus_sign: | N/A | /library/metadata/39904/art/1705310687 | +| `grandparentGuid` | *string* | :heavy_minus_sign: | N/A | plex://artist/5d07bbfd403c6402904a6480 | +| `grandparentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/39904 | +| `grandparentRatingKey` | *string* | :heavy_minus_sign: | N/A | 39904 | +| `grandparentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/39904/thumb/1705310687 | +| `grandparentTitle` | *string* | :heavy_minus_sign: | N/A | Green Day | +| `guid` | *string* | :heavy_minus_sign: | N/A | plex://track/6535834f71f22f36f71a8e8f | +| `index` | *number* | :heavy_minus_sign: | N/A | 1 | +| `key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/67085 | +| `librarySectionID` | *string* | :heavy_minus_sign: | N/A | 3 | +| `librarySectionKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/3 | +| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Music | +| `musicAnalysisVersion` | *string* | :heavy_minus_sign: | N/A | 1 | +| `parentGuid` | *string* | :heavy_minus_sign: | N/A | plex://album/65394d6d472b8ab03ef47f12 | +| `parentIndex` | *number* | :heavy_minus_sign: | N/A | 1 | +| `parentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/67084 | +| `parentRatingKey` | *string* | :heavy_minus_sign: | N/A | 67084 | +| `parentStudio` | *string* | :heavy_minus_sign: | N/A | Reprise Records | +| `parentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/67084/thumb/1705543314 | +| `parentTitle` | *string* | :heavy_minus_sign: | N/A | Saviors | +| `parentYear` | *number* | :heavy_minus_sign: | N/A | 2024 | +| `ratingCount` | *number* | :heavy_minus_sign: | N/A | 45885 | +| `ratingKey` | *string* | :heavy_minus_sign: | N/A | 67085 | +| `sessionKey` | *string* | :heavy_minus_sign: | N/A | 203 | +| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/67084/thumb/1705543314 | +| `title` | *string* | :heavy_minus_sign: | N/A | The American Dream Is Killing Me | +| `titleSort` | *string* | :heavy_minus_sign: | N/A | American Dream Is Killing Me | +| `type` | *string* | :heavy_minus_sign: | N/A | track | +| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1705543314 | +| `viewOffset` | *number* | :heavy_minus_sign: | N/A | 1000 | +| `media` | [operations.GetSessionsMedia](../../models/operations/getsessionsmedia.md)[] | :heavy_minus_sign: | N/A | | +| `user` | [operations.User](../../models/operations/user.md) | :heavy_minus_sign: | N/A | | +| `player` | [operations.Player](../../models/operations/player.md) | :heavy_minus_sign: | N/A | | +| `session` | [operations.Session](../../models/operations/session.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getsessionspart.md b/docs/models/operations/getsessionspart.md index 4581737c..c3409790 100644 --- a/docs/models/operations/getsessionspart.md +++ b/docs/models/operations/getsessionspart.md @@ -3,15 +3,15 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `container` | *string* | :heavy_minus_sign: | N/A | flac | -| `duration` | *number* | :heavy_minus_sign: | N/A | 186240 | -| `file` | *string* | :heavy_minus_sign: | N/A | /music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac | -| `hasThumbnail` | *string* | :heavy_minus_sign: | N/A | 1 | -| `id` | *string* | :heavy_minus_sign: | N/A | 130625 | -| `key` | *string* | :heavy_minus_sign: | N/A | /library/parts/130625/1705543268/file.flac | -| `size` | *number* | :heavy_minus_sign: | N/A | 23644000 | -| `decision` | *string* | :heavy_minus_sign: | N/A | directplay | -| `selected` | *boolean* | :heavy_minus_sign: | N/A | true | -| `stream` | [operations.GetSessionsStream](../../models/operations/getsessionsstream.md)[] | :heavy_minus_sign: | N/A | [
{
"albumGain": "-12.94",
"albumPeak": "1.000000",
"albumRange": "4.751014",
"audioChannelLayout": "stereo",
"bitDepth": 16,
"bitrate": 1014,
"channels": 2,
"codec": "flac",
"displayTitle": "FLAC (Stereo)",
"extendedDisplayTitle": "FLAC (Stereo)",
"gain": "-12.94",
"id": "352487",
"index": 0,
"loudness": "-5.94",
"lra": "1.74",
"peak": "1.000000",
"samplingRate": 44100,
"selected": true,
"streamType": 2,
"location": "direct"
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `container` | *string* | :heavy_minus_sign: | N/A | flac | +| `duration` | *number* | :heavy_minus_sign: | N/A | 186240 | +| `file` | *string* | :heavy_minus_sign: | N/A | /music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac | +| `hasThumbnail` | *string* | :heavy_minus_sign: | N/A | 1 | +| `id` | *string* | :heavy_minus_sign: | N/A | 130625 | +| `key` | *string* | :heavy_minus_sign: | N/A | /library/parts/130625/1705543268/file.flac | +| `size` | *number* | :heavy_minus_sign: | N/A | 23644000 | +| `decision` | *string* | :heavy_minus_sign: | N/A | directplay | +| `selected` | *boolean* | :heavy_minus_sign: | N/A | true | +| `stream` | [operations.GetSessionsStream](../../models/operations/getsessionsstream.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getstatisticsmediacontainer.md b/docs/models/operations/getstatisticsmediacontainer.md index bc77ff79..a4f0927a 100644 --- a/docs/models/operations/getstatisticsmediacontainer.md +++ b/docs/models/operations/getstatisticsmediacontainer.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 5497 | -| `device` | [operations.GetStatisticsDevice](../../models/operations/getstatisticsdevice.md)[] | :heavy_minus_sign: | N/A | [
{
"id": 208,
"name": "Roku Express",
"platform": "Roku",
"clientIdentifier": "793095d235660625108ef785cc7646e9",
"createdAt": 1706470556
}
] | -| `account` | [operations.Account](../../models/operations/account.md)[] | :heavy_minus_sign: | N/A | [
{
"id": 238960586,
"key": "/accounts/238960586",
"name": "Diane",
"defaultAudioLanguage": "en",
"autoSelectAudio": true,
"defaultSubtitleLanguage": "en",
"subtitleMode": 1,
"thumb": "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967"
}
] | -| `statisticsMedia` | [operations.StatisticsMedia](../../models/operations/statisticsmedia.md)[] | :heavy_minus_sign: | N/A | [
{
"accountID": 1,
"deviceID": 13,
"timespan": 4,
"at": 1707141600,
"metadataType": 4,
"count": 1,
"duration": 1555
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `size` | *number* | :heavy_minus_sign: | N/A | 5497 | +| `device` | [operations.GetStatisticsDevice](../../models/operations/getstatisticsdevice.md)[] | :heavy_minus_sign: | N/A | | +| `account` | [operations.Account](../../models/operations/account.md)[] | :heavy_minus_sign: | N/A | | +| `statisticsMedia` | [operations.StatisticsMedia](../../models/operations/statisticsmedia.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/gettokenglobals.md b/docs/models/operations/gettokenglobals.md new file mode 100644 index 00000000..df71ec7d --- /dev/null +++ b/docs/models/operations/gettokenglobals.md @@ -0,0 +1,8 @@ +# GetTokenGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_check_mark: | The unique identifier for the client application
This is used to track the client application and its usage
(UUID, serial number, or other number unique per device)
| Postman | \ No newline at end of file diff --git a/docs/models/operations/hub.md b/docs/models/operations/hub.md index ccc8ecd7..e33a25cd 100644 --- a/docs/models/operations/hub.md +++ b/docs/models/operations/hub.md @@ -3,16 +3,16 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `hubKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/50768,65523,58188,57341,57302,57070 | -| `key` | *string* | :heavy_minus_sign: | N/A | /playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio | -| `title` | *string* | :heavy_minus_sign: | N/A | Recent Playlists | -| `type` | *string* | :heavy_minus_sign: | N/A | playlist | -| `hubIdentifier` | *string* | :heavy_minus_sign: | N/A | home.playlists | -| `context` | *string* | :heavy_minus_sign: | N/A | hub.home.playlists | -| `size` | *number* | :heavy_minus_sign: | N/A | 6 | -| `more` | *boolean* | :heavy_minus_sign: | N/A | true | -| `style` | *string* | :heavy_minus_sign: | N/A | shelf | -| `promoted` | *boolean* | :heavy_minus_sign: | N/A | true | -| `metadata` | [operations.GetGlobalHubsMetadata](../../models/operations/getglobalhubsmetadata.md)[] | :heavy_minus_sign: | N/A | [
{
"ratingKey": "57070",
"key": "/playlists/57070/items",
"guid": "com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c",
"type": "playlist",
"title": "November Movie Day",
"titleSort": "Tracks",
"summary": "",
"smart": false,
"playlistType": "video",
"composite": "/playlists/57070/composite/1668787730",
"icon": "playlist://image.smart",
"viewCount": 2,
"lastViewedAt": 1668787732,
"duration": 16873000,
"leafCount": 3,
"addedAt": 1668779618,
"updatedAt": 1668787730
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `hubKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/50768,65523,58188,57341,57302,57070 | +| `key` | *string* | :heavy_minus_sign: | N/A | /playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio | +| `title` | *string* | :heavy_minus_sign: | N/A | Recent Playlists | +| `type` | *string* | :heavy_minus_sign: | N/A | playlist | +| `hubIdentifier` | *string* | :heavy_minus_sign: | N/A | home.playlists | +| `context` | *string* | :heavy_minus_sign: | N/A | hub.home.playlists | +| `size` | *number* | :heavy_minus_sign: | N/A | 6 | +| `more` | *boolean* | :heavy_minus_sign: | N/A | true | +| `style` | *string* | :heavy_minus_sign: | N/A | shelf | +| `promoted` | *boolean* | :heavy_minus_sign: | N/A | true | +| `metadata` | [operations.GetGlobalHubsMetadata](../../models/operations/getglobalhubsmetadata.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/searchlibrarymediacontainer.md b/docs/models/operations/searchlibrarymediacontainer.md index 8d3636b4..e94e6bba 100644 --- a/docs/models/operations/searchlibrarymediacontainer.md +++ b/docs/models/operations/searchlibrarymediacontainer.md @@ -3,18 +3,18 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 2 | -| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | false | -| `art` | *string* | :heavy_minus_sign: | N/A | /:/resources/show-fanart.jpg | -| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `mediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | -| `mediaTagVersion` | *number* | :heavy_minus_sign: | N/A | 1698860922 | -| `nocache` | *boolean* | :heavy_minus_sign: | N/A | true | -| `thumb` | *string* | :heavy_minus_sign: | N/A | /:/resources/show.png | -| `title1` | *string* | :heavy_minus_sign: | N/A | TV Shows | -| `title2` | *string* | :heavy_minus_sign: | N/A | Search for '' | -| `viewGroup` | *string* | :heavy_minus_sign: | N/A | season | -| `viewMode` | *number* | :heavy_minus_sign: | N/A | 65593 | -| `metadata` | [operations.SearchLibraryMetadata](../../models/operations/searchlibrarymetadata.md)[] | :heavy_minus_sign: | N/A | [
{
"ratingKey": "2",
"key": "/library/metadata/2/children",
"parentRatingKey": "1",
"guid": "plex://season/602e67e766dfdb002c0a1b5b",
"parentGuid": "plex://show/5d9c086c7d06d9001ffd27aa",
"parentStudio": "Mutant Enemy Productions",
"type": "season",
"title": "Season 1",
"parentKey": "/library/metadata/1",
"parentTitle": "Firefly",
"summary": "Captain Malcolm 'Mal' Reynolds is a former galactic war veteran who is the captain of the transport ship \"Serenity\". Mal and his crew, ensign Zoe Alleyne Washburne; Zoe's husband, pilot Hoban 'Wash' Washburne; muscular mercenary Jayne Cobb; young mechanic Kaylee Frye; former Alliance medical officer Simon Tam; his disturbed teenage sister River (both on the run from the interplanetary government \"The Alliance\"); the beautiful courtesan Inara Serra; and preacher Shepherd Book do any jobs, legal or illegal, they can find as the Serenity crew travels across the outskirts of outer space.",
"index": 1,
"parentIndex": 1,
"parentYear": 2002,
"thumb": "/library/metadata/2/thumb/1705636920",
"art": "/library/metadata/1/art/1705636920",
"parentThumb": "/library/metadata/1/thumb/1705636920",
"parentTheme": "/library/metadata/1/theme/1705636920",
"addedAt": 1705636916,
"updatedAt": 1705636920
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `size` | *number* | :heavy_minus_sign: | N/A | 2 | +| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | false | +| `art` | *string* | :heavy_minus_sign: | N/A | /:/resources/show-fanart.jpg | +| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `mediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `mediaTagVersion` | *number* | :heavy_minus_sign: | N/A | 1698860922 | +| `nocache` | *boolean* | :heavy_minus_sign: | N/A | true | +| `thumb` | *string* | :heavy_minus_sign: | N/A | /:/resources/show.png | +| `title1` | *string* | :heavy_minus_sign: | N/A | TV Shows | +| `title2` | *string* | :heavy_minus_sign: | N/A | Search for '' | +| `viewGroup` | *string* | :heavy_minus_sign: | N/A | season | +| `viewMode` | *number* | :heavy_minus_sign: | N/A | 65593 | +| `metadata` | [operations.SearchLibraryMetadata](../../models/operations/searchlibrarymetadata.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/tag.md b/docs/models/operations/tag.md new file mode 100644 index 00000000..99c8927f --- /dev/null +++ b/docs/models/operations/tag.md @@ -0,0 +1,28 @@ +# Tag + +A key representing a specific tag within the section. + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `All` | all | +| `Unwatched` | unwatched | +| `Newest` | newest | +| `RecentlyAdded` | recentlyAdded | +| `RecentlyViewed` | recentlyViewed | +| `OnDeck` | onDeck | +| `Collection` | collection | +| `Edition` | edition | +| `Genre` | genre | +| `Year` | year | +| `Decade` | decade | +| `Director` | director | +| `Actor` | actor | +| `Country` | country | +| `ContentRating` | contentRating | +| `Rating` | rating | +| `Resolution` | resolution | +| `FirstCharacter` | firstCharacter | +| `Folder` | folder | \ No newline at end of file diff --git a/docs/sdks/activities/README.md b/docs/sdks/activities/README.md index 7344e82c..7dfb8175 100644 --- a/docs/sdks/activities/README.md +++ b/docs/sdks/activities/README.md @@ -51,7 +51,7 @@ run(); ### Response -**Promise<[operations.GetServerActivitiesResponse](../../models/operations/getserveractivitiesresponse.md)>** +**Promise\<[operations.GetServerActivitiesResponse](../../models/operations/getserveractivitiesresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -94,7 +94,7 @@ run(); ### Response -**Promise<[operations.CancelServerActivitiesResponse](../../models/operations/cancelserveractivitiesresponse.md)>** +**Promise\<[operations.CancelServerActivitiesResponse](../../models/operations/cancelserveractivitiesresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/authentication/README.md b/docs/sdks/authentication/README.md index c40073fa..ccc2b01d 100644 --- a/docs/sdks/authentication/README.md +++ b/docs/sdks/authentication/README.md @@ -49,7 +49,7 @@ run(); ### Response -**Promise<[operations.GetTransientTokenResponse](../../models/operations/gettransienttokenresponse.md)>** +**Promise\<[operations.GetTransientTokenResponse](../../models/operations/gettransienttokenresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -94,7 +94,7 @@ run(); ### Response -**Promise<[operations.GetSourceConnectionInformationResponse](../../models/operations/getsourceconnectioninformationresponse.md)>** +**Promise\<[operations.GetSourceConnectionInformationResponse](../../models/operations/getsourceconnectioninformationresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/butler/README.md b/docs/sdks/butler/README.md index 3e53f129..4fbcd627 100644 --- a/docs/sdks/butler/README.md +++ b/docs/sdks/butler/README.md @@ -48,7 +48,7 @@ run(); ### Response -**Promise<[operations.GetButlerTasksResponse](../../models/operations/getbutlertasksresponse.md)>** +**Promise\<[operations.GetButlerTasksResponse](../../models/operations/getbutlertasksresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -95,7 +95,7 @@ run(); ### Response -**Promise<[operations.StartAllTasksResponse](../../models/operations/startalltasksresponse.md)>** +**Promise\<[operations.StartAllTasksResponse](../../models/operations/startalltasksresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -138,7 +138,7 @@ run(); ### Response -**Promise<[operations.StopAllTasksResponse](../../models/operations/stopalltasksresponse.md)>** +**Promise\<[operations.StopAllTasksResponse](../../models/operations/stopalltasksresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -187,7 +187,7 @@ run(); ### Response -**Promise<[operations.StartTaskResponse](../../models/operations/starttaskresponse.md)>** +**Promise\<[operations.StartTaskResponse](../../models/operations/starttaskresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -232,7 +232,7 @@ run(); ### Response -**Promise<[operations.StopTaskResponse](../../models/operations/stoptaskresponse.md)>** +**Promise\<[operations.StopTaskResponse](../../models/operations/stoptaskresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/hubs/README.md b/docs/sdks/hubs/README.md index 6bdfb100..785977e9 100644 --- a/docs/sdks/hubs/README.md +++ b/docs/sdks/hubs/README.md @@ -48,7 +48,7 @@ run(); ### Response -**Promise<[operations.GetGlobalHubsResponse](../../models/operations/getglobalhubsresponse.md)>** +**Promise\<[operations.GetGlobalHubsResponse](../../models/operations/getglobalhubsresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -95,7 +95,7 @@ run(); ### Response -**Promise<[operations.GetLibraryHubsResponse](../../models/operations/getlibraryhubsresponse.md)>** +**Promise\<[operations.GetLibraryHubsResponse](../../models/operations/getlibraryhubsresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/library/README.md b/docs/sdks/library/README.md index 478a939f..3be04962 100644 --- a/docs/sdks/library/README.md +++ b/docs/sdks/library/README.md @@ -13,6 +13,7 @@ API Calls interacting with Plex Media Server Libraries * [getLibraries](#getlibraries) - Get All Libraries * [getLibrary](#getlibrary) - Get Library Details * [deleteLibrary](#deletelibrary) - Delete Library Section +* [getLibraryItems](#getlibraryitems) - Get Library Items * [refreshLibrary](#refreshlibrary) - Refresh Library * [searchLibrary](#searchlibrary) - Search Library * [getMetadata](#getmetadata) - Get Items Metadata @@ -55,7 +56,7 @@ run(); ### Response -**Promise<[operations.GetFileHashResponse](../../models/operations/getfilehashresponse.md)>** +**Promise\<[operations.GetFileHashResponse](../../models/operations/getfilehashresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -98,7 +99,7 @@ run(); ### Response -**Promise<[operations.GetRecentlyAddedResponse](../../models/operations/getrecentlyaddedresponse.md)>** +**Promise\<[operations.GetRecentlyAddedResponse](../../models/operations/getrecentlyaddedresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -146,7 +147,7 @@ run(); ### Response -**Promise<[operations.GetLibrariesResponse](../../models/operations/getlibrariesresponse.md)>** +**Promise\<[operations.GetLibrariesResponse](../../models/operations/getlibrariesresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -230,7 +231,7 @@ run(); ### Response -**Promise<[operations.GetLibraryResponse](../../models/operations/getlibraryresponse.md)>** +**Promise\<[operations.GetLibraryResponse](../../models/operations/getlibraryresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -273,7 +274,7 @@ run(); ### Response -**Promise<[operations.DeleteLibraryResponse](../../models/operations/deletelibraryresponse.md)>** +**Promise\<[operations.DeleteLibraryResponse](../../models/operations/deletelibraryresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -281,6 +282,71 @@ run(); | errors.DeleteLibraryResponseBody | 401 | application/json | | errors.SDKError | 4xx-5xx | */* | +## getLibraryItems + +Fetches details from a specific section of the library identified by a section key and a tag. The tag parameter accepts the following values: +- `all`: All items in the section. +- `unwatched`: Items that have not been played. +- `newest`: Items that are recently released. +- `recentlyAdded`: Items that are recently added to the library. +- `recentlyViewed`: Items that were recently viewed. +- `onDeck`: Items to continue watching. +- `collection`: Items categorized by collection. +- `edition`: Items categorized by edition. +- `genre`: Items categorized by genre. +- `year`: Items categorized by year of release. +- `decade`: Items categorized by decade. +- `director`: Items categorized by director. +- `actor`: Items categorized by starring actor. +- `country`: Items categorized by country of origin. +- `contentRating`: Items categorized by content rating. +- `rating`: Items categorized by rating. +- `resolution`: Items categorized by resolution. +- `firstCharacter`: Items categorized by the first letter. +- `folder`: Items categorized by folder. + + +### Example Usage + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { Tag } from "@lukehagar/plexjs/models/operations"; + +const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", +}); + +async function run() { + const result = await plexAPI.library.getLibraryItems(1, Tag.Genre); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to query | [object Object] | +| `tag` | [operations.Tag](../../models/operations/tag.md) | :heavy_check_mark: | A key representing a specific tag within the section. | | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | + + +### Response + +**Promise\<[operations.GetLibraryItemsResponse](../../models/operations/getlibraryitemsresponse.md)\>** +### Errors + +| Error Object | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.GetLibraryItemsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## refreshLibrary This endpoint Refreshes the library. @@ -317,7 +383,7 @@ run(); ### Response -**Promise<[operations.RefreshLibraryResponse](../../models/operations/refreshlibraryresponse.md)>** +**Promise\<[operations.RefreshLibraryResponse](../../models/operations/refreshlibraryresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -380,12 +446,13 @@ run(); ### Response -**Promise<[operations.SearchLibraryResponse](../../models/operations/searchlibraryresponse.md)>** +**Promise\<[operations.SearchLibraryResponse](../../models/operations/searchlibraryresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------------- | -------------------------------- | -------------------------------- | +| errors.SearchLibraryResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getMetadata @@ -423,7 +490,7 @@ run(); ### Response -**Promise<[operations.GetMetadataResponse](../../models/operations/getmetadataresponse.md)>** +**Promise\<[operations.GetMetadataResponse](../../models/operations/getmetadataresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -467,7 +534,7 @@ run(); ### Response -**Promise<[operations.GetMetadataChildrenResponse](../../models/operations/getmetadatachildrenresponse.md)>** +**Promise\<[operations.GetMetadataChildrenResponse](../../models/operations/getmetadatachildrenresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -510,7 +577,7 @@ run(); ### Response -**Promise<[operations.GetOnDeckResponse](../../models/operations/getondeckresponse.md)>** +**Promise\<[operations.GetOnDeckResponse](../../models/operations/getondeckresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/log/README.md b/docs/sdks/log/README.md index b90b1881..40e47d9e 100644 --- a/docs/sdks/log/README.md +++ b/docs/sdks/log/README.md @@ -51,7 +51,7 @@ run(); ### Response -**Promise<[operations.LogLineResponse](../../models/operations/loglineresponse.md)>** +**Promise\<[operations.LogLineResponse](../../models/operations/loglineresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -117,7 +117,7 @@ run(); ### Response -**Promise<[operations.LogMultiLineResponse](../../models/operations/logmultilineresponse.md)>** +**Promise\<[operations.LogMultiLineResponse](../../models/operations/logmultilineresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -160,7 +160,7 @@ run(); ### Response -**Promise<[operations.EnablePaperTrailResponse](../../models/operations/enablepapertrailresponse.md)>** +**Promise\<[operations.EnablePaperTrailResponse](../../models/operations/enablepapertrailresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/media/README.md b/docs/sdks/media/README.md index f5297b8b..d0cb51b3 100644 --- a/docs/sdks/media/README.md +++ b/docs/sdks/media/README.md @@ -47,7 +47,7 @@ run(); ### Response -**Promise<[operations.MarkPlayedResponse](../../models/operations/markplayedresponse.md)>** +**Promise\<[operations.MarkPlayedResponse](../../models/operations/markplayedresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -90,7 +90,7 @@ run(); ### Response -**Promise<[operations.MarkUnplayedResponse](../../models/operations/markunplayedresponse.md)>** +**Promise\<[operations.MarkUnplayedResponse](../../models/operations/markunplayedresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -136,7 +136,7 @@ run(); ### Response -**Promise<[operations.UpdatePlayProgressResponse](../../models/operations/updateplayprogressresponse.md)>** +**Promise\<[operations.UpdatePlayProgressResponse](../../models/operations/updateplayprogressresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/playlists/README.md b/docs/sdks/playlists/README.md index 30c5daf4..a3bbe5af 100644 --- a/docs/sdks/playlists/README.md +++ b/docs/sdks/playlists/README.md @@ -65,7 +65,7 @@ run(); ### Response -**Promise<[operations.CreatePlaylistResponse](../../models/operations/createplaylistresponse.md)>** +**Promise\<[operations.CreatePlaylistResponse](../../models/operations/createplaylistresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -110,7 +110,7 @@ run(); ### Response -**Promise<[operations.GetPlaylistsResponse](../../models/operations/getplaylistsresponse.md)>** +**Promise\<[operations.GetPlaylistsResponse](../../models/operations/getplaylistsresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -155,7 +155,7 @@ run(); ### Response -**Promise<[operations.GetPlaylistResponse](../../models/operations/getplaylistresponse.md)>** +**Promise\<[operations.GetPlaylistResponse](../../models/operations/getplaylistresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -199,7 +199,7 @@ run(); ### Response -**Promise<[operations.DeletePlaylistResponse](../../models/operations/deleteplaylistresponse.md)>** +**Promise\<[operations.DeletePlaylistResponse](../../models/operations/deleteplaylistresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -245,7 +245,7 @@ run(); ### Response -**Promise<[operations.UpdatePlaylistResponse](../../models/operations/updateplaylistresponse.md)>** +**Promise\<[operations.UpdatePlaylistResponse](../../models/operations/updateplaylistresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -293,7 +293,7 @@ run(); ### Response -**Promise<[operations.GetPlaylistContentsResponse](../../models/operations/getplaylistcontentsresponse.md)>** +**Promise\<[operations.GetPlaylistContentsResponse](../../models/operations/getplaylistcontentsresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -337,7 +337,7 @@ run(); ### Response -**Promise<[operations.ClearPlaylistContentsResponse](../../models/operations/clearplaylistcontentsresponse.md)>** +**Promise\<[operations.ClearPlaylistContentsResponse](../../models/operations/clearplaylistcontentsresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -384,7 +384,7 @@ run(); ### Response -**Promise<[operations.AddPlaylistContentsResponse](../../models/operations/addplaylistcontentsresponse.md)>** +**Promise\<[operations.AddPlaylistContentsResponse](../../models/operations/addplaylistcontentsresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -430,7 +430,7 @@ run(); ### Response -**Promise<[operations.UploadPlaylistResponse](../../models/operations/uploadplaylistresponse.md)>** +**Promise\<[operations.UploadPlaylistResponse](../../models/operations/uploadplaylistresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/plex/README.md b/docs/sdks/plex/README.md index eb3fad66..3fb498cb 100644 --- a/docs/sdks/plex/README.md +++ b/docs/sdks/plex/README.md @@ -47,7 +47,7 @@ run(); ### Response -**Promise<[operations.GetPinResponse](../../models/operations/getpinresponse.md)>** +**Promise\<[operations.GetPinResponse](../../models/operations/getpinresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -91,7 +91,7 @@ run(); ### Response -**Promise<[operations.GetTokenResponse](../../models/operations/gettokenresponse.md)>** +**Promise\<[operations.GetTokenResponse](../../models/operations/gettokenresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index 1b82313a..f24c42ed 100644 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -61,7 +61,7 @@ run(); ### Response -**Promise<[operations.PerformSearchResponse](../../models/operations/performsearchresponse.md)>** +**Promise\<[operations.PerformSearchResponse](../../models/operations/performsearchresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -110,7 +110,7 @@ run(); ### Response -**Promise<[operations.PerformVoiceSearchResponse](../../models/operations/performvoicesearchresponse.md)>** +**Promise\<[operations.PerformVoiceSearchResponse](../../models/operations/performvoicesearchresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -153,7 +153,7 @@ run(); ### Response -**Promise<[operations.GetSearchResultsResponse](../../models/operations/getsearchresultsresponse.md)>** +**Promise\<[operations.GetSearchResultsResponse](../../models/operations/getsearchresultsresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/server/README.md b/docs/sdks/server/README.md index 12706bb6..62483c19 100644 --- a/docs/sdks/server/README.md +++ b/docs/sdks/server/README.md @@ -51,7 +51,7 @@ run(); ### Response -**Promise<[operations.GetServerCapabilitiesResponse](../../models/operations/getservercapabilitiesresponse.md)>** +**Promise\<[operations.GetServerCapabilitiesResponse](../../models/operations/getservercapabilitiesresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -93,7 +93,7 @@ run(); ### Response -**Promise<[operations.GetServerPreferencesResponse](../../models/operations/getserverpreferencesresponse.md)>** +**Promise\<[operations.GetServerPreferencesResponse](../../models/operations/getserverpreferencesresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -135,7 +135,7 @@ run(); ### Response -**Promise<[operations.GetAvailableClientsResponse](../../models/operations/getavailableclientsresponse.md)>** +**Promise\<[operations.GetAvailableClientsResponse](../../models/operations/getavailableclientsresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -177,7 +177,7 @@ run(); ### Response -**Promise<[operations.GetDevicesResponse](../../models/operations/getdevicesresponse.md)>** +**Promise\<[operations.GetDevicesResponse](../../models/operations/getdevicesresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -219,7 +219,7 @@ run(); ### Response -**Promise<[operations.GetServerIdentityResponse](../../models/operations/getserveridentityresponse.md)>** +**Promise\<[operations.GetServerIdentityResponse](../../models/operations/getserveridentityresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -261,7 +261,7 @@ run(); ### Response -**Promise<[operations.GetMyPlexAccountResponse](../../models/operations/getmyplexaccountresponse.md)>** +**Promise\<[operations.GetMyPlexAccountResponse](../../models/operations/getmyplexaccountresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -314,7 +314,7 @@ run(); ### Response -**Promise<[operations.GetResizedPhotoResponse](../../models/operations/getresizedphotoresponse.md)>** +**Promise\<[operations.GetResizedPhotoResponse](../../models/operations/getresizedphotoresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -356,7 +356,7 @@ run(); ### Response -**Promise<[operations.GetServerListResponse](../../models/operations/getserverlistresponse.md)>** +**Promise\<[operations.GetServerListResponse](../../models/operations/getserverlistresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/sessions/README.md b/docs/sdks/sessions/README.md index a00896e3..e21ff091 100644 --- a/docs/sdks/sessions/README.md +++ b/docs/sdks/sessions/README.md @@ -47,7 +47,7 @@ run(); ### Response -**Promise<[operations.GetSessionsResponse](../../models/operations/getsessionsresponse.md)>** +**Promise\<[operations.GetSessionsResponse](../../models/operations/getsessionsresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -89,7 +89,7 @@ run(); ### Response -**Promise<[operations.GetSessionHistoryResponse](../../models/operations/getsessionhistoryresponse.md)>** +**Promise\<[operations.GetSessionHistoryResponse](../../models/operations/getsessionhistoryresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -131,7 +131,7 @@ run(); ### Response -**Promise<[operations.GetTranscodeSessionsResponse](../../models/operations/gettranscodesessionsresponse.md)>** +**Promise\<[operations.GetTranscodeSessionsResponse](../../models/operations/gettranscodesessionsresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -174,7 +174,7 @@ run(); ### Response -**Promise<[operations.StopTranscodeSessionResponse](../../models/operations/stoptranscodesessionresponse.md)>** +**Promise\<[operations.StopTranscodeSessionResponse](../../models/operations/stoptranscodesessionresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/statistics/README.md b/docs/sdks/statistics/README.md index d199fd1d..23562db8 100644 --- a/docs/sdks/statistics/README.md +++ b/docs/sdks/statistics/README.md @@ -45,7 +45,7 @@ run(); ### Response -**Promise<[operations.GetStatisticsResponse](../../models/operations/getstatisticsresponse.md)>** +**Promise\<[operations.GetStatisticsResponse](../../models/operations/getstatisticsresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/updater/README.md b/docs/sdks/updater/README.md index e34ed17c..c01fbaa5 100644 --- a/docs/sdks/updater/README.md +++ b/docs/sdks/updater/README.md @@ -47,7 +47,7 @@ run(); ### Response -**Promise<[operations.GetUpdateStatusResponse](../../models/operations/getupdatestatusresponse.md)>** +**Promise\<[operations.GetUpdateStatusResponse](../../models/operations/getupdatestatusresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -91,7 +91,7 @@ run(); ### Response -**Promise<[operations.CheckForUpdatesResponse](../../models/operations/checkforupdatesresponse.md)>** +**Promise\<[operations.CheckForUpdatesResponse](../../models/operations/checkforupdatesresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -137,7 +137,7 @@ run(); ### Response -**Promise<[operations.ApplyUpdatesResponse](../../models/operations/applyupdatesresponse.md)>** +**Promise\<[operations.ApplyUpdatesResponse](../../models/operations/applyupdatesresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/video/README.md b/docs/sdks/video/README.md index 7ca80131..b2736b55 100644 --- a/docs/sdks/video/README.md +++ b/docs/sdks/video/README.md @@ -58,7 +58,7 @@ run(); ### Response -**Promise<[operations.GetTimelineResponse](../../models/operations/gettimelineresponse.md)>** +**Promise\<[operations.GetTimelineResponse](../../models/operations/gettimelineresponse.md)\>** ### Errors | Error Object | Status Code | Content Type | @@ -118,7 +118,7 @@ run(); ### Response -**Promise<[operations.StartUniversalTranscodeResponse](../../models/operations/startuniversaltranscoderesponse.md)>** +**Promise\<[operations.StartUniversalTranscodeResponse](../../models/operations/startuniversaltranscoderesponse.md)\>** ### Errors | Error Object | Status Code | Content Type | diff --git a/jsr.json b/jsr.json index 8f1b8352..1e7772af 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@lukehagar/plexjs", - "version": "0.15.4", + "version": "0.16.0", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index 6fbc9a5f..481ecb08 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@lukehagar/plexjs", - "version": "0.15.4", + "version": "0.16.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@lukehagar/plexjs", - "version": "0.15.4", + "version": "0.16.0", "devDependencies": { "@types/jsonpath": "^0.2.4", "@typescript-eslint/eslint-plugin": "^7.7.1", diff --git a/package.json b/package.json index d1576b39..51defa41 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lukehagar/plexjs", - "version": "0.15.4", + "version": "0.16.0", "author": "LukeHagar", "main": "./index.js", "sideEffects": false, diff --git a/src/lib/config.ts b/src/lib/config.ts index ddd7ea14..11752749 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -87,7 +87,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "0.0.3", - sdkVersion: "0.15.4", - genVersion: "2.326.3", - userAgent: "speakeasy-sdk/typescript 0.15.4 2.326.3 0.0.3 @lukehagar/plexjs", + sdkVersion: "0.16.0", + genVersion: "2.335.5", + userAgent: "speakeasy-sdk/typescript 0.16.0 2.335.5 0.0.3 @lukehagar/plexjs", } as const; diff --git a/src/lib/encodings.ts b/src/lib/encodings.ts index 2396af72..19093eee 100644 --- a/src/lib/encodings.ts +++ b/src/lib/encodings.ts @@ -3,6 +3,7 @@ */ import { bytesToBase64 } from "./base64"; +import { isPlainObject } from "./primitives"; export class EncodingError extends Error { constructor(message: string) { @@ -321,12 +322,6 @@ function explode(key: string, value: unknown): [string, unknown][] { } } -function isPlainObject(value: unknown): value is object { - if (typeof value !== "object" || value == null) return false; - const proto = Object.getPrototypeOf(value); - return proto === null || proto === Object.prototype; -} - function serializeValue(value: unknown): string { if (value === null) { return "null"; diff --git a/src/lib/http.ts b/src/lib/http.ts index 4c1edfd6..b5669fd9 100644 --- a/src/lib/http.ts +++ b/src/lib/http.ts @@ -2,38 +2,40 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -export type Fetcher = ( - input: RequestInfo | URL, - init?: RequestInit, -) => Promise; +import { never as znever } from "zod"; +import { parse } from "./schemas"; +import { isPlainObject } from "./primitives"; +import * as errors from "../models/errors"; + +export type Fetcher = (input: RequestInfo | URL, init?: RequestInit) => Promise; export type Awaitable = T | Promise; const DEFAULT_FETCHER: Fetcher = (input, init) => { - // If input is a Request and init is undefined, Bun will discard the method, - // headers, body and other options that were set on the request object. - // Node.js and browers would ignore an undefined init value. This check is - // therefore needed for interop with Bun. - if (init == null) { - return fetch(input); - } else { - return fetch(input, init); - } + // If input is a Request and init is undefined, Bun will discard the method, + // headers, body and other options that were set on the request object. + // Node.js and browers would ignore an undefined init value. This check is + // therefore needed for interop with Bun. + if (init == null) { + return fetch(input); + } else { + return fetch(input, init); + } }; export type RequestInput = { - /** - * The URL the request will use. - */ - url: URL; - /** - * Options used to create a [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request). - */ - options?: RequestInit | undefined; + /** + * The URL the request will use. + */ + url: URL; + /** + * Options used to create a [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request). + */ + options?: RequestInit | undefined; }; export interface HTTPClientOptions { - fetcher?: Fetcher; + fetcher?: Fetcher; } export type BeforeRequestHook = (req: Request) => Awaitable; @@ -41,223 +43,463 @@ export type RequestErrorHook = (err: unknown, req: Request) => Awaitable; export type ResponseHook = (res: Response, req: Request) => Awaitable; export class HTTPClient { - private fetcher: Fetcher; - private requestHooks: BeforeRequestHook[] = []; - private requestErrorHooks: RequestErrorHook[] = []; - private responseHooks: ResponseHook[] = []; + private fetcher: Fetcher; + private requestHooks: BeforeRequestHook[] = []; + private requestErrorHooks: RequestErrorHook[] = []; + private responseHooks: ResponseHook[] = []; - constructor(private options: HTTPClientOptions = {}) { - this.fetcher = options.fetcher || DEFAULT_FETCHER; - } - - async request(request: Request): Promise { - let req = request; - for (const hook of this.requestHooks) { - const nextRequest = await hook(req); - if (nextRequest) { - req = nextRequest; - } + constructor(private options: HTTPClientOptions = {}) { + this.fetcher = options.fetcher || DEFAULT_FETCHER; } - try { - const res = await this.fetcher(req); + async request(request: Request): Promise { + let req = request; + for (const hook of this.requestHooks) { + const nextRequest = await hook(req); + if (nextRequest) { + req = nextRequest; + } + } - for (const hook of this.responseHooks) { - await hook(res, req); - } + try { + const res = await this.fetcher(req); - return res; - } catch (err) { - for (const hook of this.requestErrorHooks) { - await hook(err, req); - } + for (const hook of this.responseHooks) { + await hook(res, req); + } - throw err; - } - } + return res; + } catch (err) { + for (const hook of this.requestErrorHooks) { + await hook(err, req); + } - /** - * Registers a hook that is called before a request is made. The hook function - * can mutate the request or return a new request. This may be useful to add - * additional information to request such as request IDs and tracing headers. - */ - addHook(hook: "beforeRequest", fn: BeforeRequestHook): this; - /** - * Registers a hook that is called when a request cannot be made due to a - * network error. - */ - addHook(hook: "requestError", fn: RequestErrorHook): this; - /** - * Registers a hook that is called when a response has been received from the - * server. - */ - addHook(hook: "response", fn: ResponseHook): this; - addHook( - ...args: - | [hook: "beforeRequest", fn: BeforeRequestHook] - | [hook: "requestError", fn: RequestErrorHook] - | [hook: "response", fn: ResponseHook] - ) { - if (args[0] === "beforeRequest") { - this.requestHooks.push(args[1]); - } else if (args[0] === "requestError") { - this.requestErrorHooks.push(args[1]); - } else if (args[0] === "response") { - this.responseHooks.push(args[1]); - } else { - throw new Error(`Invalid hook type: ${args[0]}`); - } - return this; - } - - /** Removes a hook that was previously registered with `addHook`. */ - removeHook(hook: "beforeRequest", fn: BeforeRequestHook): this; - /** Removes a hook that was previously registered with `addHook`. */ - removeHook(hook: "requestError", fn: RequestErrorHook): this; - /** Removes a hook that was previously registered with `addHook`. */ - removeHook(hook: "response", fn: ResponseHook): this; - removeHook( - ...args: - | [hook: "beforeRequest", fn: BeforeRequestHook] - | [hook: "requestError", fn: RequestErrorHook] - | [hook: "response", fn: ResponseHook] - ): this { - let target: unknown[]; - if (args[0] === "beforeRequest") { - target = this.requestHooks; - } else if (args[0] === "requestError") { - target = this.requestErrorHooks; - } else if (args[0] === "response") { - target = this.responseHooks; - } else { - throw new Error(`Invalid hook type: ${args[0]}`); + throw err; + } } - const index = target.findIndex((v) => v === args[1]); - if (index >= 0) { - target.splice(index, 1); + /** + * Registers a hook that is called before a request is made. The hook function + * can mutate the request or return a new request. This may be useful to add + * additional information to request such as request IDs and tracing headers. + */ + addHook(hook: "beforeRequest", fn: BeforeRequestHook): this; + /** + * Registers a hook that is called when a request cannot be made due to a + * network error. + */ + addHook(hook: "requestError", fn: RequestErrorHook): this; + /** + * Registers a hook that is called when a response has been received from the + * server. + */ + addHook(hook: "response", fn: ResponseHook): this; + addHook( + ...args: + | [hook: "beforeRequest", fn: BeforeRequestHook] + | [hook: "requestError", fn: RequestErrorHook] + | [hook: "response", fn: ResponseHook] + ) { + if (args[0] === "beforeRequest") { + this.requestHooks.push(args[1]); + } else if (args[0] === "requestError") { + this.requestErrorHooks.push(args[1]); + } else if (args[0] === "response") { + this.responseHooks.push(args[1]); + } else { + throw new Error(`Invalid hook type: ${args[0]}`); + } + return this; } - return this; - } + /** Removes a hook that was previously registered with `addHook`. */ + removeHook(hook: "beforeRequest", fn: BeforeRequestHook): this; + /** Removes a hook that was previously registered with `addHook`. */ + removeHook(hook: "requestError", fn: RequestErrorHook): this; + /** Removes a hook that was previously registered with `addHook`. */ + removeHook(hook: "response", fn: ResponseHook): this; + removeHook( + ...args: + | [hook: "beforeRequest", fn: BeforeRequestHook] + | [hook: "requestError", fn: RequestErrorHook] + | [hook: "response", fn: ResponseHook] + ): this { + let target: unknown[]; + if (args[0] === "beforeRequest") { + target = this.requestHooks; + } else if (args[0] === "requestError") { + target = this.requestErrorHooks; + } else if (args[0] === "response") { + target = this.responseHooks; + } else { + throw new Error(`Invalid hook type: ${args[0]}`); + } - clone(): HTTPClient { - const child = new HTTPClient(this.options); - child.requestHooks = this.requestHooks.slice(); - child.requestErrorHooks = this.requestErrorHooks.slice(); - child.responseHooks = this.responseHooks.slice(); + const index = target.findIndex((v) => v === args[1]); + if (index >= 0) { + target.splice(index, 1); + } - return child; - } + return this; + } + + clone(): HTTPClient { + const child = new HTTPClient(this.options); + child.requestHooks = this.requestHooks.slice(); + child.requestErrorHooks = this.requestErrorHooks.slice(); + child.responseHooks = this.responseHooks.slice(); + + return child; + } } +export type StatusCodePredicate = number | string | (number | string)[]; + // A semicolon surrounded by optional whitespace characters is used to separate // segments in a media type string. const mediaParamSeparator = /\s*;\s*/g; function matchContentType(response: Response, pattern: string): boolean { - // `*` is a special case which means anything is acceptable. - if (pattern === "*") { - return true; - } - - let contentType = - response.headers.get("content-type")?.trim() || "application/octet-stream"; - contentType = contentType.toLowerCase(); - - const wantParts = pattern.toLowerCase().trim().split(mediaParamSeparator); - const [wantType = "", ...wantParams] = wantParts; - - if (wantType.split("/").length !== 2) { - return false; - } - - const gotParts = contentType.split(mediaParamSeparator); - const [gotType = "", ...gotParams] = gotParts; - - const [type = "", subtype = ""] = gotType.split("/"); - if (!type || !subtype) { - return false; - } - - if ( - wantType !== "*/*" && - gotType !== wantType && - `${type}/*` !== wantType && - `*/${subtype}` !== wantType - ) { - return false; - } - - if (gotParams.length < wantParams.length) { - return false; - } - - const params = new Set(gotParams); - for (const wantParam of wantParams) { - if (!params.has(wantParam)) { - return false; + // `*` is a special case which means anything is acceptable. + if (pattern === "*") { + return true; } - } - return true; + let contentType = response.headers.get("content-type")?.trim() || "application/octet-stream"; + contentType = contentType.toLowerCase(); + + const wantParts = pattern.toLowerCase().trim().split(mediaParamSeparator); + const [wantType = "", ...wantParams] = wantParts; + + if (wantType.split("/").length !== 2) { + return false; + } + + const gotParts = contentType.split(mediaParamSeparator); + const [gotType = "", ...gotParams] = gotParts; + + const [type = "", subtype = ""] = gotType.split("/"); + if (!type || !subtype) { + return false; + } + + if ( + wantType !== "*/*" && + gotType !== wantType && + `${type}/*` !== wantType && + `*/${subtype}` !== wantType + ) { + return false; + } + + if (gotParams.length < wantParams.length) { + return false; + } + + const params = new Set(gotParams); + for (const wantParam of wantParams) { + if (!params.has(wantParam)) { + return false; + } + } + + return true; } const codeRangeRE = new RegExp("^[0-9]xx$", "i"); -export function matchStatusCode( - response: Response, - codes: number | string | (number | string)[], -): boolean { - const actual = `${response.status}`; - const expectedCodes = Array.isArray(codes) ? codes : [codes]; - if (!expectedCodes.length) { - return false; - } - - return expectedCodes.some((ec) => { - const code = `${ec}`; - - if (code === "default") { - return true; +export function matchStatusCode(response: Response, codes: StatusCodePredicate): boolean { + const actual = `${response.status}`; + const expectedCodes = Array.isArray(codes) ? codes : [codes]; + if (!expectedCodes.length) { + return false; } - if (!codeRangeRE.test(`${code}`)) { - return code === actual; - } + return expectedCodes.some((ec) => { + const code = `${ec}`; - const expectFamily = code.charAt(0); - if (!expectFamily) { - throw new Error("Invalid status code range"); - } + if (code === "default") { + return true; + } - const actualFamily = actual.charAt(0); - if (!actualFamily) { - throw new Error(`Invalid response status code: ${actual}`); - } + if (!codeRangeRE.test(`${code}`)) { + return code === actual; + } - return actualFamily === expectFamily; - }); + const expectFamily = code.charAt(0); + if (!expectFamily) { + throw new Error("Invalid status code range"); + } + + const actualFamily = actual.charAt(0); + if (!actualFamily) { + throw new Error(`Invalid response status code: ${actual}`); + } + + return actualFamily === expectFamily; + }); } export function matchResponse( - response: Response, - code: number | string | (number | string)[], - contentTypePattern: string, + response: Response, + code: StatusCodePredicate, + contentTypePattern: string ): boolean { - return ( - matchStatusCode(response, code) && - matchContentType(response, contentTypePattern) - ); + return matchStatusCode(response, code) && matchContentType(response, contentTypePattern); } const headerValRE = /, */; export function unpackHeaders(headers: Headers): Record { - const out: Record = {}; + const out: Record = {}; - for (const [k, v] of headers.entries()) { - out[k] = v.split(headerValRE); - } + for (const [k, v] of headers.entries()) { + out[k] = v.split(headerValRE); + } - return out; + return out; +} + +type ResponseMatcherSchema = + | { parse: (data: unknown) => T } + | { inboundSchema: { parse: (data: unknown) => T } }; + +type SerializationMethod = "sse" | "json" | "rawBytes" | "rawStream" | "text" | "void" | "fail"; + +const defaultContentTypes: Record = { + sse: "text/event-stream", + json: "application/json", + rawBytes: "application/octet-stream", + rawStream: "application/octet-stream", + text: "text/plain", + void: "", + fail: "", +}; + +type ResponsePredicateMatch = { + method: SerializationMethod; + codes: StatusCodePredicate; + ctype: string; + schema: ResponseMatcherSchema; + hdrs: boolean; + key: string | undefined; + err: boolean; + fail: boolean; +}; + +type ResponsePredicateOptions = { + /** Content type to match on. */ + ctype?: string; + /** Pass HTTP headers to deserializer. */ + hdrs?: boolean; +} & ( + | { + /** The result key to store the deserialized value into. */ + key?: string; + fail?: never; + err?: never; + } + | { + /** Indicates the matched response must throw the built-in error. */ + fail: true; + key?: never; + err?: never; + } + | { + /** Indicates the matched response is a custom error. */ + err: true; + key?: never; + fail?: never; + } +); + +export class ResponseMatcher { + private predicates: ResponsePredicateMatch[] = []; + + #any( + method: SerializationMethod, + codes: StatusCodePredicate, + schema: ResponseMatcherSchema, + opts?: ResponsePredicateOptions + ) { + const ctype = opts?.ctype || defaultContentTypes[method]; + const hdrs = !!opts?.hdrs; + const key = opts?.key; + const err = !!opts?.err; + const fail = !!opts?.fail; + this.predicates.push({ + method, + codes, + ctype, + schema, + hdrs, + key, + err, + fail, + }); + return this; + } + + json( + codes: StatusCodePredicate, + schema: ResponseMatcherSchema, + opts?: ResponsePredicateOptions + ): this { + return this.#any("json", codes, schema, opts); + } + bytes( + codes: StatusCodePredicate, + schema: ResponseMatcherSchema, + opts?: ResponsePredicateOptions + ): this { + return this.#any("rawBytes", codes, schema, opts); + } + stream( + codes: StatusCodePredicate, + schema: ResponseMatcherSchema, + opts?: ResponsePredicateOptions + ): this { + return this.#any("rawStream", codes, schema, opts); + } + text( + codes: StatusCodePredicate, + schema: ResponseMatcherSchema, + opts?: ResponsePredicateOptions + ): this { + return this.#any("text", codes, schema, opts); + } + sse( + codes: StatusCodePredicate, + schema: ResponseMatcherSchema, + opts?: Omit + ): this { + return this.#any("sse", codes, schema, opts); + } + void( + codes: StatusCodePredicate, + schema: ResponseMatcherSchema, + opts?: Pick + ): this { + return this.#any("void", codes, schema, opts); + } + fail(codes: StatusCodePredicate): this { + return this.#any("fail", codes, znever(), { fail: true }); + } + + async match( + response: Response, + // envelope + options?: { + resultKey?: string; + extraFields?: Record; + } + ): Promise<[result: Result, rawData: unknown]> { + let pred: ResponsePredicateMatch | undefined; + for (const predicate of this.predicates) { + const { codes, ctype } = predicate; + if (ctype && matchResponse(response, codes, ctype)) { + pred = predicate; + break; + } else if (!ctype && matchStatusCode(response, codes)) { + pred = predicate; + break; + } + } + if (pred == null) { + const responseBody = await response.text(); + throw new errors.SDKError( + "Unexpected API response status or content-type", + response, + responseBody + ); + } + + const { method, schema } = pred; + + let raw: unknown; + switch (method) { + case "json": + raw = await response.json(); + break; + case "rawBytes": + raw = await response.arrayBuffer(); + break; + case "rawStream": + raw = response.body; + break; + case "text": + raw = await response.text(); + break; + case "sse": + raw = response.body; + break; + case "void": + raw = await discardResponseBody(response); + break; + case "fail": + raw = await response.text(); + break; + default: + method satisfies never; + throw new Error(`Unsupported response type: ${method}`); + } + + const resultKey = pred.key || options?.resultKey; + let data: unknown; + if (pred.fail) { + throw new errors.SDKError( + "API error occurred", + response, + typeof raw === "string" ? raw : "" + ); + } else if (pred.err) { + data = { + ...options?.extraFields, + ...(pred.hdrs ? { Headers: unpackHeaders(response.headers) } : null), + ...(isPlainObject(raw) ? raw : null), + }; + } else if (resultKey) { + data = { + ...options?.extraFields, + ...(pred.hdrs ? { Headers: unpackHeaders(response.headers) } : null), + [resultKey]: raw, + }; + } else { + data = { + ...options?.extraFields, + ...(pred.hdrs ? { Headers: unpackHeaders(response.headers) } : null), + }; + } + + const parser = "inboundSchema" in schema ? schema.inboundSchema : schema; + const body = parse(data, (v: unknown) => parser.parse(v), "Response validation failed"); + + if (body instanceof Error) { + throw body; + } + + return [body, raw]; + } +} + +/** + * 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; + } + + try { + let done = false; + while (!done) { + const res = await reader.read(); + done = res.done; + } + } finally { + reader.releaseLock(); + } } diff --git a/src/lib/primitives.ts b/src/lib/primitives.ts new file mode 100644 index 00000000..998a33b4 --- /dev/null +++ b/src/lib/primitives.ts @@ -0,0 +1,9 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +export function isPlainObject(value: unknown): value is object { + if (typeof value !== "object" || value == null) return false; + const proto = Object.getPrototypeOf(value); + return proto === null || proto === Object.prototype; +} diff --git a/src/lib/sdks.ts b/src/lib/sdks.ts index c93b286e..9ec697e7 100644 --- a/src/lib/sdks.ts +++ b/src/lib/sdks.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { HTTPClient, matchResponse, matchStatusCode, unpackHeaders } from "./http"; +import { ResponseMatcher, HTTPClient, matchStatusCode } from "./http"; import { SecurityState, resolveSecurity, resolveGlobalSecurity } from "./security"; import { pathToFunc } from "./url"; import { encodeForm } from "./encodings"; @@ -123,7 +123,7 @@ export class ClientSDK { let response = await this.client.request(await this.hooks$.beforeRequest(context, req)); - if (this.matchStatusCode(response, errorCodes)) { + if (matchStatusCode(response, errorCodes)) { const result = await this.hooks$.afterError(context, response, null); if (result.error) { throw result.error; @@ -136,10 +136,9 @@ export class ClientSDK { return response; } - protected unpackHeaders = unpackHeaders; - - protected matchStatusCode = matchStatusCode; - protected matchResponse = matchResponse; + protected matcher(): ResponseMatcher { + return new ResponseMatcher(); + } protected templateURLComponent = pathToFunc; diff --git a/src/models/components/security.ts b/src/models/components/security.ts index 45709c37..14ff1129 100644 --- a/src/models/components/security.ts +++ b/src/models/components/security.ts @@ -10,11 +10,7 @@ export type Security = { /** @internal */ export namespace Security$ { - export type Inbound = { - accessToken: string; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ accessToken: z.string(), }) diff --git a/src/models/errors/addplaylistcontents.ts b/src/models/errors/addplaylistcontents.ts index 90973a5e..d449d96d 100644 --- a/src/models/errors/addplaylistcontents.ts +++ b/src/models/errors/addplaylistcontents.ts @@ -56,13 +56,7 @@ export class AddPlaylistContentsResponseBody extends Error { /** @internal */ export namespace AddPlaylistContentsErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace AddPlaylistContentsErrors$ { /** @internal */ export namespace AddPlaylistContentsResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => AddPlaylistContentsErrors$.inboundSchema)).optional(), diff --git a/src/models/errors/applyupdates.ts b/src/models/errors/applyupdates.ts index 53fc0fb9..6b1055a8 100644 --- a/src/models/errors/applyupdates.ts +++ b/src/models/errors/applyupdates.ts @@ -56,13 +56,7 @@ export class ApplyUpdatesResponseBody extends Error { /** @internal */ export namespace ApplyUpdatesErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace ApplyUpdatesErrors$ { /** @internal */ export namespace ApplyUpdatesResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => ApplyUpdatesErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/cancelserveractivities.ts b/src/models/errors/cancelserveractivities.ts index 1ca5adbf..606df4c6 100644 --- a/src/models/errors/cancelserveractivities.ts +++ b/src/models/errors/cancelserveractivities.ts @@ -56,13 +56,7 @@ export class CancelServerActivitiesResponseBody extends Error { /** @internal */ export namespace CancelServerActivitiesErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,15 +93,10 @@ export namespace CancelServerActivitiesErrors$ { /** @internal */ export namespace CancelServerActivitiesResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - export const inboundSchema: z.ZodType< CancelServerActivitiesResponseBody, z.ZodTypeDef, - Inbound + unknown > = z .object({ errors: z.array(z.lazy(() => CancelServerActivitiesErrors$.inboundSchema)).optional(), diff --git a/src/models/errors/checkforupdates.ts b/src/models/errors/checkforupdates.ts index b68505b6..5a7ccfb2 100644 --- a/src/models/errors/checkforupdates.ts +++ b/src/models/errors/checkforupdates.ts @@ -56,13 +56,7 @@ export class CheckForUpdatesResponseBody extends Error { /** @internal */ export namespace CheckForUpdatesErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace CheckForUpdatesErrors$ { /** @internal */ export namespace CheckForUpdatesResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => CheckForUpdatesErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/clearplaylistcontents.ts b/src/models/errors/clearplaylistcontents.ts index 9d633353..e35cf73f 100644 --- a/src/models/errors/clearplaylistcontents.ts +++ b/src/models/errors/clearplaylistcontents.ts @@ -56,13 +56,7 @@ export class ClearPlaylistContentsResponseBody extends Error { /** @internal */ export namespace ClearPlaylistContentsErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,15 +93,10 @@ export namespace ClearPlaylistContentsErrors$ { /** @internal */ export namespace ClearPlaylistContentsResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - export const inboundSchema: z.ZodType< ClearPlaylistContentsResponseBody, z.ZodTypeDef, - Inbound + unknown > = z .object({ errors: z.array(z.lazy(() => ClearPlaylistContentsErrors$.inboundSchema)).optional(), diff --git a/src/models/errors/createplaylist.ts b/src/models/errors/createplaylist.ts index 8c1acad7..c501f00b 100644 --- a/src/models/errors/createplaylist.ts +++ b/src/models/errors/createplaylist.ts @@ -56,13 +56,7 @@ export class CreatePlaylistResponseBody extends Error { /** @internal */ export namespace CreatePlaylistErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace CreatePlaylistErrors$ { /** @internal */ export namespace CreatePlaylistResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => CreatePlaylistErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/deletelibrary.ts b/src/models/errors/deletelibrary.ts index 604af7c1..0ba76efa 100644 --- a/src/models/errors/deletelibrary.ts +++ b/src/models/errors/deletelibrary.ts @@ -56,13 +56,7 @@ export class DeleteLibraryResponseBody extends Error { /** @internal */ export namespace DeleteLibraryErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace DeleteLibraryErrors$ { /** @internal */ export namespace DeleteLibraryResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => DeleteLibraryErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/deleteplaylist.ts b/src/models/errors/deleteplaylist.ts index 272a945b..e4172bda 100644 --- a/src/models/errors/deleteplaylist.ts +++ b/src/models/errors/deleteplaylist.ts @@ -56,13 +56,7 @@ export class DeletePlaylistResponseBody extends Error { /** @internal */ export namespace DeletePlaylistErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace DeletePlaylistErrors$ { /** @internal */ export namespace DeletePlaylistResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => DeletePlaylistErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/enablepapertrail.ts b/src/models/errors/enablepapertrail.ts index 5961fbde..35f6a2d5 100644 --- a/src/models/errors/enablepapertrail.ts +++ b/src/models/errors/enablepapertrail.ts @@ -56,13 +56,7 @@ export class EnablePaperTrailResponseBody extends Error { /** @internal */ export namespace EnablePaperTrailErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace EnablePaperTrailErrors$ { /** @internal */ export namespace EnablePaperTrailResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => EnablePaperTrailErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/getavailableclients.ts b/src/models/errors/getavailableclients.ts index f604595a..99044d08 100644 --- a/src/models/errors/getavailableclients.ts +++ b/src/models/errors/getavailableclients.ts @@ -56,13 +56,7 @@ export class GetAvailableClientsResponseBody extends Error { /** @internal */ export namespace GetAvailableClientsErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetAvailableClientsErrors$ { /** @internal */ export namespace GetAvailableClientsResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetAvailableClientsErrors$.inboundSchema)).optional(), diff --git a/src/models/errors/getbutlertasks.ts b/src/models/errors/getbutlertasks.ts index 2017036c..099ed514 100644 --- a/src/models/errors/getbutlertasks.ts +++ b/src/models/errors/getbutlertasks.ts @@ -56,13 +56,7 @@ export class GetButlerTasksResponseBody extends Error { /** @internal */ export namespace GetButlerTasksErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetButlerTasksErrors$ { /** @internal */ export namespace GetButlerTasksResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetButlerTasksErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/getdevices.ts b/src/models/errors/getdevices.ts index d269493b..a3a7441a 100644 --- a/src/models/errors/getdevices.ts +++ b/src/models/errors/getdevices.ts @@ -56,13 +56,7 @@ export class GetDevicesResponseBody extends Error { /** @internal */ export namespace GetDevicesErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetDevicesErrors$ { /** @internal */ export namespace GetDevicesResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetDevicesErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/getfilehash.ts b/src/models/errors/getfilehash.ts index 99f3dcf1..fb3d506f 100644 --- a/src/models/errors/getfilehash.ts +++ b/src/models/errors/getfilehash.ts @@ -56,13 +56,7 @@ export class GetFileHashResponseBody extends Error { /** @internal */ export namespace GetFileHashErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetFileHashErrors$ { /** @internal */ export namespace GetFileHashResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetFileHashErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/getglobalhubs.ts b/src/models/errors/getglobalhubs.ts index 20bbde2c..0333cb59 100644 --- a/src/models/errors/getglobalhubs.ts +++ b/src/models/errors/getglobalhubs.ts @@ -56,13 +56,7 @@ export class GetGlobalHubsResponseBody extends Error { /** @internal */ export namespace GetGlobalHubsErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetGlobalHubsErrors$ { /** @internal */ export namespace GetGlobalHubsResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetGlobalHubsErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/getlibraries.ts b/src/models/errors/getlibraries.ts index e6460cf5..945555c8 100644 --- a/src/models/errors/getlibraries.ts +++ b/src/models/errors/getlibraries.ts @@ -56,13 +56,7 @@ export class GetLibrariesResponseBody extends Error { /** @internal */ export namespace GetLibrariesErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetLibrariesErrors$ { /** @internal */ export namespace GetLibrariesResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetLibrariesErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/getlibrary.ts b/src/models/errors/getlibrary.ts index 6dba8758..df45a415 100644 --- a/src/models/errors/getlibrary.ts +++ b/src/models/errors/getlibrary.ts @@ -56,13 +56,7 @@ export class GetLibraryResponseBody extends Error { /** @internal */ export namespace GetLibraryErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetLibraryErrors$ { /** @internal */ export namespace GetLibraryResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetLibraryErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/getlibraryhubs.ts b/src/models/errors/getlibraryhubs.ts index 78ffdd6a..affff475 100644 --- a/src/models/errors/getlibraryhubs.ts +++ b/src/models/errors/getlibraryhubs.ts @@ -56,13 +56,7 @@ export class GetLibraryHubsResponseBody extends Error { /** @internal */ export namespace GetLibraryHubsErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetLibraryHubsErrors$ { /** @internal */ export namespace GetLibraryHubsResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetLibraryHubsErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/getlibraryitems.ts b/src/models/errors/getlibraryitems.ts new file mode 100644 index 00000000..7afdef13 --- /dev/null +++ b/src/models/errors/getlibraryitems.ts @@ -0,0 +1,134 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type GetLibraryItemsErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetLibraryItemsResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetLibraryItemsResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetLibraryItemsResponseBodyData; + + constructor(err: GetLibraryItemsResponseBodyData) { + super(""); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + this.message = + "message" in err && typeof err.message === "string" + ? err.message + : "API error occurred"; + + this.name = "GetLibraryItemsResponseBody"; + } +} + +/** @internal */ +export namespace GetLibraryItemsErrors$ { + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetLibraryItemsResponseBody$ { + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => GetLibraryItemsErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetLibraryItemsResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(GetLibraryItemsResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => GetLibraryItemsErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getmetadata.ts b/src/models/errors/getmetadata.ts index 0291dc94..cf204a3e 100644 --- a/src/models/errors/getmetadata.ts +++ b/src/models/errors/getmetadata.ts @@ -56,13 +56,7 @@ export class GetMetadataResponseBody extends Error { /** @internal */ export namespace GetMetadataErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetMetadataErrors$ { /** @internal */ export namespace GetMetadataResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetMetadataErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/getmetadatachildren.ts b/src/models/errors/getmetadatachildren.ts index 0b2a3c9b..fb152993 100644 --- a/src/models/errors/getmetadatachildren.ts +++ b/src/models/errors/getmetadatachildren.ts @@ -56,13 +56,7 @@ export class GetMetadataChildrenResponseBody extends Error { /** @internal */ export namespace GetMetadataChildrenErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetMetadataChildrenErrors$ { /** @internal */ export namespace GetMetadataChildrenResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetMetadataChildrenErrors$.inboundSchema)).optional(), diff --git a/src/models/errors/getmyplexaccount.ts b/src/models/errors/getmyplexaccount.ts index 4e1bc809..c77aca38 100644 --- a/src/models/errors/getmyplexaccount.ts +++ b/src/models/errors/getmyplexaccount.ts @@ -56,13 +56,7 @@ export class GetMyPlexAccountResponseBody extends Error { /** @internal */ export namespace GetMyPlexAccountErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetMyPlexAccountErrors$ { /** @internal */ export namespace GetMyPlexAccountResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetMyPlexAccountErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/getondeck.ts b/src/models/errors/getondeck.ts index aacf480b..a4626788 100644 --- a/src/models/errors/getondeck.ts +++ b/src/models/errors/getondeck.ts @@ -56,13 +56,7 @@ export class GetOnDeckResponseBody extends Error { /** @internal */ export namespace GetOnDeckErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetOnDeckErrors$ { /** @internal */ export namespace GetOnDeckResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetOnDeckErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/getpin.ts b/src/models/errors/getpin.ts index 7773d472..c137c365 100644 --- a/src/models/errors/getpin.ts +++ b/src/models/errors/getpin.ts @@ -56,13 +56,7 @@ export class GetPinResponseBody extends Error { /** @internal */ export namespace GetPinErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetPinErrors$ { /** @internal */ export namespace GetPinResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetPinErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/getplaylist.ts b/src/models/errors/getplaylist.ts index 2d679792..0df9e9fe 100644 --- a/src/models/errors/getplaylist.ts +++ b/src/models/errors/getplaylist.ts @@ -56,13 +56,7 @@ export class GetPlaylistResponseBody extends Error { /** @internal */ export namespace GetPlaylistErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetPlaylistErrors$ { /** @internal */ export namespace GetPlaylistResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetPlaylistErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/getplaylistcontents.ts b/src/models/errors/getplaylistcontents.ts index 6a7278c8..8aa575f7 100644 --- a/src/models/errors/getplaylistcontents.ts +++ b/src/models/errors/getplaylistcontents.ts @@ -56,13 +56,7 @@ export class GetPlaylistContentsResponseBody extends Error { /** @internal */ export namespace GetPlaylistContentsErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetPlaylistContentsErrors$ { /** @internal */ export namespace GetPlaylistContentsResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetPlaylistContentsErrors$.inboundSchema)).optional(), diff --git a/src/models/errors/getplaylists.ts b/src/models/errors/getplaylists.ts index fcb14f90..999383cc 100644 --- a/src/models/errors/getplaylists.ts +++ b/src/models/errors/getplaylists.ts @@ -56,13 +56,7 @@ export class GetPlaylistsResponseBody extends Error { /** @internal */ export namespace GetPlaylistsErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetPlaylistsErrors$ { /** @internal */ export namespace GetPlaylistsResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetPlaylistsErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/getrecentlyadded.ts b/src/models/errors/getrecentlyadded.ts index fb516671..ec776511 100644 --- a/src/models/errors/getrecentlyadded.ts +++ b/src/models/errors/getrecentlyadded.ts @@ -56,13 +56,7 @@ export class GetRecentlyAddedResponseBody extends Error { /** @internal */ export namespace GetRecentlyAddedErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetRecentlyAddedErrors$ { /** @internal */ export namespace GetRecentlyAddedResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetRecentlyAddedErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/getresizedphoto.ts b/src/models/errors/getresizedphoto.ts index fe0b2e71..8b468b3a 100644 --- a/src/models/errors/getresizedphoto.ts +++ b/src/models/errors/getresizedphoto.ts @@ -56,13 +56,7 @@ export class GetResizedPhotoResponseBody extends Error { /** @internal */ export namespace GetResizedPhotoErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetResizedPhotoErrors$ { /** @internal */ export namespace GetResizedPhotoResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetResizedPhotoErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/getsearchresults.ts b/src/models/errors/getsearchresults.ts index 3d381096..994107d7 100644 --- a/src/models/errors/getsearchresults.ts +++ b/src/models/errors/getsearchresults.ts @@ -56,13 +56,7 @@ export class GetSearchResultsResponseBody extends Error { /** @internal */ export namespace GetSearchResultsErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetSearchResultsErrors$ { /** @internal */ export namespace GetSearchResultsResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetSearchResultsErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/getserveractivities.ts b/src/models/errors/getserveractivities.ts index 8cdd8e29..567ada30 100644 --- a/src/models/errors/getserveractivities.ts +++ b/src/models/errors/getserveractivities.ts @@ -56,13 +56,7 @@ export class GetServerActivitiesResponseBody extends Error { /** @internal */ export namespace GetServerActivitiesErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetServerActivitiesErrors$ { /** @internal */ export namespace GetServerActivitiesResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetServerActivitiesErrors$.inboundSchema)).optional(), diff --git a/src/models/errors/getservercapabilities.ts b/src/models/errors/getservercapabilities.ts index 4128deed..0670b61d 100644 --- a/src/models/errors/getservercapabilities.ts +++ b/src/models/errors/getservercapabilities.ts @@ -56,13 +56,7 @@ export class GetServerCapabilitiesResponseBody extends Error { /** @internal */ export namespace Errors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,15 +93,10 @@ export namespace Errors$ { /** @internal */ export namespace GetServerCapabilitiesResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - export const inboundSchema: z.ZodType< GetServerCapabilitiesResponseBody, z.ZodTypeDef, - Inbound + unknown > = z .object({ errors: z.array(z.lazy(() => Errors$.inboundSchema)).optional(), diff --git a/src/models/errors/getserveridentity.ts b/src/models/errors/getserveridentity.ts index 138102fa..bcfc48f0 100644 --- a/src/models/errors/getserveridentity.ts +++ b/src/models/errors/getserveridentity.ts @@ -56,13 +56,7 @@ export class GetServerIdentityResponseBody extends Error { /** @internal */ export namespace GetServerIdentityErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetServerIdentityErrors$ { /** @internal */ export namespace GetServerIdentityResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetServerIdentityErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/getserverlist.ts b/src/models/errors/getserverlist.ts index a449f254..385775c4 100644 --- a/src/models/errors/getserverlist.ts +++ b/src/models/errors/getserverlist.ts @@ -56,13 +56,7 @@ export class GetServerListResponseBody extends Error { /** @internal */ export namespace GetServerListErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetServerListErrors$ { /** @internal */ export namespace GetServerListResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetServerListErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/getserverpreferences.ts b/src/models/errors/getserverpreferences.ts index 4fa3bfda..62833177 100644 --- a/src/models/errors/getserverpreferences.ts +++ b/src/models/errors/getserverpreferences.ts @@ -56,13 +56,7 @@ export class GetServerPreferencesResponseBody extends Error { /** @internal */ export namespace GetServerPreferencesErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetServerPreferencesErrors$ { /** @internal */ export namespace GetServerPreferencesResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetServerPreferencesErrors$.inboundSchema)).optional(), diff --git a/src/models/errors/getsessionhistory.ts b/src/models/errors/getsessionhistory.ts index d45664fe..d08cea17 100644 --- a/src/models/errors/getsessionhistory.ts +++ b/src/models/errors/getsessionhistory.ts @@ -56,13 +56,7 @@ export class GetSessionHistoryResponseBody extends Error { /** @internal */ export namespace GetSessionHistoryErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetSessionHistoryErrors$ { /** @internal */ export namespace GetSessionHistoryResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetSessionHistoryErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/getsessions.ts b/src/models/errors/getsessions.ts index 057180d5..a9f968a2 100644 --- a/src/models/errors/getsessions.ts +++ b/src/models/errors/getsessions.ts @@ -56,13 +56,7 @@ export class GetSessionsResponseBody extends Error { /** @internal */ export namespace GetSessionsErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetSessionsErrors$ { /** @internal */ export namespace GetSessionsResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetSessionsErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/getsourceconnectioninformation.ts b/src/models/errors/getsourceconnectioninformation.ts index 4a8cd35a..035dcf91 100644 --- a/src/models/errors/getsourceconnectioninformation.ts +++ b/src/models/errors/getsourceconnectioninformation.ts @@ -56,16 +56,10 @@ export class GetSourceConnectionInformationResponseBody extends Error { /** @internal */ export namespace GetSourceConnectionInformationErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - export const inboundSchema: z.ZodType< GetSourceConnectionInformationErrors, z.ZodTypeDef, - Inbound + unknown > = z .object({ code: z.number().optional(), @@ -107,15 +101,10 @@ export namespace GetSourceConnectionInformationErrors$ { /** @internal */ export namespace GetSourceConnectionInformationResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - export const inboundSchema: z.ZodType< GetSourceConnectionInformationResponseBody, z.ZodTypeDef, - Inbound + unknown > = z .object({ errors: z diff --git a/src/models/errors/getstatistics.ts b/src/models/errors/getstatistics.ts index c0728131..389142de 100644 --- a/src/models/errors/getstatistics.ts +++ b/src/models/errors/getstatistics.ts @@ -56,13 +56,7 @@ export class GetStatisticsResponseBody extends Error { /** @internal */ export namespace GetStatisticsErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetStatisticsErrors$ { /** @internal */ export namespace GetStatisticsResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetStatisticsErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/gettimeline.ts b/src/models/errors/gettimeline.ts index 7995e3dc..f7e8fd3f 100644 --- a/src/models/errors/gettimeline.ts +++ b/src/models/errors/gettimeline.ts @@ -56,13 +56,7 @@ export class GetTimelineResponseBody extends Error { /** @internal */ export namespace GetTimelineErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetTimelineErrors$ { /** @internal */ export namespace GetTimelineResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetTimelineErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/gettoken.ts b/src/models/errors/gettoken.ts index bedb4866..ae068d4d 100644 --- a/src/models/errors/gettoken.ts +++ b/src/models/errors/gettoken.ts @@ -56,13 +56,7 @@ export class GetTokenResponseBody extends Error { /** @internal */ export namespace GetTokenErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetTokenErrors$ { /** @internal */ export namespace GetTokenResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetTokenErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/gettranscodesessions.ts b/src/models/errors/gettranscodesessions.ts index 5ea973be..12b02239 100644 --- a/src/models/errors/gettranscodesessions.ts +++ b/src/models/errors/gettranscodesessions.ts @@ -56,13 +56,7 @@ export class GetTranscodeSessionsResponseBody extends Error { /** @internal */ export namespace GetTranscodeSessionsErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetTranscodeSessionsErrors$ { /** @internal */ export namespace GetTranscodeSessionsResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetTranscodeSessionsErrors$.inboundSchema)).optional(), diff --git a/src/models/errors/gettransienttoken.ts b/src/models/errors/gettransienttoken.ts index 6831eee7..924d646b 100644 --- a/src/models/errors/gettransienttoken.ts +++ b/src/models/errors/gettransienttoken.ts @@ -56,13 +56,7 @@ export class GetTransientTokenResponseBody extends Error { /** @internal */ export namespace GetTransientTokenErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetTransientTokenErrors$ { /** @internal */ export namespace GetTransientTokenResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetTransientTokenErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/getupdatestatus.ts b/src/models/errors/getupdatestatus.ts index e340c56f..fab1aba6 100644 --- a/src/models/errors/getupdatestatus.ts +++ b/src/models/errors/getupdatestatus.ts @@ -56,13 +56,7 @@ export class GetUpdateStatusResponseBody extends Error { /** @internal */ export namespace GetUpdateStatusErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace GetUpdateStatusErrors$ { /** @internal */ export namespace GetUpdateStatusResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => GetUpdateStatusErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/index.ts b/src/models/errors/index.ts index f5807b54..2a205b45 100644 --- a/src/models/errors/index.ts +++ b/src/models/errors/index.ts @@ -19,6 +19,7 @@ export * from "./getglobalhubs"; export * from "./getlibraries"; export * from "./getlibrary"; export * from "./getlibraryhubs"; +export * from "./getlibraryitems"; export * from "./getmetadata"; export * from "./getmetadatachildren"; export * from "./getmyplexaccount"; @@ -53,6 +54,7 @@ export * from "./performvoicesearch"; export * from "./refreshlibrary"; export * from "./sdkerror"; export * from "./sdkvalidationerror"; +export * from "./searchlibrary"; export * from "./startalltasks"; export * from "./starttask"; export * from "./startuniversaltranscode"; diff --git a/src/models/errors/logline.ts b/src/models/errors/logline.ts index 741f3230..e47b8b0b 100644 --- a/src/models/errors/logline.ts +++ b/src/models/errors/logline.ts @@ -56,13 +56,7 @@ export class LogLineResponseBody extends Error { /** @internal */ export namespace LogLineErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace LogLineErrors$ { /** @internal */ export namespace LogLineResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => LogLineErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/logmultiline.ts b/src/models/errors/logmultiline.ts index 65f3a8d3..f1a428cc 100644 --- a/src/models/errors/logmultiline.ts +++ b/src/models/errors/logmultiline.ts @@ -56,13 +56,7 @@ export class LogMultiLineResponseBody extends Error { /** @internal */ export namespace LogMultiLineErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace LogMultiLineErrors$ { /** @internal */ export namespace LogMultiLineResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => LogMultiLineErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/markplayed.ts b/src/models/errors/markplayed.ts index 1bad7d2c..0e5fb28e 100644 --- a/src/models/errors/markplayed.ts +++ b/src/models/errors/markplayed.ts @@ -56,13 +56,7 @@ export class MarkPlayedResponseBody extends Error { /** @internal */ export namespace MarkPlayedErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace MarkPlayedErrors$ { /** @internal */ export namespace MarkPlayedResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => MarkPlayedErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/markunplayed.ts b/src/models/errors/markunplayed.ts index bd516cec..858792ce 100644 --- a/src/models/errors/markunplayed.ts +++ b/src/models/errors/markunplayed.ts @@ -56,13 +56,7 @@ export class MarkUnplayedResponseBody extends Error { /** @internal */ export namespace MarkUnplayedErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace MarkUnplayedErrors$ { /** @internal */ export namespace MarkUnplayedResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => MarkUnplayedErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/performsearch.ts b/src/models/errors/performsearch.ts index 5c14e61d..f9ff9081 100644 --- a/src/models/errors/performsearch.ts +++ b/src/models/errors/performsearch.ts @@ -56,13 +56,7 @@ export class PerformSearchResponseBody extends Error { /** @internal */ export namespace PerformSearchErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace PerformSearchErrors$ { /** @internal */ export namespace PerformSearchResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => PerformSearchErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/performvoicesearch.ts b/src/models/errors/performvoicesearch.ts index 6d086c8b..16c12749 100644 --- a/src/models/errors/performvoicesearch.ts +++ b/src/models/errors/performvoicesearch.ts @@ -56,13 +56,7 @@ export class PerformVoiceSearchResponseBody extends Error { /** @internal */ export namespace PerformVoiceSearchErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace PerformVoiceSearchErrors$ { /** @internal */ export namespace PerformVoiceSearchResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => PerformVoiceSearchErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/refreshlibrary.ts b/src/models/errors/refreshlibrary.ts index 9521ae3d..4f64c8bf 100644 --- a/src/models/errors/refreshlibrary.ts +++ b/src/models/errors/refreshlibrary.ts @@ -56,13 +56,7 @@ export class RefreshLibraryResponseBody extends Error { /** @internal */ export namespace RefreshLibraryErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace RefreshLibraryErrors$ { /** @internal */ export namespace RefreshLibraryResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => RefreshLibraryErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/searchlibrary.ts b/src/models/errors/searchlibrary.ts new file mode 100644 index 00000000..91efe99e --- /dev/null +++ b/src/models/errors/searchlibrary.ts @@ -0,0 +1,134 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type SearchLibraryErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type SearchLibraryResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class SearchLibraryResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: SearchLibraryResponseBodyData; + + constructor(err: SearchLibraryResponseBodyData) { + super(""); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + this.message = + "message" in err && typeof err.message === "string" + ? err.message + : "API error occurred"; + + this.name = "SearchLibraryResponseBody"; + } +} + +/** @internal */ +export namespace SearchLibraryErrors$ { + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace SearchLibraryResponseBody$ { + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => SearchLibraryErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new SearchLibraryResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(SearchLibraryResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => SearchLibraryErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/startalltasks.ts b/src/models/errors/startalltasks.ts index c4be9f94..fd49c696 100644 --- a/src/models/errors/startalltasks.ts +++ b/src/models/errors/startalltasks.ts @@ -56,13 +56,7 @@ export class StartAllTasksResponseBody extends Error { /** @internal */ export namespace StartAllTasksErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace StartAllTasksErrors$ { /** @internal */ export namespace StartAllTasksResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => StartAllTasksErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/starttask.ts b/src/models/errors/starttask.ts index 5a1d01f5..9bd540b7 100644 --- a/src/models/errors/starttask.ts +++ b/src/models/errors/starttask.ts @@ -56,13 +56,7 @@ export class StartTaskResponseBody extends Error { /** @internal */ export namespace StartTaskErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace StartTaskErrors$ { /** @internal */ export namespace StartTaskResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => StartTaskErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/startuniversaltranscode.ts b/src/models/errors/startuniversaltranscode.ts index 8e507966..6877d048 100644 --- a/src/models/errors/startuniversaltranscode.ts +++ b/src/models/errors/startuniversaltranscode.ts @@ -56,13 +56,7 @@ export class StartUniversalTranscodeResponseBody extends Error { /** @internal */ export namespace StartUniversalTranscodeErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -100,15 +94,10 @@ export namespace StartUniversalTranscodeErrors$ { /** @internal */ export namespace StartUniversalTranscodeResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - export const inboundSchema: z.ZodType< StartUniversalTranscodeResponseBody, z.ZodTypeDef, - Inbound + unknown > = z .object({ errors: z.array(z.lazy(() => StartUniversalTranscodeErrors$.inboundSchema)).optional(), diff --git a/src/models/errors/stopalltasks.ts b/src/models/errors/stopalltasks.ts index f7fa133b..880600a3 100644 --- a/src/models/errors/stopalltasks.ts +++ b/src/models/errors/stopalltasks.ts @@ -56,13 +56,7 @@ export class StopAllTasksResponseBody extends Error { /** @internal */ export namespace StopAllTasksErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace StopAllTasksErrors$ { /** @internal */ export namespace StopAllTasksResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => StopAllTasksErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/stoptask.ts b/src/models/errors/stoptask.ts index b2e24eea..002ca3e2 100644 --- a/src/models/errors/stoptask.ts +++ b/src/models/errors/stoptask.ts @@ -56,13 +56,7 @@ export class StopTaskResponseBody extends Error { /** @internal */ export namespace StopTaskErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace StopTaskErrors$ { /** @internal */ export namespace StopTaskResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => StopTaskErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/stoptranscodesession.ts b/src/models/errors/stoptranscodesession.ts index 3c14109b..5f391c27 100644 --- a/src/models/errors/stoptranscodesession.ts +++ b/src/models/errors/stoptranscodesession.ts @@ -56,13 +56,7 @@ export class StopTranscodeSessionResponseBody extends Error { /** @internal */ export namespace StopTranscodeSessionErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace StopTranscodeSessionErrors$ { /** @internal */ export namespace StopTranscodeSessionResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => StopTranscodeSessionErrors$.inboundSchema)).optional(), diff --git a/src/models/errors/updateplaylist.ts b/src/models/errors/updateplaylist.ts index 7c7400f2..b97270b5 100644 --- a/src/models/errors/updateplaylist.ts +++ b/src/models/errors/updateplaylist.ts @@ -56,13 +56,7 @@ export class UpdatePlaylistResponseBody extends Error { /** @internal */ export namespace UpdatePlaylistErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace UpdatePlaylistErrors$ { /** @internal */ export namespace UpdatePlaylistResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => UpdatePlaylistErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/updateplayprogress.ts b/src/models/errors/updateplayprogress.ts index 24c9f4e6..862cabdd 100644 --- a/src/models/errors/updateplayprogress.ts +++ b/src/models/errors/updateplayprogress.ts @@ -56,13 +56,7 @@ export class UpdatePlayProgressResponseBody extends Error { /** @internal */ export namespace UpdatePlayProgressErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace UpdatePlayProgressErrors$ { /** @internal */ export namespace UpdatePlayProgressResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => UpdatePlayProgressErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/errors/uploadplaylist.ts b/src/models/errors/uploadplaylist.ts index b013735d..64d8819d 100644 --- a/src/models/errors/uploadplaylist.ts +++ b/src/models/errors/uploadplaylist.ts @@ -56,13 +56,7 @@ export class UploadPlaylistResponseBody extends Error { /** @internal */ export namespace UploadPlaylistErrors$ { - export type Inbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.number().optional(), message: z.string().optional(), @@ -99,12 +93,7 @@ export namespace UploadPlaylistErrors$ { /** @internal */ export namespace UploadPlaylistResponseBody$ { - export type Inbound = { - errors?: Array | undefined; - RawResponse?: Response | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ errors: z.array(z.lazy(() => UploadPlaylistErrors$.inboundSchema)).optional(), RawResponse: z.instanceof(Response).optional(), diff --git a/src/models/operations/addplaylistcontents.ts b/src/models/operations/addplaylistcontents.ts index 90f5c7bd..1059c8da 100644 --- a/src/models/operations/addplaylistcontents.ts +++ b/src/models/operations/addplaylistcontents.ts @@ -70,13 +70,7 @@ export type AddPlaylistContentsResponse = { /** @internal */ export namespace AddPlaylistContentsRequest$ { - export type Inbound = { - playlistID: number; - uri: string; - playQueueID?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ playlistID: z.number(), uri: z.string(), @@ -113,23 +107,7 @@ export namespace AddPlaylistContentsRequest$ { /** @internal */ export namespace AddPlaylistContentsMetadata$ { - export type Inbound = { - ratingKey?: string | undefined; - key?: string | undefined; - guid?: string | undefined; - type?: string | undefined; - title?: string | undefined; - summary?: string | undefined; - smart?: boolean | undefined; - playlistType?: string | undefined; - composite?: string | undefined; - duration?: number | undefined; - leafCount?: number | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ratingKey: z.string().optional(), key: z.string().optional(), @@ -216,17 +194,10 @@ export namespace AddPlaylistContentsMetadata$ { /** @internal */ export namespace AddPlaylistContentsMediaContainer$ { - export type Inbound = { - size?: number | undefined; - leafCountAdded?: number | undefined; - leafCountRequested?: number | undefined; - Metadata?: Array | undefined; - }; - export const inboundSchema: z.ZodType< AddPlaylistContentsMediaContainer, z.ZodTypeDef, - Inbound + unknown > = z .object({ size: z.number().int().optional(), @@ -277,11 +248,7 @@ export namespace AddPlaylistContentsMediaContainer$ { /** @internal */ export namespace AddPlaylistContentsResponseBody$ { - export type Inbound = { - MediaContainer?: AddPlaylistContentsMediaContainer$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = + export const inboundSchema: z.ZodType = z .object({ MediaContainer: z @@ -319,14 +286,7 @@ export namespace AddPlaylistContentsResponseBody$ { /** @internal */ export namespace AddPlaylistContentsResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: AddPlaylistContentsResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/applyupdates.ts b/src/models/operations/applyupdates.ts index 76d9fdb7..fe9932c4 100644 --- a/src/models/operations/applyupdates.ts +++ b/src/models/operations/applyupdates.ts @@ -47,22 +47,23 @@ export type ApplyUpdatesResponse = { }; /** @internal */ -export const Tonight$: z.ZodNativeEnum = z.nativeEnum(Tonight); +export namespace Tonight$ { + export const inboundSchema = z.nativeEnum(Tonight); + export const outboundSchema = inboundSchema; +} /** @internal */ -export const Skip$: z.ZodNativeEnum = z.nativeEnum(Skip); +export namespace Skip$ { + export const inboundSchema = z.nativeEnum(Skip); + export const outboundSchema = inboundSchema; +} /** @internal */ export namespace ApplyUpdatesRequest$ { - export type Inbound = { - tonight?: Tonight | undefined; - skip?: Skip | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ - tonight: Tonight$.optional(), - skip: Skip$.optional(), + tonight: Tonight$.inboundSchema.optional(), + skip: Skip$.inboundSchema.optional(), }) .transform((v) => { return { @@ -72,14 +73,14 @@ export namespace ApplyUpdatesRequest$ { }); export type Outbound = { - tonight?: Tonight | undefined; - skip?: Skip | undefined; + tonight?: number | undefined; + skip?: number | undefined; }; export const outboundSchema: z.ZodType = z .object({ - tonight: Tonight$.optional(), - skip: Skip$.optional(), + tonight: Tonight$.outboundSchema.optional(), + skip: Skip$.outboundSchema.optional(), }) .transform((v) => { return { @@ -91,13 +92,7 @@ export namespace ApplyUpdatesRequest$ { /** @internal */ export namespace ApplyUpdatesResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/cancelserveractivities.ts b/src/models/operations/cancelserveractivities.ts index ca4e60ff..c430c7b5 100644 --- a/src/models/operations/cancelserveractivities.ts +++ b/src/models/operations/cancelserveractivities.ts @@ -28,11 +28,7 @@ export type CancelServerActivitiesResponse = { /** @internal */ export namespace CancelServerActivitiesRequest$ { - export type Inbound = { - activityUUID: string; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ activityUUID: z.string(), }) @@ -60,13 +56,7 @@ export namespace CancelServerActivitiesRequest$ { /** @internal */ export namespace CancelServerActivitiesResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/checkforupdates.ts b/src/models/operations/checkforupdates.ts index e1522ee3..e4fb420c 100644 --- a/src/models/operations/checkforupdates.ts +++ b/src/models/operations/checkforupdates.ts @@ -35,17 +35,16 @@ export type CheckForUpdatesResponse = { }; /** @internal */ -export const Download$: z.ZodNativeEnum = z.nativeEnum(Download); +export namespace Download$ { + export const inboundSchema = z.nativeEnum(Download); + export const outboundSchema = inboundSchema; +} /** @internal */ export namespace CheckForUpdatesRequest$ { - export type Inbound = { - download?: Download | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ - download: Download$.optional(), + download: Download$.inboundSchema.optional(), }) .transform((v) => { return { @@ -54,12 +53,12 @@ export namespace CheckForUpdatesRequest$ { }); export type Outbound = { - download?: Download | undefined; + download?: number | undefined; }; export const outboundSchema: z.ZodType = z .object({ - download: Download$.optional(), + download: Download$.outboundSchema.optional(), }) .transform((v) => { return { @@ -70,13 +69,7 @@ export namespace CheckForUpdatesRequest$ { /** @internal */ export namespace CheckForUpdatesResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/clearplaylistcontents.ts b/src/models/operations/clearplaylistcontents.ts index f5d71b09..948b000f 100644 --- a/src/models/operations/clearplaylistcontents.ts +++ b/src/models/operations/clearplaylistcontents.ts @@ -28,11 +28,7 @@ export type ClearPlaylistContentsResponse = { /** @internal */ export namespace ClearPlaylistContentsRequest$ { - export type Inbound = { - playlistID: number; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ playlistID: z.number(), }) @@ -59,13 +55,7 @@ export namespace ClearPlaylistContentsRequest$ { /** @internal */ export namespace ClearPlaylistContentsResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/createplaylist.ts b/src/models/operations/createplaylist.ts index 0c8a59fd..45614148 100644 --- a/src/models/operations/createplaylist.ts +++ b/src/models/operations/createplaylist.ts @@ -95,26 +95,24 @@ export type CreatePlaylistResponse = { }; /** @internal */ -export const QueryParamType$: z.ZodNativeEnum = z.nativeEnum(QueryParamType); +export namespace QueryParamType$ { + export const inboundSchema = z.nativeEnum(QueryParamType); + export const outboundSchema = inboundSchema; +} /** @internal */ -export const Smart$: z.ZodNativeEnum = z.nativeEnum(Smart); +export namespace Smart$ { + export const inboundSchema = z.nativeEnum(Smart); + export const outboundSchema = inboundSchema; +} /** @internal */ export namespace CreatePlaylistRequest$ { - export type Inbound = { - title: string; - type: QueryParamType; - smart: Smart; - uri: string; - playQueueID?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ title: z.string(), - type: QueryParamType$, - smart: Smart$, + type: QueryParamType$.inboundSchema, + smart: Smart$.inboundSchema, uri: z.string(), playQueueID: z.number().optional(), }) @@ -130,8 +128,8 @@ export namespace CreatePlaylistRequest$ { export type Outbound = { title: string; - type: QueryParamType; - smart: Smart; + type: string; + smart: number; uri: string; playQueueID?: number | undefined; }; @@ -139,8 +137,8 @@ export namespace CreatePlaylistRequest$ { export const outboundSchema: z.ZodType = z .object({ title: z.string(), - type: QueryParamType$, - smart: Smart$, + type: QueryParamType$.outboundSchema, + smart: Smart$.outboundSchema, uri: z.string(), playQueueID: z.number().optional(), }) @@ -157,26 +155,7 @@ export namespace CreatePlaylistRequest$ { /** @internal */ export namespace CreatePlaylistMetadata$ { - export type Inbound = { - ratingKey?: string | undefined; - key?: string | undefined; - guid?: string | undefined; - type?: string | undefined; - title?: string | undefined; - summary?: string | undefined; - smart?: boolean | undefined; - playlistType?: string | undefined; - icon?: string | undefined; - viewCount?: number | undefined; - lastViewedAt?: number | undefined; - leafCount?: number | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - composite?: string | undefined; - duration?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ratingKey: z.string().optional(), key: z.string().optional(), @@ -278,12 +257,7 @@ export namespace CreatePlaylistMetadata$ { /** @internal */ export namespace CreatePlaylistMediaContainer$ { - export type Inbound = { - size?: number | undefined; - Metadata?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ size: z.number().int().optional(), Metadata: z.array(z.lazy(() => CreatePlaylistMetadata$.inboundSchema)).optional(), @@ -315,11 +289,7 @@ export namespace CreatePlaylistMediaContainer$ { /** @internal */ export namespace CreatePlaylistResponseBody$ { - export type Inbound = { - MediaContainer?: CreatePlaylistMediaContainer$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ MediaContainer: z.lazy(() => CreatePlaylistMediaContainer$.inboundSchema).optional(), }) @@ -346,14 +316,7 @@ export namespace CreatePlaylistResponseBody$ { /** @internal */ export namespace CreatePlaylistResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: CreatePlaylistResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/deletelibrary.ts b/src/models/operations/deletelibrary.ts index ab695468..456d964d 100644 --- a/src/models/operations/deletelibrary.ts +++ b/src/models/operations/deletelibrary.ts @@ -28,11 +28,7 @@ export type DeleteLibraryResponse = { /** @internal */ export namespace DeleteLibraryRequest$ { - export type Inbound = { - sectionId: number; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ sectionId: z.number(), }) @@ -59,13 +55,7 @@ export namespace DeleteLibraryRequest$ { /** @internal */ export namespace DeleteLibraryResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/deleteplaylist.ts b/src/models/operations/deleteplaylist.ts index 4539c925..f1b36308 100644 --- a/src/models/operations/deleteplaylist.ts +++ b/src/models/operations/deleteplaylist.ts @@ -28,11 +28,7 @@ export type DeletePlaylistResponse = { /** @internal */ export namespace DeletePlaylistRequest$ { - export type Inbound = { - playlistID: number; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ playlistID: z.number(), }) @@ -59,13 +55,7 @@ export namespace DeletePlaylistRequest$ { /** @internal */ export namespace DeletePlaylistResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/enablepapertrail.ts b/src/models/operations/enablepapertrail.ts index f4e13dd8..88f9dfce 100644 --- a/src/models/operations/enablepapertrail.ts +++ b/src/models/operations/enablepapertrail.ts @@ -21,13 +21,7 @@ export type EnablePaperTrailResponse = { /** @internal */ export namespace EnablePaperTrailResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/getavailableclients.ts b/src/models/operations/getavailableclients.ts index c8e8c3db..479331c3 100644 --- a/src/models/operations/getavailableclients.ts +++ b/src/models/operations/getavailableclients.ts @@ -51,21 +51,7 @@ export type GetAvailableClientsResponse = { /** @internal */ export namespace Server$ { - export type Inbound = { - name?: string | undefined; - host?: string | undefined; - address?: string | undefined; - port?: number | undefined; - machineIdentifier?: string | undefined; - version?: string | undefined; - protocol?: string | undefined; - product?: string | undefined; - deviceClass?: string | undefined; - protocolVersion?: number | undefined; - protocolCapabilities?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ name: z.string().optional(), host: z.string().optional(), @@ -154,15 +140,10 @@ export namespace Server$ { /** @internal */ export namespace GetAvailableClientsMediaContainer$ { - export type Inbound = { - size?: number | undefined; - Server?: Array | undefined; - }; - export const inboundSchema: z.ZodType< GetAvailableClientsMediaContainer, z.ZodTypeDef, - Inbound + unknown > = z .object({ size: z.number().optional(), @@ -199,11 +180,7 @@ export namespace GetAvailableClientsMediaContainer$ { /** @internal */ export namespace GetAvailableClientsResponseBody$ { - export type Inbound = { - MediaContainer?: GetAvailableClientsMediaContainer$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = + export const inboundSchema: z.ZodType = z .object({ MediaContainer: z @@ -241,14 +218,7 @@ export namespace GetAvailableClientsResponseBody$ { /** @internal */ export namespace GetAvailableClientsResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: GetAvailableClientsResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/getbutlertasks.ts b/src/models/operations/getbutlertasks.ts index b868a297..a5f4a66d 100644 --- a/src/models/operations/getbutlertasks.ts +++ b/src/models/operations/getbutlertasks.ts @@ -45,16 +45,7 @@ export type GetButlerTasksResponse = { /** @internal */ export namespace ButlerTask$ { - export type Inbound = { - name?: string | undefined; - interval?: number | undefined; - scheduleRandomized?: boolean | undefined; - enabled?: boolean | undefined; - title?: string | undefined; - description?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ name: z.string().optional(), interval: z.number().optional(), @@ -110,11 +101,7 @@ export namespace ButlerTask$ { /** @internal */ export namespace ButlerTasks$ { - export type Inbound = { - ButlerTask?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ButlerTask: z.array(z.lazy(() => ButlerTask$.inboundSchema)).optional(), }) @@ -141,11 +128,7 @@ export namespace ButlerTasks$ { /** @internal */ export namespace GetButlerTasksResponseBody$ { - export type Inbound = { - ButlerTasks?: ButlerTasks$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ButlerTasks: z.lazy(() => ButlerTasks$.inboundSchema).optional(), }) @@ -172,14 +155,7 @@ export namespace GetButlerTasksResponseBody$ { /** @internal */ export namespace GetButlerTasksResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: GetButlerTasksResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/getdevices.ts b/src/models/operations/getdevices.ts index 11ec9782..d9ce5f96 100644 --- a/src/models/operations/getdevices.ts +++ b/src/models/operations/getdevices.ts @@ -46,15 +46,7 @@ export type GetDevicesResponse = { /** @internal */ export namespace Device$ { - export type Inbound = { - id?: number | undefined; - name?: string | undefined; - platform?: string | undefined; - clientIdentifier?: string | undefined; - createdAt?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.number().optional(), name: z.string().optional(), @@ -105,13 +97,7 @@ export namespace Device$ { /** @internal */ export namespace GetDevicesMediaContainer$ { - export type Inbound = { - size?: number | undefined; - identifier?: string | undefined; - Device?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ size: z.number().optional(), identifier: z.string().optional(), @@ -148,11 +134,7 @@ export namespace GetDevicesMediaContainer$ { /** @internal */ export namespace GetDevicesResponseBody$ { - export type Inbound = { - MediaContainer?: GetDevicesMediaContainer$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ MediaContainer: z.lazy(() => GetDevicesMediaContainer$.inboundSchema).optional(), }) @@ -179,14 +161,7 @@ export namespace GetDevicesResponseBody$ { /** @internal */ export namespace GetDevicesResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: GetDevicesResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/getfilehash.ts b/src/models/operations/getfilehash.ts index 402b9ac8..4eae6053 100644 --- a/src/models/operations/getfilehash.ts +++ b/src/models/operations/getfilehash.ts @@ -32,12 +32,7 @@ export type GetFileHashResponse = { /** @internal */ export namespace GetFileHashRequest$ { - export type Inbound = { - url: string; - type?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ url: z.string(), type: z.number().optional(), @@ -69,13 +64,7 @@ export namespace GetFileHashRequest$ { /** @internal */ export namespace GetFileHashResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/getglobalhubs.ts b/src/models/operations/getglobalhubs.ts index 3340d5c1..b7bfa3f3 100644 --- a/src/models/operations/getglobalhubs.ts +++ b/src/models/operations/getglobalhubs.ts @@ -91,19 +91,17 @@ export type GetGlobalHubsResponse = { }; /** @internal */ -export const OnlyTransient$: z.ZodNativeEnum = z.nativeEnum(OnlyTransient); +export namespace OnlyTransient$ { + export const inboundSchema = z.nativeEnum(OnlyTransient); + export const outboundSchema = inboundSchema; +} /** @internal */ export namespace GetGlobalHubsRequest$ { - export type Inbound = { - count?: number | undefined; - onlyTransient?: OnlyTransient | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ count: z.number().optional(), - onlyTransient: OnlyTransient$.optional(), + onlyTransient: OnlyTransient$.inboundSchema.optional(), }) .transform((v) => { return { @@ -114,13 +112,13 @@ export namespace GetGlobalHubsRequest$ { export type Outbound = { count?: number | undefined; - onlyTransient?: OnlyTransient | undefined; + onlyTransient?: number | undefined; }; export const outboundSchema: z.ZodType = z .object({ count: z.number().optional(), - onlyTransient: OnlyTransient$.optional(), + onlyTransient: OnlyTransient$.outboundSchema.optional(), }) .transform((v) => { return { @@ -132,27 +130,7 @@ export namespace GetGlobalHubsRequest$ { /** @internal */ export namespace GetGlobalHubsMetadata$ { - export type Inbound = { - ratingKey?: string | undefined; - key?: string | undefined; - guid?: string | undefined; - type?: string | undefined; - title?: string | undefined; - titleSort?: string | undefined; - summary?: string | undefined; - smart?: boolean | undefined; - playlistType?: string | undefined; - composite?: string | undefined; - icon?: string | undefined; - viewCount?: number | undefined; - lastViewedAt?: number | undefined; - duration?: number | undefined; - leafCount?: number | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ratingKey: z.string().optional(), key: z.string().optional(), @@ -259,21 +237,7 @@ export namespace GetGlobalHubsMetadata$ { /** @internal */ export namespace Hub$ { - export type Inbound = { - hubKey?: string | undefined; - key?: string | undefined; - title?: string | undefined; - type?: string | undefined; - hubIdentifier?: string | undefined; - context?: string | undefined; - size?: number | undefined; - more?: boolean | undefined; - style?: string | undefined; - promoted?: boolean | undefined; - Metadata?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ hubKey: z.string().optional(), key: z.string().optional(), @@ -350,14 +314,7 @@ export namespace Hub$ { /** @internal */ export namespace GetGlobalHubsMediaContainer$ { - export type Inbound = { - size?: number | undefined; - allowSync?: boolean | undefined; - identifier?: string | undefined; - Hub?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ size: z.number().int().optional(), allowSync: z.boolean().optional(), @@ -399,11 +356,7 @@ export namespace GetGlobalHubsMediaContainer$ { /** @internal */ export namespace GetGlobalHubsResponseBody$ { - export type Inbound = { - MediaContainer?: GetGlobalHubsMediaContainer$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ MediaContainer: z.lazy(() => GetGlobalHubsMediaContainer$.inboundSchema).optional(), }) @@ -430,14 +383,7 @@ export namespace GetGlobalHubsResponseBody$ { /** @internal */ export namespace GetGlobalHubsResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: GetGlobalHubsResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/getlibraries.ts b/src/models/operations/getlibraries.ts index 441bcb0f..fbde051a 100644 --- a/src/models/operations/getlibraries.ts +++ b/src/models/operations/getlibraries.ts @@ -68,12 +68,7 @@ export type GetLibrariesResponse = { /** @internal */ export namespace GetLibrariesLocation$ { - export type Inbound = { - id?: number | undefined; - path?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.number().int().optional(), path: z.string().optional(), @@ -105,31 +100,7 @@ export namespace GetLibrariesLocation$ { /** @internal */ export namespace GetLibrariesDirectory$ { - export type Inbound = { - allowSync?: boolean | undefined; - art?: string | undefined; - composite?: string | undefined; - filters?: boolean | undefined; - refreshing?: boolean | undefined; - thumb?: string | undefined; - key?: string | undefined; - type?: string | undefined; - title?: string | undefined; - agent?: string | undefined; - scanner?: string | undefined; - language?: string | undefined; - uuid?: string | undefined; - updatedAt?: number | undefined; - createdAt?: number | undefined; - scannedAt?: number | undefined; - content?: boolean | undefined; - directory?: boolean | undefined; - contentChangedAt?: number | undefined; - hidden?: number | undefined; - Location?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ allowSync: z.boolean().optional(), art: z.string().optional(), @@ -260,14 +231,7 @@ export namespace GetLibrariesDirectory$ { /** @internal */ export namespace GetLibrariesMediaContainer$ { - export type Inbound = { - size?: number | undefined; - allowSync?: boolean | undefined; - title1?: string | undefined; - Directory?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ size: z.number().int().optional(), allowSync: z.boolean().optional(), @@ -309,11 +273,7 @@ export namespace GetLibrariesMediaContainer$ { /** @internal */ export namespace GetLibrariesResponseBody$ { - export type Inbound = { - MediaContainer?: GetLibrariesMediaContainer$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ MediaContainer: z.lazy(() => GetLibrariesMediaContainer$.inboundSchema).optional(), }) @@ -340,14 +300,7 @@ export namespace GetLibrariesResponseBody$ { /** @internal */ export namespace GetLibrariesResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: GetLibrariesResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/getlibrary.ts b/src/models/operations/getlibrary.ts index e0ef43b2..f5fbecc7 100644 --- a/src/models/operations/getlibrary.ts +++ b/src/models/operations/getlibrary.ts @@ -128,19 +128,17 @@ export type GetLibraryResponse = { }; /** @internal */ -export const IncludeDetails$: z.ZodNativeEnum = z.nativeEnum(IncludeDetails); +export namespace IncludeDetails$ { + export const inboundSchema = z.nativeEnum(IncludeDetails); + export const outboundSchema = inboundSchema; +} /** @internal */ export namespace GetLibraryRequest$ { - export type Inbound = { - sectionId: number; - includeDetails?: IncludeDetails | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ sectionId: z.number(), - includeDetails: IncludeDetails$.default(IncludeDetails.Zero), + includeDetails: IncludeDetails$.inboundSchema.default(IncludeDetails.Zero), }) .transform((v) => { return { @@ -151,13 +149,13 @@ export namespace GetLibraryRequest$ { export type Outbound = { sectionId: number; - includeDetails: IncludeDetails; + includeDetails: number; }; export const outboundSchema: z.ZodType = z .object({ sectionId: z.number(), - includeDetails: IncludeDetails$.default(IncludeDetails.Zero), + includeDetails: IncludeDetails$.outboundSchema.default(IncludeDetails.Zero), }) .transform((v) => { return { @@ -169,15 +167,7 @@ export namespace GetLibraryRequest$ { /** @internal */ export namespace GetLibraryDirectory$ { - export type Inbound = { - key?: string | undefined; - title?: string | undefined; - secondary?: boolean | undefined; - prompt?: string | undefined; - search?: boolean | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ key: z.string().optional(), title: z.string().optional(), @@ -224,15 +214,7 @@ export namespace GetLibraryDirectory$ { /** @internal */ export namespace Filter$ { - export type Inbound = { - filter?: string | undefined; - filterType?: string | undefined; - key?: string | undefined; - title?: string | undefined; - type?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ filter: z.string().optional(), filterType: z.string().optional(), @@ -279,16 +261,7 @@ export namespace Filter$ { /** @internal */ export namespace Sort$ { - export type Inbound = { - default?: string | undefined; - defaultDirection?: string | undefined; - descKey?: string | undefined; - firstCharacterKey?: string | undefined; - key?: string | undefined; - title?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ default: z.string().optional(), defaultDirection: z.string().optional(), @@ -348,14 +321,7 @@ export namespace Sort$ { /** @internal */ export namespace Field$ { - export type Inbound = { - key?: string | undefined; - title?: string | undefined; - type?: string | undefined; - subType?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ key: z.string().optional(), title: z.string().optional(), @@ -397,17 +363,7 @@ export namespace Field$ { /** @internal */ export namespace GetLibraryType$ { - export type Inbound = { - key?: string | undefined; - type?: string | undefined; - title?: string | undefined; - active?: boolean | undefined; - Filter?: Array | undefined; - Sort?: Array | undefined; - Field?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ key: z.string().optional(), type: z.string().optional(), @@ -464,12 +420,7 @@ export namespace GetLibraryType$ { /** @internal */ export namespace Operator$ { - export type Inbound = { - key?: string | undefined; - title?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ key: z.string().optional(), title: z.string().optional(), @@ -501,12 +452,7 @@ export namespace Operator$ { /** @internal */ export namespace FieldType$ { - export type Inbound = { - type?: string | undefined; - Operator?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ type: z.string().optional(), Operator: z.array(z.lazy(() => Operator$.inboundSchema)).optional(), @@ -538,25 +484,7 @@ export namespace FieldType$ { /** @internal */ export namespace GetLibraryMediaContainer$ { - export type Inbound = { - size?: number | undefined; - allowSync?: boolean | undefined; - art?: string | undefined; - content?: string | undefined; - identifier?: string | undefined; - librarySectionID?: number | undefined; - mediaTagPrefix?: string | undefined; - mediaTagVersion?: number | undefined; - thumb?: string | undefined; - title1?: string | undefined; - viewGroup?: string | undefined; - viewMode?: number | undefined; - Directory?: Array | undefined; - Type?: Array | undefined; - FieldType?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ size: z.number().int().optional(), allowSync: z.boolean().optional(), @@ -661,11 +589,7 @@ export namespace GetLibraryMediaContainer$ { /** @internal */ export namespace GetLibraryResponseBody$ { - export type Inbound = { - MediaContainer?: GetLibraryMediaContainer$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ MediaContainer: z.lazy(() => GetLibraryMediaContainer$.inboundSchema).optional(), }) @@ -692,14 +616,7 @@ export namespace GetLibraryResponseBody$ { /** @internal */ export namespace GetLibraryResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: GetLibraryResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/getlibraryhubs.ts b/src/models/operations/getlibraryhubs.ts index 193940ef..512e6a80 100644 --- a/src/models/operations/getlibraryhubs.ts +++ b/src/models/operations/getlibraryhubs.ts @@ -170,22 +170,18 @@ export type GetLibraryHubsResponse = { }; /** @internal */ -export const QueryParamOnlyTransient$: z.ZodNativeEnum = - z.nativeEnum(QueryParamOnlyTransient); +export namespace QueryParamOnlyTransient$ { + export const inboundSchema = z.nativeEnum(QueryParamOnlyTransient); + export const outboundSchema = inboundSchema; +} /** @internal */ export namespace GetLibraryHubsRequest$ { - export type Inbound = { - sectionId: number; - count?: number | undefined; - onlyTransient?: QueryParamOnlyTransient | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ sectionId: z.number(), count: z.number().optional(), - onlyTransient: QueryParamOnlyTransient$.optional(), + onlyTransient: QueryParamOnlyTransient$.inboundSchema.optional(), }) .transform((v) => { return { @@ -198,14 +194,14 @@ export namespace GetLibraryHubsRequest$ { export type Outbound = { sectionId: number; count?: number | undefined; - onlyTransient?: QueryParamOnlyTransient | undefined; + onlyTransient?: number | undefined; }; export const outboundSchema: z.ZodType = z .object({ sectionId: z.number(), count: z.number().optional(), - onlyTransient: QueryParamOnlyTransient$.optional(), + onlyTransient: QueryParamOnlyTransient$.outboundSchema.optional(), }) .transform((v) => { return { @@ -218,20 +214,7 @@ export namespace GetLibraryHubsRequest$ { /** @internal */ export namespace GetLibraryHubsPart$ { - export type Inbound = { - id?: number | undefined; - key?: string | undefined; - duration?: number | undefined; - file?: string | undefined; - size?: number | undefined; - audioProfile?: string | undefined; - container?: string | undefined; - has64bitOffsets?: boolean | undefined; - optimizedForStreaming?: boolean | undefined; - videoProfile?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.number().int().optional(), key: z.string().optional(), @@ -311,27 +294,7 @@ export namespace GetLibraryHubsPart$ { /** @internal */ export namespace GetLibraryHubsMedia$ { - export type Inbound = { - id?: number | undefined; - duration?: number | undefined; - bitrate?: number | undefined; - width?: number | undefined; - height?: number | undefined; - aspectRatio?: number | undefined; - audioChannels?: number | undefined; - audioCodec?: string | undefined; - videoCodec?: string | undefined; - videoResolution?: string | undefined; - container?: string | undefined; - videoFrameRate?: string | undefined; - optimizedForStreaming?: number | undefined; - audioProfile?: string | undefined; - has64bitOffsets?: boolean | undefined; - videoProfile?: string | undefined; - Part?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.number().int().optional(), duration: z.number().int().optional(), @@ -450,11 +413,7 @@ export namespace GetLibraryHubsMedia$ { /** @internal */ export namespace GetLibraryHubsGenre$ { - export type Inbound = { - tag?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ tag: z.string().optional(), }) @@ -481,11 +440,7 @@ export namespace GetLibraryHubsGenre$ { /** @internal */ export namespace GetLibraryHubsCountry$ { - export type Inbound = { - tag?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ tag: z.string().optional(), }) @@ -512,11 +467,7 @@ export namespace GetLibraryHubsCountry$ { /** @internal */ export namespace GetLibraryHubsDirector$ { - export type Inbound = { - tag?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ tag: z.string().optional(), }) @@ -543,11 +494,7 @@ export namespace GetLibraryHubsDirector$ { /** @internal */ export namespace GetLibraryHubsRole$ { - export type Inbound = { - tag?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ tag: z.string().optional(), }) @@ -574,11 +521,7 @@ export namespace GetLibraryHubsRole$ { /** @internal */ export namespace GetLibraryHubsWriter$ { - export type Inbound = { - tag?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ tag: z.string().optional(), }) @@ -605,44 +548,7 @@ export namespace GetLibraryHubsWriter$ { /** @internal */ export namespace GetLibraryHubsMetadata$ { - export type Inbound = { - ratingKey?: string | undefined; - key?: string | undefined; - guid?: string | undefined; - studio?: string | undefined; - type?: string | undefined; - title?: string | undefined; - librarySectionTitle?: string | undefined; - librarySectionID?: number | undefined; - librarySectionKey?: string | undefined; - contentRating?: string | undefined; - summary?: string | undefined; - rating?: number | undefined; - audienceRating?: number | undefined; - viewCount?: number | undefined; - lastViewedAt?: number | undefined; - year?: number | undefined; - tagline?: string | undefined; - thumb?: string | undefined; - art?: string | undefined; - duration?: number | undefined; - originallyAvailableAt?: string | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - audienceRatingImage?: string | undefined; - primaryExtraKey?: string | undefined; - ratingImage?: string | undefined; - Media?: Array | undefined; - Genre?: Array | undefined; - Country?: Array | undefined; - Director?: Array | undefined; - Role?: Array | undefined; - Writer?: Array | undefined; - skipCount?: number | undefined; - chapterSource?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ratingKey: z.string().optional(), key: z.string().optional(), @@ -864,22 +770,7 @@ export namespace GetLibraryHubsMetadata$ { /** @internal */ export namespace GetLibraryHubsHub$ { - export type Inbound = { - key?: string | undefined; - title?: string | undefined; - type?: string | undefined; - hubIdentifier?: string | undefined; - context?: string | undefined; - size?: number | undefined; - more?: boolean | undefined; - style?: string | undefined; - hubKey?: string | undefined; - Metadata?: Array | undefined; - promoted?: boolean | undefined; - random?: boolean | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ key: z.string().optional(), title: z.string().optional(), @@ -961,17 +852,7 @@ export namespace GetLibraryHubsHub$ { /** @internal */ export namespace GetLibraryHubsMediaContainer$ { - export type Inbound = { - size?: number | undefined; - allowSync?: boolean | undefined; - identifier?: string | undefined; - librarySectionID?: number | undefined; - librarySectionTitle?: string | undefined; - librarySectionUUID?: string | undefined; - Hub?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ size: z.number().int().optional(), allowSync: z.boolean().optional(), @@ -1040,11 +921,7 @@ export namespace GetLibraryHubsMediaContainer$ { /** @internal */ export namespace GetLibraryHubsResponseBody$ { - export type Inbound = { - MediaContainer?: GetLibraryHubsMediaContainer$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ MediaContainer: z.lazy(() => GetLibraryHubsMediaContainer$.inboundSchema).optional(), }) @@ -1071,14 +948,7 @@ export namespace GetLibraryHubsResponseBody$ { /** @internal */ export namespace GetLibraryHubsResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: GetLibraryHubsResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/getlibraryitems.ts b/src/models/operations/getlibraryitems.ts new file mode 100644 index 00000000..be53836e --- /dev/null +++ b/src/models/operations/getlibraryitems.ts @@ -0,0 +1,1073 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { RFCDate } from "../../types"; +import * as z from "zod"; + +/** + * A key representing a specific tag within the section. + */ +export enum Tag { + All = "all", + Unwatched = "unwatched", + Newest = "newest", + RecentlyAdded = "recentlyAdded", + RecentlyViewed = "recentlyViewed", + OnDeck = "onDeck", + Collection = "collection", + Edition = "edition", + Genre = "genre", + Year = "year", + Decade = "decade", + Director = "director", + Actor = "actor", + Country = "country", + ContentRating = "contentRating", + Rating = "rating", + Resolution = "resolution", + FirstCharacter = "firstCharacter", + Folder = "folder", +} + +export type GetLibraryItemsRequest = { + /** + * the Id of the library to query + */ + sectionId: number; + /** + * A key representing a specific tag within the section. + */ + tag: Tag; +}; + +export type GetLibraryItemsPart = { + id?: number | undefined; + key?: string | undefined; + duration?: number | undefined; + file?: string | undefined; + size?: number | undefined; + container?: string | undefined; + videoProfile?: string | undefined; +}; + +export type GetLibraryItemsMedia = { + id?: number | undefined; + duration?: number | undefined; + bitrate?: number | undefined; + width?: number | undefined; + height?: number | undefined; + aspectRatio?: number | undefined; + audioChannels?: number | undefined; + audioCodec?: string | undefined; + videoCodec?: string | undefined; + videoResolution?: string | undefined; + container?: string | undefined; + videoFrameRate?: string | undefined; + videoProfile?: string | undefined; + part?: Array | undefined; +}; + +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 GetLibraryItemsRole = { + tag?: string | undefined; +}; + +export type GetLibraryItemsMetadata = { + ratingKey?: string | undefined; + key?: string | undefined; + guid?: string | undefined; + studio?: string | undefined; + type?: string | undefined; + title?: string | undefined; + contentRating?: string | undefined; + summary?: string | undefined; + rating?: number | undefined; + audienceRating?: number | undefined; + year?: number | undefined; + tagline?: string | undefined; + thumb?: string | undefined; + art?: string | undefined; + duration?: number | undefined; + originallyAvailableAt?: RFCDate | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + audienceRatingImage?: string | undefined; + chapterSource?: string | undefined; + primaryExtraKey?: string | undefined; + ratingImage?: string | undefined; + grandparentRatingKey?: string | undefined; + grandparentGuid?: string | undefined; + grandparentKey?: string | undefined; + grandparentTitle?: string | undefined; + grandparentThumb?: string | undefined; + grandparentArt?: string | undefined; + grandparentTheme?: string | undefined; + media?: Array | undefined; + genre?: Array | undefined; + country?: Array | undefined; + director?: Array | undefined; + writer?: Array | undefined; + role?: Array | undefined; + titleSort?: string | undefined; + viewCount?: number | undefined; + lastViewedAt?: number | undefined; + originalTitle?: string | undefined; + viewOffset?: number | undefined; + skipCount?: number | undefined; + index?: number | undefined; + theme?: string | undefined; + leafCount?: number | undefined; + viewedLeafCount?: number | undefined; + childCount?: number | undefined; + hasPremiumExtras?: string | undefined; + hasPremiumPrimaryExtra?: string | undefined; + parentRatingKey?: string | undefined; + parentGuid?: string | undefined; + parentStudio?: string | undefined; + parentKey?: string | undefined; + parentTitle?: string | undefined; + parentIndex?: number | undefined; + parentYear?: number | undefined; + parentThumb?: string | undefined; + parentTheme?: string | undefined; +}; + +export type GetLibraryItemsMediaContainer = { + size?: number | undefined; + allowSync?: boolean | undefined; + art?: string | undefined; + identifier?: string | undefined; + librarySectionID?: number | undefined; + librarySectionTitle?: string | undefined; + librarySectionUUID?: string | undefined; + mediaTagPrefix?: string | undefined; + mediaTagVersion?: number | undefined; + thumb?: string | undefined; + title1?: string | undefined; + title2?: string | undefined; + viewGroup?: string | undefined; + viewMode?: number | undefined; + mixedParents?: boolean | undefined; + metadata?: Array | undefined; +}; + +/** + * The contents of the library by section and tag + */ +export type GetLibraryItemsResponseBody = { + mediaContainer?: GetLibraryItemsMediaContainer | undefined; +}; + +export type GetLibraryItemsResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * The contents of the library by section and tag + */ + object?: GetLibraryItemsResponseBody | undefined; +}; + +/** @internal */ +export namespace Tag$ { + export const inboundSchema = z.nativeEnum(Tag); + export const outboundSchema = inboundSchema; +} + +/** @internal */ +export namespace GetLibraryItemsRequest$ { + export const inboundSchema: z.ZodType = z + .object({ + sectionId: z.number().int(), + tag: Tag$.inboundSchema, + }) + .transform((v) => { + return { + sectionId: v.sectionId, + tag: v.tag, + }; + }); + + export type Outbound = { + sectionId: number; + tag: string; + }; + + export const outboundSchema: z.ZodType = z + .object({ + sectionId: z.number().int(), + tag: Tag$.outboundSchema, + }) + .transform((v) => { + return { + sectionId: v.sectionId, + tag: v.tag, + }; + }); +} + +/** @internal */ +export namespace GetLibraryItemsPart$ { + export const inboundSchema: z.ZodType = z + .object({ + id: z.number().int().optional(), + key: z.string().optional(), + duration: z.number().int().optional(), + file: z.string().optional(), + size: z.number().int().optional(), + container: z.string().optional(), + videoProfile: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.id === undefined ? null : { id: v.id }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.duration === undefined ? null : { duration: v.duration }), + ...(v.file === undefined ? null : { file: v.file }), + ...(v.size === undefined ? null : { size: v.size }), + ...(v.container === undefined ? null : { container: v.container }), + ...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }), + }; + }); + + export type Outbound = { + id?: number | undefined; + key?: string | undefined; + duration?: number | undefined; + file?: string | undefined; + size?: number | undefined; + container?: string | undefined; + videoProfile?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + id: z.number().int().optional(), + key: z.string().optional(), + duration: z.number().int().optional(), + file: z.string().optional(), + size: z.number().int().optional(), + container: z.string().optional(), + videoProfile: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.id === undefined ? null : { id: v.id }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.duration === undefined ? null : { duration: v.duration }), + ...(v.file === undefined ? null : { file: v.file }), + ...(v.size === undefined ? null : { size: v.size }), + ...(v.container === undefined ? null : { container: v.container }), + ...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }), + }; + }); +} + +/** @internal */ +export namespace GetLibraryItemsMedia$ { + export const inboundSchema: z.ZodType = z + .object({ + id: z.number().int().optional(), + duration: z.number().int().optional(), + bitrate: z.number().int().optional(), + width: z.number().int().optional(), + height: z.number().int().optional(), + aspectRatio: z.number().optional(), + audioChannels: z.number().int().optional(), + audioCodec: z.string().optional(), + videoCodec: z.string().optional(), + videoResolution: z.string().optional(), + container: z.string().optional(), + videoFrameRate: z.string().optional(), + videoProfile: z.string().optional(), + Part: z.array(z.lazy(() => GetLibraryItemsPart$.inboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.id === undefined ? null : { id: v.id }), + ...(v.duration === undefined ? null : { duration: v.duration }), + ...(v.bitrate === undefined ? null : { bitrate: v.bitrate }), + ...(v.width === undefined ? null : { width: v.width }), + ...(v.height === undefined ? null : { height: v.height }), + ...(v.aspectRatio === undefined ? null : { aspectRatio: v.aspectRatio }), + ...(v.audioChannels === undefined ? null : { audioChannels: v.audioChannels }), + ...(v.audioCodec === undefined ? null : { audioCodec: v.audioCodec }), + ...(v.videoCodec === undefined ? null : { videoCodec: v.videoCodec }), + ...(v.videoResolution === undefined + ? null + : { videoResolution: v.videoResolution }), + ...(v.container === undefined ? null : { container: v.container }), + ...(v.videoFrameRate === undefined ? null : { videoFrameRate: v.videoFrameRate }), + ...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }), + ...(v.Part === undefined ? null : { part: v.Part }), + }; + }); + + export type Outbound = { + id?: number | undefined; + duration?: number | undefined; + bitrate?: number | undefined; + width?: number | undefined; + height?: number | undefined; + aspectRatio?: number | undefined; + audioChannels?: number | undefined; + audioCodec?: string | undefined; + videoCodec?: string | undefined; + videoResolution?: string | undefined; + container?: string | undefined; + videoFrameRate?: string | undefined; + videoProfile?: string | undefined; + Part?: Array | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + id: z.number().int().optional(), + duration: z.number().int().optional(), + bitrate: z.number().int().optional(), + width: z.number().int().optional(), + height: z.number().int().optional(), + aspectRatio: z.number().optional(), + audioChannels: z.number().int().optional(), + audioCodec: z.string().optional(), + videoCodec: z.string().optional(), + videoResolution: z.string().optional(), + container: z.string().optional(), + videoFrameRate: z.string().optional(), + videoProfile: z.string().optional(), + part: z.array(z.lazy(() => GetLibraryItemsPart$.outboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.id === undefined ? null : { id: v.id }), + ...(v.duration === undefined ? null : { duration: v.duration }), + ...(v.bitrate === undefined ? null : { bitrate: v.bitrate }), + ...(v.width === undefined ? null : { width: v.width }), + ...(v.height === undefined ? null : { height: v.height }), + ...(v.aspectRatio === undefined ? null : { aspectRatio: v.aspectRatio }), + ...(v.audioChannels === undefined ? null : { audioChannels: v.audioChannels }), + ...(v.audioCodec === undefined ? null : { audioCodec: v.audioCodec }), + ...(v.videoCodec === undefined ? null : { videoCodec: v.videoCodec }), + ...(v.videoResolution === undefined + ? null + : { videoResolution: v.videoResolution }), + ...(v.container === undefined ? null : { container: v.container }), + ...(v.videoFrameRate === undefined ? null : { videoFrameRate: v.videoFrameRate }), + ...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }), + ...(v.part === undefined ? null : { Part: v.part }), + }; + }); +} + +/** @internal */ +export namespace GetLibraryItemsGenre$ { + export const inboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); + + export type Outbound = { + tag?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); +} + +/** @internal */ +export namespace GetLibraryItemsCountry$ { + export const inboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); + + export type Outbound = { + tag?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); +} + +/** @internal */ +export namespace GetLibraryItemsDirector$ { + export const inboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); + + export type Outbound = { + tag?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); +} + +/** @internal */ +export namespace GetLibraryItemsWriter$ { + export const inboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); + + export type Outbound = { + tag?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); +} + +/** @internal */ +export namespace GetLibraryItemsRole$ { + export const inboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); + + export type Outbound = { + tag?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); +} + +/** @internal */ +export namespace GetLibraryItemsMetadata$ { + export const inboundSchema: z.ZodType = z + .object({ + ratingKey: z.string().optional(), + key: z.string().optional(), + guid: z.string().optional(), + studio: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + contentRating: z.string().optional(), + summary: z.string().optional(), + rating: z.number().optional(), + audienceRating: z.number().optional(), + year: z.number().int().optional(), + tagline: z.string().optional(), + thumb: z.string().optional(), + art: z.string().optional(), + duration: z.number().int().optional(), + originallyAvailableAt: z + .string() + .transform((v) => new RFCDate(v)) + .optional(), + addedAt: z.number().int().optional(), + updatedAt: z.number().int().optional(), + audienceRatingImage: z.string().optional(), + chapterSource: z.string().optional(), + primaryExtraKey: z.string().optional(), + ratingImage: z.string().optional(), + grandparentRatingKey: z.string().optional(), + grandparentGuid: z.string().optional(), + grandparentKey: z.string().optional(), + grandparentTitle: z.string().optional(), + grandparentThumb: z.string().optional(), + grandparentArt: z.string().optional(), + grandparentTheme: z.string().optional(), + Media: z.array(z.lazy(() => GetLibraryItemsMedia$.inboundSchema)).optional(), + Genre: z.array(z.lazy(() => GetLibraryItemsGenre$.inboundSchema)).optional(), + Country: z.array(z.lazy(() => GetLibraryItemsCountry$.inboundSchema)).optional(), + Director: z.array(z.lazy(() => GetLibraryItemsDirector$.inboundSchema)).optional(), + Writer: z.array(z.lazy(() => GetLibraryItemsWriter$.inboundSchema)).optional(), + Role: z.array(z.lazy(() => GetLibraryItemsRole$.inboundSchema)).optional(), + titleSort: z.string().optional(), + viewCount: z.number().int().optional(), + lastViewedAt: z.number().int().optional(), + originalTitle: z.string().optional(), + viewOffset: z.number().int().optional(), + skipCount: z.number().int().optional(), + index: z.number().int().optional(), + theme: z.string().optional(), + leafCount: z.number().int().optional(), + viewedLeafCount: z.number().int().optional(), + childCount: z.number().int().optional(), + hasPremiumExtras: z.string().optional(), + hasPremiumPrimaryExtra: z.string().optional(), + parentRatingKey: z.string().optional(), + parentGuid: z.string().optional(), + parentStudio: z.string().optional(), + parentKey: z.string().optional(), + parentTitle: z.string().optional(), + parentIndex: z.number().int().optional(), + parentYear: z.number().int().optional(), + parentThumb: z.string().optional(), + parentTheme: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.guid === undefined ? null : { guid: v.guid }), + ...(v.studio === undefined ? null : { studio: v.studio }), + ...(v.type === undefined ? null : { type: v.type }), + ...(v.title === undefined ? null : { title: v.title }), + ...(v.contentRating === undefined ? null : { contentRating: v.contentRating }), + ...(v.summary === undefined ? null : { summary: v.summary }), + ...(v.rating === undefined ? null : { rating: v.rating }), + ...(v.audienceRating === undefined ? null : { audienceRating: v.audienceRating }), + ...(v.year === undefined ? null : { year: v.year }), + ...(v.tagline === undefined ? null : { tagline: v.tagline }), + ...(v.thumb === undefined ? null : { thumb: v.thumb }), + ...(v.art === undefined ? null : { art: v.art }), + ...(v.duration === undefined ? null : { duration: v.duration }), + ...(v.originallyAvailableAt === undefined + ? null + : { originallyAvailableAt: v.originallyAvailableAt }), + ...(v.addedAt === undefined ? null : { addedAt: v.addedAt }), + ...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }), + ...(v.audienceRatingImage === undefined + ? null + : { audienceRatingImage: v.audienceRatingImage }), + ...(v.chapterSource === undefined ? null : { chapterSource: v.chapterSource }), + ...(v.primaryExtraKey === undefined + ? null + : { primaryExtraKey: v.primaryExtraKey }), + ...(v.ratingImage === undefined ? null : { ratingImage: v.ratingImage }), + ...(v.grandparentRatingKey === undefined + ? null + : { grandparentRatingKey: v.grandparentRatingKey }), + ...(v.grandparentGuid === undefined + ? null + : { grandparentGuid: v.grandparentGuid }), + ...(v.grandparentKey === undefined ? null : { grandparentKey: v.grandparentKey }), + ...(v.grandparentTitle === undefined + ? null + : { grandparentTitle: v.grandparentTitle }), + ...(v.grandparentThumb === undefined + ? null + : { grandparentThumb: v.grandparentThumb }), + ...(v.grandparentArt === undefined ? null : { grandparentArt: v.grandparentArt }), + ...(v.grandparentTheme === undefined + ? null + : { grandparentTheme: v.grandparentTheme }), + ...(v.Media === undefined ? null : { media: v.Media }), + ...(v.Genre === undefined ? null : { genre: v.Genre }), + ...(v.Country === undefined ? null : { country: v.Country }), + ...(v.Director === undefined ? null : { director: v.Director }), + ...(v.Writer === undefined ? null : { writer: v.Writer }), + ...(v.Role === undefined ? null : { role: v.Role }), + ...(v.titleSort === undefined ? null : { titleSort: v.titleSort }), + ...(v.viewCount === undefined ? null : { viewCount: v.viewCount }), + ...(v.lastViewedAt === undefined ? null : { lastViewedAt: v.lastViewedAt }), + ...(v.originalTitle === undefined ? null : { originalTitle: v.originalTitle }), + ...(v.viewOffset === undefined ? null : { viewOffset: v.viewOffset }), + ...(v.skipCount === undefined ? null : { skipCount: v.skipCount }), + ...(v.index === undefined ? null : { index: v.index }), + ...(v.theme === undefined ? null : { theme: v.theme }), + ...(v.leafCount === undefined ? null : { leafCount: v.leafCount }), + ...(v.viewedLeafCount === undefined + ? null + : { viewedLeafCount: v.viewedLeafCount }), + ...(v.childCount === undefined ? null : { childCount: v.childCount }), + ...(v.hasPremiumExtras === undefined + ? null + : { hasPremiumExtras: v.hasPremiumExtras }), + ...(v.hasPremiumPrimaryExtra === undefined + ? null + : { hasPremiumPrimaryExtra: v.hasPremiumPrimaryExtra }), + ...(v.parentRatingKey === undefined + ? null + : { parentRatingKey: v.parentRatingKey }), + ...(v.parentGuid === undefined ? null : { parentGuid: v.parentGuid }), + ...(v.parentStudio === undefined ? null : { parentStudio: v.parentStudio }), + ...(v.parentKey === undefined ? null : { parentKey: v.parentKey }), + ...(v.parentTitle === undefined ? null : { parentTitle: v.parentTitle }), + ...(v.parentIndex === undefined ? null : { parentIndex: v.parentIndex }), + ...(v.parentYear === undefined ? null : { parentYear: v.parentYear }), + ...(v.parentThumb === undefined ? null : { parentThumb: v.parentThumb }), + ...(v.parentTheme === undefined ? null : { parentTheme: v.parentTheme }), + }; + }); + + export type Outbound = { + ratingKey?: string | undefined; + key?: string | undefined; + guid?: string | undefined; + studio?: string | undefined; + type?: string | undefined; + title?: string | undefined; + contentRating?: string | undefined; + summary?: string | undefined; + rating?: number | undefined; + audienceRating?: number | undefined; + year?: number | undefined; + tagline?: string | undefined; + thumb?: string | undefined; + art?: string | undefined; + duration?: number | undefined; + originallyAvailableAt?: string | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + audienceRatingImage?: string | undefined; + chapterSource?: string | undefined; + primaryExtraKey?: string | undefined; + ratingImage?: string | undefined; + grandparentRatingKey?: string | undefined; + grandparentGuid?: string | undefined; + grandparentKey?: string | undefined; + grandparentTitle?: string | undefined; + grandparentThumb?: string | undefined; + grandparentArt?: string | undefined; + grandparentTheme?: string | undefined; + Media?: Array | undefined; + Genre?: Array | undefined; + Country?: Array | undefined; + Director?: Array | undefined; + Writer?: Array | undefined; + Role?: Array | undefined; + titleSort?: string | undefined; + viewCount?: number | undefined; + lastViewedAt?: number | undefined; + originalTitle?: string | undefined; + viewOffset?: number | undefined; + skipCount?: number | undefined; + index?: number | undefined; + theme?: string | undefined; + leafCount?: number | undefined; + viewedLeafCount?: number | undefined; + childCount?: number | undefined; + hasPremiumExtras?: string | undefined; + hasPremiumPrimaryExtra?: string | undefined; + parentRatingKey?: string | undefined; + parentGuid?: string | undefined; + parentStudio?: string | undefined; + parentKey?: string | undefined; + parentTitle?: string | undefined; + parentIndex?: number | undefined; + parentYear?: number | undefined; + parentThumb?: string | undefined; + parentTheme?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + ratingKey: z.string().optional(), + key: z.string().optional(), + guid: z.string().optional(), + studio: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + contentRating: z.string().optional(), + summary: z.string().optional(), + rating: z.number().optional(), + audienceRating: z.number().optional(), + year: z.number().int().optional(), + tagline: z.string().optional(), + thumb: z.string().optional(), + art: z.string().optional(), + duration: z.number().int().optional(), + originallyAvailableAt: z + .instanceof(RFCDate) + .transform((v) => v.toString()) + .optional(), + addedAt: z.number().int().optional(), + updatedAt: z.number().int().optional(), + audienceRatingImage: z.string().optional(), + chapterSource: z.string().optional(), + primaryExtraKey: z.string().optional(), + ratingImage: z.string().optional(), + grandparentRatingKey: z.string().optional(), + grandparentGuid: z.string().optional(), + grandparentKey: z.string().optional(), + grandparentTitle: z.string().optional(), + grandparentThumb: z.string().optional(), + grandparentArt: z.string().optional(), + grandparentTheme: z.string().optional(), + media: z.array(z.lazy(() => GetLibraryItemsMedia$.outboundSchema)).optional(), + genre: z.array(z.lazy(() => GetLibraryItemsGenre$.outboundSchema)).optional(), + country: z.array(z.lazy(() => GetLibraryItemsCountry$.outboundSchema)).optional(), + director: z.array(z.lazy(() => GetLibraryItemsDirector$.outboundSchema)).optional(), + writer: z.array(z.lazy(() => GetLibraryItemsWriter$.outboundSchema)).optional(), + role: z.array(z.lazy(() => GetLibraryItemsRole$.outboundSchema)).optional(), + titleSort: z.string().optional(), + viewCount: z.number().int().optional(), + lastViewedAt: z.number().int().optional(), + originalTitle: z.string().optional(), + viewOffset: z.number().int().optional(), + skipCount: z.number().int().optional(), + index: z.number().int().optional(), + theme: z.string().optional(), + leafCount: z.number().int().optional(), + viewedLeafCount: z.number().int().optional(), + childCount: z.number().int().optional(), + hasPremiumExtras: z.string().optional(), + hasPremiumPrimaryExtra: z.string().optional(), + parentRatingKey: z.string().optional(), + parentGuid: z.string().optional(), + parentStudio: z.string().optional(), + parentKey: z.string().optional(), + parentTitle: z.string().optional(), + parentIndex: z.number().int().optional(), + parentYear: z.number().int().optional(), + parentThumb: z.string().optional(), + parentTheme: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.guid === undefined ? null : { guid: v.guid }), + ...(v.studio === undefined ? null : { studio: v.studio }), + ...(v.type === undefined ? null : { type: v.type }), + ...(v.title === undefined ? null : { title: v.title }), + ...(v.contentRating === undefined ? null : { contentRating: v.contentRating }), + ...(v.summary === undefined ? null : { summary: v.summary }), + ...(v.rating === undefined ? null : { rating: v.rating }), + ...(v.audienceRating === undefined ? null : { audienceRating: v.audienceRating }), + ...(v.year === undefined ? null : { year: v.year }), + ...(v.tagline === undefined ? null : { tagline: v.tagline }), + ...(v.thumb === undefined ? null : { thumb: v.thumb }), + ...(v.art === undefined ? null : { art: v.art }), + ...(v.duration === undefined ? null : { duration: v.duration }), + ...(v.originallyAvailableAt === undefined + ? null + : { originallyAvailableAt: v.originallyAvailableAt }), + ...(v.addedAt === undefined ? null : { addedAt: v.addedAt }), + ...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }), + ...(v.audienceRatingImage === undefined + ? null + : { audienceRatingImage: v.audienceRatingImage }), + ...(v.chapterSource === undefined ? null : { chapterSource: v.chapterSource }), + ...(v.primaryExtraKey === undefined + ? null + : { primaryExtraKey: v.primaryExtraKey }), + ...(v.ratingImage === undefined ? null : { ratingImage: v.ratingImage }), + ...(v.grandparentRatingKey === undefined + ? null + : { grandparentRatingKey: v.grandparentRatingKey }), + ...(v.grandparentGuid === undefined + ? null + : { grandparentGuid: v.grandparentGuid }), + ...(v.grandparentKey === undefined ? null : { grandparentKey: v.grandparentKey }), + ...(v.grandparentTitle === undefined + ? null + : { grandparentTitle: v.grandparentTitle }), + ...(v.grandparentThumb === undefined + ? null + : { grandparentThumb: v.grandparentThumb }), + ...(v.grandparentArt === undefined ? null : { grandparentArt: v.grandparentArt }), + ...(v.grandparentTheme === undefined + ? null + : { grandparentTheme: v.grandparentTheme }), + ...(v.media === undefined ? null : { Media: v.media }), + ...(v.genre === undefined ? null : { Genre: v.genre }), + ...(v.country === undefined ? null : { Country: v.country }), + ...(v.director === undefined ? null : { Director: v.director }), + ...(v.writer === undefined ? null : { Writer: v.writer }), + ...(v.role === undefined ? null : { Role: v.role }), + ...(v.titleSort === undefined ? null : { titleSort: v.titleSort }), + ...(v.viewCount === undefined ? null : { viewCount: v.viewCount }), + ...(v.lastViewedAt === undefined ? null : { lastViewedAt: v.lastViewedAt }), + ...(v.originalTitle === undefined ? null : { originalTitle: v.originalTitle }), + ...(v.viewOffset === undefined ? null : { viewOffset: v.viewOffset }), + ...(v.skipCount === undefined ? null : { skipCount: v.skipCount }), + ...(v.index === undefined ? null : { index: v.index }), + ...(v.theme === undefined ? null : { theme: v.theme }), + ...(v.leafCount === undefined ? null : { leafCount: v.leafCount }), + ...(v.viewedLeafCount === undefined + ? null + : { viewedLeafCount: v.viewedLeafCount }), + ...(v.childCount === undefined ? null : { childCount: v.childCount }), + ...(v.hasPremiumExtras === undefined + ? null + : { hasPremiumExtras: v.hasPremiumExtras }), + ...(v.hasPremiumPrimaryExtra === undefined + ? null + : { hasPremiumPrimaryExtra: v.hasPremiumPrimaryExtra }), + ...(v.parentRatingKey === undefined + ? null + : { parentRatingKey: v.parentRatingKey }), + ...(v.parentGuid === undefined ? null : { parentGuid: v.parentGuid }), + ...(v.parentStudio === undefined ? null : { parentStudio: v.parentStudio }), + ...(v.parentKey === undefined ? null : { parentKey: v.parentKey }), + ...(v.parentTitle === undefined ? null : { parentTitle: v.parentTitle }), + ...(v.parentIndex === undefined ? null : { parentIndex: v.parentIndex }), + ...(v.parentYear === undefined ? null : { parentYear: v.parentYear }), + ...(v.parentThumb === undefined ? null : { parentThumb: v.parentThumb }), + ...(v.parentTheme === undefined ? null : { parentTheme: v.parentTheme }), + }; + }); +} + +/** @internal */ +export namespace GetLibraryItemsMediaContainer$ { + export const inboundSchema: z.ZodType = z + .object({ + size: z.number().int().optional(), + allowSync: z.boolean().optional(), + art: z.string().optional(), + identifier: z.string().optional(), + librarySectionID: z.number().int().optional(), + librarySectionTitle: z.string().optional(), + librarySectionUUID: z.string().optional(), + mediaTagPrefix: z.string().optional(), + mediaTagVersion: z.number().int().optional(), + thumb: z.string().optional(), + title1: z.string().optional(), + title2: z.string().optional(), + viewGroup: z.string().optional(), + viewMode: z.number().int().optional(), + mixedParents: z.boolean().optional(), + Metadata: z.array(z.lazy(() => GetLibraryItemsMetadata$.inboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.size === undefined ? null : { size: v.size }), + ...(v.allowSync === undefined ? null : { allowSync: v.allowSync }), + ...(v.art === undefined ? null : { art: v.art }), + ...(v.identifier === undefined ? null : { identifier: v.identifier }), + ...(v.librarySectionID === undefined + ? null + : { librarySectionID: v.librarySectionID }), + ...(v.librarySectionTitle === undefined + ? null + : { librarySectionTitle: v.librarySectionTitle }), + ...(v.librarySectionUUID === undefined + ? null + : { librarySectionUUID: v.librarySectionUUID }), + ...(v.mediaTagPrefix === undefined ? null : { mediaTagPrefix: v.mediaTagPrefix }), + ...(v.mediaTagVersion === undefined + ? null + : { mediaTagVersion: v.mediaTagVersion }), + ...(v.thumb === undefined ? null : { thumb: v.thumb }), + ...(v.title1 === undefined ? null : { title1: v.title1 }), + ...(v.title2 === undefined ? null : { title2: v.title2 }), + ...(v.viewGroup === undefined ? null : { viewGroup: v.viewGroup }), + ...(v.viewMode === undefined ? null : { viewMode: v.viewMode }), + ...(v.mixedParents === undefined ? null : { mixedParents: v.mixedParents }), + ...(v.Metadata === undefined ? null : { metadata: v.Metadata }), + }; + }); + + export type Outbound = { + size?: number | undefined; + allowSync?: boolean | undefined; + art?: string | undefined; + identifier?: string | undefined; + librarySectionID?: number | undefined; + librarySectionTitle?: string | undefined; + librarySectionUUID?: string | undefined; + mediaTagPrefix?: string | undefined; + mediaTagVersion?: number | undefined; + thumb?: string | undefined; + title1?: string | undefined; + title2?: string | undefined; + viewGroup?: string | undefined; + viewMode?: number | undefined; + mixedParents?: boolean | undefined; + Metadata?: Array | undefined; + }; + + export const outboundSchema: z.ZodType = + z + .object({ + size: z.number().int().optional(), + allowSync: z.boolean().optional(), + art: z.string().optional(), + identifier: z.string().optional(), + librarySectionID: z.number().int().optional(), + librarySectionTitle: z.string().optional(), + librarySectionUUID: z.string().optional(), + mediaTagPrefix: z.string().optional(), + mediaTagVersion: z.number().int().optional(), + thumb: z.string().optional(), + title1: z.string().optional(), + title2: z.string().optional(), + viewGroup: z.string().optional(), + viewMode: z.number().int().optional(), + mixedParents: z.boolean().optional(), + metadata: z.array(z.lazy(() => GetLibraryItemsMetadata$.outboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.size === undefined ? null : { size: v.size }), + ...(v.allowSync === undefined ? null : { allowSync: v.allowSync }), + ...(v.art === undefined ? null : { art: v.art }), + ...(v.identifier === undefined ? null : { identifier: v.identifier }), + ...(v.librarySectionID === undefined + ? null + : { librarySectionID: v.librarySectionID }), + ...(v.librarySectionTitle === undefined + ? null + : { librarySectionTitle: v.librarySectionTitle }), + ...(v.librarySectionUUID === undefined + ? null + : { librarySectionUUID: v.librarySectionUUID }), + ...(v.mediaTagPrefix === undefined + ? null + : { mediaTagPrefix: v.mediaTagPrefix }), + ...(v.mediaTagVersion === undefined + ? null + : { mediaTagVersion: v.mediaTagVersion }), + ...(v.thumb === undefined ? null : { thumb: v.thumb }), + ...(v.title1 === undefined ? null : { title1: v.title1 }), + ...(v.title2 === undefined ? null : { title2: v.title2 }), + ...(v.viewGroup === undefined ? null : { viewGroup: v.viewGroup }), + ...(v.viewMode === undefined ? null : { viewMode: v.viewMode }), + ...(v.mixedParents === undefined ? null : { mixedParents: v.mixedParents }), + ...(v.metadata === undefined ? null : { Metadata: v.metadata }), + }; + }); +} + +/** @internal */ +export namespace GetLibraryItemsResponseBody$ { + export const inboundSchema: z.ZodType = z + .object({ + MediaContainer: z.lazy(() => GetLibraryItemsMediaContainer$.inboundSchema).optional(), + }) + .transform((v) => { + return { + ...(v.MediaContainer === undefined ? null : { mediaContainer: v.MediaContainer }), + }; + }); + + export type Outbound = { + MediaContainer?: GetLibraryItemsMediaContainer$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + mediaContainer: z.lazy(() => GetLibraryItemsMediaContainer$.outboundSchema).optional(), + }) + .transform((v) => { + return { + ...(v.mediaContainer === undefined ? null : { MediaContainer: v.mediaContainer }), + }; + }); +} + +/** @internal */ +export namespace GetLibraryItemsResponse$ { + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetLibraryItemsResponseBody$.inboundSchema).optional(), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + ...(v.object === undefined ? null : { object: v.object }), + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetLibraryItemsResponseBody$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetLibraryItemsResponseBody$.outboundSchema).optional(), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + ...(v.object === undefined ? null : { object: v.object }), + }; + }); +} diff --git a/src/models/operations/getmetadata.ts b/src/models/operations/getmetadata.ts index 6848613c..5023b2db 100644 --- a/src/models/operations/getmetadata.ts +++ b/src/models/operations/getmetadata.ts @@ -212,11 +212,7 @@ export type GetMetadataResponse = { /** @internal */ export namespace GetMetadataRequest$ { - export type Inbound = { - ratingKey: number; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ratingKey: z.number(), }) @@ -243,42 +239,7 @@ export namespace GetMetadataRequest$ { /** @internal */ export namespace Stream$ { - export type Inbound = { - id?: number | undefined; - streamType?: number | undefined; - default?: boolean | undefined; - codec?: string | undefined; - index?: number | undefined; - bitrate?: number | undefined; - bitDepth?: number | undefined; - chromaLocation?: string | undefined; - chromaSubsampling?: string | undefined; - codedHeight?: number | undefined; - codedWidth?: number | undefined; - colorPrimaries?: string | undefined; - colorRange?: string | undefined; - colorSpace?: string | undefined; - colorTrc?: string | undefined; - frameRate?: number | undefined; - hasScalingMatrix?: boolean | undefined; - height?: number | undefined; - level?: number | undefined; - profile?: string | undefined; - refFrames?: number | undefined; - scanType?: string | undefined; - streamIdentifier?: string | undefined; - width?: number | undefined; - displayTitle?: string | undefined; - extendedDisplayTitle?: string | undefined; - selected?: boolean | undefined; - channels?: number | undefined; - language?: string | undefined; - languageTag?: string | undefined; - languageCode?: string | undefined; - samplingRate?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.number().int().optional(), streamType: z.number().int().optional(), @@ -476,21 +437,7 @@ export namespace Stream$ { /** @internal */ export namespace GetMetadataPart$ { - export type Inbound = { - id?: number | undefined; - key?: string | undefined; - duration?: number | undefined; - file?: string | undefined; - size?: number | undefined; - audioProfile?: string | undefined; - container?: string | undefined; - has64bitOffsets?: boolean | undefined; - optimizedForStreaming?: boolean | undefined; - videoProfile?: string | undefined; - Stream?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.number().int().optional(), key: z.string().optional(), @@ -575,27 +522,7 @@ export namespace GetMetadataPart$ { /** @internal */ export namespace GetMetadataMedia$ { - export type Inbound = { - id?: number | undefined; - duration?: number | undefined; - bitrate?: number | undefined; - width?: number | undefined; - height?: number | undefined; - aspectRatio?: number | undefined; - audioChannels?: number | undefined; - audioCodec?: string | undefined; - videoCodec?: string | undefined; - videoResolution?: string | undefined; - container?: string | undefined; - videoFrameRate?: string | undefined; - optimizedForStreaming?: number | undefined; - audioProfile?: string | undefined; - has64bitOffsets?: boolean | undefined; - videoProfile?: string | undefined; - Part?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.number().int().optional(), duration: z.number().int().optional(), @@ -714,13 +641,7 @@ export namespace GetMetadataMedia$ { /** @internal */ export namespace GetMetadataGenre$ { - export type Inbound = { - id?: number | undefined; - filter?: string | undefined; - tag?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.number().int().optional(), filter: z.string().optional(), @@ -757,13 +678,7 @@ export namespace GetMetadataGenre$ { /** @internal */ export namespace GetMetadataCountry$ { - export type Inbound = { - id?: number | undefined; - filter?: string | undefined; - tag?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.number().int().optional(), filter: z.string().optional(), @@ -800,11 +715,7 @@ export namespace GetMetadataCountry$ { /** @internal */ export namespace Guids$ { - export type Inbound = { - id?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.string().optional(), }) @@ -831,13 +742,7 @@ export namespace Guids$ { /** @internal */ export namespace Ratings$ { - export type Inbound = { - image?: string | undefined; - value?: number | undefined; - type?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ image: z.string().optional(), value: z.number().optional(), @@ -874,15 +779,7 @@ export namespace Ratings$ { /** @internal */ export namespace GetMetadataDirector$ { - export type Inbound = { - id?: number | undefined; - filter?: string | undefined; - tag?: string | undefined; - tagKey?: string | undefined; - thumb?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.number().int().optional(), filter: z.string().optional(), @@ -929,15 +826,7 @@ export namespace GetMetadataDirector$ { /** @internal */ export namespace GetMetadataWriter$ { - export type Inbound = { - id?: number | undefined; - filter?: string | undefined; - tag?: string | undefined; - tagKey?: string | undefined; - thumb?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.number().int().optional(), filter: z.string().optional(), @@ -984,16 +873,7 @@ export namespace GetMetadataWriter$ { /** @internal */ export namespace GetMetadataRole$ { - export type Inbound = { - id?: number | undefined; - filter?: string | undefined; - tag?: string | undefined; - tagKey?: string | undefined; - role?: string | undefined; - thumb?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.number().int().optional(), filter: z.string().optional(), @@ -1045,15 +925,7 @@ export namespace GetMetadataRole$ { /** @internal */ export namespace Producer$ { - export type Inbound = { - id?: number | undefined; - filter?: string | undefined; - tag?: string | undefined; - tagKey?: string | undefined; - thumb?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.number().int().optional(), filter: z.string().optional(), @@ -1100,43 +972,7 @@ export namespace Producer$ { /** @internal */ export namespace GetMetadataMetadata$ { - export type Inbound = { - ratingKey?: string | undefined; - key?: string | undefined; - guid?: string | undefined; - studio?: string | undefined; - type?: string | undefined; - title?: string | undefined; - librarySectionTitle?: string | undefined; - librarySectionID?: number | undefined; - librarySectionKey?: string | undefined; - contentRating?: string | undefined; - summary?: string | undefined; - rating?: number | undefined; - audienceRating?: number | undefined; - year?: number | undefined; - tagline?: string | undefined; - thumb?: string | undefined; - art?: string | undefined; - duration?: number | undefined; - originallyAvailableAt?: string | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - audienceRatingImage?: string | undefined; - hasPremiumPrimaryExtra?: string | undefined; - ratingImage?: string | undefined; - Media?: Array | undefined; - Genre?: Array | undefined; - Country?: Array | undefined; - guids?: Array | undefined; - ratings?: Array | undefined; - Director?: Array | undefined; - Writer?: Array | undefined; - Role?: Array | undefined; - Producer?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ratingKey: z.string().optional(), key: z.string().optional(), @@ -1353,19 +1189,7 @@ export namespace GetMetadataMetadata$ { /** @internal */ export namespace GetMetadataMediaContainer$ { - export type Inbound = { - size?: number | undefined; - allowSync?: boolean | undefined; - identifier?: string | undefined; - librarySectionID?: number | undefined; - librarySectionTitle?: string | undefined; - librarySectionUUID?: string | undefined; - mediaTagPrefix?: string | undefined; - mediaTagVersion?: number | undefined; - Metadata?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ size: z.number().int().optional(), allowSync: z.boolean().optional(), @@ -1448,11 +1272,7 @@ export namespace GetMetadataMediaContainer$ { /** @internal */ export namespace GetMetadataResponseBody$ { - export type Inbound = { - MediaContainer?: GetMetadataMediaContainer$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ MediaContainer: z.lazy(() => GetMetadataMediaContainer$.inboundSchema).optional(), }) @@ -1479,14 +1299,7 @@ export namespace GetMetadataResponseBody$ { /** @internal */ export namespace GetMetadataResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: GetMetadataResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/getmetadatachildren.ts b/src/models/operations/getmetadatachildren.ts index b7d26a95..5623ad80 100644 --- a/src/models/operations/getmetadatachildren.ts +++ b/src/models/operations/getmetadatachildren.ts @@ -103,11 +103,7 @@ export type GetMetadataChildrenResponse = { /** @internal */ export namespace GetMetadataChildrenRequest$ { - export type Inbound = { - ratingKey: number; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ratingKey: z.number(), }) @@ -134,15 +130,7 @@ export namespace GetMetadataChildrenRequest$ { /** @internal */ export namespace GetMetadataChildrenDirectory$ { - export type Inbound = { - leafCount?: number | undefined; - thumb?: string | undefined; - viewedLeafCount?: number | undefined; - key?: string | undefined; - title?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ leafCount: z.number().int().optional(), thumb: z.string().optional(), @@ -193,37 +181,7 @@ export namespace GetMetadataChildrenDirectory$ { /** @internal */ export namespace GetMetadataChildrenMetadata$ { - export type Inbound = { - ratingKey?: string | undefined; - key?: string | undefined; - parentRatingKey?: string | undefined; - guid?: string | undefined; - parentGuid?: string | undefined; - parentStudio?: string | undefined; - type?: string | undefined; - title?: string | undefined; - parentKey?: string | undefined; - parentTitle?: string | undefined; - summary?: string | undefined; - index?: number | undefined; - parentIndex?: number | undefined; - viewCount?: number | undefined; - lastViewedAt?: number | undefined; - parentYear?: number | undefined; - thumb?: string | undefined; - art?: string | undefined; - parentThumb?: string | undefined; - parentTheme?: string | undefined; - leafCount?: number | undefined; - viewedLeafCount?: number | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - userRating?: number | undefined; - skipCount?: number | undefined; - lastRatedAt?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ratingKey: z.string().optional(), key: z.string().optional(), @@ -388,36 +346,10 @@ export namespace GetMetadataChildrenMetadata$ { /** @internal */ export namespace GetMetadataChildrenMediaContainer$ { - export type Inbound = { - size?: number | undefined; - allowSync?: boolean | undefined; - art?: string | undefined; - identifier?: string | undefined; - key?: string | undefined; - librarySectionID?: number | undefined; - librarySectionTitle?: string | undefined; - librarySectionUUID?: string | undefined; - mediaTagPrefix?: string | undefined; - mediaTagVersion?: number | undefined; - nocache?: boolean | undefined; - parentIndex?: number | undefined; - parentTitle?: string | undefined; - parentYear?: number | undefined; - summary?: string | undefined; - theme?: string | undefined; - thumb?: string | undefined; - title1?: string | undefined; - title2?: string | undefined; - viewGroup?: string | undefined; - viewMode?: number | undefined; - Directory?: Array | undefined; - Metadata?: Array | undefined; - }; - export const inboundSchema: z.ZodType< GetMetadataChildrenMediaContainer, z.ZodTypeDef, - Inbound + unknown > = z .object({ size: z.number().int().optional(), @@ -579,11 +511,7 @@ export namespace GetMetadataChildrenMediaContainer$ { /** @internal */ export namespace GetMetadataChildrenResponseBody$ { - export type Inbound = { - MediaContainer?: GetMetadataChildrenMediaContainer$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = + export const inboundSchema: z.ZodType = z .object({ MediaContainer: z @@ -621,14 +549,7 @@ export namespace GetMetadataChildrenResponseBody$ { /** @internal */ export namespace GetMetadataChildrenResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: GetMetadataChildrenResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/getmyplexaccount.ts b/src/models/operations/getmyplexaccount.ts index c5712e2f..b7d3671b 100644 --- a/src/models/operations/getmyplexaccount.ts +++ b/src/models/operations/getmyplexaccount.ts @@ -47,22 +47,7 @@ export type GetMyPlexAccountResponse = { /** @internal */ export namespace MyPlex$ { - export type Inbound = { - authToken?: string | undefined; - username?: string | undefined; - mappingState?: string | undefined; - mappingError?: string | undefined; - signInState?: string | undefined; - publicAddress?: string | undefined; - publicPort?: number | undefined; - privateAddress?: string | undefined; - privatePort?: number | undefined; - subscriptionFeatures?: string | undefined; - subscriptionActive?: boolean | undefined; - subscriptionState?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ authToken: z.string().optional(), username: z.string().optional(), @@ -156,11 +141,7 @@ export namespace MyPlex$ { /** @internal */ export namespace GetMyPlexAccountResponseBody$ { - export type Inbound = { - MyPlex?: MyPlex$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ MyPlex: z.lazy(() => MyPlex$.inboundSchema).optional(), }) @@ -187,14 +168,7 @@ export namespace GetMyPlexAccountResponseBody$ { /** @internal */ export namespace GetMyPlexAccountResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: GetMyPlexAccountResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/getondeck.ts b/src/models/operations/getondeck.ts index b3ad31e0..9e31e59c 100644 --- a/src/models/operations/getondeck.ts +++ b/src/models/operations/getondeck.ts @@ -141,33 +141,7 @@ export type GetOnDeckResponse = { /** @internal */ export namespace GetOnDeckStream$ { - export type Inbound = { - id?: number | undefined; - streamType?: number | undefined; - default?: boolean | undefined; - codec?: string | undefined; - index?: number | undefined; - bitrate?: number | undefined; - language?: string | undefined; - languageTag?: string | undefined; - languageCode?: string | undefined; - bitDepth?: number | undefined; - chromaLocation?: string | undefined; - chromaSubsampling?: string | undefined; - codedHeight?: number | undefined; - codedWidth?: number | undefined; - colorRange?: string | undefined; - frameRate?: number | undefined; - height?: number | undefined; - level?: number | undefined; - profile?: string | undefined; - refFrames?: number | undefined; - width?: number | undefined; - displayTitle?: string | undefined; - extendedDisplayTitle?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.number().optional(), streamType: z.number().optional(), @@ -312,19 +286,7 @@ export namespace GetOnDeckStream$ { /** @internal */ export namespace GetOnDeckPart$ { - export type Inbound = { - id?: number | undefined; - key?: string | undefined; - duration?: number | undefined; - file?: string | undefined; - size?: number | undefined; - audioProfile?: string | undefined; - container?: string | undefined; - videoProfile?: string | undefined; - Stream?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.number().optional(), key: z.string().optional(), @@ -391,25 +353,7 @@ export namespace GetOnDeckPart$ { /** @internal */ export namespace GetOnDeckMedia$ { - export type Inbound = { - id?: number | undefined; - duration?: number | undefined; - bitrate?: number | undefined; - width?: number | undefined; - height?: number | undefined; - aspectRatio?: number | undefined; - audioChannels?: number | undefined; - audioCodec?: string | undefined; - videoCodec?: string | undefined; - videoResolution?: string | undefined; - container?: string | undefined; - videoFrameRate?: string | undefined; - audioProfile?: string | undefined; - videoProfile?: string | undefined; - Part?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.number().optional(), duration: z.number().optional(), @@ -510,11 +454,7 @@ export namespace GetOnDeckMedia$ { /** @internal */ export namespace GetOnDeckGuids$ { - export type Inbound = { - id?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.string().optional(), }) @@ -541,46 +481,7 @@ export namespace GetOnDeckGuids$ { /** @internal */ export namespace GetOnDeckMetadata$ { - export type Inbound = { - allowSync?: boolean | undefined; - librarySectionID?: number | undefined; - librarySectionTitle?: string | undefined; - librarySectionUUID?: string | undefined; - ratingKey?: number | undefined; - key?: string | undefined; - parentRatingKey?: number | undefined; - grandparentRatingKey?: number | undefined; - guid?: string | undefined; - parentGuid?: string | undefined; - grandparentGuid?: string | undefined; - type?: string | undefined; - title?: string | undefined; - grandparentKey?: string | undefined; - parentKey?: string | undefined; - librarySectionKey?: string | undefined; - grandparentTitle?: string | undefined; - parentTitle?: string | undefined; - contentRating?: string | undefined; - summary?: string | undefined; - index?: number | undefined; - parentIndex?: number | undefined; - lastViewedAt?: number | undefined; - year?: number | undefined; - thumb?: string | undefined; - art?: string | undefined; - parentThumb?: string | undefined; - grandparentThumb?: string | undefined; - grandparentArt?: string | undefined; - grandparentTheme?: string | undefined; - duration?: number | undefined; - originallyAvailableAt?: string | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - Media?: Array | undefined; - guids?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ allowSync: z.boolean().optional(), librarySectionID: z.number().optional(), @@ -833,17 +734,7 @@ export namespace GetOnDeckMetadata$ { /** @internal */ export namespace GetOnDeckMediaContainer$ { - export type Inbound = { - size?: number | undefined; - allowSync?: boolean | undefined; - identifier?: string | undefined; - mediaTagPrefix?: string | undefined; - mediaTagVersion?: number | undefined; - mixedParents?: boolean | undefined; - Metadata?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ size: z.number().optional(), allowSync: z.boolean().optional(), @@ -904,11 +795,7 @@ export namespace GetOnDeckMediaContainer$ { /** @internal */ export namespace GetOnDeckResponseBody$ { - export type Inbound = { - MediaContainer?: GetOnDeckMediaContainer$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ MediaContainer: z.lazy(() => GetOnDeckMediaContainer$.inboundSchema).optional(), }) @@ -935,14 +822,7 @@ export namespace GetOnDeckResponseBody$ { /** @internal */ export namespace GetOnDeckResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: GetOnDeckResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/getpin.ts b/src/models/operations/getpin.ts index 28175d50..3e6eca92 100644 --- a/src/models/operations/getpin.ts +++ b/src/models/operations/getpin.ts @@ -6,6 +6,18 @@ import * as z from "zod"; export const GetPinServerList = ["https://plex.tv/api/v2"] as const; +export type GetPinGlobals = { + /** + * The unique identifier for the client application + * + * @remarks + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + * + */ + xPlexClientIdentifier: string; +}; + export type GetPinRequest = { /** * Determines the kind of code returned by the API call @@ -89,13 +101,35 @@ export type GetPinResponse = { }; /** @internal */ -export namespace GetPinRequest$ { - export type Inbound = { - strong?: boolean | undefined; - "X-Plex-Client-Identifier"?: string | undefined; +export namespace GetPinGlobals$ { + export const inboundSchema: z.ZodType = z + .object({ + "X-Plex-Client-Identifier": z.string(), + }) + .transform((v) => { + return { + xPlexClientIdentifier: v["X-Plex-Client-Identifier"], + }; + }); + + export type Outbound = { + "X-Plex-Client-Identifier": string; }; - export const inboundSchema: z.ZodType = z + export const outboundSchema: z.ZodType = z + .object({ + xPlexClientIdentifier: z.string(), + }) + .transform((v) => { + return { + "X-Plex-Client-Identifier": v.xPlexClientIdentifier, + }; + }); +} + +/** @internal */ +export namespace GetPinRequest$ { + export const inboundSchema: z.ZodType = z .object({ strong: z.boolean().default(false), "X-Plex-Client-Identifier": z.string().optional(), @@ -131,20 +165,7 @@ export namespace GetPinRequest$ { /** @internal */ export namespace Location$ { - export type Inbound = { - code?: string | undefined; - european_union_member?: boolean | undefined; - continent_code?: string | undefined; - country?: string | undefined; - city?: string | undefined; - time_zone?: string | undefined; - postal_code?: number | undefined; - in_privacy_restricted_country?: boolean | undefined; - subdivisions?: string | undefined; - coordinates?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ code: z.string().optional(), european_union_member: z.boolean().optional(), @@ -224,22 +245,7 @@ export namespace Location$ { /** @internal */ export namespace GetPinResponseBody$ { - export type Inbound = { - id?: number | undefined; - code?: string | undefined; - product?: string | undefined; - trusted?: boolean | undefined; - qr?: string | undefined; - clientIdentifier?: string | undefined; - location?: Location$.Inbound | undefined; - expiresIn?: number | undefined; - createdAt?: string | undefined; - expiresAt?: string | undefined; - authToken?: string | undefined; - newRegistration?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.number().optional(), code: z.string().optional(), @@ -343,14 +349,7 @@ export namespace GetPinResponseBody$ { /** @internal */ export namespace GetPinResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: GetPinResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/getplaylist.ts b/src/models/operations/getplaylist.ts index b517f165..ecab691c 100644 --- a/src/models/operations/getplaylist.ts +++ b/src/models/operations/getplaylist.ts @@ -62,11 +62,7 @@ export type GetPlaylistResponse = { /** @internal */ export namespace GetPlaylistRequest$ { - export type Inbound = { - playlistID: number; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ playlistID: z.number(), }) @@ -93,25 +89,7 @@ export namespace GetPlaylistRequest$ { /** @internal */ export namespace GetPlaylistMetadata$ { - export type Inbound = { - content?: string | undefined; - ratingKey?: string | undefined; - key?: string | undefined; - guid?: string | undefined; - type?: string | undefined; - title?: string | undefined; - summary?: string | undefined; - smart?: boolean | undefined; - playlistType?: string | undefined; - composite?: string | undefined; - icon?: string | undefined; - duration?: number | undefined; - leafCount?: number | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ content: z.string().optional(), ratingKey: z.string().optional(), @@ -208,12 +186,7 @@ export namespace GetPlaylistMetadata$ { /** @internal */ export namespace GetPlaylistMediaContainer$ { - export type Inbound = { - size?: number | undefined; - Metadata?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ size: z.number().int().optional(), Metadata: z.array(z.lazy(() => GetPlaylistMetadata$.inboundSchema)).optional(), @@ -245,11 +218,7 @@ export namespace GetPlaylistMediaContainer$ { /** @internal */ export namespace GetPlaylistResponseBody$ { - export type Inbound = { - MediaContainer?: GetPlaylistMediaContainer$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ MediaContainer: z.lazy(() => GetPlaylistMediaContainer$.inboundSchema).optional(), }) @@ -276,14 +245,7 @@ export namespace GetPlaylistResponseBody$ { /** @internal */ export namespace GetPlaylistResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: GetPlaylistResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/getplaylistcontents.ts b/src/models/operations/getplaylistcontents.ts index d5ec9bfb..5422400b 100644 --- a/src/models/operations/getplaylistcontents.ts +++ b/src/models/operations/getplaylistcontents.ts @@ -144,12 +144,7 @@ export type GetPlaylistContentsResponse = { /** @internal */ export namespace GetPlaylistContentsRequest$ { - export type Inbound = { - playlistID: number; - type: number; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ playlistID: z.number(), type: z.number(), @@ -181,20 +176,7 @@ export namespace GetPlaylistContentsRequest$ { /** @internal */ export namespace GetPlaylistContentsPart$ { - export type Inbound = { - id?: number | undefined; - key?: string | undefined; - duration?: number | undefined; - file?: string | undefined; - size?: number | undefined; - audioProfile?: string | undefined; - container?: string | undefined; - has64bitOffsets?: boolean | undefined; - optimizedForStreaming?: boolean | undefined; - videoProfile?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.number().int().optional(), key: z.string().optional(), @@ -274,27 +256,7 @@ export namespace GetPlaylistContentsPart$ { /** @internal */ export namespace GetPlaylistContentsMedia$ { - export type Inbound = { - id?: number | undefined; - duration?: number | undefined; - bitrate?: number | undefined; - width?: number | undefined; - height?: number | undefined; - aspectRatio?: number | undefined; - audioChannels?: number | undefined; - audioCodec?: string | undefined; - videoCodec?: string | undefined; - videoResolution?: string | undefined; - container?: string | undefined; - videoFrameRate?: string | undefined; - optimizedForStreaming?: number | undefined; - audioProfile?: string | undefined; - has64bitOffsets?: boolean | undefined; - videoProfile?: string | undefined; - Part?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.number().int().optional(), duration: z.number().int().optional(), @@ -413,11 +375,7 @@ export namespace GetPlaylistContentsMedia$ { /** @internal */ export namespace GetPlaylistContentsGenre$ { - export type Inbound = { - tag?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ tag: z.string().optional(), }) @@ -444,11 +402,7 @@ export namespace GetPlaylistContentsGenre$ { /** @internal */ export namespace GetPlaylistContentsCountry$ { - export type Inbound = { - tag?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ tag: z.string().optional(), }) @@ -475,11 +429,7 @@ export namespace GetPlaylistContentsCountry$ { /** @internal */ export namespace GetPlaylistContentsDirector$ { - export type Inbound = { - tag?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ tag: z.string().optional(), }) @@ -506,11 +456,7 @@ export namespace GetPlaylistContentsDirector$ { /** @internal */ export namespace GetPlaylistContentsWriter$ { - export type Inbound = { - tag?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ tag: z.string().optional(), }) @@ -537,11 +483,7 @@ export namespace GetPlaylistContentsWriter$ { /** @internal */ export namespace GetPlaylistContentsRole$ { - export type Inbound = { - tag?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ tag: z.string().optional(), }) @@ -568,42 +510,7 @@ export namespace GetPlaylistContentsRole$ { /** @internal */ export namespace GetPlaylistContentsMetadata$ { - export type Inbound = { - ratingKey?: string | undefined; - key?: string | undefined; - guid?: string | undefined; - studio?: string | undefined; - type?: string | undefined; - title?: string | undefined; - titleSort?: string | undefined; - librarySectionTitle?: string | undefined; - librarySectionID?: number | undefined; - librarySectionKey?: string | undefined; - contentRating?: string | undefined; - summary?: string | undefined; - rating?: number | undefined; - audienceRating?: number | undefined; - year?: number | undefined; - tagline?: string | undefined; - thumb?: string | undefined; - art?: string | undefined; - duration?: number | undefined; - originallyAvailableAt?: string | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - audienceRatingImage?: string | undefined; - hasPremiumExtras?: string | undefined; - hasPremiumPrimaryExtra?: string | undefined; - ratingImage?: string | undefined; - Media?: Array | undefined; - Genre?: Array | undefined; - Country?: Array | undefined; - Director?: Array | undefined; - Writer?: Array | undefined; - Role?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ratingKey: z.string().optional(), key: z.string().optional(), @@ -819,22 +726,10 @@ export namespace GetPlaylistContentsMetadata$ { /** @internal */ export namespace GetPlaylistContentsMediaContainer$ { - export type Inbound = { - size?: number | undefined; - composite?: string | undefined; - duration?: number | undefined; - leafCount?: number | undefined; - playlistType?: string | undefined; - ratingKey?: string | undefined; - smart?: boolean | undefined; - title?: string | undefined; - Metadata?: Array | undefined; - }; - export const inboundSchema: z.ZodType< GetPlaylistContentsMediaContainer, z.ZodTypeDef, - Inbound + unknown > = z .object({ size: z.number().int().optional(), @@ -906,11 +801,7 @@ export namespace GetPlaylistContentsMediaContainer$ { /** @internal */ export namespace GetPlaylistContentsResponseBody$ { - export type Inbound = { - MediaContainer?: GetPlaylistContentsMediaContainer$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = + export const inboundSchema: z.ZodType = z .object({ MediaContainer: z @@ -948,14 +839,7 @@ export namespace GetPlaylistContentsResponseBody$ { /** @internal */ export namespace GetPlaylistContentsResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: GetPlaylistContentsResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/getplaylists.ts b/src/models/operations/getplaylists.ts index 60fe56bc..2bf236bd 100644 --- a/src/models/operations/getplaylists.ts +++ b/src/models/operations/getplaylists.ts @@ -83,23 +83,23 @@ export type GetPlaylistsResponse = { }; /** @internal */ -export const PlaylistType$: z.ZodNativeEnum = z.nativeEnum(PlaylistType); +export namespace PlaylistType$ { + export const inboundSchema = z.nativeEnum(PlaylistType); + export const outboundSchema = inboundSchema; +} /** @internal */ -export const QueryParamSmart$: z.ZodNativeEnum = - z.nativeEnum(QueryParamSmart); +export namespace QueryParamSmart$ { + export const inboundSchema = z.nativeEnum(QueryParamSmart); + export const outboundSchema = inboundSchema; +} /** @internal */ export namespace GetPlaylistsRequest$ { - export type Inbound = { - playlistType?: PlaylistType | undefined; - smart?: QueryParamSmart | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ - playlistType: PlaylistType$.optional(), - smart: QueryParamSmart$.optional(), + playlistType: PlaylistType$.inboundSchema.optional(), + smart: QueryParamSmart$.inboundSchema.optional(), }) .transform((v) => { return { @@ -109,14 +109,14 @@ export namespace GetPlaylistsRequest$ { }); export type Outbound = { - playlistType?: PlaylistType | undefined; - smart?: QueryParamSmart | undefined; + playlistType?: string | undefined; + smart?: number | undefined; }; export const outboundSchema: z.ZodType = z .object({ - playlistType: PlaylistType$.optional(), - smart: QueryParamSmart$.optional(), + playlistType: PlaylistType$.outboundSchema.optional(), + smart: QueryParamSmart$.outboundSchema.optional(), }) .transform((v) => { return { @@ -128,26 +128,7 @@ export namespace GetPlaylistsRequest$ { /** @internal */ export namespace GetPlaylistsMetadata$ { - export type Inbound = { - ratingKey?: string | undefined; - key?: string | undefined; - guid?: string | undefined; - type?: string | undefined; - title?: string | undefined; - summary?: string | undefined; - smart?: boolean | undefined; - playlistType?: string | undefined; - composite?: string | undefined; - icon?: string | undefined; - viewCount?: number | undefined; - lastViewedAt?: number | undefined; - duration?: number | undefined; - leafCount?: number | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ratingKey: z.string().optional(), key: z.string().optional(), @@ -249,12 +230,7 @@ export namespace GetPlaylistsMetadata$ { /** @internal */ export namespace GetPlaylistsMediaContainer$ { - export type Inbound = { - size?: number | undefined; - Metadata?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ size: z.number().int().optional(), Metadata: z.array(z.lazy(() => GetPlaylistsMetadata$.inboundSchema)).optional(), @@ -286,11 +262,7 @@ export namespace GetPlaylistsMediaContainer$ { /** @internal */ export namespace GetPlaylistsResponseBody$ { - export type Inbound = { - MediaContainer?: GetPlaylistsMediaContainer$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ MediaContainer: z.lazy(() => GetPlaylistsMediaContainer$.inboundSchema).optional(), }) @@ -317,14 +289,7 @@ export namespace GetPlaylistsResponseBody$ { /** @internal */ export namespace GetPlaylistsResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: GetPlaylistsResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/getrecentlyadded.ts b/src/models/operations/getrecentlyadded.ts index 112bd885..9c0eeffc 100644 --- a/src/models/operations/getrecentlyadded.ts +++ b/src/models/operations/getrecentlyadded.ts @@ -129,20 +129,7 @@ export type GetRecentlyAddedResponse = { /** @internal */ export namespace Part$ { - export type Inbound = { - id?: number | undefined; - key?: string | undefined; - duration?: number | undefined; - file?: string | undefined; - size?: number | undefined; - container?: string | undefined; - has64bitOffsets?: boolean | undefined; - hasThumbnail?: number | undefined; - optimizedForStreaming?: boolean | undefined; - videoProfile?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.number().optional(), key: z.string().optional(), @@ -222,26 +209,7 @@ export namespace Part$ { /** @internal */ export namespace Media$ { - export type Inbound = { - id?: number | undefined; - duration?: number | undefined; - bitrate?: number | undefined; - width?: number | undefined; - height?: number | undefined; - aspectRatio?: number | undefined; - audioChannels?: number | undefined; - audioCodec?: string | undefined; - videoCodec?: string | undefined; - videoResolution?: number | undefined; - container?: string | undefined; - videoFrameRate?: string | undefined; - optimizedForStreaming?: number | undefined; - has64bitOffsets?: boolean | undefined; - videoProfile?: string | undefined; - Part?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.number().optional(), duration: z.number().optional(), @@ -355,11 +323,7 @@ export namespace Media$ { /** @internal */ export namespace Genre$ { - export type Inbound = { - tag?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ tag: z.string().optional(), }) @@ -386,11 +350,7 @@ export namespace Genre$ { /** @internal */ export namespace Director$ { - export type Inbound = { - tag?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ tag: z.string().optional(), }) @@ -417,11 +377,7 @@ export namespace Director$ { /** @internal */ export namespace Writer$ { - export type Inbound = { - tag?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ tag: z.string().optional(), }) @@ -448,11 +404,7 @@ export namespace Writer$ { /** @internal */ export namespace Country$ { - export type Inbound = { - tag?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ tag: z.string().optional(), }) @@ -479,11 +431,7 @@ export namespace Country$ { /** @internal */ export namespace Role$ { - export type Inbound = { - tag?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ tag: z.string().optional(), }) @@ -510,42 +458,7 @@ export namespace Role$ { /** @internal */ export namespace Metadata$ { - export type Inbound = { - allowSync?: boolean | undefined; - librarySectionID?: number | undefined; - librarySectionTitle?: string | undefined; - librarySectionUUID?: string | undefined; - ratingKey?: number | undefined; - key?: string | undefined; - guid?: string | undefined; - studio?: string | undefined; - type?: string | undefined; - title?: string | undefined; - contentRating?: string | undefined; - summary?: string | undefined; - rating?: number | undefined; - audienceRating?: number | undefined; - year?: number | undefined; - tagline?: string | undefined; - thumb?: string | undefined; - art?: string | undefined; - duration?: number | undefined; - originallyAvailableAt?: string | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - audienceRatingImage?: string | undefined; - chapterSource?: string | undefined; - primaryExtraKey?: string | undefined; - ratingImage?: string | undefined; - Media?: Array | undefined; - Genre?: Array | undefined; - Director?: Array | undefined; - Writer?: Array | undefined; - Country?: Array | undefined; - Role?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ allowSync: z.boolean().optional(), librarySectionID: z.number().optional(), @@ -758,17 +671,7 @@ export namespace Metadata$ { /** @internal */ export namespace GetRecentlyAddedMediaContainer$ { - export type Inbound = { - size?: number | undefined; - allowSync?: boolean | undefined; - identifier?: string | undefined; - mediaTagPrefix?: string | undefined; - mediaTagVersion?: number | undefined; - mixedParents?: boolean | undefined; - Metadata?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ size: z.number().optional(), allowSync: z.boolean().optional(), @@ -832,11 +735,7 @@ export namespace GetRecentlyAddedMediaContainer$ { /** @internal */ export namespace GetRecentlyAddedResponseBody$ { - export type Inbound = { - MediaContainer?: GetRecentlyAddedMediaContainer$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ MediaContainer: z.lazy(() => GetRecentlyAddedMediaContainer$.inboundSchema).optional(), }) @@ -863,14 +762,7 @@ export namespace GetRecentlyAddedResponseBody$ { /** @internal */ export namespace GetRecentlyAddedResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: GetRecentlyAddedResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/getresizedphoto.ts b/src/models/operations/getresizedphoto.ts index 347e0ce1..a7b78acd 100644 --- a/src/models/operations/getresizedphoto.ts +++ b/src/models/operations/getresizedphoto.ts @@ -67,31 +67,27 @@ export type GetResizedPhotoResponse = { }; /** @internal */ -export const MinSize$: z.ZodNativeEnum = z.nativeEnum(MinSize); +export namespace MinSize$ { + export const inboundSchema = z.nativeEnum(MinSize); + export const outboundSchema = inboundSchema; +} /** @internal */ -export const Upscale$: z.ZodNativeEnum = z.nativeEnum(Upscale); +export namespace Upscale$ { + export const inboundSchema = z.nativeEnum(Upscale); + export const outboundSchema = inboundSchema; +} /** @internal */ export namespace GetResizedPhotoRequest$ { - export type Inbound = { - width: number; - height: number; - opacity?: number | undefined; - blur: number; - minSize: MinSize; - upscale: Upscale; - url: string; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ width: z.number(), height: z.number(), opacity: z.number().int().default(100), blur: z.number(), - minSize: MinSize$, - upscale: Upscale$, + minSize: MinSize$.inboundSchema, + upscale: Upscale$.inboundSchema, url: z.string(), }) .transform((v) => { @@ -111,8 +107,8 @@ export namespace GetResizedPhotoRequest$ { height: number; opacity: number; blur: number; - minSize: MinSize; - upscale: Upscale; + minSize: number; + upscale: number; url: string; }; @@ -122,8 +118,8 @@ export namespace GetResizedPhotoRequest$ { height: z.number(), opacity: z.number().int().default(100), blur: z.number(), - minSize: MinSize$, - upscale: Upscale$, + minSize: MinSize$.outboundSchema, + upscale: Upscale$.outboundSchema, url: z.string(), }) .transform((v) => { @@ -141,13 +137,7 @@ export namespace GetResizedPhotoRequest$ { /** @internal */ export namespace GetResizedPhotoResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/getsearchresults.ts b/src/models/operations/getsearchresults.ts index 995aa2b6..00f02bea 100644 --- a/src/models/operations/getsearchresults.ts +++ b/src/models/operations/getsearchresults.ts @@ -140,11 +140,7 @@ export type GetSearchResultsResponse = { /** @internal */ export namespace GetSearchResultsRequest$ { - export type Inbound = { - query: string; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ query: z.string(), }) @@ -171,18 +167,7 @@ export namespace GetSearchResultsRequest$ { /** @internal */ export namespace GetSearchResultsPart$ { - export type Inbound = { - id?: number | undefined; - key?: string | undefined; - duration?: number | undefined; - file?: string | undefined; - size?: number | undefined; - audioProfile?: string | undefined; - container?: string | undefined; - videoProfile?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.number().optional(), key: z.string().optional(), @@ -244,25 +229,7 @@ export namespace GetSearchResultsPart$ { /** @internal */ export namespace GetSearchResultsMedia$ { - export type Inbound = { - id?: number | undefined; - duration?: number | undefined; - bitrate?: number | undefined; - width?: number | undefined; - height?: number | undefined; - aspectRatio?: number | undefined; - audioChannels?: number | undefined; - audioCodec?: string | undefined; - videoCodec?: string | undefined; - videoResolution?: number | undefined; - container?: string | undefined; - videoFrameRate?: string | undefined; - audioProfile?: string | undefined; - videoProfile?: string | undefined; - Part?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.number().optional(), duration: z.number().optional(), @@ -363,11 +330,7 @@ export namespace GetSearchResultsMedia$ { /** @internal */ export namespace GetSearchResultsGenre$ { - export type Inbound = { - tag?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ tag: z.string().optional(), }) @@ -394,11 +357,7 @@ export namespace GetSearchResultsGenre$ { /** @internal */ export namespace GetSearchResultsDirector$ { - export type Inbound = { - tag?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ tag: z.string().optional(), }) @@ -425,11 +384,7 @@ export namespace GetSearchResultsDirector$ { /** @internal */ export namespace GetSearchResultsWriter$ { - export type Inbound = { - tag?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ tag: z.string().optional(), }) @@ -456,11 +411,7 @@ export namespace GetSearchResultsWriter$ { /** @internal */ export namespace GetSearchResultsCountry$ { - export type Inbound = { - tag?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ tag: z.string().optional(), }) @@ -487,11 +438,7 @@ export namespace GetSearchResultsCountry$ { /** @internal */ export namespace GetSearchResultsRole$ { - export type Inbound = { - tag?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ tag: z.string().optional(), }) @@ -518,44 +465,7 @@ export namespace GetSearchResultsRole$ { /** @internal */ export namespace GetSearchResultsMetadata$ { - export type Inbound = { - allowSync?: boolean | undefined; - librarySectionID?: number | undefined; - librarySectionTitle?: string | undefined; - librarySectionUUID?: string | undefined; - personal?: boolean | undefined; - sourceTitle?: string | undefined; - ratingKey?: number | undefined; - key?: string | undefined; - guid?: string | undefined; - studio?: string | undefined; - type?: string | undefined; - title?: string | undefined; - contentRating?: string | undefined; - summary?: string | undefined; - rating?: number | undefined; - audienceRating?: number | undefined; - year?: number | undefined; - tagline?: string | undefined; - thumb?: string | undefined; - art?: string | undefined; - duration?: number | undefined; - originallyAvailableAt?: string | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - audienceRatingImage?: string | undefined; - chapterSource?: string | undefined; - primaryExtraKey?: string | undefined; - ratingImage?: string | undefined; - Media?: Array | undefined; - Genre?: Array | undefined; - Director?: Array | undefined; - Writer?: Array | undefined; - Country?: Array | undefined; - Role?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ allowSync: z.boolean().optional(), librarySectionID: z.number().optional(), @@ -778,13 +688,7 @@ export namespace GetSearchResultsMetadata$ { /** @internal */ export namespace Provider$ { - export type Inbound = { - key?: string | undefined; - title?: string | undefined; - type?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ key: z.string().optional(), title: z.string().optional(), @@ -821,16 +725,7 @@ export namespace Provider$ { /** @internal */ export namespace GetSearchResultsMediaContainer$ { - export type Inbound = { - size?: number | undefined; - identifier?: string | undefined; - mediaTagPrefix?: string | undefined; - mediaTagVersion?: number | undefined; - Metadata?: Array | undefined; - Provider?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ size: z.number().optional(), identifier: z.string().optional(), @@ -891,11 +786,7 @@ export namespace GetSearchResultsMediaContainer$ { /** @internal */ export namespace GetSearchResultsResponseBody$ { - export type Inbound = { - MediaContainer?: GetSearchResultsMediaContainer$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ MediaContainer: z.lazy(() => GetSearchResultsMediaContainer$.inboundSchema).optional(), }) @@ -922,14 +813,7 @@ export namespace GetSearchResultsResponseBody$ { /** @internal */ export namespace GetSearchResultsResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: GetSearchResultsResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/getserveractivities.ts b/src/models/operations/getserveractivities.ts index 20f67de5..efd2d3b5 100644 --- a/src/models/operations/getserveractivities.ts +++ b/src/models/operations/getserveractivities.ts @@ -52,11 +52,7 @@ export type GetServerActivitiesResponse = { /** @internal */ export namespace Context$ { - export type Inbound = { - librarySectionID?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ librarySectionID: z.string().optional(), }) @@ -87,18 +83,7 @@ export namespace Context$ { /** @internal */ export namespace Activity$ { - export type Inbound = { - uuid?: string | undefined; - type?: string | undefined; - cancellable?: boolean | undefined; - userID?: number | undefined; - title?: string | undefined; - subtitle?: string | undefined; - progress?: number | undefined; - Context?: Context$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ uuid: z.string().optional(), type: z.string().optional(), @@ -160,15 +145,10 @@ export namespace Activity$ { /** @internal */ export namespace GetServerActivitiesMediaContainer$ { - export type Inbound = { - size?: number | undefined; - Activity?: Array | undefined; - }; - export const inboundSchema: z.ZodType< GetServerActivitiesMediaContainer, z.ZodTypeDef, - Inbound + unknown > = z .object({ size: z.number().optional(), @@ -205,11 +185,7 @@ export namespace GetServerActivitiesMediaContainer$ { /** @internal */ export namespace GetServerActivitiesResponseBody$ { - export type Inbound = { - MediaContainer?: GetServerActivitiesMediaContainer$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = + export const inboundSchema: z.ZodType = z .object({ MediaContainer: z @@ -247,14 +223,7 @@ export namespace GetServerActivitiesResponseBody$ { /** @internal */ export namespace GetServerActivitiesResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: GetServerActivitiesResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/getservercapabilities.ts b/src/models/operations/getservercapabilities.ts index c486c226..77eeebe4 100644 --- a/src/models/operations/getservercapabilities.ts +++ b/src/models/operations/getservercapabilities.ts @@ -92,13 +92,7 @@ export type GetServerCapabilitiesResponse = { /** @internal */ export namespace Directory$ { - export type Inbound = { - count?: number | undefined; - key?: string | undefined; - title?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ count: z.number().optional(), key: z.string().optional(), @@ -135,61 +129,7 @@ export namespace Directory$ { /** @internal */ export namespace MediaContainer$ { - export type Inbound = { - size?: number | undefined; - allowCameraUpload?: boolean | undefined; - allowChannelAccess?: boolean | undefined; - allowMediaDeletion?: boolean | undefined; - allowSharing?: boolean | undefined; - allowSync?: boolean | undefined; - allowTuners?: boolean | undefined; - backgroundProcessing?: boolean | undefined; - certificate?: boolean | undefined; - companionProxy?: boolean | undefined; - countryCode?: string | undefined; - diagnostics?: string | undefined; - eventStream?: boolean | undefined; - friendlyName?: string | undefined; - hubSearch?: boolean | undefined; - itemClusters?: boolean | undefined; - livetv?: number | undefined; - machineIdentifier?: string | undefined; - mediaProviders?: boolean | undefined; - multiuser?: boolean | undefined; - musicAnalysis?: number | undefined; - myPlex?: boolean | undefined; - myPlexMappingState?: string | undefined; - myPlexSigninState?: string | undefined; - myPlexSubscription?: boolean | undefined; - myPlexUsername?: string | undefined; - offlineTranscode?: number | undefined; - ownerFeatures?: string | undefined; - photoAutoTag?: boolean | undefined; - platform?: string | undefined; - platformVersion?: string | undefined; - pluginHost?: boolean | undefined; - pushNotifications?: boolean | undefined; - readOnlyLibraries?: boolean | undefined; - streamingBrainABRVersion?: number | undefined; - streamingBrainVersion?: number | undefined; - sync?: boolean | undefined; - transcoderActiveVideoSessions?: number | undefined; - transcoderAudio?: boolean | undefined; - transcoderLyrics?: boolean | undefined; - transcoderPhoto?: boolean | undefined; - transcoderSubtitles?: boolean | undefined; - transcoderVideo?: boolean | undefined; - transcoderVideoBitrates?: string | undefined; - transcoderVideoQualities?: string | undefined; - transcoderVideoResolutions?: string | undefined; - updatedAt?: number | undefined; - updater?: boolean | undefined; - version?: string | undefined; - voiceSearch?: boolean | undefined; - Directory?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ size: z.number().optional(), allowCameraUpload: z.boolean().optional(), @@ -558,14 +498,10 @@ export namespace MediaContainer$ { /** @internal */ export namespace GetServerCapabilitiesResponseBody$ { - export type Inbound = { - MediaContainer?: MediaContainer$.Inbound | undefined; - }; - export const inboundSchema: z.ZodType< GetServerCapabilitiesResponseBody, z.ZodTypeDef, - Inbound + unknown > = z .object({ MediaContainer: z.lazy(() => MediaContainer$.inboundSchema).optional(), @@ -597,14 +533,7 @@ export namespace GetServerCapabilitiesResponseBody$ { /** @internal */ export namespace GetServerCapabilitiesResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: GetServerCapabilitiesResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/getserveridentity.ts b/src/models/operations/getserveridentity.ts index 76661751..d28df807 100644 --- a/src/models/operations/getserveridentity.ts +++ b/src/models/operations/getserveridentity.ts @@ -39,14 +39,7 @@ export type GetServerIdentityResponse = { /** @internal */ export namespace GetServerIdentityMediaContainer$ { - export type Inbound = { - size?: number | undefined; - claimed?: boolean | undefined; - machineIdentifier?: string | undefined; - version?: string | undefined; - }; - - export const inboundSchema: z.ZodType = + export const inboundSchema: z.ZodType = z .object({ size: z.number().optional(), @@ -97,11 +90,7 @@ export namespace GetServerIdentityMediaContainer$ { /** @internal */ export namespace GetServerIdentityResponseBody$ { - export type Inbound = { - MediaContainer?: GetServerIdentityMediaContainer$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ MediaContainer: z.lazy(() => GetServerIdentityMediaContainer$.inboundSchema).optional(), }) @@ -133,14 +122,7 @@ export namespace GetServerIdentityResponseBody$ { /** @internal */ export namespace GetServerIdentityResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: GetServerIdentityResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/getserverlist.ts b/src/models/operations/getserverlist.ts index a1df3ac6..1ed0c2a7 100644 --- a/src/models/operations/getserverlist.ts +++ b/src/models/operations/getserverlist.ts @@ -46,16 +46,7 @@ export type GetServerListResponse = { /** @internal */ export namespace GetServerListServer$ { - export type Inbound = { - name?: string | undefined; - host?: string | undefined; - address?: string | undefined; - port?: number | undefined; - machineIdentifier?: string | undefined; - version?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ name: z.string().optional(), host: z.string().optional(), @@ -111,12 +102,7 @@ export namespace GetServerListServer$ { /** @internal */ export namespace GetServerListMediaContainer$ { - export type Inbound = { - size?: number | undefined; - Server?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ size: z.number().optional(), Server: z.array(z.lazy(() => GetServerListServer$.inboundSchema)).optional(), @@ -148,11 +134,7 @@ export namespace GetServerListMediaContainer$ { /** @internal */ export namespace GetServerListResponseBody$ { - export type Inbound = { - MediaContainer?: GetServerListMediaContainer$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ MediaContainer: z.lazy(() => GetServerListMediaContainer$.inboundSchema).optional(), }) @@ -179,14 +161,7 @@ export namespace GetServerListResponseBody$ { /** @internal */ export namespace GetServerListResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: GetServerListResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/getserverpreferences.ts b/src/models/operations/getserverpreferences.ts index 004d6e78..5c4ced7e 100644 --- a/src/models/operations/getserverpreferences.ts +++ b/src/models/operations/getserverpreferences.ts @@ -50,20 +50,7 @@ export type GetServerPreferencesResponse = { /** @internal */ export namespace Setting$ { - export type Inbound = { - id?: string | undefined; - label?: string | undefined; - summary?: string | undefined; - type?: string | undefined; - default?: boolean | undefined; - value?: boolean | undefined; - hidden?: boolean | undefined; - advanced?: boolean | undefined; - group?: string | undefined; - enumValues?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.string().optional(), label: z.string().optional(), @@ -135,15 +122,10 @@ export namespace Setting$ { /** @internal */ export namespace GetServerPreferencesMediaContainer$ { - export type Inbound = { - size?: number | undefined; - Setting?: Array | undefined; - }; - export const inboundSchema: z.ZodType< GetServerPreferencesMediaContainer, z.ZodTypeDef, - Inbound + unknown > = z .object({ size: z.number().int().optional(), @@ -180,11 +162,7 @@ export namespace GetServerPreferencesMediaContainer$ { /** @internal */ export namespace GetServerPreferencesResponseBody$ { - export type Inbound = { - MediaContainer?: GetServerPreferencesMediaContainer$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = + export const inboundSchema: z.ZodType = z .object({ MediaContainer: z @@ -222,14 +200,7 @@ export namespace GetServerPreferencesResponseBody$ { /** @internal */ export namespace GetServerPreferencesResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: GetServerPreferencesResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/getsessionhistory.ts b/src/models/operations/getsessionhistory.ts index 25e487fd..ace2575e 100644 --- a/src/models/operations/getsessionhistory.ts +++ b/src/models/operations/getsessionhistory.ts @@ -60,29 +60,7 @@ export type GetSessionHistoryResponse = { /** @internal */ export namespace GetSessionHistoryMetadata$ { - export type Inbound = { - historyKey?: string | undefined; - key?: string | undefined; - ratingKey?: string | undefined; - librarySectionID?: string | undefined; - parentKey?: string | undefined; - grandparentKey?: string | undefined; - title?: string | undefined; - grandparentTitle?: string | undefined; - type?: string | undefined; - thumb?: string | undefined; - parentThumb?: string | undefined; - grandparentThumb?: string | undefined; - grandparentArt?: string | undefined; - index?: number | undefined; - parentIndex?: number | undefined; - originallyAvailableAt?: string | undefined; - viewedAt?: number | undefined; - accountID?: number | undefined; - deviceID?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ historyKey: z.string().optional(), key: z.string().optional(), @@ -221,12 +199,7 @@ export namespace GetSessionHistoryMetadata$ { /** @internal */ export namespace GetSessionHistoryMediaContainer$ { - export type Inbound = { - size?: number | undefined; - Metadata?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = + export const inboundSchema: z.ZodType = z .object({ size: z.number().int().optional(), @@ -265,11 +238,7 @@ export namespace GetSessionHistoryMediaContainer$ { /** @internal */ export namespace GetSessionHistoryResponseBody$ { - export type Inbound = { - MediaContainer?: GetSessionHistoryMediaContainer$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ MediaContainer: z.lazy(() => GetSessionHistoryMediaContainer$.inboundSchema).optional(), }) @@ -301,14 +270,7 @@ export namespace GetSessionHistoryResponseBody$ { /** @internal */ export namespace GetSessionHistoryResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: GetSessionHistoryResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/getsessions.ts b/src/models/operations/getsessions.ts index ca3a6a5d..556a3dbc 100644 --- a/src/models/operations/getsessions.ts +++ b/src/models/operations/getsessions.ts @@ -154,30 +154,7 @@ export type GetSessionsResponse = { /** @internal */ export namespace GetSessionsStream$ { - export type Inbound = { - albumGain?: string | undefined; - albumPeak?: string | undefined; - albumRange?: string | undefined; - audioChannelLayout?: string | undefined; - bitDepth?: number | undefined; - bitrate?: number | undefined; - channels?: number | undefined; - codec?: string | undefined; - displayTitle?: string | undefined; - extendedDisplayTitle?: string | undefined; - gain?: string | undefined; - id?: string | undefined; - index?: number | undefined; - loudness?: string | undefined; - lra?: string | undefined; - peak?: string | undefined; - samplingRate?: number | undefined; - selected?: boolean | undefined; - streamType?: number | undefined; - location?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ albumGain: z.string().optional(), albumPeak: z.string().optional(), @@ -307,20 +284,7 @@ export namespace GetSessionsStream$ { /** @internal */ export namespace GetSessionsPart$ { - export type Inbound = { - container?: string | undefined; - duration?: number | undefined; - file?: string | undefined; - hasThumbnail?: string | undefined; - id?: string | undefined; - key?: string | undefined; - size?: number | undefined; - decision?: string | undefined; - selected?: boolean | undefined; - Stream?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ container: z.string().optional(), duration: z.number().int().optional(), @@ -392,18 +356,7 @@ export namespace GetSessionsPart$ { /** @internal */ export namespace GetSessionsMedia$ { - export type Inbound = { - audioChannels?: number | undefined; - audioCodec?: string | undefined; - bitrate?: number | undefined; - container?: string | undefined; - duration?: number | undefined; - id?: string | undefined; - selected?: boolean | undefined; - Part?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ audioChannels: z.number().int().optional(), audioCodec: z.string().optional(), @@ -465,13 +418,7 @@ export namespace GetSessionsMedia$ { /** @internal */ export namespace User$ { - export type Inbound = { - id?: string | undefined; - thumb?: string | undefined; - title?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.string().optional(), thumb: z.string().optional(), @@ -508,25 +455,7 @@ export namespace User$ { /** @internal */ export namespace Player$ { - export type Inbound = { - address?: string | undefined; - machineIdentifier?: string | undefined; - model?: string | undefined; - platform?: string | undefined; - platformVersion?: string | undefined; - product?: string | undefined; - profile?: string | undefined; - remotePublicAddress?: string | undefined; - state?: string | undefined; - title?: string | undefined; - version?: string | undefined; - local?: boolean | undefined; - relayed?: boolean | undefined; - secure?: boolean | undefined; - userID?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ address: z.string().optional(), machineIdentifier: z.string().optional(), @@ -635,13 +564,7 @@ export namespace Player$ { /** @internal */ export namespace Session$ { - export type Inbound = { - id?: string | undefined; - bandwidth?: number | undefined; - location?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.string().optional(), bandwidth: z.number().int().optional(), @@ -678,47 +601,7 @@ export namespace Session$ { /** @internal */ export namespace GetSessionsMetadata$ { - export type Inbound = { - addedAt?: number | undefined; - art?: string | undefined; - duration?: number | undefined; - grandparentArt?: string | undefined; - grandparentGuid?: string | undefined; - grandparentKey?: string | undefined; - grandparentRatingKey?: string | undefined; - grandparentThumb?: string | undefined; - grandparentTitle?: string | undefined; - guid?: string | undefined; - index?: number | undefined; - key?: string | undefined; - librarySectionID?: string | undefined; - librarySectionKey?: string | undefined; - librarySectionTitle?: string | undefined; - musicAnalysisVersion?: string | undefined; - parentGuid?: string | undefined; - parentIndex?: number | undefined; - parentKey?: string | undefined; - parentRatingKey?: string | undefined; - parentStudio?: string | undefined; - parentThumb?: string | undefined; - parentTitle?: string | undefined; - parentYear?: number | undefined; - ratingCount?: number | undefined; - ratingKey?: string | undefined; - sessionKey?: string | undefined; - thumb?: string | undefined; - title?: string | undefined; - titleSort?: string | undefined; - type?: string | undefined; - updatedAt?: number | undefined; - viewOffset?: number | undefined; - Media?: Array | undefined; - User?: User$.Inbound | undefined; - Player?: Player$.Inbound | undefined; - Session?: Session$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ addedAt: z.number().int().optional(), art: z.string().optional(), @@ -961,12 +844,7 @@ export namespace GetSessionsMetadata$ { /** @internal */ export namespace GetSessionsMediaContainer$ { - export type Inbound = { - size?: number | undefined; - Metadata?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ size: z.number().int().optional(), Metadata: z.array(z.lazy(() => GetSessionsMetadata$.inboundSchema)).optional(), @@ -998,11 +876,7 @@ export namespace GetSessionsMediaContainer$ { /** @internal */ export namespace GetSessionsResponseBody$ { - export type Inbound = { - MediaContainer?: GetSessionsMediaContainer$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ MediaContainer: z.lazy(() => GetSessionsMediaContainer$.inboundSchema).optional(), }) @@ -1029,14 +903,7 @@ export namespace GetSessionsResponseBody$ { /** @internal */ export namespace GetSessionsResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: GetSessionsResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/getsourceconnectioninformation.ts b/src/models/operations/getsourceconnectioninformation.ts index 1ddeb290..c0c8e027 100644 --- a/src/models/operations/getsourceconnectioninformation.ts +++ b/src/models/operations/getsourceconnectioninformation.ts @@ -28,14 +28,10 @@ export type GetSourceConnectionInformationResponse = { /** @internal */ export namespace GetSourceConnectionInformationRequest$ { - export type Inbound = { - source: string; - }; - export const inboundSchema: z.ZodType< GetSourceConnectionInformationRequest, z.ZodTypeDef, - Inbound + unknown > = z .object({ source: z.string(), @@ -67,16 +63,10 @@ export namespace GetSourceConnectionInformationRequest$ { /** @internal */ export namespace GetSourceConnectionInformationResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - }; - export const inboundSchema: z.ZodType< GetSourceConnectionInformationResponse, z.ZodTypeDef, - Inbound + unknown > = z .object({ ContentType: z.string(), diff --git a/src/models/operations/getstatistics.ts b/src/models/operations/getstatistics.ts index 619b569d..ef684423 100644 --- a/src/models/operations/getstatistics.ts +++ b/src/models/operations/getstatistics.ts @@ -79,11 +79,7 @@ export type GetStatisticsResponse = { /** @internal */ export namespace GetStatisticsRequest$ { - export type Inbound = { - Timespan?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ Timespan: z.number().int().optional(), }) @@ -110,15 +106,7 @@ export namespace GetStatisticsRequest$ { /** @internal */ export namespace GetStatisticsDevice$ { - export type Inbound = { - id?: number | undefined; - name?: string | undefined; - platform?: string | undefined; - clientIdentifier?: string | undefined; - createdAt?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.number().int().optional(), name: z.string().optional(), @@ -169,18 +157,7 @@ export namespace GetStatisticsDevice$ { /** @internal */ export namespace Account$ { - export type Inbound = { - id?: number | undefined; - key?: string | undefined; - name?: string | undefined; - defaultAudioLanguage?: string | undefined; - autoSelectAudio?: boolean | undefined; - defaultSubtitleLanguage?: string | undefined; - subtitleMode?: number | undefined; - thumb?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ id: z.number().int().optional(), key: z.string().optional(), @@ -254,17 +231,7 @@ export namespace Account$ { /** @internal */ export namespace StatisticsMedia$ { - export type Inbound = { - accountID?: number | undefined; - deviceID?: number | undefined; - timespan?: number | undefined; - at?: number | undefined; - metadataType?: number | undefined; - count?: number | undefined; - duration?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ accountID: z.number().int().optional(), deviceID: z.number().int().optional(), @@ -321,14 +288,7 @@ export namespace StatisticsMedia$ { /** @internal */ export namespace GetStatisticsMediaContainer$ { - export type Inbound = { - size?: number | undefined; - Device?: Array | undefined; - Account?: Array | undefined; - StatisticsMedia?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ size: z.number().int().optional(), Device: z.array(z.lazy(() => GetStatisticsDevice$.inboundSchema)).optional(), @@ -374,11 +334,7 @@ export namespace GetStatisticsMediaContainer$ { /** @internal */ export namespace GetStatisticsResponseBody$ { - export type Inbound = { - MediaContainer?: GetStatisticsMediaContainer$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ MediaContainer: z.lazy(() => GetStatisticsMediaContainer$.inboundSchema).optional(), }) @@ -405,14 +361,7 @@ export namespace GetStatisticsResponseBody$ { /** @internal */ export namespace GetStatisticsResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: GetStatisticsResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/gettimeline.ts b/src/models/operations/gettimeline.ts index d25b6e9e..da5a5a6a 100644 --- a/src/models/operations/gettimeline.ts +++ b/src/models/operations/gettimeline.ts @@ -72,28 +72,18 @@ export type GetTimelineResponse = { }; /** @internal */ -export const State$: z.ZodNativeEnum = z.nativeEnum(State); +export namespace State$ { + export const inboundSchema = z.nativeEnum(State); + export const outboundSchema = inboundSchema; +} /** @internal */ export namespace GetTimelineRequest$ { - export type Inbound = { - ratingKey: number; - key: string; - state: State; - hasMDE: number; - time: number; - duration: number; - context: string; - playQueueItemID: number; - playBackTime: number; - row: number; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ratingKey: z.number(), key: z.string(), - state: State$, + state: State$.inboundSchema, hasMDE: z.number(), time: z.number(), duration: z.number(), @@ -120,7 +110,7 @@ export namespace GetTimelineRequest$ { export type Outbound = { ratingKey: number; key: string; - state: State; + state: string; hasMDE: number; time: number; duration: number; @@ -134,7 +124,7 @@ export namespace GetTimelineRequest$ { .object({ ratingKey: z.number(), key: z.string(), - state: State$, + state: State$.outboundSchema, hasMDE: z.number(), time: z.number(), duration: z.number(), @@ -161,13 +151,7 @@ export namespace GetTimelineRequest$ { /** @internal */ export namespace GetTimelineResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/gettoken.ts b/src/models/operations/gettoken.ts index 3daf9a19..ab74516b 100644 --- a/src/models/operations/gettoken.ts +++ b/src/models/operations/gettoken.ts @@ -6,6 +6,18 @@ import * as z from "zod"; export const GetTokenServerList = ["https://plex.tv/api/v2"] as const; +export type GetTokenGlobals = { + /** + * The unique identifier for the client application + * + * @remarks + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + * + */ + xPlexClientIdentifier: string; +}; + export type GetTokenRequest = { /** * The PinID to retrieve an access token for @@ -38,13 +50,35 @@ export type GetTokenResponse = { }; /** @internal */ -export namespace GetTokenRequest$ { - export type Inbound = { - pinID: string; - "X-Plex-Client-Identifier"?: string | undefined; +export namespace GetTokenGlobals$ { + export const inboundSchema: z.ZodType = z + .object({ + "X-Plex-Client-Identifier": z.string(), + }) + .transform((v) => { + return { + xPlexClientIdentifier: v["X-Plex-Client-Identifier"], + }; + }); + + export type Outbound = { + "X-Plex-Client-Identifier": string; }; - export const inboundSchema: z.ZodType = z + export const outboundSchema: z.ZodType = z + .object({ + xPlexClientIdentifier: z.string(), + }) + .transform((v) => { + return { + "X-Plex-Client-Identifier": v.xPlexClientIdentifier, + }; + }); +} + +/** @internal */ +export namespace GetTokenRequest$ { + export const inboundSchema: z.ZodType = z .object({ pinID: z.string(), "X-Plex-Client-Identifier": z.string().optional(), @@ -80,13 +114,7 @@ export namespace GetTokenRequest$ { /** @internal */ export namespace GetTokenResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/gettranscodesessions.ts b/src/models/operations/gettranscodesessions.ts index 3b95f118..8c497989 100644 --- a/src/models/operations/gettranscodesessions.ts +++ b/src/models/operations/gettranscodesessions.ts @@ -64,34 +64,7 @@ export type GetTranscodeSessionsResponse = { /** @internal */ export namespace TranscodeSession$ { - export type Inbound = { - key?: string | undefined; - throttled?: boolean | undefined; - complete?: boolean | undefined; - progress?: number | undefined; - size?: number | undefined; - speed?: number | undefined; - error?: boolean | undefined; - duration?: number | undefined; - remaining?: number | undefined; - context?: string | undefined; - sourceVideoCodec?: string | undefined; - sourceAudioCodec?: string | undefined; - videoDecision?: string | undefined; - audioDecision?: string | undefined; - subtitleDecision?: string | undefined; - protocol?: string | undefined; - container?: string | undefined; - videoCodec?: string | undefined; - audioCodec?: string | undefined; - audioChannels?: number | undefined; - transcodeHwRequested?: boolean | undefined; - timeStamp?: number | undefined; - maxOffsetAvailable?: number | undefined; - minOffsetAvailable?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ key: z.string().optional(), throttled: z.boolean().optional(), @@ -257,15 +230,10 @@ export namespace TranscodeSession$ { /** @internal */ export namespace GetTranscodeSessionsMediaContainer$ { - export type Inbound = { - size?: number | undefined; - TranscodeSession?: Array | undefined; - }; - export const inboundSchema: z.ZodType< GetTranscodeSessionsMediaContainer, z.ZodTypeDef, - Inbound + unknown > = z .object({ size: z.number().int().optional(), @@ -306,11 +274,7 @@ export namespace GetTranscodeSessionsMediaContainer$ { /** @internal */ export namespace GetTranscodeSessionsResponseBody$ { - export type Inbound = { - MediaContainer?: GetTranscodeSessionsMediaContainer$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = + export const inboundSchema: z.ZodType = z .object({ MediaContainer: z @@ -348,14 +312,7 @@ export namespace GetTranscodeSessionsResponseBody$ { /** @internal */ export namespace GetTranscodeSessionsResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: GetTranscodeSessionsResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/gettransienttoken.ts b/src/models/operations/gettransienttoken.ts index 4d44f529..17e2e068 100644 --- a/src/models/operations/gettransienttoken.ts +++ b/src/models/operations/gettransienttoken.ts @@ -45,24 +45,23 @@ export type GetTransientTokenResponse = { }; /** @internal */ -export const GetTransientTokenQueryParamType$: z.ZodNativeEnum< - typeof GetTransientTokenQueryParamType -> = z.nativeEnum(GetTransientTokenQueryParamType); +export namespace GetTransientTokenQueryParamType$ { + export const inboundSchema = z.nativeEnum(GetTransientTokenQueryParamType); + export const outboundSchema = inboundSchema; +} /** @internal */ -export const Scope$: z.ZodNativeEnum = z.nativeEnum(Scope); +export namespace Scope$ { + export const inboundSchema = z.nativeEnum(Scope); + export const outboundSchema = inboundSchema; +} /** @internal */ export namespace GetTransientTokenRequest$ { - export type Inbound = { - type: GetTransientTokenQueryParamType; - scope: Scope; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ - type: GetTransientTokenQueryParamType$, - scope: Scope$, + type: GetTransientTokenQueryParamType$.inboundSchema, + scope: Scope$.inboundSchema, }) .transform((v) => { return { @@ -72,14 +71,14 @@ export namespace GetTransientTokenRequest$ { }); export type Outbound = { - type: GetTransientTokenQueryParamType; - scope: Scope; + type: string; + scope: string; }; export const outboundSchema: z.ZodType = z .object({ - type: GetTransientTokenQueryParamType$, - scope: Scope$, + type: GetTransientTokenQueryParamType$.outboundSchema, + scope: Scope$.outboundSchema, }) .transform((v) => { return { @@ -91,13 +90,7 @@ export namespace GetTransientTokenRequest$ { /** @internal */ export namespace GetTransientTokenResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/getupdatestatus.ts b/src/models/operations/getupdatestatus.ts index 1680938d..71058d1a 100644 --- a/src/models/operations/getupdatestatus.ts +++ b/src/models/operations/getupdatestatus.ts @@ -50,16 +50,7 @@ export type GetUpdateStatusResponse = { /** @internal */ export namespace Release$ { - export type Inbound = { - key?: string | undefined; - version?: string | undefined; - added?: string | undefined; - fixed?: string | undefined; - downloadURL?: string | undefined; - state?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ key: z.string().optional(), version: z.string().optional(), @@ -111,16 +102,7 @@ export namespace Release$ { /** @internal */ export namespace GetUpdateStatusMediaContainer$ { - export type Inbound = { - size?: number | undefined; - canInstall?: boolean | undefined; - checkedAt?: number | undefined; - downloadURL?: string | undefined; - status?: number | undefined; - Release?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ size: z.number().int().optional(), canInstall: z.boolean().optional(), @@ -173,11 +155,7 @@ export namespace GetUpdateStatusMediaContainer$ { /** @internal */ export namespace GetUpdateStatusResponseBody$ { - export type Inbound = { - MediaContainer?: GetUpdateStatusMediaContainer$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ MediaContainer: z.lazy(() => GetUpdateStatusMediaContainer$.inboundSchema).optional(), }) @@ -204,14 +182,7 @@ export namespace GetUpdateStatusResponseBody$ { /** @internal */ export namespace GetUpdateStatusResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: GetUpdateStatusResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/index.ts b/src/models/operations/index.ts index 0e3731dd..60502207 100644 --- a/src/models/operations/index.ts +++ b/src/models/operations/index.ts @@ -19,6 +19,7 @@ export * from "./getglobalhubs"; export * from "./getlibraries"; export * from "./getlibrary"; export * from "./getlibraryhubs"; +export * from "./getlibraryitems"; export * from "./getmetadata"; export * from "./getmetadatachildren"; export * from "./getmyplexaccount"; diff --git a/src/models/operations/logline.ts b/src/models/operations/logline.ts index c4d06646..c1920684 100644 --- a/src/models/operations/logline.ts +++ b/src/models/operations/logline.ts @@ -62,19 +62,16 @@ export type LogLineResponse = { }; /** @internal */ -export const Level$: z.ZodNativeEnum = z.nativeEnum(Level); +export namespace Level$ { + export const inboundSchema = z.nativeEnum(Level); + export const outboundSchema = inboundSchema; +} /** @internal */ export namespace LogLineRequest$ { - export type Inbound = { - level: Level; - message: string; - source: string; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ - level: Level$, + level: Level$.inboundSchema, message: z.string(), source: z.string(), }) @@ -87,14 +84,14 @@ export namespace LogLineRequest$ { }); export type Outbound = { - level: Level; + level: number; message: string; source: string; }; export const outboundSchema: z.ZodType = z .object({ - level: Level$, + level: Level$.outboundSchema, message: z.string(), source: z.string(), }) @@ -109,13 +106,7 @@ export namespace LogLineRequest$ { /** @internal */ export namespace LogLineResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/logmultiline.ts b/src/models/operations/logmultiline.ts index 72e3eaad..80b4bceb 100644 --- a/src/models/operations/logmultiline.ts +++ b/src/models/operations/logmultiline.ts @@ -21,13 +21,7 @@ export type LogMultiLineResponse = { /** @internal */ export namespace LogMultiLineResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/markplayed.ts b/src/models/operations/markplayed.ts index 3ec8ed2f..44441fa5 100644 --- a/src/models/operations/markplayed.ts +++ b/src/models/operations/markplayed.ts @@ -28,11 +28,7 @@ export type MarkPlayedResponse = { /** @internal */ export namespace MarkPlayedRequest$ { - export type Inbound = { - key: number; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ key: z.number(), }) @@ -59,13 +55,7 @@ export namespace MarkPlayedRequest$ { /** @internal */ export namespace MarkPlayedResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/markunplayed.ts b/src/models/operations/markunplayed.ts index 981a827c..ab6f50d6 100644 --- a/src/models/operations/markunplayed.ts +++ b/src/models/operations/markunplayed.ts @@ -28,11 +28,7 @@ export type MarkUnplayedResponse = { /** @internal */ export namespace MarkUnplayedRequest$ { - export type Inbound = { - key: number; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ key: z.number(), }) @@ -59,13 +55,7 @@ export namespace MarkUnplayedRequest$ { /** @internal */ export namespace MarkUnplayedResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/performsearch.ts b/src/models/operations/performsearch.ts index 70a2424a..9fbe0a7e 100644 --- a/src/models/operations/performsearch.ts +++ b/src/models/operations/performsearch.ts @@ -36,13 +36,7 @@ export type PerformSearchResponse = { /** @internal */ export namespace PerformSearchRequest$ { - export type Inbound = { - query: string; - sectionId?: number | undefined; - limit?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ query: z.string(), sectionId: z.number().optional(), @@ -79,13 +73,7 @@ export namespace PerformSearchRequest$ { /** @internal */ export namespace PerformSearchResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/performvoicesearch.ts b/src/models/operations/performvoicesearch.ts index 11e7213d..4a66a0c6 100644 --- a/src/models/operations/performvoicesearch.ts +++ b/src/models/operations/performvoicesearch.ts @@ -36,13 +36,7 @@ export type PerformVoiceSearchResponse = { /** @internal */ export namespace PerformVoiceSearchRequest$ { - export type Inbound = { - query: string; - sectionId?: number | undefined; - limit?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ query: z.string(), sectionId: z.number().optional(), @@ -79,13 +73,7 @@ export namespace PerformVoiceSearchRequest$ { /** @internal */ export namespace PerformVoiceSearchResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/refreshlibrary.ts b/src/models/operations/refreshlibrary.ts index 0c2ff887..ac024ca4 100644 --- a/src/models/operations/refreshlibrary.ts +++ b/src/models/operations/refreshlibrary.ts @@ -28,11 +28,7 @@ export type RefreshLibraryResponse = { /** @internal */ export namespace RefreshLibraryRequest$ { - export type Inbound = { - sectionId: number; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ sectionId: z.number(), }) @@ -59,13 +55,7 @@ export namespace RefreshLibraryRequest$ { /** @internal */ export namespace RefreshLibraryResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/searchlibrary.ts b/src/models/operations/searchlibrary.ts index 19894d93..95a5dac2 100644 --- a/src/models/operations/searchlibrary.ts +++ b/src/models/operations/searchlibrary.ts @@ -91,19 +91,17 @@ export type SearchLibraryResponse = { }; /** @internal */ -export const Type$: z.ZodNativeEnum = z.nativeEnum(Type); +export namespace Type$ { + export const inboundSchema = z.nativeEnum(Type); + export const outboundSchema = inboundSchema; +} /** @internal */ export namespace SearchLibraryRequest$ { - export type Inbound = { - sectionId: number; - type: Type; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ sectionId: z.number().int(), - type: Type$, + type: Type$.inboundSchema, }) .transform((v) => { return { @@ -114,13 +112,13 @@ export namespace SearchLibraryRequest$ { export type Outbound = { sectionId: number; - type: Type; + type: number; }; export const outboundSchema: z.ZodType = z .object({ sectionId: z.number().int(), - type: Type$, + type: Type$.outboundSchema, }) .transform((v) => { return { @@ -132,30 +130,7 @@ export namespace SearchLibraryRequest$ { /** @internal */ export namespace SearchLibraryMetadata$ { - export type Inbound = { - ratingKey?: string | undefined; - key?: string | undefined; - parentRatingKey?: string | undefined; - guid?: string | undefined; - parentGuid?: string | undefined; - parentStudio?: string | undefined; - type?: string | undefined; - title?: string | undefined; - parentKey?: string | undefined; - parentTitle?: string | undefined; - summary?: string | undefined; - index?: number | undefined; - parentIndex?: number | undefined; - parentYear?: number | undefined; - thumb?: string | undefined; - art?: string | undefined; - parentThumb?: string | undefined; - parentTheme?: string | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ratingKey: z.string().optional(), key: z.string().optional(), @@ -281,23 +256,7 @@ export namespace SearchLibraryMetadata$ { /** @internal */ export namespace SearchLibraryMediaContainer$ { - export type Inbound = { - size?: number | undefined; - allowSync?: boolean | undefined; - art?: string | undefined; - identifier?: string | undefined; - mediaTagPrefix?: string | undefined; - mediaTagVersion?: number | undefined; - nocache?: boolean | undefined; - thumb?: string | undefined; - title1?: string | undefined; - title2?: string | undefined; - viewGroup?: string | undefined; - viewMode?: number | undefined; - Metadata?: Array | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ size: z.number().int().optional(), allowSync: z.boolean().optional(), @@ -388,11 +347,7 @@ export namespace SearchLibraryMediaContainer$ { /** @internal */ export namespace SearchLibraryResponseBody$ { - export type Inbound = { - MediaContainer?: SearchLibraryMediaContainer$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ MediaContainer: z.lazy(() => SearchLibraryMediaContainer$.inboundSchema).optional(), }) @@ -419,14 +374,7 @@ export namespace SearchLibraryResponseBody$ { /** @internal */ export namespace SearchLibraryResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: SearchLibraryResponseBody$.Inbound | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/startalltasks.ts b/src/models/operations/startalltasks.ts index 16f67bb6..e1466d95 100644 --- a/src/models/operations/startalltasks.ts +++ b/src/models/operations/startalltasks.ts @@ -21,13 +21,7 @@ export type StartAllTasksResponse = { /** @internal */ export namespace StartAllTasksResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/starttask.ts b/src/models/operations/starttask.ts index 802c68fb..a89618e6 100644 --- a/src/models/operations/starttask.ts +++ b/src/models/operations/starttask.ts @@ -47,17 +47,16 @@ export type StartTaskResponse = { }; /** @internal */ -export const TaskName$: z.ZodNativeEnum = z.nativeEnum(TaskName); +export namespace TaskName$ { + export const inboundSchema = z.nativeEnum(TaskName); + export const outboundSchema = inboundSchema; +} /** @internal */ export namespace StartTaskRequest$ { - export type Inbound = { - taskName: TaskName; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ - taskName: TaskName$, + taskName: TaskName$.inboundSchema, }) .transform((v) => { return { @@ -66,12 +65,12 @@ export namespace StartTaskRequest$ { }); export type Outbound = { - taskName: TaskName; + taskName: string; }; export const outboundSchema: z.ZodType = z .object({ - taskName: TaskName$, + taskName: TaskName$.outboundSchema, }) .transform((v) => { return { @@ -82,13 +81,7 @@ export namespace StartTaskRequest$ { /** @internal */ export namespace StartTaskResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/startuniversaltranscode.ts b/src/models/operations/startuniversaltranscode.ts index 302802a4..5f49d463 100644 --- a/src/models/operations/startuniversaltranscode.ts +++ b/src/models/operations/startuniversaltranscode.ts @@ -88,26 +88,7 @@ export type StartUniversalTranscodeResponse = { /** @internal */ export namespace StartUniversalTranscodeRequest$ { - export type Inbound = { - hasMDE: number; - path: string; - mediaIndex: number; - partIndex: number; - protocol: string; - fastSeek?: number | undefined; - directPlay?: number | undefined; - directStream?: number | undefined; - subtitleSize?: number | undefined; - subtites?: string | undefined; - audioBoost?: number | undefined; - location?: string | undefined; - mediaBufferSize?: number | undefined; - session?: string | undefined; - addDebugOverlay?: number | undefined; - autoAdjustQuality?: number | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ hasMDE: z.number(), path: z.string(), @@ -222,13 +203,7 @@ export namespace StartUniversalTranscodeRequest$ { /** @internal */ export namespace StartUniversalTranscodeResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - }; - - export const inboundSchema: z.ZodType = + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), diff --git a/src/models/operations/stopalltasks.ts b/src/models/operations/stopalltasks.ts index 5d60a112..cc071f92 100644 --- a/src/models/operations/stopalltasks.ts +++ b/src/models/operations/stopalltasks.ts @@ -21,13 +21,7 @@ export type StopAllTasksResponse = { /** @internal */ export namespace StopAllTasksResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/stoptask.ts b/src/models/operations/stoptask.ts index 1b484238..5c9c67ec 100644 --- a/src/models/operations/stoptask.ts +++ b/src/models/operations/stoptask.ts @@ -47,18 +47,16 @@ export type StopTaskResponse = { }; /** @internal */ -export const PathParamTaskName$: z.ZodNativeEnum = - z.nativeEnum(PathParamTaskName); +export namespace PathParamTaskName$ { + export const inboundSchema = z.nativeEnum(PathParamTaskName); + export const outboundSchema = inboundSchema; +} /** @internal */ export namespace StopTaskRequest$ { - export type Inbound = { - taskName: PathParamTaskName; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ - taskName: PathParamTaskName$, + taskName: PathParamTaskName$.inboundSchema, }) .transform((v) => { return { @@ -67,12 +65,12 @@ export namespace StopTaskRequest$ { }); export type Outbound = { - taskName: PathParamTaskName; + taskName: string; }; export const outboundSchema: z.ZodType = z .object({ - taskName: PathParamTaskName$, + taskName: PathParamTaskName$.outboundSchema, }) .transform((v) => { return { @@ -83,13 +81,7 @@ export namespace StopTaskRequest$ { /** @internal */ export namespace StopTaskResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/stoptranscodesession.ts b/src/models/operations/stoptranscodesession.ts index 58f6b713..ce9158e5 100644 --- a/src/models/operations/stoptranscodesession.ts +++ b/src/models/operations/stoptranscodesession.ts @@ -28,11 +28,7 @@ export type StopTranscodeSessionResponse = { /** @internal */ export namespace StopTranscodeSessionRequest$ { - export type Inbound = { - sessionKey: string; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ sessionKey: z.string(), }) @@ -59,13 +55,7 @@ export namespace StopTranscodeSessionRequest$ { /** @internal */ export namespace StopTranscodeSessionResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/updateplaylist.ts b/src/models/operations/updateplaylist.ts index 18f02fdc..ab0344bb 100644 --- a/src/models/operations/updateplaylist.ts +++ b/src/models/operations/updateplaylist.ts @@ -36,13 +36,7 @@ export type UpdatePlaylistResponse = { /** @internal */ export namespace UpdatePlaylistRequest$ { - export type Inbound = { - playlistID: number; - title?: string | undefined; - summary?: string | undefined; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ playlistID: z.number(), title: z.string().optional(), @@ -79,13 +73,7 @@ export namespace UpdatePlaylistRequest$ { /** @internal */ export namespace UpdatePlaylistResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/updateplayprogress.ts b/src/models/operations/updateplayprogress.ts index e108c9fe..eb585db2 100644 --- a/src/models/operations/updateplayprogress.ts +++ b/src/models/operations/updateplayprogress.ts @@ -36,13 +36,7 @@ export type UpdatePlayProgressResponse = { /** @internal */ export namespace UpdatePlayProgressRequest$ { - export type Inbound = { - key: string; - time: number; - state: string; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ key: z.string(), time: z.number(), @@ -79,13 +73,7 @@ export namespace UpdatePlayProgressRequest$ { /** @internal */ export namespace UpdatePlayProgressResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/models/operations/uploadplaylist.ts b/src/models/operations/uploadplaylist.ts index 2bf219c2..67043af3 100644 --- a/src/models/operations/uploadplaylist.ts +++ b/src/models/operations/uploadplaylist.ts @@ -59,19 +59,17 @@ export type UploadPlaylistResponse = { }; /** @internal */ -export const Force$: z.ZodNativeEnum = z.nativeEnum(Force); +export namespace Force$ { + export const inboundSchema = z.nativeEnum(Force); + export const outboundSchema = inboundSchema; +} /** @internal */ export namespace UploadPlaylistRequest$ { - export type Inbound = { - path: string; - force: Force; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ path: z.string(), - force: Force$, + force: Force$.inboundSchema, }) .transform((v) => { return { @@ -82,13 +80,13 @@ export namespace UploadPlaylistRequest$ { export type Outbound = { path: string; - force: Force; + force: number; }; export const outboundSchema: z.ZodType = z .object({ path: z.string(), - force: Force$, + force: Force$.outboundSchema, }) .transform((v) => { return { @@ -100,13 +98,7 @@ export namespace UploadPlaylistRequest$ { /** @internal */ export namespace UploadPlaylistResponse$ { - export type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - }; - - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ ContentType: z.string(), StatusCode: z.number().int(), diff --git a/src/sdk/activities.ts b/src/sdk/activities.ts index 8b0dfac0..7f918548 100644 --- a/src/sdk/activities.ts +++ b/src/sdk/activities.ts @@ -92,40 +92,13 @@ export class Activities extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.GetServerActivitiesResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetServerActivitiesResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.GetServerActivitiesResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetServerActivitiesResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } /** @@ -200,34 +173,12 @@ export class Activities extends ClientSDK { Headers: {}, }; - if (this.matchStatusCode(response, 200)) { - // fallthrough - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.CancelServerActivitiesResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .void(200, operations.CancelServerActivitiesResponse$) + .fail([400, "4XX", "5XX"]) + .json(401, errors.CancelServerActivitiesResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); - return schemas$.parse( - undefined, - () => operations.CancelServerActivitiesResponse$.inboundSchema.parse(responseFields$), - "Response validation failed" - ); + return result$; } } diff --git a/src/sdk/authentication.ts b/src/sdk/authentication.ts index 72e570b2..1ccac20b 100644 --- a/src/sdk/authentication.ts +++ b/src/sdk/authentication.ts @@ -112,35 +112,13 @@ export class Authentication extends ClientSDK { Headers: {}, }; - if (this.matchStatusCode(response, 200)) { - // fallthrough - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetTransientTokenResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .void(200, operations.GetTransientTokenResponse$) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetTransientTokenResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); - return schemas$.parse( - undefined, - () => operations.GetTransientTokenResponse$.inboundSchema.parse(responseFields$), - "Response validation failed" - ); + return result$; } /** @@ -216,37 +194,12 @@ export class Authentication extends ClientSDK { Headers: {}, }; - if (this.matchStatusCode(response, 200)) { - // fallthrough - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetSourceConnectionInformationResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .void(200, operations.GetSourceConnectionInformationResponse$) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetSourceConnectionInformationResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); - return schemas$.parse( - undefined, - () => - operations.GetSourceConnectionInformationResponse$.inboundSchema.parse( - responseFields$ - ), - "Response validation failed" - ); + return result$; } } diff --git a/src/sdk/butler.ts b/src/sdk/butler.ts index eee70ab1..e77bd8e6 100644 --- a/src/sdk/butler.ts +++ b/src/sdk/butler.ts @@ -90,40 +90,13 @@ export class Butler extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.GetButlerTasksResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetButlerTasksResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.GetButlerTasksResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetButlerTasksResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } /** @@ -183,35 +156,13 @@ export class Butler extends ClientSDK { Headers: {}, }; - if (this.matchStatusCode(response, 200)) { - // fallthrough - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.StartAllTasksResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .void(200, operations.StartAllTasksResponse$) + .fail([400, "4XX", "5XX"]) + .json(401, errors.StartAllTasksResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); - return schemas$.parse( - undefined, - () => operations.StartAllTasksResponse$.inboundSchema.parse(responseFields$), - "Response validation failed" - ); + return result$; } /** @@ -267,35 +218,13 @@ export class Butler extends ClientSDK { Headers: {}, }; - if (this.matchStatusCode(response, 200)) { - // fallthrough - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.StopAllTasksResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .void(200, operations.StopAllTasksResponse$) + .fail([400, "4XX", "5XX"]) + .json(401, errors.StopAllTasksResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); - return schemas$.parse( - undefined, - () => operations.StopAllTasksResponse$.inboundSchema.parse(responseFields$), - "Response validation failed" - ); + return result$; } /** @@ -375,35 +304,13 @@ export class Butler extends ClientSDK { Headers: {}, }; - if (this.matchStatusCode(response, [200, 202])) { - // fallthrough - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.StartTaskResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .void([200, 202], operations.StartTaskResponse$) + .fail([400, "4XX", "5XX"]) + .json(401, errors.StartTaskResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); - return schemas$.parse( - undefined, - () => operations.StartTaskResponse$.inboundSchema.parse(responseFields$), - "Response validation failed" - ); + return result$; } /** @@ -479,34 +386,12 @@ export class Butler extends ClientSDK { Headers: {}, }; - if (this.matchStatusCode(response, 200)) { - // fallthrough - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.StopTaskResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .void(200, operations.StopTaskResponse$) + .fail([400, 404, "4XX", "5XX"]) + .json(401, errors.StopTaskResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); - return schemas$.parse( - undefined, - () => operations.StopTaskResponse$.inboundSchema.parse(responseFields$), - "Response validation failed" - ); + return result$; } } diff --git a/src/sdk/hubs.ts b/src/sdk/hubs.ts index 50dd1659..90230bd7 100644 --- a/src/sdk/hubs.ts +++ b/src/sdk/hubs.ts @@ -114,40 +114,13 @@ export class Hubs extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.GetGlobalHubsResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetGlobalHubsResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.GetGlobalHubsResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetGlobalHubsResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } /** @@ -235,39 +208,12 @@ export class Hubs extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.GetLibraryHubsResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetLibraryHubsResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.GetLibraryHubsResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetLibraryHubsResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } } diff --git a/src/sdk/library.ts b/src/sdk/library.ts index 3ce388eb..04eac49a 100644 --- a/src/sdk/library.ts +++ b/src/sdk/library.ts @@ -111,35 +111,13 @@ export class Library extends ClientSDK { Headers: {}, }; - if (this.matchStatusCode(response, 200)) { - // fallthrough - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetFileHashResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .void(200, operations.GetFileHashResponse$) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetFileHashResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); - return schemas$.parse( - undefined, - () => operations.GetFileHashResponse$.inboundSchema.parse(responseFields$), - "Response validation failed" - ); + return result$; } /** @@ -195,40 +173,13 @@ export class Library extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.GetRecentlyAddedResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetRecentlyAddedResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.GetRecentlyAddedResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetRecentlyAddedResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } /** @@ -289,40 +240,13 @@ export class Library extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.GetLibrariesResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetLibrariesResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.GetLibrariesResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetLibrariesResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } /** @@ -445,40 +369,13 @@ export class Library extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.GetLibraryResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetLibraryResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.GetLibraryResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetLibraryResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } /** @@ -553,35 +450,120 @@ export class Library extends ClientSDK { Headers: {}, }; - if (this.matchStatusCode(response, 200)) { - // fallthrough - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.DeleteLibraryResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .void(200, operations.DeleteLibraryResponse$) + .fail([400, "4XX", "5XX"]) + .json(401, errors.DeleteLibraryResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); - return schemas$.parse( - undefined, - () => operations.DeleteLibraryResponse$.inboundSchema.parse(responseFields$), - "Response validation failed" + return result$; + } + + /** + * Get Library Items + * + * @remarks + * Fetches details from a specific section of the library identified by a section key and a tag. The tag parameter accepts the following values: + * - `all`: All items in the section. + * - `unwatched`: Items that have not been played. + * - `newest`: Items that are recently released. + * - `recentlyAdded`: Items that are recently added to the library. + * - `recentlyViewed`: Items that were recently viewed. + * - `onDeck`: Items to continue watching. + * - `collection`: Items categorized by collection. + * - `edition`: Items categorized by edition. + * - `genre`: Items categorized by genre. + * - `year`: Items categorized by year of release. + * - `decade`: Items categorized by decade. + * - `director`: Items categorized by director. + * - `actor`: Items categorized by starring actor. + * - `country`: Items categorized by country of origin. + * - `contentRating`: Items categorized by content rating. + * - `rating`: Items categorized by rating. + * - `resolution`: Items categorized by resolution. + * - `firstCharacter`: Items categorized by the first letter. + * - `folder`: Items categorized by folder. + * + */ + async getLibraryItems( + sectionId: number, + tag: operations.Tag, + options?: RequestOptions + ): Promise { + const input$: operations.GetLibraryItemsRequest = { + sectionId: sectionId, + tag: tag, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = schemas$.parse( + input$, + (value$) => operations.GetLibraryItemsRequest$.outboundSchema.parse(value$), + "Input validation failed" ); + const body$ = null; + + const pathParams$ = { + sectionId: enc$.encodeSimple("sectionId", payload$.sectionId, { + explode: false, + charEncoding: "percent", + }), + tag: enc$.encodeSimple("tag", payload$.tag, { + explode: false, + charEncoding: "percent", + }), + }; + const path$ = this.templateURLComponent("/library/sections/{sectionId}/{tag}")(pathParams$); + + const query$ = ""; + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const context = { + operationID: "getLibraryItems", + oAuth2Scopes: [], + securitySource: this.options$.accessToken, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; + const request$ = this.createRequest$( + context, + { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const response = await this.do$(request$, doOptions); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + + const [result$] = await this.matcher() + .json(200, operations.GetLibraryItemsResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetLibraryItemsResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } /** @@ -659,35 +641,13 @@ export class Library extends ClientSDK { Headers: {}, }; - if (this.matchStatusCode(response, 200)) { - // fallthrough - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.RefreshLibraryResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .void(200, operations.RefreshLibraryResponse$) + .fail([400, "4XX", "5XX"]) + .json(401, errors.RefreshLibraryResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); - return schemas$.parse( - undefined, - () => operations.RefreshLibraryResponse$.inboundSchema.parse(responseFields$), - "Response validation failed" - ); + return result$; } /** @@ -765,7 +725,7 @@ export class Library extends ClientSDK { }; const securitySettings$ = this.resolveGlobalSecurity(security$); - const doOptions = { context, errorCodes: ["4XX", "5XX"] }; + const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; const request$ = this.createRequest$( context, { @@ -788,27 +748,13 @@ export class Library extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.SearchLibraryResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.SearchLibraryResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.SearchLibraryResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } /** @@ -884,40 +830,13 @@ export class Library extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.GetMetadataResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetMetadataResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.GetMetadataResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetMetadataResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } /** @@ -995,40 +914,13 @@ export class Library extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.GetMetadataChildrenResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetMetadataChildrenResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.GetMetadataChildrenResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetMetadataChildrenResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } /** @@ -1084,39 +976,12 @@ export class Library extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.GetOnDeckResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetOnDeckResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.GetOnDeckResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetOnDeckResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } } diff --git a/src/sdk/log.ts b/src/sdk/log.ts index 5f99268f..69ab8239 100644 --- a/src/sdk/log.ts +++ b/src/sdk/log.ts @@ -119,35 +119,13 @@ export class Log extends ClientSDK { Headers: {}, }; - if (this.matchStatusCode(response, 200)) { - // fallthrough - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.LogLineResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .void(200, operations.LogLineResponse$) + .fail([400, "4XX", "5XX"]) + .json(401, errors.LogLineResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); - return schemas$.parse( - undefined, - () => operations.LogLineResponse$.inboundSchema.parse(responseFields$), - "Response validation failed" - ); + return result$; } /** @@ -236,35 +214,13 @@ export class Log extends ClientSDK { Headers: {}, }; - if (this.matchStatusCode(response, 200)) { - // fallthrough - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.LogMultiLineResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .void(200, operations.LogMultiLineResponse$) + .fail([400, "4XX", "5XX"]) + .json(401, errors.LogMultiLineResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); - return schemas$.parse( - undefined, - () => operations.LogMultiLineResponse$.inboundSchema.parse(responseFields$), - "Response validation failed" - ); + return result$; } /** @@ -320,34 +276,12 @@ export class Log extends ClientSDK { Headers: {}, }; - if (this.matchStatusCode(response, 200)) { - // fallthrough - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.EnablePaperTrailResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .void(200, operations.EnablePaperTrailResponse$) + .fail([400, 403, "4XX", "5XX"]) + .json(401, errors.EnablePaperTrailResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); - return schemas$.parse( - undefined, - () => operations.EnablePaperTrailResponse$.inboundSchema.parse(responseFields$), - "Response validation failed" - ); + return result$; } } diff --git a/src/sdk/media.ts b/src/sdk/media.ts index 247b4773..c863c75b 100644 --- a/src/sdk/media.ts +++ b/src/sdk/media.ts @@ -108,35 +108,13 @@ export class Media extends ClientSDK { Headers: {}, }; - if (this.matchStatusCode(response, 200)) { - // fallthrough - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.MarkPlayedResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .void(200, operations.MarkPlayedResponse$) + .fail([400, "4XX", "5XX"]) + .json(401, errors.MarkPlayedResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); - return schemas$.parse( - undefined, - () => operations.MarkPlayedResponse$.inboundSchema.parse(responseFields$), - "Response validation failed" - ); + return result$; } /** @@ -209,35 +187,13 @@ export class Media extends ClientSDK { Headers: {}, }; - if (this.matchStatusCode(response, 200)) { - // fallthrough - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.MarkUnplayedResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .void(200, operations.MarkUnplayedResponse$) + .fail([400, "4XX", "5XX"]) + .json(401, errors.MarkUnplayedResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); - return schemas$.parse( - undefined, - () => operations.MarkUnplayedResponse$.inboundSchema.parse(responseFields$), - "Response validation failed" - ); + return result$; } /** @@ -317,34 +273,12 @@ export class Media extends ClientSDK { Headers: {}, }; - if (this.matchStatusCode(response, 200)) { - // fallthrough - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.UpdatePlayProgressResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .void(200, operations.UpdatePlayProgressResponse$) + .fail([400, "4XX", "5XX"]) + .json(401, errors.UpdatePlayProgressResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); - return schemas$.parse( - undefined, - () => operations.UpdatePlayProgressResponse$.inboundSchema.parse(responseFields$), - "Response validation failed" - ); + return result$; } } diff --git a/src/sdk/playlists.ts b/src/sdk/playlists.ts index 0579e2ae..5481203a 100644 --- a/src/sdk/playlists.ts +++ b/src/sdk/playlists.ts @@ -116,40 +116,13 @@ export class Playlists extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.CreatePlaylistResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.CreatePlaylistResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.CreatePlaylistResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.CreatePlaylistResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } /** @@ -228,40 +201,13 @@ export class Playlists extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.GetPlaylistsResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetPlaylistsResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.GetPlaylistsResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetPlaylistsResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } /** @@ -338,40 +284,13 @@ export class Playlists extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.GetPlaylistResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetPlaylistResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.GetPlaylistResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetPlaylistResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } /** @@ -447,35 +366,13 @@ export class Playlists extends ClientSDK { Headers: {}, }; - if (this.matchStatusCode(response, 200)) { - // fallthrough - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.DeletePlaylistResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .void(200, operations.DeletePlaylistResponse$) + .fail([400, "4XX", "5XX"]) + .json(401, errors.DeletePlaylistResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); - return schemas$.parse( - undefined, - () => operations.DeletePlaylistResponse$.inboundSchema.parse(responseFields$), - "Response validation failed" - ); + return result$; } /** @@ -563,35 +460,13 @@ export class Playlists extends ClientSDK { Headers: {}, }; - if (this.matchStatusCode(response, 200)) { - // fallthrough - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.UpdatePlaylistResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .void(200, operations.UpdatePlaylistResponse$) + .fail([400, "4XX", "5XX"]) + .json(401, errors.UpdatePlaylistResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); - return schemas$.parse( - undefined, - () => operations.UpdatePlaylistResponse$.inboundSchema.parse(responseFields$), - "Response validation failed" - ); + return result$; } /** @@ -676,40 +551,13 @@ export class Playlists extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.GetPlaylistContentsResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetPlaylistContentsResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.GetPlaylistContentsResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetPlaylistContentsResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } /** @@ -785,35 +633,13 @@ export class Playlists extends ClientSDK { Headers: {}, }; - if (this.matchStatusCode(response, 200)) { - // fallthrough - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.ClearPlaylistContentsResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .void(200, operations.ClearPlaylistContentsResponse$) + .fail([400, "4XX", "5XX"]) + .json(401, errors.ClearPlaylistContentsResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); - return schemas$.parse( - undefined, - () => operations.ClearPlaylistContentsResponse$.inboundSchema.parse(responseFields$), - "Response validation failed" - ); + return result$; } /** @@ -902,40 +728,13 @@ export class Playlists extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.AddPlaylistContentsResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.AddPlaylistContentsResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.AddPlaylistContentsResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.AddPlaylistContentsResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } /** @@ -1012,34 +811,12 @@ export class Playlists extends ClientSDK { Headers: {}, }; - if (this.matchStatusCode(response, 200)) { - // fallthrough - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.UploadPlaylistResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .void(200, operations.UploadPlaylistResponse$) + .fail([400, "4XX", "5XX"]) + .json(401, errors.UploadPlaylistResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); - return schemas$.parse( - undefined, - () => operations.UploadPlaylistResponse$.inboundSchema.parse(responseFields$), - "Response validation failed" - ); + return result$; } } diff --git a/src/sdk/plex.ts b/src/sdk/plex.ts index 076fad41..37d8964a 100644 --- a/src/sdk/plex.ts +++ b/src/sdk/plex.ts @@ -110,40 +110,13 @@ export class Plex extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.GetPinResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else if (this.matchResponse(response, 400, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetPinResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.GetPinResponse$, { key: "object" }) + .json(400, errors.GetPinResponseBody$, { err: true }) + .fail(["4XX", "5XX"]) + .match(response, { extraFields: responseFields$ }); + + return result$; } /** @@ -220,34 +193,12 @@ export class Plex extends ClientSDK { Headers: {}, }; - if (this.matchStatusCode(response, 200)) { - // fallthrough - } else if (this.matchResponse(response, 400, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetTokenResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .void(200, operations.GetTokenResponse$) + .json(400, errors.GetTokenResponseBody$, { err: true }) + .fail(["4XX", "5XX"]) + .match(response, { extraFields: responseFields$ }); - return schemas$.parse( - undefined, - () => operations.GetTokenResponse$.inboundSchema.parse(responseFields$), - "Response validation failed" - ); + return result$; } } diff --git a/src/sdk/search.ts b/src/sdk/search.ts index 37f57a48..6cde58ba 100644 --- a/src/sdk/search.ts +++ b/src/sdk/search.ts @@ -129,35 +129,13 @@ export class Search extends ClientSDK { Headers: {}, }; - if (this.matchStatusCode(response, 200)) { - // fallthrough - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.PerformSearchResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .void(200, operations.PerformSearchResponse$) + .fail([400, "4XX", "5XX"]) + .json(401, errors.PerformSearchResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); - return schemas$.parse( - undefined, - () => operations.PerformSearchResponse$.inboundSchema.parse(responseFields$), - "Response validation failed" - ); + return result$; } /** @@ -243,35 +221,13 @@ export class Search extends ClientSDK { Headers: {}, }; - if (this.matchStatusCode(response, 200)) { - // fallthrough - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.PerformVoiceSearchResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .void(200, operations.PerformVoiceSearchResponse$) + .fail([400, "4XX", "5XX"]) + .json(401, errors.PerformVoiceSearchResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); - return schemas$.parse( - undefined, - () => operations.PerformVoiceSearchResponse$.inboundSchema.parse(responseFields$), - "Response validation failed" - ); + return result$; } /** @@ -344,39 +300,12 @@ export class Search extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.GetSearchResultsResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetSearchResultsResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.GetSearchResultsResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetSearchResultsResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } } diff --git a/src/sdk/server.ts b/src/sdk/server.ts index 82678c8a..d9758c22 100644 --- a/src/sdk/server.ts +++ b/src/sdk/server.ts @@ -92,40 +92,13 @@ export class Server extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.GetServerCapabilitiesResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetServerCapabilitiesResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.GetServerCapabilitiesResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetServerCapabilitiesResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } /** @@ -182,40 +155,13 @@ export class Server extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.GetServerPreferencesResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetServerPreferencesResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.GetServerPreferencesResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetServerPreferencesResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } /** @@ -272,40 +218,13 @@ export class Server extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.GetAvailableClientsResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetAvailableClientsResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.GetAvailableClientsResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetAvailableClientsResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } /** @@ -360,40 +279,13 @@ export class Server extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.GetDevicesResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetDevicesResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.GetDevicesResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetDevicesResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } /** @@ -450,40 +342,13 @@ export class Server extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.GetServerIdentityResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetServerIdentityResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.GetServerIdentityResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetServerIdentityResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } /** @@ -538,40 +403,13 @@ export class Server extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.GetMyPlexAccountResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetMyPlexAccountResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.GetMyPlexAccountResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetMyPlexAccountResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } /** @@ -658,35 +496,13 @@ export class Server extends ClientSDK { Headers: {}, }; - if (this.matchStatusCode(response, 200)) { - // fallthrough - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetResizedPhotoResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .void(200, operations.GetResizedPhotoResponse$) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetResizedPhotoResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); - return schemas$.parse( - undefined, - () => operations.GetResizedPhotoResponse$.inboundSchema.parse(responseFields$), - "Response validation failed" - ); + return result$; } /** @@ -741,39 +557,12 @@ export class Server extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.GetServerListResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetServerListResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.GetServerListResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetServerListResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } } diff --git a/src/sdk/sessions.ts b/src/sdk/sessions.ts index a3edc047..5aeb0fc8 100644 --- a/src/sdk/sessions.ts +++ b/src/sdk/sessions.ts @@ -90,40 +90,13 @@ export class Sessions extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.GetSessionsResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetSessionsResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.GetSessionsResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetSessionsResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } /** @@ -180,40 +153,13 @@ export class Sessions extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.GetSessionHistoryResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetSessionHistoryResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.GetSessionHistoryResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetSessionHistoryResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } /** @@ -270,40 +216,13 @@ export class Sessions extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.GetTranscodeSessionsResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetTranscodeSessionsResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.GetTranscodeSessionsResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetTranscodeSessionsResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } /** @@ -378,34 +297,12 @@ export class Sessions extends ClientSDK { Headers: {}, }; - if (this.matchStatusCode(response, 204)) { - // fallthrough - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.StopTranscodeSessionResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .void(204, operations.StopTranscodeSessionResponse$) + .fail([400, "4XX", "5XX"]) + .json(401, errors.StopTranscodeSessionResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); - return schemas$.parse( - undefined, - () => operations.StopTranscodeSessionResponse$.inboundSchema.parse(responseFields$), - "Response validation failed" - ); + return result$; } } diff --git a/src/sdk/statistics.ts b/src/sdk/statistics.ts index a296ca81..30e1f549 100644 --- a/src/sdk/statistics.ts +++ b/src/sdk/statistics.ts @@ -111,39 +111,12 @@ export class Statistics extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.GetStatisticsResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetStatisticsResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.GetStatisticsResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetStatisticsResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } } diff --git a/src/sdk/updater.ts b/src/sdk/updater.ts index fb71e488..cf2cee65 100644 --- a/src/sdk/updater.ts +++ b/src/sdk/updater.ts @@ -90,40 +90,13 @@ export class Updater extends ClientSDK { Headers: {}, }; - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.GetUpdateStatusResponse$.inboundSchema.parse({ - ...responseFields$, - object: val$, - }); - }, - "Response validation failed" - ); - return result; - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetUpdateStatusResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .json(200, operations.GetUpdateStatusResponse$, { key: "object" }) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetUpdateStatusResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); + + return result$; } /** @@ -199,35 +172,13 @@ export class Updater extends ClientSDK { Headers: {}, }; - if (this.matchStatusCode(response, 200)) { - // fallthrough - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.CheckForUpdatesResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .void(200, operations.CheckForUpdatesResponse$) + .fail([400, "4XX", "5XX"]) + .json(401, errors.CheckForUpdatesResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); - return schemas$.parse( - undefined, - () => operations.CheckForUpdatesResponse$.inboundSchema.parse(responseFields$), - "Response validation failed" - ); + return result$; } /** @@ -307,34 +258,12 @@ export class Updater extends ClientSDK { Headers: {}, }; - if (this.matchStatusCode(response, 200)) { - // fallthrough - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.ApplyUpdatesResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .void(200, operations.ApplyUpdatesResponse$) + .fail([400, "4XX", 500, "5XX"]) + .json(401, errors.ApplyUpdatesResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); - return schemas$.parse( - undefined, - () => operations.ApplyUpdatesResponse$.inboundSchema.parse(responseFields$), - "Response validation failed" - ); + return result$; } } diff --git a/src/sdk/video.ts b/src/sdk/video.ts index 37257067..e2853da4 100644 --- a/src/sdk/video.ts +++ b/src/sdk/video.ts @@ -130,35 +130,13 @@ export class Video extends ClientSDK { Headers: {}, }; - if (this.matchStatusCode(response, 200)) { - // fallthrough - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.GetTimelineResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .void(200, operations.GetTimelineResponse$) + .fail([400, "4XX", "5XX"]) + .json(401, errors.GetTimelineResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); - return schemas$.parse( - undefined, - () => operations.GetTimelineResponse$.inboundSchema.parse(responseFields$), - "Response validation failed" - ); + return result$; } /** @@ -286,34 +264,12 @@ export class Video extends ClientSDK { Headers: {}, }; - if (this.matchStatusCode(response, 200)) { - // fallthrough - } else if (this.matchResponse(response, 401, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return errors.StartUniversalTranscodeResponseBody$.inboundSchema.parse({ - ...responseFields$, - ...val$, - }); - }, - "Response validation failed" - ); - throw result; - } else { - const responseBody = await response.text(); - throw new errors.SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ); - } + const [result$] = await this.matcher() + .void(200, operations.StartUniversalTranscodeResponse$) + .fail([400, "4XX", "5XX"]) + .json(401, errors.StartUniversalTranscodeResponseBody$, { err: true }) + .match(response, { extraFields: responseFields$ }); - return schemas$.parse( - undefined, - () => operations.StartUniversalTranscodeResponse$.inboundSchema.parse(responseFields$), - "Response validation failed" - ); + return result$; } } diff --git a/src/types/enums.ts b/src/types/enums.ts new file mode 100644 index 00000000..4de0142b --- /dev/null +++ b/src/types/enums.ts @@ -0,0 +1,16 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +declare const __brand: unique symbol; +export type Unrecognized = T & { [__brand]: "unrecognized" }; + +export function catchUnrecognizedEnum(value: T): Unrecognized { + return value as Unrecognized; +} + +type Prettify = { [K in keyof T]: T[K] } & {}; +export type ClosedEnum = T[keyof T]; +export type OpenEnum = + | Prettify + | Unrecognized; diff --git a/src/types/index.ts b/src/types/index.ts index 3937ae70..42fcfd24 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -6,3 +6,5 @@ export { RFCDate } from "./rfcdate"; export { blobLikeSchema, isBlobLike } from "./blobs"; export type { Paginator, PageIterator } from "./operations"; export { createPageIterator } from "./operations"; +export { catchUnrecognizedEnum } from "./enums"; +export type { OpenEnum, ClosedEnum, Unrecognized } from "./enums";