mirror of
https://github.com/LukeHagar/plexjs.git
synced 2025-12-06 04:20:46 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.474.0
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
/.speakeasy/reports
|
||||||
/react-query
|
/react-query
|
||||||
/sdk/models/errors
|
/sdk/models/errors
|
||||||
/sdk/types
|
/sdk/types
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
!/REACT_QUERY.md
|
!/REACT_QUERY.md
|
||||||
!/**/*.ts
|
!/**/*.ts
|
||||||
!/**/*.js
|
!/**/*.js
|
||||||
|
!/**/*.json
|
||||||
!/**/*.map
|
!/**/*.map
|
||||||
|
|
||||||
/.eslintrc.js
|
/.eslintrc.js
|
||||||
|
|||||||
1488
.speakeasy/gen.lock
1488
.speakeasy/gen.lock
File diff suppressed because one or more lines are too long
@@ -13,7 +13,7 @@ generation:
|
|||||||
oAuth2ClientCredentialsEnabled: true
|
oAuth2ClientCredentialsEnabled: true
|
||||||
oAuth2PasswordEnabled: false
|
oAuth2PasswordEnabled: false
|
||||||
typescript:
|
typescript:
|
||||||
version: 0.32.1
|
version: 0.32.2
|
||||||
additionalDependencies:
|
additionalDependencies:
|
||||||
dependencies: {}
|
dependencies: {}
|
||||||
devDependencies: {}
|
devDependencies: {}
|
||||||
@@ -22,6 +22,7 @@ typescript:
|
|||||||
author: LukeHagar
|
author: LukeHagar
|
||||||
clientServerStatusCodesAsErrors: true
|
clientServerStatusCodesAsErrors: true
|
||||||
defaultErrorName: SDKError
|
defaultErrorName: SDKError
|
||||||
|
enableCustomCodeRegions: false
|
||||||
enableReactQuery: false
|
enableReactQuery: false
|
||||||
enumFormat: enum
|
enumFormat: enum
|
||||||
flattenGlobalSecurity: true
|
flattenGlobalSecurity: true
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
speakeasyVersion: 1.459.2
|
speakeasyVersion: 1.474.0
|
||||||
sources:
|
sources:
|
||||||
my-source:
|
my-source:
|
||||||
sourceNamespace: my-source
|
sourceNamespace: my-source
|
||||||
@@ -9,20 +9,20 @@ sources:
|
|||||||
- main
|
- main
|
||||||
plexapi:
|
plexapi:
|
||||||
sourceNamespace: plexapi
|
sourceNamespace: plexapi
|
||||||
sourceRevisionDigest: sha256:28e2213b78ff9c789846a4a0b7ab9fb219079a1699d44b22d28474efc4f48eac
|
sourceRevisionDigest: sha256:b146684d2d813daa8ba29e432a12334838753d0b20183beca8178a74ec4d895a
|
||||||
sourceBlobDigest: sha256:fa76c39de0ff801844dd56a76c26ab6ca88695fc9b42bb9ff9a8aab5b2b21277
|
sourceBlobDigest: sha256:58f51c4319fcda931d63950fd926e8650e20a2e1375e356bf3a930111e246a58
|
||||||
tags:
|
tags:
|
||||||
- latest
|
- latest
|
||||||
- speakeasy-sdk-regen-1734826254
|
- speakeasy-sdk-regen-1737677393
|
||||||
- 0.0.3
|
- 0.0.3
|
||||||
targets:
|
targets:
|
||||||
plexjs:
|
plexjs:
|
||||||
source: plexapi
|
source: plexapi
|
||||||
sourceNamespace: plexapi
|
sourceNamespace: plexapi
|
||||||
sourceRevisionDigest: sha256:28e2213b78ff9c789846a4a0b7ab9fb219079a1699d44b22d28474efc4f48eac
|
sourceRevisionDigest: sha256:b146684d2d813daa8ba29e432a12334838753d0b20183beca8178a74ec4d895a
|
||||||
sourceBlobDigest: sha256:fa76c39de0ff801844dd56a76c26ab6ca88695fc9b42bb9ff9a8aab5b2b21277
|
sourceBlobDigest: sha256:58f51c4319fcda931d63950fd926e8650e20a2e1375e356bf3a930111e246a58
|
||||||
codeSamplesNamespace: code-samples-typescript-plexjs
|
codeSamplesNamespace: code-samples-typescript-plexjs
|
||||||
codeSamplesRevisionDigest: sha256:7d4fa9b8b7f828000504117f5d5075b647941dd02857cd0c4dded2aafa917a83
|
codeSamplesRevisionDigest: sha256:96ce210c9c8c0b5ae45ce5fe2e62d64d6914bb1b1b6c18eaee6e1e379fb40e13
|
||||||
workflow:
|
workflow:
|
||||||
workflowVersion: 1.0.0
|
workflowVersion: 1.0.0
|
||||||
speakeasyVersion: latest
|
speakeasyVersion: latest
|
||||||
|
|||||||
10
RELEASES.md
10
RELEASES.md
@@ -1169,3 +1169,13 @@ Based on:
|
|||||||
- [typescript v0.32.1] .
|
- [typescript v0.32.1] .
|
||||||
### Releases
|
### Releases
|
||||||
- [NPM v0.32.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.32.1 - .
|
- [NPM v0.32.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.32.1 - .
|
||||||
|
|
||||||
|
## 2025-01-24 00:09:35
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.474.0 (2.495.0) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.32.2] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.32.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.32.2 - .
|
||||||
26
RUNTIMES.md
26
RUNTIMES.md
@@ -20,3 +20,29 @@ Runtime environments that are explicitly supported are:
|
|||||||
- Note that Deno does not currently have native support for streaming file uploads backed by the filesystem ([issue link][deno-file-streaming])
|
- Note that Deno does not currently have native support for streaming file uploads backed by the filesystem ([issue link][deno-file-streaming])
|
||||||
|
|
||||||
[deno-file-streaming]: https://github.com/denoland/deno/issues/11018
|
[deno-file-streaming]: https://github.com/denoland/deno/issues/11018
|
||||||
|
|
||||||
|
## Recommended TypeScript compiler options
|
||||||
|
|
||||||
|
The following `tsconfig.json` options are recommended for projects using this
|
||||||
|
SDK in order to get static type support for features like async iterables,
|
||||||
|
streams and `fetch`-related APIs ([`for await...of`][for-await-of],
|
||||||
|
[`AbortSignal`][abort-signal], [`Request`][request], [`Response`][response] and
|
||||||
|
so on):
|
||||||
|
|
||||||
|
[for-await-of]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of
|
||||||
|
[abort-signal]: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
|
||||||
|
[request]: https://developer.mozilla.org/en-US/docs/Web/API/Request
|
||||||
|
[response]: https://developer.mozilla.org/en-US/docs/Web/API/Response
|
||||||
|
|
||||||
|
```jsonc
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "es2020", // or higher
|
||||||
|
"lib": ["es2020", "dom", "dom.iterable"],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
While `target` can be set to older ECMAScript versions, it may result in extra,
|
||||||
|
unnecessary compatibility code being generated if you are not targeting old
|
||||||
|
runtimes.
|
||||||
@@ -622,7 +622,7 @@ actions:
|
|||||||
});
|
});
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const result = await plexAPI.library.getMetadataChildren(1539.15, "Stream");
|
const result = await plexAPI.library.getMetadataChildren(1539.14, "Stream");
|
||||||
|
|
||||||
// Handle the result
|
// Handle the result
|
||||||
console.log(result);
|
console.log(result);
|
||||||
@@ -820,13 +820,14 @@ actions:
|
|||||||
label: details
|
label: details
|
||||||
source: |-
|
source: |-
|
||||||
import { PlexAPI } from "@lukehagar/plexjs";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
import { IncludeDetails } from "@lukehagar/plexjs/sdk/models/operations";
|
||||||
|
|
||||||
const plexAPI = new PlexAPI({
|
const plexAPI = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const result = await plexAPI.library.getLibraryDetails(9518);
|
const result = await plexAPI.library.getLibraryDetails(9518, IncludeDetails.Zero);
|
||||||
|
|
||||||
// Handle the result
|
// Handle the result
|
||||||
console.log(result);
|
console.log(result);
|
||||||
@@ -1053,6 +1054,7 @@ actions:
|
|||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const result = await plexAPI.plex.getPin({
|
const result = await plexAPI.plex.getPin({
|
||||||
|
strong: false,
|
||||||
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
|
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
|
||||||
clientName: "Plex for Roku",
|
clientName: "Plex for Roku",
|
||||||
deviceNickname: "Roku 3",
|
deviceNickname: "Roku 3",
|
||||||
@@ -1210,7 +1212,7 @@ actions:
|
|||||||
});
|
});
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const result = await plexAPI.playlists.updatePlaylist(3915.00);
|
const result = await plexAPI.playlists.updatePlaylist(3915);
|
||||||
|
|
||||||
// Handle the result
|
// Handle the result
|
||||||
console.log(result);
|
console.log(result);
|
||||||
@@ -1271,7 +1273,7 @@ actions:
|
|||||||
});
|
});
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const result = await plexAPI.playlists.addPlaylistContents(8502.00, "server://12345/com.plexapp.plugins.library/library/metadata/1", 123);
|
const result = await plexAPI.playlists.addPlaylistContents(8502.01, "server://12345/com.plexapp.plugins.library/library/metadata/1", 123);
|
||||||
|
|
||||||
// Handle the result
|
// Handle the result
|
||||||
console.log(result);
|
console.log(result);
|
||||||
@@ -1622,6 +1624,7 @@ actions:
|
|||||||
requestBody: {
|
requestBody: {
|
||||||
login: "username@email.com",
|
login: "username@email.com",
|
||||||
password: "password123",
|
password: "password123",
|
||||||
|
rememberMe: false,
|
||||||
verificationCode: "123456",
|
verificationCode: "123456",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
19
docs/sdk/models/operations/enablecreditsmarkergeneration.md
Normal file
19
docs/sdk/models/operations/enablecreditsmarkergeneration.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# EnableCreditsMarkerGeneration
|
||||||
|
|
||||||
|
Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import { EnableCreditsMarkerGeneration } from "@lukehagar/plexjs/sdk/models/operations";
|
||||||
|
|
||||||
|
let value: EnableCreditsMarkerGeneration =
|
||||||
|
EnableCreditsMarkerGeneration.LibraryDefault;
|
||||||
|
```
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ---------------- | ---------------- |
|
||||||
|
| `LibraryDefault` | -1 |
|
||||||
|
| `Disabled` | 0 |
|
||||||
19
docs/sdk/models/operations/episodesort.md
Normal file
19
docs/sdk/models/operations/episodesort.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# EpisodeSort
|
||||||
|
|
||||||
|
Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import { EpisodeSort } from "@lukehagar/plexjs/sdk/models/operations";
|
||||||
|
|
||||||
|
let value: EpisodeSort = EpisodeSort.OldestFirst;
|
||||||
|
```
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ---------------- | ---------------- |
|
||||||
|
| `LibraryDefault` | -1 |
|
||||||
|
| `OldestFirst` | 0 |
|
||||||
|
| `NewestFirst` | 1 |
|
||||||
@@ -1,16 +1,19 @@
|
|||||||
# FlattenSeasons
|
# FlattenSeasons
|
||||||
|
|
||||||
|
Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
|
||||||
|
|
||||||
## Example Usage
|
## Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { FlattenSeasons } from "@lukehagar/plexjs/sdk/models/operations";
|
import { FlattenSeasons } from "@lukehagar/plexjs/sdk/models/operations";
|
||||||
|
|
||||||
let value: FlattenSeasons = FlattenSeasons.True;
|
let value: FlattenSeasons = FlattenSeasons.Show;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Values
|
## Values
|
||||||
|
|
||||||
| Name | Value |
|
| Name | Value |
|
||||||
| ------- | ------- |
|
| ---------------- | ---------------- |
|
||||||
| `False` | 0 |
|
| `LibraryDefault` | -1 |
|
||||||
| `True` | 1 |
|
| `Hide` | 0 |
|
||||||
|
| `Show` | 1 |
|
||||||
@@ -11,12 +11,8 @@ let value: Friend = {
|
|||||||
home: true,
|
home: true,
|
||||||
id: 0,
|
id: 0,
|
||||||
restricted: false,
|
restricted: false,
|
||||||
sharedServers: [
|
sharedServers: [],
|
||||||
{},
|
sharedSources: [],
|
||||||
],
|
|
||||||
sharedSources: [
|
|
||||||
{},
|
|
||||||
],
|
|
||||||
status: Status.Accepted,
|
status: Status.Accepted,
|
||||||
thumb: "https://plex.tv/users/7d1916e0d8f6e76b/avatar?c=1694481578",
|
thumb: "https://plex.tv/users/7d1916e0d8f6e76b/avatar?c=1694481578",
|
||||||
title: "username123",
|
title: "username123",
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# GetLibraryItemsEnableCreditsMarkerGeneration
|
||||||
|
|
||||||
|
Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import { GetLibraryItemsEnableCreditsMarkerGeneration } from "@lukehagar/plexjs/sdk/models/operations";
|
||||||
|
|
||||||
|
let value: GetLibraryItemsEnableCreditsMarkerGeneration =
|
||||||
|
GetLibraryItemsEnableCreditsMarkerGeneration.LibraryDefault;
|
||||||
|
```
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ---------------- | ---------------- |
|
||||||
|
| `LibraryDefault` | -1 |
|
||||||
|
| `Disabled` | 0 |
|
||||||
19
docs/sdk/models/operations/getlibraryitemsepisodesort.md
Normal file
19
docs/sdk/models/operations/getlibraryitemsepisodesort.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# GetLibraryItemsEpisodeSort
|
||||||
|
|
||||||
|
Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import { GetLibraryItemsEpisodeSort } from "@lukehagar/plexjs/sdk/models/operations";
|
||||||
|
|
||||||
|
let value: GetLibraryItemsEpisodeSort = GetLibraryItemsEpisodeSort.OldestFirst;
|
||||||
|
```
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ---------------- | ---------------- |
|
||||||
|
| `LibraryDefault` | -1 |
|
||||||
|
| `OldestFirst` | 0 |
|
||||||
|
| `NewestFirst` | 1 |
|
||||||
@@ -1,16 +1,19 @@
|
|||||||
# GetLibraryItemsFlattenSeasons
|
# GetLibraryItemsFlattenSeasons
|
||||||
|
|
||||||
|
Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
|
||||||
|
|
||||||
## Example Usage
|
## Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { GetLibraryItemsFlattenSeasons } from "@lukehagar/plexjs/sdk/models/operations";
|
import { GetLibraryItemsFlattenSeasons } from "@lukehagar/plexjs/sdk/models/operations";
|
||||||
|
|
||||||
let value: GetLibraryItemsFlattenSeasons = GetLibraryItemsFlattenSeasons.True;
|
let value: GetLibraryItemsFlattenSeasons = GetLibraryItemsFlattenSeasons.Show;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Values
|
## Values
|
||||||
|
|
||||||
| Name | Value |
|
| Name | Value |
|
||||||
| ------- | ------- |
|
| ---------------- | ---------------- |
|
||||||
| `False` | 0 |
|
| `LibraryDefault` | -1 |
|
||||||
| `True` | 1 |
|
| `Hide` | 0 |
|
||||||
|
| `Show` | 1 |
|
||||||
@@ -9,6 +9,8 @@ The Meta object is only included in the response if the `includeMeta` parameter
|
|||||||
import {
|
import {
|
||||||
GetLibraryItemsActiveDirection,
|
GetLibraryItemsActiveDirection,
|
||||||
GetLibraryItemsDefaultDirection,
|
GetLibraryItemsDefaultDirection,
|
||||||
|
GetLibraryItemsEnableCreditsMarkerGeneration,
|
||||||
|
GetLibraryItemsEpisodeSort,
|
||||||
GetLibraryItemsFlattenSeasons,
|
GetLibraryItemsFlattenSeasons,
|
||||||
GetLibraryItemsHasThumbnail,
|
GetLibraryItemsHasThumbnail,
|
||||||
GetLibraryItemsLibraryActiveDirection,
|
GetLibraryItemsLibraryActiveDirection,
|
||||||
@@ -110,7 +112,10 @@ let value: GetLibraryItemsMediaContainer = {
|
|||||||
year: 2022,
|
year: 2022,
|
||||||
seasonCount: 2022,
|
seasonCount: 2022,
|
||||||
tagline: "Return to Pandora.",
|
tagline: "Return to Pandora.",
|
||||||
flattenSeasons: GetLibraryItemsFlattenSeasons.True,
|
flattenSeasons: GetLibraryItemsFlattenSeasons.Show,
|
||||||
|
episodeSort: GetLibraryItemsEpisodeSort.OldestFirst,
|
||||||
|
enableCreditsMarkerGeneration:
|
||||||
|
GetLibraryItemsEnableCreditsMarkerGeneration.LibraryDefault,
|
||||||
showOrdering: GetLibraryItemsShowOrdering.TvdbDvd,
|
showOrdering: GetLibraryItemsShowOrdering.TvdbDvd,
|
||||||
thumb: "/library/metadata/58683/thumb/1703239236",
|
thumb: "/library/metadata/58683/thumb/1703239236",
|
||||||
art: "/library/metadata/58683/art/1703239236",
|
art: "/library/metadata/58683/art/1703239236",
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import {
|
import {
|
||||||
|
GetLibraryItemsEnableCreditsMarkerGeneration,
|
||||||
|
GetLibraryItemsEpisodeSort,
|
||||||
GetLibraryItemsFlattenSeasons,
|
GetLibraryItemsFlattenSeasons,
|
||||||
GetLibraryItemsHasThumbnail,
|
GetLibraryItemsHasThumbnail,
|
||||||
GetLibraryItemsLibraryResponse200Type,
|
GetLibraryItemsLibraryResponse200Type,
|
||||||
@@ -34,7 +36,10 @@ let value: GetLibraryItemsMetadata = {
|
|||||||
year: 2022,
|
year: 2022,
|
||||||
seasonCount: 2022,
|
seasonCount: 2022,
|
||||||
tagline: "Return to Pandora.",
|
tagline: "Return to Pandora.",
|
||||||
flattenSeasons: GetLibraryItemsFlattenSeasons.True,
|
flattenSeasons: GetLibraryItemsFlattenSeasons.Show,
|
||||||
|
episodeSort: GetLibraryItemsEpisodeSort.OldestFirst,
|
||||||
|
enableCreditsMarkerGeneration:
|
||||||
|
GetLibraryItemsEnableCreditsMarkerGeneration.LibraryDefault,
|
||||||
showOrdering: GetLibraryItemsShowOrdering.TvdbDvd,
|
showOrdering: GetLibraryItemsShowOrdering.TvdbDvd,
|
||||||
thumb: "/library/metadata/58683/thumb/1703239236",
|
thumb: "/library/metadata/58683/thumb/1703239236",
|
||||||
art: "/library/metadata/58683/art/1703239236",
|
art: "/library/metadata/58683/art/1703239236",
|
||||||
@@ -249,7 +254,9 @@ let value: GetLibraryItemsMetadata = {
|
|||||||
| `year` | *number* | :heavy_minus_sign: | N/A | 2022 |
|
| `year` | *number* | :heavy_minus_sign: | N/A | 2022 |
|
||||||
| `seasonCount` | *number* | :heavy_minus_sign: | N/A | 2022 |
|
| `seasonCount` | *number* | :heavy_minus_sign: | N/A | 2022 |
|
||||||
| `tagline` | *string* | :heavy_minus_sign: | N/A | Return to Pandora. |
|
| `tagline` | *string* | :heavy_minus_sign: | N/A | Return to Pandora. |
|
||||||
| `flattenSeasons` | [operations.GetLibraryItemsFlattenSeasons](../../../sdk/models/operations/getlibraryitemsflattenseasons.md) | :heavy_minus_sign: | N/A | 1 |
|
| `flattenSeasons` | [operations.GetLibraryItemsFlattenSeasons](../../../sdk/models/operations/getlibraryitemsflattenseasons.md) | :heavy_minus_sign: | Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). | 1 |
|
||||||
|
| `episodeSort` | [operations.GetLibraryItemsEpisodeSort](../../../sdk/models/operations/getlibraryitemsepisodesort.md) | :heavy_minus_sign: | Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). | 0 |
|
||||||
|
| `enableCreditsMarkerGeneration` | [operations.GetLibraryItemsEnableCreditsMarkerGeneration](../../../sdk/models/operations/getlibraryitemsenablecreditsmarkergeneration.md) | :heavy_minus_sign: | Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). | -1 |
|
||||||
| `showOrdering` | [operations.GetLibraryItemsShowOrdering](../../../sdk/models/operations/getlibraryitemsshowordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show<br/>None = Library default,<br/>tmdbAiring = The Movie Database (Aired),<br/>tvdbAiring = TheTVDB (Aired),<br/>tvdbDvd = TheTVDB (DVD),<br/>tvdbAbsolute = TheTVDB (Absolute)).<br/> | tvdbDvd |
|
| `showOrdering` | [operations.GetLibraryItemsShowOrdering](../../../sdk/models/operations/getlibraryitemsshowordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show<br/>None = Library default,<br/>tmdbAiring = The Movie Database (Aired),<br/>tvdbAiring = TheTVDB (Aired),<br/>tvdbDvd = TheTVDB (DVD),<br/>tvdbAbsolute = TheTVDB (Absolute)).<br/> | tvdbDvd |
|
||||||
| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 |
|
| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 |
|
||||||
| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 |
|
| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 |
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
import {
|
import {
|
||||||
GetLibraryItemsActiveDirection,
|
GetLibraryItemsActiveDirection,
|
||||||
GetLibraryItemsDefaultDirection,
|
GetLibraryItemsDefaultDirection,
|
||||||
|
GetLibraryItemsEnableCreditsMarkerGeneration,
|
||||||
|
GetLibraryItemsEpisodeSort,
|
||||||
GetLibraryItemsFlattenSeasons,
|
GetLibraryItemsFlattenSeasons,
|
||||||
GetLibraryItemsHasThumbnail,
|
GetLibraryItemsHasThumbnail,
|
||||||
GetLibraryItemsLibraryActiveDirection,
|
GetLibraryItemsLibraryActiveDirection,
|
||||||
@@ -114,7 +116,10 @@ let value: GetLibraryItemsResponse = {
|
|||||||
year: 2022,
|
year: 2022,
|
||||||
seasonCount: 2022,
|
seasonCount: 2022,
|
||||||
tagline: "Return to Pandora.",
|
tagline: "Return to Pandora.",
|
||||||
flattenSeasons: GetLibraryItemsFlattenSeasons.True,
|
flattenSeasons: GetLibraryItemsFlattenSeasons.Show,
|
||||||
|
episodeSort: GetLibraryItemsEpisodeSort.OldestFirst,
|
||||||
|
enableCreditsMarkerGeneration:
|
||||||
|
GetLibraryItemsEnableCreditsMarkerGeneration.LibraryDefault,
|
||||||
showOrdering: GetLibraryItemsShowOrdering.TvdbDvd,
|
showOrdering: GetLibraryItemsShowOrdering.TvdbDvd,
|
||||||
thumb: "/library/metadata/58683/thumb/1703239236",
|
thumb: "/library/metadata/58683/thumb/1703239236",
|
||||||
art: "/library/metadata/58683/art/1703239236",
|
art: "/library/metadata/58683/art/1703239236",
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ The contents of the library by section and tag
|
|||||||
import {
|
import {
|
||||||
GetLibraryItemsActiveDirection,
|
GetLibraryItemsActiveDirection,
|
||||||
GetLibraryItemsDefaultDirection,
|
GetLibraryItemsDefaultDirection,
|
||||||
|
GetLibraryItemsEnableCreditsMarkerGeneration,
|
||||||
|
GetLibraryItemsEpisodeSort,
|
||||||
GetLibraryItemsFlattenSeasons,
|
GetLibraryItemsFlattenSeasons,
|
||||||
GetLibraryItemsHasThumbnail,
|
GetLibraryItemsHasThumbnail,
|
||||||
GetLibraryItemsLibraryActiveDirection,
|
GetLibraryItemsLibraryActiveDirection,
|
||||||
@@ -110,7 +112,10 @@ let value: GetLibraryItemsResponseBody = {
|
|||||||
year: 2022,
|
year: 2022,
|
||||||
seasonCount: 2022,
|
seasonCount: 2022,
|
||||||
tagline: "Return to Pandora.",
|
tagline: "Return to Pandora.",
|
||||||
flattenSeasons: GetLibraryItemsFlattenSeasons.True,
|
flattenSeasons: GetLibraryItemsFlattenSeasons.Show,
|
||||||
|
episodeSort: GetLibraryItemsEpisodeSort.OldestFirst,
|
||||||
|
enableCreditsMarkerGeneration:
|
||||||
|
GetLibraryItemsEnableCreditsMarkerGeneration.LibraryDefault,
|
||||||
showOrdering: GetLibraryItemsShowOrdering.TvdbDvd,
|
showOrdering: GetLibraryItemsShowOrdering.TvdbDvd,
|
||||||
thumb: "/library/metadata/58683/thumb/1703239236",
|
thumb: "/library/metadata/58683/thumb/1703239236",
|
||||||
art: "/library/metadata/58683/art/1703239236",
|
art: "/library/metadata/58683/art/1703239236",
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
import { GetMetadataChildrenRequest } from "@lukehagar/plexjs/sdk/models/operations";
|
import { GetMetadataChildrenRequest } from "@lukehagar/plexjs/sdk/models/operations";
|
||||||
|
|
||||||
let value: GetMetadataChildrenRequest = {
|
let value: GetMetadataChildrenRequest = {
|
||||||
ratingKey: 1716.30,
|
ratingKey: 1716.29,
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
import { GetPlaylistRequest } from "@lukehagar/plexjs/sdk/models/operations";
|
import { GetPlaylistRequest } from "@lukehagar/plexjs/sdk/models/operations";
|
||||||
|
|
||||||
let value: GetPlaylistRequest = {
|
let value: GetPlaylistRequest = {
|
||||||
playlistID: 672.50,
|
playlistID: 672.49,
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import {
|
import {
|
||||||
|
EnableCreditsMarkerGeneration,
|
||||||
|
EpisodeSort,
|
||||||
FlattenSeasons,
|
FlattenSeasons,
|
||||||
GetRecentlyAddedActiveDirection,
|
GetRecentlyAddedActiveDirection,
|
||||||
GetRecentlyAddedDefaultDirection,
|
GetRecentlyAddedDefaultDirection,
|
||||||
@@ -90,7 +92,10 @@ let value: GetRecentlyAddedMediaContainer = {
|
|||||||
year: 2022,
|
year: 2022,
|
||||||
seasonCount: 2022,
|
seasonCount: 2022,
|
||||||
tagline: "Return to Pandora.",
|
tagline: "Return to Pandora.",
|
||||||
flattenSeasons: FlattenSeasons.True,
|
flattenSeasons: FlattenSeasons.Show,
|
||||||
|
episodeSort: EpisodeSort.OldestFirst,
|
||||||
|
enableCreditsMarkerGeneration:
|
||||||
|
EnableCreditsMarkerGeneration.LibraryDefault,
|
||||||
showOrdering: ShowOrdering.TvdbDvd,
|
showOrdering: ShowOrdering.TvdbDvd,
|
||||||
thumb: "/library/metadata/58683/thumb/1703239236",
|
thumb: "/library/metadata/58683/thumb/1703239236",
|
||||||
art: "/library/metadata/58683/art/1703239236",
|
art: "/library/metadata/58683/art/1703239236",
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import {
|
import {
|
||||||
|
EnableCreditsMarkerGeneration,
|
||||||
|
EpisodeSort,
|
||||||
FlattenSeasons,
|
FlattenSeasons,
|
||||||
GetRecentlyAddedHubsResponseType,
|
GetRecentlyAddedHubsResponseType,
|
||||||
GetRecentlyAddedHubsType,
|
GetRecentlyAddedHubsType,
|
||||||
@@ -34,7 +36,9 @@ let value: GetRecentlyAddedMetadata = {
|
|||||||
year: 2022,
|
year: 2022,
|
||||||
seasonCount: 2022,
|
seasonCount: 2022,
|
||||||
tagline: "Return to Pandora.",
|
tagline: "Return to Pandora.",
|
||||||
flattenSeasons: FlattenSeasons.True,
|
flattenSeasons: FlattenSeasons.Show,
|
||||||
|
episodeSort: EpisodeSort.OldestFirst,
|
||||||
|
enableCreditsMarkerGeneration: EnableCreditsMarkerGeneration.LibraryDefault,
|
||||||
showOrdering: ShowOrdering.TvdbDvd,
|
showOrdering: ShowOrdering.TvdbDvd,
|
||||||
thumb: "/library/metadata/58683/thumb/1703239236",
|
thumb: "/library/metadata/58683/thumb/1703239236",
|
||||||
art: "/library/metadata/58683/art/1703239236",
|
art: "/library/metadata/58683/art/1703239236",
|
||||||
@@ -249,7 +253,9 @@ let value: GetRecentlyAddedMetadata = {
|
|||||||
| `year` | *number* | :heavy_minus_sign: | N/A | 2022 |
|
| `year` | *number* | :heavy_minus_sign: | N/A | 2022 |
|
||||||
| `seasonCount` | *number* | :heavy_minus_sign: | N/A | 2022 |
|
| `seasonCount` | *number* | :heavy_minus_sign: | N/A | 2022 |
|
||||||
| `tagline` | *string* | :heavy_minus_sign: | N/A | Return to Pandora. |
|
| `tagline` | *string* | :heavy_minus_sign: | N/A | Return to Pandora. |
|
||||||
| `flattenSeasons` | [operations.FlattenSeasons](../../../sdk/models/operations/flattenseasons.md) | :heavy_minus_sign: | N/A | 1 |
|
| `flattenSeasons` | [operations.FlattenSeasons](../../../sdk/models/operations/flattenseasons.md) | :heavy_minus_sign: | Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). | 1 |
|
||||||
|
| `episodeSort` | [operations.EpisodeSort](../../../sdk/models/operations/episodesort.md) | :heavy_minus_sign: | Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). | 0 |
|
||||||
|
| `enableCreditsMarkerGeneration` | [operations.EnableCreditsMarkerGeneration](../../../sdk/models/operations/enablecreditsmarkergeneration.md) | :heavy_minus_sign: | Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). | -1 |
|
||||||
| `showOrdering` | [operations.ShowOrdering](../../../sdk/models/operations/showordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show<br/>None = Library default,<br/>tmdbAiring = The Movie Database (Aired),<br/>tvdbAiring = TheTVDB (Aired),<br/>tvdbDvd = TheTVDB (DVD),<br/>tvdbAbsolute = TheTVDB (Absolute)).<br/> | tvdbDvd |
|
| `showOrdering` | [operations.ShowOrdering](../../../sdk/models/operations/showordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show<br/>None = Library default,<br/>tmdbAiring = The Movie Database (Aired),<br/>tvdbAiring = TheTVDB (Aired),<br/>tvdbDvd = TheTVDB (DVD),<br/>tvdbAbsolute = TheTVDB (Absolute)).<br/> | tvdbDvd |
|
||||||
| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 |
|
| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 |
|
||||||
| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 |
|
| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 |
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import {
|
import {
|
||||||
|
EnableCreditsMarkerGeneration,
|
||||||
|
EpisodeSort,
|
||||||
FlattenSeasons,
|
FlattenSeasons,
|
||||||
GetRecentlyAddedActiveDirection,
|
GetRecentlyAddedActiveDirection,
|
||||||
GetRecentlyAddedDefaultDirection,
|
GetRecentlyAddedDefaultDirection,
|
||||||
@@ -97,7 +99,10 @@ let value: GetRecentlyAddedResponse = {
|
|||||||
year: 2022,
|
year: 2022,
|
||||||
seasonCount: 2022,
|
seasonCount: 2022,
|
||||||
tagline: "Return to Pandora.",
|
tagline: "Return to Pandora.",
|
||||||
flattenSeasons: FlattenSeasons.True,
|
flattenSeasons: FlattenSeasons.Show,
|
||||||
|
episodeSort: EpisodeSort.OldestFirst,
|
||||||
|
enableCreditsMarkerGeneration:
|
||||||
|
EnableCreditsMarkerGeneration.LibraryDefault,
|
||||||
showOrdering: ShowOrdering.TvdbDvd,
|
showOrdering: ShowOrdering.TvdbDvd,
|
||||||
thumb: "/library/metadata/58683/thumb/1703239236",
|
thumb: "/library/metadata/58683/thumb/1703239236",
|
||||||
art: "/library/metadata/58683/art/1703239236",
|
art: "/library/metadata/58683/art/1703239236",
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ A successful response with recently added content.
|
|||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import {
|
import {
|
||||||
|
EnableCreditsMarkerGeneration,
|
||||||
|
EpisodeSort,
|
||||||
FlattenSeasons,
|
FlattenSeasons,
|
||||||
GetRecentlyAddedActiveDirection,
|
GetRecentlyAddedActiveDirection,
|
||||||
GetRecentlyAddedDefaultDirection,
|
GetRecentlyAddedDefaultDirection,
|
||||||
@@ -93,7 +95,10 @@ let value: GetRecentlyAddedResponseBody = {
|
|||||||
year: 2022,
|
year: 2022,
|
||||||
seasonCount: 2022,
|
seasonCount: 2022,
|
||||||
tagline: "Return to Pandora.",
|
tagline: "Return to Pandora.",
|
||||||
flattenSeasons: FlattenSeasons.True,
|
flattenSeasons: FlattenSeasons.Show,
|
||||||
|
episodeSort: EpisodeSort.OldestFirst,
|
||||||
|
enableCreditsMarkerGeneration:
|
||||||
|
EnableCreditsMarkerGeneration.LibraryDefault,
|
||||||
showOrdering: ShowOrdering.TvdbDvd,
|
showOrdering: ShowOrdering.TvdbDvd,
|
||||||
thumb: "/library/metadata/58683/thumb/1703239236",
|
thumb: "/library/metadata/58683/thumb/1703239236",
|
||||||
art: "/library/metadata/58683/art/1703239236",
|
art: "/library/metadata/58683/art/1703239236",
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# GetSearchAllLibrariesEnableCreditsMarkerGeneration
|
||||||
|
|
||||||
|
Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import { GetSearchAllLibrariesEnableCreditsMarkerGeneration } from "@lukehagar/plexjs/sdk/models/operations";
|
||||||
|
|
||||||
|
let value: GetSearchAllLibrariesEnableCreditsMarkerGeneration =
|
||||||
|
GetSearchAllLibrariesEnableCreditsMarkerGeneration.LibraryDefault;
|
||||||
|
```
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ---------------- | ---------------- |
|
||||||
|
| `LibraryDefault` | -1 |
|
||||||
|
| `Disabled` | 0 |
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
# GetSearchAllLibrariesEpisodeSort
|
||||||
|
|
||||||
|
Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import { GetSearchAllLibrariesEpisodeSort } from "@lukehagar/plexjs/sdk/models/operations";
|
||||||
|
|
||||||
|
let value: GetSearchAllLibrariesEpisodeSort =
|
||||||
|
GetSearchAllLibrariesEpisodeSort.OldestFirst;
|
||||||
|
```
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ---------------- | ---------------- |
|
||||||
|
| `LibraryDefault` | -1 |
|
||||||
|
| `OldestFirst` | 0 |
|
||||||
|
| `NewestFirst` | 1 |
|
||||||
@@ -1,17 +1,20 @@
|
|||||||
# GetSearchAllLibrariesFlattenSeasons
|
# GetSearchAllLibrariesFlattenSeasons
|
||||||
|
|
||||||
|
Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
|
||||||
|
|
||||||
## Example Usage
|
## Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { GetSearchAllLibrariesFlattenSeasons } from "@lukehagar/plexjs/sdk/models/operations";
|
import { GetSearchAllLibrariesFlattenSeasons } from "@lukehagar/plexjs/sdk/models/operations";
|
||||||
|
|
||||||
let value: GetSearchAllLibrariesFlattenSeasons =
|
let value: GetSearchAllLibrariesFlattenSeasons =
|
||||||
GetSearchAllLibrariesFlattenSeasons.True;
|
GetSearchAllLibrariesFlattenSeasons.Show;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Values
|
## Values
|
||||||
|
|
||||||
| Name | Value |
|
| Name | Value |
|
||||||
| ------- | ------- |
|
| ---------------- | ---------------- |
|
||||||
| `False` | 0 |
|
| `LibraryDefault` | -1 |
|
||||||
| `True` | 1 |
|
| `Hide` | 0 |
|
||||||
|
| `Show` | 1 |
|
||||||
@@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import {
|
import {
|
||||||
|
GetSearchAllLibrariesEnableCreditsMarkerGeneration,
|
||||||
|
GetSearchAllLibrariesEpisodeSort,
|
||||||
GetSearchAllLibrariesFlattenSeasons,
|
GetSearchAllLibrariesFlattenSeasons,
|
||||||
GetSearchAllLibrariesHasThumbnail,
|
GetSearchAllLibrariesHasThumbnail,
|
||||||
GetSearchAllLibrariesLibraryType,
|
GetSearchAllLibrariesLibraryType,
|
||||||
@@ -39,7 +41,10 @@ let value: GetSearchAllLibrariesMediaContainer = {
|
|||||||
year: 2022,
|
year: 2022,
|
||||||
seasonCount: 2022,
|
seasonCount: 2022,
|
||||||
tagline: "Return to Pandora.",
|
tagline: "Return to Pandora.",
|
||||||
flattenSeasons: GetSearchAllLibrariesFlattenSeasons.True,
|
flattenSeasons: GetSearchAllLibrariesFlattenSeasons.Show,
|
||||||
|
episodeSort: GetSearchAllLibrariesEpisodeSort.OldestFirst,
|
||||||
|
enableCreditsMarkerGeneration:
|
||||||
|
GetSearchAllLibrariesEnableCreditsMarkerGeneration.LibraryDefault,
|
||||||
showOrdering: GetSearchAllLibrariesShowOrdering.TvdbDvd,
|
showOrdering: GetSearchAllLibrariesShowOrdering.TvdbDvd,
|
||||||
thumb: "/library/metadata/58683/thumb/1703239236",
|
thumb: "/library/metadata/58683/thumb/1703239236",
|
||||||
art: "/library/metadata/58683/art/1703239236",
|
art: "/library/metadata/58683/art/1703239236",
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import {
|
import {
|
||||||
|
GetSearchAllLibrariesEnableCreditsMarkerGeneration,
|
||||||
|
GetSearchAllLibrariesEpisodeSort,
|
||||||
GetSearchAllLibrariesFlattenSeasons,
|
GetSearchAllLibrariesFlattenSeasons,
|
||||||
GetSearchAllLibrariesHasThumbnail,
|
GetSearchAllLibrariesHasThumbnail,
|
||||||
GetSearchAllLibrariesLibraryType,
|
GetSearchAllLibrariesLibraryType,
|
||||||
@@ -34,7 +36,10 @@ let value: GetSearchAllLibrariesMetadata = {
|
|||||||
year: 2022,
|
year: 2022,
|
||||||
seasonCount: 2022,
|
seasonCount: 2022,
|
||||||
tagline: "Return to Pandora.",
|
tagline: "Return to Pandora.",
|
||||||
flattenSeasons: GetSearchAllLibrariesFlattenSeasons.True,
|
flattenSeasons: GetSearchAllLibrariesFlattenSeasons.Show,
|
||||||
|
episodeSort: GetSearchAllLibrariesEpisodeSort.OldestFirst,
|
||||||
|
enableCreditsMarkerGeneration:
|
||||||
|
GetSearchAllLibrariesEnableCreditsMarkerGeneration.LibraryDefault,
|
||||||
showOrdering: GetSearchAllLibrariesShowOrdering.TvdbDvd,
|
showOrdering: GetSearchAllLibrariesShowOrdering.TvdbDvd,
|
||||||
thumb: "/library/metadata/58683/thumb/1703239236",
|
thumb: "/library/metadata/58683/thumb/1703239236",
|
||||||
art: "/library/metadata/58683/art/1703239236",
|
art: "/library/metadata/58683/art/1703239236",
|
||||||
@@ -249,7 +254,9 @@ let value: GetSearchAllLibrariesMetadata = {
|
|||||||
| `year` | *number* | :heavy_minus_sign: | N/A | 2022 |
|
| `year` | *number* | :heavy_minus_sign: | N/A | 2022 |
|
||||||
| `seasonCount` | *number* | :heavy_minus_sign: | N/A | 2022 |
|
| `seasonCount` | *number* | :heavy_minus_sign: | N/A | 2022 |
|
||||||
| `tagline` | *string* | :heavy_minus_sign: | N/A | Return to Pandora. |
|
| `tagline` | *string* | :heavy_minus_sign: | N/A | Return to Pandora. |
|
||||||
| `flattenSeasons` | [operations.GetSearchAllLibrariesFlattenSeasons](../../../sdk/models/operations/getsearchalllibrariesflattenseasons.md) | :heavy_minus_sign: | N/A | 1 |
|
| `flattenSeasons` | [operations.GetSearchAllLibrariesFlattenSeasons](../../../sdk/models/operations/getsearchalllibrariesflattenseasons.md) | :heavy_minus_sign: | Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). | 1 |
|
||||||
|
| `episodeSort` | [operations.GetSearchAllLibrariesEpisodeSort](../../../sdk/models/operations/getsearchalllibrariesepisodesort.md) | :heavy_minus_sign: | Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). | 0 |
|
||||||
|
| `enableCreditsMarkerGeneration` | [operations.GetSearchAllLibrariesEnableCreditsMarkerGeneration](../../../sdk/models/operations/getsearchalllibrariesenablecreditsmarkergeneration.md) | :heavy_minus_sign: | Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). | -1 |
|
||||||
| `showOrdering` | [operations.GetSearchAllLibrariesShowOrdering](../../../sdk/models/operations/getsearchalllibrariesshowordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show<br/>None = Library default,<br/>tmdbAiring = The Movie Database (Aired),<br/>tvdbAiring = TheTVDB (Aired),<br/>tvdbDvd = TheTVDB (DVD),<br/>tvdbAbsolute = TheTVDB (Absolute)).<br/> | tvdbDvd |
|
| `showOrdering` | [operations.GetSearchAllLibrariesShowOrdering](../../../sdk/models/operations/getsearchalllibrariesshowordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show<br/>None = Library default,<br/>tmdbAiring = The Movie Database (Aired),<br/>tvdbAiring = TheTVDB (Aired),<br/>tvdbDvd = TheTVDB (DVD),<br/>tvdbAbsolute = TheTVDB (Absolute)).<br/> | tvdbDvd |
|
||||||
| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 |
|
| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 |
|
||||||
| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 |
|
| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 |
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import {
|
import {
|
||||||
|
GetSearchAllLibrariesEnableCreditsMarkerGeneration,
|
||||||
|
GetSearchAllLibrariesEpisodeSort,
|
||||||
GetSearchAllLibrariesFlattenSeasons,
|
GetSearchAllLibrariesFlattenSeasons,
|
||||||
GetSearchAllLibrariesHasThumbnail,
|
GetSearchAllLibrariesHasThumbnail,
|
||||||
GetSearchAllLibrariesLibraryType,
|
GetSearchAllLibrariesLibraryType,
|
||||||
@@ -22,7 +24,7 @@ let value: GetSearchAllLibrariesResponse = {
|
|||||||
}),
|
}),
|
||||||
object: {
|
object: {
|
||||||
mediaContainer: {
|
mediaContainer: {
|
||||||
size: 8558.03,
|
size: 8558.04,
|
||||||
searchResult: [
|
searchResult: [
|
||||||
{
|
{
|
||||||
score: 117.14,
|
score: 117.14,
|
||||||
@@ -46,7 +48,10 @@ let value: GetSearchAllLibrariesResponse = {
|
|||||||
year: 2022,
|
year: 2022,
|
||||||
seasonCount: 2022,
|
seasonCount: 2022,
|
||||||
tagline: "Return to Pandora.",
|
tagline: "Return to Pandora.",
|
||||||
flattenSeasons: GetSearchAllLibrariesFlattenSeasons.True,
|
flattenSeasons: GetSearchAllLibrariesFlattenSeasons.Show,
|
||||||
|
episodeSort: GetSearchAllLibrariesEpisodeSort.OldestFirst,
|
||||||
|
enableCreditsMarkerGeneration:
|
||||||
|
GetSearchAllLibrariesEnableCreditsMarkerGeneration.LibraryDefault,
|
||||||
showOrdering: GetSearchAllLibrariesShowOrdering.TvdbDvd,
|
showOrdering: GetSearchAllLibrariesShowOrdering.TvdbDvd,
|
||||||
thumb: "/library/metadata/58683/thumb/1703239236",
|
thumb: "/library/metadata/58683/thumb/1703239236",
|
||||||
art: "/library/metadata/58683/art/1703239236",
|
art: "/library/metadata/58683/art/1703239236",
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ The libraries available on the Server
|
|||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import {
|
import {
|
||||||
|
GetSearchAllLibrariesEnableCreditsMarkerGeneration,
|
||||||
|
GetSearchAllLibrariesEpisodeSort,
|
||||||
GetSearchAllLibrariesFlattenSeasons,
|
GetSearchAllLibrariesFlattenSeasons,
|
||||||
GetSearchAllLibrariesHasThumbnail,
|
GetSearchAllLibrariesHasThumbnail,
|
||||||
GetSearchAllLibrariesLibraryType,
|
GetSearchAllLibrariesLibraryType,
|
||||||
@@ -42,7 +44,10 @@ let value: GetSearchAllLibrariesResponseBody = {
|
|||||||
year: 2022,
|
year: 2022,
|
||||||
seasonCount: 2022,
|
seasonCount: 2022,
|
||||||
tagline: "Return to Pandora.",
|
tagline: "Return to Pandora.",
|
||||||
flattenSeasons: GetSearchAllLibrariesFlattenSeasons.True,
|
flattenSeasons: GetSearchAllLibrariesFlattenSeasons.Show,
|
||||||
|
episodeSort: GetSearchAllLibrariesEpisodeSort.OldestFirst,
|
||||||
|
enableCreditsMarkerGeneration:
|
||||||
|
GetSearchAllLibrariesEnableCreditsMarkerGeneration.LibraryDefault,
|
||||||
showOrdering: GetSearchAllLibrariesShowOrdering.TvdbDvd,
|
showOrdering: GetSearchAllLibrariesShowOrdering.TvdbDvd,
|
||||||
thumb: "/library/metadata/58683/thumb/1703239236",
|
thumb: "/library/metadata/58683/thumb/1703239236",
|
||||||
art: "/library/metadata/58683/art/1703239236",
|
art: "/library/metadata/58683/art/1703239236",
|
||||||
|
|||||||
@@ -18,12 +18,8 @@ let value: GetUserFriendsResponse = {
|
|||||||
home: true,
|
home: true,
|
||||||
id: 0,
|
id: 0,
|
||||||
restricted: false,
|
restricted: false,
|
||||||
sharedServers: [
|
sharedServers: [],
|
||||||
{},
|
sharedSources: [],
|
||||||
],
|
|
||||||
sharedSources: [
|
|
||||||
{},
|
|
||||||
],
|
|
||||||
status: Status.Accepted,
|
status: Status.Accepted,
|
||||||
thumb: "https://plex.tv/users/7d1916e0d8f6e76b/avatar?c=1694481578",
|
thumb: "https://plex.tv/users/7d1916e0d8f6e76b/avatar?c=1694481578",
|
||||||
title: "username123",
|
title: "username123",
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import {
|
import {
|
||||||
|
GetSearchAllLibrariesEnableCreditsMarkerGeneration,
|
||||||
|
GetSearchAllLibrariesEpisodeSort,
|
||||||
GetSearchAllLibrariesFlattenSeasons,
|
GetSearchAllLibrariesFlattenSeasons,
|
||||||
GetSearchAllLibrariesHasThumbnail,
|
GetSearchAllLibrariesHasThumbnail,
|
||||||
GetSearchAllLibrariesLibraryType,
|
GetSearchAllLibrariesLibraryType,
|
||||||
@@ -36,7 +38,10 @@ let value: SearchResult = {
|
|||||||
year: 2022,
|
year: 2022,
|
||||||
seasonCount: 2022,
|
seasonCount: 2022,
|
||||||
tagline: "Return to Pandora.",
|
tagline: "Return to Pandora.",
|
||||||
flattenSeasons: GetSearchAllLibrariesFlattenSeasons.True,
|
flattenSeasons: GetSearchAllLibrariesFlattenSeasons.Show,
|
||||||
|
episodeSort: GetSearchAllLibrariesEpisodeSort.OldestFirst,
|
||||||
|
enableCreditsMarkerGeneration:
|
||||||
|
GetSearchAllLibrariesEnableCreditsMarkerGeneration.LibraryDefault,
|
||||||
showOrdering: GetSearchAllLibrariesShowOrdering.TvdbDvd,
|
showOrdering: GetSearchAllLibrariesShowOrdering.TvdbDvd,
|
||||||
thumb: "/library/metadata/58683/thumb/1703239236",
|
thumb: "/library/metadata/58683/thumb/1703239236",
|
||||||
art: "/library/metadata/58683/art/1703239236",
|
art: "/library/metadata/58683/art/1703239236",
|
||||||
|
|||||||
@@ -262,6 +262,7 @@ async function run() {
|
|||||||
requestBody: {
|
requestBody: {
|
||||||
login: "username@email.com",
|
login: "username@email.com",
|
||||||
password: "password123",
|
password: "password123",
|
||||||
|
rememberMe: false,
|
||||||
verificationCode: "123456",
|
verificationCode: "123456",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -295,6 +296,7 @@ async function run() {
|
|||||||
requestBody: {
|
requestBody: {
|
||||||
login: "username@email.com",
|
login: "username@email.com",
|
||||||
password: "password123",
|
password: "password123",
|
||||||
|
rememberMe: false,
|
||||||
verificationCode: "123456",
|
verificationCode: "123456",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -342,13 +342,14 @@ Each type in the library comes with a set of filters and sorts, aiding in buildi
|
|||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { PlexAPI } from "@lukehagar/plexjs";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
import { IncludeDetails } from "@lukehagar/plexjs/sdk/models/operations";
|
||||||
|
|
||||||
const plexAPI = new PlexAPI({
|
const plexAPI = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const result = await plexAPI.library.getLibraryDetails(9518);
|
const result = await plexAPI.library.getLibraryDetails(9518, IncludeDetails.Zero);
|
||||||
|
|
||||||
// Handle the result
|
// Handle the result
|
||||||
console.log(result);
|
console.log(result);
|
||||||
@@ -364,6 +365,7 @@ The standalone function version of this method:
|
|||||||
```typescript
|
```typescript
|
||||||
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||||
import { libraryGetLibraryDetails } from "@lukehagar/plexjs/funcs/libraryGetLibraryDetails.js";
|
import { libraryGetLibraryDetails } from "@lukehagar/plexjs/funcs/libraryGetLibraryDetails.js";
|
||||||
|
import { IncludeDetails } from "@lukehagar/plexjs/sdk/models/operations";
|
||||||
|
|
||||||
// Use `PlexAPICore` for best tree-shaking performance.
|
// Use `PlexAPICore` for best tree-shaking performance.
|
||||||
// You can create one instance of it to use across an application.
|
// You can create one instance of it to use across an application.
|
||||||
@@ -372,7 +374,7 @@ const plexAPI = new PlexAPICore({
|
|||||||
});
|
});
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const res = await libraryGetLibraryDetails(plexAPI, 9518);
|
const res = await libraryGetLibraryDetails(plexAPI, 9518, IncludeDetails.Zero);
|
||||||
|
|
||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
throw res.error;
|
throw res.error;
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ async function run() {
|
|||||||
title: "<value>",
|
title: "<value>",
|
||||||
type: CreatePlaylistQueryParamType.Photo,
|
type: CreatePlaylistQueryParamType.Photo,
|
||||||
smart: Smart.One,
|
smart: Smart.One,
|
||||||
uri: "https://inborn-brochure.biz",
|
uri: "https://hoarse-testing.info/",
|
||||||
});
|
});
|
||||||
|
|
||||||
// Handle the result
|
// Handle the result
|
||||||
@@ -73,7 +73,7 @@ async function run() {
|
|||||||
title: "<value>",
|
title: "<value>",
|
||||||
type: CreatePlaylistQueryParamType.Photo,
|
type: CreatePlaylistQueryParamType.Photo,
|
||||||
smart: Smart.One,
|
smart: Smart.One,
|
||||||
uri: "https://inborn-brochure.biz",
|
uri: "https://hoarse-testing.info/",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
|
|||||||
@@ -400,6 +400,7 @@ const plexAPI = new PlexAPI();
|
|||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const result = await plexAPI.plex.getPin({
|
const result = await plexAPI.plex.getPin({
|
||||||
|
strong: false,
|
||||||
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
|
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
|
||||||
clientName: "Plex for Roku",
|
clientName: "Plex for Roku",
|
||||||
deviceNickname: "Roku 3",
|
deviceNickname: "Roku 3",
|
||||||
@@ -428,6 +429,7 @@ const plexAPI = new PlexAPICore();
|
|||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const res = await plexGetPin(plexAPI, {
|
const res = await plexGetPin(plexAPI, {
|
||||||
|
strong: false,
|
||||||
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
|
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
|
||||||
clientName: "Plex for Roku",
|
clientName: "Plex for Roku",
|
||||||
deviceNickname: "Roku 3",
|
deviceNickname: "Roku 3",
|
||||||
|
|||||||
2
jsr.json
2
jsr.json
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"name": "@lukehagar/plexjs",
|
"name": "@lukehagar/plexjs",
|
||||||
"version": "0.32.1",
|
"version": "0.32.2",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts",
|
".": "./src/index.ts",
|
||||||
"./sdk/models/errors": "./src/sdk/models/errors/index.ts",
|
"./sdk/models/errors": "./src/sdk/models/errors/index.ts",
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@lukehagar/plexjs",
|
"name": "@lukehagar/plexjs",
|
||||||
"version": "0.32.1",
|
"version": "0.32.2",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@lukehagar/plexjs",
|
"name": "@lukehagar/plexjs",
|
||||||
"version": "0.32.1",
|
"version": "0.32.2",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@typescript-eslint/eslint-plugin": "^7.7.1",
|
"@typescript-eslint/eslint-plugin": "^7.7.1",
|
||||||
"@typescript-eslint/parser": "^7.7.1",
|
"@typescript-eslint/parser": "^7.7.1",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@lukehagar/plexjs",
|
"name": "@lukehagar/plexjs",
|
||||||
"version": "0.32.1",
|
"version": "0.32.2",
|
||||||
"author": "LukeHagar",
|
"author": "LukeHagar",
|
||||||
"main": "./index.js",
|
"main": "./index.js",
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeSimple } from "../lib/encodings.js";
|
import { encodeSimple } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -71,9 +72,9 @@ export async function activitiesCancelServerActivities(
|
|||||||
|
|
||||||
const path = pathToFunc("/activities/{activityUUID}")(pathParams);
|
const path = pathToFunc("/activities/{activityUUID}")(pathParams);
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -140,7 +141,8 @@ export async function activitiesCancelServerActivities(
|
|||||||
M.nil(200, operations.CancelServerActivitiesResponse$inboundSchema),
|
M.nil(200, operations.CancelServerActivitiesResponse$inboundSchema),
|
||||||
M.jsonErr(400, errors.CancelServerActivitiesBadRequest$inboundSchema),
|
M.jsonErr(400, errors.CancelServerActivitiesBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.CancelServerActivitiesUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.CancelServerActivitiesUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
import { pathToFunc } from "../lib/url.js";
|
import { pathToFunc } from "../lib/url.js";
|
||||||
@@ -45,9 +46,9 @@ export async function activitiesGetServerActivities(
|
|||||||
> {
|
> {
|
||||||
const path = pathToFunc("/activities")();
|
const path = pathToFunc("/activities")();
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -115,7 +116,8 @@ export async function activitiesGetServerActivities(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetServerActivitiesBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetServerActivitiesBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetServerActivitiesUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetServerActivitiesUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery } from "../lib/encodings.js";
|
import { encodeFormQuery } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -71,9 +72,9 @@ export async function authenticationGetSourceConnectionInformation(
|
|||||||
"source": payload.source,
|
"source": payload.source,
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -147,7 +148,8 @@ export async function authenticationGetSourceConnectionInformation(
|
|||||||
401,
|
401,
|
||||||
errors.GetSourceConnectionInformationUnauthorized$inboundSchema,
|
errors.GetSourceConnectionInformationUnauthorized$inboundSchema,
|
||||||
),
|
),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
import { pathToFunc } from "../lib/url.js";
|
import { pathToFunc } from "../lib/url.js";
|
||||||
@@ -49,9 +50,9 @@ export async function authenticationGetTokenDetails(
|
|||||||
|
|
||||||
const path = pathToFunc("/user")();
|
const path = pathToFunc("/user")();
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -119,7 +120,8 @@ export async function authenticationGetTokenDetails(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetTokenDetailsBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetTokenDetailsBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetTokenDetailsUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetTokenDetailsUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery } from "../lib/encodings.js";
|
import { encodeFormQuery } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -70,9 +71,9 @@ export async function authenticationGetTransientToken(
|
|||||||
"type": payload.type,
|
"type": payload.type,
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -140,7 +141,8 @@ export async function authenticationGetTransientToken(
|
|||||||
M.nil(200, operations.GetTransientTokenResponse$inboundSchema),
|
M.nil(200, operations.GetTransientTokenResponse$inboundSchema),
|
||||||
M.jsonErr(400, errors.GetTransientTokenBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetTransientTokenBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetTransientTokenUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetTransientTokenUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeBodyForm, encodeSimple } from "../lib/encodings.js";
|
import { encodeBodyForm, encodeSimple } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { pathToFunc } from "../lib/url.js";
|
import { pathToFunc } from "../lib/url.js";
|
||||||
@@ -68,7 +69,7 @@ export async function authenticationPostUsersSignInData(
|
|||||||
|
|
||||||
const path = pathToFunc("/users/signin")();
|
const path = pathToFunc("/users/signin")();
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
"Content-Type": "application/x-www-form-urlencoded",
|
"Content-Type": "application/x-www-form-urlencoded",
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
"X-Plex-Client-Identifier": encodeSimple(
|
"X-Plex-Client-Identifier": encodeSimple(
|
||||||
@@ -92,7 +93,7 @@ export async function authenticationPostUsersSignInData(
|
|||||||
explode: false,
|
explode: false,
|
||||||
charEncoding: "none",
|
charEncoding: "none",
|
||||||
}),
|
}),
|
||||||
});
|
}));
|
||||||
|
|
||||||
const context = {
|
const context = {
|
||||||
operationID: "post-users-sign-in-data",
|
operationID: "post-users-sign-in-data",
|
||||||
@@ -156,7 +157,8 @@ export async function authenticationPostUsersSignInData(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.PostUsersSignInDataBadRequest$inboundSchema),
|
M.jsonErr(400, errors.PostUsersSignInDataBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.PostUsersSignInDataUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.PostUsersSignInDataUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
import { pathToFunc } from "../lib/url.js";
|
import { pathToFunc } from "../lib/url.js";
|
||||||
@@ -45,9 +46,9 @@ export async function butlerGetButlerTasks(
|
|||||||
> {
|
> {
|
||||||
const path = pathToFunc("/butler")();
|
const path = pathToFunc("/butler")();
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -115,7 +116,8 @@ export async function butlerGetButlerTasks(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetButlerTasksBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetButlerTasksBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetButlerTasksUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetButlerTasksUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
import { pathToFunc } from "../lib/url.js";
|
import { pathToFunc } from "../lib/url.js";
|
||||||
@@ -49,9 +50,9 @@ export async function butlerStartAllTasks(
|
|||||||
> {
|
> {
|
||||||
const path = pathToFunc("/butler")();
|
const path = pathToFunc("/butler")();
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -117,7 +118,8 @@ export async function butlerStartAllTasks(
|
|||||||
M.nil(200, operations.StartAllTasksResponse$inboundSchema),
|
M.nil(200, operations.StartAllTasksResponse$inboundSchema),
|
||||||
M.jsonErr(400, errors.StartAllTasksBadRequest$inboundSchema),
|
M.jsonErr(400, errors.StartAllTasksBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.StartAllTasksUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.StartAllTasksUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeSimple } from "../lib/encodings.js";
|
import { encodeSimple } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -74,9 +75,9 @@ export async function butlerStartTask(
|
|||||||
|
|
||||||
const path = pathToFunc("/butler/{taskName}")(pathParams);
|
const path = pathToFunc("/butler/{taskName}")(pathParams);
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -143,7 +144,8 @@ export async function butlerStartTask(
|
|||||||
M.nil([200, 202], operations.StartTaskResponse$inboundSchema),
|
M.nil([200, 202], operations.StartTaskResponse$inboundSchema),
|
||||||
M.jsonErr(400, errors.StartTaskBadRequest$inboundSchema),
|
M.jsonErr(400, errors.StartTaskBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.StartTaskUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.StartTaskUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
import { pathToFunc } from "../lib/url.js";
|
import { pathToFunc } from "../lib/url.js";
|
||||||
@@ -45,9 +46,9 @@ export async function butlerStopAllTasks(
|
|||||||
> {
|
> {
|
||||||
const path = pathToFunc("/butler")();
|
const path = pathToFunc("/butler")();
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -113,7 +114,8 @@ export async function butlerStopAllTasks(
|
|||||||
M.nil(200, operations.StopAllTasksResponse$inboundSchema),
|
M.nil(200, operations.StopAllTasksResponse$inboundSchema),
|
||||||
M.jsonErr(400, errors.StopAllTasksBadRequest$inboundSchema),
|
M.jsonErr(400, errors.StopAllTasksBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.StopAllTasksUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.StopAllTasksUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeSimple } from "../lib/encodings.js";
|
import { encodeSimple } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -70,9 +71,9 @@ export async function butlerStopTask(
|
|||||||
|
|
||||||
const path = pathToFunc("/butler/{taskName}")(pathParams);
|
const path = pathToFunc("/butler/{taskName}")(pathParams);
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -139,7 +140,8 @@ export async function butlerStopTask(
|
|||||||
M.nil(200, operations.StopTaskResponse$inboundSchema),
|
M.nil(200, operations.StopTaskResponse$inboundSchema),
|
||||||
M.jsonErr(400, errors.StopTaskBadRequest$inboundSchema),
|
M.jsonErr(400, errors.StopTaskBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.StopTaskUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.StopTaskUnauthorized$inboundSchema),
|
||||||
M.fail([404, "4XX", "5XX"]),
|
M.fail([404, "4XX"]),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery } from "../lib/encodings.js";
|
import { encodeFormQuery } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -70,9 +71,9 @@ export async function hubsGetGlobalHubs(
|
|||||||
"onlyTransient": payload.onlyTransient,
|
"onlyTransient": payload.onlyTransient,
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -142,7 +143,8 @@ export async function hubsGetGlobalHubs(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetGlobalHubsBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetGlobalHubsBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetGlobalHubsUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetGlobalHubsUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -79,9 +80,9 @@ export async function hubsGetLibraryHubs(
|
|||||||
"onlyTransient": payload.onlyTransient,
|
"onlyTransient": payload.onlyTransient,
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -151,7 +152,8 @@ export async function hubsGetLibraryHubs(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetLibraryHubsBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetLibraryHubsBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetLibraryHubsUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetLibraryHubsUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery } from "../lib/encodings.js";
|
import { encodeFormQuery } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -66,9 +67,9 @@ export async function hubsGetRecentlyAdded(
|
|||||||
"X-Plex-Container-Start": payload["X-Plex-Container-Start"],
|
"X-Plex-Container-Start": payload["X-Plex-Container-Start"],
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -134,7 +135,8 @@ export async function hubsGetRecentlyAdded(
|
|||||||
M.json(200, operations.GetRecentlyAddedResponse$inboundSchema, {
|
M.json(200, operations.GetRecentlyAddedResponse$inboundSchema, {
|
||||||
key: "object",
|
key: "object",
|
||||||
}),
|
}),
|
||||||
M.fail([400, 401, "4XX", "5XX"]),
|
M.fail([400, 401, "4XX"]),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeSimple } from "../lib/encodings.js";
|
import { encodeSimple } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -70,9 +71,9 @@ export async function libraryDeleteLibrary(
|
|||||||
|
|
||||||
const path = pathToFunc("/library/sections/{sectionKey}")(pathParams);
|
const path = pathToFunc("/library/sections/{sectionKey}")(pathParams);
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -139,7 +140,8 @@ export async function libraryDeleteLibrary(
|
|||||||
M.nil(200, operations.DeleteLibraryResponse$inboundSchema),
|
M.nil(200, operations.DeleteLibraryResponse$inboundSchema),
|
||||||
M.jsonErr(400, errors.DeleteLibraryBadRequest$inboundSchema),
|
M.jsonErr(400, errors.DeleteLibraryBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.DeleteLibraryUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.DeleteLibraryUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
import { pathToFunc } from "../lib/url.js";
|
import { pathToFunc } from "../lib/url.js";
|
||||||
@@ -50,9 +51,9 @@ export async function libraryGetAllLibraries(
|
|||||||
> {
|
> {
|
||||||
const path = pathToFunc("/library/sections")();
|
const path = pathToFunc("/library/sections")();
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -120,7 +121,8 @@ export async function libraryGetAllLibraries(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetAllLibrariesBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetAllLibrariesBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetAllLibrariesUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetAllLibrariesUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery } from "../lib/encodings.js";
|
import { encodeFormQuery } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -70,9 +71,9 @@ export async function libraryGetFileHash(
|
|||||||
"url": payload.url,
|
"url": payload.url,
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -140,7 +141,8 @@ export async function libraryGetFileHash(
|
|||||||
M.nil(200, operations.GetFileHashResponse$inboundSchema),
|
M.nil(200, operations.GetFileHashResponse$inboundSchema),
|
||||||
M.jsonErr(400, errors.GetFileHashBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetFileHashBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetFileHashUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetFileHashUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -114,9 +115,9 @@ export async function libraryGetLibraryDetails(
|
|||||||
"includeDetails": payload.includeDetails,
|
"includeDetails": payload.includeDetails,
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -186,7 +187,8 @@ export async function libraryGetLibraryDetails(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetLibraryDetailsBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetLibraryDetailsBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetLibraryDetailsUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetLibraryDetailsUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -98,9 +99,9 @@ export async function libraryGetLibraryItems(
|
|||||||
"X-Plex-Container-Start": payload["X-Plex-Container-Start"],
|
"X-Plex-Container-Start": payload["X-Plex-Container-Start"],
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -170,7 +171,8 @@ export async function libraryGetLibraryItems(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetLibraryItemsBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetLibraryItemsBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetLibraryItemsUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetLibraryItemsUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeSimple } from "../lib/encodings.js";
|
import { encodeSimple } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -71,9 +72,9 @@ export async function libraryGetMetaDataByRatingKey(
|
|||||||
|
|
||||||
const path = pathToFunc("/library/metadata/{ratingKey}")(pathParams);
|
const path = pathToFunc("/library/metadata/{ratingKey}")(pathParams);
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -142,7 +143,8 @@ export async function libraryGetMetaDataByRatingKey(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetMetaDataByRatingKeyBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetMetaDataByRatingKeyBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetMetaDataByRatingKeyUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetMetaDataByRatingKeyUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -77,9 +78,9 @@ export async function libraryGetMetadataChildren(
|
|||||||
"includeElements": payload.includeElements,
|
"includeElements": payload.includeElements,
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -149,7 +150,8 @@ export async function libraryGetMetadataChildren(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetMetadataChildrenBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetMetadataChildrenBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetMetadataChildrenUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetMetadataChildrenUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
import { pathToFunc } from "../lib/url.js";
|
import { pathToFunc } from "../lib/url.js";
|
||||||
@@ -45,9 +46,9 @@ export async function libraryGetOnDeck(
|
|||||||
> {
|
> {
|
||||||
const path = pathToFunc("/library/onDeck")();
|
const path = pathToFunc("/library/onDeck")();
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -113,7 +114,8 @@ export async function libraryGetOnDeck(
|
|||||||
M.json(200, operations.GetOnDeckResponse$inboundSchema, { key: "object" }),
|
M.json(200, operations.GetOnDeckResponse$inboundSchema, { key: "object" }),
|
||||||
M.jsonErr(400, errors.GetOnDeckBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetOnDeckBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetOnDeckUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetOnDeckUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery } from "../lib/encodings.js";
|
import { encodeFormQuery } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -70,9 +71,9 @@ export async function libraryGetRecentlyAddedLibrary(
|
|||||||
"X-Plex-Container-Start": payload["X-Plex-Container-Start"],
|
"X-Plex-Container-Start": payload["X-Plex-Container-Start"],
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -142,7 +143,8 @@ export async function libraryGetRecentlyAddedLibrary(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetRecentlyAddedLibraryBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetRecentlyAddedLibraryBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetRecentlyAddedLibraryUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetRecentlyAddedLibraryUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -77,9 +78,9 @@ export async function libraryGetRefreshLibraryMetadata(
|
|||||||
"force": payload.force,
|
"force": payload.force,
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -147,7 +148,8 @@ export async function libraryGetRefreshLibraryMetadata(
|
|||||||
M.nil(200, operations.GetRefreshLibraryMetadataResponse$inboundSchema),
|
M.nil(200, operations.GetRefreshLibraryMetadataResponse$inboundSchema),
|
||||||
M.jsonErr(400, errors.GetRefreshLibraryMetadataBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetRefreshLibraryMetadataBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetRefreshLibraryMetadataUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetRefreshLibraryMetadataUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery, encodeSimple, queryJoin } from "../lib/encodings.js";
|
import { encodeFormQuery, encodeSimple, queryJoin } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -72,14 +73,14 @@ export async function libraryGetSearchAllLibraries(
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
"X-Plex-Client-Identifier": encodeSimple(
|
"X-Plex-Client-Identifier": encodeSimple(
|
||||||
"X-Plex-Client-Identifier",
|
"X-Plex-Client-Identifier",
|
||||||
payload.ClientID,
|
payload.ClientID,
|
||||||
{ explode: false, charEncoding: "none" },
|
{ explode: false, charEncoding: "none" },
|
||||||
),
|
),
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -149,7 +150,8 @@ export async function libraryGetSearchAllLibraries(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetSearchAllLibrariesBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetSearchAllLibrariesBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetSearchAllLibrariesUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetSearchAllLibrariesUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -93,9 +94,9 @@ export async function libraryGetSearchLibrary(
|
|||||||
"type": payload.type,
|
"type": payload.type,
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -165,7 +166,8 @@ export async function libraryGetSearchLibrary(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetSearchLibraryBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetSearchLibraryBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetSearchLibraryUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetSearchLibraryUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery } from "../lib/encodings.js";
|
import { encodeFormQuery } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -71,9 +72,9 @@ export async function libraryGetTopWatchedContent(
|
|||||||
"type": payload.type,
|
"type": payload.type,
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -143,7 +144,8 @@ export async function libraryGetTopWatchedContent(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetTopWatchedContentBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetTopWatchedContentBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetTopWatchedContentUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetTopWatchedContentUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
import { pathToFunc } from "../lib/url.js";
|
import { pathToFunc } from "../lib/url.js";
|
||||||
@@ -45,9 +46,9 @@ export async function logEnablePaperTrail(
|
|||||||
> {
|
> {
|
||||||
const path = pathToFunc("/log/networked")();
|
const path = pathToFunc("/log/networked")();
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -113,7 +114,8 @@ export async function logEnablePaperTrail(
|
|||||||
M.nil(200, operations.EnablePaperTrailResponse$inboundSchema),
|
M.nil(200, operations.EnablePaperTrailResponse$inboundSchema),
|
||||||
M.jsonErr(400, errors.EnablePaperTrailBadRequest$inboundSchema),
|
M.jsonErr(400, errors.EnablePaperTrailBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.EnablePaperTrailUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.EnablePaperTrailUnauthorized$inboundSchema),
|
||||||
M.fail([403, "4XX", "5XX"]),
|
M.fail([403, "4XX"]),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery } from "../lib/encodings.js";
|
import { encodeFormQuery } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -73,9 +74,9 @@ export async function logLogLine(
|
|||||||
"source": payload.source,
|
"source": payload.source,
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -143,7 +144,8 @@ export async function logLogLine(
|
|||||||
M.nil(200, operations.LogLineResponse$inboundSchema),
|
M.nil(200, operations.LogLineResponse$inboundSchema),
|
||||||
M.jsonErr(400, errors.LogLineBadRequest$inboundSchema),
|
M.jsonErr(400, errors.LogLineBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.LogLineUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.LogLineUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import * as z from "zod";
|
import * as z from "zod";
|
||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -79,10 +80,10 @@ export async function logLogMultiLine(
|
|||||||
|
|
||||||
const path = pathToFunc("/log")();
|
const path = pathToFunc("/log")();
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
"Content-Type": "text/plain",
|
"Content-Type": "text/plain",
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -149,7 +150,8 @@ export async function logLogMultiLine(
|
|||||||
M.nil(200, operations.LogMultiLineResponse$inboundSchema),
|
M.nil(200, operations.LogMultiLineResponse$inboundSchema),
|
||||||
M.jsonErr(400, errors.LogMultiLineBadRequest$inboundSchema),
|
M.jsonErr(400, errors.LogMultiLineBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.LogMultiLineUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.LogMultiLineUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -73,13 +74,13 @@ export async function mediaGetBannerImage(
|
|||||||
"width": payload.width,
|
"width": payload.width,
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "image/jpeg",
|
Accept: "image/jpeg",
|
||||||
"X-Plex-Token": encodeSimple("X-Plex-Token", payload["X-Plex-Token"], {
|
"X-Plex-Token": encodeSimple("X-Plex-Token", payload["X-Plex-Token"], {
|
||||||
explode: false,
|
explode: false,
|
||||||
charEncoding: "none",
|
charEncoding: "none",
|
||||||
}),
|
}),
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -151,7 +152,8 @@ export async function mediaGetBannerImage(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetBannerImageBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetBannerImageBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetBannerImageUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetBannerImageUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -73,13 +74,13 @@ export async function mediaGetThumbImage(
|
|||||||
"width": payload.width,
|
"width": payload.width,
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "image/jpeg",
|
Accept: "image/jpeg",
|
||||||
"X-Plex-Token": encodeSimple("X-Plex-Token", payload["X-Plex-Token"], {
|
"X-Plex-Token": encodeSimple("X-Plex-Token", payload["X-Plex-Token"], {
|
||||||
explode: false,
|
explode: false,
|
||||||
charEncoding: "none",
|
charEncoding: "none",
|
||||||
}),
|
}),
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -151,7 +152,8 @@ export async function mediaGetThumbImage(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetThumbImageBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetThumbImageBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetThumbImageUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetThumbImageUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery } from "../lib/encodings.js";
|
import { encodeFormQuery } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -67,9 +68,9 @@ export async function mediaMarkPlayed(
|
|||||||
"key": payload.key,
|
"key": payload.key,
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -137,7 +138,8 @@ export async function mediaMarkPlayed(
|
|||||||
M.nil(200, operations.MarkPlayedResponse$inboundSchema),
|
M.nil(200, operations.MarkPlayedResponse$inboundSchema),
|
||||||
M.jsonErr(400, errors.MarkPlayedBadRequest$inboundSchema),
|
M.jsonErr(400, errors.MarkPlayedBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.MarkPlayedUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.MarkPlayedUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery } from "../lib/encodings.js";
|
import { encodeFormQuery } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -67,9 +68,9 @@ export async function mediaMarkUnplayed(
|
|||||||
"key": payload.key,
|
"key": payload.key,
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -137,7 +138,8 @@ export async function mediaMarkUnplayed(
|
|||||||
M.nil(200, operations.MarkUnplayedResponse$inboundSchema),
|
M.nil(200, operations.MarkUnplayedResponse$inboundSchema),
|
||||||
M.jsonErr(400, errors.MarkUnplayedBadRequest$inboundSchema),
|
M.jsonErr(400, errors.MarkUnplayedBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.MarkUnplayedUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.MarkUnplayedUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery } from "../lib/encodings.js";
|
import { encodeFormQuery } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -73,9 +74,9 @@ export async function mediaUpdatePlayProgress(
|
|||||||
"time": payload.time,
|
"time": payload.time,
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -143,7 +144,8 @@ export async function mediaUpdatePlayProgress(
|
|||||||
M.nil(200, operations.UpdatePlayProgressResponse$inboundSchema),
|
M.nil(200, operations.UpdatePlayProgressResponse$inboundSchema),
|
||||||
M.jsonErr(400, errors.UpdatePlayProgressBadRequest$inboundSchema),
|
M.jsonErr(400, errors.UpdatePlayProgressBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.UpdatePlayProgressUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.UpdatePlayProgressUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -81,9 +82,9 @@ export async function playlistsAddPlaylistContents(
|
|||||||
"uri": payload.uri,
|
"uri": payload.uri,
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -153,7 +154,8 @@ export async function playlistsAddPlaylistContents(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.AddPlaylistContentsBadRequest$inboundSchema),
|
M.jsonErr(400, errors.AddPlaylistContentsBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.AddPlaylistContentsUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.AddPlaylistContentsUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeSimple } from "../lib/encodings.js";
|
import { encodeSimple } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -71,9 +72,9 @@ export async function playlistsClearPlaylistContents(
|
|||||||
|
|
||||||
const path = pathToFunc("/playlists/{playlistID}/items")(pathParams);
|
const path = pathToFunc("/playlists/{playlistID}/items")(pathParams);
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -140,7 +141,8 @@ export async function playlistsClearPlaylistContents(
|
|||||||
M.nil(200, operations.ClearPlaylistContentsResponse$inboundSchema),
|
M.nil(200, operations.ClearPlaylistContentsResponse$inboundSchema),
|
||||||
M.jsonErr(400, errors.ClearPlaylistContentsBadRequest$inboundSchema),
|
M.jsonErr(400, errors.ClearPlaylistContentsBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.ClearPlaylistContentsUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.ClearPlaylistContentsUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery } from "../lib/encodings.js";
|
import { encodeFormQuery } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -69,9 +70,9 @@ export async function playlistsCreatePlaylist(
|
|||||||
"uri": payload.uri,
|
"uri": payload.uri,
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -141,7 +142,8 @@ export async function playlistsCreatePlaylist(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.CreatePlaylistBadRequest$inboundSchema),
|
M.jsonErr(400, errors.CreatePlaylistBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.CreatePlaylistUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.CreatePlaylistUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeSimple } from "../lib/encodings.js";
|
import { encodeSimple } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -70,9 +71,9 @@ export async function playlistsDeletePlaylist(
|
|||||||
|
|
||||||
const path = pathToFunc("/playlists/{playlistID}")(pathParams);
|
const path = pathToFunc("/playlists/{playlistID}")(pathParams);
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -139,7 +140,8 @@ export async function playlistsDeletePlaylist(
|
|||||||
M.nil(204, operations.DeletePlaylistResponse$inboundSchema),
|
M.nil(204, operations.DeletePlaylistResponse$inboundSchema),
|
||||||
M.jsonErr(400, errors.DeletePlaylistBadRequest$inboundSchema),
|
M.jsonErr(400, errors.DeletePlaylistBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.DeletePlaylistUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.DeletePlaylistUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeSimple } from "../lib/encodings.js";
|
import { encodeSimple } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -71,9 +72,9 @@ export async function playlistsGetPlaylist(
|
|||||||
|
|
||||||
const path = pathToFunc("/playlists/{playlistID}")(pathParams);
|
const path = pathToFunc("/playlists/{playlistID}")(pathParams);
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -142,7 +143,8 @@ export async function playlistsGetPlaylist(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetPlaylistBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetPlaylistBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetPlaylistUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetPlaylistUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -80,9 +81,9 @@ export async function playlistsGetPlaylistContents(
|
|||||||
"type": payload.type,
|
"type": payload.type,
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -152,7 +153,8 @@ export async function playlistsGetPlaylistContents(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetPlaylistContentsBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetPlaylistContentsBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetPlaylistContentsUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetPlaylistContentsUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery } from "../lib/encodings.js";
|
import { encodeFormQuery } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -70,9 +71,9 @@ export async function playlistsGetPlaylists(
|
|||||||
"smart": payload.smart,
|
"smart": payload.smart,
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -142,7 +143,8 @@ export async function playlistsGetPlaylists(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetPlaylistsBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetPlaylistsBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetPlaylistsUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetPlaylistsUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -79,9 +80,9 @@ export async function playlistsUpdatePlaylist(
|
|||||||
"title": payload.title,
|
"title": payload.title,
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -149,7 +150,8 @@ export async function playlistsUpdatePlaylist(
|
|||||||
M.nil(200, operations.UpdatePlaylistResponse$inboundSchema),
|
M.nil(200, operations.UpdatePlaylistResponse$inboundSchema),
|
||||||
M.jsonErr(400, errors.UpdatePlaylistBadRequest$inboundSchema),
|
M.jsonErr(400, errors.UpdatePlaylistBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.UpdatePlaylistUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.UpdatePlaylistUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery } from "../lib/encodings.js";
|
import { encodeFormQuery } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -73,9 +74,9 @@ export async function playlistsUploadPlaylist(
|
|||||||
"sectionID": payload.sectionID,
|
"sectionID": payload.sectionID,
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -143,7 +144,8 @@ export async function playlistsUploadPlaylist(
|
|||||||
M.nil(200, operations.UploadPlaylistResponse$inboundSchema),
|
M.nil(200, operations.UploadPlaylistResponse$inboundSchema),
|
||||||
M.jsonErr(400, errors.UploadPlaylistBadRequest$inboundSchema),
|
M.jsonErr(400, errors.UploadPlaylistBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.UploadPlaylistUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.UploadPlaylistUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
import { pathToFunc } from "../lib/url.js";
|
import { pathToFunc } from "../lib/url.js";
|
||||||
@@ -51,9 +52,9 @@ export async function plexGetCompanionsData(
|
|||||||
|
|
||||||
const path = pathToFunc("/companions")();
|
const path = pathToFunc("/companions")();
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -121,7 +122,8 @@ export async function plexGetCompanionsData(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetCompanionsDataBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetCompanionsDataBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetCompanionsDataUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetCompanionsDataUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { pathToFunc } from "../lib/url.js";
|
import { pathToFunc } from "../lib/url.js";
|
||||||
import {
|
import {
|
||||||
@@ -48,9 +49,9 @@ export async function plexGetGeoData(
|
|||||||
|
|
||||||
const path = pathToFunc("/geoip")();
|
const path = pathToFunc("/geoip")();
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const context = {
|
const context = {
|
||||||
operationID: "getGeoData",
|
operationID: "getGeoData",
|
||||||
@@ -113,7 +114,8 @@ export async function plexGetGeoData(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetGeoDataBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetGeoDataBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetGeoDataUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetGeoDataUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
import { pathToFunc } from "../lib/url.js";
|
import { pathToFunc } from "../lib/url.js";
|
||||||
@@ -45,9 +46,9 @@ export async function plexGetHomeData(
|
|||||||
> {
|
> {
|
||||||
const path = pathToFunc("/home")();
|
const path = pathToFunc("/home")();
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -115,7 +116,8 @@ export async function plexGetHomeData(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetHomeDataBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetHomeDataBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetHomeDataUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetHomeDataUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { pathToFunc } from "../lib/url.js";
|
import { pathToFunc } from "../lib/url.js";
|
||||||
@@ -65,7 +66,7 @@ export async function plexGetPin(
|
|||||||
"strong": payload.strong,
|
"strong": payload.strong,
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
"X-Plex-Client-Identifier": encodeSimple(
|
"X-Plex-Client-Identifier": encodeSimple(
|
||||||
"X-Plex-Client-Identifier",
|
"X-Plex-Client-Identifier",
|
||||||
@@ -88,7 +89,7 @@ export async function plexGetPin(
|
|||||||
explode: false,
|
explode: false,
|
||||||
charEncoding: "none",
|
charEncoding: "none",
|
||||||
}),
|
}),
|
||||||
});
|
}));
|
||||||
|
|
||||||
const context = {
|
const context = {
|
||||||
operationID: "getPin",
|
operationID: "getPin",
|
||||||
@@ -151,7 +152,8 @@ export async function plexGetPin(
|
|||||||
key: "AuthPinContainer",
|
key: "AuthPinContainer",
|
||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetPinBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetPinBadRequest$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -81,14 +82,14 @@ export async function plexGetServerResources(
|
|||||||
"includeRelay": payload.includeRelay,
|
"includeRelay": payload.includeRelay,
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
"X-Plex-Client-Identifier": encodeSimple(
|
"X-Plex-Client-Identifier": encodeSimple(
|
||||||
"X-Plex-Client-Identifier",
|
"X-Plex-Client-Identifier",
|
||||||
payload.ClientID,
|
payload.ClientID,
|
||||||
{ explode: false, charEncoding: "none" },
|
{ explode: false, charEncoding: "none" },
|
||||||
),
|
),
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -158,7 +159,8 @@ export async function plexGetServerResources(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetServerResourcesBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetServerResourcesBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetServerResourcesUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetServerResourcesUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeSimple } from "../lib/encodings.js";
|
import { encodeSimple } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { pathToFunc } from "../lib/url.js";
|
import { pathToFunc } from "../lib/url.js";
|
||||||
@@ -69,7 +70,7 @@ export async function plexGetTokenByPinId(
|
|||||||
|
|
||||||
const path = pathToFunc("/pins/{pinID}")(pathParams);
|
const path = pathToFunc("/pins/{pinID}")(pathParams);
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
"X-Plex-Client-Identifier": encodeSimple(
|
"X-Plex-Client-Identifier": encodeSimple(
|
||||||
"X-Plex-Client-Identifier",
|
"X-Plex-Client-Identifier",
|
||||||
@@ -92,7 +93,7 @@ export async function plexGetTokenByPinId(
|
|||||||
explode: false,
|
explode: false,
|
||||||
charEncoding: "none",
|
charEncoding: "none",
|
||||||
}),
|
}),
|
||||||
});
|
}));
|
||||||
|
|
||||||
const context = {
|
const context = {
|
||||||
operationID: "getTokenByPinId",
|
operationID: "getTokenByPinId",
|
||||||
@@ -156,7 +157,8 @@ export async function plexGetTokenByPinId(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetTokenByPinIdBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetTokenByPinIdBadRequest$inboundSchema),
|
||||||
M.jsonErr(404, errors.GetTokenByPinIdResponseBody$inboundSchema),
|
M.jsonErr(404, errors.GetTokenByPinIdResponseBody$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
import { pathToFunc } from "../lib/url.js";
|
import { pathToFunc } from "../lib/url.js";
|
||||||
@@ -49,9 +50,9 @@ export async function plexGetUserFriends(
|
|||||||
|
|
||||||
const path = pathToFunc("/friends")();
|
const path = pathToFunc("/friends")();
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -119,7 +120,8 @@ export async function plexGetUserFriends(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetUserFriendsBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetUserFriendsBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetUserFriendsUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetUserFriendsUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery } from "../lib/encodings.js";
|
import { encodeFormQuery } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -67,9 +68,9 @@ export async function searchGetSearchResults(
|
|||||||
"query": payload.query,
|
"query": payload.query,
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -139,7 +140,8 @@ export async function searchGetSearchResults(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetSearchResultsBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetSearchResultsBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetSearchResultsUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetSearchResultsUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery } from "../lib/encodings.js";
|
import { encodeFormQuery } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -84,9 +85,9 @@ export async function searchPerformSearch(
|
|||||||
"sectionId": payload.sectionId,
|
"sectionId": payload.sectionId,
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -154,7 +155,8 @@ export async function searchPerformSearch(
|
|||||||
M.nil(200, operations.PerformSearchResponse$inboundSchema),
|
M.nil(200, operations.PerformSearchResponse$inboundSchema),
|
||||||
M.jsonErr(400, errors.PerformSearchBadRequest$inboundSchema),
|
M.jsonErr(400, errors.PerformSearchBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.PerformSearchUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.PerformSearchUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery } from "../lib/encodings.js";
|
import { encodeFormQuery } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -76,9 +77,9 @@ export async function searchPerformVoiceSearch(
|
|||||||
"sectionId": payload.sectionId,
|
"sectionId": payload.sectionId,
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -146,7 +147,8 @@ export async function searchPerformVoiceSearch(
|
|||||||
M.nil(200, operations.PerformVoiceSearchResponse$inboundSchema),
|
M.nil(200, operations.PerformVoiceSearchResponse$inboundSchema),
|
||||||
M.jsonErr(400, errors.PerformVoiceSearchBadRequest$inboundSchema),
|
M.jsonErr(400, errors.PerformVoiceSearchBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.PerformVoiceSearchUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.PerformVoiceSearchUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
import { pathToFunc } from "../lib/url.js";
|
import { pathToFunc } from "../lib/url.js";
|
||||||
@@ -45,9 +46,9 @@ export async function serverGetAvailableClients(
|
|||||||
> {
|
> {
|
||||||
const path = pathToFunc("/clients")();
|
const path = pathToFunc("/clients")();
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -115,7 +116,8 @@ export async function serverGetAvailableClients(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetAvailableClientsBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetAvailableClientsBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetAvailableClientsUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetAvailableClientsUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
import { pathToFunc } from "../lib/url.js";
|
import { pathToFunc } from "../lib/url.js";
|
||||||
@@ -45,9 +46,9 @@ export async function serverGetDevices(
|
|||||||
> {
|
> {
|
||||||
const path = pathToFunc("/devices")();
|
const path = pathToFunc("/devices")();
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -113,7 +114,8 @@ export async function serverGetDevices(
|
|||||||
M.json(200, operations.GetDevicesResponse$inboundSchema, { key: "object" }),
|
M.json(200, operations.GetDevicesResponse$inboundSchema, { key: "object" }),
|
||||||
M.jsonErr(400, errors.GetDevicesBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetDevicesBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetDevicesUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetDevicesUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeSimple } from "../lib/encodings.js";
|
import { encodeSimple } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -63,13 +64,13 @@ export async function serverGetMediaProviders(
|
|||||||
|
|
||||||
const path = pathToFunc("/media/providers")();
|
const path = pathToFunc("/media/providers")();
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
"X-Plex-Token": encodeSimple("X-Plex-Token", payload["X-Plex-Token"], {
|
"X-Plex-Token": encodeSimple("X-Plex-Token", payload["X-Plex-Token"], {
|
||||||
explode: false,
|
explode: false,
|
||||||
charEncoding: "none",
|
charEncoding: "none",
|
||||||
}),
|
}),
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -138,7 +139,8 @@ export async function serverGetMediaProviders(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetMediaProvidersBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetMediaProvidersBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetMediaProvidersUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetMediaProvidersUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
import { pathToFunc } from "../lib/url.js";
|
import { pathToFunc } from "../lib/url.js";
|
||||||
@@ -45,9 +46,9 @@ export async function serverGetMyPlexAccount(
|
|||||||
> {
|
> {
|
||||||
const path = pathToFunc("/myplex/account")();
|
const path = pathToFunc("/myplex/account")();
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -115,7 +116,8 @@ export async function serverGetMyPlexAccount(
|
|||||||
}),
|
}),
|
||||||
M.jsonErr(400, errors.GetMyPlexAccountBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetMyPlexAccountBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetMyPlexAccountUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetMyPlexAccountUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { PlexAPICore } from "../core.js";
|
import { PlexAPICore } from "../core.js";
|
||||||
import { encodeFormQuery } from "../lib/encodings.js";
|
import { encodeFormQuery } from "../lib/encodings.js";
|
||||||
import * as M from "../lib/matchers.js";
|
import * as M from "../lib/matchers.js";
|
||||||
|
import { compactMap } from "../lib/primitives.js";
|
||||||
import { safeParse } from "../lib/schemas.js";
|
import { safeParse } from "../lib/schemas.js";
|
||||||
import { RequestOptions } from "../lib/sdks.js";
|
import { RequestOptions } from "../lib/sdks.js";
|
||||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||||
@@ -69,9 +70,9 @@ export async function serverGetResizedPhoto(
|
|||||||
"width": payload.width,
|
"width": payload.width,
|
||||||
});
|
});
|
||||||
|
|
||||||
const headers = new Headers({
|
const headers = new Headers(compactMap({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
});
|
}));
|
||||||
|
|
||||||
const secConfig = await extractSecurity(client._options.accessToken);
|
const secConfig = await extractSecurity(client._options.accessToken);
|
||||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||||
@@ -139,7 +140,8 @@ export async function serverGetResizedPhoto(
|
|||||||
M.nil(200, operations.GetResizedPhotoResponse$inboundSchema),
|
M.nil(200, operations.GetResizedPhotoResponse$inboundSchema),
|
||||||
M.jsonErr(400, errors.GetResizedPhotoBadRequest$inboundSchema),
|
M.jsonErr(400, errors.GetResizedPhotoBadRequest$inboundSchema),
|
||||||
M.jsonErr(401, errors.GetResizedPhotoUnauthorized$inboundSchema),
|
M.jsonErr(401, errors.GetResizedPhotoUnauthorized$inboundSchema),
|
||||||
M.fail(["4XX", "5XX"]),
|
M.fail("4XX"),
|
||||||
|
M.fail("5XX"),
|
||||||
)(response, { extraFields: responseFields });
|
)(response, { extraFields: responseFields });
|
||||||
if (!result.ok) {
|
if (!result.ok) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user