From bc1fa685577bceabaf05f75a6dc349d28d1bf76f Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Fri, 3 May 2024 00:29:29 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.277.8 --- .speakeasy/gen.lock | 10 +- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 2 +- RELEASES.md | 12 +- codeSamples.yaml | 1018 ++++++++++++++++++------------------- jsr.json | 2 +- package-lock.json | 4 +- package.json | 2 +- src/lib/config.ts | 6 +- src/lib/http.ts | 12 +- src/sdk/activities.ts | 2 + src/sdk/authentication.ts | 2 + src/sdk/butler.ts | 5 + src/sdk/hubs.ts | 2 + src/sdk/library.ts | 11 + src/sdk/log.ts | 3 + src/sdk/media.ts | 3 + src/sdk/playlists.ts | 9 + src/sdk/plex.ts | 2 + src/sdk/search.ts | 3 + src/sdk/server.ts | 8 + src/sdk/sessions.ts | 4 + src/sdk/statistics.ts | 1 + src/sdk/updater.ts | 3 + src/sdk/video.ts | 2 + 25 files changed, 605 insertions(+), 525 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 9edc0e82..b26d9a7c 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -3,10 +3,10 @@ id: 16f22cbf-f23f-4419-8924-3a4b06381947 management: docChecksum: 7a43cd3413d535205cfaee20a4b6a250 docVersion: 0.0.3 - speakeasyVersion: 1.277.0 - generationVersion: 2.317.0 - releaseVersion: 0.14.1 - configChecksum: 398598dba425aa0436966c866c6282c9 + speakeasyVersion: 1.277.8 + generationVersion: 2.319.10 + releaseVersion: 0.14.2 + configChecksum: 2565798d4bdc6007bc5296ad6dc6ee55 repoURL: https://github.com/LukeHagar/plexjs.git repoSubDirectory: . installationURL: https://github.com/LukeHagar/plexjs @@ -14,7 +14,7 @@ management: features: typescript: constsAndDefaults: 0.1.5 - core: 3.9.2 + core: 3.9.3 flattening: 2.81.1 globalSecurity: 2.82.9 globalServerURLs: 2.82.4 diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index d0b78149..6717ad2d 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false typescript: - version: 0.14.1 + version: 0.14.2 additionalDependencies: dependencies: {} devDependencies: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index c46cd9e1..25ab41d5 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.277.4 +speakeasyVersion: 1.277.8 sources: my-source: {} targets: diff --git a/RELEASES.md b/RELEASES.md index 256a9ee3..1e837791 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -448,4 +448,14 @@ Based on: ### Generated - [typescript v0.14.1] . ### Releases -- [NPM v0.14.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.14.1 - . \ No newline at end of file +- [NPM v0.14.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.14.1 - . + +## 2024-05-03 00:27:14 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.277.8 (2.319.10) https://github.com/speakeasy-api/speakeasy +### 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 diff --git a/codeSamples.yaml b/codeSamples.yaml index a3225808..6d14bdb4 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -24,75 +24,12 @@ actions: } run(); - - target: $["paths"]["/:/scrobble"]["get"] + - target: $["paths"]["/hubs"]["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/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"]["/library/metadata/{ratingKey}"]["get"] - update: - 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}"]["put"] - 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"]["/updater/check"]["put"] - 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"]["/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: 8924.99, - path: "/etc/mail", - mediaIndex: 9962.95, - partIndex: 1232.82, - protocol: "", - }); - - // 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"]["/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();" + 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"]["/library/sections"]["get"] update: x-codeSamples: @@ -114,254 +51,6 @@ actions: } 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 = 6900.91;\n const state = \"\";\n \n const result = await plexAPI.updatePlayProgress(key, time, state);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/butler/{taskName}"]["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"]["/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"]["/library/sections/{sectionId}/refresh"]["get"] - 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"]["/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"]["/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.Zero;\n \n const result = await plexAPI.applyUpdates(tonight, skip);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - 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"]["/servers"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getServerList - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getServerList(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/activities"]["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"]["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"]["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"]["/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 = 411769;\n \n const result = await plexAPI.getStatistics(timespan);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - 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"]["/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"]["/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"]["/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"]["/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();" - - 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"]["/status/sessions"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getSessions - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getSessions(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/transcode/sessions"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getTranscodeSessions - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getTranscodeSessions(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/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"]["/"]["get"] update: x-codeSamples: @@ -383,11 +72,29 @@ actions: } run(); - - target: $["paths"]["/clients"]["get"] + - target: $["paths"]["/pins"]["post"] update: x-codeSamples: - lang: typescript - label: getAvailableClients + 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"]["/playlists/{playlistID}"]["put"] + 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"]["/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"]["/status/sessions/history/all"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getSessionHistory source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -397,13 +104,19 @@ actions: }); async function run() { - const result = await plexAPI.getAvailableClients(); + const result = await plexAPI.getSessionHistory(); // 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\";\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"]["/:/timeline"]["get"] update: x-codeSamples: @@ -437,60 +150,18 @@ actions: } run(); - - target: $["paths"]["/butler"]["get"] + - target: $["paths"]["/playlists/{playlistID}"]["delete"] update: x-codeSamples: - lang: typescript - label: getButlerTasks - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getButlerTasks(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/log/networked"]["get"] + 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"]["/security/token"]["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}"]["get"] - update: - 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}/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();" + 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"]["/devices"]["get"] update: x-codeSamples: @@ -511,39 +182,6 @@ actions: console.log(result) } - run(); - - 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"]["/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"]["/identity"]["get"] update: @@ -566,6 +204,365 @@ actions: } 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}/refresh"]["get"] + 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"]["/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"]["/updater/status"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getUpdateStatus + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.getUpdateStatus(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/updater/check"]["put"] + 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"]["/butler"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getButlerTasks + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.getButlerTasks(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/butler"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: stopAllTasks + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.stopAllTasks(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}"]["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"]["/playlists/{playlistID}"]["get"] + update: + 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"]["/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"]["/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"]["/butler/{taskName}"]["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"]["/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/metadata/{ratingKey}"]["get"] + update: + 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"]["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"]["/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 = \"\";\n \n const result = await plexAPI.cancelServerActivities(activityUUID);\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"]["/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"]["/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 = 411769;\n \n const result = await plexAPI.getStatistics(timespan);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - 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"]["/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: 8924.99, + path: "/etc/mail", + mediaIndex: 9962.95, + partIndex: 1232.82, + protocol: "", + }); + + // 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\";\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/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"]["/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"]["/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: + - 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"]["/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"]["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"]["/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"]["/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();" - target: $["paths"]["/photo/:/transcode"]["get"] update: x-codeSamples: @@ -596,44 +593,23 @@ actions: } run(); - - target: $["paths"]["/butler"]["post"] - update: - x-codeSamples: - - lang: typescript - label: startAllTasks - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.startAllTasks(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/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"]["/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"]["/status/sessions/history/all"]["get"] + - target: $["paths"]["/updater/apply"]["put"] update: x-codeSamples: - lang: typescript - label: getSessionHistory + 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.Zero;\n \n const result = await plexAPI.applyUpdates(tonight, skip);\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"; @@ -643,118 +619,142 @@ actions: }); async function run() { - const result = await plexAPI.getSessionHistory(); + const result = await plexAPI.getTranscodeSessions(); // Handle the result console.log(result) } run(); - - target: $["paths"]["/activities/{activityUUID}"]["delete"] + - target: $["paths"]["/clients"]["get"] 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 = \"\";\n \n const result = await plexAPI.cancelServerActivities(activityUUID);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/search"]["get"] + 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: 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"]["/library/sections/{sectionId}/search"]["get"] + 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: 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();" + 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"]["/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/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/metadata/{ratingKey}/children"]["get"] - 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"]["/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"]["/updater/status"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getUpdateStatus - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.getUpdateStatus(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/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/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"]["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"]["/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"]["/:/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"]["/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"]["/transcode/sessions/{sessionKey}"]["delete"] 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();" + - 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 = 6900.91;\n const state = \"\";\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/{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/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(); diff --git a/jsr.json b/jsr.json index d5bf0fd0..db6b09ad 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@lukehagar/plexjs", - "version": "0.14.1", + "version": "0.14.2", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index 8220c5e8..7ba1d0f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@lukehagar/plexjs", - "version": "0.14.1", + "version": "0.14.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@lukehagar/plexjs", - "version": "0.14.1", + "version": "0.14.2", "devDependencies": { "@types/jsonpath": "^0.2.4", "@typescript-eslint/eslint-plugin": "^7.7.1", diff --git a/package.json b/package.json index 9189da63..c4fd41cd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lukehagar/plexjs", - "version": "0.14.1", + "version": "0.14.2", "author": "LukeHagar", "main": "./index.js", "sideEffects": false, diff --git a/src/lib/config.ts b/src/lib/config.ts index 33e96b5a..5ca303c4 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.1", - genVersion: "2.317.0", - userAgent: "speakeasy-sdk/typescript 0.14.1 2.317.0 0.0.3 @lukehagar/plexjs", + sdkVersion: "0.14.2", + genVersion: "2.319.10", + userAgent: "speakeasy-sdk/typescript 0.14.2 2.319.10 0.0.3 @lukehagar/plexjs", } as const; diff --git a/src/lib/http.ts b/src/lib/http.ts index b4e519ca..4c1edfd6 100644 --- a/src/lib/http.ts +++ b/src/lib/http.ts @@ -9,7 +9,17 @@ export type Fetcher = ( export type Awaitable = T | Promise; -const DEFAULT_FETCHER: Fetcher = (input, init) => fetch(input, init); +const DEFAULT_FETCHER: Fetcher = (input, init) => { + // If input is a Request and init is undefined, Bun will discard the method, + // headers, body and other options that were set on the request object. + // Node.js and browers would ignore an undefined init value. This check is + // therefore needed for interop with Bun. + if (init == null) { + return fetch(input); + } else { + return fetch(input, init); + } +}; export type RequestInput = { /** diff --git a/src/sdk/activities.ts b/src/sdk/activities.ts index fc54a28a..f97d44ac 100644 --- a/src/sdk/activities.ts +++ b/src/sdk/activities.ts @@ -89,6 +89,7 @@ export class Activities extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -196,6 +197,7 @@ export class Activities extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { diff --git a/src/sdk/authentication.ts b/src/sdk/authentication.ts index a1ce420f..ae0f4cba 100644 --- a/src/sdk/authentication.ts +++ b/src/sdk/authentication.ts @@ -109,6 +109,7 @@ export class Authentication extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { @@ -212,6 +213,7 @@ export class Authentication extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { diff --git a/src/sdk/butler.ts b/src/sdk/butler.ts index b121c52c..fec0d4ed 100644 --- a/src/sdk/butler.ts +++ b/src/sdk/butler.ts @@ -87,6 +87,7 @@ export class Butler extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -179,6 +180,7 @@ export class Butler extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { @@ -262,6 +264,7 @@ export class Butler extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { @@ -369,6 +372,7 @@ export class Butler extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, [200, 202])) { @@ -472,6 +476,7 @@ export class Butler extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { diff --git a/src/sdk/hubs.ts b/src/sdk/hubs.ts index b3a2c952..1b9032ea 100644 --- a/src/sdk/hubs.ts +++ b/src/sdk/hubs.ts @@ -111,6 +111,7 @@ export class Hubs extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -231,6 +232,7 @@ export class Hubs extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { diff --git a/src/sdk/library.ts b/src/sdk/library.ts index 770f49c7..77b1b0e3 100644 --- a/src/sdk/library.ts +++ b/src/sdk/library.ts @@ -108,6 +108,7 @@ export class Library extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { @@ -191,6 +192,7 @@ export class Library extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -284,6 +286,7 @@ export class Library extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -439,6 +442,7 @@ export class Library extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -546,6 +550,7 @@ export class Library extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { @@ -674,6 +679,7 @@ export class Library extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -771,6 +777,7 @@ export class Library extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { @@ -899,6 +906,7 @@ export class Library extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -994,6 +1002,7 @@ export class Library extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1104,6 +1113,7 @@ export class Library extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1192,6 +1202,7 @@ export class Library extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { diff --git a/src/sdk/log.ts b/src/sdk/log.ts index 1fe63cb8..7ab73fa1 100644 --- a/src/sdk/log.ts +++ b/src/sdk/log.ts @@ -116,6 +116,7 @@ export class Log extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { @@ -231,6 +232,7 @@ export class Log extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { @@ -314,6 +316,7 @@ export class Log extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { diff --git a/src/sdk/media.ts b/src/sdk/media.ts index 10ff48f9..b754fb5e 100644 --- a/src/sdk/media.ts +++ b/src/sdk/media.ts @@ -105,6 +105,7 @@ export class Media extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { @@ -205,6 +206,7 @@ export class Media extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { @@ -312,6 +314,7 @@ export class Media extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { diff --git a/src/sdk/playlists.ts b/src/sdk/playlists.ts index 41b93dfe..59299115 100644 --- a/src/sdk/playlists.ts +++ b/src/sdk/playlists.ts @@ -112,6 +112,7 @@ export class Playlists extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -223,6 +224,7 @@ export class Playlists extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -332,6 +334,7 @@ export class Playlists extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -440,6 +443,7 @@ export class Playlists extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { @@ -555,6 +559,7 @@ export class Playlists extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { @@ -667,6 +672,7 @@ export class Playlists extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -775,6 +781,7 @@ export class Playlists extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { @@ -891,6 +898,7 @@ export class Playlists extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1000,6 +1008,7 @@ export class Playlists extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { diff --git a/src/sdk/plex.ts b/src/sdk/plex.ts index e7fcc847..47e2a0ec 100644 --- a/src/sdk/plex.ts +++ b/src/sdk/plex.ts @@ -107,6 +107,7 @@ export class Plex extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -216,6 +217,7 @@ export class Plex extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { diff --git a/src/sdk/search.ts b/src/sdk/search.ts index 0330e911..e3bda50f 100644 --- a/src/sdk/search.ts +++ b/src/sdk/search.ts @@ -126,6 +126,7 @@ export class Search extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { @@ -239,6 +240,7 @@ export class Search extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { @@ -339,6 +341,7 @@ export class Search extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { diff --git a/src/sdk/server.ts b/src/sdk/server.ts index 3b382086..c6312493 100644 --- a/src/sdk/server.ts +++ b/src/sdk/server.ts @@ -89,6 +89,7 @@ export class Server extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -178,6 +179,7 @@ export class Server extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -267,6 +269,7 @@ export class Server extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -354,6 +357,7 @@ export class Server extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -443,6 +447,7 @@ export class Server extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -530,6 +535,7 @@ export class Server extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -648,6 +654,7 @@ export class Server extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { @@ -730,6 +737,7 @@ export class Server extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { diff --git a/src/sdk/sessions.ts b/src/sdk/sessions.ts index 72e9eda5..fbac98fc 100644 --- a/src/sdk/sessions.ts +++ b/src/sdk/sessions.ts @@ -87,6 +87,7 @@ export class Sessions extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -176,6 +177,7 @@ export class Sessions extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -265,6 +267,7 @@ export class Sessions extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -372,6 +375,7 @@ export class Sessions extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { diff --git a/src/sdk/statistics.ts b/src/sdk/statistics.ts index 6aabc30c..99046fa0 100644 --- a/src/sdk/statistics.ts +++ b/src/sdk/statistics.ts @@ -108,6 +108,7 @@ export class Statistics extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { diff --git a/src/sdk/updater.ts b/src/sdk/updater.ts index 6adf59f1..70362075 100644 --- a/src/sdk/updater.ts +++ b/src/sdk/updater.ts @@ -87,6 +87,7 @@ export class Updater extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -195,6 +196,7 @@ export class Updater extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { @@ -302,6 +304,7 @@ export class Updater extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { diff --git a/src/sdk/video.ts b/src/sdk/video.ts index a1e1afa4..6d7f4c86 100644 --- a/src/sdk/video.ts +++ b/src/sdk/video.ts @@ -126,6 +126,7 @@ export class Video extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { @@ -280,6 +281,7 @@ export class Video extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) {