Compare commits

...

16 Commits

Author SHA1 Message Date
speakeasybot
8c39ddc475 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.323.0 2024-07-01 16:25:36 +00:00
speakeasybot
dca338d40f ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.323.0 2024-07-01 15:45:04 +00:00
speakeasy-bot
06e59965bd Update push code samples in generation action 2024-07-01 15:42:29 +00:00
speakeasy-bot
0be9307f80 Create speakeasy tagging action workflow 2024-07-01 15:42:28 +00:00
speakeasy-bot
25dcf36b37 Add code samples registry configuration 2024-07-01 15:42:27 +00:00
speakeasybot
63f13fd266 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.322.3 2024-07-01 00:01:40 +00:00
speakeasybot
f21eae30b1 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.322.3 2024-06-30 00:01:32 +00:00
speakeasybot
eb75f8d060 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.322.3 2024-06-29 00:01:30 +00:00
speakeasybot
5e8618aa6f ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.322.1 2024-06-28 00:01:31 +00:00
speakeasybot
335ccf134f ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.321.0 2024-06-27 00:01:38 +00:00
speakeasybot
9bcd82719e ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.318.0 2024-06-26 00:04:01 +00:00
speakeasybot
58005d93e9 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.315.2 2024-06-25 00:01:33 +00:00
speakeasybot
a366d87e75 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.314.2 2024-06-24 00:01:35 +00:00
speakeasybot
d1f30a9f2c ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.314.2 2024-06-23 00:01:39 +00:00
speakeasybot
087db87584 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.314.2 2024-06-22 00:02:56 +00:00
speakeasybot
7406efba26 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.308.1 2024-06-15 00:01:23 +00:00
152 changed files with 3806 additions and 1319 deletions

View File

@@ -1,28 +1,31 @@
name: Generate
permissions:
checks: write
contents: write
pull-requests: write
statuses: write
on:
workflow_dispatch:
inputs:
force:
description: Force generation of SDKs
type: boolean
default: false
schedule:
- cron: 0 0 * * *
checks: write
contents: write
pull-requests: write
statuses: write
"on":
workflow_dispatch:
inputs:
force:
description: Force generation of SDKs
type: boolean
default: false
push_code_samples_only:
description: Force push only code samples from SDK generation
type: boolean
default: false
schedule:
- cron: 0 0 * * *
jobs:
generate:
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
with:
force: ${{ github.event.inputs.force }}
mode: direct
speakeasy_version: latest
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
npm_token: ${{ secrets.NPM_TOKEN }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
generate:
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
with:
force: ${{ github.event.inputs.force }}
mode: direct
push_code_samples_only: ${{ fromJSON(github.event.inputs.push_code_samples_only) }}
speakeasy_version: latest
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
npm_token: ${{ secrets.NPM_TOKEN }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}

20
.github/workflows/tagging.yaml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: Speakeasy Tagging
permissions:
checks: write
contents: write
pull-requests: write
statuses: write
"on":
push:
branches:
- main
paths: []
workflow_dispatch: {}
jobs:
tag:
uses: speakeasy-api/sdk-generation-action/.github/workflows/tag.yaml@v15
with:
registry_tags: main
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}

View File

@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 16f22cbf-f23f-4419-8924-3a4b06381947
management:
docChecksum: 37654ea0982ab5e87a9a9576014c9d19
docChecksum: e73920abd3a55e8d249592f2e3090574
docVersion: 0.0.3
speakeasyVersion: 1.308.1
generationVersion: 2.342.6
releaseVersion: 0.17.0
configChecksum: 91cb964c770722eba5f69c04d32554eb
speakeasyVersion: 1.323.0
generationVersion: 2.356.0
releaseVersion: 0.18.2
configChecksum: f685b81e83e5dfee0dae18eae6baa522
repoURL: https://github.com/LukeHagar/plexjs.git
repoSubDirectory: .
installationURL: https://github.com/LukeHagar/plexjs
@@ -15,7 +15,7 @@ features:
typescript:
additionalDependencies: 0.1.0
constsAndDefaults: 0.1.5
core: 3.9.14
core: 3.10.2
flattening: 2.81.1
globalSecurity: 2.82.9
globalSecurityCallbacks: 0.1.0
@@ -24,9 +24,11 @@ features:
globals: 2.82.1
methodServerURLs: 2.82.1
nameOverrides: 2.81.2
nullables: 0.1.0
responseFormat: 0.2.3
sdkHooks: 0.1.0
typeOverrides: 2.81.1
unions: 2.85.5
generatedFiles:
- src/sdk/server.ts
- src/sdk/media.ts
@@ -45,7 +47,7 @@ generatedFiles:
- src/sdk/updater.ts
- src/sdk/watchlist.ts
- src/sdk/sdk.ts
- .eslintrc.js
- .eslintrc.cjs
- .npmignore
- RUNTIMES.md
- jsr.json
@@ -109,6 +111,7 @@ generatedFiles:
- src/models/searchlibraryop.ts
- src/models/getmetadataop.ts
- src/models/getmetadatachildrenop.ts
- src/models/gettopwatchedcontentop.ts
- src/models/getondeckop.ts
- src/models/loglineop.ts
- src/models/logmultilineop.ts
@@ -125,6 +128,8 @@ generatedFiles:
- src/models/gettransienttokenop.ts
- src/models/getsourceconnectioninformationop.ts
- src/models/getstatisticsop.ts
- src/models/getresourcesstatisticsop.ts
- src/models/getbandwidthstatisticsop.ts
- src/models/getsessionsop.ts
- src/models/getsessionhistoryop.ts
- src/models/gettranscodesessionsop.ts
@@ -348,6 +353,7 @@ generatedFiles:
- docs/models/getlibraryitemsrequest.md
- docs/models/getlibraryitemserrors.md
- docs/models/getlibraryitemslibraryresponsebody.md
- docs/models/librarysectionid.md
- docs/models/getlibraryitemspart.md
- docs/models/getlibraryitemsmedia.md
- docs/models/getlibraryitemsgenre.md
@@ -397,6 +403,16 @@ generatedFiles:
- docs/models/getmetadatachildrenmediacontainer.md
- docs/models/getmetadatachildrenresponsebody.md
- docs/models/getmetadatachildrenresponse.md
- docs/models/gettopwatchedcontentrequest.md
- docs/models/gettopwatchedcontentgenre.md
- docs/models/gettopwatchedcontentcountry.md
- docs/models/gettopwatchedcontentguids.md
- docs/models/gettopwatchedcontentrole.md
- docs/models/user.md
- docs/models/gettopwatchedcontentmetadata.md
- docs/models/gettopwatchedcontentmediacontainer.md
- docs/models/gettopwatchedcontentresponsebody.md
- docs/models/gettopwatchedcontentresponse.md
- docs/models/getondeckerrors.md
- docs/models/getondecklibraryresponsebody.md
- docs/models/getondeckstream.md
@@ -500,18 +516,36 @@ generatedFiles:
- docs/models/getstatisticsmediacontainer.md
- docs/models/getstatisticsresponsebody.md
- docs/models/getstatisticsresponse.md
- docs/models/getresourcesstatisticsrequest.md
- docs/models/getresourcesstatisticserrors.md
- docs/models/getresourcesstatisticsstatisticsresponsebody.md
- docs/models/statisticsresources.md
- docs/models/getresourcesstatisticsmediacontainer.md
- docs/models/getresourcesstatisticsresponsebody.md
- docs/models/getresourcesstatisticsresponse.md
- docs/models/getbandwidthstatisticsrequest.md
- docs/models/getbandwidthstatisticserrors.md
- docs/models/getbandwidthstatisticsstatisticsresponsebody.md
- docs/models/getbandwidthstatisticsdevice.md
- docs/models/getbandwidthstatisticsaccount.md
- docs/models/statisticsbandwidth.md
- docs/models/getbandwidthstatisticsmediacontainer.md
- docs/models/getbandwidthstatisticsresponsebody.md
- docs/models/getbandwidthstatisticsresponse.md
- docs/models/getsessionserrors.md
- docs/models/getsessionssessionsresponsebody.md
- docs/models/getsessionsstream.md
- docs/models/getsessionspart.md
- docs/models/getsessionsmedia.md
- docs/models/user.md
- docs/models/getsessionsuser.md
- docs/models/player.md
- docs/models/session.md
- docs/models/getsessionsmetadata.md
- docs/models/getsessionsmediacontainer.md
- docs/models/getsessionsresponsebody.md
- docs/models/getsessionsresponse.md
- docs/models/filter.md
- docs/models/getsessionhistoryrequest.md
- docs/models/getsessionhistoryerrors.md
- docs/models/getsessionhistorysessionsresponsebody.md
- docs/models/getsessionhistorymetadata.md
@@ -545,7 +579,7 @@ generatedFiles:
- docs/models/applyupdateserrors.md
- docs/models/applyupdatesresponsebody.md
- docs/models/applyupdatesresponse.md
- docs/models/filter.md
- docs/models/pathparamfilter.md
- docs/models/libtype.md
- docs/models/includecollections.md
- docs/models/includeexternalmedia.md

View File

@@ -12,7 +12,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: true
typescript:
version: 0.17.0
version: 0.18.2
additionalDependencies:
dependencies: {}
devDependencies: {}
@@ -37,3 +37,4 @@ typescript:
packageName: '@lukehagar/plexjs'
responseFormat: envelope
templateVersion: v2
useIndexModules: true

View File

@@ -1,9 +1,9 @@
speakeasyVersion: 1.308.1
speakeasyVersion: 1.323.0
sources:
my-source:
sourceNamespace: my-source
sourceRevisionDigest: sha256:198d823e211be755c34a2d6278a47f7a1cc8b088b19325166154580320b23059
sourceBlobDigest: sha256:fff27d488b00db9ddc88441f5da4f1ede865e6bf23af2f98b75ef31075aac5b1
sourceRevisionDigest: sha256:34d6078f698b0dd8314b634f063edbd2737ff9fa225839111b308effa0b3fc79
sourceBlobDigest: sha256:1be3aa6d41b4e7a554218e6e10a32ece43156023f8a843127fa77e2e5c9a67b2
tags:
- latest
- main
@@ -11,8 +11,10 @@ targets:
plexjs:
source: my-source
sourceNamespace: my-source
sourceRevisionDigest: sha256:198d823e211be755c34a2d6278a47f7a1cc8b088b19325166154580320b23059
sourceBlobDigest: sha256:fff27d488b00db9ddc88441f5da4f1ede865e6bf23af2f98b75ef31075aac5b1
sourceRevisionDigest: sha256:34d6078f698b0dd8314b634f063edbd2737ff9fa225839111b308effa0b3fc79
sourceBlobDigest: sha256:1be3aa6d41b4e7a554218e6e10a32ece43156023f8a843127fa77e2e5c9a67b2
codeSamplesNamespace: code-samples-typescript-plexjs
codeSamplesRevisionDigest: sha256:b37dc035436959bd4af4ea4323a6fdf3461e482c3ec03538e949589a3e13c935
outLocation: /github/workspace/repo
workflow:
workflowVersion: 1.0.0
@@ -32,3 +34,5 @@ workflow:
token: $NPM_TOKEN
codeSamples:
output: codeSamples.yaml
registry:
location: registry.speakeasyapi.dev/lukehagar/lukehagar/code-samples-typescript-plexjs

View File

@@ -15,3 +15,5 @@ targets:
token: $NPM_TOKEN
codeSamples:
output: codeSamples.yaml
registry:
location: registry.speakeasyapi.dev/lukehagar/lukehagar/code-samples-typescript-plexjs

View File

