From 162b3b3d13a08f60e1d0ea59648aa9caca63e986 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Wed, 8 May 2024 18:17:06 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.285.0 --- .speakeasy/gen.lock | 29 +- .speakeasy/gen.yaml | 3 +- .speakeasy/workflow.lock | 2 +- README.md | 13 +- RELEASES.md | 12 +- codeSamples.yaml | 1541 +++++++++++------ docs/models/operations/applyupdatesrequest.md | 8 +- .../cancelserveractivitiesrequest.md | 6 +- .../operations/checkforupdatesrequest.md | 6 +- .../operations/getlibraryitemscountry.md | 8 - .../operations/getlibraryitemsdirector.md | 8 - .../models/operations/getlibraryitemsgenre.md | 8 - .../models/operations/getlibraryitemsmedia.md | 21 - .../getlibraryitemsmediacontainer.md | 23 - .../operations/getlibraryitemsmetadata.md | 64 - docs/models/operations/getlibraryitemspart.md | 14 - .../operations/getlibraryitemsrequest.md | 9 - .../operations/getlibraryitemsresponse.md | 11 - .../operations/getlibraryitemsresponsebody.md | 10 - docs/models/operations/getlibraryitemsrole.md | 8 - .../operations/getlibraryitemswriter.md | 8 - .../models/operations/getstatisticsrequest.md | 6 +- docs/models/operations/gettimelinerequest.md | 24 +- .../startuniversaltranscoderequest.md | 36 +- docs/models/operations/tag.md | 28 - .../operations/updateplayprogressrequest.md | 10 +- docs/sdks/activities/README.md | 14 +- docs/sdks/authentication/README.md | 9 +- docs/sdks/butler/README.md | 8 +- docs/sdks/hubs/README.md | 11 +- docs/sdks/library/README.md | 99 +- docs/sdks/log/README.md | 6 +- docs/sdks/media/README.md | 28 +- docs/sdks/playlists/README.md | 39 +- docs/sdks/plex/README.md | 10 +- docs/sdks/search/README.md | 16 +- docs/sdks/sessions/README.md | 4 +- docs/sdks/statistics/README.md | 14 +- docs/sdks/updater/README.md | 31 +- docs/sdks/video/README.md | 41 +- jsr.json | 2 +- package-lock.json | 4 +- package.json | 2 +- src/lib/config.ts | 6 +- src/models/operations/getlibraryitems.ts | 1212 ------------- src/models/operations/index.ts | 1 - src/sdk/activities.ts | 8 +- src/sdk/authentication.ts | 8 +- src/sdk/butler.ts | 20 +- src/sdk/hubs.ts | 8 +- src/sdk/library.ts | 161 +- src/sdk/log.ts | 17 +- src/sdk/media.ts | 12 +- src/sdk/playlists.ts | 41 +- src/sdk/plex.ts | 8 +- src/sdk/search.ts | 12 +- src/sdk/server.ts | 37 +- src/sdk/sessions.ts | 16 +- src/sdk/statistics.ts | 4 +- src/sdk/updater.ts | 12 +- src/sdk/video.ts | 18 +- 61 files changed, 1339 insertions(+), 2516 deletions(-) delete mode 100644 docs/models/operations/getlibraryitemscountry.md delete mode 100644 docs/models/operations/getlibraryitemsdirector.md delete mode 100644 docs/models/operations/getlibraryitemsgenre.md delete mode 100644 docs/models/operations/getlibraryitemsmedia.md delete mode 100644 docs/models/operations/getlibraryitemsmediacontainer.md delete mode 100644 docs/models/operations/getlibraryitemsmetadata.md delete mode 100644 docs/models/operations/getlibraryitemspart.md delete mode 100644 docs/models/operations/getlibraryitemsrequest.md delete mode 100644 docs/models/operations/getlibraryitemsresponse.md delete mode 100644 docs/models/operations/getlibraryitemsresponsebody.md delete mode 100644 docs/models/operations/getlibraryitemsrole.md delete mode 100644 docs/models/operations/getlibraryitemswriter.md delete mode 100644 docs/models/operations/tag.md delete mode 100644 src/models/operations/getlibraryitems.ts diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index b26d9a7c..3af1830e 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,27 +1,32 @@ lockVersion: 2.0.0 id: 16f22cbf-f23f-4419-8924-3a4b06381947 management: - docChecksum: 7a43cd3413d535205cfaee20a4b6a250 + docChecksum: 543cb95355401d2e3c2ba11a50d9dd94 docVersion: 0.0.3 - speakeasyVersion: 1.277.8 - generationVersion: 2.319.10 - releaseVersion: 0.14.2 - configChecksum: 2565798d4bdc6007bc5296ad6dc6ee55 + speakeasyVersion: 1.285.0 + generationVersion: 2.326.3 + releaseVersion: 0.15.0 + configChecksum: 128cbd9ff9106ca973e497a43ea70dc4 repoURL: https://github.com/LukeHagar/plexjs.git repoSubDirectory: . installationURL: https://github.com/LukeHagar/plexjs published: true features: typescript: + additionalDependencies: 0.1.0 constsAndDefaults: 0.1.5 core: 3.9.3 flattening: 2.81.1 globalSecurity: 2.82.9 + globalSecurityCallbacks: 0.1.0 + globalSecurityFlattening: 0.1.0 globalServerURLs: 2.82.4 globals: 2.82.1 methodServerURLs: 2.82.1 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 @@ -92,7 +97,6 @@ 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 @@ -315,19 +319,6 @@ 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 diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 6717ad2d..77b21892 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false typescript: - version: 0.14.2 + version: 0.15.0 additionalDependencies: dependencies: {} devDependencies: {} @@ -32,6 +32,7 @@ typescript: webhooks: models/webhooks inputModelSuffix: input maxMethodParams: 4 + methodArguments: require-security-and-request outputModelSuffix: output packageName: '@lukehagar/plexjs' responseFormat: envelope diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index c696108b..daf4e7c3 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.283.1 +speakeasyVersion: 1.285.0 sources: my-source: {} targets: diff --git a/README.md b/README.md index e86a53c0..3a3190b0 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,6 @@ 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 @@ -284,10 +283,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const strong = false; - const xPlexClientIdentifier = "Postman"; - - const result = await plexAPI.plex.getPin(strong, xPlexClientIdentifier, { + const result = await plexAPI.plex.getPin(false, "Postman", { serverURL: "https://plex.tv/api/v2", }); @@ -330,7 +326,7 @@ const httpClient = new HTTPClient({ httpClient.addHook("beforeRequest", (request) => { const nextRequest = new Request(request, { - signal: request.signal || AbortSignal.timeout(5000); + signal: request.signal || AbortSignal.timeout(5000) }); nextRequest.headers.set("x-custom-header", "custom value"); @@ -417,10 +413,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const strong = false; - const xPlexClientIdentifier = "Postman"; - - const result = await plexAPI.plex.getPin(strong, xPlexClientIdentifier); + const result = await plexAPI.plex.getPin(false, "Postman"); // Handle the result console.log(result); diff --git a/RELEASES.md b/RELEASES.md index 24bd012b..d5d28089 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -508,4 +508,14 @@ Based on: ### Generated - [typescript v0.14.2] . ### Releases -- [NPM v0.14.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.14.2 - . \ No newline at end of file +- [NPM v0.14.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.14.2 - . + +## 2024-05-08 18:14:57 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.285.0 (2.326.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.15.0] . +### Releases +- [NPM v0.15.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.15.0 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index 4a8ad972..e34f75d3 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -3,320 +3,6 @@ info: title: CodeSamples overlay for typescript target version: 0.0.0 actions: - - 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"]["/log"]["get"] - update: - x-codeSamples: - - lang: typescript - label: logLine - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { Level } from \"@lukehagar/plexjs/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const level = Level.Three;\n const message = \"Test log message\";\n const source = \"Postman\";\n \n const result = await plexAPI.logLine(level, message, source);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - 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"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getPlaylists - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { PlaylistType, QueryParamSmart } from \"@lukehagar/plexjs/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const playlistType = PlaylistType.Audio;\n const smart = QueryParamSmart.Zero;\n \n const result = await plexAPI.getPlaylists(playlistType, smart);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - 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"]["/:/unscrobble"]["get"] - update: - x-codeSamples: - - lang: typescript - label: markUnplayed - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const key = 59398;\n \n const result = await plexAPI.markUnplayed(key);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/video/:/transcode/universal/start.mpd"]["get"] - update: - x-codeSamples: - - lang: typescript - label: startUniversalTranscode - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.startUniversalTranscode({ - hasMDE: 1, - path: "/library/metadata/23409", - mediaIndex: 0, - partIndex: 0, - protocol: "hls", - fastSeek: 0, - directPlay: 0, - directStream: 0, - subtitleSize: 100, - subtites: "burn", - audioBoost: 100, - location: "lan", - mediaBufferSize: 102400, - session: "zvcage8b7rkioqcm8f4uns4c", - addDebugOverlay: 0, - autoAdjustQuality: 0, - }); - - // 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"]["/log/networked"]["get"] - update: - x-codeSamples: - - lang: typescript - label: enablePaperTrail - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.enablePaperTrail(); - - // 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\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const playlistID = 1893.18;\n \n const result = await plexAPI.clearPlaylistContents(playlistID);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - 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.getServerIdentity(); - - // 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"]["/:/scrobble"]["get"] - update: - x-codeSamples: - - lang: typescript - label: markPlayed - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const key = 59398;\n \n const result = await plexAPI.markPlayed(key);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/hubs"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getGlobalHubs - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { OnlyTransient } from \"@lukehagar/plexjs/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const count = 1262.49;\n const onlyTransient = OnlyTransient.One;\n \n const result = await plexAPI.getGlobalHubs(count, onlyTransient);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - 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"]["/playlists/{playlistID}/items"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getPlaylistContents - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const playlistID = 5004.46;\n const type = 9403.59;\n \n const result = await plexAPI.getPlaylistContents(playlistID, type);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - 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", - }); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/playlists/upload"]["post"] - update: - x-codeSamples: - - lang: typescript - label: uploadPlaylist - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { Force } from \"@lukehagar/plexjs/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const path = \"/home/barkley/playlist.m3u\";\n const force = Force.Zero;\n \n const result = await plexAPI.uploadPlaylist(path, force);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/security/token"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getTransientToken - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { GetTransientTokenQueryParamType, Scope } from \"@lukehagar/plexjs/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const type = GetTransientTokenQueryParamType.Delegation;\n const scope = Scope.All;\n \n const result = await plexAPI.getTransientToken(type, scope);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/security/resources"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getSourceConnectionInformation - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const source = \"server://client-identifier\";\n \n const result = await plexAPI.getSourceConnectionInformation(source);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - 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"]["/:/prefs"]["get"] update: x-codeSamples: @@ -338,59 +24,33 @@ actions: } run(); - - target: $["paths"]["/library/sections/{sectionId}/refresh"]["get"] + - target: $["paths"]["/butler/{taskName}"]["post"] update: x-codeSamples: - lang: typescript - label: refreshLibrary - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const sectionId = 934.16;\n \n const result = await plexAPI.refreshLibrary(sectionId);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/library/sections/{sectionId}"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getLibrary - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { IncludeDetails } from \"@lukehagar/plexjs/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const sectionId = 1000;\n const includeDetails = IncludeDetails.Zero;\n \n const result = await plexAPI.getLibrary(sectionId, includeDetails);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/activities/{activityUUID}"]["delete"] - update: - x-codeSamples: - - lang: typescript - label: cancelServerActivities - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const activityUUID = \"25b71ed5-0f9d-461c-baa7-d404e9e10d3e\";\n \n const result = await plexAPI.cancelServerActivities(activityUUID);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + label: startTask + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { TaskName } from "@lukehagar/plexjs/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.startTask(TaskName.CleanOldBundles); + + // Handle the result + console.log(result) + } + + run(); - target: $["paths"]["/search"]["get"] update: x-codeSamples: - lang: typescript label: getSearchResults - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const query = \"110\";\n \n const result = await plexAPI.getSearchResults(query);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/pins"]["post"] - update: - x-codeSamples: - - lang: typescript - label: getPin - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const strong = false;\n const xPlexClientIdentifier = \"Postman\";\n \n const result = await plexAPI.getPin(strong, xPlexClientIdentifier);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/library/sections/{sectionId}"]["delete"] - update: - x-codeSamples: - - lang: typescript - label: deleteLibrary - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const sectionId = 1000;\n \n const result = await plexAPI.deleteLibrary(sectionId);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/library/sections/{sectionId}/{tag}"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getLibraryItems - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { Tag } from \"@lukehagar/plexjs/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const sectionId = 451092;\n const tag = Tag.Unwatched;\n \n const result = await plexAPI.getLibraryItems(sectionId, tag);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/library/sections/{sectionId}/search"]["get"] - update: - x-codeSamples: - - lang: typescript - label: searchLibrary - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { Type } from \"@lukehagar/plexjs/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const sectionId = 933505;\n const type = Type.Four;\n \n const result = await plexAPI.searchLibrary(sectionId, type);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/log"]["post"] - update: - x-codeSamples: - - lang: typescript - label: logMultiLine source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -400,28 +60,21 @@ actions: }); 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"); + const result = await plexAPI.getSearchResults("110"); // Handle the result console.log(result) } run(); - - target: $["paths"]["/updater/check"]["put"] + - target: $["paths"]["/security/token"]["get"] update: x-codeSamples: - lang: typescript - label: checkForUpdates - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { Download } from \"@lukehagar/plexjs/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const download = Download.One;\n \n const result = await plexAPI.checkForUpdates(download);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/devices"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getDevices + label: getTransientToken source: |- import { PlexAPI } from "@lukehagar/plexjs"; + import { GetTransientTokenQueryParamType, Scope } from "@lukehagar/plexjs/models/operations"; const plexAPI = new PlexAPI({ accessToken: "", @@ -429,34 +82,7 @@ actions: }); async function run() { - const result = await plexAPI.getDevices(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/:/progress"]["post"] - update: - x-codeSamples: - - lang: typescript - label: updatePlayProgress - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const key = \"\";\n const time = 90000;\n const state = \"played\";\n \n const result = await plexAPI.updatePlayProgress(key, time, state);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - 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.getLibraries(); + const result = await plexAPI.getTransientToken(GetTransientTokenQueryParamType.Delegation, Scope.All); // Handle the result console.log(result) @@ -468,18 +94,6 @@ actions: x-codeSamples: - lang: typescript label: getMetadata - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const ratingKey = 8382.31;\n \n const result = await plexAPI.getMetadata(ratingKey);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/playlists/{playlistID}/items"]["put"] - update: - x-codeSamples: - - lang: typescript - label: addPlaylistContents - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const playlistID = 8502.01;\n const uri = \"server://12345/com.plexapp.plugins.library/library/metadata/1\";\n const playQueueID = 123;\n \n const result = await plexAPI.addPlaylistContents(playlistID, uri, playQueueID);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/transcode/sessions"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getTranscodeSessions source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -489,7 +103,27 @@ actions: }); async function run() { - const result = await plexAPI.getTranscodeSessions(); + const result = await plexAPI.getMetadata(8382.31); + + // 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) @@ -501,18 +135,6 @@ actions: x-codeSamples: - lang: typescript label: getPlaylist - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const playlistID = 4109.48;\n \n const result = await plexAPI.getPlaylist(playlistID);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/playlists/{playlistID}"]["delete"] - update: - x-codeSamples: - - lang: typescript - label: deletePlaylist - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const playlistID = 216.22;\n \n const result = await plexAPI.deletePlaylist(playlistID);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/status/sessions"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getSessions source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -522,18 +144,18 @@ actions: }); async function run() { - const result = await plexAPI.getSessions(); + const result = await plexAPI.getPlaylist(4109.48); // Handle the result console.log(result) } run(); - - target: $["paths"]["/myplex/account"]["get"] + - target: $["paths"]["/playlists/{playlistID}/items"]["get"] update: x-codeSamples: - lang: typescript - label: getMyPlexAccount + label: getPlaylistContents source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -543,7 +165,72 @@ actions: }); async function run() { - const result = await plexAPI.getMyPlexAccount(); + const result = await plexAPI.getPlaylistContents(5004.46, 9403.59); + + // 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.markUnplayed(59398); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/hubs"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getGlobalHubs + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { OnlyTransient } from "@lukehagar/plexjs/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.getGlobalHubs(1262.49, OnlyTransient.One); + + // 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) @@ -580,26 +267,13 @@ actions: } run(); - - target: $["paths"]["/library/metadata/{ratingKey}/children"]["get"] + - target: $["paths"]["/activities/{activityUUID}"]["delete"] update: x-codeSamples: - lang: typescript - label: getMetadataChildren - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const ratingKey = 1539.14;\n \n const result = await plexAPI.getMetadataChildren(ratingKey);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/updater/apply"]["put"] - update: - x-codeSamples: - - lang: typescript - label: applyUpdates - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { Skip, Tonight } from \"@lukehagar/plexjs/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const tonight = Tonight.One;\n const skip = Skip.One;\n \n const result = await plexAPI.applyUpdates(tonight, skip);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/:/timeline"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getTimeline + label: cancelServerActivities source: |- import { PlexAPI } from "@lukehagar/plexjs"; - import { State } from "@lukehagar/plexjs/models/operations"; const plexAPI = new PlexAPI({ accessToken: "", @@ -607,42 +281,13 @@ actions: }); 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.cancelServerActivities("25b71ed5-0f9d-461c-baa7-d404e9e10d3e"); // 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\";\nimport { QueryParamOnlyTransient } from \"@lukehagar/plexjs/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const sectionId = 6728.76;\n const count = 9010.22;\n const onlyTransient = QueryParamOnlyTransient.Zero;\n \n const result = await plexAPI.getLibraryHubs(sectionId, count, onlyTransient);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/hubs/search"]["get"] - update: - x-codeSamples: - - lang: typescript - label: performSearch - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const query = \"dylan\";\n const sectionId = 1516.53;\n const limit = 5;\n \n const result = await plexAPI.performSearch(query, sectionId, limit);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/library/hashes"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getFileHash - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const url = \"file://C:\\Image.png&type=13\";\n const type = 4462.17;\n \n const result = await plexAPI.getFileHash(url, type);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - target: $["paths"]["/library/onDeck"]["get"] update: x-codeSamples: @@ -664,42 +309,202 @@ actions: } run(); - - target: $["paths"]["/playlists/{playlistID}"]["put"] + - target: $["paths"]["/playlists/upload"]["post"] update: x-codeSamples: - lang: typescript - label: updatePlaylist - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const playlistID = 3915;\n const title = \"\";\n const summary = \"\";\n \n const result = await plexAPI.updatePlaylist(playlistID, title, summary);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/butler/{taskName}"]["delete"] - update: - x-codeSamples: - - lang: typescript - label: stopTask - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { PathParamTaskName } from \"@lukehagar/plexjs/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const taskName = PathParamTaskName.BackupDatabase;\n \n const result = await plexAPI.stopTask(taskName);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/hubs/search/voice"]["get"] - update: - x-codeSamples: - - lang: typescript - label: performVoiceSearch - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const query = \"dead+poop\";\n const sectionId = 4094.8;\n const limit = 5;\n \n const result = await plexAPI.performVoiceSearch(query, sectionId, limit);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/pins/{pinID}"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getToken - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const pinID = \"\";\n const xPlexClientIdentifier = \"Postman\";\n \n const result = await plexAPI.getToken(pinID, xPlexClientIdentifier);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + label: uploadPlaylist + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { Force } from "@lukehagar/plexjs/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.uploadPlaylist("/home/barkley/playlist.m3u", Force.Zero); + + // 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\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const timespan = 4;\n \n const result = await plexAPI.getStatistics(timespan);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/transcode/sessions/{sessionKey}"]["delete"] + 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"]["/updater/status"]["get"] update: x-codeSamples: - lang: typescript - label: stopTranscodeSession - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const sessionKey = \"zz7llzqlx8w9vnrsbnwhbmep\";\n \n const result = await plexAPI.stopTranscodeSession(sessionKey);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + 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"]["/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", + }); + + // 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"]["/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.getLibraries(); + + // 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"]["/clients"]["get"] update: x-codeSamples: @@ -742,17 +547,11 @@ actions: } run(); - - target: $["paths"]["/butler/{taskName}"]["post"] + - target: $["paths"]["/butler"]["post"] update: x-codeSamples: - lang: typescript - label: startTask - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { TaskName } from \"@lukehagar/plexjs/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"Postman\",\n});\n\nasync function run() {\n const taskName = TaskName.CleanOldBundles;\n \n const result = await plexAPI.startTask(taskName);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/updater/status"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getUpdateStatus + label: startAllTasks source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -762,7 +561,737 @@ actions: }); async function run() { - const result = await plexAPI.getUpdateStatus(); + const result = await plexAPI.startAllTasks(); + + // 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.addPlaylistContents(8502.01, "server://12345/com.plexapp.plugins.library/library/metadata/1", 123); + + // 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"]["/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"]["/:/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"]["/:/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, + }); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/video/:/transcode/universal/start.mpd"]["get"] + update: + x-codeSamples: + - lang: typescript + label: startUniversalTranscode + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.startUniversalTranscode({ + hasMDE: 1, + path: "/library/metadata/23409", + mediaIndex: 0, + partIndex: 0, + protocol: "hls", + fastSeek: 0, + directPlay: 0, + directStream: 0, + subtitleSize: 100, + subtites: "burn", + audioBoost: 100, + location: "lan", + mediaBufferSize: 102400, + session: "zvcage8b7rkioqcm8f4uns4c", + addDebugOverlay: 0, + autoAdjustQuality: 0, + }); + + // 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/{taskName}"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: stopTask + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { PathParamTaskName } from "@lukehagar/plexjs/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.stopTask(PathParamTaskName.BackupDatabase); + + // 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"]["/log/networked"]["get"] + update: + x-codeSamples: + - lang: typescript + label: enablePaperTrail + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.enablePaperTrail(); + + // 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"]["/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"]["/"]["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"]["/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"]["/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"]["/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"]["/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.getServerIdentity(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/myplex/account"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getMyPlexAccount + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.getMyPlexAccount(); + + // 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"]["/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); + + // 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(); + + // 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"]["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"]["/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.performSearch("dylan", 1516.53, 5); + + // 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.getMetadataChildren(1539.14); + + // 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"]["/library/sections/{sectionId}"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: deleteLibrary + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.deleteLibrary(1000); + + // 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"]["/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.deletePlaylist(216.22); + + // 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"]["/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.checkForUpdates(Download.One); + + // 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) diff --git a/docs/models/operations/applyupdatesrequest.md b/docs/models/operations/applyupdatesrequest.md index 6a153460..1058f154 100644 --- a/docs/models/operations/applyupdatesrequest.md +++ b/docs/models/operations/applyupdatesrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `tonight` | [operations.Tonight](../../models/operations/tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install | -| `skip` | [operations.Skip](../../models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The entry for this version will have the `state` set to `skipped`. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `tonight` | [operations.Tonight](../../models/operations/tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install | 1 | +| `skip` | [operations.Skip](../../models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The entry for this version will have the `state` set to `skipped`. | 1 | \ No newline at end of file diff --git a/docs/models/operations/cancelserveractivitiesrequest.md b/docs/models/operations/cancelserveractivitiesrequest.md index 2e1518f1..df45e5a6 100644 --- a/docs/models/operations/cancelserveractivitiesrequest.md +++ b/docs/models/operations/cancelserveractivitiesrequest.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `activityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `activityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. | 25b71ed5-0f9d-461c-baa7-d404e9e10d3e | \ No newline at end of file diff --git a/docs/models/operations/checkforupdatesrequest.md b/docs/models/operations/checkforupdatesrequest.md index 9def527f..bf1ce6f3 100644 --- a/docs/models/operations/checkforupdatesrequest.md +++ b/docs/models/operations/checkforupdatesrequest.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `download` | [operations.Download](../../models/operations/download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `download` | [operations.Download](../../models/operations/download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. | 1 | \ No newline at end of file diff --git a/docs/models/operations/getlibraryitemscountry.md b/docs/models/operations/getlibraryitemscountry.md deleted file mode 100644 index 9b10031b..00000000 --- a/docs/models/operations/getlibraryitemscountry.md +++ /dev/null @@ -1,8 +0,0 @@ -# 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 deleted file mode 100644 index a00a0ec1..00000000 --- a/docs/models/operations/getlibraryitemsdirector.md +++ /dev/null @@ -1,8 +0,0 @@ -# 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 deleted file mode 100644 index 3eacc120..00000000 --- a/docs/models/operations/getlibraryitemsgenre.md +++ /dev/null @@ -1,8 +0,0 @@ -# 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 deleted file mode 100644 index 915a7e52..00000000 --- a/docs/models/operations/getlibraryitemsmedia.md +++ /dev/null @@ -1,21 +0,0 @@ -# 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 | [
{
"id": 119542,
"key": "/library/parts/119542/1680457526/file.mkv",
"duration": 11558112,
"file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv",
"size": 36158371307,
"container": "mkv",
"videoProfile": "main 10"
}
] | \ No newline at end of file diff --git a/docs/models/operations/getlibraryitemsmediacontainer.md b/docs/models/operations/getlibraryitemsmediacontainer.md deleted file mode 100644 index a36ba3be..00000000 --- a/docs/models/operations/getlibraryitemsmediacontainer.md +++ /dev/null @@ -1,23 +0,0 @@ -# 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 | [
{
"ratingKey": "58683",
"key": "/library/metadata/58683",
"guid": "plex://movie/5d7768ba96b655001fdc0408",
"studio": "20th Century Studios",
"type": "movie",
"title": "Avatar: The Way of Water",
"contentRating": "PG-13",
"summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.",
"rating": 7.6,
"audienceRating": 9.2,
"year": 2022,
"tagline": "Return to Pandora.",
"thumb": "/library/metadata/58683/thumb/1703239236",
"art": "/library/metadata/58683/art/1703239236",
"duration": 11558112,
"originallyAvailableAt": "2022-12-14T00:00:00Z",
"addedAt": 1680457607,
"updatedAt": 1703239236,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"chapterSource": "media",
"primaryExtraKey": "/library/metadata/58684",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 119534,
"duration": 11558112,
"bitrate": 25025,
"width": 3840,
"height": 2072,
"aspectRatio": 1.85,
"audioChannels": 6,
"audioCodec": "eac3",
"videoCodec": "hevc",
"videoResolution": "4k",
"container": "mkv",
"videoFrameRate": "24p",
"videoProfile": "main 10",
"Part": [
{
"id": 119542,
"key": "/library/parts/119542/1680457526/file.mkv",
"duration": 11558112,
"file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv",
"size": 36158371307,
"container": "mkv",
"videoProfile": "main 10"
}
]
}
],
"Genre": [
{
"tag": "Action"
},
{
"tag": "Adventure"
}
],
"Country": [
{
"tag": "United States of America"
}
],
"Director": [
{
"tag": "James Cameron"
}
],
"Writer": [
{
"tag": "Josh Friedman"
},
{
"tag": "James Cameron"
}
],
"Role": [
{
"tag": "Sam Worthington"
},
{
"tag": "Zoe Saldaña"
},
{
"tag": "Sigourney Weaver"
}
],
"titleSort": "Whale",
"viewCount": 1,
"lastViewedAt": 1682752242,
"originalTitle": "映画 ブラッククローバー 魔法帝の剣",
"viewOffset": 5222500,
"skipCount": 1,
"index": 1,
"theme": "/library/metadata/1/theme/1705636920",
"leafCount": 14,
"viewedLeafCount": 0,
"childCount": 1,
"hasPremiumExtras": "1",
"hasPremiumPrimaryExtra": "1",
"parentRatingKey": "66",
"parentGuid": "plex://show/5d9c081b170e24001f2a7be4",
"parentStudio": "UCP",
"parentKey": "/library/metadata/66",
"parentTitle": "Caprica",
"parentIndex": 1,
"parentYear": 2010,
"parentThumb": "/library/metadata/66/thumb/1705716261",
"parentTheme": "/library/metadata/66/theme/1705716261",
"grandparentRatingKey": "66",
"grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4",
"grandparentKey": "/library/metadata/66",
"grandparentTitle": "Caprica",
"grandparentThumb": "/library/metadata/66/thumb/1705716261",
"grandparentArt": "/library/metadata/66/art/1705716261",
"grandparentTheme": "/library/metadata/66/theme/1705716261"
}
] | \ No newline at end of file diff --git a/docs/models/operations/getlibraryitemsmetadata.md b/docs/models/operations/getlibraryitemsmetadata.md deleted file mode 100644 index 866e0301..00000000 --- a/docs/models/operations/getlibraryitemsmetadata.md +++ /dev/null @@ -1,64 +0,0 @@ -# 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 | [
{
"id": 119534,
"duration": 11558112,
"bitrate": 25025,
"width": 3840,
"height": 2072,
"aspectRatio": 1.85,
"audioChannels": 6,
"audioCodec": "eac3",
"videoCodec": "hevc",
"videoResolution": "4k",
"container": "mkv",
"videoFrameRate": "24p",
"videoProfile": "main 10",
"Part": [
{
"id": 119542,
"key": "/library/parts/119542/1680457526/file.mkv",
"duration": 11558112,
"file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv",
"size": 36158371307,
"container": "mkv",
"videoProfile": "main 10"
}
]
}
] | -| `genre` | [operations.GetLibraryItemsGenre](../../models/operations/getlibraryitemsgenre.md)[] | :heavy_minus_sign: | N/A | [
{
"tag": "Adventure"
}
] | -| `country` | [operations.GetLibraryItemsCountry](../../models/operations/getlibraryitemscountry.md)[] | :heavy_minus_sign: | N/A | [
{
"tag": "United States of America"
}
] | -| `director` | [operations.GetLibraryItemsDirector](../../models/operations/getlibraryitemsdirector.md)[] | :heavy_minus_sign: | N/A | [
{
"tag": "James Cameron"
}
] | -| `writer` | [operations.GetLibraryItemsWriter](../../models/operations/getlibraryitemswriter.md)[] | :heavy_minus_sign: | N/A | [
{
"tag": "James Cameron"
}
] | -| `role` | [operations.GetLibraryItemsRole](../../models/operations/getlibraryitemsrole.md)[] | :heavy_minus_sign: | N/A | [
{
"tag": "Sigourney Weaver"
}
] | -| `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 deleted file mode 100644 index 233cae16..00000000 --- a/docs/models/operations/getlibraryitemspart.md +++ /dev/null @@ -1,14 +0,0 @@ -# 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 deleted file mode 100644 index 199bd606..00000000 --- a/docs/models/operations/getlibraryitemsrequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetLibraryItemsRequest - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to query | -| `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 deleted file mode 100644 index 71bc97f0..00000000 --- a/docs/models/operations/getlibraryitemsresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# 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 deleted file mode 100644 index c66c9399..00000000 --- a/docs/models/operations/getlibraryitemsresponsebody.md +++ /dev/null @@ -1,10 +0,0 @@ -# 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 deleted file mode 100644 index 6e8f1e24..00000000 --- a/docs/models/operations/getlibraryitemsrole.md +++ /dev/null @@ -1,8 +0,0 @@ -# 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 deleted file mode 100644 index 137e3bfc..00000000 --- a/docs/models/operations/getlibraryitemswriter.md +++ /dev/null @@ -1,8 +0,0 @@ -# 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/getstatisticsrequest.md b/docs/models/operations/getstatisticsrequest.md index f4a5a693..e8bbb8a8 100644 --- a/docs/models/operations/getstatisticsrequest.md +++ b/docs/models/operations/getstatisticsrequest.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `timespan` | *number* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `timespan` | *number* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| 4 | \ No newline at end of file diff --git a/docs/models/operations/gettimelinerequest.md b/docs/models/operations/gettimelinerequest.md index 3e69675f..bbbf549d 100644 --- a/docs/models/operations/gettimelinerequest.md +++ b/docs/models/operations/gettimelinerequest.md @@ -3,15 +3,15 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `ratingKey` | *number* | :heavy_check_mark: | The rating key of the media item | -| `key` | *string* | :heavy_check_mark: | The key of the media item to get the timeline for | -| `state` | [operations.State](../../models/operations/state.md) | :heavy_check_mark: | The state of the media item | -| `hasMDE` | *number* | :heavy_check_mark: | Whether the media item has MDE | -| `time` | *number* | :heavy_check_mark: | The time of the media item | -| `duration` | *number* | :heavy_check_mark: | The duration of the media item | -| `context` | *string* | :heavy_check_mark: | The context of the media item | -| `playQueueItemID` | *number* | :heavy_check_mark: | The play queue item ID of the media item | -| `playBackTime` | *number* | :heavy_check_mark: | The playback time of the media item | -| `row` | *number* | :heavy_check_mark: | The row of the media item | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `ratingKey` | *number* | :heavy_check_mark: | The rating key of the media item | 23409 | +| `key` | *string* | :heavy_check_mark: | The key of the media item to get the timeline for | /library/metadata/23409 | +| `state` | [operations.State](../../models/operations/state.md) | :heavy_check_mark: | The state of the media item | playing | +| `hasMDE` | *number* | :heavy_check_mark: | Whether the media item has MDE | 1 | +| `time` | *number* | :heavy_check_mark: | The time of the media item | 2000 | +| `duration` | *number* | :heavy_check_mark: | The duration of the media item | 10000 | +| `context` | *string* | :heavy_check_mark: | The context of the media item | home:hub.continueWatching | +| `playQueueItemID` | *number* | :heavy_check_mark: | The play queue item ID of the media item | 1 | +| `playBackTime` | *number* | :heavy_check_mark: | The playback time of the media item | 2000 | +| `row` | *number* | :heavy_check_mark: | The row of the media item | 1 | \ No newline at end of file diff --git a/docs/models/operations/startuniversaltranscoderequest.md b/docs/models/operations/startuniversaltranscoderequest.md index 39dd73a8..702391df 100644 --- a/docs/models/operations/startuniversaltranscoderequest.md +++ b/docs/models/operations/startuniversaltranscoderequest.md @@ -3,21 +3,21 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| `hasMDE` | *number* | :heavy_check_mark: | Whether the media item has MDE | -| `path` | *string* | :heavy_check_mark: | The path to the media item to transcode | -| `mediaIndex` | *number* | :heavy_check_mark: | The index of the media item to transcode | -| `partIndex` | *number* | :heavy_check_mark: | The index of the part to transcode | -| `protocol` | *string* | :heavy_check_mark: | The protocol to use for the transcode session | -| `fastSeek` | *number* | :heavy_minus_sign: | Whether to use fast seek or not | -| `directPlay` | *number* | :heavy_minus_sign: | Whether to use direct play or not | -| `directStream` | *number* | :heavy_minus_sign: | Whether to use direct stream or not | -| `subtitleSize` | *number* | :heavy_minus_sign: | The size of the subtitles | -| `subtites` | *string* | :heavy_minus_sign: | The subtitles | -| `audioBoost` | *number* | :heavy_minus_sign: | The audio boost | -| `location` | *string* | :heavy_minus_sign: | The location of the transcode session | -| `mediaBufferSize` | *number* | :heavy_minus_sign: | The size of the media buffer | -| `session` | *string* | :heavy_minus_sign: | The session ID | -| `addDebugOverlay` | *number* | :heavy_minus_sign: | Whether to add a debug overlay or not | -| `autoAdjustQuality` | *number* | :heavy_minus_sign: | Whether to auto adjust quality or not | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| `hasMDE` | *number* | :heavy_check_mark: | Whether the media item has MDE | 1 | +| `path` | *string* | :heavy_check_mark: | The path to the media item to transcode | /library/metadata/23409 | +| `mediaIndex` | *number* | :heavy_check_mark: | The index of the media item to transcode | 0 | +| `partIndex` | *number* | :heavy_check_mark: | The index of the part to transcode | 0 | +| `protocol` | *string* | :heavy_check_mark: | The protocol to use for the transcode session | hls | +| `fastSeek` | *number* | :heavy_minus_sign: | Whether to use fast seek or not | 0 | +| `directPlay` | *number* | :heavy_minus_sign: | Whether to use direct play or not | 0 | +| `directStream` | *number* | :heavy_minus_sign: | Whether to use direct stream or not | 0 | +| `subtitleSize` | *number* | :heavy_minus_sign: | The size of the subtitles | 100 | +| `subtites` | *string* | :heavy_minus_sign: | The subtitles | burn | +| `audioBoost` | *number* | :heavy_minus_sign: | The audio boost | 100 | +| `location` | *string* | :heavy_minus_sign: | The location of the transcode session | lan | +| `mediaBufferSize` | *number* | :heavy_minus_sign: | The size of the media buffer | 102400 | +| `session` | *string* | :heavy_minus_sign: | The session ID | zvcage8b7rkioqcm8f4uns4c | +| `addDebugOverlay` | *number* | :heavy_minus_sign: | Whether to add a debug overlay or not | 0 | +| `autoAdjustQuality` | *number* | :heavy_minus_sign: | Whether to auto adjust quality or not | 0 | \ No newline at end of file diff --git a/docs/models/operations/tag.md b/docs/models/operations/tag.md deleted file mode 100644 index 99c8927f..00000000 --- a/docs/models/operations/tag.md +++ /dev/null @@ -1,28 +0,0 @@ -# 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/models/operations/updateplayprogressrequest.md b/docs/models/operations/updateplayprogressrequest.md index d471ff1d..882b879d 100644 --- a/docs/models/operations/updateplayprogressrequest.md +++ b/docs/models/operations/updateplayprogressrequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `key` | *string* | :heavy_check_mark: | the media key | -| `time` | *number* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. | -| `state` | *string* | :heavy_check_mark: | The playback state of the media item. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `key` | *string* | :heavy_check_mark: | the media key | | +| `time` | *number* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. | 90000 | +| `state` | *string* | :heavy_check_mark: | The playback state of the media item. | played | \ No newline at end of file diff --git a/docs/sdks/activities/README.md b/docs/sdks/activities/README.md index 155986f2..7344e82c 100644 --- a/docs/sdks/activities/README.md +++ b/docs/sdks/activities/README.md @@ -74,9 +74,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const activityUUID = ""; - - const result = await plexAPI.activities.cancelServerActivities(activityUUID); + const result = await plexAPI.activities.cancelServerActivities("25b71ed5-0f9d-461c-baa7-d404e9e10d3e"); // Handle the result console.log(result) @@ -87,11 +85,11 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `activityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `activityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. | [object Object] | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | ### Response diff --git a/docs/sdks/authentication/README.md b/docs/sdks/authentication/README.md index 917018de..c40073fa 100644 --- a/docs/sdks/authentication/README.md +++ b/docs/sdks/authentication/README.md @@ -28,10 +28,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const type = GetTransientTokenQueryParamType.Delegation; - const scope = Scope.All; - - const result = await plexAPI.authentication.getTransientToken(type, scope); + const result = await plexAPI.authentication.getTransientToken(GetTransientTokenQueryParamType.Delegation, Scope.All); // Handle the result console.log(result) @@ -77,9 +74,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const source = "server://client-identifier"; - - const result = await plexAPI.authentication.getSourceConnectionInformation(source); + const result = await plexAPI.authentication.getSourceConnectionInformation("server://client-identifier"); // Handle the result console.log(result) diff --git a/docs/sdks/butler/README.md b/docs/sdks/butler/README.md index b575c874..3e53f129 100644 --- a/docs/sdks/butler/README.md +++ b/docs/sdks/butler/README.md @@ -167,9 +167,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const taskName = TaskName.CleanOldBundles; - - const result = await plexAPI.butler.startTask(taskName); + const result = await plexAPI.butler.startTask(TaskName.CleanOldBundles); // Handle the result console.log(result) @@ -214,9 +212,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const taskName = PathParamTaskName.BackupDatabase; - - const result = await plexAPI.butler.stopTask(taskName); + const result = await plexAPI.butler.stopTask(PathParamTaskName.BackupDatabase); // Handle the result console.log(result) diff --git a/docs/sdks/hubs/README.md b/docs/sdks/hubs/README.md index da126474..6bdfb100 100644 --- a/docs/sdks/hubs/README.md +++ b/docs/sdks/hubs/README.md @@ -27,10 +27,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const count = 1262.49; - const onlyTransient = OnlyTransient.One; - - const result = await plexAPI.hubs.getGlobalHubs(count, onlyTransient); + const result = await plexAPI.hubs.getGlobalHubs(1262.49, OnlyTransient.One); // Handle the result console.log(result) @@ -76,11 +73,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const sectionId = 6728.76; - const count = 9010.22; - const onlyTransient = QueryParamOnlyTransient.Zero; - - const result = await plexAPI.hubs.getLibraryHubs(sectionId, count, onlyTransient); + const result = await plexAPI.hubs.getLibraryHubs(6728.76, 9010.22, QueryParamOnlyTransient.Zero); // Handle the result console.log(result) diff --git a/docs/sdks/library/README.md b/docs/sdks/library/README.md index 18ba7c25..478a939f 100644 --- a/docs/sdks/library/README.md +++ b/docs/sdks/library/README.md @@ -13,7 +13,6 @@ 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 @@ -35,10 +34,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const url = "file://C:\Image.png&type=13"; - const type = 4462.17; - - const result = await plexAPI.library.getFileHash(url, type); + const result = await plexAPI.library.getFileHash("file://C:\Image.png&type=13", 4462.17); // Handle the result console.log(result) @@ -213,10 +209,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const sectionId = 1000; - const includeDetails = IncludeDetails.Zero; - - const result = await plexAPI.library.getLibrary(sectionId, includeDetails); + const result = await plexAPI.library.getLibrary(1000, IncludeDetails.Zero); // Handle the result console.log(result) @@ -260,9 +253,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const sectionId = 1000; - - const result = await plexAPI.library.deleteLibrary(sectionId); + const result = await plexAPI.library.deleteLibrary(1000); // Handle the result console.log(result) @@ -290,73 +281,6 @@ 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 sectionId = 451092; - const tag = Tag.Unwatched; - - const result = await plexAPI.library.getLibraryItems(sectionId, tag); - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to query | -| `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.SDKError | 4xx-5xx | */* | - ## refreshLibrary This endpoint Refreshes the library. @@ -373,9 +297,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const sectionId = 934.16; - - const result = await plexAPI.library.refreshLibrary(sectionId); + const result = await plexAPI.library.refreshLibrary(934.16); // Handle the result console.log(result) @@ -437,10 +359,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const sectionId = 933505; - const type = Type.Four; - - const result = await plexAPI.library.searchLibrary(sectionId, type); + const result = await plexAPI.library.searchLibrary(933505, Type.Four); // Handle the result console.log(result) @@ -484,9 +403,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const ratingKey = 8382.31; - - const result = await plexAPI.library.getMetadata(ratingKey); + const result = await plexAPI.library.getMetadata(8382.31); // Handle the result console.log(result) @@ -530,9 +447,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const ratingKey = 1539.14; - - const result = await plexAPI.library.getMetadataChildren(ratingKey); + const result = await plexAPI.library.getMetadataChildren(1539.14); // Handle the result console.log(result) diff --git a/docs/sdks/log/README.md b/docs/sdks/log/README.md index f625ea08..b90b1881 100644 --- a/docs/sdks/log/README.md +++ b/docs/sdks/log/README.md @@ -29,11 +29,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const level = Level.Three; - const message = "Test log message"; - const source = "Postman"; - - const result = await plexAPI.log.logLine(level, message, source); + const result = await plexAPI.log.logLine(Level.Three, "Test log message", "Postman"); // Handle the result console.log(result) diff --git a/docs/sdks/media/README.md b/docs/sdks/media/README.md index 4e1c5a13..f5297b8b 100644 --- a/docs/sdks/media/README.md +++ b/docs/sdks/media/README.md @@ -27,9 +27,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const key = 59398; - - const result = await plexAPI.media.markPlayed(key); + const result = await plexAPI.media.markPlayed(59398); // Handle the result console.log(result) @@ -72,9 +70,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const key = 59398; - - const result = await plexAPI.media.markUnplayed(key); + const result = await plexAPI.media.markUnplayed(59398); // Handle the result console.log(result) @@ -118,11 +114,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const key = ""; - const time = 6900.91; - const state = ""; - - const result = await plexAPI.media.updatePlayProgress(key, time, state); + const result = await plexAPI.media.updatePlayProgress("", 90000, "played"); // Handle the result console.log(result) @@ -133,13 +125,13 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `key` | *string* | :heavy_check_mark: | the media key | -| `time` | *number* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. | -| `state` | *string* | :heavy_check_mark: | The playback state of the media item. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `key` | *string* | :heavy_check_mark: | the media key | | +| `time` | *number* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. | [object Object] | +| `state` | *string* | :heavy_check_mark: | The playback state of the media item. | [object Object] | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | ### Response diff --git a/docs/sdks/playlists/README.md b/docs/sdks/playlists/README.md index 52acc260..30c5daf4 100644 --- a/docs/sdks/playlists/README.md +++ b/docs/sdks/playlists/README.md @@ -89,10 +89,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const playlistType = PlaylistType.Audio; - const smart = QueryParamSmart.Zero; - - const result = await plexAPI.playlists.getPlaylists(playlistType, smart); + const result = await plexAPI.playlists.getPlaylists(PlaylistType.Audio, QueryParamSmart.Zero); // Handle the result console.log(result) @@ -138,9 +135,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const playlistID = 4109.48; - - const result = await plexAPI.playlists.getPlaylist(playlistID); + const result = await plexAPI.playlists.getPlaylist(4109.48); // Handle the result console.log(result) @@ -184,9 +179,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const playlistID = 216.22; - - const result = await plexAPI.playlists.deletePlaylist(playlistID); + const result = await plexAPI.playlists.deletePlaylist(216.22); // Handle the result console.log(result) @@ -230,11 +223,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const playlistID = 3915; - const title = ""; - const summary = ""; - - const result = await plexAPI.playlists.updatePlaylist(playlistID, title, summary); + const result = await plexAPI.playlists.updatePlaylist(3915, "", ""); // Handle the result console.log(result) @@ -283,10 +272,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const playlistID = 5004.46; - const type = 9403.59; - - const result = await plexAPI.playlists.getPlaylistContents(playlistID, type); + const result = await plexAPI.playlists.getPlaylistContents(5004.46, 9403.59); // Handle the result console.log(result) @@ -331,9 +317,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const playlistID = 1893.18; - - const result = await plexAPI.playlists.clearPlaylistContents(playlistID); + const result = await plexAPI.playlists.clearPlaylistContents(1893.18); // Handle the result console.log(result) @@ -378,11 +362,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const playlistID = 8502.01; - const uri = "server://12345/com.plexapp.plugins.library/library/metadata/1"; - const playQueueID = 123; - - const result = await plexAPI.playlists.addPlaylistContents(playlistID, uri, playQueueID); + const result = await plexAPI.playlists.addPlaylistContents(8502.01, "server://12345/com.plexapp.plugins.library/library/metadata/1", 123); // Handle the result console.log(result) @@ -429,10 +409,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const path = "/home/barkley/playlist.m3u"; - const force = Force.Zero; - - const result = await plexAPI.playlists.uploadPlaylist(path, force); + const result = await plexAPI.playlists.uploadPlaylist("/home/barkley/playlist.m3u", Force.Zero); // Handle the result console.log(result) diff --git a/docs/sdks/plex/README.md b/docs/sdks/plex/README.md index 16681555..eb3fad66 100644 --- a/docs/sdks/plex/README.md +++ b/docs/sdks/plex/README.md @@ -25,10 +25,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const strong = false; - const xPlexClientIdentifier = "Postman"; - - const result = await plexAPI.plex.getPin(strong, xPlexClientIdentifier); + const result = await plexAPI.plex.getPin(false, "Postman"); // Handle the result console.log(result) @@ -72,10 +69,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const pinID = ""; - const xPlexClientIdentifier = "Postman"; - - const result = await plexAPI.plex.getToken(pinID, xPlexClientIdentifier); + const result = await plexAPI.plex.getToken("", "Postman"); // Handle the result console.log(result) diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index a70f318f..1b82313a 100644 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -39,11 +39,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const query = "dylan"; - const sectionId = 1516.53; - const limit = 5; - - const result = await plexAPI.search.performSearch(query, sectionId, limit); + const result = await plexAPI.search.performSearch("dylan", 1516.53, 5); // Handle the result console.log(result) @@ -92,11 +88,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const query = "dead+poop"; - const sectionId = 4094.8; - const limit = 5; - - const result = await plexAPI.search.performVoiceSearch(query, sectionId, limit); + const result = await plexAPI.search.performVoiceSearch("dead+poop", 4094.8, 5); // Handle the result console.log(result) @@ -141,9 +133,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const query = "110"; - - const result = await plexAPI.search.getSearchResults(query); + const result = await plexAPI.search.getSearchResults("110"); // Handle the result console.log(result) diff --git a/docs/sdks/sessions/README.md b/docs/sdks/sessions/README.md index 6f7c4712..a00896e3 100644 --- a/docs/sdks/sessions/README.md +++ b/docs/sdks/sessions/README.md @@ -154,9 +154,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const sessionKey = "zz7llzqlx8w9vnrsbnwhbmep"; - - const result = await plexAPI.sessions.stopTranscodeSession(sessionKey); + const result = await plexAPI.sessions.stopTranscodeSession("zz7llzqlx8w9vnrsbnwhbmep"); // Handle the result console.log(result) diff --git a/docs/sdks/statistics/README.md b/docs/sdks/statistics/README.md index fcac7181..d199fd1d 100644 --- a/docs/sdks/statistics/README.md +++ b/docs/sdks/statistics/README.md @@ -25,9 +25,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const timespan = 411769; - - const result = await plexAPI.statistics.getStatistics(timespan); + const result = await plexAPI.statistics.getStatistics(4); // Handle the result console.log(result) @@ -38,11 +36,11 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `timespan` | *number* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `timespan` | *number* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| [object Object] | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | ### Response diff --git a/docs/sdks/updater/README.md b/docs/sdks/updater/README.md index b4bea904..e34ed17c 100644 --- a/docs/sdks/updater/README.md +++ b/docs/sdks/updater/README.md @@ -71,9 +71,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const download = Download.One; - - const result = await plexAPI.updater.checkForUpdates(download); + const result = await plexAPI.updater.checkForUpdates(Download.One); // Handle the result console.log(result) @@ -84,11 +82,11 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `download` | [operations.Download](../../models/operations/download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `download` | [operations.Download](../../models/operations/download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. | [object Object] | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | ### Response @@ -118,10 +116,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const tonight = Tonight.One; - const skip = Skip.Zero; - - const result = await plexAPI.updater.applyUpdates(tonight, skip); + const result = await plexAPI.updater.applyUpdates(Tonight.One, Skip.One); // Handle the result console.log(result) @@ -132,12 +127,12 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `tonight` | [operations.Tonight](../../models/operations/tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install | -| `skip` | [operations.Skip](../../models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The entry for this version will have the `state` set to `skipped`. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `tonight` | [operations.Tonight](../../models/operations/tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install | [object Object] | +| `skip` | [operations.Skip](../../models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The entry for this version will have the `state` set to `skipped`. | [object Object] | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | ### Response diff --git a/docs/sdks/video/README.md b/docs/sdks/video/README.md index fa08596c..7ca80131 100644 --- a/docs/sdks/video/README.md +++ b/docs/sdks/video/README.md @@ -28,16 +28,16 @@ const plexAPI = new PlexAPI({ async function run() { const result = await plexAPI.video.getTimeline({ - ratingKey: 716.56, - key: "", - state: State.Paused, - hasMDE: 7574.33, - time: 3327.51, - duration: 7585.39, - context: "", - playQueueItemID: 1406.21, - playBackTime: 2699.34, - row: 3536.42, + 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 @@ -82,11 +82,22 @@ const plexAPI = new PlexAPI({ async function run() { const result = await plexAPI.video.startUniversalTranscode({ - hasMDE: 8924.99, - path: "/etc/mail", - mediaIndex: 9962.95, - partIndex: 1232.82, - protocol: "", + hasMDE: 1, + path: "/library/metadata/23409", + mediaIndex: 0, + partIndex: 0, + protocol: "hls", + fastSeek: 0, + directPlay: 0, + directStream: 0, + subtitleSize: 100, + subtites: "burn", + audioBoost: 100, + location: "lan", + mediaBufferSize: 102400, + session: "zvcage8b7rkioqcm8f4uns4c", + addDebugOverlay: 0, + autoAdjustQuality: 0, }); // Handle the result diff --git a/jsr.json b/jsr.json index db6b09ad..2be940f4 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@lukehagar/plexjs", - "version": "0.14.2", + "version": "0.15.0", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index 7ba1d0f7..b2433c42 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@lukehagar/plexjs", - "version": "0.14.2", + "version": "0.15.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@lukehagar/plexjs", - "version": "0.14.2", + "version": "0.15.0", "devDependencies": { "@types/jsonpath": "^0.2.4", "@typescript-eslint/eslint-plugin": "^7.7.1", diff --git a/package.json b/package.json index c4fd41cd..cbbed3d0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lukehagar/plexjs", - "version": "0.14.2", + "version": "0.15.0", "author": "LukeHagar", "main": "./index.js", "sideEffects": false, diff --git a/src/lib/config.ts b/src/lib/config.ts index 5ca303c4..98c77748 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.14.2", - genVersion: "2.319.10", - userAgent: "speakeasy-sdk/typescript 0.14.2 2.319.10 0.0.3 @lukehagar/plexjs", + sdkVersion: "0.15.0", + genVersion: "2.326.3", + userAgent: "speakeasy-sdk/typescript 0.15.0 2.326.3 0.0.3 @lukehagar/plexjs", } as const; diff --git a/src/models/operations/getlibraryitems.ts b/src/models/operations/getlibraryitems.ts deleted file mode 100644 index 955b2c3b..00000000 --- a/src/models/operations/getlibraryitems.ts +++ /dev/null @@ -1,1212 +0,0 @@ -/* - * 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 const Tag$: z.ZodNativeEnum = z.nativeEnum(Tag); - -/** @internal */ -export namespace GetLibraryItemsRequest$ { - export type Inbound = { - sectionId: number; - tag: Tag; - }; - - export const inboundSchema: z.ZodType = z - .object({ - sectionId: z.number().int(), - tag: Tag$, - }) - .transform((v) => { - return { - sectionId: v.sectionId, - tag: v.tag, - }; - }); - - export type Outbound = { - sectionId: number; - tag: Tag; - }; - - export const outboundSchema: z.ZodType = z - .object({ - sectionId: z.number().int(), - tag: Tag$, - }) - .transform((v) => { - return { - sectionId: v.sectionId, - tag: v.tag, - }; - }); -} - -/** @internal */ -export namespace GetLibraryItemsPart$ { - export type Inbound = { - id?: number | undefined; - key?: string | undefined; - duration?: number | undefined; - file?: string | undefined; - size?: number | undefined; - container?: string | undefined; - videoProfile?: string | undefined; - }; - - 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 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; - videoProfile?: string | undefined; - Part?: Array | undefined; - }; - - 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 type Inbound = { - tag?: string | undefined; - }; - - 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 type Inbound = { - tag?: string | undefined; - }; - - 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 type Inbound = { - tag?: string | undefined; - }; - - 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 type Inbound = { - tag?: string | undefined; - }; - - 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 type Inbound = { - tag?: string | undefined; - }; - - 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 type Inbound = { - 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 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 type Inbound = { - 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 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 type Inbound = { - MediaContainer?: GetLibraryItemsMediaContainer$.Inbound | undefined; - }; - - 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 type Inbound = { - ContentType: string; - StatusCode: number; - RawResponse: Response; - object?: GetLibraryItemsResponseBody$.Inbound | undefined; - }; - - 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/index.ts b/src/models/operations/index.ts index 60502207..0e3731dd 100644 --- a/src/models/operations/index.ts +++ b/src/models/operations/index.ts @@ -19,7 +19,6 @@ 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/sdk/activities.ts b/src/sdk/activities.ts index f97d44ac..8b0dfac0 100644 --- a/src/sdk/activities.ts +++ b/src/sdk/activities.ts @@ -71,7 +71,7 @@ export class Activities extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -83,7 +83,7 @@ export class Activities extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -178,7 +178,7 @@ export class Activities extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -191,7 +191,7 @@ export class Activities extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", diff --git a/src/sdk/authentication.ts b/src/sdk/authentication.ts index ae0f4cba..72e570b2 100644 --- a/src/sdk/authentication.ts +++ b/src/sdk/authentication.ts @@ -90,7 +90,7 @@ export class Authentication extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -103,7 +103,7 @@ export class Authentication extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -194,7 +194,7 @@ export class Authentication extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -207,7 +207,7 @@ export class Authentication extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", diff --git a/src/sdk/butler.ts b/src/sdk/butler.ts index fec0d4ed..eee70ab1 100644 --- a/src/sdk/butler.ts +++ b/src/sdk/butler.ts @@ -69,7 +69,7 @@ export class Butler extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -81,7 +81,7 @@ export class Butler extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -162,7 +162,7 @@ export class Butler extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -174,7 +174,7 @@ export class Butler extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -246,7 +246,7 @@ export class Butler extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -258,7 +258,7 @@ export class Butler extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -353,7 +353,7 @@ export class Butler extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -366,7 +366,7 @@ export class Butler extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -457,7 +457,7 @@ export class Butler extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "404", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -470,7 +470,7 @@ export class Butler extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", diff --git a/src/sdk/hubs.ts b/src/sdk/hubs.ts index 1b9032ea..50dd1659 100644 --- a/src/sdk/hubs.ts +++ b/src/sdk/hubs.ts @@ -92,7 +92,7 @@ export class Hubs extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -105,7 +105,7 @@ export class Hubs extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -213,7 +213,7 @@ export class Hubs extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -226,7 +226,7 @@ export class Hubs extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", diff --git a/src/sdk/library.ts b/src/sdk/library.ts index 77b1b0e3..3ce388eb 100644 --- a/src/sdk/library.ts +++ b/src/sdk/library.ts @@ -89,7 +89,7 @@ export class Library extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -102,7 +102,7 @@ export class Library extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -174,7 +174,7 @@ export class Library extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -186,7 +186,7 @@ export class Library extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -268,7 +268,7 @@ export class Library extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -280,7 +280,7 @@ export class Library extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -423,7 +423,7 @@ export class Library extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -436,7 +436,7 @@ export class Library extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -531,7 +531,7 @@ export class Library extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -544,7 +544,7 @@ export class Library extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -584,127 +584,6 @@ export class Library extends ClientSDK { ); } - /** - * 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: ["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: {}, - }; - - if (this.matchResponse(response, 200, "application/json")) { - const responseBody = await response.json(); - const result = schemas$.parse( - responseBody, - (val$) => { - return operations.GetLibraryItemsResponse$.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 - ); - } - } - /** * Refresh Library * @@ -758,7 +637,7 @@ export class Library extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -771,7 +650,7 @@ export class Library extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -887,7 +766,7 @@ export class Library extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -900,7 +779,7 @@ export class Library extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -983,7 +862,7 @@ export class Library extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -996,7 +875,7 @@ export class Library extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -1094,7 +973,7 @@ export class Library extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -1107,7 +986,7 @@ export class Library extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -1184,7 +1063,7 @@ export class Library extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -1196,7 +1075,7 @@ export class Library extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", diff --git a/src/sdk/log.ts b/src/sdk/log.ts index 7ab73fa1..5f99268f 100644 --- a/src/sdk/log.ts +++ b/src/sdk/log.ts @@ -97,7 +97,7 @@ export class Log extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -110,7 +110,7 @@ export class Log extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -178,16 +178,17 @@ export class Log extends ClientSDK { * */ async logMultiLine( - input: string, + request: string, options?: RequestOptions ): Promise { + const input$ = request; const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Content-Type", "text/plain"); headers$.set("Accept", "application/json"); const payload$ = schemas$.parse( - input, + input$, (value$) => z.string().parse(value$), "Input validation failed" ); @@ -213,7 +214,7 @@ export class Log extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -226,7 +227,7 @@ export class Log extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -298,7 +299,7 @@ export class Log extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "403", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -310,7 +311,7 @@ export class Log extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", diff --git a/src/sdk/media.ts b/src/sdk/media.ts index b754fb5e..247b4773 100644 --- a/src/sdk/media.ts +++ b/src/sdk/media.ts @@ -86,7 +86,7 @@ export class Media extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -99,7 +99,7 @@ export class Media extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -187,7 +187,7 @@ export class Media extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -200,7 +200,7 @@ export class Media extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -295,7 +295,7 @@ export class Media extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -308,7 +308,7 @@ export class Media extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", diff --git a/src/sdk/playlists.ts b/src/sdk/playlists.ts index 59299115..0579e2ae 100644 --- a/src/sdk/playlists.ts +++ b/src/sdk/playlists.ts @@ -48,15 +48,16 @@ export class Playlists extends ClientSDK { * */ async createPlaylist( - input: operations.CreatePlaylistRequest, + request: operations.CreatePlaylistRequest, options?: RequestOptions ): Promise { + const input$ = request; const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Accept", "application/json"); const payload$ = schemas$.parse( - input, + input$, (value$) => operations.CreatePlaylistRequest$.outboundSchema.parse(value$), "Input validation failed" ); @@ -93,7 +94,7 @@ export class Playlists extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -106,7 +107,7 @@ export class Playlists extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -205,7 +206,7 @@ export class Playlists extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -218,7 +219,7 @@ export class Playlists extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -315,7 +316,7 @@ export class Playlists extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -328,7 +329,7 @@ export class Playlists extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -424,7 +425,7 @@ export class Playlists extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -437,7 +438,7 @@ export class Playlists extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -540,7 +541,7 @@ export class Playlists extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -553,7 +554,7 @@ export class Playlists extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -653,7 +654,7 @@ export class Playlists extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -666,7 +667,7 @@ export class Playlists extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -762,7 +763,7 @@ export class Playlists extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -775,7 +776,7 @@ export class Playlists extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -879,7 +880,7 @@ export class Playlists extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -892,7 +893,7 @@ export class Playlists extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -989,7 +990,7 @@ export class Playlists extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -1002,7 +1003,7 @@ export class Playlists extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", diff --git a/src/sdk/plex.ts b/src/sdk/plex.ts index 47e2a0ec..076fad41 100644 --- a/src/sdk/plex.ts +++ b/src/sdk/plex.ts @@ -88,7 +88,7 @@ export class Plex extends ClientSDK { const context = { operationID: "getPin", oAuth2Scopes: [], securitySource: null }; const doOptions = { context, errorCodes: ["400", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { method: "POST", @@ -101,7 +101,7 @@ export class Plex extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -198,7 +198,7 @@ export class Plex extends ClientSDK { const context = { operationID: "getToken", oAuth2Scopes: [], securitySource: null }; const doOptions = { context, errorCodes: ["400", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { method: "GET", @@ -211,7 +211,7 @@ export class Plex extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", diff --git a/src/sdk/search.ts b/src/sdk/search.ts index e3bda50f..37f57a48 100644 --- a/src/sdk/search.ts +++ b/src/sdk/search.ts @@ -107,7 +107,7 @@ export class Search extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -120,7 +120,7 @@ export class Search extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -221,7 +221,7 @@ export class Search extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -234,7 +234,7 @@ export class Search extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -322,7 +322,7 @@ export class Search extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -335,7 +335,7 @@ export class Search extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", diff --git a/src/sdk/server.ts b/src/sdk/server.ts index c6312493..82678c8a 100644 --- a/src/sdk/server.ts +++ b/src/sdk/server.ts @@ -71,7 +71,7 @@ export class Server extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -83,7 +83,7 @@ export class Server extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -161,7 +161,7 @@ export class Server extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -173,7 +173,7 @@ export class Server extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -251,7 +251,7 @@ export class Server extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -263,7 +263,7 @@ export class Server extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -339,7 +339,7 @@ export class Server extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -351,7 +351,7 @@ export class Server extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -429,7 +429,7 @@ export class Server extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -441,7 +441,7 @@ export class Server extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -517,7 +517,7 @@ export class Server extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -529,7 +529,7 @@ export class Server extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -582,15 +582,16 @@ export class Server extends ClientSDK { * */ async getResizedPhoto( - input: operations.GetResizedPhotoRequest, + request: operations.GetResizedPhotoRequest, options?: RequestOptions ): Promise { + const input$ = request; const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Accept", "application/json"); const payload$ = schemas$.parse( - input, + input$, (value$) => operations.GetResizedPhotoRequest$.outboundSchema.parse(value$), "Input validation failed" ); @@ -635,7 +636,7 @@ export class Server extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -648,7 +649,7 @@ export class Server extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -719,7 +720,7 @@ export class Server extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -731,7 +732,7 @@ export class Server extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", diff --git a/src/sdk/sessions.ts b/src/sdk/sessions.ts index fbac98fc..a3edc047 100644 --- a/src/sdk/sessions.ts +++ b/src/sdk/sessions.ts @@ -69,7 +69,7 @@ export class Sessions extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -81,7 +81,7 @@ export class Sessions extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -159,7 +159,7 @@ export class Sessions extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -171,7 +171,7 @@ export class Sessions extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -249,7 +249,7 @@ export class Sessions extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -261,7 +261,7 @@ export class Sessions extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -356,7 +356,7 @@ export class Sessions extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -369,7 +369,7 @@ export class Sessions extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", diff --git a/src/sdk/statistics.ts b/src/sdk/statistics.ts index 99046fa0..a296ca81 100644 --- a/src/sdk/statistics.ts +++ b/src/sdk/statistics.ts @@ -89,7 +89,7 @@ export class Statistics extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -102,7 +102,7 @@ export class Statistics extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", diff --git a/src/sdk/updater.ts b/src/sdk/updater.ts index 70362075..fb71e488 100644 --- a/src/sdk/updater.ts +++ b/src/sdk/updater.ts @@ -69,7 +69,7 @@ export class Updater extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -81,7 +81,7 @@ export class Updater extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -177,7 +177,7 @@ export class Updater extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -190,7 +190,7 @@ export class Updater extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -285,7 +285,7 @@ export class Updater extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "500", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -298,7 +298,7 @@ export class Updater extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", diff --git a/src/sdk/video.ts b/src/sdk/video.ts index 6d7f4c86..37257067 100644 --- a/src/sdk/video.ts +++ b/src/sdk/video.ts @@ -45,15 +45,16 @@ export class Video extends ClientSDK { * Get the timeline for a media item */ async getTimeline( - input: operations.GetTimelineRequest, + request: operations.GetTimelineRequest, options?: RequestOptions ): Promise { + const input$ = request; const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Accept", "application/json"); const payload$ = schemas$.parse( - input, + input$, (value$) => operations.GetTimelineRequest$.outboundSchema.parse(value$), "Input validation failed" ); @@ -107,7 +108,7 @@ export class Video extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -120,7 +121,7 @@ export class Video extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -167,15 +168,16 @@ export class Video extends ClientSDK { * Begin a Universal Transcode Session */ async startUniversalTranscode( - input: operations.StartUniversalTranscodeRequest, + request: operations.StartUniversalTranscodeRequest, options?: RequestOptions ): Promise { + const input$ = request; const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Accept", "application/json"); const payload$ = schemas$.parse( - input, + input$, (value$) => operations.StartUniversalTranscodeRequest$.outboundSchema.parse(value$), "Input validation failed" ); @@ -262,7 +264,7 @@ export class Video extends ClientSDK { const securitySettings$ = this.resolveGlobalSecurity(security$); const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] }; - const request = this.createRequest$( + const request$ = this.createRequest$( context, { security: securitySettings$, @@ -275,7 +277,7 @@ export class Video extends ClientSDK { options ); - const response = await this.do$(request, doOptions); + const response = await this.do$(request$, doOptions); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream",