Compare commits

..

7 Commits

Author SHA1 Message Date
speakeasybot
a1f6c6f515 ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.166.1 2024-02-05 14:25:14 +00:00
speakeasy-bot
022d345196 🐝 Add license. 2024-02-01 16:30:24 +00:00
speakeasy-bot
6cec42bef1 🐝 Update gen.yaml 2024-02-01 16:30:23 +00:00
speakeasy-bot
eaa84306f6 🐝 Update workflow file 2024-02-01 16:30:22 +00:00
speakeasybot
45ee7680a7 ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.161.0 2024-02-01 00:28:42 +00:00
speakeasybot
8668cc2ca6 ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.158.0 2024-01-31 15:07:20 +00:00
speakeasybot
9fb5c21c03 ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.150.0 2024-01-23 21:56:43 +00:00
37 changed files with 1639 additions and 86 deletions

View File

@@ -1,12 +1,12 @@
lockVersion: 2.0.0 lockVersion: 2.0.0
id: 16f22cbf-f23f-4419-8924-3a4b06381947 id: 16f22cbf-f23f-4419-8924-3a4b06381947
management: management:
docChecksum: 49e77b550f057eb568502dc74fee7cce docChecksum: 099fc5bbb987ae7e391f7f07b4212860
docVersion: 0.0.3 docVersion: 0.0.3
speakeasyVersion: internal speakeasyVersion: internal
generationVersion: 2.237.3 generationVersion: 2.249.1
releaseVersion: 0.5.2 releaseVersion: 0.7.0
configChecksum: f02b714f61d5a9ec0ae43736eea71917 configChecksum: b3d1de88036ff1f77a38604e4ce3ffa1
repoURL: https://github.com/LukeHagar/plexjs.git repoURL: https://github.com/LukeHagar/plexjs.git
repoSubDirectory: . repoSubDirectory: .
installationURL: https://github.com/LukeHagar/plexjs installationURL: https://github.com/LukeHagar/plexjs
@@ -14,12 +14,13 @@ management:
features: features:
typescript: typescript:
constsAndDefaults: 0.1.1 constsAndDefaults: 0.1.1
core: 3.4.7 core: 3.4.8
flattening: 2.81.1 flattening: 2.81.1
globalSecurity: 2.82.2 globalSecurity: 2.82.2
globalServerURLs: 2.82.1 globalServerURLs: 2.82.1
methodServerURLs: 2.82.1
nameOverrides: 2.81.1 nameOverrides: 2.81.1
unions: 2.85.0 unions: 2.85.1
generatedFiles: generatedFiles:
- src/sdk/server.ts - src/sdk/server.ts
- src/sdk/media.ts - src/sdk/media.ts
@@ -29,6 +30,7 @@ generatedFiles:
- src/sdk/search.ts - src/sdk/search.ts
- src/sdk/library.ts - src/sdk/library.ts
- src/sdk/log.ts - src/sdk/log.ts
- src/sdk/plex.ts
- src/sdk/playlists.ts - src/sdk/playlists.ts
- src/sdk/security.ts - src/sdk/security.ts
- src/sdk/sessions.ts - src/sdk/sessions.ts
@@ -95,6 +97,8 @@ generatedFiles:
- src/models/operations/logline.ts - src/models/operations/logline.ts
- src/models/operations/logmultiline.ts - src/models/operations/logmultiline.ts
- src/models/operations/enablepapertrail.ts - src/models/operations/enablepapertrail.ts
- src/models/operations/getpin.ts
- src/models/operations/gettoken.ts
- src/models/operations/createplaylist.ts - src/models/operations/createplaylist.ts
- src/models/operations/getplaylists.ts - src/models/operations/getplaylists.ts
- src/models/operations/getplaylist.ts - src/models/operations/getplaylist.ts
@@ -150,6 +154,8 @@ generatedFiles:
- src/models/errors/logline.ts - src/models/errors/logline.ts
- src/models/errors/logmultiline.ts - src/models/errors/logmultiline.ts
- src/models/errors/enablepapertrail.ts - src/models/errors/enablepapertrail.ts
- src/models/errors/getpin.ts
- src/models/errors/gettoken.ts
- src/models/errors/createplaylist.ts - src/models/errors/createplaylist.ts
- src/models/errors/getplaylists.ts - src/models/errors/getplaylists.ts
- src/models/errors/getplaylist.ts - src/models/errors/getplaylist.ts
@@ -283,7 +289,7 @@ generatedFiles:
- docs/models/operations/getrecentlyaddedmediacontainer.md - docs/models/operations/getrecentlyaddedmediacontainer.md
- docs/models/operations/getrecentlyaddedresponsebody.md - docs/models/operations/getrecentlyaddedresponsebody.md
- docs/models/operations/getrecentlyaddedresponse.md - docs/models/operations/getrecentlyaddedresponse.md
- docs/models/operations/location.md - docs/models/operations/getlibrarieslocation.md
- docs/models/operations/getlibrariesdirectory.md - docs/models/operations/getlibrariesdirectory.md
- docs/models/operations/getlibrariesmediacontainer.md - docs/models/operations/getlibrariesmediacontainer.md
- docs/models/operations/getlibrariesresponsebody.md - docs/models/operations/getlibrariesresponsebody.md
@@ -317,7 +323,7 @@ generatedFiles:
- docs/models/operations/getlibraryitemsresponse.md - docs/models/operations/getlibraryitemsresponse.md
- docs/models/operations/refreshlibraryrequest.md - docs/models/operations/refreshlibraryrequest.md
- docs/models/operations/refreshlibraryresponse.md - docs/models/operations/refreshlibraryresponse.md
- docs/models/operations/typet.md - docs/models/operations/type.md
- docs/models/operations/searchlibraryrequest.md - docs/models/operations/searchlibraryrequest.md
- docs/models/operations/searchlibrarymetadata.md - docs/models/operations/searchlibrarymetadata.md
- docs/models/operations/searchlibrarymediacontainer.md - docs/models/operations/searchlibrarymediacontainer.md
@@ -358,6 +364,12 @@ generatedFiles:
- docs/models/operations/loglineresponse.md - docs/models/operations/loglineresponse.md
- docs/models/operations/logmultilineresponse.md - docs/models/operations/logmultilineresponse.md
- docs/models/operations/enablepapertrailresponse.md - docs/models/operations/enablepapertrailresponse.md
- docs/models/operations/getpinrequest.md
- docs/models/operations/location.md
- docs/models/operations/getpinresponsebody.md
- docs/models/operations/getpinresponse.md
- docs/models/operations/gettokenrequest.md
- docs/models/operations/gettokenresponse.md
- docs/models/operations/queryparamtype.md - docs/models/operations/queryparamtype.md
- docs/models/operations/smart.md - docs/models/operations/smart.md
- docs/models/operations/createplaylistrequest.md - docs/models/operations/createplaylistrequest.md
@@ -515,6 +527,10 @@ generatedFiles:
- docs/models/errors/logmultilineresponsebody.md - docs/models/errors/logmultilineresponsebody.md
- docs/models/errors/enablepapertrailerrors.md - docs/models/errors/enablepapertrailerrors.md
- docs/models/errors/enablepapertrailresponsebody.md - docs/models/errors/enablepapertrailresponsebody.md
- docs/models/errors/getpinerrors.md
- docs/models/errors/getpinresponsebody.md
- docs/models/errors/gettokenerrors.md
- docs/models/errors/gettokenresponsebody.md
- docs/models/errors/createplaylisterrors.md - docs/models/errors/createplaylisterrors.md
- docs/models/errors/createplaylistresponsebody.md - docs/models/errors/createplaylistresponsebody.md
- docs/models/errors/getplaylistserrors.md - docs/models/errors/getplaylistserrors.md
@@ -565,6 +581,7 @@ generatedFiles:
- docs/sdks/search/README.md - docs/sdks/search/README.md
- docs/sdks/library/README.md - docs/sdks/library/README.md
- docs/sdks/log/README.md - docs/sdks/log/README.md
- docs/sdks/plex/README.md
- docs/sdks/playlists/README.md - docs/sdks/playlists/README.md
- docs/sdks/security/README.md - docs/sdks/security/README.md
- docs/sdks/sessions/README.md - docs/sdks/sessions/README.md

View File

@@ -111,6 +111,11 @@ run();
* [logMultiLine](docs/sdks/log/README.md#logmultiline) - Logging a multi-line message * [logMultiLine](docs/sdks/log/README.md#logmultiline) - Logging a multi-line message
* [enablePaperTrail](docs/sdks/log/README.md#enablepapertrail) - Enabling Papertrail * [enablePaperTrail](docs/sdks/log/README.md#enablepapertrail) - Enabling Papertrail
### [plex](docs/sdks/plex/README.md)
* [getPin](docs/sdks/plex/README.md#getpin) - Get a Pin
* [getToken](docs/sdks/plex/README.md#gettoken) - Get Access Token
### [playlists](docs/sdks/playlists/README.md) ### [playlists](docs/sdks/playlists/README.md)
* [createPlaylist](docs/sdks/playlists/README.md#createplaylist) - Create a Playlist * [createPlaylist](docs/sdks/playlists/README.md#createplaylist) - Create a Playlist
@@ -250,6 +255,32 @@ async function run() {
run(); run();
```
### Override Server URL Per-Operation
The server URL can also be overridden on a per-operation basis, provided a server list was specified for the operation. For example:
```typescript
import { PlexAPI } from "@lukehagar/plexjs";
async function run() {
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
const xPlexClientIdentifier = "string";
const strong = false;
const result = await sdk.plex.getPin(xPlexClientIdentifier, strong, {
serverURL: "https://plex.tv/api/v2",
});
// Handle the result
console.log(result);
}
run();
``` ```
<!-- End Server Selection [server] --> <!-- End Server Selection [server] -->

View File

@@ -138,4 +138,44 @@ Based on:
### Generated ### Generated
- [typescript v0.5.2] . - [typescript v0.5.2] .
### Releases ### Releases
- [NPM v0.5.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.5.2 - . - [NPM v0.5.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.5.2 - .
## 2024-01-23 21:55:23
### Changes
Based on:
- OpenAPI Doc 0.0.3
- Speakeasy CLI 1.150.0 (2.237.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.5.3] .
### Releases
- [NPM v0.5.3] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.5.3 - .
## 2024-01-31 15:05:58
### Changes
Based on:
- OpenAPI Doc 0.0.3
- Speakeasy CLI 1.158.0 (2.239.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.6.0] .
### Releases
- [NPM v0.6.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.6.0 - .
## 2024-02-01 00:27:20
### Changes
Based on:
- OpenAPI Doc 0.0.3
- Speakeasy CLI 1.161.0 (2.245.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.6.1] .
### Releases
- [NPM v0.6.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.6.1 - .
## 2024-02-05 14:23:50
### Changes
Based on:
- OpenAPI Doc 0.0.3
- Speakeasy CLI 1.166.1 (2.249.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.7.0] .
### Releases
- [NPM v0.7.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.7.0 - .

View File

@@ -0,0 +1,10 @@
# GetPinErrors
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
| `code` | *number* | :heavy_minus_sign: | N/A | 1000 |
| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing |
| `status` | *number* | :heavy_minus_sign: | N/A | 400 |

View File

@@ -0,0 +1,11 @@
# GetPinResponseBody
X-Plex-Client-Identifier is missing
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `errors` | [errors.GetPinErrors](../../models/errors/getpinerrors.md)[] | :heavy_minus_sign: | N/A |
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |

View File

@@ -0,0 +1,10 @@
# GetTokenErrors
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
| `code` | *number* | :heavy_minus_sign: | N/A | 1000 |
| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing |
| `status` | *number* | :heavy_minus_sign: | N/A | 400 |

View File

@@ -0,0 +1,11 @@
# GetTokenResponseBody
X-Plex-Client-Identifier is missing
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `errors` | [errors.GetTokenErrors](../../models/errors/gettokenerrors.md)[] | :heavy_minus_sign: | N/A |
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |

View File

@@ -3,26 +3,26 @@
## Fields ## Fields
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | true | | `allowSync` | *boolean* | :heavy_minus_sign: | N/A | true |
| `art` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg | | `art` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg |
| `composite` | *string* | :heavy_minus_sign: | N/A | /library/sections/1/composite/1705615584 | | `composite` | *string* | :heavy_minus_sign: | N/A | /library/sections/1/composite/1705615584 |
| `filters` | *boolean* | :heavy_minus_sign: | N/A | true | | `filters` | *boolean* | :heavy_minus_sign: | N/A | true |
| `refreshing` | *boolean* | :heavy_minus_sign: | N/A | false | | `refreshing` | *boolean* | :heavy_minus_sign: | N/A | false |
| `thumb` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie.png | | `thumb` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie.png |
| `key` | *string* | :heavy_minus_sign: | N/A | 1 | | `key` | *string* | :heavy_minus_sign: | N/A | 1 |
| `type` | *string* | :heavy_minus_sign: | N/A | movie | | `type` | *string* | :heavy_minus_sign: | N/A | movie |
| `title` | *string* | :heavy_minus_sign: | N/A | Movies | | `title` | *string* | :heavy_minus_sign: | N/A | Movies |
| `agent` | *string* | :heavy_minus_sign: | N/A | tv.plex.agents.movie | | `agent` | *string* | :heavy_minus_sign: | N/A | tv.plex.agents.movie |
| `scanner` | *string* | :heavy_minus_sign: | N/A | Plex Movie | | `scanner` | *string* | :heavy_minus_sign: | N/A | Plex Movie |
| `language` | *string* | :heavy_minus_sign: | N/A | en-US | | `language` | *string* | :heavy_minus_sign: | N/A | en-US |
| `uuid` | *string* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | | `uuid` | *string* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1705615634 | | `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1705615634 |
| `createdAt` | *number* | :heavy_minus_sign: | N/A | 1654131312 | | `createdAt` | *number* | :heavy_minus_sign: | N/A | 1654131312 |
| `scannedAt` | *number* | :heavy_minus_sign: | N/A | 1705615584 | | `scannedAt` | *number* | :heavy_minus_sign: | N/A | 1705615584 |
| `content` | *boolean* | :heavy_minus_sign: | N/A | true | | `content` | *boolean* | :heavy_minus_sign: | N/A | true |
| `directory` | *boolean* | :heavy_minus_sign: | N/A | true | | `directory` | *boolean* | :heavy_minus_sign: | N/A | true |
| `contentChangedAt` | *number* | :heavy_minus_sign: | N/A | 3192854 | | `contentChangedAt` | *number* | :heavy_minus_sign: | N/A | 3192854 |
| `hidden` | *number* | :heavy_minus_sign: | N/A | 0 | | `hidden` | *number* | :heavy_minus_sign: | N/A | 0 |
| `location` | [operations.Location](../../models/operations/location.md)[] | :heavy_minus_sign: | N/A | [{"id":1,"path":"/movies"}] | | `location` | [operations.GetLibrariesLocation](../../models/operations/getlibrarieslocation.md)[] | :heavy_minus_sign: | N/A | [{"id":1,"path":"/movies"}] |

View File

@@ -0,0 +1,9 @@
# GetLibrariesLocation
## Fields
| Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| `id` | *number* | :heavy_minus_sign: | N/A | 1 |
| `path` | *string* | :heavy_minus_sign: | N/A | /movies |

File diff suppressed because one or more lines are too long

View File

@@ -27,6 +27,13 @@
| `chapterSource` | *string* | :heavy_minus_sign: | N/A | media | | `chapterSource` | *string* | :heavy_minus_sign: | N/A | media |
| `primaryExtraKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58684 | | `primaryExtraKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58684 |
| `ratingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | | `ratingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe |
| `grandparentRatingKey` | *string* | :heavy_minus_sign: | N/A | 66 |
| `grandparentGuid` | *string* | :heavy_minus_sign: | N/A | plex://show/5d9c081b170e24001f2a7be4 |
| `grandparentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66 |
| `grandparentTitle` | *string* | :heavy_minus_sign: | N/A | Caprica |
| `grandparentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 |
| `grandparentArt` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/art/1705716261 |
| `grandparentTheme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 |
| `media` | [operations.GetLibraryItemsMedia](../../models/operations/getlibraryitemsmedia.md)[] | :heavy_minus_sign: | N/A | [{"Part":[{"container":"mkv","duration":11558112,"file":"/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv","id":119542,"key":"/library/parts/119542/1680457526/file.mkv","size":36158371307,"videoProfile":"main 10"}],"aspectRatio":1.85,"audioChannels":6,"audioCodec":"eac3","bitrate":25025,"container":"mkv","duration":11558112,"height":2072,"id":119534,"videoCodec":"hevc","videoFrameRate":"24p","videoProfile":"main 10","videoResolution":"4k","width":3840}] | | `media` | [operations.GetLibraryItemsMedia](../../models/operations/getlibraryitemsmedia.md)[] | :heavy_minus_sign: | N/A | [{"Part":[{"container":"mkv","duration":11558112,"file":"/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv","id":119542,"key":"/library/parts/119542/1680457526/file.mkv","size":36158371307,"videoProfile":"main 10"}],"aspectRatio":1.85,"audioChannels":6,"audioCodec":"eac3","bitrate":25025,"container":"mkv","duration":11558112,"height":2072,"id":119534,"videoCodec":"hevc","videoFrameRate":"24p","videoProfile":"main 10","videoResolution":"4k","width":3840}] |
| `genre` | [operations.GetLibraryItemsGenre](../../models/operations/getlibraryitemsgenre.md)[] | :heavy_minus_sign: | N/A | [{"tag":"Adventure"}] | | `genre` | [operations.GetLibraryItemsGenre](../../models/operations/getlibraryitemsgenre.md)[] | :heavy_minus_sign: | N/A | [{"tag":"Adventure"}] |
| `country` | [operations.GetLibraryItemsCountry](../../models/operations/getlibraryitemscountry.md)[] | :heavy_minus_sign: | N/A | [{"tag":"United States of America"}] | | `country` | [operations.GetLibraryItemsCountry](../../models/operations/getlibraryitemscountry.md)[] | :heavy_minus_sign: | N/A | [{"tag":"United States of America"}] |
@@ -38,4 +45,20 @@
| `lastViewedAt` | *number* | :heavy_minus_sign: | N/A | 1682752242 | | `lastViewedAt` | *number* | :heavy_minus_sign: | N/A | 1682752242 |
| `originalTitle` | *string* | :heavy_minus_sign: | N/A | 映画 ブラッククローバー 魔法帝の剣 | | `originalTitle` | *string* | :heavy_minus_sign: | N/A | 映画 ブラッククローバー 魔法帝の剣 |
| `viewOffset` | *number* | :heavy_minus_sign: | N/A | 5222500 | | `viewOffset` | *number* | :heavy_minus_sign: | N/A | 5222500 |
| `skipCount` | *number* | :heavy_minus_sign: | N/A | 1 | | `skipCount` | *number* | :heavy_minus_sign: | N/A | 1 |
| `index` | *number* | :heavy_minus_sign: | N/A | 1 |
| `theme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/1/theme/1705636920 |
| `leafCount` | *number* | :heavy_minus_sign: | N/A | 14 |
| `viewedLeafCount` | *number* | :heavy_minus_sign: | N/A | 0 |
| `childCount` | *number* | :heavy_minus_sign: | N/A | 1 |
| `hasPremiumExtras` | *string* | :heavy_minus_sign: | N/A | 1 |
| `hasPremiumPrimaryExtra` | *string* | :heavy_minus_sign: | N/A | 1 |
| `parentRatingKey` | *string* | :heavy_minus_sign: | N/A | 66 |
| `parentGuid` | *string* | :heavy_minus_sign: | N/A | plex://show/5d9c081b170e24001f2a7be4 |
| `parentStudio` | *string* | :heavy_minus_sign: | N/A | UCP |
| `parentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66 |
| `parentTitle` | *string* | :heavy_minus_sign: | N/A | Caprica |
| `parentIndex` | *number* | :heavy_minus_sign: | N/A | 1 |
| `parentYear` | *number* | :heavy_minus_sign: | N/A | 2010 |
| `parentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 |
| `parentTheme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 |

View File

@@ -0,0 +1,9 @@
# GetPinRequest
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `xPlexClientIdentifier` | *string* | :heavy_check_mark: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> |
| `strong` | *boolean* | :heavy_minus_sign: | Determines the kind of code returned by the API call<br/>Strong codes are used for Pin authentication flows<br/>Non-Strong codes are used for `Plex.tv/link`<br/> |

View File

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

View File

@@ -0,0 +1,21 @@
# GetPinResponseBody
The Pin
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id` | *number* | :heavy_minus_sign: | PinID for use with authentication | 1272322473 |
| `code` | *string* | :heavy_minus_sign: | N/A | 3patfx1a78ukcbr7x0n9bl26t |
| `product` | *string* | :heavy_minus_sign: | N/A | Plex Web |
| `trusted` | *boolean* | :heavy_minus_sign: | N/A | |
| `qr` | *string* | :heavy_minus_sign: | a link to a QR code hosted on plex.tv <br/>The QR code redirects to the relevant `plex.tv/link` authentication page<br/>Which then prompts the user for the 4 Digit Link Pin<br/> | https://plex.tv/api/v2/pins/qr/3patfx1a78ukcbr7x0n9bl26t |
| `clientIdentifier` | *string* | :heavy_minus_sign: | N/A | Postman |
| `location` | [operations.Location](../../models/operations/location.md) | :heavy_minus_sign: | N/A | |
| `expiresIn` | *number* | :heavy_minus_sign: | N/A | 1800 |
| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | 2023-04-12 17:00:03 +0000 UTC |
| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | 2023-04-12 17:30:03 +0000 UTC |
| `authToken` | *string* | :heavy_minus_sign: | N/A | |
| `newRegistration` | *string* | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,9 @@
# GetTokenRequest
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `pinID` | *string* | :heavy_check_mark: | The PinID to retrieve an access token for |
| `xPlexClientIdentifier` | *string* | :heavy_check_mark: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> |

View File

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

View File

@@ -3,7 +3,15 @@
## Fields ## Fields
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- |
| `id` | *number* | :heavy_minus_sign: | N/A | 1 | | `code` | *string* | :heavy_minus_sign: | N/A | US |
| `path` | *string* | :heavy_minus_sign: | N/A | /movies | | `europeanUnionMember` | *boolean* | :heavy_minus_sign: | N/A | |
| `continentCode` | *string* | :heavy_minus_sign: | N/A | NA |
| `country` | *string* | :heavy_minus_sign: | N/A | United States |
| `city` | *string* | :heavy_minus_sign: | N/A | Austin |
| `timeZone` | *string* | :heavy_minus_sign: | N/A | America/Chicago |
| `postalCode` | *number* | :heavy_minus_sign: | N/A | 78732 |
| `inPrivacyRestrictedCountry` | *boolean* | :heavy_minus_sign: | N/A | |
| `subdivisions` | *string* | :heavy_minus_sign: | N/A | Texas |
| `coordinates` | *string* | :heavy_minus_sign: | N/A | 30.3768 -97.8935 |

View File

@@ -3,7 +3,7 @@
## Fields ## Fields
| Field | Type | Required | Description | | Field | Type | Required | Description |
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to query | | `sectionId` | *number* | :heavy_check_mark: | the Id of the library to query |
| `type` | [operations.TypeT](../../models/operations/typet.md) | :heavy_check_mark: | Plex content type to search for | | `type` | [operations.Type](../../models/operations/type.md) | :heavy_check_mark: | Plex content type to search for |

View File

@@ -1,4 +1,4 @@
# TypeT # Type
Plex content type to search for Plex content type to search for

View File

@@ -422,7 +422,7 @@ 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 { TypeT } from "@lukehagar/plexjs/models/operations"; import { Type } from "@lukehagar/plexjs/models/operations";
async function run() { async function run() {
const sdk = new PlexAPI({ const sdk = new PlexAPI({
@@ -430,7 +430,7 @@ async function run() {
}); });
const sectionId = 933505; const sectionId = 933505;
const type = TypeT.Four; const type = Type.Four;
const result = await sdk.library.searchLibrary(sectionId, type); const result = await sdk.library.searchLibrary(sectionId, type);
@@ -446,7 +446,7 @@ run();
| Parameter | Type | Required | Description | | Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to query | | `sectionId` | *number* | :heavy_check_mark: | the Id of the library to query |
| `type` | [operations.TypeT](../../models/operations/typet.md) | :heavy_check_mark: | Plex content type to search for | | `type` | [operations.Type](../../models/operations/type.md) | :heavy_check_mark: | Plex content type to search for |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |

106
docs/sdks/plex/README.md Normal file
View File

@@ -0,0 +1,106 @@
# Plex
(*plex*)
## Overview
API Calls that perform operations directly against https://Plex.tv
### Available Operations
* [getPin](#getpin) - Get a Pin
* [getToken](#gettoken) - Get Access Token
## getPin
Retrieve a Pin from Plex.tv for authentication flows
### Example Usage
```typescript
import { PlexAPI } from "@lukehagar/plexjs";
async function run() {
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
const xPlexClientIdentifier = "string";
const strong = false;
const result = await sdk.plex.getPin(xPlexClientIdentifier, strong);
// Handle the result
console.log(result)
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `xPlexClientIdentifier` | *string* | :heavy_check_mark: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> |
| `strong` | *boolean* | :heavy_minus_sign: | Determines the kind of code returned by the API call<br/>Strong codes are used for Pin authentication flows<br/>Non-Strong codes are used for `Plex.tv/link`<br/> |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. |
### Response
**Promise<[operations.GetPinResponse](../../models/operations/getpinresponse.md)>**
### Errors
| Error Object | Status Code | Content Type |
| ------------------------- | ------------------------- | ------------------------- |
| errors.GetPinResponseBody | 400 | application/json |
| errors.SDKError | 4xx-5xx | */* |
## getToken
Retrieve an Access Token from Plex.tv after the Pin has already been authenticated
### Example Usage
```typescript
import { PlexAPI } from "@lukehagar/plexjs";
async function run() {
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
const pinID = "string";
const xPlexClientIdentifier = "string";
const result = await sdk.plex.getToken(pinID, xPlexClientIdentifier);
// Handle the result
console.log(result)
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `pinID` | *string* | :heavy_check_mark: | The PinID to retrieve an access token for |
| `xPlexClientIdentifier` | *string* | :heavy_check_mark: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. |
### Response
**Promise<[operations.GetTokenResponse](../../models/operations/gettokenresponse.md)>**
### Errors
| Error Object | Status Code | Content Type |
| --------------------------- | --------------------------- | --------------------------- |
| errors.GetTokenResponseBody | 400 | application/json |
| errors.SDKError | 4xx-5xx | */* |

View File

@@ -7,8 +7,9 @@ generation:
useClassNamesForArrayFields: true useClassNamesForArrayFields: true
fixes: fixes:
nameResolutionDec2023: false nameResolutionDec2023: false
parameterOrderingFeb2024: false
typescript: typescript:
version: 0.5.2 version: 0.7.0
author: LukeHagar author: LukeHagar
clientServerStatusCodesAsErrors: true clientServerStatusCodesAsErrors: true
flattenGlobalSecurity: true flattenGlobalSecurity: true

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "@lukehagar/plexjs", "name": "@lukehagar/plexjs",
"version": "0.5.2", "version": "0.7.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@lukehagar/plexjs", "name": "@lukehagar/plexjs",
"version": "0.5.2", "version": "0.7.0",
"dependencies": { "dependencies": {
"decimal.js": "^10.4.3", "decimal.js": "^10.4.3",
"jsonpath": "^1.1.1" "jsonpath": "^1.1.1"

View File

@@ -1,7 +1,7 @@
{ {
"type": "commonjs", "type": "commonjs",
"name": "@lukehagar/plexjs", "name": "@lukehagar/plexjs",
"version": "0.5.2", "version": "0.7.0",
"author": "LukeHagar", "author": "LukeHagar",
"main": "./index.js", "main": "./index.js",
"sideEffects": false, "sideEffects": false,

View File

@@ -79,7 +79,7 @@ export function serverURLFromOptions(options: SDKOptions): URL {
export const SDK_METADATA = Object.freeze({ export const SDK_METADATA = Object.freeze({
language: "typescript", language: "typescript",
openapiDocVersion: "0.0.3", openapiDocVersion: "0.0.3",
sdkVersion: "0.5.2", sdkVersion: "0.7.0",
genVersion: "2.237.3", genVersion: "2.249.1",
userAgent: "speakeasy-sdk/typescript 0.5.2 2.237.3 0.0.3 @lukehagar/plexjs", userAgent: "speakeasy-sdk/typescript 0.7.0 2.249.1 0.0.3 @lukehagar/plexjs",
}); });

144
src/models/errors/getpin.ts Normal file
View File

@@ -0,0 +1,144 @@
/*
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { z } from "zod";
export type GetPinErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* X-Plex-Client-Identifier is missing
*/
export type GetPinResponseBodyData = {
errors?: Array<GetPinErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* X-Plex-Client-Identifier is missing
*/
export class GetPinResponseBody extends Error {
errors?: Array<GetPinErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetPinResponseBodyData;
constructor(err: GetPinResponseBodyData) {
super("");
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
const { rawResponse, ...data } = err;
const content = JSON.stringify(data);
this.message = [msg, content].filter(Boolean).join("\n");
this.name = "GetPinResponseBody";
}
}
/** @internal */
export namespace GetPinErrors$ {
export type Inbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
export const inboundSchema: z.ZodType<GetPinErrors, z.ZodTypeDef, Inbound> = z
.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
})
.transform((v) => {
return {
...(v.code === undefined ? null : { code: v.code }),
...(v.message === undefined ? null : { message: v.message }),
...(v.status === undefined ? null : { status: v.status }),
};
});
export type Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPinErrors> = z
.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
})
.transform((v) => {
return {
...(v.code === undefined ? null : { code: v.code }),
...(v.message === undefined ? null : { message: v.message }),
...(v.status === undefined ? null : { status: v.status }),
};
});
}
/** @internal */
export namespace GetPinResponseBody$ {
export type Inbound = {
errors?: Array<GetPinErrors$.Inbound> | undefined;
RawResponse?: Response | undefined;
};
export const inboundSchema: z.ZodType<GetPinResponseBody, z.ZodTypeDef, Inbound> = z
.object({
errors: z.array(z.lazy(() => GetPinErrors$.inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetPinResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
});
});
export type Outbound = {
errors?: Array<GetPinErrors$.Outbound> | undefined;
RawResponse?: never | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPinResponseBody> = z
.instanceof(GetPinResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetPinErrors$.outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
})
);
}

View File

@@ -0,0 +1,144 @@
/*
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { z } from "zod";
export type GetTokenErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* X-Plex-Client-Identifier is missing
*/
export type GetTokenResponseBodyData = {
errors?: Array<GetTokenErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* X-Plex-Client-Identifier is missing
*/
export class GetTokenResponseBody extends Error {
errors?: Array<GetTokenErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetTokenResponseBodyData;
constructor(err: GetTokenResponseBodyData) {
super("");
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
const { rawResponse, ...data } = err;
const content = JSON.stringify(data);
this.message = [msg, content].filter(Boolean).join("\n");
this.name = "GetTokenResponseBody";
}
}
/** @internal */
export namespace GetTokenErrors$ {
export type Inbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
export const inboundSchema: z.ZodType<GetTokenErrors, z.ZodTypeDef, Inbound> = z
.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
})
.transform((v) => {
return {
...(v.code === undefined ? null : { code: v.code }),
...(v.message === undefined ? null : { message: v.message }),
...(v.status === undefined ? null : { status: v.status }),
};
});
export type Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetTokenErrors> = z
.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
})
.transform((v) => {
return {
...(v.code === undefined ? null : { code: v.code }),
...(v.message === undefined ? null : { message: v.message }),
...(v.status === undefined ? null : { status: v.status }),
};
});
}
/** @internal */
export namespace GetTokenResponseBody$ {
export type Inbound = {
errors?: Array<GetTokenErrors$.Inbound> | undefined;
RawResponse?: Response | undefined;
};
export const inboundSchema: z.ZodType<GetTokenResponseBody, z.ZodTypeDef, Inbound> = z
.object({
errors: z.array(z.lazy(() => GetTokenErrors$.inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetTokenResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
});
});
export type Outbound = {
errors?: Array<GetTokenErrors$.Outbound> | undefined;
RawResponse?: never | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetTokenResponseBody> = z
.instanceof(GetTokenResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetTokenErrors$.outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
})
);
}

View File

@@ -23,6 +23,7 @@ export * from "./getmetadata";
export * from "./getmetadatachildren"; export * from "./getmetadatachildren";
export * from "./getmyplexaccount"; export * from "./getmyplexaccount";
export * from "./getondeck"; export * from "./getondeck";
export * from "./getpin";
export * from "./getplaylist"; export * from "./getplaylist";
export * from "./getplaylistcontents"; export * from "./getplaylistcontents";
export * from "./getplaylists"; export * from "./getplaylists";
@@ -38,6 +39,7 @@ export * from "./getsessionhistory";
export * from "./getsessions"; export * from "./getsessions";
export * from "./getsourceconnectioninformation"; export * from "./getsourceconnectioninformation";
export * from "./gettimeline"; export * from "./gettimeline";
export * from "./gettoken";
export * from "./gettranscodesessions"; export * from "./gettranscodesessions";
export * from "./gettransienttoken"; export * from "./gettransienttoken";
export * from "./getupdatestatus"; export * from "./getupdatestatus";

View File

@@ -4,7 +4,7 @@
import { z } from "zod"; import { z } from "zod";
export type Location = { export type GetLibrariesLocation = {
id?: number | undefined; id?: number | undefined;
path?: string | undefined; path?: string | undefined;
}; };
@@ -30,7 +30,7 @@ export type GetLibrariesDirectory = {
directory?: boolean | undefined; directory?: boolean | undefined;
contentChangedAt?: number | undefined; contentChangedAt?: number | undefined;
hidden?: number | undefined; hidden?: number | undefined;
location?: Array<Location> | undefined; location?: Array<GetLibrariesLocation> | undefined;
}; };
export type GetLibrariesMediaContainer = { export type GetLibrariesMediaContainer = {
@@ -67,13 +67,13 @@ export type GetLibrariesResponse = {
}; };
/** @internal */ /** @internal */
export namespace Location$ { export namespace GetLibrariesLocation$ {
export type Inbound = { export type Inbound = {
id?: number | undefined; id?: number | undefined;
path?: string | undefined; path?: string | undefined;
}; };
export const inboundSchema: z.ZodType<Location, z.ZodTypeDef, Inbound> = z export const inboundSchema: z.ZodType<GetLibrariesLocation, z.ZodTypeDef, Inbound> = z
.object({ .object({
id: z.number().int().optional(), id: z.number().int().optional(),
path: z.string().optional(), path: z.string().optional(),
@@ -90,7 +90,7 @@ export namespace Location$ {
path?: string | undefined; path?: string | undefined;
}; };
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Location> = z export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibrariesLocation> = z
.object({ .object({
id: z.number().int().optional(), id: z.number().int().optional(),
path: z.string().optional(), path: z.string().optional(),
@@ -126,7 +126,7 @@ export namespace GetLibrariesDirectory$ {
directory?: boolean | undefined; directory?: boolean | undefined;
contentChangedAt?: number | undefined; contentChangedAt?: number | undefined;
hidden?: number | undefined; hidden?: number | undefined;
Location?: Array<Location$.Inbound> | undefined; Location?: Array<GetLibrariesLocation$.Inbound> | undefined;
}; };
export const inboundSchema: z.ZodType<GetLibrariesDirectory, z.ZodTypeDef, Inbound> = z export const inboundSchema: z.ZodType<GetLibrariesDirectory, z.ZodTypeDef, Inbound> = z
@@ -151,7 +151,7 @@ export namespace GetLibrariesDirectory$ {
directory: z.boolean().optional(), directory: z.boolean().optional(),
contentChangedAt: z.number().int().optional(), contentChangedAt: z.number().int().optional(),
hidden: z.number().int().optional(), hidden: z.number().int().optional(),
Location: z.array(z.lazy(() => Location$.inboundSchema)).optional(), Location: z.array(z.lazy(() => GetLibrariesLocation$.inboundSchema)).optional(),
}) })
.transform((v) => { .transform((v) => {
return { return {
@@ -202,7 +202,7 @@ export namespace GetLibrariesDirectory$ {
directory?: boolean | undefined; directory?: boolean | undefined;
contentChangedAt?: number | undefined; contentChangedAt?: number | undefined;
hidden?: number | undefined; hidden?: number | undefined;
Location?: Array<Location$.Outbound> | undefined; Location?: Array<GetLibrariesLocation$.Outbound> | undefined;
}; };
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibrariesDirectory> = z export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibrariesDirectory> = z
@@ -227,7 +227,7 @@ export namespace GetLibrariesDirectory$ {
directory: z.boolean().optional(), directory: z.boolean().optional(),
contentChangedAt: z.number().int().optional(), contentChangedAt: z.number().int().optional(),
hidden: z.number().int().optional(), hidden: z.number().int().optional(),
location: z.array(z.lazy(() => Location$.outboundSchema)).optional(), location: z.array(z.lazy(() => GetLibrariesLocation$.outboundSchema)).optional(),
}) })
.transform((v) => { .transform((v) => {
return { return {

View File

@@ -111,6 +111,13 @@ export type GetLibraryItemsMetadata = {
chapterSource?: string | undefined; chapterSource?: string | undefined;
primaryExtraKey?: string | undefined; primaryExtraKey?: string | undefined;
ratingImage?: string | undefined; ratingImage?: string | undefined;
grandparentRatingKey?: string | undefined;
grandparentGuid?: string | undefined;
grandparentKey?: string | undefined;
grandparentTitle?: string | undefined;
grandparentThumb?: string | undefined;
grandparentArt?: string | undefined;
grandparentTheme?: string | undefined;
media?: Array<GetLibraryItemsMedia> | undefined; media?: Array<GetLibraryItemsMedia> | undefined;
genre?: Array<GetLibraryItemsGenre> | undefined; genre?: Array<GetLibraryItemsGenre> | undefined;
country?: Array<GetLibraryItemsCountry> | undefined; country?: Array<GetLibraryItemsCountry> | undefined;
@@ -123,6 +130,22 @@ export type GetLibraryItemsMetadata = {
originalTitle?: string | undefined; originalTitle?: string | undefined;
viewOffset?: number | undefined; viewOffset?: number | undefined;
skipCount?: number | undefined; skipCount?: number | undefined;
index?: number | undefined;
theme?: string | undefined;
leafCount?: number | undefined;
viewedLeafCount?: number | undefined;
childCount?: number | undefined;
hasPremiumExtras?: string | undefined;
hasPremiumPrimaryExtra?: string | undefined;
parentRatingKey?: string | undefined;
parentGuid?: string | undefined;
parentStudio?: string | undefined;
parentKey?: string | undefined;
parentTitle?: string | undefined;
parentIndex?: number | undefined;
parentYear?: number | undefined;
parentThumb?: string | undefined;
parentTheme?: string | undefined;
}; };
export type GetLibraryItemsMediaContainer = { export type GetLibraryItemsMediaContainer = {
@@ -140,6 +163,7 @@ export type GetLibraryItemsMediaContainer = {
title2?: string | undefined; title2?: string | undefined;
viewGroup?: string | undefined; viewGroup?: string | undefined;
viewMode?: number | undefined; viewMode?: number | undefined;
mixedParents?: boolean | undefined;
metadata?: Array<GetLibraryItemsMetadata> | undefined; metadata?: Array<GetLibraryItemsMetadata> | undefined;
}; };
@@ -569,6 +593,13 @@ export namespace GetLibraryItemsMetadata$ {
chapterSource?: string | undefined; chapterSource?: string | undefined;
primaryExtraKey?: string | undefined; primaryExtraKey?: string | undefined;
ratingImage?: string | undefined; ratingImage?: string | undefined;
grandparentRatingKey?: string | undefined;
grandparentGuid?: string | undefined;
grandparentKey?: string | undefined;
grandparentTitle?: string | undefined;
grandparentThumb?: string | undefined;
grandparentArt?: string | undefined;
grandparentTheme?: string | undefined;
Media?: Array<GetLibraryItemsMedia$.Inbound> | undefined; Media?: Array<GetLibraryItemsMedia$.Inbound> | undefined;
Genre?: Array<GetLibraryItemsGenre$.Inbound> | undefined; Genre?: Array<GetLibraryItemsGenre$.Inbound> | undefined;
Country?: Array<GetLibraryItemsCountry$.Inbound> | undefined; Country?: Array<GetLibraryItemsCountry$.Inbound> | undefined;
@@ -581,6 +612,22 @@ export namespace GetLibraryItemsMetadata$ {
originalTitle?: string | undefined; originalTitle?: string | undefined;
viewOffset?: number | undefined; viewOffset?: number | undefined;
skipCount?: number | undefined; skipCount?: number | undefined;
index?: number | undefined;
theme?: string | undefined;
leafCount?: number | undefined;
viewedLeafCount?: number | undefined;
childCount?: number | undefined;
hasPremiumExtras?: string | undefined;
hasPremiumPrimaryExtra?: string | undefined;
parentRatingKey?: string | undefined;
parentGuid?: string | undefined;
parentStudio?: string | undefined;
parentKey?: string | undefined;
parentTitle?: string | undefined;
parentIndex?: number | undefined;
parentYear?: number | undefined;
parentThumb?: string | undefined;
parentTheme?: string | undefined;
}; };
export const inboundSchema: z.ZodType<GetLibraryItemsMetadata, z.ZodTypeDef, Inbound> = z export const inboundSchema: z.ZodType<GetLibraryItemsMetadata, z.ZodTypeDef, Inbound> = z
@@ -610,6 +657,13 @@ export namespace GetLibraryItemsMetadata$ {
chapterSource: z.string().optional(), chapterSource: z.string().optional(),
primaryExtraKey: z.string().optional(), primaryExtraKey: z.string().optional(),
ratingImage: z.string().optional(), ratingImage: z.string().optional(),
grandparentRatingKey: z.string().optional(),
grandparentGuid: z.string().optional(),
grandparentKey: z.string().optional(),
grandparentTitle: z.string().optional(),
grandparentThumb: z.string().optional(),
grandparentArt: z.string().optional(),
grandparentTheme: z.string().optional(),
Media: z.array(z.lazy(() => GetLibraryItemsMedia$.inboundSchema)).optional(), Media: z.array(z.lazy(() => GetLibraryItemsMedia$.inboundSchema)).optional(),
Genre: z.array(z.lazy(() => GetLibraryItemsGenre$.inboundSchema)).optional(), Genre: z.array(z.lazy(() => GetLibraryItemsGenre$.inboundSchema)).optional(),
Country: z.array(z.lazy(() => GetLibraryItemsCountry$.inboundSchema)).optional(), Country: z.array(z.lazy(() => GetLibraryItemsCountry$.inboundSchema)).optional(),
@@ -622,6 +676,22 @@ export namespace GetLibraryItemsMetadata$ {
originalTitle: z.string().optional(), originalTitle: z.string().optional(),
viewOffset: z.number().int().optional(), viewOffset: z.number().int().optional(),
skipCount: z.number().int().optional(), skipCount: z.number().int().optional(),
index: z.number().int().optional(),
theme: z.string().optional(),
leafCount: z.number().int().optional(),
viewedLeafCount: z.number().int().optional(),
childCount: z.number().int().optional(),
hasPremiumExtras: z.string().optional(),
hasPremiumPrimaryExtra: z.string().optional(),
parentRatingKey: z.string().optional(),
parentGuid: z.string().optional(),
parentStudio: z.string().optional(),
parentKey: z.string().optional(),
parentTitle: z.string().optional(),
parentIndex: z.number().int().optional(),
parentYear: z.number().int().optional(),
parentThumb: z.string().optional(),
parentTheme: z.string().optional(),
}) })
.transform((v) => { .transform((v) => {
return { return {
@@ -653,6 +723,23 @@ export namespace GetLibraryItemsMetadata$ {
? null ? null
: { primaryExtraKey: v.primaryExtraKey }), : { primaryExtraKey: v.primaryExtraKey }),
...(v.ratingImage === undefined ? null : { ratingImage: v.ratingImage }), ...(v.ratingImage === undefined ? null : { ratingImage: v.ratingImage }),
...(v.grandparentRatingKey === undefined
? null
: { grandparentRatingKey: v.grandparentRatingKey }),
...(v.grandparentGuid === undefined
? null
: { grandparentGuid: v.grandparentGuid }),
...(v.grandparentKey === undefined ? null : { grandparentKey: v.grandparentKey }),
...(v.grandparentTitle === undefined
? null
: { grandparentTitle: v.grandparentTitle }),
...(v.grandparentThumb === undefined
? null
: { grandparentThumb: v.grandparentThumb }),
...(v.grandparentArt === undefined ? null : { grandparentArt: v.grandparentArt }),
...(v.grandparentTheme === undefined
? null
: { grandparentTheme: v.grandparentTheme }),
...(v.Media === undefined ? null : { media: v.Media }), ...(v.Media === undefined ? null : { media: v.Media }),
...(v.Genre === undefined ? null : { genre: v.Genre }), ...(v.Genre === undefined ? null : { genre: v.Genre }),
...(v.Country === undefined ? null : { country: v.Country }), ...(v.Country === undefined ? null : { country: v.Country }),
@@ -665,6 +752,30 @@ export namespace GetLibraryItemsMetadata$ {
...(v.originalTitle === undefined ? null : { originalTitle: v.originalTitle }), ...(v.originalTitle === undefined ? null : { originalTitle: v.originalTitle }),
...(v.viewOffset === undefined ? null : { viewOffset: v.viewOffset }), ...(v.viewOffset === undefined ? null : { viewOffset: v.viewOffset }),
...(v.skipCount === undefined ? null : { skipCount: v.skipCount }), ...(v.skipCount === undefined ? null : { skipCount: v.skipCount }),
...(v.index === undefined ? null : { index: v.index }),
...(v.theme === undefined ? null : { theme: v.theme }),
...(v.leafCount === undefined ? null : { leafCount: v.leafCount }),
...(v.viewedLeafCount === undefined
? null
: { viewedLeafCount: v.viewedLeafCount }),
...(v.childCount === undefined ? null : { childCount: v.childCount }),
...(v.hasPremiumExtras === undefined
? null
: { hasPremiumExtras: v.hasPremiumExtras }),
...(v.hasPremiumPrimaryExtra === undefined
? null
: { hasPremiumPrimaryExtra: v.hasPremiumPrimaryExtra }),
...(v.parentRatingKey === undefined
? null
: { parentRatingKey: v.parentRatingKey }),
...(v.parentGuid === undefined ? null : { parentGuid: v.parentGuid }),
...(v.parentStudio === undefined ? null : { parentStudio: v.parentStudio }),
...(v.parentKey === undefined ? null : { parentKey: v.parentKey }),
...(v.parentTitle === undefined ? null : { parentTitle: v.parentTitle }),
...(v.parentIndex === undefined ? null : { parentIndex: v.parentIndex }),
...(v.parentYear === undefined ? null : { parentYear: v.parentYear }),
...(v.parentThumb === undefined ? null : { parentThumb: v.parentThumb }),
...(v.parentTheme === undefined ? null : { parentTheme: v.parentTheme }),
}; };
}); });
@@ -691,6 +802,13 @@ export namespace GetLibraryItemsMetadata$ {
chapterSource?: string | undefined; chapterSource?: string | undefined;
primaryExtraKey?: string | undefined; primaryExtraKey?: string | undefined;
ratingImage?: string | undefined; ratingImage?: string | undefined;
grandparentRatingKey?: string | undefined;
grandparentGuid?: string | undefined;
grandparentKey?: string | undefined;
grandparentTitle?: string | undefined;
grandparentThumb?: string | undefined;
grandparentArt?: string | undefined;
grandparentTheme?: string | undefined;
Media?: Array<GetLibraryItemsMedia$.Outbound> | undefined; Media?: Array<GetLibraryItemsMedia$.Outbound> | undefined;
Genre?: Array<GetLibraryItemsGenre$.Outbound> | undefined; Genre?: Array<GetLibraryItemsGenre$.Outbound> | undefined;
Country?: Array<GetLibraryItemsCountry$.Outbound> | undefined; Country?: Array<GetLibraryItemsCountry$.Outbound> | undefined;
@@ -703,6 +821,22 @@ export namespace GetLibraryItemsMetadata$ {
originalTitle?: string | undefined; originalTitle?: string | undefined;
viewOffset?: number | undefined; viewOffset?: number | undefined;
skipCount?: number | undefined; skipCount?: number | undefined;
index?: number | undefined;
theme?: string | undefined;
leafCount?: number | undefined;
viewedLeafCount?: number | undefined;
childCount?: number | undefined;
hasPremiumExtras?: string | undefined;
hasPremiumPrimaryExtra?: string | undefined;
parentRatingKey?: string | undefined;
parentGuid?: string | undefined;
parentStudio?: string | undefined;
parentKey?: string | undefined;
parentTitle?: string | undefined;
parentIndex?: number | undefined;
parentYear?: number | undefined;
parentThumb?: string | undefined;
parentTheme?: string | undefined;
}; };
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryItemsMetadata> = z export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryItemsMetadata> = z
@@ -732,6 +866,13 @@ export namespace GetLibraryItemsMetadata$ {
chapterSource: z.string().optional(), chapterSource: z.string().optional(),
primaryExtraKey: z.string().optional(), primaryExtraKey: z.string().optional(),
ratingImage: z.string().optional(), ratingImage: z.string().optional(),
grandparentRatingKey: z.string().optional(),
grandparentGuid: z.string().optional(),
grandparentKey: z.string().optional(),
grandparentTitle: z.string().optional(),
grandparentThumb: z.string().optional(),
grandparentArt: z.string().optional(),
grandparentTheme: z.string().optional(),
media: z.array(z.lazy(() => GetLibraryItemsMedia$.outboundSchema)).optional(), media: z.array(z.lazy(() => GetLibraryItemsMedia$.outboundSchema)).optional(),
genre: z.array(z.lazy(() => GetLibraryItemsGenre$.outboundSchema)).optional(), genre: z.array(z.lazy(() => GetLibraryItemsGenre$.outboundSchema)).optional(),
country: z.array(z.lazy(() => GetLibraryItemsCountry$.outboundSchema)).optional(), country: z.array(z.lazy(() => GetLibraryItemsCountry$.outboundSchema)).optional(),
@@ -744,6 +885,22 @@ export namespace GetLibraryItemsMetadata$ {
originalTitle: z.string().optional(), originalTitle: z.string().optional(),
viewOffset: z.number().int().optional(), viewOffset: z.number().int().optional(),
skipCount: z.number().int().optional(), skipCount: z.number().int().optional(),
index: z.number().int().optional(),
theme: z.string().optional(),
leafCount: z.number().int().optional(),
viewedLeafCount: z.number().int().optional(),
childCount: z.number().int().optional(),
hasPremiumExtras: z.string().optional(),
hasPremiumPrimaryExtra: z.string().optional(),
parentRatingKey: z.string().optional(),
parentGuid: z.string().optional(),
parentStudio: z.string().optional(),
parentKey: z.string().optional(),
parentTitle: z.string().optional(),
parentIndex: z.number().int().optional(),
parentYear: z.number().int().optional(),
parentThumb: z.string().optional(),
parentTheme: z.string().optional(),
}) })
.transform((v) => { .transform((v) => {
return { return {
@@ -775,6 +932,23 @@ export namespace GetLibraryItemsMetadata$ {
? null ? null
: { primaryExtraKey: v.primaryExtraKey }), : { primaryExtraKey: v.primaryExtraKey }),
...(v.ratingImage === undefined ? null : { ratingImage: v.ratingImage }), ...(v.ratingImage === undefined ? null : { ratingImage: v.ratingImage }),
...(v.grandparentRatingKey === undefined
? null
: { grandparentRatingKey: v.grandparentRatingKey }),
...(v.grandparentGuid === undefined
? null
: { grandparentGuid: v.grandparentGuid }),
...(v.grandparentKey === undefined ? null : { grandparentKey: v.grandparentKey }),
...(v.grandparentTitle === undefined
? null
: { grandparentTitle: v.grandparentTitle }),
...(v.grandparentThumb === undefined
? null
: { grandparentThumb: v.grandparentThumb }),
...(v.grandparentArt === undefined ? null : { grandparentArt: v.grandparentArt }),
...(v.grandparentTheme === undefined
? null
: { grandparentTheme: v.grandparentTheme }),
...(v.media === undefined ? null : { Media: v.media }), ...(v.media === undefined ? null : { Media: v.media }),
...(v.genre === undefined ? null : { Genre: v.genre }), ...(v.genre === undefined ? null : { Genre: v.genre }),
...(v.country === undefined ? null : { Country: v.country }), ...(v.country === undefined ? null : { Country: v.country }),
@@ -787,6 +961,30 @@ export namespace GetLibraryItemsMetadata$ {
...(v.originalTitle === undefined ? null : { originalTitle: v.originalTitle }), ...(v.originalTitle === undefined ? null : { originalTitle: v.originalTitle }),
...(v.viewOffset === undefined ? null : { viewOffset: v.viewOffset }), ...(v.viewOffset === undefined ? null : { viewOffset: v.viewOffset }),
...(v.skipCount === undefined ? null : { skipCount: v.skipCount }), ...(v.skipCount === undefined ? null : { skipCount: v.skipCount }),
...(v.index === undefined ? null : { index: v.index }),
...(v.theme === undefined ? null : { theme: v.theme }),
...(v.leafCount === undefined ? null : { leafCount: v.leafCount }),
...(v.viewedLeafCount === undefined
? null
: { viewedLeafCount: v.viewedLeafCount }),
...(v.childCount === undefined ? null : { childCount: v.childCount }),
...(v.hasPremiumExtras === undefined
? null
: { hasPremiumExtras: v.hasPremiumExtras }),
...(v.hasPremiumPrimaryExtra === undefined
? null
: { hasPremiumPrimaryExtra: v.hasPremiumPrimaryExtra }),
...(v.parentRatingKey === undefined
? null
: { parentRatingKey: v.parentRatingKey }),
...(v.parentGuid === undefined ? null : { parentGuid: v.parentGuid }),
...(v.parentStudio === undefined ? null : { parentStudio: v.parentStudio }),
...(v.parentKey === undefined ? null : { parentKey: v.parentKey }),
...(v.parentTitle === undefined ? null : { parentTitle: v.parentTitle }),
...(v.parentIndex === undefined ? null : { parentIndex: v.parentIndex }),
...(v.parentYear === undefined ? null : { parentYear: v.parentYear }),
...(v.parentThumb === undefined ? null : { parentThumb: v.parentThumb }),
...(v.parentTheme === undefined ? null : { parentTheme: v.parentTheme }),
}; };
}); });
} }
@@ -808,6 +1006,7 @@ export namespace GetLibraryItemsMediaContainer$ {
title2?: string | undefined; title2?: string | undefined;
viewGroup?: string | undefined; viewGroup?: string | undefined;
viewMode?: number | undefined; viewMode?: number | undefined;
mixedParents?: boolean | undefined;
Metadata?: Array<GetLibraryItemsMetadata$.Inbound> | undefined; Metadata?: Array<GetLibraryItemsMetadata$.Inbound> | undefined;
}; };
@@ -827,6 +1026,7 @@ export namespace GetLibraryItemsMediaContainer$ {
title2: z.string().optional(), title2: z.string().optional(),
viewGroup: z.string().optional(), viewGroup: z.string().optional(),
viewMode: z.number().int().optional(), viewMode: z.number().int().optional(),
mixedParents: z.boolean().optional(),
Metadata: z.array(z.lazy(() => GetLibraryItemsMetadata$.inboundSchema)).optional(), Metadata: z.array(z.lazy(() => GetLibraryItemsMetadata$.inboundSchema)).optional(),
}) })
.transform((v) => { .transform((v) => {
@@ -853,6 +1053,7 @@ export namespace GetLibraryItemsMediaContainer$ {
...(v.title2 === undefined ? null : { title2: v.title2 }), ...(v.title2 === undefined ? null : { title2: v.title2 }),
...(v.viewGroup === undefined ? null : { viewGroup: v.viewGroup }), ...(v.viewGroup === undefined ? null : { viewGroup: v.viewGroup }),
...(v.viewMode === undefined ? null : { viewMode: v.viewMode }), ...(v.viewMode === undefined ? null : { viewMode: v.viewMode }),
...(v.mixedParents === undefined ? null : { mixedParents: v.mixedParents }),
...(v.Metadata === undefined ? null : { metadata: v.Metadata }), ...(v.Metadata === undefined ? null : { metadata: v.Metadata }),
}; };
}); });
@@ -872,6 +1073,7 @@ export namespace GetLibraryItemsMediaContainer$ {
title2?: string | undefined; title2?: string | undefined;
viewGroup?: string | undefined; viewGroup?: string | undefined;
viewMode?: number | undefined; viewMode?: number | undefined;
mixedParents?: boolean | undefined;
Metadata?: Array<GetLibraryItemsMetadata$.Outbound> | undefined; Metadata?: Array<GetLibraryItemsMetadata$.Outbound> | undefined;
}; };
@@ -892,6 +1094,7 @@ export namespace GetLibraryItemsMediaContainer$ {
title2: z.string().optional(), title2: z.string().optional(),
viewGroup: z.string().optional(), viewGroup: z.string().optional(),
viewMode: z.number().int().optional(), viewMode: z.number().int().optional(),
mixedParents: z.boolean().optional(),
metadata: z.array(z.lazy(() => GetLibraryItemsMetadata$.outboundSchema)).optional(), metadata: z.array(z.lazy(() => GetLibraryItemsMetadata$.outboundSchema)).optional(),
}) })
.transform((v) => { .transform((v) => {
@@ -920,6 +1123,7 @@ export namespace GetLibraryItemsMediaContainer$ {
...(v.title2 === undefined ? null : { title2: v.title2 }), ...(v.title2 === undefined ? null : { title2: v.title2 }),
...(v.viewGroup === undefined ? null : { viewGroup: v.viewGroup }), ...(v.viewGroup === undefined ? null : { viewGroup: v.viewGroup }),
...(v.viewMode === undefined ? null : { viewMode: v.viewMode }), ...(v.viewMode === undefined ? null : { viewMode: v.viewMode }),
...(v.mixedParents === undefined ? null : { mixedParents: v.mixedParents }),
...(v.metadata === undefined ? null : { Metadata: v.metadata }), ...(v.metadata === undefined ? null : { Metadata: v.metadata }),
}; };
}); });

View File

@@ -0,0 +1,389 @@
/*
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { z } from "zod";
export const GetPinServerList = ["https://plex.tv/api/v2"] as const;
export type GetPinRequest = {
/**
* The unique identifier for the client application
*
* @remarks
* This is used to track the client application and its usage
* (UUID, serial number, or other number unique per device)
*
*/
xPlexClientIdentifier: string;
/**
* Determines the kind of code returned by the API call
*
* @remarks
* Strong codes are used for Pin authentication flows
* Non-Strong codes are used for `Plex.tv/link`
*
*/
strong?: boolean | undefined;
};
export type Location = {
code?: string | undefined;
europeanUnionMember?: boolean | undefined;
continentCode?: string | undefined;
country?: string | undefined;
city?: string | undefined;
timeZone?: string | undefined;
postalCode?: number | undefined;
inPrivacyRestrictedCountry?: boolean | undefined;
subdivisions?: string | undefined;
coordinates?: string | undefined;
};
/**
* The Pin
*/
export type GetPinResponseBody = {
/**
* PinID for use with authentication
*/
id?: number | undefined;
code?: string | undefined;
product?: string | undefined;
trusted?: boolean | undefined;
/**
* a link to a QR code hosted on plex.tv
*
* @remarks
* The QR code redirects to the relevant `plex.tv/link` authentication page
* Which then prompts the user for the 4 Digit Link Pin
*
*/
qr?: string | undefined;
clientIdentifier?: string | undefined;
location?: Location | undefined;
expiresIn?: number | undefined;
createdAt?: Date | undefined;
expiresAt?: Date | undefined;
authToken?: string | undefined;
newRegistration?: string | undefined;
};
export type GetPinResponse = {
/**
* HTTP response content type for this operation
*/
contentType: string;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse: Response;
/**
* The Pin
*/
object?: GetPinResponseBody | undefined;
};
/** @internal */
export namespace GetPinRequest$ {
export type Inbound = {
"X-Plex-Client-Identifier": string;
strong?: boolean | undefined;
};
export const inboundSchema: z.ZodType<GetPinRequest, z.ZodTypeDef, Inbound> = z
.object({
"X-Plex-Client-Identifier": z.string(),
strong: z.boolean().default(false),
})
.transform((v) => {
return {
xPlexClientIdentifier: v["X-Plex-Client-Identifier"],
...(v.strong === undefined ? null : { strong: v.strong }),
};
});
export type Outbound = {
"X-Plex-Client-Identifier": string;
strong: boolean;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPinRequest> = z
.object({
xPlexClientIdentifier: z.string(),
strong: z.boolean().default(false),
})
.transform((v) => {
return {
"X-Plex-Client-Identifier": v.xPlexClientIdentifier,
strong: v.strong,
};
});
}
/** @internal */
export namespace Location$ {
export type Inbound = {
code?: string | undefined;
european_union_member?: boolean | undefined;
continent_code?: string | undefined;
country?: string | undefined;
city?: string | undefined;
time_zone?: string | undefined;
postal_code?: number | undefined;
in_privacy_restricted_country?: boolean | undefined;
subdivisions?: string | undefined;
coordinates?: string | undefined;
};
export const inboundSchema: z.ZodType<Location, z.ZodTypeDef, Inbound> = z
.object({
code: z.string().optional(),
european_union_member: z.boolean().optional(),
continent_code: z.string().optional(),
country: z.string().optional(),
city: z.string().optional(),
time_zone: z.string().optional(),
postal_code: z.number().optional(),
in_privacy_restricted_country: z.boolean().optional(),
subdivisions: z.string().optional(),
coordinates: z.string().optional(),
})
.transform((v) => {
return {
...(v.code === undefined ? null : { code: v.code }),
...(v.european_union_member === undefined
? null
: { europeanUnionMember: v.european_union_member }),
...(v.continent_code === undefined ? null : { continentCode: v.continent_code }),
...(v.country === undefined ? null : { country: v.country }),
...(v.city === undefined ? null : { city: v.city }),
...(v.time_zone === undefined ? null : { timeZone: v.time_zone }),
...(v.postal_code === undefined ? null : { postalCode: v.postal_code }),
...(v.in_privacy_restricted_country === undefined
? null
: { inPrivacyRestrictedCountry: v.in_privacy_restricted_country }),
...(v.subdivisions === undefined ? null : { subdivisions: v.subdivisions }),
...(v.coordinates === undefined ? null : { coordinates: v.coordinates }),
};
});
export type Outbound = {
code?: string | undefined;
european_union_member?: boolean | undefined;
continent_code?: string | undefined;
country?: string | undefined;
city?: string | undefined;
time_zone?: string | undefined;
postal_code?: number | undefined;
in_privacy_restricted_country?: boolean | undefined;
subdivisions?: string | undefined;
coordinates?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Location> = z
.object({
code: z.string().optional(),
europeanUnionMember: z.boolean().optional(),
continentCode: z.string().optional(),
country: z.string().optional(),
city: z.string().optional(),
timeZone: z.string().optional(),
postalCode: z.number().optional(),
inPrivacyRestrictedCountry: z.boolean().optional(),
subdivisions: z.string().optional(),
coordinates: z.string().optional(),
})
.transform((v) => {
return {
...(v.code === undefined ? null : { code: v.code }),
...(v.europeanUnionMember === undefined
? null
: { european_union_member: v.europeanUnionMember }),
...(v.continentCode === undefined ? null : { continent_code: v.continentCode }),
...(v.country === undefined ? null : { country: v.country }),
...(v.city === undefined ? null : { city: v.city }),
...(v.timeZone === undefined ? null : { time_zone: v.timeZone }),
...(v.postalCode === undefined ? null : { postal_code: v.postalCode }),
...(v.inPrivacyRestrictedCountry === undefined
? null
: { in_privacy_restricted_country: v.inPrivacyRestrictedCountry }),
...(v.subdivisions === undefined ? null : { subdivisions: v.subdivisions }),
...(v.coordinates === undefined ? null : { coordinates: v.coordinates }),
};
});
}
/** @internal */
export namespace GetPinResponseBody$ {
export type Inbound = {
id?: number | undefined;
code?: string | undefined;
product?: string | undefined;
trusted?: boolean | undefined;
qr?: string | undefined;
clientIdentifier?: string | undefined;
location?: Location$.Inbound | undefined;
expiresIn?: number | undefined;
createdAt?: string | undefined;
expiresAt?: string | undefined;
authToken?: string | undefined;
newRegistration?: string | undefined;
};
export const inboundSchema: z.ZodType<GetPinResponseBody, z.ZodTypeDef, Inbound> = z
.object({
id: z.number().optional(),
code: z.string().optional(),
product: z.string().optional(),
trusted: z.boolean().optional(),
qr: z.string().optional(),
clientIdentifier: z.string().optional(),
location: z.lazy(() => Location$.inboundSchema).optional(),
expiresIn: z.number().optional(),
createdAt: z
.string()
.datetime({ offset: true })
.transform((v) => new Date(v))
.optional(),
expiresAt: z
.string()
.datetime({ offset: true })
.transform((v) => new Date(v))
.optional(),
authToken: z.string().optional(),
newRegistration: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.code === undefined ? null : { code: v.code }),
...(v.product === undefined ? null : { product: v.product }),
...(v.trusted === undefined ? null : { trusted: v.trusted }),
...(v.qr === undefined ? null : { qr: v.qr }),
...(v.clientIdentifier === undefined
? null
: { clientIdentifier: v.clientIdentifier }),
...(v.location === undefined ? null : { location: v.location }),
...(v.expiresIn === undefined ? null : { expiresIn: v.expiresIn }),
...(v.createdAt === undefined ? null : { createdAt: v.createdAt }),
...(v.expiresAt === undefined ? null : { expiresAt: v.expiresAt }),
...(v.authToken === undefined ? null : { authToken: v.authToken }),
...(v.newRegistration === undefined
? null
: { newRegistration: v.newRegistration }),
};
});
export type Outbound = {
id?: number | undefined;
code?: string | undefined;
product?: string | undefined;
trusted?: boolean | undefined;
qr?: string | undefined;
clientIdentifier?: string | undefined;
location?: Location$.Outbound | undefined;
expiresIn?: number | undefined;
createdAt?: string | undefined;
expiresAt?: string | undefined;
authToken?: string | undefined;
newRegistration?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPinResponseBody> = z
.object({
id: z.number().optional(),
code: z.string().optional(),
product: z.string().optional(),
trusted: z.boolean().optional(),
qr: z.string().optional(),
clientIdentifier: z.string().optional(),
location: z.lazy(() => Location$.outboundSchema).optional(),
expiresIn: z.number().optional(),
createdAt: z
.date()
.transform((v) => v.toISOString())
.optional(),
expiresAt: z
.date()
.transform((v) => v.toISOString())
.optional(),
authToken: z.string().optional(),
newRegistration: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.code === undefined ? null : { code: v.code }),
...(v.product === undefined ? null : { product: v.product }),
...(v.trusted === undefined ? null : { trusted: v.trusted }),
...(v.qr === undefined ? null : { qr: v.qr }),
...(v.clientIdentifier === undefined
? null
: { clientIdentifier: v.clientIdentifier }),
...(v.location === undefined ? null : { location: v.location }),
...(v.expiresIn === undefined ? null : { expiresIn: v.expiresIn }),
...(v.createdAt === undefined ? null : { createdAt: v.createdAt }),
...(v.expiresAt === undefined ? null : { expiresAt: v.expiresAt }),
...(v.authToken === undefined ? null : { authToken: v.authToken }),
...(v.newRegistration === undefined
? null
: { newRegistration: v.newRegistration }),
};
});
}
/** @internal */
export namespace GetPinResponse$ {
export type Inbound = {
ContentType: string;
StatusCode: number;
RawResponse: Response;
object?: GetPinResponseBody$.Inbound | undefined;
};
export const inboundSchema: z.ZodType<GetPinResponse, z.ZodTypeDef, Inbound> = z
.object({
ContentType: z.string(),
StatusCode: z.number().int(),
RawResponse: z.instanceof(Response),
object: z.lazy(() => GetPinResponseBody$.inboundSchema).optional(),
})
.transform((v) => {
return {
contentType: v.ContentType,
statusCode: v.StatusCode,
rawResponse: v.RawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
});
export type Outbound = {
ContentType: string;
StatusCode: number;
RawResponse: never;
object?: GetPinResponseBody$.Outbound | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPinResponse> = z
.object({
contentType: z.string(),
statusCode: z.number().int(),
rawResponse: z.instanceof(Response).transform(() => {
throw new Error("Response cannot be serialized");
}),
object: z.lazy(() => GetPinResponseBody$.outboundSchema).optional(),
})
.transform((v) => {
return {
ContentType: v.contentType,
StatusCode: v.statusCode,
RawResponse: v.rawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
});
}

View File

@@ -0,0 +1,120 @@
/*
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { z } from "zod";
export const GetTokenServerList = ["https://plex.tv/api/v2"] as const;
export type GetTokenRequest = {
/**
* The PinID to retrieve an access token for
*/
pinID: string;
/**
* The unique identifier for the client application
*
* @remarks
* This is used to track the client application and its usage
* (UUID, serial number, or other number unique per device)
*
*/
xPlexClientIdentifier: string;
};
export type GetTokenResponse = {
/**
* HTTP response content type for this operation
*/
contentType: string;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse: Response;
};
/** @internal */
export namespace GetTokenRequest$ {
export type Inbound = {
pinID: string;
"X-Plex-Client-Identifier": string;
};
export const inboundSchema: z.ZodType<GetTokenRequest, z.ZodTypeDef, Inbound> = z
.object({
pinID: z.string(),
"X-Plex-Client-Identifier": z.string(),
})
.transform((v) => {
return {
pinID: v.pinID,
xPlexClientIdentifier: v["X-Plex-Client-Identifier"],
};
});
export type Outbound = {
pinID: string;
"X-Plex-Client-Identifier": string;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetTokenRequest> = z
.object({
pinID: z.string(),
xPlexClientIdentifier: z.string(),
})
.transform((v) => {
return {
pinID: v.pinID,
"X-Plex-Client-Identifier": v.xPlexClientIdentifier,
};
});
}
/** @internal */
export namespace GetTokenResponse$ {
export type Inbound = {
ContentType: string;
StatusCode: number;
RawResponse: Response;
};
export const inboundSchema: z.ZodType<GetTokenResponse, z.ZodTypeDef, Inbound> = z
.object({
ContentType: z.string(),
StatusCode: z.number().int(),
RawResponse: z.instanceof(Response),
})
.transform((v) => {
return {
contentType: v.ContentType,
statusCode: v.StatusCode,
rawResponse: v.RawResponse,
};
});
export type Outbound = {
ContentType: string;
StatusCode: number;
RawResponse: never;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetTokenResponse> = z
.object({
contentType: z.string(),
statusCode: z.number().int(),
rawResponse: z.instanceof(Response).transform(() => {
throw new Error("Response cannot be serialized");
}),
})
.transform((v) => {
return {
ContentType: v.contentType,
StatusCode: v.statusCode,
RawResponse: v.rawResponse,
};
});
}

View File

@@ -24,6 +24,7 @@ export * from "./getmetadata";
export * from "./getmetadatachildren"; export * from "./getmetadatachildren";
export * from "./getmyplexaccount"; export * from "./getmyplexaccount";
export * from "./getondeck"; export * from "./getondeck";
export * from "./getpin";
export * from "./getplaylist"; export * from "./getplaylist";
export * from "./getplaylistcontents"; export * from "./getplaylistcontents";
export * from "./getplaylists"; export * from "./getplaylists";
@@ -39,6 +40,7 @@ export * from "./getsessionhistory";
export * from "./getsessions"; export * from "./getsessions";
export * from "./getsourceconnectioninformation"; export * from "./getsourceconnectioninformation";
export * from "./gettimeline"; export * from "./gettimeline";
export * from "./gettoken";
export * from "./gettranscodesessions"; export * from "./gettranscodesessions";
export * from "./gettransienttoken"; export * from "./gettransienttoken";
export * from "./getupdatestatus"; export * from "./getupdatestatus";

View File

@@ -7,7 +7,7 @@ import { z } from "zod";
/** /**
* Plex content type to search for * Plex content type to search for
*/ */
export enum TypeT { export enum Type {
One = 1, One = 1,
Two = 2, Two = 2,
Three = 3, Three = 3,
@@ -22,7 +22,7 @@ export type SearchLibraryRequest = {
/** /**
* Plex content type to search for * Plex content type to search for
*/ */
type: TypeT; type: Type;
}; };
export type SearchLibraryMetadata = { export type SearchLibraryMetadata = {
@@ -91,19 +91,19 @@ export type SearchLibraryResponse = {
}; };
/** @internal */ /** @internal */
export const TypeT$ = z.nativeEnum(TypeT); export const Type$ = z.nativeEnum(Type);
/** @internal */ /** @internal */
export namespace SearchLibraryRequest$ { export namespace SearchLibraryRequest$ {
export type Inbound = { export type Inbound = {
sectionId: number; sectionId: number;
type: TypeT; type: Type;
}; };
export const inboundSchema: z.ZodType<SearchLibraryRequest, z.ZodTypeDef, Inbound> = z export const inboundSchema: z.ZodType<SearchLibraryRequest, z.ZodTypeDef, Inbound> = z
.object({ .object({
sectionId: z.number().int(), sectionId: z.number().int(),
type: TypeT$, type: Type$,
}) })
.transform((v) => { .transform((v) => {
return { return {
@@ -114,13 +114,13 @@ export namespace SearchLibraryRequest$ {
export type Outbound = { export type Outbound = {
sectionId: number; sectionId: number;
type: TypeT; type: Type;
}; };
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SearchLibraryRequest> = z export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SearchLibraryRequest> = z
.object({ .object({
sectionId: z.number().int(), sectionId: z.number().int(),
type: TypeT$, type: Type$,
}) })
.transform((v) => { .transform((v) => {
return { return {

View File

@@ -609,7 +609,7 @@ export class Library extends ClientSDK {
*/ */
async searchLibrary( async searchLibrary(
sectionId: number, sectionId: number,
type: operations.TypeT, type: operations.Type,
options?: RequestOptions options?: RequestOptions
): Promise<operations.SearchLibraryResponse> { ): Promise<operations.SearchLibraryResponse> {
const input$: operations.SearchLibraryRequest = { const input$: operations.SearchLibraryRequest = {

204
src/sdk/plex.ts Normal file
View File

@@ -0,0 +1,204 @@
/*
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config";
import * as enc$ from "../lib/encodings";
import { HTTPClient } from "../lib/http";
import { ClientSDK, RequestOptions } from "../lib/sdks";
import * as errors from "../models/errors";
import * as operations from "../models/operations";
export class Plex extends ClientSDK {
private readonly options$: SDKOptions;
constructor(options: SDKOptions = {}) {
super({
client: options.httpClient || new HTTPClient(),
baseURL: serverURLFromOptions(options),
});
this.options$ = options;
void this.options$;
}
/**
* Get a Pin
*
* @remarks
* Retrieve a Pin from Plex.tv for authentication flows
*/
async getPin(
xPlexClientIdentifier: string,
strong?: boolean | undefined,
options?: RequestOptions & { serverURL?: string }
): Promise<operations.GetPinResponse> {
const input$: operations.GetPinRequest = {
xPlexClientIdentifier: xPlexClientIdentifier,
strong: strong,
};
const headers$ = new Headers();
headers$.set("user-agent", SDK_METADATA.userAgent);
headers$.set("Accept", "application/json");
const payload$ = operations.GetPinRequest$.outboundSchema.parse(input$);
const body$ = null;
const path$ = this.templateURLComponent("/pins")();
const query$ = [
enc$.encodeForm("strong", payload$.strong, { explode: true, charEncoding: "percent" }),
]
.filter(Boolean)
.join("&");
headers$.set(
"X-Plex-Client-Identifier",
enc$.encodeSimple("X-Plex-Client-Identifier", payload$["X-Plex-Client-Identifier"], {
explode: false,
charEncoding: "none",
})
);
const baseURL$ =
options?.serverURL ||
this.templateURLComponent(operations.GetPinServerList[0], {
charEncoding: "percent",
})();
let security$;
if (typeof this.options$.accessToken === "function") {
security$ = { accessToken: await this.options$.accessToken() };
} else if (this.options$.accessToken) {
security$ = { accessToken: this.options$.accessToken };
} else {
security$ = {};
}
const securitySettings$ = this.resolveGlobalSecurity(security$);
const response = await this.fetch$(
{
security: securitySettings$,
method: "POST",
baseURL: baseURL$,
path: path$,
headers: headers$,
query: query$,
body: body$,
},
options
);
const responseFields$ = {
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
StatusCode: response.status,
RawResponse: response,
};
if (this.matchResponse(response, 200, "application/json")) {
const responseBody = await response.json();
const result = operations.GetPinResponse$.inboundSchema.parse({
...responseFields$,
object: responseBody,
});
return result;
} else if (this.matchResponse(response, 400, "application/json")) {
const responseBody = await response.json();
const result = errors.GetPinResponseBody$.inboundSchema.parse({
...responseFields$,
...responseBody,
});
throw result;
} else {
const responseBody = await response.text();
throw new errors.SDKError("Unexpected API response", response, responseBody);
}
}
/**
* Get Access Token
*
* @remarks
* Retrieve an Access Token from Plex.tv after the Pin has already been authenticated
*/
async getToken(
pinID: string,
xPlexClientIdentifier: string,
options?: RequestOptions & { serverURL?: string }
): Promise<operations.GetTokenResponse> {
const input$: operations.GetTokenRequest = {
pinID: pinID,
xPlexClientIdentifier: xPlexClientIdentifier,
};
const headers$ = new Headers();
headers$.set("user-agent", SDK_METADATA.userAgent);
headers$.set("Accept", "application/json");
const payload$ = operations.GetTokenRequest$.outboundSchema.parse(input$);
const body$ = null;
const pathParams$ = {
pinID: enc$.encodeSimple("pinID", payload$.pinID, {
explode: false,
charEncoding: "percent",
}),
};
const path$ = this.templateURLComponent("/pins/{pinID}")(pathParams$);
headers$.set(
"X-Plex-Client-Identifier",
enc$.encodeSimple("X-Plex-Client-Identifier", payload$["X-Plex-Client-Identifier"], {
explode: false,
charEncoding: "none",
})
);
const baseURL$ =
options?.serverURL ||
this.templateURLComponent(operations.GetTokenServerList[0], {
charEncoding: "percent",
})();
let security$;
if (typeof this.options$.accessToken === "function") {
security$ = { accessToken: await this.options$.accessToken() };
} else if (this.options$.accessToken) {
security$ = { accessToken: this.options$.accessToken };
} else {
security$ = {};
}
const securitySettings$ = this.resolveGlobalSecurity(security$);
const response = await this.fetch$(
{
security: securitySettings$,
method: "GET",
baseURL: baseURL$,
path: path$,
headers: headers$,
body: body$,
},
options
);
const responseFields$ = {
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
StatusCode: response.status,
RawResponse: response,
};
if (this.matchStatusCode(response, 200)) {
// fallthrough
} else if (this.matchResponse(response, 400, "application/json")) {
const responseBody = await response.json();
const result = errors.GetTokenResponseBody$.inboundSchema.parse({
...responseFields$,
...responseBody,
});
throw result;
} else {
const responseBody = await response.text();
throw new errors.SDKError("Unexpected API response", response, responseBody);
}
return operations.GetTokenResponse$.inboundSchema.parse(responseFields$);
}
}

View File

@@ -12,6 +12,7 @@ import { Library } from "./library";
import { Log } from "./log"; import { Log } from "./log";
import { Media } from "./media"; import { Media } from "./media";
import { Playlists } from "./playlists"; import { Playlists } from "./playlists";
import { Plex } from "./plex";
import { Search } from "./search"; import { Search } from "./search";
import { Security } from "./security"; import { Security } from "./security";
import { Server } from "./server"; import { Server } from "./server";
@@ -72,6 +73,11 @@ export class PlexAPI extends ClientSDK {
return (this._log ??= new Log(this.options$)); return (this._log ??= new Log(this.options$));
} }
private _plex?: Plex;
get plex() {
return (this._plex ??= new Plex(this.options$));
}
private _playlists?: Playlists; private _playlists?: Playlists;
get playlists() { get playlists() {
return (this._playlists ??= new Playlists(this.options$)); return (this._playlists ??= new Playlists(this.options$));