@@ -16,10 +16,25 @@
npm add @lukehagar/plexjs
```
### PNPM
```bash
pnpm add @lukehagar/plexjs
```
### Bun
```bash
bun add @lukehagar/plexjs
```
### Yarn
```bash
yarn add @lukehagar/plexjs
yarn add @lukehagar/plexjs zod
# Note that Yarn does not install peer dependencies automatically. You will need
# to install zod as shown above.
```
<!-- End SDK Installation [installation] -->
@@ -53,7 +68,7 @@ run();
### [server](docs/sdks/server/README.md)
* [getServerCapabilities](docs/sdks/server/README.md#getservercapabilities) - Server Capabilities
* [getServerCapabilities](docs/sdks/server/README.md#getservercapabilities) - Get Server Capabilities
* [getServerPreferences](docs/sdks/server/README.md#getserverpreferences) - Get Server Preferences
* [getAvailableClients](docs/sdks/server/README.md#getavailableclients) - Get Available Clients
* [getDevices](docs/sdks/server/README.md#getdevices) - Get Devices
@@ -115,6 +130,7 @@ run();
* [searchLibrary](docs/sdks/library/README.md#searchlibrary) - Search Library
* [getMetadata](docs/sdks/library/README.md#getmetadata) - Get Items Metadata
* [getMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children
* [getTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content
* [getOnDeck](docs/sdks/library/README.md#getondeck) - Get On Deck
### [log](docs/sdks/log/README.md)
@@ -143,6 +159,8 @@ run();
### [statistics](docs/sdks/statistics/README.md)
* [getStatistics](docs/sdks/statistics/README.md#getstatistics) - Get Media Statistics
* [getResourcesStatistics](docs/sdks/statistics/README.md#getresourcesstatistics) - Get Resources Statistics
* [getBandwidthStatistics](docs/sdks/statistics/README.md#getbandwidthstatistics) - Get Bandwidth Statistics
### [sessions](docs/sdks/sessions/README.md)
@@ -177,7 +195,7 @@ Validation errors can also occur when either method arguments or data returned f
```typescript
import { PlexAPI } from "@lukehagar/plexjs";
import * as errors from "@lukehagar/plexjs/models";
import { SDKValidationError } from "@lukehagar/plexjs/models";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
@@ -190,7 +208,7 @@ async function run() {
result = await plexAPI.server.getServerCapabilities();
} catch (err) {
switch (true) {
case err instanceof errors.SDKValidationError: {
case err instanceof SDKValidationError: {
// Validation errors can be pretty-printed
console.error(err.pretty());
// Raw value may also be inspected
@@ -392,18 +410,18 @@ For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md).
<!-- Start Global Parameters [global-parameters] -->
## Global Parameters
A parameter is configured globally. This parameter must be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.
A parameter is configured globally. This parameter may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.
For example, you can set `X-Plex-Client-Identifier` to `"Postman"` at SDK initialization and then you do not have to pass the same value on calls to operations like `getPin`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.
### Available Globals
The following global parameter is available. The required parameter must be set when you initialize the SDK client.
The following global parameter is available.
| Name | Type | Required | Description |
| ---- | ---- |:--------:| ----------- |
| xPlexClientIdentifier | string | ✔️ | The unique identifier for the client application
| xPlexClientIdentifier | string | | The unique identifier for the client application
This is used to track the client application and its usage
(UUID, serial number, or other number unique per device)
|

View File

@@ -798,4 +798,134 @@ Based on:
### Generated
- [typescript v0.17.0] .
### Releases
- [NPM v0.17.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.17.0 - .
- [NPM v0.17.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.17.0 - .
## 2024-06-15 00:01:01
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.308.1 (2.342.6) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.17.0] .
### Releases
- [NPM v0.17.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.17.0 - .
## 2024-06-22 00:01:06
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.314.2 (2.349.6) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.18.0] .
### Releases
- [NPM v0.18.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.18.0 - .
## 2024-06-23 00:01:17
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.314.2 (2.349.6) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.18.0] .
### Releases
- [NPM v0.18.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.18.0 - .
## 2024-06-24 00:01:13
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.314.2 (2.349.6) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.18.0] .
### Releases
- [NPM v0.18.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.18.0 - .
## 2024-06-25 00:01:07
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.315.2 (2.352.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.18.0] .
### Releases
- [NPM v0.18.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.18.0 - .
## 2024-06-26 00:03:38
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.318.0 (2.352.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.18.0] .
### Releases
- [NPM v0.18.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.18.0 - .
## 2024-06-27 00:01:14
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.321.0 (2.354.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.18.0] .
### Releases
- [NPM v0.18.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.18.0 - .
## 2024-06-28 00:01:08
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.322.1 (2.354.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.18.0] .
### Releases
- [NPM v0.18.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.18.0 - .
## 2024-06-29 00:01:06
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.322.3 (2.354.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.18.0] .
### Releases
- [NPM v0.18.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.18.0 - .
## 2024-06-30 00:01:08
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.322.3 (2.354.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.18.0] .
### Releases
- [NPM v0.18.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.18.0 - .
## 2024-07-01 00:01:17
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.322.3 (2.354.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.18.0] .
### Releases
- [NPM v0.18.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.18.0 - .
## 2024-07-01 15:43:13
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.323.0 (2.356.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.18.1] .
### Releases
- [NPM v0.18.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.18.1 - .
## 2024-07-01 16:23:41
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.323.0 (2.356.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.18.2] .
### Releases
- [NPM v0.18.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.18.2 - .

File diff suppressed because it is too large Load Diff

View File

@@ -1,12 +1,11 @@
# Filter
Filter
Filters content by field and direction/equality
(Unknown if viewedAt is the only supported column)
## Values
| Name | Value |
| ----------- | ----------- |
| `All` | all |
| `Available` | available |
| `Released` | released |
## Fields
| Field | Type | Required | Description |
| ----------- | ----------- | ----------- | ----------- |

View File

@@ -0,0 +1,15 @@
# GetBandwidthStatisticsAccount
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
| `id` | *number* | :heavy_minus_sign: | N/A | 238960586 |
| `key` | *string* | :heavy_minus_sign: | N/A | /accounts/238960586 |
| `name` | *string* | :heavy_minus_sign: | N/A | Diane |
| `defaultAudioLanguage` | *string* | :heavy_minus_sign: | N/A | en |
| `autoSelectAudio` | *boolean* | :heavy_minus_sign: | N/A | true |
| `defaultSubtitleLanguage` | *string* | :heavy_minus_sign: | N/A | en |
| `subtitleMode` | *number* | :heavy_minus_sign: | N/A | 1 |
| `thumb` | *string* | :heavy_minus_sign: | N/A | https://plex.tv/users/50d83634246da1de/avatar?c=1707110967 |

View File

@@ -0,0 +1,12 @@
# GetBandwidthStatisticsDevice
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
| `id` | *number* | :heavy_minus_sign: | N/A | 208 |
| `name` | *string* | :heavy_minus_sign: | N/A | Roku Express |
| `platform` | *string* | :heavy_minus_sign: | N/A | Roku |
| `clientIdentifier` | *string* | :heavy_minus_sign: | N/A | 793095d235660625108ef785cc7646e9 |
| `createdAt` | *number* | :heavy_minus_sign: | N/A | 1706470556 |

View File

@@ -0,0 +1,10 @@
# GetBandwidthStatisticsErrors
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
| `code` | *number* | :heavy_minus_sign: | N/A | 1001 |
| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated |
| `status` | *number* | :heavy_minus_sign: | N/A | 401 |

View File

@@ -0,0 +1,11 @@
# GetBandwidthStatisticsMediaContainer
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| `size` | *number* | :heavy_minus_sign: | N/A | 5497 |
| `device` | [models.GetBandwidthStatisticsDevice](../models/getbandwidthstatisticsdevice.md)[] | :heavy_minus_sign: | N/A | |
| `account` | [models.GetBandwidthStatisticsAccount](../models/getbandwidthstatisticsaccount.md)[] | :heavy_minus_sign: | N/A | |
| `statisticsBandwidth` | [models.StatisticsBandwidth](../models/statisticsbandwidth.md)[] | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,8 @@
# GetBandwidthStatisticsRequest
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| `timespan` | *number* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> | 4 |

View File

@@ -0,0 +1,11 @@
# GetBandwidthStatisticsResponse
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `object` | [models.GetBandwidthStatisticsResponseBody](../models/getbandwidthstatisticsresponsebody.md) | :heavy_minus_sign: | Bandwidth Statistics |

View File

@@ -0,0 +1,10 @@
# GetBandwidthStatisticsResponseBody
Bandwidth Statistics
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
| `mediaContainer` | [models.GetBandwidthStatisticsMediaContainer](../models/getbandwidthstatisticsmediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,11 @@
# GetBandwidthStatisticsStatisticsResponseBody
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| `errors` | [models.GetBandwidthStatisticsErrors](../models/getbandwidthstatisticserrors.md)[] | :heavy_minus_sign: | N/A |
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |

View File

@@ -9,7 +9,7 @@
| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | true |
| `art` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg |
| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library |
| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 |
| `librarySectionID` | *models.LibrarySectionID* | :heavy_minus_sign: | N/A | |
| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies |
| `librarySectionUUID` | *string* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
| `mediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ |

View File

@@ -3,7 +3,8 @@
## Fields
| Field | Type | Required | Description |
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
| `sectionId` | *any* | :heavy_check_mark: | the Id of the library to query |
| `tag` | [models.Tag](../models/tag.md) | :heavy_check_mark: | A key representing a specific tag within the section. |
| Field | Type | Required | Description | Example |
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
| `sectionId` | *any* | :heavy_check_mark: | the Id of the library to query | |
| `tag` | [models.Tag](../models/tag.md) | :heavy_check_mark: | A key representing a specific tag within the section. | |
| `includeGuids` | *number* | :heavy_minus_sign: | Adds the Guids object to the response<br/> | 1 |

View File

@@ -3,6 +3,7 @@
## Fields
| Field | Type | Required | Description |
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
| `ratingKey` | *number* | :heavy_check_mark: | the id of the library item to return the children of. |
| Field | Type | Required | Description |
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| `ratingKey` | *number* | :heavy_check_mark: | the id of the library item to return the children of. |
| `includeElements` | *string* | :heavy_minus_sign: | Adds additional elements to the response. Supported types are (Stream)<br/> |

View File

@@ -5,4 +5,4 @@
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `xPlexClientIdentifier` | *string* | :heavy_check_mark: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> | Postman |
| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> | Postman |

View File

@@ -18,4 +18,4 @@ The Pin
| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | 2023-04-12 17:00:03 +0000 UTC |
| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | 2023-04-12 17:30:03 +0000 UTC |
| `authToken` | *string* | :heavy_minus_sign: | N/A | |
| `newRegistration` | *string* | :heavy_minus_sign: | N/A | |
| `newRegistration` | *boolean* | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,10 @@
# GetResourcesStatisticsErrors
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
| `code` | *number* | :heavy_minus_sign: | N/A | 1001 |
| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated |
| `status` | *number* | :heavy_minus_sign: | N/A | 401 |

View File

@@ -0,0 +1,9 @@
# GetResourcesStatisticsMediaContainer
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
| `size` | *number* | :heavy_minus_sign: | N/A | 5497 |
| `statisticsResources` | [models.StatisticsResources](../models/statisticsresources.md)[] | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,8 @@
# GetResourcesStatisticsRequest
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| `timespan` | *number* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> | 4 |

View File

@@ -0,0 +1,11 @@
# GetResourcesStatisticsResponse
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `object` | [models.GetResourcesStatisticsResponseBody](../models/getresourcesstatisticsresponsebody.md) | :heavy_minus_sign: | Resource Statistics |

View File

@@ -0,0 +1,10 @@
# GetResourcesStatisticsResponseBody
Resource Statistics
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
| `mediaContainer` | [models.GetResourcesStatisticsMediaContainer](../models/getresourcesstatisticsmediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,11 @@
# GetResourcesStatisticsStatisticsResponseBody
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| `errors` | [models.GetResourcesStatisticsErrors](../models/getresourcesstatisticserrors.md)[] | :heavy_minus_sign: | N/A |
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |

View File

@@ -0,0 +1,11 @@
# GetSessionHistoryRequest
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sort` | *string* | :heavy_minus_sign: | Sorts the results by the specified field followed by the direction (asc, desc)<br/> | |
| `accountId` | *number* | :heavy_minus_sign: | Filter results by those that are related to a specific users id<br/> | 1 |
| `filter` | [models.Filter](../models/filter.md) | :heavy_minus_sign: | Filters content by field and direction/equality<br/>(Unknown if viewedAt is the only supported column)<br/> | {<br/>"viewed-at-greater-than": {<br/>"value": "viewedAt\u003e"<br/>},<br/>"viewed-at-greater-than-or-equal-to": {<br/>"value": "viewedAt\u003e=\u003e"<br/>},<br/>"viewed-at-less-than": {<br/>"value": "viewedAt\u003c"<br/>}<br/>} |
| `librarySectionID` | *number* | :heavy_minus_sign: | Filters the results based on the id of a valid library section<br/> | 12 |

View File

@@ -39,6 +39,6 @@
| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1705543314 |
| `viewOffset` | *number* | :heavy_minus_sign: | N/A | 1000 |
| `media` | [models.GetSessionsMedia](../models/getsessionsmedia.md)[] | :heavy_minus_sign: | N/A | |
| `user` | [models.User](../models/user.md) | :heavy_minus_sign: | N/A | |
| `user` | [models.GetSessionsUser](../models/getsessionsuser.md) | :heavy_minus_sign: | N/A | |
| `player` | [models.Player](../models/player.md) | :heavy_minus_sign: | N/A | |
| `session` | [models.Session](../models/session.md) | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,10 @@
# GetSessionsUser
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
| `id` | *string* | :heavy_minus_sign: | N/A | 1 |
| `thumb` | *string* | :heavy_minus_sign: | N/A | https://plex.tv/users/844780fc6f8a26b5/avatar?c=1705853661 |
| `title` | *string* | :heavy_minus_sign: | N/A | Blindkitty38 |

View File

@@ -5,4 +5,4 @@
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `xPlexClientIdentifier` | *string* | :heavy_check_mark: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> | Postman |
| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> | Postman |

View File

@@ -0,0 +1,10 @@
# GetTopWatchedContentCountry
## Fields
| Field | Type | Required | Description | Example |
| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ |
| `id` | *number* | :heavy_minus_sign: | N/A | 116 |
| `filter` | *string* | :heavy_minus_sign: | N/A | country=116 |
| `tag` | *string* | :heavy_minus_sign: | N/A | United States of America |

View File

@@ -0,0 +1,10 @@
# GetTopWatchedContentGenre
## Fields
| Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| `id` | *number* | :heavy_minus_sign: | N/A | 184 |
| `filter` | *string* | :heavy_minus_sign: | N/A | genre=184 |
| `tag` | *string* | :heavy_minus_sign: | N/A | Thriller |

View File

@@ -0,0 +1,8 @@
# GetTopWatchedContentGuids
## Fields
| Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| `id` | *string* | :heavy_minus_sign: | N/A | tvdb://2337 |

View File

@@ -0,0 +1,13 @@
# GetTopWatchedContentMediaContainer
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| `size` | *number* | :heavy_minus_sign: | N/A | 1 |
| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | true |
| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library |
| `mediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ |
| `mediaTagVersion` | *number* | :heavy_minus_sign: | N/A | 1698860922 |
| `metadata` | [models.GetTopWatchedContentMetadata](../models/gettopwatchedcontentmetadata.md)[] | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,39 @@
# GetTopWatchedContentMetadata
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ratingKey` | *string* | :heavy_minus_sign: | N/A | 17 |
| `key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17 |
| `guid` | *string* | :heavy_minus_sign: | N/A | plex://movie/5d77683f6f4521001ea9dc53 |
| `slug` | *string* | :heavy_minus_sign: | N/A | waterloo-road |
| `studio` | *string* | :heavy_minus_sign: | N/A | Universal Pictures |
| `type` | *string* | :heavy_minus_sign: | N/A | movie |
| `title` | *string* | :heavy_minus_sign: | N/A | Serenity |
| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies |
| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 |
| `librarySectionKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/1 |
| `contentRating` | *string* | :heavy_minus_sign: | N/A | PG-13 |
| `summary` | *string* | :heavy_minus_sign: | N/A | Serenity continues the story of the TV series it was based upon ("Firefly"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job. |
| `index` | *number* | :heavy_minus_sign: | N/A | 1 |
| `audienceRating` | *number* | :heavy_minus_sign: | N/A | 9.1 |
| `year` | *number* | :heavy_minus_sign: | N/A | 2005 |
| `tagline` | *string* | :heavy_minus_sign: | N/A | They aim to misbehave. |
| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17/thumb/1705637165 |
| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17/art/1705637165 |
| `duration` | *number* | :heavy_minus_sign: | N/A | 141417 |
| `originallyAvailableAt` | [RFCDate](../types/rfcdate.md) | :heavy_minus_sign: | N/A | 2005-09-29 00:00:00 +0000 UTC |
| `leafCount` | *number* | :heavy_minus_sign: | N/A | 222 |
| `viewedLeafCount` | *number* | :heavy_minus_sign: | N/A | 100 |
| `childCount` | *number* | :heavy_minus_sign: | N/A | 13 |
| `addedAt` | *number* | :heavy_minus_sign: | N/A | 1705637164 |
| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1705637165 |
| `globalViewCount` | *number* | :heavy_minus_sign: | N/A | 80 |
| `audienceRatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright |
| `genre` | [models.GetTopWatchedContentGenre](../models/gettopwatchedcontentgenre.md)[] | :heavy_minus_sign: | N/A | |
| `country` | [models.GetTopWatchedContentCountry](../models/gettopwatchedcontentcountry.md)[] | :heavy_minus_sign: | N/A | |
| `guids` | [models.GetTopWatchedContentGuids](../models/gettopwatchedcontentguids.md)[] | :heavy_minus_sign: | N/A | |
| `role` | [models.GetTopWatchedContentRole](../models/gettopwatchedcontentrole.md)[] | :heavy_minus_sign: | N/A | |
| `user` | [models.User](../models/user.md)[] | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,9 @@
# GetTopWatchedContentRequest
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- |
| `type` | *number* | :heavy_check_mark: | the library type (1 - movies, 2 - shows, 3 - music) | |
| `includeGuids` | *number* | :heavy_minus_sign: | Adds the Guids object to the response<br/> | 1 |

View File

@@ -0,0 +1,11 @@
# GetTopWatchedContentResponse
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `object` | [models.GetTopWatchedContentResponseBody](../models/gettopwatchedcontentresponsebody.md) | :heavy_minus_sign: | The metadata of the library item. |

View File

@@ -0,0 +1,10 @@
# GetTopWatchedContentResponseBody
The metadata of the library item.
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `mediaContainer` | [models.GetTopWatchedContentMediaContainer](../models/gettopwatchedcontentmediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,13 @@
# GetTopWatchedContentRole
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| `id` | *number* | :heavy_minus_sign: | N/A | 220 |
| `filter` | *string* | :heavy_minus_sign: | N/A | actor=220 |
| `tag` | *string* | :heavy_minus_sign: | N/A | Dennis Keiffer |
| `tagKey` | *string* | :heavy_minus_sign: | N/A | 5d77683554f42c001f8c4708 |
| `role` | *string* | :heavy_minus_sign: | N/A | Bar Guy (uncredited) |
| `thumb` | *string* | :heavy_minus_sign: | N/A | https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg |

View File

@@ -5,7 +5,7 @@
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `filter` | [models.Filter](../models/filter.md) | :heavy_check_mark: | Filter |
| `filter` | [models.PathParamFilter](../models/pathparamfilter.md) | :heavy_check_mark: | Filter |
| `sort` | *string* | :heavy_minus_sign: | In the format "field:dir". Available fields are "watchlistedAt" (Added At),<br/>"titleSort" (Title), "originallyAvailableAt" (Release Date), or "rating" (Critic Rating).<br/>"dir" can be "asc" or "desc"<br/> |
| `libtype` | [models.Libtype](../models/libtype.md) | :heavy_minus_sign: | The type of library to filter. Can be "movie" or "show", or all if not present.<br/> |
| `maxresults` | *number* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.<br/>If the number of items exceeds the limit, the response will be paginated.<br/> |

View File

@@ -0,0 +1,17 @@
# LibrarySectionID
## Supported Types
### `number`
```typescript
const value: number = /* values here */
```
### `string`
```typescript
const value: string = /* values here */
```

View File

@@ -0,0 +1,12 @@
# PathParamFilter
Filter
## Values
| Name | Value |
| ----------- | ----------- |
| `All` | all |
| `Available` | available |
| `Released` | released |

View File

@@ -0,0 +1,13 @@
# StatisticsBandwidth
## Fields
| Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| `accountID` | *number* | :heavy_minus_sign: | N/A | 238960586 |
| `deviceID` | *number* | :heavy_minus_sign: | N/A | |
| `timespan` | *number* | :heavy_minus_sign: | N/A | 6 |
| `at` | *number* | :heavy_minus_sign: | N/A | 1718387650 |
| `lan` | *boolean* | :heavy_minus_sign: | N/A | true |
| `bytes` | *number* | :heavy_minus_sign: | N/A | 22 |

View File

@@ -0,0 +1,13 @@
# StatisticsResources
## Fields
| Field | Type | Required | Description | Example |
| -------------------------- | -------------------------- | -------------------------- | -------------------------- | -------------------------- |
| `timespan` | *number* | :heavy_minus_sign: | N/A | 6 |
| `at` | *number* | :heavy_minus_sign: | N/A | 1718384427 |
| `hostCpuUtilization` | *number* | :heavy_minus_sign: | N/A | 1.276 |
| `processCpuUtilization` | *number* | :heavy_minus_sign: | N/A | 0.025 |
| `hostMemoryUtilization` | *number* | :heavy_minus_sign: | N/A | 17.026 |
| `processMemoryUtilization` | *number* | :heavy_minus_sign: | N/A | 0.493 |

View File

@@ -3,8 +3,6 @@
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
| `id` | *string* | :heavy_minus_sign: | N/A | 1 |
| `thumb` | *string* | :heavy_minus_sign: | N/A | https://plex.tv/users/844780fc6f8a26b5/avatar?c=1705853661 |
| `title` | *string* | :heavy_minus_sign: | N/A | Blindkitty38 |
| Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| `id` | *number* | :heavy_minus_sign: | N/A | 220 |

View File

@@ -18,6 +18,7 @@ API Calls interacting with Plex Media Server Libraries
* [searchLibrary](#searchlibrary) - Search Library
* [getMetadata](#getmetadata) - Get Items Metadata
* [getMetadataChildren](#getmetadatachildren) - Get Items Children
* [getTopWatchedContent](#gettopwatchedcontent) - Get Top Watched Content
* [getOnDeck](#getondeck) - Get On Deck
## getFileHash
@@ -316,7 +317,7 @@ const plexAPI = new PlexAPI({
});
async function run() {
const result = await plexAPI.library.getLibraryItems("<value>", Tag.Genre);
const result = await plexAPI.library.getLibraryItems("<value>", Tag.Genre, 1);
// Handle the result
console.log(result)
@@ -327,12 +328,13 @@ run();
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `sectionId` | *any* | :heavy_check_mark: | the Id of the library to query |
| `tag` | [models.Tag](../../models/tag.md) | :heavy_check_mark: | A key representing a specific tag within the section. |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `sectionId` | *any* | :heavy_check_mark: | the Id of the library to query | |
| `tag` | [models.Tag](../../models/tag.md) | :heavy_check_mark: | A key representing a specific tag within the section. | |
| `includeGuids` | *number* | :heavy_minus_sign: | Adds the Guids object to the response<br/> | [object Object] |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | |
### Response
@@ -511,7 +513,7 @@ const plexAPI = new PlexAPI({
});
async function run() {
const result = await plexAPI.library.getMetadataChildren(1539.14);
const result = await plexAPI.library.getMetadataChildren(1539.14, "<value>");
// Handle the result
console.log(result)
@@ -525,6 +527,7 @@ run();
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `ratingKey` | *number* | :heavy_check_mark: | the id of the library item to return the children of. |
| `includeElements` | *string* | :heavy_minus_sign: | Adds additional elements to the response. Supported types are (Stream)<br/> |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
@@ -539,6 +542,50 @@ run();
| models.GetMetadataChildrenLibraryResponseBody | 401 | application/json |
| models.SDKError | 4xx-5xx | */* |
## getTopWatchedContent
This endpoint will return the top watched content from libraries of a certain type
### Example Usage
```typescript
import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman",
});
async function run() {
const result = await plexAPI.library.getTopWatchedContent(505531, 1);
// Handle the result
console.log(result)
}
run();
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `type` | *number* | :heavy_check_mark: | the library type (1 - movies, 2 - shows, 3 - music) | |
| `includeGuids` | *number* | :heavy_minus_sign: | Adds the Guids object to the response<br/> | [object Object] |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | |
### Response
**Promise\<[models.GetTopWatchedContentResponse](../../models/gettopwatchedcontentresponse.md)\>**
### Errors
| Error Object | Status Code | Content Type |
| --------------- | --------------- | --------------- |
| models.SDKError | 4xx-5xx | */* |
## getOnDeck
This endpoint will return the on deck content.

View File

@@ -8,7 +8,7 @@ Operations against the Plex Media Server System.
### Available Operations
* [getServerCapabilities](#getservercapabilities) - Server Capabilities
* [getServerCapabilities](#getservercapabilities) - Get Server Capabilities
* [getServerPreferences](#getserverpreferences) - Get Server Preferences
* [getAvailableClients](#getavailableclients) - Get Available Clients
* [getDevices](#getdevices) - Get Devices
@@ -19,7 +19,7 @@ Operations against the Plex Media Server System.
## getServerCapabilities
Server Capabilities
Get Server Capabilities
### Example Usage

View File

@@ -70,7 +70,7 @@ const plexAPI = new PlexAPI({
});
async function run() {
const result = await plexAPI.sessions.getSessionHistory();
const result = await plexAPI.sessions.getSessionHistory("<value>", 1, {}, 12);
// Handle the result
console.log(result)
@@ -81,10 +81,14 @@ run();
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `sort` | *string* | :heavy_minus_sign: | Sorts the results by the specified field followed by the direction (asc, desc)<br/> | |
| `accountId` | *number* | :heavy_minus_sign: | Filter results by those that are related to a specific users id<br/> | [object Object] |
| `filter` | [models.Filter](../../models/filter.md) | :heavy_minus_sign: | Filters content by field and direction/equality<br/>(Unknown if viewedAt is the only supported column)<br/> | [object Object] |
| `librarySectionID` | *number* | :heavy_minus_sign: | Filters the results based on the id of a valid library section<br/> | [object Object] |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | |
### Response

View File

@@ -9,6 +9,8 @@ API Calls that perform operations with Plex Media Server Statistics
### Available Operations
* [getStatistics](#getstatistics) - Get Media Statistics
* [getResourcesStatistics](#getresourcesstatistics) - Get Resources Statistics
* [getBandwidthStatistics](#getbandwidthstatistics) - Get Bandwidth Statistics
## getStatistics
@@ -52,3 +54,89 @@ run();
| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ |
| models.GetStatisticsStatisticsResponseBody | 401 | application/json |
| models.SDKError | 4xx-5xx | */* |
## getResourcesStatistics
This will return the resources for the server
### Example Usage
```typescript
import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman",
});
async function run() {
const result = await plexAPI.statistics.getResourcesStatistics(4);
// Handle the result
console.log(result)
}
run();
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `timespan` | *number* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> | [object Object] |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | |
### Response
**Promise\<[models.GetResourcesStatisticsResponse](../../models/getresourcesstatisticsresponse.md)\>**
### Errors
| Error Object | Status Code | Content Type |
| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- |
| models.GetResourcesStatisticsStatisticsResponseBody | 401 | application/json |
| models.SDKError | 4xx-5xx | */* |
## getBandwidthStatistics
This will return the bandwidth statistics for the server
### Example Usage
```typescript
import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman",
});
async function run() {
const result = await plexAPI.statistics.getBandwidthStatistics(4);
// Handle the result
console.log(result)
}
run();
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `timespan` | *number* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> | [object Object] |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | |
### Response
**Promise\<[models.GetBandwidthStatisticsResponse](../../models/getbandwidthstatisticsresponse.md)\>**
### Errors
| Error Object | Status Code | Content Type |
| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- |
| models.GetBandwidthStatisticsStatisticsResponseBody | 401 | application/json |
| models.SDKError | 4xx-5xx | */* |

View File

@@ -17,7 +17,7 @@ Get User Watchlist
### Example Usage
```typescript
import { Filter, PlexAPI } from "@lukehagar/plexjs";
import { PathParamFilter, PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
@@ -26,7 +26,7 @@ const plexAPI = new PlexAPI({
async function run() {
const result = await plexAPI.watchlist.getWatchlist({
filter: Filter.Released,
filter: PathParamFilter.Released,
xPlexToken: "<value>",
});

View File

@@ -2,7 +2,7 @@
{
"name": "@lukehagar/plexjs",
"version": "0.17.0",
"version": "0.18.2",
"exports": {
".": "./src/index.ts",
"./models": "./src/models/index.ts",

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@lukehagar/plexjs",
"version": "0.17.0",
"version": "0.18.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@lukehagar/plexjs",
"version": "0.17.0",
"version": "0.18.2",
"devDependencies": {
"@types/jsonpath": "^0.2.4",
"@typescript-eslint/eslint-plugin": "^7.7.1",

View File

@@ -1,6 +1,6 @@
{
"name": "@lukehagar/plexjs",
"version": "0.17.0",
"version": "0.18.2",
"author": "LukeHagar",
"main": "./index.js",
"sideEffects": false,

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { RequestInput } from "../lib/http";
import { RequestInput } from "../lib/http.js";
import {
AfterErrorContext,
AfterErrorHook,
@@ -15,9 +15,9 @@ import {
Hooks,
SDKInitHook,
SDKInitOptions,
} from "./types";
} from "./types.js";
import { initHooks } from "./registration";
import { initHooks } from "./registration.js";
export class SDKHooks implements Hooks {
sdkInitHooks: SDKInitHook[] = [];

View File

@@ -2,5 +2,5 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
export * from "./types";
export * from "./hooks";
export * from "./types.js";
export * from "./hooks.js";

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { HTTPClient, RequestInput } from "../lib/http";
import { HTTPClient, RequestInput } from "../lib/http.js";
export type HookContext = {
operationID: string;

View File

@@ -2,8 +2,8 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
export * from "./sdk";
export * from "./lib/config";
export * from "./sdk/sdk.js";
export * from "./lib/config.js";
export * from "./models";
export * as types from "./types";
export * from "./models/index.js";
export * as types from "./types/index.js";

View File

@@ -2,9 +2,9 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { HTTPClient } from "./http";
import { RetryConfig } from "./retries";
import { Params, pathToFunc } from "./url";
import { HTTPClient } from "./http.js";
import { RetryConfig } from "./retries.js";
import { Params, pathToFunc } from "./url.js";
/**
* Contains the list of servers available to the SDK
@@ -16,9 +16,6 @@ export const ServerList = [
"{protocol}://{ip}:{port}",
] as const;
/**
* The protocol to use when connecting to your plex server.
*/
export enum ServerProtocol {
Http = "http",
Https = "https",
@@ -30,7 +27,7 @@ export type SDKOptions = {
/**
* Allows setting the xPlexClientIdentifier parameter for all supported operations
*/
xPlexClientIdentifier?: string;
xPlexClientIdentifier?: string | undefined;
httpClient?: HTTPClient;
/**
@@ -87,7 +84,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "0.0.3",
sdkVersion: "0.17.0",
genVersion: "2.342.6",
userAgent: "speakeasy-sdk/typescript 0.17.0 2.342.6 0.0.3 @lukehagar/plexjs",
sdkVersion: "0.18.2",
genVersion: "2.356.0",
userAgent: "speakeasy-sdk/typescript 0.18.2 2.356.0 0.0.3 @lukehagar/plexjs",
} as const;

View File

@@ -2,8 +2,8 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { bytesToBase64 } from "./base64";
import { isPlainObject } from "./is-plain-object";
import { bytesToBase64 } from "./base64.js";
import { isPlainObject } from "./is-plain-object.js";
export class EncodingError extends Error {
constructor(message: string) {

View File

@@ -3,9 +3,9 @@
*/
import { never as znever } from "zod";
import { parse } from "./schemas";
import { isPlainObject } from "./is-plain-object";
import * as models from "../models";
import { parse } from "./schemas.js";
import { isPlainObject } from "./is-plain-object.js";
import { SDKError } from "../models/sdkerror.js";
export type Fetcher = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
@@ -406,7 +406,7 @@ export class ResponseMatcher<Result> {
}
if (pred == null) {
const responseBody = await response.text();
throw new models.SDKError(
throw new SDKError(
"Unexpected API response status or content-type",
response,
responseBody
@@ -446,11 +446,7 @@ export class ResponseMatcher<Result> {
const resultKey = pred.key || options?.resultKey;
let data: unknown;
if (pred.fail) {
throw new models.SDKError(
"API error occurred",
response,
typeof raw === "string" ? raw : ""
);
throw new SDKError("API error occurred", response, typeof raw === "string" ? raw : "");
} else if (pred.err) {
data = {
...options?.extraFields,

View File

@@ -3,7 +3,7 @@
*/
import { output, ZodEffects, ZodError, ZodObject, ZodRawShape, ZodTypeAny } from "zod";
import { SDKValidationError } from "../models/sdkvalidationerror";
import { SDKValidationError } from "../models/sdkvalidationerror.js";
/**
* Utility function that executes some code which may throw a ZodError. It

View File

@@ -2,12 +2,13 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { ResponseMatcher, HTTPClient, matchStatusCode } from "./http";
import { SecurityState, resolveSecurity, resolveGlobalSecurity } from "./security";
import { pathToFunc } from "./url";
import { encodeForm } from "./encodings";
import { stringToBase64 } from "./base64";
import { SDKHooks, HookContext } from "../hooks";
import { ResponseMatcher, HTTPClient, matchStatusCode } from "./http.js";
import { SecurityState, resolveSecurity, resolveGlobalSecurity } from "./security.js";
import { pathToFunc } from "./url.js";
import { encodeForm } from "./encodings.js";
import { stringToBase64 } from "./base64.js";
import { SDKHooks } from "../hooks/hooks.js";
import { HookContext } from "../hooks/types.js";
export type RequestOptions = {
fetchOptions?: Omit<RequestInit, "method" | "body">;

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import * as models from "../models";
import * as models from "../models/index.js";
export enum SecurityErrorCode {
Incomplete = "incomplete",

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { remap as remap$ } from "../lib/primitives.js";
import * as z from "zod";
export type AddPlaylistContentsRequest = {

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { remap as remap$ } from "../lib/primitives.js";
import * as z from "zod";
/**
@@ -99,14 +99,14 @@ export type ApplyUpdatesResponse = {
/** @internal */
export namespace Tonight$ {
export const inboundSchema = z.nativeEnum(Tonight);
export const outboundSchema = inboundSchema;
export const inboundSchema: z.ZodNativeEnum<typeof Tonight> = z.nativeEnum(Tonight);
export const outboundSchema: z.ZodNativeEnum<typeof Tonight> = inboundSchema;
}
/** @internal */
export namespace Skip$ {
export const inboundSchema = z.nativeEnum(Skip);
export const outboundSchema = inboundSchema;
export const inboundSchema: z.ZodNativeEnum<typeof Skip> = z.nativeEnum(Skip);
export const outboundSchema: z.ZodNativeEnum<typeof Skip> = inboundSchema;
}
/** @internal */

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { remap as remap$ } from "../lib/primitives.js";
import * as z from "zod";
export type CancelServerActivitiesRequest = {

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { remap as remap$ } from "../lib/primitives.js";
import * as z from "zod";
/**
@@ -87,8 +87,8 @@ export type CheckForUpdatesResponse = {
/** @internal */
export namespace Download$ {
export const inboundSchema = z.nativeEnum(Download);
export const outboundSchema = inboundSchema;
export const inboundSchema: z.ZodNativeEnum<typeof Download> = z.nativeEnum(Download);
export const outboundSchema: z.ZodNativeEnum<typeof Download> = inboundSchema;
}
/** @internal */

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { remap as remap$ } from "../lib/primitives.js";
import * as z from "zod";
export type ClearPlaylistContentsRequest = {

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { remap as remap$ } from "../lib/primitives.js";
import * as z from "zod";
/**
@@ -147,14 +147,15 @@ export type CreatePlaylistResponse = {
/** @internal */
export namespace QueryParamType$ {
export const inboundSchema = z.nativeEnum(QueryParamType);
export const outboundSchema = inboundSchema;
export const inboundSchema: z.ZodNativeEnum<typeof QueryParamType> =
z.nativeEnum(QueryParamType);
export const outboundSchema: z.ZodNativeEnum<typeof QueryParamType> = inboundSchema;
}
/** @internal */
export namespace Smart$ {
export const inboundSchema = z.nativeEnum(Smart);
export const outboundSchema = inboundSchema;
export const inboundSchema: z.ZodNativeEnum<typeof Smart> = z.nativeEnum(Smart);
export const outboundSchema: z.ZodNativeEnum<typeof Smart> = inboundSchema;
}
/** @internal */

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { remap as remap$ } from "../lib/primitives.js";
import * as z from "zod";
export type DeleteLibraryRequest = {

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { remap as remap$ } from "../lib/primitives.js";
import * as z from "zod";
export type DeletePlaylistRequest = {

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { remap as remap$ } from "../lib/primitives.js";
import * as z from "zod";
export type EnablePaperTrailErrors = {

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { remap as remap$ } from "../lib/primitives.js";
import * as z from "zod";
export type GetAvailableClientsErrors = {

View File

@@ -0,0 +1,464 @@
/*
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives.js";
import * as z from "zod";
export type GetBandwidthStatisticsRequest = {
/**
* The timespan to retrieve statistics for
*
* @remarks
* the exact meaning of this parameter is not known
*
*/
timespan?: number | undefined;
};
export type GetBandwidthStatisticsErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetBandwidthStatisticsStatisticsResponseBodyData = {
errors?: Array<GetBandwidthStatisticsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetBandwidthStatisticsStatisticsResponseBody extends Error {
errors?: Array<GetBandwidthStatisticsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetBandwidthStatisticsStatisticsResponseBodyData;
constructor(err: GetBandwidthStatisticsStatisticsResponseBodyData) {
super("");
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.message =
"message" in err && typeof err.message === "string"
? err.message
: "API error occurred";
this.name = "GetBandwidthStatisticsStatisticsResponseBody";
}
}
export type GetBandwidthStatisticsDevice = {
id?: number | undefined;
name?: string | undefined;
platform?: string | undefined;
clientIdentifier?: string | undefined;
createdAt?: number | undefined;
};
export type GetBandwidthStatisticsAccount = {
id?: number | undefined;
key?: string | undefined;
name?: string | undefined;
defaultAudioLanguage?: string | undefined;
autoSelectAudio?: boolean | undefined;
defaultSubtitleLanguage?: string | undefined;
subtitleMode?: number | undefined;
thumb?: string | undefined;
};
export type StatisticsBandwidth = {
accountID?: number | undefined;
deviceID?: number | undefined;
timespan?: number | undefined;
at?: number | undefined;
lan?: boolean | undefined;
bytes?: number | undefined;
};
export type GetBandwidthStatisticsMediaContainer = {
size?: number | undefined;
device?: Array<GetBandwidthStatisticsDevice> | undefined;
account?: Array<GetBandwidthStatisticsAccount> | undefined;
statisticsBandwidth?: Array<StatisticsBandwidth> | undefined;
};
/**
* Bandwidth Statistics
*/
export type GetBandwidthStatisticsResponseBody = {
mediaContainer?: GetBandwidthStatisticsMediaContainer | undefined;
};
export type GetBandwidthStatisticsResponse = {
/**
* HTTP response content type for this operation
*/
contentType: string;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse: Response;
/**
* Bandwidth Statistics
*/
object?: GetBandwidthStatisticsResponseBody | undefined;
};
/** @internal */
export namespace GetBandwidthStatisticsRequest$ {
export const inboundSchema: z.ZodType<GetBandwidthStatisticsRequest, z.ZodTypeDef, unknown> = z
.object({
Timespan: z.number().int().optional(),
})
.transform((v) => {
return remap$(v, {
Timespan: "timespan",
});
});
export type Outbound = {
Timespan?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetBandwidthStatisticsRequest> =
z
.object({
timespan: z.number().int().optional(),
})
.transform((v) => {
return remap$(v, {
timespan: "Timespan",
});
});
}
/** @internal */
export namespace GetBandwidthStatisticsErrors$ {
export const inboundSchema: z.ZodType<GetBandwidthStatisticsErrors, z.ZodTypeDef, unknown> =
z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetBandwidthStatisticsErrors> =
z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
export namespace GetBandwidthStatisticsStatisticsResponseBody$ {
export const inboundSchema: z.ZodType<
GetBandwidthStatisticsStatisticsResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetBandwidthStatisticsErrors$.inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetBandwidthStatisticsStatisticsResponseBody(remapped);
});
export type Outbound = {
errors?: Array<GetBandwidthStatisticsErrors$.Outbound> | undefined;
RawResponse?: never | undefined;
};
export const outboundSchema: z.ZodType<
Outbound,
z.ZodTypeDef,
GetBandwidthStatisticsStatisticsResponseBody
> = z
.instanceof(GetBandwidthStatisticsStatisticsResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z
.array(z.lazy(() => GetBandwidthStatisticsErrors$.outboundSchema))
.optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}
/** @internal */
export namespace GetBandwidthStatisticsDevice$ {
export const inboundSchema: z.ZodType<GetBandwidthStatisticsDevice, z.ZodTypeDef, unknown> =
z.object({
id: z.number().int().optional(),
name: z.string().optional(),
platform: z.string().optional(),
clientIdentifier: z.string().optional(),
createdAt: z.number().int().optional(),
});
export type Outbound = {
id?: number | undefined;
name?: string | undefined;
platform?: string | undefined;
clientIdentifier?: string | undefined;
createdAt?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetBandwidthStatisticsDevice> =
z.object({
id: z.number().int().optional(),
name: z.string().optional(),
platform: z.string().optional(),
clientIdentifier: z.string().optional(),
createdAt: z.number().int().optional(),
});
}
/** @internal */
export namespace GetBandwidthStatisticsAccount$ {
export const inboundSchema: z.ZodType<GetBandwidthStatisticsAccount, z.ZodTypeDef, unknown> =
z.object({
id: z.number().int().optional(),
key: z.string().optional(),
name: z.string().optional(),
defaultAudioLanguage: z.string().optional(),
autoSelectAudio: z.boolean().optional(),
defaultSubtitleLanguage: z.string().optional(),
subtitleMode: z.number().int().optional(),
thumb: z.string().optional(),
});
export type Outbound = {
id?: number | undefined;
key?: string | undefined;
name?: string | undefined;
defaultAudioLanguage?: string | undefined;
autoSelectAudio?: boolean | undefined;
defaultSubtitleLanguage?: string | undefined;
subtitleMode?: number | undefined;
thumb?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetBandwidthStatisticsAccount> =
z.object({
id: z.number().int().optional(),
key: z.string().optional(),
name: z.string().optional(),
defaultAudioLanguage: z.string().optional(),
autoSelectAudio: z.boolean().optional(),
defaultSubtitleLanguage: z.string().optional(),
subtitleMode: z.number().int().optional(),
thumb: z.string().optional(),
});
}
/** @internal */
export namespace StatisticsBandwidth$ {
export const inboundSchema: z.ZodType<StatisticsBandwidth, z.ZodTypeDef, unknown> = z.object({
accountID: z.number().int().optional(),
deviceID: z.number().int().optional(),
timespan: z.number().int().optional(),
at: z.number().int().optional(),
lan: z.boolean().optional(),
bytes: z.number().int().optional(),
});
export type Outbound = {
accountID?: number | undefined;
deviceID?: number | undefined;
timespan?: number | undefined;
at?: number | undefined;
lan?: boolean | undefined;
bytes?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, StatisticsBandwidth> = z.object({
accountID: z.number().int().optional(),
deviceID: z.number().int().optional(),
timespan: z.number().int().optional(),
at: z.number().int().optional(),
lan: z.boolean().optional(),
bytes: z.number().int().optional(),
});
}
/** @internal */
export namespace GetBandwidthStatisticsMediaContainer$ {
export const inboundSchema: z.ZodType<
GetBandwidthStatisticsMediaContainer,
z.ZodTypeDef,
unknown
> = z
.object({
size: z.number().int().optional(),
Device: z.array(z.lazy(() => GetBandwidthStatisticsDevice$.inboundSchema)).optional(),
Account: z.array(z.lazy(() => GetBandwidthStatisticsAccount$.inboundSchema)).optional(),
StatisticsBandwidth: z
.array(z.lazy(() => StatisticsBandwidth$.inboundSchema))
.optional(),
})
.transform((v) => {
return remap$(v, {
Device: "device",
Account: "account",
StatisticsBandwidth: "statisticsBandwidth",
});
});
export type Outbound = {
size?: number | undefined;
Device?: Array<GetBandwidthStatisticsDevice$.Outbound> | undefined;
Account?: Array<GetBandwidthStatisticsAccount$.Outbound> | undefined;
StatisticsBandwidth?: Array<StatisticsBandwidth$.Outbound> | undefined;
};
export const outboundSchema: z.ZodType<
Outbound,
z.ZodTypeDef,
GetBandwidthStatisticsMediaContainer
> = z
.object({
size: z.number().int().optional(),
device: z.array(z.lazy(() => GetBandwidthStatisticsDevice$.outboundSchema)).optional(),
account: z
.array(z.lazy(() => GetBandwidthStatisticsAccount$.outboundSchema))
.optional(),
statisticsBandwidth: z
.array(z.lazy(() => StatisticsBandwidth$.outboundSchema))
.optional(),
})
.transform((v) => {
return remap$(v, {
device: "Device",
account: "Account",
statisticsBandwidth: "StatisticsBandwidth",
});
});
}
/** @internal */
export namespace GetBandwidthStatisticsResponseBody$ {
export const inboundSchema: z.ZodType<
GetBandwidthStatisticsResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
MediaContainer: z
.lazy(() => GetBandwidthStatisticsMediaContainer$.inboundSchema)
.optional(),
})
.transform((v) => {
return remap$(v, {
MediaContainer: "mediaContainer",
});
});
export type Outbound = {
MediaContainer?: GetBandwidthStatisticsMediaContainer$.Outbound | undefined;
};
export const outboundSchema: z.ZodType<
Outbound,
z.ZodTypeDef,
GetBandwidthStatisticsResponseBody
> = z
.object({
mediaContainer: z
.lazy(() => GetBandwidthStatisticsMediaContainer$.outboundSchema)
.optional(),
})
.transform((v) => {
return remap$(v, {
mediaContainer: "MediaContainer",
});
});
}
/** @internal */
export namespace GetBandwidthStatisticsResponse$ {
export const inboundSchema: z.ZodType<GetBandwidthStatisticsResponse, z.ZodTypeDef, unknown> = z
.object({
ContentType: z.string(),
StatusCode: z.number().int(),
RawResponse: z.instanceof(Response),
object: z.lazy(() => GetBandwidthStatisticsResponseBody$.inboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
ContentType: string;
StatusCode: number;
RawResponse: never;
object?: GetBandwidthStatisticsResponseBody$.Outbound | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetBandwidthStatisticsResponse> =
z
.object({
contentType: z.string(),
statusCode: z.number().int(),
rawResponse: z.instanceof(Response).transform(() => {
throw new Error("Response cannot be serialized");
}),
object: z.lazy(() => GetBandwidthStatisticsResponseBody$.outboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { remap as remap$ } from "../lib/primitives.js";
import * as z from "zod";
export type GetButlerTasksErrors = {

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { remap as remap$ } from "../lib/primitives.js";
import * as z from "zod";
export type GetDevicesErrors = {

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { remap as remap$ } from "../lib/primitives.js";
import * as z from "zod";
export type GetFileHashRequest = {

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { remap as remap$ } from "../lib/primitives.js";
import * as z from "zod";
/**
@@ -143,8 +143,8 @@ export type GetGlobalHubsResponse = {
/** @internal */
export namespace OnlyTransient$ {
export const inboundSchema = z.nativeEnum(OnlyTransient);
export const outboundSchema = inboundSchema;
export const inboundSchema: z.ZodNativeEnum<typeof OnlyTransient> = z.nativeEnum(OnlyTransient);
export const outboundSchema: z.ZodNativeEnum<typeof OnlyTransient> = inboundSchema;
}
/** @internal */

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { remap as remap$ } from "../lib/primitives.js";
import * as z from "zod";
export type GetHomeDataErrors = {

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { remap as remap$ } from "../lib/primitives.js";
import * as z from "zod";
export type GetLibrariesErrors = {

View File

@@ -2,8 +2,8 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { RFCDate } from "../types";
import { remap as remap$ } from "../lib/primitives.js";
import { RFCDate } from "../types/rfcdate.js";
import * as z from "zod";
/**
@@ -222,8 +222,9 @@ export type GetLibraryHubsResponse = {
/** @internal */
export namespace QueryParamOnlyTransient$ {
export const inboundSchema = z.nativeEnum(QueryParamOnlyTransient);
export const outboundSchema = inboundSchema;
export const inboundSchema: z.ZodNativeEnum<typeof QueryParamOnlyTransient> =
z.nativeEnum(QueryParamOnlyTransient);
export const outboundSchema: z.ZodNativeEnum<typeof QueryParamOnlyTransient> = inboundSchema;
}
/** @internal */

View File

@@ -2,8 +2,8 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { RFCDate } from "../types";
import { remap as remap$ } from "../lib/primitives.js";
import { RFCDate } from "../types/rfcdate.js";
import * as z from "zod";
/**
@@ -40,6 +40,13 @@ export type GetLibraryItemsRequest = {
* A key representing a specific tag within the section.
*/
tag: Tag;
/**
* Adds the Guids object to the response
*
* @remarks
*
*/
includeGuids?: number | undefined;
};
export type GetLibraryItemsErrors = {
@@ -92,6 +99,8 @@ export class GetLibraryItemsLibraryResponseBody extends Error {
}
}
export type LibrarySectionID = number | string;
export type GetLibraryItemsPart = {
id?: number | undefined;
key?: string | undefined;
@@ -204,7 +213,7 @@ export type GetLibraryItemsMediaContainer = {
allowSync?: boolean | undefined;
art?: string | undefined;
identifier?: string | undefined;
librarySectionID?: number | undefined;
librarySectionID?: number | string | undefined;
librarySectionTitle?: string | undefined;
librarySectionUUID?: string | undefined;
mediaTagPrefix?: string | undefined;
@@ -246,8 +255,8 @@ export type GetLibraryItemsResponse = {
/** @internal */
export namespace Tag$ {
export const inboundSchema = z.nativeEnum(Tag);
export const outboundSchema = inboundSchema;
export const inboundSchema: z.ZodNativeEnum<typeof Tag> = z.nativeEnum(Tag);
export const outboundSchema: z.ZodNativeEnum<typeof Tag> = inboundSchema;
}
/** @internal */
@@ -256,18 +265,21 @@ export namespace GetLibraryItemsRequest$ {
{
sectionId: z.any().optional(),
tag: Tag$.inboundSchema,
includeGuids: z.number().int().optional(),
}
);
export type Outbound = {
sectionId?: any | undefined;
tag: string;
includeGuids?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryItemsRequest> =
z.object({
sectionId: z.any().optional(),
tag: Tag$.outboundSchema,
includeGuids: z.number().int().optional(),
});
}
@@ -343,6 +355,20 @@ export namespace GetLibraryItemsLibraryResponseBody$ {
);
}
/** @internal */
export namespace LibrarySectionID$ {
export const inboundSchema: z.ZodType<LibrarySectionID, z.ZodTypeDef, unknown> = z.union([
z.number().int(),
z.string(),
]);
export type Outbound = number | string;
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, LibrarySectionID> = z.union([
z.number().int(),
z.string(),
]);
}
/** @internal */
export namespace GetLibraryItemsPart$ {
export const inboundSchema: z.ZodType<GetLibraryItemsPart, z.ZodTypeDef, unknown> = z.object({
@@ -744,7 +770,7 @@ export namespace GetLibraryItemsMediaContainer$ {
allowSync: z.boolean().optional(),
art: z.string().optional(),
identifier: z.string().optional(),
librarySectionID: z.number().int().optional(),
librarySectionID: z.union([z.number().int(), z.string()]).optional(),
librarySectionTitle: z.string().optional(),
librarySectionUUID: z.string().optional(),
mediaTagPrefix: z.string().optional(),
@@ -768,7 +794,7 @@ export namespace GetLibraryItemsMediaContainer$ {
allowSync?: boolean | undefined;
art?: string | undefined;
identifier?: string | undefined;
librarySectionID?: number | undefined;
librarySectionID?: number | string | undefined;
librarySectionTitle?: string | undefined;
librarySectionUUID?: string | undefined;
mediaTagPrefix?: string | undefined;
@@ -789,7 +815,7 @@ export namespace GetLibraryItemsMediaContainer$ {
allowSync: z.boolean().optional(),
art: z.string().optional(),
identifier: z.string().optional(),
librarySectionID: z.number().int().optional(),
librarySectionID: z.union([z.number().int(), z.string()]).optional(),
librarySectionTitle: z.string().optional(),
librarySectionUUID: z.string().optional(),
mediaTagPrefix: z.string().optional(),

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { remap as remap$ } from "../lib/primitives.js";
import * as z from "zod";
/**
@@ -180,8 +180,9 @@ export type GetLibraryResponse = {
/** @internal */
export namespace IncludeDetails$ {
export const inboundSchema = z.nativeEnum(IncludeDetails);
export const outboundSchema = inboundSchema;
export const inboundSchema: z.ZodNativeEnum<typeof IncludeDetails> =
z.nativeEnum(IncludeDetails);
export const outboundSchema: z.ZodNativeEnum<typeof IncludeDetails> = inboundSchema;
}
/** @internal */

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { remap as remap$ } from "../lib/primitives.js";
import * as z from "zod";
export type GetMetadataChildrenRequest = {
@@ -10,6 +10,13 @@ export type GetMetadataChildrenRequest = {
* the id of the library item to return the children of.
*/
ratingKey: number;
/**
* Adds additional elements to the response. Supported types are (Stream)
*
* @remarks
*
*/
includeElements?: string | undefined;
};
export type GetMetadataChildrenErrors = {
@@ -157,15 +164,18 @@ export namespace GetMetadataChildrenRequest$ {
export const inboundSchema: z.ZodType<GetMetadataChildrenRequest, z.ZodTypeDef, unknown> =
z.object({
ratingKey: z.number(),
includeElements: z.string().optional(),
});
export type Outbound = {
ratingKey: number;
includeElements?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMetadataChildrenRequest> =
z.object({
ratingKey: z.number(),
includeElements: z.string().optional(),
});
}

View File

@@ -2,8 +2,8 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { RFCDate } from "../types";
import { remap as remap$ } from "../lib/primitives.js";
import { RFCDate } from "../types/rfcdate.js";
import * as z from "zod";
export type GetMetadataRequest = {

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { remap as remap$ } from "../lib/primitives.js";
import * as z from "zod";
export type GetMyPlexAccountErrors = {

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { remap as remap$ } from "../lib/primitives.js";
import * as z from "zod";
export type GetOnDeckErrors = {

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { remap as remap$ } from "../lib/primitives.js";
import * as z from "zod";
export const GetPinOpServerList = ["https://plex.tv/api/v2"] as const;
@@ -16,7 +16,7 @@ export type GetPinGlobals = {
* (UUID, serial number, or other number unique per device)
*
*/
xPlexClientIdentifier: string;
xPlexClientIdentifier?: string | undefined;
};
export type GetPinRequest = {
@@ -136,7 +136,7 @@ export type GetPinResponseBody = {
createdAt?: Date | undefined;
expiresAt?: Date | undefined;
authToken?: string | undefined;
newRegistration?: string | undefined;
newRegistration?: boolean | null | undefined;
};
export type GetPinResponse = {
@@ -162,7 +162,7 @@ export type GetPinResponse = {
export namespace GetPinGlobals$ {
export const inboundSchema: z.ZodType<GetPinGlobals, z.ZodTypeDef, unknown> = z
.object({
"X-Plex-Client-Identifier": z.string(),
"X-Plex-Client-Identifier": z.string().optional(),
})
.transform((v) => {
return remap$(v, {
@@ -171,12 +171,12 @@ export namespace GetPinGlobals$ {
});
export type Outbound = {
"X-Plex-Client-Identifier": string;
"X-Plex-Client-Identifier"?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPinGlobals> = z
.object({
xPlexClientIdentifier: z.string(),
xPlexClientIdentifier: z.string().optional(),
})
.transform((v) => {
return remap$(v, {
@@ -367,7 +367,7 @@ export namespace GetPinResponseBody$ {
.transform((v) => new Date(v))
.optional(),
authToken: z.string().optional(),
newRegistration: z.string().optional(),
newRegistration: z.nullable(z.boolean()).optional(),
});
export type Outbound = {
@@ -382,7 +382,7 @@ export namespace GetPinResponseBody$ {
createdAt?: string | undefined;
expiresAt?: string | undefined;
authToken?: string | undefined;
newRegistration?: string | undefined;
newRegistration?: boolean | null | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPinResponseBody> = z.object({
@@ -403,7 +403,7 @@ export namespace GetPinResponseBody$ {
.transform((v) => v.toISOString())
.optional(),
authToken: z.string().optional(),
newRegistration: z.string().optional(),
newRegistration: z.nullable(z.boolean()).optional(),
});
}

View File

@@ -2,8 +2,8 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { RFCDate } from "../types";
import { remap as remap$ } from "../lib/primitives.js";
import { RFCDate } from "../types/rfcdate.js";
import * as z from "zod";
export type GetPlaylistContentsRequest = {

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { remap as remap$ } from "../lib/primitives.js";
import * as z from "zod";
export type GetPlaylistRequest = {

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { remap as remap$ } from "../lib/primitives.js";
import * as z from "zod";
/**
@@ -135,14 +135,15 @@ export type GetPlaylistsResponse = {
/** @internal */
export namespace PlaylistType$ {
export const inboundSchema = z.nativeEnum(PlaylistType);
export const outboundSchema = inboundSchema;
export const inboundSchema: z.ZodNativeEnum<typeof PlaylistType> = z.nativeEnum(PlaylistType);
export const outboundSchema: z.ZodNativeEnum<typeof PlaylistType> = inboundSchema;
}
/** @internal */
export namespace QueryParamSmart$ {
export const inboundSchema = z.nativeEnum(QueryParamSmart);
export const outboundSchema = inboundSchema;
export const inboundSchema: z.ZodNativeEnum<typeof QueryParamSmart> =
z.nativeEnum(QueryParamSmart);
export const outboundSchema: z.ZodNativeEnum<typeof QueryParamSmart> = inboundSchema;
}
/** @internal */

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { remap as remap$ } from "../lib/primitives.js";
import * as z from "zod";
export type GetRecentlyAddedErrors = {

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { remap as remap$ } from "../lib/primitives.js";
import * as z from "zod";
/**
@@ -119,14 +119,14 @@ export type GetResizedPhotoResponse = {
/** @internal */
export namespace MinSize$ {
export const inboundSchema = z.nativeEnum(MinSize);
export const outboundSchema = inboundSchema;
export const inboundSchema: z.ZodNativeEnum<typeof MinSize> = z.nativeEnum(MinSize);
export const outboundSchema: z.ZodNativeEnum<typeof MinSize> = inboundSchema;
}
/** @internal */
export namespace Upscale$ {
export const inboundSchema = z.nativeEnum(Upscale);
export const outboundSchema = inboundSchema;
export const inboundSchema: z.ZodNativeEnum<typeof Upscale> = z.nativeEnum(Upscale);
export const outboundSchema: z.ZodNativeEnum<typeof Upscale> = inboundSchema;
}
/** @internal */

View File

@@ -0,0 +1,364 @@
/*
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives.js";
import * as z from "zod";
export type GetResourcesStatisticsRequest = {
/**
* The timespan to retrieve statistics for
*
* @remarks
* the exact meaning of this parameter is not known
*
*/
timespan?: number | undefined;
};
export type GetResourcesStatisticsErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetResourcesStatisticsStatisticsResponseBodyData = {
errors?: Array<GetResourcesStatisticsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetResourcesStatisticsStatisticsResponseBody extends Error {
errors?: Array<GetResourcesStatisticsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetResourcesStatisticsStatisticsResponseBodyData;
constructor(err: GetResourcesStatisticsStatisticsResponseBodyData) {
super("");
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.message =
"message" in err && typeof err.message === "string"
? err.message
: "API error occurred";
this.name = "GetResourcesStatisticsStatisticsResponseBody";
}
}
export type StatisticsResources = {
timespan?: number | undefined;
at?: number | undefined;
hostCpuUtilization?: number | undefined;
processCpuUtilization?: number | undefined;
hostMemoryUtilization?: number | undefined;
processMemoryUtilization?: number | undefined;
};
export type GetResourcesStatisticsMediaContainer = {
size?: number | undefined;
statisticsResources?: Array<StatisticsResources> | undefined;
};
/**
* Resource Statistics
*/
export type GetResourcesStatisticsResponseBody = {
mediaContainer?: GetResourcesStatisticsMediaContainer | undefined;
};
export type GetResourcesStatisticsResponse = {
/**
* HTTP response content type for this operation
*/
contentType: string;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse: Response;
/**
* Resource Statistics
*/
object?: GetResourcesStatisticsResponseBody | undefined;
};
/** @internal */
export namespace GetResourcesStatisticsRequest$ {
export const inboundSchema: z.ZodType<GetResourcesStatisticsRequest, z.ZodTypeDef, unknown> = z
.object({
Timespan: z.number().int().optional(),
})
.transform((v) => {
return remap$(v, {
Timespan: "timespan",
});
});
export type Outbound = {
Timespan?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetResourcesStatisticsRequest> =
z
.object({
timespan: z.number().int().optional(),
})
.transform((v) => {
return remap$(v, {
timespan: "Timespan",
});
});
}
/** @internal */
export namespace GetResourcesStatisticsErrors$ {
export const inboundSchema: z.ZodType<GetResourcesStatisticsErrors, z.ZodTypeDef, unknown> =
z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetResourcesStatisticsErrors> =
z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
export namespace GetResourcesStatisticsStatisticsResponseBody$ {
export const inboundSchema: z.ZodType<
GetResourcesStatisticsStatisticsResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetResourcesStatisticsErrors$.inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetResourcesStatisticsStatisticsResponseBody(remapped);
});
export type Outbound = {
errors?: Array<GetResourcesStatisticsErrors$.Outbound> | undefined;
RawResponse?: never | undefined;
};
export const outboundSchema: z.ZodType<
Outbound,
z.ZodTypeDef,
GetResourcesStatisticsStatisticsResponseBody
> = z
.instanceof(GetResourcesStatisticsStatisticsResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z
.array(z.lazy(() => GetResourcesStatisticsErrors$.outboundSchema))
.optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}
/** @internal */
export namespace StatisticsResources$ {
export const inboundSchema: z.ZodType<StatisticsResources, z.ZodTypeDef, unknown> = z.object({
timespan: z.number().int().optional(),
at: z.number().int().optional(),
hostCpuUtilization: z.number().optional(),
processCpuUtilization: z.number().optional(),
hostMemoryUtilization: z.number().optional(),
processMemoryUtilization: z.number().optional(),
});
export type Outbound = {
timespan?: number | undefined;
at?: number | undefined;
hostCpuUtilization?: number | undefined;
processCpuUtilization?: number | undefined;
hostMemoryUtilization?: number | undefined;
processMemoryUtilization?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, StatisticsResources> = z.object({
timespan: z.number().int().optional(),
at: z.number().int().optional(),
hostCpuUtilization: z.number().optional(),
processCpuUtilization: z.number().optional(),
hostMemoryUtilization: z.number().optional(),
processMemoryUtilization: z.number().optional(),
});
}
/** @internal */
export namespace GetResourcesStatisticsMediaContainer$ {
export const inboundSchema: z.ZodType<
GetResourcesStatisticsMediaContainer,
z.ZodTypeDef,
unknown
> = z
.object({
size: z.number().int().optional(),
StatisticsResources: z
.array(z.lazy(() => StatisticsResources$.inboundSchema))
.optional(),
})
.transform((v) => {
return remap$(v, {
StatisticsResources: "statisticsResources",
});
});
export type Outbound = {
size?: number | undefined;
StatisticsResources?: Array<StatisticsResources$.Outbound> | undefined;
};
export const outboundSchema: z.ZodType<
Outbound,
z.ZodTypeDef,
GetResourcesStatisticsMediaContainer
> = z
.object({
size: z.number().int().optional(),
statisticsResources: z
.array(z.lazy(() => StatisticsResources$.outboundSchema))
.optional(),
})
.transform((v) => {
return remap$(v, {
statisticsResources: "StatisticsResources",
});
});
}
/** @internal */
export namespace GetResourcesStatisticsResponseBody$ {
export const inboundSchema: z.ZodType<
GetResourcesStatisticsResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
MediaContainer: z
.lazy(() => GetResourcesStatisticsMediaContainer$.inboundSchema)
.optional(),
})
.transform((v) => {
return remap$(v, {
MediaContainer: "mediaContainer",
});
});
export type Outbound = {
MediaContainer?: GetResourcesStatisticsMediaContainer$.Outbound | undefined;
};
export const outboundSchema: z.ZodType<
Outbound,
z.ZodTypeDef,
GetResourcesStatisticsResponseBody
> = z
.object({
mediaContainer: z
.lazy(() => GetResourcesStatisticsMediaContainer$.outboundSchema)
.optional(),
})
.transform((v) => {
return remap$(v, {
mediaContainer: "MediaContainer",
});
});
}
/** @internal */
export namespace GetResourcesStatisticsResponse$ {
export const inboundSchema: z.ZodType<GetResourcesStatisticsResponse, z.ZodTypeDef, unknown> = z
.object({
ContentType: z.string(),
StatusCode: z.number().int(),
RawResponse: z.instanceof(Response),
object: z.lazy(() => GetResourcesStatisticsResponseBody$.inboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
ContentType: string;
StatusCode: number;
RawResponse: never;
object?: GetResourcesStatisticsResponseBody$.Outbound | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetResourcesStatisticsResponse> =
z
.object({
contentType: z.string(),
statusCode: z.number().int(),
rawResponse: z.instanceof(Response).transform(() => {
throw new Error("Response cannot be serialized");
}),
object: z.lazy(() => GetResourcesStatisticsResponseBody$.outboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { remap as remap$ } from "../lib/primitives.js";
import * as z from "zod";
export type GetSearchResultsRequest = {

View File

@@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../lib/primitives";
import { remap as remap$ } from "../lib/primitives.js";
import * as z from "zod";
export type GetServerActivitiesErrors = {

Some files were not shown because too many files have changed in this diff Show More