From a449d25ac4007822d1e6c3ad154681b7ba4be5cd Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 9 May 2024 03:47:33 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.285.1 --- .speakeasy/gen.lock | 6 +- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 8 +- RELEASES.md | 12 +- codeSamples.yaml | 1474 +++++++++++++++++++------------------- jsr.json | 2 +- package-lock.json | 4 +- package.json | 2 +- src/lib/config.ts | 4 +- 9 files changed, 762 insertions(+), 752 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index caa9f3a4..a5709742 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 16f22cbf-f23f-4419-8924-3a4b06381947 management: - docChecksum: 543cb95355401d2e3c2ba11a50d9dd94 + docChecksum: 99616de456f2dedb2cba4420596c067b docVersion: 0.0.3 speakeasyVersion: 1.285.1 generationVersion: 2.326.3 - releaseVersion: 0.15.1 - configChecksum: 9ad6caa1f586db965a7953a322c036a0 + releaseVersion: 0.15.2 + configChecksum: 89b96f99c1f640afd0e03c5534ea436b repoURL: https://github.com/LukeHagar/plexjs.git repoSubDirectory: . installationURL: https://github.com/LukeHagar/plexjs diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 1ff39f83..0208d71b 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false typescript: - version: 0.15.1 + version: 0.15.2 additionalDependencies: dependencies: {} devDependencies: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 30faa8b9..94248323 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.285.1 sources: my-source: sourceNamespace: my-source - sourceRevisionDigest: sha256:a8d49b08bd320f7ec351792ad4c4ab87541b2abefe000ce285c0d41518400a03 - sourceBlobDigest: sha256:09dcfd71bda9bb2a9ef5b1ca6ace5903f3f086c05ee2748fe161f30d67dfc181 + sourceRevisionDigest: sha256:d02f790aaad0af14e824d3d12f3cfee2ff053696264b98e8a50d9c7e51d01c9c + sourceBlobDigest: sha256:d6b9c5fdd8cb9e49ac59809162309a04d47249564668baf4250b77819cfee0e0 tags: - latest - main @@ -11,8 +11,8 @@ targets: plexjs: source: my-source sourceNamespace: my-source - sourceRevisionDigest: sha256:a8d49b08bd320f7ec351792ad4c4ab87541b2abefe000ce285c0d41518400a03 - sourceBlobDigest: sha256:09dcfd71bda9bb2a9ef5b1ca6ace5903f3f086c05ee2748fe161f30d67dfc181 + sourceRevisionDigest: sha256:d02f790aaad0af14e824d3d12f3cfee2ff053696264b98e8a50d9c7e51d01c9c + sourceBlobDigest: sha256:d6b9c5fdd8cb9e49ac59809162309a04d47249564668baf4250b77819cfee0e0 outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 diff --git a/RELEASES.md b/RELEASES.md index c070a517..0cdcd5c4 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -538,4 +538,14 @@ Based on: ### Generated - [typescript v0.15.1] . ### Releases -- [NPM v0.15.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.15.1 - . \ No newline at end of file +- [NPM v0.15.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.15.1 - . + +## 2024-05-09 03:45:22 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.285.1 (2.326.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.15.2] . +### Releases +- [NPM v0.15.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.15.2 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index 08a1db8d..552831b2 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -3,14 +3,14 @@ info: title: CodeSamples overlay for typescript target version: 0.0.0 actions: - - target: $["paths"]["/photo/:/transcode"]["get"] + - target: $["paths"]["/playlists"]["get"] update: x-codeSamples: - lang: typescript - label: getResizedPhoto + label: getPlaylists source: |- import { PlexAPI } from "@lukehagar/plexjs"; - import { MinSize, Upscale } from "@lukehagar/plexjs/models/operations"; + import { PlaylistType, QueryParamSmart } from "@lukehagar/plexjs/models/operations"; const plexAPI = new PlexAPI({ accessToken: "", @@ -18,15 +18,155 @@ actions: }); async function run() { - const result = await plexAPI.getResizedPhoto({ - width: 110, - height: 165, - opacity: 100, - blur: 20, - minSize: MinSize.One, - upscale: Upscale.Zero, - url: "/library/metadata/49564/thumb/1654258204", - }); + const result = await plexAPI.getPlaylists(PlaylistType.Audio, QueryParamSmart.Zero); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/playlists/{playlistID}/items"]["put"] + update: + x-codeSamples: + - lang: typescript + label: addPlaylistContents + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.addPlaylistContents(8502.01, "server://12345/com.plexapp.plugins.library/library/metadata/1", 123); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/clients"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getAvailableClients + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.getAvailableClients(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/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"]["/"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getServerCapabilities + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.getServerCapabilities(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/library/sections"]["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"]["/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"]["/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) @@ -53,115 +193,6 @@ actions: 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"]["/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"]["/security/token"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getTransientToken - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - import { GetTransientTokenQueryParamType, Scope } from "@lukehagar/plexjs/models/operations"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getTransientToken(GetTransientTokenQueryParamType.Delegation, Scope.All); - - // 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"]["/hubs/sections/{sectionId}"]["get"] update: @@ -184,6 +215,134 @@ actions: 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"]["/playlists/upload"]["post"] + update: + x-codeSamples: + - lang: typescript + 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"]["/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"]["/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"]["/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"]["/:/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"]["/:/progress"]["post"] update: @@ -206,11 +365,11 @@ actions: } run(); - - target: $["paths"]["/hubs/search"]["get"] + - target: $["paths"]["/library/recentlyAdded"]["get"] update: x-codeSamples: - lang: typescript - label: performSearch + label: getRecentlyAdded source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -220,18 +379,18 @@ actions: }); async function run() { - const result = await plexAPI.performSearch("dylan", 1516.53, 5); + const result = await plexAPI.getRecentlyAdded(); // Handle the result console.log(result) } run(); - - target: $["paths"]["/updater/status"]["get"] + - target: $["paths"]["/devices"]["get"] update: x-codeSamples: - lang: typescript - label: getUpdateStatus + label: getDevices source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -241,90 +400,7 @@ actions: }); 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"]["/pins/{pinID}"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getToken - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getToken("", "Postman"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/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"]["/clients"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getAvailableClients - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getAvailableClients(); + const result = await plexAPI.getDevices(); // Handle the result console.log(result) @@ -363,317 +439,6 @@ actions: 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"]["/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/{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"]["/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"]["/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/{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"]["/pins"]["post"] - update: - x-codeSamples: - - lang: typescript - label: getPin - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getPin(false, "Postman"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/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"]["/search"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getSearchResults - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getSearchResults("110"); - - // 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"]["/statistics/media"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getStatistics - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getStatistics(4); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/:/prefs"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getServerPreferences - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getServerPreferences(); - - // 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"]["/activities/{activityUUID}"]["delete"] - update: - x-codeSamples: - - lang: typescript - label: cancelServerActivities - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.cancelServerActivities("25b71ed5-0f9d-461c-baa7-d404e9e10d3e"); - - // Handle the result - console.log(result) - } - run(); - target: $["paths"]["/playlists/{playlistID}"]["get"] update: @@ -696,11 +461,11 @@ actions: } run(); - - target: $["paths"]["/library/metadata/{ratingKey}"]["get"] + - target: $["paths"]["/playlists/{playlistID}/items"]["delete"] update: x-codeSamples: - lang: typescript - label: getMetadata + label: clearPlaylistContents source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -710,18 +475,18 @@ actions: }); async function run() { - const result = await plexAPI.getMetadata(8382.31); + const result = await plexAPI.clearPlaylistContents(1893.18); // Handle the result console.log(result) } run(); - - target: $["paths"]["/log/networked"]["get"] + - target: $["paths"]["/myplex/account"]["get"] update: x-codeSamples: - lang: typescript - label: enablePaperTrail + label: getMyPlexAccount source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -731,7 +496,71 @@ actions: }); async function run() { - const result = await plexAPI.enablePaperTrail(); + const result = await plexAPI.getMyPlexAccount(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/library/onDeck"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getOnDeck + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.getOnDeck(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/playlists/{playlistID}/items"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getPlaylistContents + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.getPlaylistContents(5004.46, 9403.59); + + // 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) @@ -765,11 +594,11 @@ actions: } run(); - - target: $["paths"]["/"]["get"] + - target: $["paths"]["/servers"]["get"] update: x-codeSamples: - lang: typescript - label: getServerCapabilities + label: getServerList source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -779,21 +608,20 @@ actions: }); async function run() { - const result = await plexAPI.getServerCapabilities(); + const result = await plexAPI.getServerList(); // Handle the result console.log(result) } run(); - - target: $["paths"]["/butler/{taskName}"]["post"] + - target: $["paths"]["/:/scrobble"]["get"] update: x-codeSamples: - lang: typescript - label: startTask + label: markPlayed source: |- import { PlexAPI } from "@lukehagar/plexjs"; - import { TaskName } from "@lukehagar/plexjs/models/operations"; const plexAPI = new PlexAPI({ accessToken: "", @@ -801,18 +629,18 @@ actions: }); async function run() { - const result = await plexAPI.startTask(TaskName.CleanOldBundles); + const result = await plexAPI.markPlayed(59398); // Handle the result console.log(result) } run(); - - target: $["paths"]["/hubs/search/voice"]["get"] + - target: $["paths"]["/library/hashes"]["get"] update: x-codeSamples: - lang: typescript - label: performVoiceSearch + label: getFileHash source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -822,18 +650,18 @@ actions: }); async function run() { - const result = await plexAPI.performVoiceSearch("dead+poop", 4094.8, 5); + const result = await plexAPI.getFileHash("file://C:\Image.png&type=13", 4462.17); // Handle the result console.log(result) } run(); - - target: $["paths"]["/status/sessions"]["get"] + - target: $["paths"]["/status/sessions/history/all"]["get"] update: x-codeSamples: - lang: typescript - label: getSessions + label: getSessionHistory source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -843,7 +671,28 @@ actions: }); async function run() { - const result = await plexAPI.getSessions(); + const result = await plexAPI.getSessionHistory(); + + // 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) @@ -892,11 +741,11 @@ actions: } run(); - - target: $["paths"]["/library/metadata/{ratingKey}/children"]["get"] + - target: $["paths"]["/library/metadata/{ratingKey}"]["get"] update: x-codeSamples: - lang: typescript - label: getMetadataChildren + label: getMetadata source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -906,18 +755,18 @@ actions: }); async function run() { - const result = await plexAPI.getMetadataChildren(1539.14); + const result = await plexAPI.getMetadata(8382.31); // Handle the result console.log(result) } run(); - - target: $["paths"]["/playlists/{playlistID}"]["delete"] + - target: $["paths"]["/log"]["post"] update: x-codeSamples: - lang: typescript - label: deletePlaylist + label: logMultiLine source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -927,20 +776,23 @@ actions: }); async function run() { - const result = await plexAPI.deletePlaylist(216.22); + 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"]["/playlists/{playlistID}/items"]["get"] + - target: $["paths"]["/library/sections/{sectionId}/search"]["get"] update: x-codeSamples: - lang: typescript - label: getPlaylistContents + label: searchLibrary source: |- import { PlexAPI } from "@lukehagar/plexjs"; + import { Type } from "@lukehagar/plexjs/models/operations"; const plexAPI = new PlexAPI({ accessToken: "", @@ -948,18 +800,18 @@ actions: }); async function run() { - const result = await plexAPI.getPlaylistContents(5004.46, 9403.59); + const result = await plexAPI.searchLibrary(933505, Type.Four); // Handle the result console.log(result) } run(); - - target: $["paths"]["/:/unscrobble"]["get"] + - target: $["paths"]["/statistics/media"]["get"] update: x-codeSamples: - lang: typescript - label: markUnplayed + label: getStatistics source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -969,7 +821,28 @@ actions: }); async function run() { - const result = await plexAPI.markUnplayed(59398); + const result = await plexAPI.getStatistics(4); + + // 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) @@ -997,14 +870,13 @@ actions: } run(); - - target: $["paths"]["/updater/apply"]["put"] + - target: $["paths"]["/search"]["get"] update: x-codeSamples: - lang: typescript - label: applyUpdates + label: getSearchResults source: |- import { PlexAPI } from "@lukehagar/plexjs"; - import { Skip, Tonight } from "@lukehagar/plexjs/models/operations"; const plexAPI = new PlexAPI({ accessToken: "", @@ -1012,21 +884,20 @@ actions: }); async function run() { - const result = await plexAPI.applyUpdates(Tonight.One, Skip.One); + const result = await plexAPI.getSearchResults("110"); // Handle the result console.log(result) } run(); - - target: $["paths"]["/updater/check"]["put"] + - target: $["paths"]["/updater/status"]["get"] update: x-codeSamples: - lang: typescript - label: checkForUpdates + label: getUpdateStatus source: |- import { PlexAPI } from "@lukehagar/plexjs"; - import { Download } from "@lukehagar/plexjs/models/operations"; const plexAPI = new PlexAPI({ accessToken: "", @@ -1034,20 +905,21 @@ actions: }); async function run() { - const result = await plexAPI.checkForUpdates(Download.One); + const result = await plexAPI.getUpdateStatus(); // Handle the result console.log(result) } run(); - - target: $["paths"]["/servers"]["get"] + - target: $["paths"]["/butler/{taskName}"]["post"] update: x-codeSamples: - lang: typescript - label: getServerList + label: startTask source: |- import { PlexAPI } from "@lukehagar/plexjs"; + import { TaskName } from "@lukehagar/plexjs/models/operations"; const plexAPI = new PlexAPI({ accessToken: "", @@ -1055,7 +927,7 @@ actions: }); async function run() { - const result = await plexAPI.getServerList(); + const result = await plexAPI.startTask(TaskName.CleanOldBundles); // Handle the result console.log(result) @@ -1083,177 +955,6 @@ actions: 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"]["/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"]["/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/onDeck"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getOnDeck - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getOnDeck(); - - // 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"; - 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"]["/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"]["/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"]["/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"]["/log"]["get"] update: @@ -1277,11 +978,63 @@ actions: } run(); - - target: $["paths"]["/playlists/{playlistID}/items"]["put"] + - target: $["paths"]["/updater/check"]["put"] update: x-codeSamples: - lang: typescript - label: addPlaylistContents + 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"]["/photo/:/transcode"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getResizedPhoto + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { MinSize, Upscale } from "@lukehagar/plexjs/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.getResizedPhoto({ + width: 110, + height: 165, + opacity: 100, + blur: 20, + minSize: MinSize.One, + upscale: Upscale.Zero, + url: "/library/metadata/49564/thumb/1654258204", + }); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/video/:/transcode/universal/start.mpd"]["get"] + update: + x-codeSamples: + - lang: typescript + label: startUniversalTranscode source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -1291,7 +1044,254 @@ actions: }); async function run() { - const result = await plexAPI.addPlaylistContents(8502.01, "server://12345/com.plexapp.plugins.library/library/metadata/1", 123); + const result = await plexAPI.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"]["/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"]["/security/token"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getTransientToken + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { GetTransientTokenQueryParamType, Scope } from "@lukehagar/plexjs/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.getTransientToken(GetTransientTokenQueryParamType.Delegation, Scope.All); + + // 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"]["/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"]["/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"]["/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"]["/pins"]["post"] + update: + x-codeSamples: + - lang: typescript + label: getPin + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.getPin(false, "Postman"); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/pins/{pinID}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getToken + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.getToken("", "Postman"); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/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"]["/:/prefs"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getServerPreferences + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.getServerPreferences(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/activities/{activityUUID}"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: cancelServerActivities + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.cancelServerActivities("25b71ed5-0f9d-461c-baa7-d404e9e10d3e"); // Handle the result console.log(result) diff --git a/jsr.json b/jsr.json index 29cc7ef4..0a66489a 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@lukehagar/plexjs", - "version": "0.15.1", + "version": "0.15.2", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index 5c08892d..9df04f13 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@lukehagar/plexjs", - "version": "0.15.1", + "version": "0.15.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@lukehagar/plexjs", - "version": "0.15.1", + "version": "0.15.2", "devDependencies": { "@types/jsonpath": "^0.2.4", "@typescript-eslint/eslint-plugin": "^7.7.1", diff --git a/package.json b/package.json index 8e6511ae..09952131 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lukehagar/plexjs", - "version": "0.15.1", + "version": "0.15.2", "author": "LukeHagar", "main": "./index.js", "sideEffects": false, diff --git a/src/lib/config.ts b/src/lib/config.ts index 2205950a..b94ab387 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -87,7 +87,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "0.0.3", - sdkVersion: "0.15.1", + sdkVersion: "0.15.2", genVersion: "2.326.3", - userAgent: "speakeasy-sdk/typescript 0.15.1 2.326.3 0.0.3 @lukehagar/plexjs", + userAgent: "speakeasy-sdk/typescript 0.15.2 2.326.3 0.0.3 @lukehagar/plexjs", } as const;