Compare commits

...

2 Commits

Author SHA1 Message Date
speakeasybot
763aa8e800 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.535.1 2025-04-19 00:12:04 +00:00
speakeasybot
7a950ea773 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.531.4 2025-04-14 00:12:56 +00:00
103 changed files with 1902 additions and 738 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: 56461ffb5578bc5d5609498b7566931a docChecksum: 3a619a1b9e1e14a2e6e8d574c2e2d637
docVersion: 0.0.3 docVersion: 0.0.3
speakeasyVersion: 1.529.1 speakeasyVersion: 1.535.1
generationVersion: 2.566.5 generationVersion: 2.585.2
releaseVersion: 0.36.1 releaseVersion: 0.37.0
configChecksum: 8d88187f30b36bd7b76ad5d77b2b59f9 configChecksum: 6123b3157e6662ed6918a7c050ffebc5
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
@@ -15,7 +15,7 @@ features:
typescript: typescript:
additionalDependencies: 0.1.0 additionalDependencies: 0.1.0
constsAndDefaults: 0.1.11 constsAndDefaults: 0.1.11
core: 3.21.5 core: 3.21.6
defaultEnabledRetries: 0.1.0 defaultEnabledRetries: 0.1.0
deprecations: 2.81.1 deprecations: 2.81.1
downloadStreams: 0.1.1 downloadStreams: 0.1.1
@@ -31,6 +31,7 @@ features:
methodServerURLs: 2.82.1 methodServerURLs: 2.82.1
nameOverrides: 2.81.2 nameOverrides: 2.81.2
nullables: 0.1.1 nullables: 0.1.1
openEnums: 0.1.1
responseFormat: 0.2.3 responseFormat: 0.2.3
retries: 2.83.0 retries: 2.83.0
sdkHooks: 0.2.0 sdkHooks: 0.2.0

View File

@@ -15,7 +15,7 @@ generation:
oAuth2ClientCredentialsEnabled: true oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: false oAuth2PasswordEnabled: false
typescript: typescript:
version: 0.36.1 version: 0.37.0
additionalDependencies: additionalDependencies:
dependencies: {} dependencies: {}
devDependencies: {} devDependencies: {}

View File

@@ -1,4 +1,4 @@
speakeasyVersion: 1.529.1 speakeasyVersion: 1.535.1
sources: sources:
my-source: my-source:
sourceNamespace: my-source sourceNamespace: my-source
@@ -9,20 +9,20 @@ sources:
- main - main
plexapi: plexapi:
sourceNamespace: plexapi sourceNamespace: plexapi
sourceRevisionDigest: sha256:ea508e3da23b283f47aeb4384d6b3ab374a27bdffb8d8d8376cedbad3ad77a06 sourceRevisionDigest: sha256:b2f9599237ceb13cf8f9c1693e38b290177b65fb389cebf0c3c60b8ef4778615
sourceBlobDigest: sha256:c210adbd02b0213b9e6f95ffc27f60ec38f8f9040137d55ccf2b650d92ab0ff5 sourceBlobDigest: sha256:f8df9ef88ada992cd981d601e6c0b45cc82db76aba3d915c2f9d08f90c81ced9
tags: tags:
- latest - latest
- speakeasy-sdk-regen-1743898297 - speakeasy-sdk-regen-1745021437
- 0.0.3 - 0.0.3
targets: targets:
plexjs: plexjs:
source: plexapi source: plexapi
sourceNamespace: plexapi sourceNamespace: plexapi
sourceRevisionDigest: sha256:ea508e3da23b283f47aeb4384d6b3ab374a27bdffb8d8d8376cedbad3ad77a06 sourceRevisionDigest: sha256:b2f9599237ceb13cf8f9c1693e38b290177b65fb389cebf0c3c60b8ef4778615
sourceBlobDigest: sha256:c210adbd02b0213b9e6f95ffc27f60ec38f8f9040137d55ccf2b650d92ab0ff5 sourceBlobDigest: sha256:f8df9ef88ada992cd981d601e6c0b45cc82db76aba3d915c2f9d08f90c81ced9
codeSamplesNamespace: code-samples-typescript-plexjs codeSamplesNamespace: code-samples-typescript-plexjs
codeSamplesRevisionDigest: sha256:871b7aa4b65bfb8932c4593238410f8f50b425e8039c1edd716be8b5f253ef9a codeSamplesRevisionDigest: sha256:86b4c9afc42dfef089cf6e9c6ad9f7df1060563fa04a7b1cdaa1f88b4c8cd902
workflow: workflow:
workflowVersion: 1.0.0 workflowVersion: 1.0.0
speakeasyVersion: latest speakeasyVersion: latest

View File

@@ -1298,4 +1298,24 @@ Based on:
### Generated ### Generated
- [typescript v0.36.1] . - [typescript v0.36.1] .
### Releases ### Releases
- [NPM v0.36.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.36.1 - . - [NPM v0.36.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.36.1 - .
## 2025-04-14 00:11:23
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.531.4 (2.570.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.36.2] .
### Releases
- [NPM v0.36.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.36.2 - .
## 2025-04-19 00:10:19
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.535.1 (2.585.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.37.0] .
### Releases
- [NPM v0.37.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.37.0 - .

View File

@@ -12,8 +12,11 @@ let value: CreatePlaylistQueryParamType = CreatePlaylistQueryParamType.Photo;
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| ------- | ------- |
| `Audio` | audio | | Name | Value |
| `Video` | video | | ---------------------- | ---------------------- |
| `Photo` | photo | | `Audio` | audio |
| `Video` | video |
| `Photo` | photo |
| - | `Unrecognized<string>` |

View File

@@ -13,7 +13,10 @@ let value: EnableCreditsMarkerGeneration =
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| ---------------- | ---------------- |
| `LibraryDefault` | -1 | | Name | Value |
| `Disabled` | 0 | | ---------------------- | ---------------------- |
| `LibraryDefault` | -1 |
| `Disabled` | 0 |
| - | `Unrecognized<string>` |

View File

@@ -12,8 +12,11 @@ let value: EpisodeSort = EpisodeSort.OldestFirst;
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| ---------------- | ---------------- |
| `LibraryDefault` | -1 | | Name | Value |
| `OldestFirst` | 0 | | ---------------------- | ---------------------- |
| `NewestFirst` | 1 | | `LibraryDefault` | -1 |
| `OldestFirst` | 0 |
| `NewestFirst` | 1 |
| - | `Unrecognized<string>` |

View File

@@ -12,8 +12,11 @@ let value: Filter = Filter.Available;
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| ----------- | ----------- |
| `All` | all | | Name | Value |
| `Available` | available | | ---------------------- | ---------------------- |
| `Released` | released | | `All` | all |
| `Available` | available |
| `Released` | released |
| - | `Unrecognized<string>` |

View File

@@ -12,8 +12,11 @@ let value: FlattenSeasons = FlattenSeasons.Show;
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| ---------------- | ---------------- |
| `LibraryDefault` | -1 | | Name | Value |
| `Hide` | 0 | | ---------------------- | ---------------------- |
| `Show` | 1 | | `LibraryDefault` | -1 |
| `Hide` | 0 |
| `Show` | 1 |
| - | `Unrecognized<string>` |

View File

@@ -19,12 +19,15 @@ let value: GetActorsLibraryQueryParamType =
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<number>` branded type.
| --------- | --------- |
| `Movie` | 1 | | Name | Value |
| `TvShow` | 2 | | ---------------------- | ---------------------- |
| `Season` | 3 | | `Movie` | 1 |
| `Episode` | 4 | | `TvShow` | 2 |
| `Audio` | 8 | | `Season` | 3 |
| `Album` | 9 | | `Episode` | 4 |
| `Track` | 10 | | `Audio` | 8 |
| `Album` | 9 |
| `Track` | 10 |
| - | `Unrecognized<number>` |

View File

@@ -36,26 +36,26 @@ let value: GetAllLibrariesDirectory = {
## Fields ## Fields
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false | | `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false |
| `art` | *string* | :heavy_check_mark: | URL for the background artwork of the media container. | /:/resources/show-fanart.jpg | | `art` | *string* | :heavy_check_mark: | URL for the background artwork of the media container. | /:/resources/show-fanart.jpg |
| `composite` | *string* | :heavy_check_mark: | The relative path to the composite media item. | /library/sections/1/composite/1743824484 | | `composite` | *string* | :heavy_check_mark: | The relative path to the composite media item. | /library/sections/1/composite/1743824484 |
| `filters` | *boolean* | :heavy_check_mark: | UNKNOWN | true | | `filters` | *boolean* | :heavy_check_mark: | UNKNOWN | true |
| `refreshing` | *boolean* | :heavy_check_mark: | Indicates whether the library is currently being refreshed or updated | true | | `refreshing` | *boolean* | :heavy_check_mark: | Indicates whether the library is currently being refreshed or updated | true |
| `thumb` | *string* | :heavy_check_mark: | URL for the thumbnail image of the media container. | /:/resources/show.png | | `thumb` | *string* | :heavy_check_mark: | URL for the thumbnail image of the media container. | /:/resources/show.png |
| `key` | *string* | :heavy_check_mark: | The library key representing the unique identifier | 1 | | `key` | *string* | :heavy_check_mark: | The library key representing the unique identifier | 1 |
| `type` | [operations.GetAllLibrariesType](../../../sdk/models/operations/getalllibrariestype.md) | :heavy_check_mark: | N/A | movie | | `type` | [operations.GetAllLibrariesType](../../../sdk/models/operations/getalllibrariestype.md) | :heavy_check_mark: | N/A | movie |
| `title` | *string* | :heavy_check_mark: | The title of the library | Movies | | `title` | *string* | :heavy_check_mark: | The title of the library | Movies |
| `agent` | *string* | :heavy_check_mark: | The Plex agent used to match and retrieve media metadata. | tv.plex.agents.movie | | `agent` | *string* | :heavy_check_mark: | The Plex agent used to match and retrieve media metadata. | tv.plex.agents.movie |
| `scanner` | *string* | :heavy_check_mark: | UNKNOWN | Plex Movie | | `scanner` | *string* | :heavy_check_mark: | UNKNOWN | Plex Movie |
| `language` | *string* | :heavy_check_mark: | The Plex library language that has been set | en-US | | `language` | *string* | :heavy_check_mark: | The Plex library language that has been set | en-US |
| `uuid` | *string* | :heavy_check_mark: | The universally unique identifier for the library. | e69655a2-ef48-4aba-bb19-01e7d3cc34d6 | | `uuid` | *string* | :heavy_check_mark: | The universally unique identifier for the library. | e69655a2-ef48-4aba-bb19-01e7d3cc34d6 |
| `updatedAt` | *number* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | | `updatedAt` | *number* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
| `createdAt` | *number* | :heavy_minus_sign: | N/A | 1556281940 | | `createdAt` | *number* | :heavy_minus_sign: | N/A | 1556281940 |
| `scannedAt` | *number* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | | `scannedAt` | *number* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
| `content` | *boolean* | :heavy_check_mark: | UNKNOWN | true | | `content` | *boolean* | :heavy_check_mark: | UNKNOWN | true |
| `directory` | *boolean* | :heavy_check_mark: | UNKNOWN | true | | `directory` | *boolean* | :heavy_check_mark: | UNKNOWN | true |
| `contentChangedAt` | *number* | :heavy_check_mark: | The number of seconds since the content was last changed relative to now. | 9173960 | | `contentChangedAt` | *number* | :heavy_check_mark: | Timestamp (in seconds) representing the last time the content was modified.<br/>NOTE: Some Plex server have some absurd values for this field, like 8457612157633039800 so it should be int64<br/> | 9173960 |
| `hidden` | [operations.Hidden](../../../sdk/models/operations/hidden.md) | :heavy_minus_sign: | N/A | 1 | | `hidden` | [operations.Hidden](../../../sdk/models/operations/hidden.md) | :heavy_minus_sign: | N/A | 1 |
| `location` | [operations.GetAllLibrariesLocation](../../../sdk/models/operations/getalllibrarieslocation.md)[] | :heavy_check_mark: | N/A | | | `location` | [operations.GetAllLibrariesLocation](../../../sdk/models/operations/getalllibrarieslocation.md)[] | :heavy_check_mark: | N/A | |

View File

@@ -12,11 +12,14 @@ let value: GetAllLibrariesType = GetAllLibrariesType.Movie;
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| --------- | --------- |
| `Movie` | movie | | Name | Value |
| `TvShow` | show | | ---------------------- | ---------------------- |
| `Season` | season | | `Movie` | movie |
| `Episode` | episode | | `TvShow` | show |
| `Artist` | artist | | `Season` | season |
| `Album` | album | | `Episode` | episode |
| `Artist` | artist |
| `Album` | album |
| - | `Unrecognized<string>` |

View File

@@ -11,9 +11,12 @@ let value: GetAllMediaLibraryLibraryResponseType =
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| ------------- | ------------- |
| `CoverPoster` | coverPoster | | Name | Value |
| `Background` | background | | ---------------------- | ---------------------- |
| `Snapshot` | snapshot | | `CoverPoster` | coverPoster |
| `ClearLogo` | clearLogo | | `Background` | background |
| `Snapshot` | snapshot |
| `ClearLogo` | clearLogo |
| - | `Unrecognized<string>` |

View File

@@ -13,11 +13,14 @@ let value: GetAllMediaLibraryLibraryType = GetAllMediaLibraryLibraryType.Movie;
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| --------- | --------- |
| `Movie` | movie | | Name | Value |
| `TvShow` | show | | ---------------------- | ---------------------- |
| `Season` | season | | `Movie` | movie |
| `Episode` | episode | | `TvShow` | show |
| `Artist` | artist | | `Season` | season |
| `Album` | album | | `Episode` | episode |
| `Artist` | artist |
| `Album` | album |
| - | `Unrecognized<string>` |

View File

@@ -19,12 +19,15 @@ let value: GetAllMediaLibraryQueryParamType =
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<number>` branded type.
| --------- | --------- |
| `Movie` | 1 | | Name | Value |
| `TvShow` | 2 | | ---------------------- | ---------------------- |
| `Season` | 3 | | `Movie` | 1 |
| `Episode` | 4 | | `TvShow` | 2 |
| `Audio` | 8 | | `Season` | 3 |
| `Album` | 9 | | `Episode` | 4 |
| `Track` | 10 | | `Audio` | 8 |
| `Album` | 9 |
| `Track` | 10 |
| - | `Unrecognized<number>` |

View File

@@ -19,12 +19,15 @@ let value: GetCountriesLibraryQueryParamType =
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<number>` branded type.
| --------- | --------- |
| `Movie` | 1 | | Name | Value |
| `TvShow` | 2 | | ---------------------- | ---------------------- |
| `Season` | 3 | | `Movie` | 1 |
| `Episode` | 4 | | `TvShow` | 2 |
| `Audio` | 8 | | `Season` | 3 |
| `Album` | 9 | | `Episode` | 4 |
| `Track` | 10 | | `Audio` | 8 |
| `Album` | 9 |
| `Track` | 10 |
| - | `Unrecognized<number>` |

View File

@@ -19,12 +19,15 @@ let value: GetGenresLibraryQueryParamType =
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<number>` branded type.
| --------- | --------- |
| `Movie` | 1 | | Name | Value |
| `TvShow` | 2 | | ---------------------- | ---------------------- |
| `Season` | 3 | | `Movie` | 1 |
| `Episode` | 4 | | `TvShow` | 2 |
| `Audio` | 8 | | `Season` | 3 |
| `Album` | 9 | | `Episode` | 4 |
| `Track` | 10 | | `Audio` | 8 |
| `Album` | 9 |
| `Track` | 10 |
| - | `Unrecognized<number>` |

View File

@@ -12,7 +12,7 @@ let value: GetLibraryDetailsRequest = {
## Fields ## Fields
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `includeDetails` | [operations.IncludeDetails](../../../sdk/models/operations/includedetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts). <br/>Only exists for backwards compatibility, media providers other than the server libraries have it on always.<br/> | | | `includeDetails` | [operations.IncludeDetails](../../../sdk/models/operations/includedetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts).<br/>Only exists for backwards compatibility, media providers other than the server libraries have it on always.<br/> | |
| `sectionKey` | *number* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 | | `sectionKey` | *number* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |

View File

@@ -11,9 +11,12 @@ let value: GetLibraryItemsLibraryResponse200Type =
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| ------------- | ------------- |
| `CoverPoster` | coverPoster | | Name | Value |
| `Background` | background | | ---------------------- | ---------------------- |
| `Snapshot` | snapshot | | `CoverPoster` | coverPoster |
| `ClearLogo` | clearLogo | | `Background` | background |
| `Snapshot` | snapshot |
| `ClearLogo` | clearLogo |
| - | `Unrecognized<string>` |

View File

@@ -13,11 +13,14 @@ let value: GetLibraryItemsLibraryType = GetLibraryItemsLibraryType.Movie;
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| --------- | --------- |
| `Movie` | movie | | Name | Value |
| `TvShow` | show | | ---------------------- | ---------------------- |
| `Season` | season | | `Movie` | movie |
| `Episode` | episode | | `TvShow` | show |
| `Artist` | artist | | `Season` | season |
| `Album` | album | | `Episode` | episode |
| `Artist` | artist |
| `Album` | album |
| - | `Unrecognized<string>` |

View File

@@ -18,12 +18,15 @@ let value: GetLibraryItemsQueryParamType = GetLibraryItemsQueryParamType.TvShow;
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<number>` branded type.
| --------- | --------- |
| `Movie` | 1 | | Name | Value |
| `TvShow` | 2 | | ---------------------- | ---------------------- |
| `Season` | 3 | | `Movie` | 1 |
| `Episode` | 4 | | `TvShow` | 2 |
| `Audio` | 8 | | `Season` | 3 |
| `Album` | 9 | | `Episode` | 4 |
| `Track` | 10 | | `Audio` | 8 |
| `Album` | 9 |
| `Track` | 10 |
| - | `Unrecognized<number>` |

View File

@@ -19,12 +19,15 @@ let value: GetPlaylistContentsQueryParamType =
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<number>` branded type.
| --------- | --------- |
| `Movie` | 1 | | Name | Value |
| `TvShow` | 2 | | ---------------------- | ---------------------- |
| `Season` | 3 | | `Movie` | 1 |
| `Episode` | 4 | | `TvShow` | 2 |
| `Audio` | 8 | | `Season` | 3 |
| `Album` | 9 | | `Episode` | 4 |
| `Track` | 10 | | `Audio` | 8 |
| `Album` | 9 |
| `Track` | 10 |
| - | `Unrecognized<number>` |

View File

@@ -11,9 +11,12 @@ let value: GetRecentlyAddedHubsResponseType =
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| ------------- | ------------- |
| `CoverPoster` | coverPoster | | Name | Value |
| `Background` | background | | ---------------------- | ---------------------- |
| `Snapshot` | snapshot | | `CoverPoster` | coverPoster |
| `ClearLogo` | clearLogo | | `Background` | background |
| `Snapshot` | snapshot |
| `ClearLogo` | clearLogo |
| - | `Unrecognized<string>` |

View File

@@ -13,11 +13,14 @@ let value: GetRecentlyAddedHubsType = GetRecentlyAddedHubsType.Movie;
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| --------- | --------- |
| `Movie` | movie | | Name | Value |
| `TvShow` | show | | ---------------------- | ---------------------- |
| `Season` | season | | `Movie` | movie |
| `Episode` | episode | | `TvShow` | show |
| `Artist` | artist | | `Season` | season |
| `Album` | album | | `Episode` | episode |
| `Artist` | artist |
| `Album` | album |
| - | `Unrecognized<string>` |

View File

@@ -13,7 +13,10 @@ let value: GetSearchAllLibrariesEnableCreditsMarkerGeneration =
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| ---------------- | ---------------- |
| `LibraryDefault` | -1 | | Name | Value |
| `Disabled` | 0 | | ---------------------- | ---------------------- |
| `LibraryDefault` | -1 |
| `Disabled` | 0 |
| - | `Unrecognized<string>` |

View File

@@ -13,8 +13,11 @@ let value: GetSearchAllLibrariesEpisodeSort =
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| ---------------- | ---------------- |
| `LibraryDefault` | -1 | | Name | Value |
| `OldestFirst` | 0 | | ---------------------- | ---------------------- |
| `NewestFirst` | 1 | | `LibraryDefault` | -1 |
| `OldestFirst` | 0 |
| `NewestFirst` | 1 |
| - | `Unrecognized<string>` |

View File

@@ -13,8 +13,11 @@ let value: GetSearchAllLibrariesFlattenSeasons =
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| ---------------- | ---------------- |
| `LibraryDefault` | -1 | | Name | Value |
| `Hide` | 0 | | ---------------------- | ---------------------- |
| `Show` | 1 | | `LibraryDefault` | -1 |
| `Hide` | 0 |
| `Show` | 1 |
| - | `Unrecognized<string>` |

View File

@@ -11,9 +11,12 @@ let value: GetSearchAllLibrariesLibraryType =
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| ------------- | ------------- |
| `CoverPoster` | coverPoster | | Name | Value |
| `Background` | background | | ---------------------- | ---------------------- |
| `Snapshot` | snapshot | | `CoverPoster` | coverPoster |
| `ClearLogo` | clearLogo | | `Background` | background |
| `Snapshot` | snapshot |
| `ClearLogo` | clearLogo |
| - | `Unrecognized<string>` |

View File

@@ -19,10 +19,13 @@ let value: GetSearchAllLibrariesShowOrdering =
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| -------------- | -------------- |
| `None` | None | | Name | Value |
| `TmdbAiring` | tmdbAiring | | ---------------------- | ---------------------- |
| `TvdbAired` | aired | | `None` | None |
| `TvdbDvd` | dvd | | `TmdbAiring` | tmdbAiring |
| `TvdbAbsolute` | absolute | | `TvdbAired` | aired |
| `TvdbDvd` | dvd |
| `TvdbAbsolute` | absolute |
| - | `Unrecognized<string>` |

View File

@@ -13,11 +13,14 @@ let value: GetSearchAllLibrariesType = GetSearchAllLibrariesType.Movie;
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| --------- | --------- |
| `Movie` | movie | | Name | Value |
| `TvShow` | show | | ---------------------- | ---------------------- |
| `Season` | season | | `Movie` | movie |
| `Episode` | episode | | `TvShow` | show |
| `Artist` | artist | | `Season` | season |
| `Album` | album | | `Episode` | episode |
| `Artist` | artist |
| `Album` | album |
| - | `Unrecognized<string>` |

View File

@@ -19,12 +19,15 @@ let value: GetSearchLibraryQueryParamType =
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<number>` branded type.
| --------- | --------- |
| `Movie` | 1 | | Name | Value |
| `TvShow` | 2 | | ---------------------- | ---------------------- |
| `Season` | 3 | | `Movie` | 1 |
| `Episode` | 4 | | `TvShow` | 2 |
| `Audio` | 8 | | `Season` | 3 |
| `Album` | 9 | | `Episode` | 4 |
| `Track` | 10 | | `Audio` | 8 |
| `Album` | 9 |
| `Track` | 10 |
| - | `Unrecognized<number>` |

View File

@@ -13,7 +13,10 @@ let value: GetTokenDetailsAuthenticationResponseStatus =
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| ---------- | ---------- |
| `Inactive` | Inactive | | Name | Value |
| `Active` | Active | | ---------------------- | ---------------------- |
| `Inactive` | Inactive |
| `Active` | Active |
| - | `Unrecognized<string>` |

View File

@@ -13,7 +13,10 @@ let value: GetTokenDetailsAuthenticationStatus =
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| ---------- | ---------- |
| `Inactive` | Inactive | | Name | Value |
| `Active` | Active | | ---------------------- | ---------------------- |
| `Inactive` | Inactive |
| `Active` | Active |
| - | `Unrecognized<string>` |

View File

@@ -10,7 +10,10 @@ let value: GetTokenDetailsStatus = GetTokenDetailsStatus.Online;
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| --------- | --------- |
| `Online` | online | | Name | Value |
| `Offline` | offline | | ---------------------- | ---------------------- |
| `Online` | online |
| `Offline` | offline |
| - | `Unrecognized<string>` |

View File

@@ -19,12 +19,15 @@ let value: GetTopWatchedContentQueryParamType =
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<number>` branded type.
| --------- | --------- |
| `Movie` | 1 | | Name | Value |
| `TvShow` | 2 | | ---------------------- | ---------------------- |
| `Season` | 3 | | `Movie` | 1 |
| `Episode` | 4 | | `TvShow` | 2 |
| `Audio` | 8 | | `Season` | 3 |
| `Album` | 9 | | `Episode` | 4 |
| `Track` | 10 | | `Audio` | 8 |
| `Album` | 9 |
| `Track` | 10 |
| - | `Unrecognized<number>` |

View File

@@ -1,6 +1,6 @@
# IncludeDetails # IncludeDetails
Whether or not to include details for a section (types, filters, and sorts). Whether or not to include details for a section (types, filters, and sorts).
Only exists for backwards compatibility, media providers other than the server libraries have it on always. Only exists for backwards compatibility, media providers other than the server libraries have it on always.

View File

@@ -1,10 +1,10 @@
# Level # Level
An integer log level to write to the PMS log with. An integer log level to write to the PMS log with.
0: Error 0: Error
1: Warning 1: Warning
2: Info 2: Info
3: Debug 3: Debug
4: Verbose 4: Verbose
@@ -18,10 +18,13 @@ let value: Level = Level.Two;
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<number>` branded type.
| ------- | ------- |
| `Zero` | 0 | | Name | Value |
| `One` | 1 | | ---------------------- | ---------------------- |
| `Two` | 2 | | `Zero` | 0 |
| `Three` | 3 | | `One` | 1 |
| `Four` | 4 | | `Two` | 2 |
| `Three` | 3 |
| `Four` | 4 |
| - | `Unrecognized<number>` |

View File

@@ -13,7 +13,10 @@ let value: Libtype = Libtype.Show;
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| ------- | ------- |
| `Movie` | movie | | Name | Value |
| `Show` | show | | ---------------------- | ---------------------- |
| `Movie` | movie |
| `Show` | show |
| - | `Unrecognized<string>` |

View File

@@ -14,8 +14,8 @@ let value: LogLineRequest = {
## Fields ## Fields
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| `level` | [operations.Level](../../../sdk/models/operations/level.md) | :heavy_check_mark: | An integer log level to write to the PMS log with. <br/>0: Error <br/>1: Warning <br/>2: Info <br/>3: Debug <br/>4: Verbose<br/> | | | `level` | [operations.Level](../../../sdk/models/operations/level.md) | :heavy_check_mark: | An integer log level to write to the PMS log with.<br/>0: Error<br/>1: Warning<br/>2: Info<br/>3: Debug<br/>4: Verbose<br/> | |
| `message` | *string* | :heavy_check_mark: | The text of the message to write to the log. | Test log message | | `message` | *string* | :heavy_check_mark: | The text of the message to write to the log. | Test log message |
| `source` | *string* | :heavy_check_mark: | a string indicating the source of the message. | Postman | | `source` | *string* | :heavy_check_mark: | a string indicating the source of the message. | Postman |

View File

@@ -12,7 +12,10 @@ let value: MailingListStatus = MailingListStatus.Active;
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| -------------- | -------------- |
| `Active` | active | | Name | Value |
| `Unsubscribed` | unsubscribed | | ---------------------- | ---------------------- |
| `Active` | active |
| `Unsubscribed` | unsubscribed |
| - | `Unrecognized<string>` |

View File

@@ -12,6 +12,8 @@ let value: PathParamTaskName = PathParamTaskName.RefreshPeriodicMetadata;
## Values ## Values
This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| Name | Value | | Name | Value |
| --------------------------- | --------------------------- | | --------------------------- | --------------------------- |
| `BackupDatabase` | BackupDatabase | | `BackupDatabase` | BackupDatabase |
@@ -27,4 +29,5 @@ let value: PathParamTaskName = PathParamTaskName.RefreshPeriodicMetadata;
| `RefreshLibraries` | RefreshLibraries | | `RefreshLibraries` | RefreshLibraries |
| `RefreshLocalMedia` | RefreshLocalMedia | | `RefreshLocalMedia` | RefreshLocalMedia |
| `RefreshPeriodicMetadata` | RefreshPeriodicMetadata | | `RefreshPeriodicMetadata` | RefreshPeriodicMetadata |
| `UpgradeMediaAnalysis` | UpgradeMediaAnalysis | | `UpgradeMediaAnalysis` | UpgradeMediaAnalysis |
| - | `Unrecognized<string>` |

View File

@@ -12,8 +12,11 @@ let value: PlaylistType = PlaylistType.Video;
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| ------- | ------- |
| `Audio` | audio | | Name | Value |
| `Video` | video | | ---------------------- | ---------------------- |
| `Photo` | photo | | `Audio` | audio |
| `Video` | video |
| `Photo` | photo |
| - | `Unrecognized<string>` |

View File

@@ -13,7 +13,10 @@ let value: PostUsersSignInDataAuthenticationResponseStatus =
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| ---------- | ---------- |
| `Inactive` | Inactive | | Name | Value |
| `Active` | Active | | ---------------------- | ---------------------- |
| `Inactive` | Inactive |
| `Active` | Active |
| - | `Unrecognized<string>` |

View File

@@ -13,7 +13,10 @@ let value: PostUsersSignInDataAuthenticationStatus =
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| ---------- | ---------- |
| `Inactive` | Inactive | | Name | Value |
| `Active` | Active | | ---------------------- | ---------------------- |
| `Inactive` | Inactive |
| `Active` | Active |
| - | `Unrecognized<string>` |

View File

@@ -13,7 +13,10 @@ let value: PostUsersSignInDataMailingListStatus =
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| -------------- | -------------- |
| `Active` | active | | Name | Value |
| `Unsubscribed` | unsubscribed | | ---------------------- | ---------------------- |
| `Active` | active |
| `Unsubscribed` | unsubscribed |
| - | `Unrecognized<string>` |

View File

@@ -10,6 +10,9 @@ let value: PostUsersSignInDataState = PostUsersSignInDataState.Ended;
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| ------- | ------- |
| `Ended` | ended | | Name | Value |
| ---------------------- | ---------------------- |
| `Ended` | ended |
| - | `Unrecognized<string>` |

View File

@@ -10,7 +10,10 @@ let value: PostUsersSignInDataStatus = PostUsersSignInDataStatus.Online;
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| --------- | --------- |
| `Online` | online | | Name | Value |
| `Offline` | offline | | ---------------------- | ---------------------- |
| `Online` | online |
| `Offline` | offline |
| - | `Unrecognized<string>` |

View File

@@ -1,8 +1,8 @@
# QueryParamForce # QueryParamForce
Force overwriting of duplicate playlists. Force overwriting of duplicate playlists.
By default, a playlist file uploaded with the same path will overwrite the existing playlist. By default, a playlist file uploaded with the same path will overwrite the existing playlist.
The `force` argument is used to disable overwriting. The `force` argument is used to disable overwriting.
If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.

View File

@@ -12,7 +12,10 @@ let value: QueryParamSmart = QueryParamSmart.Zero;
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<number>` branded type.
| ------ | ------ |
| `Zero` | 0 | | Name | Value |
| `One` | 1 | | ---------------------- | ---------------------- |
| `Zero` | 0 |
| `One` | 1 |
| - | `Unrecognized<number>` |

View File

@@ -18,12 +18,15 @@ let value: QueryParamType = QueryParamType.TvShow;
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<number>` branded type.
| --------- | --------- |
| `Movie` | 1 | | Name | Value |
| `TvShow` | 2 | | ---------------------- | ---------------------- |
| `Season` | 3 | | `Movie` | 1 |
| `Episode` | 4 | | `TvShow` | 2 |
| `Audio` | 8 | | `Season` | 3 |
| `Album` | 9 | | `Episode` | 4 |
| `Track` | 10 | | `Audio` | 8 |
| `Album` | 9 |
| `Track` | 10 |
| - | `Unrecognized<number>` |

View File

@@ -10,10 +10,13 @@ let value: SearchTypes = SearchTypes.Tv;
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| ------------- | ------------- |
| `Movies` | movies | | Name | Value |
| `Music` | music | | ---------------------- | ---------------------- |
| `OtherVideos` | otherVideos | | `Movies` | movies |
| `People` | people | | `Music` | music |
| `Tv` | tv | | `OtherVideos` | otherVideos |
| `People` | people |
| `Tv` | tv |
| - | `Unrecognized<string>` |

View File

@@ -18,10 +18,13 @@ let value: ShowOrdering = ShowOrdering.TvdbAbsolute;
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| -------------- | -------------- |
| `None` | None | | Name | Value |
| `TmdbAiring` | tmdbAiring | | ---------------------- | ---------------------- |
| `TvdbAired` | aired | | `None` | None |
| `TvdbDvd` | dvd | | `TmdbAiring` | tmdbAiring |
| `TvdbAbsolute` | absolute | | `TvdbAired` | aired |
| `TvdbDvd` | dvd |
| `TvdbAbsolute` | absolute |
| - | `Unrecognized<string>` |

View File

@@ -12,8 +12,11 @@ let value: State = State.Playing;
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| --------- | --------- |
| `Playing` | playing | | Name | Value |
| `Paused` | paused | | ---------------------- | ---------------------- |
| `Stopped` | stopped | | `Playing` | playing |
| `Paused` | paused |
| `Stopped` | stopped |
| - | `Unrecognized<string>` |

View File

@@ -12,6 +12,9 @@ let value: Status = Status.Accepted;
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| ---------- | ---------- |
| `Accepted` | accepted | | Name | Value |
| ---------------------- | ---------------------- |
| `Accepted` | accepted |
| - | `Unrecognized<string>` |

View File

@@ -12,21 +12,24 @@ let value: Tag = Tag.RecentlyViewed;
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| ---------------- | ---------------- |
| `Unwatched` | unwatched | | Name | Value |
| `Newest` | newest | | ---------------------- | ---------------------- |
| `RecentlyAdded` | recentlyAdded | | `Unwatched` | unwatched |
| `RecentlyViewed` | recentlyViewed | | `Newest` | newest |
| `OnDeck` | onDeck | | `RecentlyAdded` | recentlyAdded |
| `Collection` | collection | | `RecentlyViewed` | recentlyViewed |
| `Edition` | edition | | `OnDeck` | onDeck |
| `Year` | year | | `Collection` | collection |
| `Decade` | decade | | `Edition` | edition |
| `Director` | director | | `Year` | year |
| `ContentRating` | contentRating | | `Decade` | decade |
| `Rating` | rating | | `Director` | director |
| `Resolution` | resolution | | `ContentRating` | contentRating |
| `FirstCharacter` | firstCharacter | | `Rating` | rating |
| `Folder` | folder | | `Resolution` | resolution |
| `Albums` | albums | | `FirstCharacter` | firstCharacter |
| `Folder` | folder |
| `Albums` | albums |
| - | `Unrecognized<string>` |

View File

@@ -12,6 +12,8 @@ let value: TaskName = TaskName.RefreshLocalMedia;
## Values ## Values
This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
| Name | Value | | Name | Value |
| --------------------------- | --------------------------- | | --------------------------- | --------------------------- |
| `BackupDatabase` | BackupDatabase | | `BackupDatabase` | BackupDatabase |
@@ -27,4 +29,5 @@ let value: TaskName = TaskName.RefreshLocalMedia;
| `RefreshLibraries` | RefreshLibraries | | `RefreshLibraries` | RefreshLibraries |
| `RefreshLocalMedia` | RefreshLocalMedia | | `RefreshLocalMedia` | RefreshLocalMedia |
| `RefreshPeriodicMetadata` | RefreshPeriodicMetadata | | `RefreshPeriodicMetadata` | RefreshPeriodicMetadata |
| `UpgradeMediaAnalysis` | UpgradeMediaAnalysis | | `UpgradeMediaAnalysis` | UpgradeMediaAnalysis |
| - | `Unrecognized<string>` |

View File

@@ -18,12 +18,15 @@ let value: Type = Type.TvShow;
## Values ## Values
| Name | Value | This is an open enum. Unrecognized values will be captured as the `Unrecognized<number>` branded type.
| --------- | --------- |
| `Movie` | 1 | | Name | Value |
| `TvShow` | 2 | | ---------------------- | ---------------------- |
| `Season` | 3 | | `Movie` | 1 |
| `Episode` | 4 | | `TvShow` | 2 |
| `Audio` | 8 | | `Season` | 3 |
| `Album` | 9 | | `Episode` | 4 |
| `Track` | 10 | | `Audio` | 8 |
| `Album` | 9 |
| `Track` | 10 |
| - | `Unrecognized<number>` |

View File

@@ -14,8 +14,8 @@ let value: UploadPlaylistRequest = {
## Fields ## Fields
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `path` | *string* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. <br/>If the `path` argument is a directory, that path will be scanned for playlist files to be processed. <br/>Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. <br/>The GUID of each playlist is based on the filename. <br/>If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. <br/>The GUID of each playlist is based on the filename.<br/> | /home/barkley/playlist.m3u | | `path` | *string* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server.<br/>If the `path` argument is a directory, that path will be scanned for playlist files to be processed.<br/>Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it.<br/>The GUID of each playlist is based on the filename.<br/>If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it.<br/>The GUID of each playlist is based on the filename.<br/> | /home/barkley/playlist.m3u |
| `force` | [operations.QueryParamForce](../../../sdk/models/operations/queryparamforce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists. <br/>By default, a playlist file uploaded with the same path will overwrite the existing playlist. <br/>The `force` argument is used to disable overwriting. <br/>If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.<br/> | | | `force` | [operations.QueryParamForce](../../../sdk/models/operations/queryparamforce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists.<br/>By default, a playlist file uploaded with the same path will overwrite the existing playlist.<br/>The `force` argument is used to disable overwriting.<br/>If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.<br/> | |
| `sectionID` | *number* | :heavy_check_mark: | Possibly the section ID to upload the playlist to, we are not certain. | 1 | | `sectionID` | *number* | :heavy_check_mark: | Possibly the section ID to upload the playlist to, we are not certain. | 1 |

View File

@@ -300,14 +300,14 @@ run();
## Library Details Endpoint ## Library Details Endpoint
This endpoint provides comprehensive details about the library, focusing on organizational aspects rather than the content itself. This endpoint provides comprehensive details about the library, focusing on organizational aspects rather than the content itself.
The details include: The details include:
### Directories ### Directories
Organized into three categories: Organized into three categories:
- **Primary Directories**: - **Primary Directories**:
- Used in some clients for quick access to media subsets (e.g., "All", "On Deck"). - Used in some clients for quick access to media subsets (e.g., "All", "On Deck").
- Most can be replicated via media queries. - Most can be replicated via media queries.
- Customizable by users. - Customizable by users.
@@ -390,13 +390,13 @@ run();
### Parameters ### Parameters
| Parameter | Type | Required | Description | Example | | Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sectionKey` | *number* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | [object Object] | | `sectionKey` | *number* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | [object Object] |
| `includeDetails` | [operations.IncludeDetails](../../sdk/models/operations/includedetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts). <br/>Only exists for backwards compatibility, media providers other than the server libraries have it on always.<br/> | | | `includeDetails` | [operations.IncludeDetails](../../sdk/models/operations/includedetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts).<br/>Only exists for backwards compatibility, media providers other than the server libraries have it on always.<br/> | |
| `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. | |
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
### Response ### Response

View File

@@ -72,7 +72,7 @@ run();
| Parameter | Type | Required | Description | Example | | Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `level` | [operations.Level](../../sdk/models/operations/level.md) | :heavy_check_mark: | An integer log level to write to the PMS log with. <br/>0: Error <br/>1: Warning <br/>2: Info <br/>3: Debug <br/>4: Verbose<br/> | | | `level` | [operations.Level](../../sdk/models/operations/level.md) | :heavy_check_mark: | An integer log level to write to the PMS log with.<br/>0: Error<br/>1: Warning<br/>2: Info<br/>3: Debug<br/>4: Verbose<br/> | |
| `message` | *string* | :heavy_check_mark: | The text of the message to write to the log. | [object Object] | | `message` | *string* | :heavy_check_mark: | The text of the message to write to the log. | [object Object] |
| `source` | *string* | :heavy_check_mark: | a string indicating the source of the message. | [object Object] | | `source` | *string* | :heavy_check_mark: | a string indicating the source of the message. | [object Object] |
| `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. | |
@@ -93,13 +93,13 @@ run();
## logMultiLine ## logMultiLine
This endpoint allows for the batch addition of log entries to the main Plex Media Server log. This endpoint allows for the batch addition of log entries to the main Plex Media Server log.
It accepts a text/plain request body, where each line represents a distinct log entry. It accepts a text/plain request body, where each line represents a distinct log entry.
Each log entry consists of URL-encoded key-value pairs, specifying log attributes such as 'level', 'message', and 'source'. Each log entry consists of URL-encoded key-value pairs, specifying log attributes such as 'level', 'message', and 'source'.
Log entries are separated by a newline character (`\n`). Log entries are separated by a newline character (`\n`).
Each entry's parameters should be URL-encoded to ensure accurate parsing and handling of special characters. Each entry's parameters should be URL-encoded to ensure accurate parsing and handling of special characters.
This method is efficient for logging multiple entries in a single API call, reducing the overhead of multiple individual requests. This method is efficient for logging multiple entries in a single API call, reducing the overhead of multiple individual requests.
The 'level' parameter specifies the log entry's severity or importance, with the following integer values: The 'level' parameter specifies the log entry's severity or importance, with the following integer values:
- `0`: Error - Critical issues that require immediate attention. - `0`: Error - Critical issues that require immediate attention.

View File

@@ -3,9 +3,9 @@
## Overview ## Overview
Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017"). Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017").
They can be organized in (optionally nesting) folders. They can be organized in (optionally nesting) folders.
Retrieving a playlist, or its items, will trigger a refresh of its metadata. Retrieving a playlist, or its items, will trigger a refresh of its metadata.
This may cause the duration and number of items to change. This may cause the duration and number of items to change.
@@ -705,14 +705,14 @@ run();
### Parameters ### Parameters
| Parameter | Type | Required | Description | Example | | Parameter | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `path` | *string* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. <br/>If the `path` argument is a directory, that path will be scanned for playlist files to be processed. <br/>Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. <br/>The GUID of each playlist is based on the filename. <br/>If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. <br/>The GUID of each playlist is based on the filename.<br/> | [object Object] | | `path` | *string* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server.<br/>If the `path` argument is a directory, that path will be scanned for playlist files to be processed.<br/>Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it.<br/>The GUID of each playlist is based on the filename.<br/>If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it.<br/>The GUID of each playlist is based on the filename.<br/> | [object Object] |
| `force` | [operations.QueryParamForce](../../sdk/models/operations/queryparamforce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists. <br/>By default, a playlist file uploaded with the same path will overwrite the existing playlist. <br/>The `force` argument is used to disable overwriting. <br/>If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.<br/> | | | `force` | [operations.QueryParamForce](../../sdk/models/operations/queryparamforce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists.<br/>By default, a playlist file uploaded with the same path will overwrite the existing playlist.<br/>The `force` argument is used to disable overwriting.<br/>If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.<br/> | |
| `sectionID` | *number* | :heavy_check_mark: | Possibly the section ID to upload the playlist to, we are not certain. | [object Object] | | `sectionID` | *number* | :heavy_check_mark: | Possibly the section ID to upload the playlist to, we are not certain. | [object Object] |
| `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. | |
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
### Response ### Response

View File

@@ -2,7 +2,7 @@
{ {
"name": "@lukehagar/plexjs", "name": "@lukehagar/plexjs",
"version": "0.36.1", "version": "0.37.0",
"exports": { "exports": {
".": "./src/index.ts", ".": "./src/index.ts",
"./sdk/models/errors": "./src/sdk/models/errors/index.ts", "./sdk/models/errors": "./src/sdk/models/errors/index.ts",

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "@lukehagar/plexjs", "name": "@lukehagar/plexjs",
"version": "0.36.1", "version": "0.37.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@lukehagar/plexjs", "name": "@lukehagar/plexjs",
"version": "0.36.1", "version": "0.37.0",
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.19.0", "@eslint/js": "^9.19.0",
"eslint": "^9.19.0", "eslint": "^9.19.0",

View File

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

View File

@@ -36,7 +36,7 @@ import { Result } from "../sdk/types/fp.js";
*/ */
export function butlerStartTask( export function butlerStartTask(
client: PlexAPICore, client: PlexAPICore,
taskName: operations.TaskName, taskName: operations.TaskNameOpen,
options?: RequestOptions, options?: RequestOptions,
): APIPromise< ): APIPromise<
Result< Result<
@@ -61,7 +61,7 @@ export function butlerStartTask(
async function $do( async function $do(
client: PlexAPICore, client: PlexAPICore,
taskName: operations.TaskName, taskName: operations.TaskNameOpen,
options?: RequestOptions, options?: RequestOptions,
): Promise< ): Promise<
[ [

View File

@@ -32,7 +32,7 @@ import { Result } from "../sdk/types/fp.js";
*/ */
export function butlerStopTask( export function butlerStopTask(
client: PlexAPICore, client: PlexAPICore,
taskName: operations.PathParamTaskName, taskName: operations.PathParamTaskNameOpen,
options?: RequestOptions, options?: RequestOptions,
): APIPromise< ): APIPromise<
Result< Result<
@@ -57,7 +57,7 @@ export function butlerStopTask(
async function $do( async function $do(
client: PlexAPICore, client: PlexAPICore,
taskName: operations.PathParamTaskName, taskName: operations.PathParamTaskNameOpen,
options?: RequestOptions, options?: RequestOptions,
): Promise< ): Promise<
[ [

View File

@@ -33,7 +33,7 @@ import { Result } from "../sdk/types/fp.js";
export function libraryGetActorsLibrary( export function libraryGetActorsLibrary(
client: PlexAPICore, client: PlexAPICore,
sectionKey: number, sectionKey: number,
type: operations.GetActorsLibraryQueryParamType, type: operations.GetActorsLibraryQueryParamTypeOpen,
options?: RequestOptions, options?: RequestOptions,
): APIPromise< ): APIPromise<
Result< Result<
@@ -60,7 +60,7 @@ export function libraryGetActorsLibrary(
async function $do( async function $do(
client: PlexAPICore, client: PlexAPICore,
sectionKey: number, sectionKey: number,
type: operations.GetActorsLibraryQueryParamType, type: operations.GetActorsLibraryQueryParamTypeOpen,
options?: RequestOptions, options?: RequestOptions,
): Promise< ): Promise<
[ [

View File

@@ -33,7 +33,7 @@ import { Result } from "../sdk/types/fp.js";
export function libraryGetCountriesLibrary( export function libraryGetCountriesLibrary(
client: PlexAPICore, client: PlexAPICore,
sectionKey: number, sectionKey: number,
type: operations.GetCountriesLibraryQueryParamType, type: operations.GetCountriesLibraryQueryParamTypeOpen,
options?: RequestOptions, options?: RequestOptions,
): APIPromise< ): APIPromise<
Result< Result<
@@ -60,7 +60,7 @@ export function libraryGetCountriesLibrary(
async function $do( async function $do(
client: PlexAPICore, client: PlexAPICore,
sectionKey: number, sectionKey: number,
type: operations.GetCountriesLibraryQueryParamType, type: operations.GetCountriesLibraryQueryParamTypeOpen,
options?: RequestOptions, options?: RequestOptions,
): Promise< ): Promise<
[ [

View File

@@ -33,7 +33,7 @@ import { Result } from "../sdk/types/fp.js";
export function libraryGetGenresLibrary( export function libraryGetGenresLibrary(
client: PlexAPICore, client: PlexAPICore,
sectionKey: number, sectionKey: number,
type: operations.GetGenresLibraryQueryParamType, type: operations.GetGenresLibraryQueryParamTypeOpen,
options?: RequestOptions, options?: RequestOptions,
): APIPromise< ): APIPromise<
Result< Result<
@@ -60,7 +60,7 @@ export function libraryGetGenresLibrary(
async function $do( async function $do(
client: PlexAPICore, client: PlexAPICore,
sectionKey: number, sectionKey: number,
type: operations.GetGenresLibraryQueryParamType, type: operations.GetGenresLibraryQueryParamTypeOpen,
options?: RequestOptions, options?: RequestOptions,
): Promise< ): Promise<
[ [

View File

@@ -50,7 +50,7 @@ import { Result } from "../sdk/types/fp.js";
export function libraryGetSearchLibrary( export function libraryGetSearchLibrary(
client: PlexAPICore, client: PlexAPICore,
sectionKey: number, sectionKey: number,
type: operations.GetSearchLibraryQueryParamType, type: operations.GetSearchLibraryQueryParamTypeOpen,
options?: RequestOptions, options?: RequestOptions,
): APIPromise< ): APIPromise<
Result< Result<
@@ -77,7 +77,7 @@ export function libraryGetSearchLibrary(
async function $do( async function $do(
client: PlexAPICore, client: PlexAPICore,
sectionKey: number, sectionKey: number,
type: operations.GetSearchLibraryQueryParamType, type: operations.GetSearchLibraryQueryParamTypeOpen,
options?: RequestOptions, options?: RequestOptions,
): Promise< ): Promise<
[ [

View File

@@ -32,7 +32,7 @@ import { Result } from "../sdk/types/fp.js";
*/ */
export function libraryGetTopWatchedContent( export function libraryGetTopWatchedContent(
client: PlexAPICore, client: PlexAPICore,
type: operations.GetTopWatchedContentQueryParamType, type: operations.GetTopWatchedContentQueryParamTypeOpen,
includeGuids?: number | undefined, includeGuids?: number | undefined,
options?: RequestOptions, options?: RequestOptions,
): APIPromise< ): APIPromise<
@@ -59,7 +59,7 @@ export function libraryGetTopWatchedContent(
async function $do( async function $do(
client: PlexAPICore, client: PlexAPICore,
type: operations.GetTopWatchedContentQueryParamType, type: operations.GetTopWatchedContentQueryParamTypeOpen,
includeGuids?: number | undefined, includeGuids?: number | undefined,
options?: RequestOptions, options?: RequestOptions,
): Promise< ): Promise<

View File

@@ -32,7 +32,7 @@ import { Result } from "../sdk/types/fp.js";
*/ */
export function logLogLine( export function logLogLine(
client: PlexAPICore, client: PlexAPICore,
level: operations.Level, level: operations.LevelOpen,
message: string, message: string,
source: string, source: string,
options?: RequestOptions, options?: RequestOptions,
@@ -61,7 +61,7 @@ export function logLogLine(
async function $do( async function $do(
client: PlexAPICore, client: PlexAPICore,
level: operations.Level, level: operations.LevelOpen,
message: string, message: string,
source: string, source: string,
options?: RequestOptions, options?: RequestOptions,

View File

@@ -36,7 +36,7 @@ import { Result } from "../sdk/types/fp.js";
export function playlistsGetPlaylistContents( export function playlistsGetPlaylistContents(
client: PlexAPICore, client: PlexAPICore,
playlistID: number, playlistID: number,
type: operations.GetPlaylistContentsQueryParamType, type: operations.GetPlaylistContentsQueryParamTypeOpen,
options?: RequestOptions, options?: RequestOptions,
): APIPromise< ): APIPromise<
Result< Result<
@@ -63,7 +63,7 @@ export function playlistsGetPlaylistContents(
async function $do( async function $do(
client: PlexAPICore, client: PlexAPICore,
playlistID: number, playlistID: number,
type: operations.GetPlaylistContentsQueryParamType, type: operations.GetPlaylistContentsQueryParamTypeOpen,
options?: RequestOptions, options?: RequestOptions,
): Promise< ): Promise<
[ [

View File

@@ -32,8 +32,8 @@ import { Result } from "../sdk/types/fp.js";
*/ */
export function playlistsGetPlaylists( export function playlistsGetPlaylists(
client: PlexAPICore, client: PlexAPICore,
playlistType?: operations.PlaylistType | undefined, playlistType?: operations.PlaylistTypeOpen | undefined,
smart?: operations.QueryParamSmart | undefined, smart?: operations.QueryParamSmartOpen | undefined,
options?: RequestOptions, options?: RequestOptions,
): APIPromise< ): APIPromise<
Result< Result<
@@ -59,8 +59,8 @@ export function playlistsGetPlaylists(
async function $do( async function $do(
client: PlexAPICore, client: PlexAPICore,
playlistType?: operations.PlaylistType | undefined, playlistType?: operations.PlaylistTypeOpen | undefined,
smart?: operations.QueryParamSmart | undefined, smart?: operations.QueryParamSmartOpen | undefined,
options?: RequestOptions, options?: RequestOptions,
): Promise< ): Promise<
[ [

View File

@@ -15,7 +15,7 @@ export const ServerList = [
/** /**
* The full address of your Plex Server * The full address of your Plex Server
*/ */
"{protocol}://{ip}:{port}", "https://10.10.10.47:32400",
] as const; ] as const;
/** /**
@@ -90,7 +90,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = { export const SDK_METADATA = {
language: "typescript", language: "typescript",
openapiDocVersion: "0.0.3", openapiDocVersion: "0.0.3",
sdkVersion: "0.36.1", sdkVersion: "0.37.0",
genVersion: "2.566.5", genVersion: "2.585.2",
userAgent: "speakeasy-sdk/typescript 0.36.1 2.566.5 0.0.3 @lukehagar/plexjs", userAgent: "speakeasy-sdk/typescript 0.37.0 2.585.2 0.0.3 @lukehagar/plexjs",
} as const; } as const;

View File

@@ -10,6 +10,7 @@ import { isPlainObject } from "./is-plain-object.js";
import { safeParse } from "./schemas.js"; import { safeParse } from "./schemas.js";
export type Encoding = export type Encoding =
| "jsonl"
| "json" | "json"
| "text" | "text"
| "bytes" | "bytes"
@@ -19,6 +20,7 @@ export type Encoding =
| "fail"; | "fail";
const DEFAULT_CONTENT_TYPES: Record<Encoding, string> = { const DEFAULT_CONTENT_TYPES: Record<Encoding, string> = {
jsonl: "application/jsonl",
json: "application/json", json: "application/json",
text: "text/plain", text: "text/plain",
bytes: "application/octet-stream", bytes: "application/octet-stream",
@@ -72,6 +74,21 @@ export function json<T>(
return { ...options, enc: "json", codes, schema }; return { ...options, enc: "json", codes, schema };
} }
export function jsonl<T>(
codes: StatusCodePredicate,
schema: Schema<T>,
options?: MatchOptions,
): ValueMatcher<T> {
return { ...options, enc: "jsonl", codes, schema };
}
export function jsonlErr<E>(
codes: StatusCodePredicate,
schema: Schema<E>,
options?: MatchOptions,
): ErrorMatcher<E> {
return { ...options, err: true, enc: "jsonl", codes, schema };
}
export function textErr<E>( export function textErr<E>(
codes: StatusCodePredicate, codes: StatusCodePredicate,
schema: Schema<E>, schema: Schema<E>,
@@ -204,6 +221,9 @@ export function match<T, E>(
case "json": case "json":
raw = await response.json(); raw = await response.json();
break; break;
case "jsonl":
raw = response.body;
break;
case "bytes": case "bytes":
raw = new Uint8Array(await response.arrayBuffer()); raw = new Uint8Array(await response.arrayBuffer());
break; break;

View File

@@ -298,7 +298,9 @@ export class ClientSDK {
} }
} }
const jsonLikeContentTypeRE = /^application\/(?:.{0,100}\+)?json/; const jsonLikeContentTypeRE = /(application|text)\/.*?\+*json.*/;
const jsonlLikeContentTypeRE =
/(application|text)\/(.*?\+*\bjsonl\b.*|.*?\+*\bx-ndjson\b.*)/;
async function logRequest(logger: Logger | undefined, req: Request) { async function logRequest(logger: Logger | undefined, req: Request) {
if (!logger) { if (!logger) {
return; return;
@@ -364,9 +366,13 @@ async function logResponse(
logger.group("Body:"); logger.group("Body:");
switch (true) { switch (true) {
case matchContentType(res, "application/json") case matchContentType(res, "application/json")
|| jsonLikeContentTypeRE.test(ct): || jsonLikeContentTypeRE.test(ct) && !jsonlLikeContentTypeRE.test(ct):
logger.log(await res.clone().json()); logger.log(await res.clone().json());
break; break;
case matchContentType(res, "application/jsonl")
|| jsonlLikeContentTypeRE.test(ct):
logger.log(await res.clone().text());
break;
case matchContentType(res, "text/event-stream"): case matchContentType(res, "text/event-stream"):
logger.log(`<${contentType}>`); logger.log(`<${contentType}>`);
break; break;

View File

@@ -72,7 +72,7 @@ export class Butler extends ClientSDK {
* 4. If we are outside the configured window, the task will start immediately. * 4. If we are outside the configured window, the task will start immediately.
*/ */
async startTask( async startTask(
taskName: operations.TaskName, taskName: operations.TaskNameOpen,
options?: RequestOptions, options?: RequestOptions,
): Promise<operations.StartTaskResponse> { ): Promise<operations.StartTaskResponse> {
return unwrapAsync(butlerStartTask( return unwrapAsync(butlerStartTask(
@@ -89,7 +89,7 @@ export class Butler extends ClientSDK {
* This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint. * This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint.
*/ */
async stopTask( async stopTask(
taskName: operations.PathParamTaskName, taskName: operations.PathParamTaskNameOpen,
options?: RequestOptions, options?: RequestOptions,
): Promise<operations.StopTaskResponse> { ): Promise<operations.StopTaskResponse> {
return unwrapAsync(butlerStopTask( return unwrapAsync(butlerStopTask(

View File

@@ -255,7 +255,7 @@ export class Library extends ClientSDK {
*/ */
async getSearchLibrary( async getSearchLibrary(
sectionKey: number, sectionKey: number,
type: operations.GetSearchLibraryQueryParamType, type: operations.GetSearchLibraryQueryParamTypeOpen,
options?: RequestOptions, options?: RequestOptions,
): Promise<operations.GetSearchLibraryResponse> { ): Promise<operations.GetSearchLibraryResponse> {
return unwrapAsync(libraryGetSearchLibrary( return unwrapAsync(libraryGetSearchLibrary(
@@ -274,7 +274,7 @@ export class Library extends ClientSDK {
*/ */
async getGenresLibrary( async getGenresLibrary(
sectionKey: number, sectionKey: number,
type: operations.GetGenresLibraryQueryParamType, type: operations.GetGenresLibraryQueryParamTypeOpen,
options?: RequestOptions, options?: RequestOptions,
): Promise<operations.GetGenresLibraryResponse> { ): Promise<operations.GetGenresLibraryResponse> {
return unwrapAsync(libraryGetGenresLibrary( return unwrapAsync(libraryGetGenresLibrary(
@@ -293,7 +293,7 @@ export class Library extends ClientSDK {
*/ */
async getCountriesLibrary( async getCountriesLibrary(
sectionKey: number, sectionKey: number,
type: operations.GetCountriesLibraryQueryParamType, type: operations.GetCountriesLibraryQueryParamTypeOpen,
options?: RequestOptions, options?: RequestOptions,
): Promise<operations.GetCountriesLibraryResponse> { ): Promise<operations.GetCountriesLibraryResponse> {
return unwrapAsync(libraryGetCountriesLibrary( return unwrapAsync(libraryGetCountriesLibrary(
@@ -312,7 +312,7 @@ export class Library extends ClientSDK {
*/ */
async getActorsLibrary( async getActorsLibrary(
sectionKey: number, sectionKey: number,
type: operations.GetActorsLibraryQueryParamType, type: operations.GetActorsLibraryQueryParamTypeOpen,
options?: RequestOptions, options?: RequestOptions,
): Promise<operations.GetActorsLibraryResponse> { ): Promise<operations.GetActorsLibraryResponse> {
return unwrapAsync(libraryGetActorsLibrary( return unwrapAsync(libraryGetActorsLibrary(
@@ -469,7 +469,7 @@ export class Library extends ClientSDK {
* This endpoint will return the top watched content from libraries of a certain type * This endpoint will return the top watched content from libraries of a certain type
*/ */
async getTopWatchedContent( async getTopWatchedContent(
type: operations.GetTopWatchedContentQueryParamType, type: operations.GetTopWatchedContentQueryParamTypeOpen,
includeGuids?: number | undefined, includeGuids?: number | undefined,
options?: RequestOptions, options?: RequestOptions,
): Promise<operations.GetTopWatchedContentResponse> { ): Promise<operations.GetTopWatchedContentResponse> {

View File

@@ -17,7 +17,7 @@ export class Log extends ClientSDK {
* This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log. * This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log.
*/ */
async logLine( async logLine(
level: operations.Level, level: operations.LevelOpen,
message: string, message: string,
source: string, source: string,
options?: RequestOptions, options?: RequestOptions,

View File

@@ -5,6 +5,11 @@
import * as z from "zod"; import * as z from "zod";
import { remap as remap$ } from "../../../lib/primitives.js"; import { remap as remap$ } from "../../../lib/primitives.js";
import { safeParse } from "../../../lib/schemas.js"; import { safeParse } from "../../../lib/schemas.js";
import {
catchUnrecognizedEnum,
OpenEnum,
Unrecognized,
} from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js"; import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js";
@@ -16,6 +21,12 @@ export enum CreatePlaylistQueryParamType {
Video = "video", Video = "video",
Photo = "photo", Photo = "photo",
} }
/**
* type of playlist to create
*/
export type CreatePlaylistQueryParamTypeOpen = OpenEnum<
typeof CreatePlaylistQueryParamType
>;
/** /**
* whether the playlist is smart or not * whether the playlist is smart or not
@@ -33,7 +44,7 @@ export type CreatePlaylistRequest = {
/** /**
* type of playlist to create * type of playlist to create
*/ */
type: CreatePlaylistQueryParamType; type: CreatePlaylistQueryParamTypeOpen;
/** /**
* whether the playlist is smart or not * whether the playlist is smart or not
*/ */
@@ -99,14 +110,25 @@ export type CreatePlaylistResponse = {
}; };
/** @internal */ /** @internal */
export const CreatePlaylistQueryParamType$inboundSchema: z.ZodNativeEnum< export const CreatePlaylistQueryParamType$inboundSchema: z.ZodType<
typeof CreatePlaylistQueryParamType CreatePlaylistQueryParamTypeOpen,
> = z.nativeEnum(CreatePlaylistQueryParamType); z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(CreatePlaylistQueryParamType),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const CreatePlaylistQueryParamType$outboundSchema: z.ZodNativeEnum< export const CreatePlaylistQueryParamType$outboundSchema: z.ZodType<
typeof CreatePlaylistQueryParamType CreatePlaylistQueryParamTypeOpen,
> = CreatePlaylistQueryParamType$inboundSchema; z.ZodTypeDef,
CreatePlaylistQueryParamTypeOpen
> = z.union([
z.nativeEnum(CreatePlaylistQueryParamType),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal

View File

@@ -5,6 +5,11 @@
import * as z from "zod"; import * as z from "zod";
import { remap as remap$ } from "../../../lib/primitives.js"; import { remap as remap$ } from "../../../lib/primitives.js";
import { safeParse } from "../../../lib/schemas.js"; import { safeParse } from "../../../lib/schemas.js";
import {
catchUnrecognizedEnum,
OpenEnum,
Unrecognized,
} from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js"; import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js";
@@ -27,6 +32,19 @@ export enum GetActorsLibraryQueryParamType {
Album = 9, Album = 9,
Track = 10, Track = 10,
} }
/**
* The type of media to retrieve or filter by.
*
* @remarks
* 1 = movie
* 2 = show
* 3 = season
* 4 = episode
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
*/
export type GetActorsLibraryQueryParamTypeOpen = OpenEnum<
typeof GetActorsLibraryQueryParamType
>;
export type GetActorsLibraryRequest = { export type GetActorsLibraryRequest = {
/** /**
@@ -46,7 +64,7 @@ export type GetActorsLibraryRequest = {
* 4 = episode * 4 = episode
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
*/ */
type: GetActorsLibraryQueryParamType; type: GetActorsLibraryQueryParamTypeOpen;
}; };
export type GetActorsLibraryDirectory = { export type GetActorsLibraryDirectory = {
@@ -150,14 +168,25 @@ export type GetActorsLibraryResponse = {
}; };
/** @internal */ /** @internal */
export const GetActorsLibraryQueryParamType$inboundSchema: z.ZodNativeEnum< export const GetActorsLibraryQueryParamType$inboundSchema: z.ZodType<
typeof GetActorsLibraryQueryParamType GetActorsLibraryQueryParamTypeOpen,
> = z.nativeEnum(GetActorsLibraryQueryParamType); z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(GetActorsLibraryQueryParamType),
z.number().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const GetActorsLibraryQueryParamType$outboundSchema: z.ZodNativeEnum< export const GetActorsLibraryQueryParamType$outboundSchema: z.ZodType<
typeof GetActorsLibraryQueryParamType GetActorsLibraryQueryParamTypeOpen,
> = GetActorsLibraryQueryParamType$inboundSchema; z.ZodTypeDef,
GetActorsLibraryQueryParamTypeOpen
> = z.union([
z.nativeEnum(GetActorsLibraryQueryParamType),
z.number().and(z.custom<Unrecognized<number>>()),
]);
/** /**
* @internal * @internal

View File

@@ -5,6 +5,11 @@
import * as z from "zod"; import * as z from "zod";
import { remap as remap$ } from "../../../lib/primitives.js"; import { remap as remap$ } from "../../../lib/primitives.js";
import { safeParse } from "../../../lib/schemas.js"; import { safeParse } from "../../../lib/schemas.js";
import {
catchUnrecognizedEnum,
OpenEnum,
Unrecognized,
} from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js"; import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js";
@@ -19,6 +24,10 @@ export enum GetAllLibrariesType {
Artist = "artist", Artist = "artist",
Album = "album", Album = "album",
} }
/**
* The library type
*/
export type GetAllLibrariesTypeOpen = OpenEnum<typeof GetAllLibrariesType>;
/** /**
* UNKNOWN * UNKNOWN
@@ -68,7 +77,7 @@ export type GetAllLibrariesDirectory = {
* The library key representing the unique identifier * The library key representing the unique identifier
*/ */
key: string; key: string;
type: GetAllLibrariesType; type: GetAllLibrariesTypeOpen;
/** /**
* The title of the library * The title of the library
*/ */
@@ -107,7 +116,10 @@ export type GetAllLibrariesDirectory = {
*/ */
directory: boolean; directory: boolean;
/** /**
* The number of seconds since the content was last changed relative to now. * Timestamp (in seconds) representing the last time the content was modified.
*
* @remarks
* NOTE: Some Plex server have some absurd values for this field, like 8457612157633039800 so it should be int64
*/ */
contentChangedAt: number; contentChangedAt: number;
hidden?: Hidden | undefined; hidden?: Hidden | undefined;
@@ -157,14 +169,25 @@ export type GetAllLibrariesResponse = {
}; };
/** @internal */ /** @internal */
export const GetAllLibrariesType$inboundSchema: z.ZodNativeEnum< export const GetAllLibrariesType$inboundSchema: z.ZodType<
typeof GetAllLibrariesType GetAllLibrariesTypeOpen,
> = z.nativeEnum(GetAllLibrariesType); z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(GetAllLibrariesType),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const GetAllLibrariesType$outboundSchema: z.ZodNativeEnum< export const GetAllLibrariesType$outboundSchema: z.ZodType<
typeof GetAllLibrariesType GetAllLibrariesTypeOpen,
> = GetAllLibrariesType$inboundSchema; z.ZodTypeDef,
GetAllLibrariesTypeOpen
> = z.union([
z.nativeEnum(GetAllLibrariesType),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal

View File

@@ -5,6 +5,11 @@
import * as z from "zod"; import * as z from "zod";
import { remap as remap$ } from "../../../lib/primitives.js"; import { remap as remap$ } from "../../../lib/primitives.js";
import { safeParse } from "../../../lib/schemas.js"; import { safeParse } from "../../../lib/schemas.js";
import {
catchUnrecognizedEnum,
OpenEnum,
Unrecognized,
} from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js"; import { Result as SafeParseResult } from "../../types/fp.js";
import { RFCDate } from "../../types/rfcdate.js"; import { RFCDate } from "../../types/rfcdate.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js";
@@ -28,6 +33,19 @@ export enum GetAllMediaLibraryQueryParamType {
Album = 9, Album = 9,
Track = 10, Track = 10,
} }
/**
* The type of media to retrieve or filter by.
*
* @remarks
* 1 = movie
* 2 = show
* 3 = season
* 4 = episode
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
*/
export type GetAllMediaLibraryQueryParamTypeOpen = OpenEnum<
typeof GetAllMediaLibraryQueryParamType
>;
/** /**
* Adds the Meta object to the response * Adds the Meta object to the response
@@ -82,7 +100,7 @@ export type GetAllMediaLibraryRequest = {
* 4 = episode * 4 = episode
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
*/ */
type: GetAllMediaLibraryQueryParamType; type: GetAllMediaLibraryQueryParamTypeOpen;
/** /**
* Adds the Meta object to the response * Adds the Meta object to the response
* *
@@ -217,6 +235,14 @@ export enum GetAllMediaLibraryLibraryType {
Artist = "artist", Artist = "artist",
Album = "album", Album = "album",
} }
/**
* The type of media content
*
* @remarks
*/
export type GetAllMediaLibraryLibraryTypeOpen = OpenEnum<
typeof GetAllMediaLibraryLibraryType
>;
export enum GetAllMediaLibraryLibraryResponseType { export enum GetAllMediaLibraryLibraryResponseType {
CoverPoster = "coverPoster", CoverPoster = "coverPoster",
@@ -224,10 +250,13 @@ export enum GetAllMediaLibraryLibraryResponseType {
Snapshot = "snapshot", Snapshot = "snapshot",
ClearLogo = "clearLogo", ClearLogo = "clearLogo",
} }
export type GetAllMediaLibraryLibraryResponseTypeOpen = OpenEnum<
typeof GetAllMediaLibraryLibraryResponseType
>;
export type GetAllMediaLibraryImage = { export type GetAllMediaLibraryImage = {
alt: string; alt: string;
type: GetAllMediaLibraryLibraryResponseType; type: GetAllMediaLibraryLibraryResponseTypeOpen;
url: string; url: string;
}; };
@@ -666,7 +695,7 @@ export type GetAllMediaLibraryMetadata = {
* The studio that produced the media item. * The studio that produced the media item.
*/ */
studio?: string | undefined; studio?: string | undefined;
type: GetAllMediaLibraryLibraryType; type: GetAllMediaLibraryLibraryTypeOpen;
/** /**
* The title of the media item. * The title of the media item.
*/ */
@@ -976,14 +1005,25 @@ export type GetAllMediaLibraryResponse = {
}; };
/** @internal */ /** @internal */
export const GetAllMediaLibraryQueryParamType$inboundSchema: z.ZodNativeEnum< export const GetAllMediaLibraryQueryParamType$inboundSchema: z.ZodType<
typeof GetAllMediaLibraryQueryParamType GetAllMediaLibraryQueryParamTypeOpen,
> = z.nativeEnum(GetAllMediaLibraryQueryParamType); z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(GetAllMediaLibraryQueryParamType),
z.number().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const GetAllMediaLibraryQueryParamType$outboundSchema: z.ZodNativeEnum< export const GetAllMediaLibraryQueryParamType$outboundSchema: z.ZodType<
typeof GetAllMediaLibraryQueryParamType GetAllMediaLibraryQueryParamTypeOpen,
> = GetAllMediaLibraryQueryParamType$inboundSchema; z.ZodTypeDef,
GetAllMediaLibraryQueryParamTypeOpen
> = z.union([
z.nativeEnum(GetAllMediaLibraryQueryParamType),
z.number().and(z.custom<Unrecognized<number>>()),
]);
/** /**
* @internal * @internal
@@ -1745,14 +1785,25 @@ export function getAllMediaLibraryMetaFromJSON(
} }
/** @internal */ /** @internal */
export const GetAllMediaLibraryLibraryType$inboundSchema: z.ZodNativeEnum< export const GetAllMediaLibraryLibraryType$inboundSchema: z.ZodType<
typeof GetAllMediaLibraryLibraryType GetAllMediaLibraryLibraryTypeOpen,
> = z.nativeEnum(GetAllMediaLibraryLibraryType); z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(GetAllMediaLibraryLibraryType),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const GetAllMediaLibraryLibraryType$outboundSchema: z.ZodNativeEnum< export const GetAllMediaLibraryLibraryType$outboundSchema: z.ZodType<
typeof GetAllMediaLibraryLibraryType GetAllMediaLibraryLibraryTypeOpen,
> = GetAllMediaLibraryLibraryType$inboundSchema; z.ZodTypeDef,
GetAllMediaLibraryLibraryTypeOpen
> = z.union([
z.nativeEnum(GetAllMediaLibraryLibraryType),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal
@@ -1766,15 +1817,25 @@ export namespace GetAllMediaLibraryLibraryType$ {
} }
/** @internal */ /** @internal */
export const GetAllMediaLibraryLibraryResponseType$inboundSchema: export const GetAllMediaLibraryLibraryResponseType$inboundSchema: z.ZodType<
z.ZodNativeEnum<typeof GetAllMediaLibraryLibraryResponseType> = z.nativeEnum( GetAllMediaLibraryLibraryResponseTypeOpen,
GetAllMediaLibraryLibraryResponseType, z.ZodTypeDef,
); unknown
> = z
.union([
z.nativeEnum(GetAllMediaLibraryLibraryResponseType),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const GetAllMediaLibraryLibraryResponseType$outboundSchema: export const GetAllMediaLibraryLibraryResponseType$outboundSchema: z.ZodType<
z.ZodNativeEnum<typeof GetAllMediaLibraryLibraryResponseType> = GetAllMediaLibraryLibraryResponseTypeOpen,
GetAllMediaLibraryLibraryResponseType$inboundSchema; z.ZodTypeDef,
GetAllMediaLibraryLibraryResponseTypeOpen
> = z.union([
z.nativeEnum(GetAllMediaLibraryLibraryResponseType),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal

View File

@@ -5,6 +5,11 @@
import * as z from "zod"; import * as z from "zod";
import { remap as remap$ } from "../../../lib/primitives.js"; import { remap as remap$ } from "../../../lib/primitives.js";
import { safeParse } from "../../../lib/schemas.js"; import { safeParse } from "../../../lib/schemas.js";
import {
catchUnrecognizedEnum,
OpenEnum,
Unrecognized,
} from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js"; import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js";
@@ -27,6 +32,19 @@ export enum GetCountriesLibraryQueryParamType {
Album = 9, Album = 9,
Track = 10, Track = 10,
} }
/**
* The type of media to retrieve or filter by.
*
* @remarks
* 1 = movie
* 2 = show
* 3 = season
* 4 = episode
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
*/
export type GetCountriesLibraryQueryParamTypeOpen = OpenEnum<
typeof GetCountriesLibraryQueryParamType
>;
export type GetCountriesLibraryRequest = { export type GetCountriesLibraryRequest = {
/** /**
@@ -46,7 +64,7 @@ export type GetCountriesLibraryRequest = {
* 4 = episode * 4 = episode
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
*/ */
type: GetCountriesLibraryQueryParamType; type: GetCountriesLibraryQueryParamTypeOpen;
}; };
export type GetCountriesLibraryDirectory = { export type GetCountriesLibraryDirectory = {
@@ -134,14 +152,25 @@ export type GetCountriesLibraryResponse = {
}; };
/** @internal */ /** @internal */
export const GetCountriesLibraryQueryParamType$inboundSchema: z.ZodNativeEnum< export const GetCountriesLibraryQueryParamType$inboundSchema: z.ZodType<
typeof GetCountriesLibraryQueryParamType GetCountriesLibraryQueryParamTypeOpen,
> = z.nativeEnum(GetCountriesLibraryQueryParamType); z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(GetCountriesLibraryQueryParamType),
z.number().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const GetCountriesLibraryQueryParamType$outboundSchema: z.ZodNativeEnum< export const GetCountriesLibraryQueryParamType$outboundSchema: z.ZodType<
typeof GetCountriesLibraryQueryParamType GetCountriesLibraryQueryParamTypeOpen,
> = GetCountriesLibraryQueryParamType$inboundSchema; z.ZodTypeDef,
GetCountriesLibraryQueryParamTypeOpen
> = z.union([
z.nativeEnum(GetCountriesLibraryQueryParamType),
z.number().and(z.custom<Unrecognized<number>>()),
]);
/** /**
* @internal * @internal

View File

@@ -5,6 +5,11 @@
import * as z from "zod"; import * as z from "zod";
import { remap as remap$ } from "../../../lib/primitives.js"; import { remap as remap$ } from "../../../lib/primitives.js";
import { safeParse } from "../../../lib/schemas.js"; import { safeParse } from "../../../lib/schemas.js";
import {
catchUnrecognizedEnum,
OpenEnum,
Unrecognized,
} from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js"; import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js";
@@ -27,6 +32,19 @@ export enum GetGenresLibraryQueryParamType {
Album = 9, Album = 9,
Track = 10, Track = 10,
} }
/**
* The type of media to retrieve or filter by.
*
* @remarks
* 1 = movie
* 2 = show
* 3 = season
* 4 = episode
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
*/
export type GetGenresLibraryQueryParamTypeOpen = OpenEnum<
typeof GetGenresLibraryQueryParamType
>;
export type GetGenresLibraryRequest = { export type GetGenresLibraryRequest = {
/** /**
@@ -46,7 +64,7 @@ export type GetGenresLibraryRequest = {
* 4 = episode * 4 = episode
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
*/ */
type: GetGenresLibraryQueryParamType; type: GetGenresLibraryQueryParamTypeOpen;
}; };
export type GetGenresLibraryDirectory = { export type GetGenresLibraryDirectory = {
@@ -135,14 +153,25 @@ export type GetGenresLibraryResponse = {
}; };
/** @internal */ /** @internal */
export const GetGenresLibraryQueryParamType$inboundSchema: z.ZodNativeEnum< export const GetGenresLibraryQueryParamType$inboundSchema: z.ZodType<
typeof GetGenresLibraryQueryParamType GetGenresLibraryQueryParamTypeOpen,
> = z.nativeEnum(GetGenresLibraryQueryParamType); z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(GetGenresLibraryQueryParamType),
z.number().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const GetGenresLibraryQueryParamType$outboundSchema: z.ZodNativeEnum< export const GetGenresLibraryQueryParamType$outboundSchema: z.ZodType<
typeof GetGenresLibraryQueryParamType GetGenresLibraryQueryParamTypeOpen,
> = GetGenresLibraryQueryParamType$inboundSchema; z.ZodTypeDef,
GetGenresLibraryQueryParamTypeOpen
> = z.union([
z.nativeEnum(GetGenresLibraryQueryParamType),
z.number().and(z.custom<Unrecognized<number>>()),
]);
/** /**
* @internal * @internal

View File

@@ -5,6 +5,11 @@
import * as z from "zod"; import * as z from "zod";
import { remap as remap$ } from "../../../lib/primitives.js"; import { remap as remap$ } from "../../../lib/primitives.js";
import { safeParse } from "../../../lib/schemas.js"; import { safeParse } from "../../../lib/schemas.js";
import {
catchUnrecognizedEnum,
OpenEnum,
Unrecognized,
} from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js"; import { Result as SafeParseResult } from "../../types/fp.js";
import { RFCDate } from "../../types/rfcdate.js"; import { RFCDate } from "../../types/rfcdate.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js";
@@ -30,6 +35,10 @@ export enum Tag {
Folder = "folder", Folder = "folder",
Albums = "albums", Albums = "albums",
} }
/**
* A key representing a specific tag within the section.
*/
export type TagOpen = OpenEnum<typeof Tag>;
/** /**
* Adds the Guids object to the response * Adds the Guids object to the response
@@ -60,6 +69,19 @@ export enum GetLibraryItemsQueryParamType {
Album = 9, Album = 9,
Track = 10, Track = 10,
} }
/**
* The type of media to retrieve or filter by.
*
* @remarks
* 1 = movie
* 2 = show
* 3 = season
* 4 = episode
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
*/
export type GetLibraryItemsQueryParamTypeOpen = OpenEnum<
typeof GetLibraryItemsQueryParamType
>;
/** /**
* Adds the Meta object to the response * Adds the Meta object to the response
@@ -75,7 +97,7 @@ export type GetLibraryItemsRequest = {
/** /**
* A key representing a specific tag within the section. * A key representing a specific tag within the section.
*/ */
tag: Tag; tag: TagOpen;
/** /**
* Adds the Guids object to the response * Adds the Guids object to the response
* *
@@ -92,7 +114,7 @@ export type GetLibraryItemsRequest = {
* 4 = episode * 4 = episode
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
*/ */
type: GetLibraryItemsQueryParamType; type: GetLibraryItemsQueryParamTypeOpen;
/** /**
* The unique key of the Plex library. * The unique key of the Plex library.
* *
@@ -215,6 +237,14 @@ export enum GetLibraryItemsLibraryType {
Artist = "artist", Artist = "artist",
Album = "album", Album = "album",
} }
/**
* The type of media content
*
* @remarks
*/
export type GetLibraryItemsLibraryTypeOpen = OpenEnum<
typeof GetLibraryItemsLibraryType
>;
/** /**
* Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
@@ -224,6 +254,10 @@ export enum FlattenSeasons {
Hide = "0", Hide = "0",
Show = "1", Show = "1",
} }
/**
* Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
*/
export type FlattenSeasonsOpen = OpenEnum<typeof FlattenSeasons>;
/** /**
* Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). * Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
@@ -233,6 +267,10 @@ export enum EpisodeSort {
OldestFirst = "0", OldestFirst = "0",
NewestFirst = "1", NewestFirst = "1",
} }
/**
* Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
*/
export type EpisodeSortOpen = OpenEnum<typeof EpisodeSort>;
/** /**
* Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). * Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
@@ -241,6 +279,12 @@ export enum EnableCreditsMarkerGeneration {
LibraryDefault = "-1", LibraryDefault = "-1",
Disabled = "0", Disabled = "0",
} }
/**
* Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
*/
export type EnableCreditsMarkerGenerationOpen = OpenEnum<
typeof EnableCreditsMarkerGeneration
>;
/** /**
* Setting that indicates the episode ordering for the show. * Setting that indicates the episode ordering for the show.
@@ -259,6 +303,17 @@ export enum ShowOrdering {
TvdbDvd = "dvd", TvdbDvd = "dvd",
TvdbAbsolute = "absolute", TvdbAbsolute = "absolute",
} }
/**
* Setting that indicates the episode ordering for the show.
*
* @remarks
* None = Library default,
* tmdbAiring = The Movie Database (Aired),
* aired = TheTVDB (Aired),
* dvd = TheTVDB (DVD),
* absolute = TheTVDB (Absolute)).
*/
export type ShowOrderingOpen = OpenEnum<typeof ShowOrdering>;
export enum GetLibraryItemsOptimizedForStreaming { export enum GetLibraryItemsOptimizedForStreaming {
Disable = 0, Disable = 0,
@@ -544,10 +599,13 @@ export enum GetLibraryItemsLibraryResponse200Type {
Snapshot = "snapshot", Snapshot = "snapshot",
ClearLogo = "clearLogo", ClearLogo = "clearLogo",
} }
export type GetLibraryItemsLibraryResponse200TypeOpen = OpenEnum<
typeof GetLibraryItemsLibraryResponse200Type
>;
export type GetLibraryItemsImage = { export type GetLibraryItemsImage = {
alt: string; alt: string;
type: GetLibraryItemsLibraryResponse200Type; type: GetLibraryItemsLibraryResponse200TypeOpen;
url: string; url: string;
}; };
@@ -571,7 +629,7 @@ export type GetLibraryItemsMetadata = {
* *
* @remarks * @remarks
*/ */
type: GetLibraryItemsLibraryType; type: GetLibraryItemsLibraryTypeOpen;
title: string; title: string;
slug?: string | undefined; slug?: string | undefined;
contentRating?: string | undefined; contentRating?: string | undefined;
@@ -584,15 +642,15 @@ export type GetLibraryItemsMetadata = {
/** /**
* Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
*/ */
flattenSeasons?: FlattenSeasons | undefined; flattenSeasons?: FlattenSeasonsOpen | undefined;
/** /**
* Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). * Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
*/ */
episodeSort?: EpisodeSort | undefined; episodeSort?: EpisodeSortOpen | undefined;
/** /**
* Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). * Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
*/ */
enableCreditsMarkerGeneration?: EnableCreditsMarkerGeneration | undefined; enableCreditsMarkerGeneration?: EnableCreditsMarkerGenerationOpen | undefined;
/** /**
* Setting that indicates the episode ordering for the show. * Setting that indicates the episode ordering for the show.
* *
@@ -603,7 +661,7 @@ export type GetLibraryItemsMetadata = {
* dvd = TheTVDB (DVD), * dvd = TheTVDB (DVD),
* absolute = TheTVDB (Absolute)). * absolute = TheTVDB (Absolute)).
*/ */
showOrdering?: ShowOrdering | undefined; showOrdering?: ShowOrderingOpen | undefined;
thumb?: string | undefined; thumb?: string | undefined;
art?: string | undefined; art?: string | undefined;
banner?: string | undefined; banner?: string | undefined;
@@ -830,11 +888,18 @@ export type GetLibraryItemsResponse = {
}; };
/** @internal */ /** @internal */
export const Tag$inboundSchema: z.ZodNativeEnum<typeof Tag> = z.nativeEnum(Tag); export const Tag$inboundSchema: z.ZodType<TagOpen, z.ZodTypeDef, unknown> = z
.union([
z.nativeEnum(Tag),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const Tag$outboundSchema: z.ZodNativeEnum<typeof Tag> = export const Tag$outboundSchema: z.ZodType<TagOpen, z.ZodTypeDef, TagOpen> = z
Tag$inboundSchema; .union([
z.nativeEnum(Tag),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal
@@ -867,14 +932,25 @@ export namespace IncludeGuids$ {
} }
/** @internal */ /** @internal */
export const GetLibraryItemsQueryParamType$inboundSchema: z.ZodNativeEnum< export const GetLibraryItemsQueryParamType$inboundSchema: z.ZodType<
typeof GetLibraryItemsQueryParamType GetLibraryItemsQueryParamTypeOpen,
> = z.nativeEnum(GetLibraryItemsQueryParamType); z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(GetLibraryItemsQueryParamType),
z.number().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const GetLibraryItemsQueryParamType$outboundSchema: z.ZodNativeEnum< export const GetLibraryItemsQueryParamType$outboundSchema: z.ZodType<
typeof GetLibraryItemsQueryParamType GetLibraryItemsQueryParamTypeOpen,
> = GetLibraryItemsQueryParamType$inboundSchema; z.ZodTypeDef,
GetLibraryItemsQueryParamTypeOpen
> = z.union([
z.nativeEnum(GetLibraryItemsQueryParamType),
z.number().and(z.custom<Unrecognized<number>>()),
]);
/** /**
* @internal * @internal
@@ -1463,14 +1539,25 @@ export function getLibraryItemsFieldTypeFromJSON(
} }
/** @internal */ /** @internal */
export const GetLibraryItemsLibraryType$inboundSchema: z.ZodNativeEnum< export const GetLibraryItemsLibraryType$inboundSchema: z.ZodType<
typeof GetLibraryItemsLibraryType GetLibraryItemsLibraryTypeOpen,
> = z.nativeEnum(GetLibraryItemsLibraryType); z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(GetLibraryItemsLibraryType),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const GetLibraryItemsLibraryType$outboundSchema: z.ZodNativeEnum< export const GetLibraryItemsLibraryType$outboundSchema: z.ZodType<
typeof GetLibraryItemsLibraryType GetLibraryItemsLibraryTypeOpen,
> = GetLibraryItemsLibraryType$inboundSchema; z.ZodTypeDef,
GetLibraryItemsLibraryTypeOpen
> = z.union([
z.nativeEnum(GetLibraryItemsLibraryType),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal
@@ -1484,14 +1571,25 @@ export namespace GetLibraryItemsLibraryType$ {
} }
/** @internal */ /** @internal */
export const FlattenSeasons$inboundSchema: z.ZodNativeEnum< export const FlattenSeasons$inboundSchema: z.ZodType<
typeof FlattenSeasons FlattenSeasonsOpen,
> = z.nativeEnum(FlattenSeasons); z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(FlattenSeasons),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const FlattenSeasons$outboundSchema: z.ZodNativeEnum< export const FlattenSeasons$outboundSchema: z.ZodType<
typeof FlattenSeasons FlattenSeasonsOpen,
> = FlattenSeasons$inboundSchema; z.ZodTypeDef,
FlattenSeasonsOpen
> = z.union([
z.nativeEnum(FlattenSeasons),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal
@@ -1505,12 +1603,25 @@ export namespace FlattenSeasons$ {
} }
/** @internal */ /** @internal */
export const EpisodeSort$inboundSchema: z.ZodNativeEnum<typeof EpisodeSort> = z export const EpisodeSort$inboundSchema: z.ZodType<
.nativeEnum(EpisodeSort); EpisodeSortOpen,
z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(EpisodeSort),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const EpisodeSort$outboundSchema: z.ZodNativeEnum<typeof EpisodeSort> = export const EpisodeSort$outboundSchema: z.ZodType<
EpisodeSort$inboundSchema; EpisodeSortOpen,
z.ZodTypeDef,
EpisodeSortOpen
> = z.union([
z.nativeEnum(EpisodeSort),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal
@@ -1524,14 +1635,25 @@ export namespace EpisodeSort$ {
} }
/** @internal */ /** @internal */
export const EnableCreditsMarkerGeneration$inboundSchema: z.ZodNativeEnum< export const EnableCreditsMarkerGeneration$inboundSchema: z.ZodType<
typeof EnableCreditsMarkerGeneration EnableCreditsMarkerGenerationOpen,
> = z.nativeEnum(EnableCreditsMarkerGeneration); z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(EnableCreditsMarkerGeneration),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const EnableCreditsMarkerGeneration$outboundSchema: z.ZodNativeEnum< export const EnableCreditsMarkerGeneration$outboundSchema: z.ZodType<
typeof EnableCreditsMarkerGeneration EnableCreditsMarkerGenerationOpen,
> = EnableCreditsMarkerGeneration$inboundSchema; z.ZodTypeDef,
EnableCreditsMarkerGenerationOpen
> = z.union([
z.nativeEnum(EnableCreditsMarkerGeneration),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal
@@ -1545,12 +1667,25 @@ export namespace EnableCreditsMarkerGeneration$ {
} }
/** @internal */ /** @internal */
export const ShowOrdering$inboundSchema: z.ZodNativeEnum<typeof ShowOrdering> = export const ShowOrdering$inboundSchema: z.ZodType<
z.nativeEnum(ShowOrdering); ShowOrderingOpen,
z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(ShowOrdering),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const ShowOrdering$outboundSchema: z.ZodNativeEnum<typeof ShowOrdering> = export const ShowOrdering$outboundSchema: z.ZodType<
ShowOrdering$inboundSchema; ShowOrderingOpen,
z.ZodTypeDef,
ShowOrderingOpen
> = z.union([
z.nativeEnum(ShowOrdering),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal
@@ -2555,15 +2690,25 @@ export function metaDataRatingFromJSON(
} }
/** @internal */ /** @internal */
export const GetLibraryItemsLibraryResponse200Type$inboundSchema: export const GetLibraryItemsLibraryResponse200Type$inboundSchema: z.ZodType<
z.ZodNativeEnum<typeof GetLibraryItemsLibraryResponse200Type> = z.nativeEnum( GetLibraryItemsLibraryResponse200TypeOpen,
GetLibraryItemsLibraryResponse200Type, z.ZodTypeDef,
); unknown
> = z
.union([
z.nativeEnum(GetLibraryItemsLibraryResponse200Type),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const GetLibraryItemsLibraryResponse200Type$outboundSchema: export const GetLibraryItemsLibraryResponse200Type$outboundSchema: z.ZodType<
z.ZodNativeEnum<typeof GetLibraryItemsLibraryResponse200Type> = GetLibraryItemsLibraryResponse200TypeOpen,
GetLibraryItemsLibraryResponse200Type$inboundSchema; z.ZodTypeDef,
GetLibraryItemsLibraryResponse200TypeOpen
> = z.union([
z.nativeEnum(GetLibraryItemsLibraryResponse200Type),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal

View File

@@ -5,6 +5,11 @@
import * as z from "zod"; import * as z from "zod";
import { remap as remap$ } from "../../../lib/primitives.js"; import { remap as remap$ } from "../../../lib/primitives.js";
import { safeParse } from "../../../lib/schemas.js"; import { safeParse } from "../../../lib/schemas.js";
import {
catchUnrecognizedEnum,
OpenEnum,
Unrecognized,
} from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js"; import { Result as SafeParseResult } from "../../types/fp.js";
import { RFCDate } from "../../types/rfcdate.js"; import { RFCDate } from "../../types/rfcdate.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js";
@@ -28,6 +33,19 @@ export enum GetPlaylistContentsQueryParamType {
Album = 9, Album = 9,
Track = 10, Track = 10,
} }
/**
* The type of media to retrieve or filter by.
*
* @remarks
* 1 = movie
* 2 = show
* 3 = season
* 4 = episode
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
*/
export type GetPlaylistContentsQueryParamTypeOpen = OpenEnum<
typeof GetPlaylistContentsQueryParamType
>;
export type GetPlaylistContentsRequest = { export type GetPlaylistContentsRequest = {
/** /**
@@ -44,7 +62,7 @@ export type GetPlaylistContentsRequest = {
* 4 = episode * 4 = episode
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
*/ */
type: GetPlaylistContentsQueryParamType; type: GetPlaylistContentsQueryParamTypeOpen;
}; };
export type GetPlaylistContentsPart = { export type GetPlaylistContentsPart = {
@@ -174,14 +192,25 @@ export type GetPlaylistContentsResponse = {
}; };
/** @internal */ /** @internal */
export const GetPlaylistContentsQueryParamType$inboundSchema: z.ZodNativeEnum< export const GetPlaylistContentsQueryParamType$inboundSchema: z.ZodType<
typeof GetPlaylistContentsQueryParamType GetPlaylistContentsQueryParamTypeOpen,
> = z.nativeEnum(GetPlaylistContentsQueryParamType); z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(GetPlaylistContentsQueryParamType),
z.number().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const GetPlaylistContentsQueryParamType$outboundSchema: z.ZodNativeEnum< export const GetPlaylistContentsQueryParamType$outboundSchema: z.ZodType<
typeof GetPlaylistContentsQueryParamType GetPlaylistContentsQueryParamTypeOpen,
> = GetPlaylistContentsQueryParamType$inboundSchema; z.ZodTypeDef,
GetPlaylistContentsQueryParamTypeOpen
> = z.union([
z.nativeEnum(GetPlaylistContentsQueryParamType),
z.number().and(z.custom<Unrecognized<number>>()),
]);
/** /**
* @internal * @internal

View File

@@ -5,6 +5,11 @@
import * as z from "zod"; import * as z from "zod";
import { remap as remap$ } from "../../../lib/primitives.js"; import { remap as remap$ } from "../../../lib/primitives.js";
import { safeParse } from "../../../lib/schemas.js"; import { safeParse } from "../../../lib/schemas.js";
import {
catchUnrecognizedEnum,
OpenEnum,
Unrecognized,
} from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js"; import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js";
@@ -16,6 +21,10 @@ export enum PlaylistType {
Video = "video", Video = "video",
Photo = "photo", Photo = "photo",
} }
/**
* limit to a type of playlist.
*/
export type PlaylistTypeOpen = OpenEnum<typeof PlaylistType>;
/** /**
* type of playlists to return (default is all). * type of playlists to return (default is all).
@@ -24,16 +33,20 @@ export enum QueryParamSmart {
Zero = 0, Zero = 0,
One = 1, One = 1,
} }
/**
* type of playlists to return (default is all).
*/
export type QueryParamSmartOpen = OpenEnum<typeof QueryParamSmart>;
export type GetPlaylistsRequest = { export type GetPlaylistsRequest = {
/** /**
* limit to a type of playlist. * limit to a type of playlist.
*/ */
playlistType?: PlaylistType | undefined; playlistType?: PlaylistTypeOpen | undefined;
/** /**
* type of playlists to return (default is all). * type of playlists to return (default is all).
*/ */
smart?: QueryParamSmart | undefined; smart?: QueryParamSmartOpen | undefined;
}; };
export type GetPlaylistsMetadata = { export type GetPlaylistsMetadata = {
@@ -87,12 +100,25 @@ export type GetPlaylistsResponse = {
}; };
/** @internal */ /** @internal */
export const PlaylistType$inboundSchema: z.ZodNativeEnum<typeof PlaylistType> = export const PlaylistType$inboundSchema: z.ZodType<
z.nativeEnum(PlaylistType); PlaylistTypeOpen,
z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(PlaylistType),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const PlaylistType$outboundSchema: z.ZodNativeEnum<typeof PlaylistType> = export const PlaylistType$outboundSchema: z.ZodType<
PlaylistType$inboundSchema; PlaylistTypeOpen,
z.ZodTypeDef,
PlaylistTypeOpen
> = z.union([
z.nativeEnum(PlaylistType),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal
@@ -106,14 +132,25 @@ export namespace PlaylistType$ {
} }
/** @internal */ /** @internal */
export const QueryParamSmart$inboundSchema: z.ZodNativeEnum< export const QueryParamSmart$inboundSchema: z.ZodType<
typeof QueryParamSmart QueryParamSmartOpen,
> = z.nativeEnum(QueryParamSmart); z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(QueryParamSmart),
z.number().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const QueryParamSmart$outboundSchema: z.ZodNativeEnum< export const QueryParamSmart$outboundSchema: z.ZodType<
typeof QueryParamSmart QueryParamSmartOpen,
> = QueryParamSmart$inboundSchema; z.ZodTypeDef,
QueryParamSmartOpen
> = z.union([
z.nativeEnum(QueryParamSmart),
z.number().and(z.custom<Unrecognized<number>>()),
]);
/** /**
* @internal * @internal

View File

@@ -5,6 +5,11 @@
import * as z from "zod"; import * as z from "zod";
import { remap as remap$ } from "../../../lib/primitives.js"; import { remap as remap$ } from "../../../lib/primitives.js";
import { safeParse } from "../../../lib/schemas.js"; import { safeParse } from "../../../lib/schemas.js";
import {
catchUnrecognizedEnum,
OpenEnum,
Unrecognized,
} from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js"; import { Result as SafeParseResult } from "../../types/fp.js";
import { RFCDate } from "../../types/rfcdate.js"; import { RFCDate } from "../../types/rfcdate.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js";
@@ -28,6 +33,17 @@ export enum Type {
Album = 9, Album = 9,
Track = 10, Track = 10,
} }
/**
* The type of media to retrieve or filter by.
*
* @remarks
* 1 = movie
* 2 = show
* 3 = season
* 4 = episode
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
*/
export type TypeOpen = OpenEnum<typeof Type>;
/** /**
* Adds the Meta object to the response * Adds the Meta object to the response
@@ -62,7 +78,7 @@ export type GetRecentlyAddedRequest = {
* 4 = episode * 4 = episode
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
*/ */
type: Type; type: TypeOpen;
/** /**
* Adds the Meta object to the response * Adds the Meta object to the response
* *
@@ -188,6 +204,14 @@ export enum GetRecentlyAddedHubsType {
Artist = "artist", Artist = "artist",
Album = "album", Album = "album",
} }
/**
* The type of media content
*
* @remarks
*/
export type GetRecentlyAddedHubsTypeOpen = OpenEnum<
typeof GetRecentlyAddedHubsType
>;
export enum GetRecentlyAddedHubsResponseType { export enum GetRecentlyAddedHubsResponseType {
CoverPoster = "coverPoster", CoverPoster = "coverPoster",
@@ -195,10 +219,13 @@ export enum GetRecentlyAddedHubsResponseType {
Snapshot = "snapshot", Snapshot = "snapshot",
ClearLogo = "clearLogo", ClearLogo = "clearLogo",
} }
export type GetRecentlyAddedHubsResponseTypeOpen = OpenEnum<
typeof GetRecentlyAddedHubsResponseType
>;
export type GetRecentlyAddedImage = { export type GetRecentlyAddedImage = {
alt: string; alt: string;
type: GetRecentlyAddedHubsResponseType; type: GetRecentlyAddedHubsResponseTypeOpen;
url: string; url: string;
}; };
@@ -918,7 +945,7 @@ export type GetRecentlyAddedMetadata = {
* The title of the media item. * The title of the media item.
*/ */
title: string; title: string;
type: GetRecentlyAddedHubsType; type: GetRecentlyAddedHubsTypeOpen;
/** /**
* Unix epoch datetime in seconds * Unix epoch datetime in seconds
*/ */
@@ -1019,13 +1046,18 @@ export type GetRecentlyAddedResponse = {
}; };
/** @internal */ /** @internal */
export const Type$inboundSchema: z.ZodNativeEnum<typeof Type> = z.nativeEnum( export const Type$inboundSchema: z.ZodType<TypeOpen, z.ZodTypeDef, unknown> = z
Type, .union([
); z.nativeEnum(Type),
z.number().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const Type$outboundSchema: z.ZodNativeEnum<typeof Type> = export const Type$outboundSchema: z.ZodType<TypeOpen, z.ZodTypeDef, TypeOpen> =
Type$inboundSchema; z.union([
z.nativeEnum(Type),
z.number().and(z.custom<Unrecognized<number>>()),
]);
/** /**
* @internal * @internal
@@ -1667,14 +1699,25 @@ export function metaFromJSON(
} }
/** @internal */ /** @internal */
export const GetRecentlyAddedHubsType$inboundSchema: z.ZodNativeEnum< export const GetRecentlyAddedHubsType$inboundSchema: z.ZodType<
typeof GetRecentlyAddedHubsType GetRecentlyAddedHubsTypeOpen,
> = z.nativeEnum(GetRecentlyAddedHubsType); z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(GetRecentlyAddedHubsType),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const GetRecentlyAddedHubsType$outboundSchema: z.ZodNativeEnum< export const GetRecentlyAddedHubsType$outboundSchema: z.ZodType<
typeof GetRecentlyAddedHubsType GetRecentlyAddedHubsTypeOpen,
> = GetRecentlyAddedHubsType$inboundSchema; z.ZodTypeDef,
GetRecentlyAddedHubsTypeOpen
> = z.union([
z.nativeEnum(GetRecentlyAddedHubsType),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal
@@ -1688,14 +1731,25 @@ export namespace GetRecentlyAddedHubsType$ {
} }
/** @internal */ /** @internal */
export const GetRecentlyAddedHubsResponseType$inboundSchema: z.ZodNativeEnum< export const GetRecentlyAddedHubsResponseType$inboundSchema: z.ZodType<
typeof GetRecentlyAddedHubsResponseType GetRecentlyAddedHubsResponseTypeOpen,
> = z.nativeEnum(GetRecentlyAddedHubsResponseType); z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(GetRecentlyAddedHubsResponseType),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const GetRecentlyAddedHubsResponseType$outboundSchema: z.ZodNativeEnum< export const GetRecentlyAddedHubsResponseType$outboundSchema: z.ZodType<
typeof GetRecentlyAddedHubsResponseType GetRecentlyAddedHubsResponseTypeOpen,
> = GetRecentlyAddedHubsResponseType$inboundSchema; z.ZodTypeDef,
GetRecentlyAddedHubsResponseTypeOpen
> = z.union([
z.nativeEnum(GetRecentlyAddedHubsResponseType),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal

View File

@@ -5,6 +5,11 @@
import * as z from "zod"; import * as z from "zod";
import { remap as remap$ } from "../../../lib/primitives.js"; import { remap as remap$ } from "../../../lib/primitives.js";
import { safeParse } from "../../../lib/schemas.js"; import { safeParse } from "../../../lib/schemas.js";
import {
catchUnrecognizedEnum,
OpenEnum,
Unrecognized,
} from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js"; import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js";
@@ -27,6 +32,17 @@ export enum QueryParamType {
Album = 9, Album = 9,
Track = 10, Track = 10,
} }
/**
* The type of media to retrieve or filter by.
*
* @remarks
* 1 = movie
* 2 = show
* 3 = season
* 4 = episode
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
*/
export type QueryParamTypeOpen = OpenEnum<typeof QueryParamType>;
/** /**
* Adds the Meta object to the response * Adds the Meta object to the response
@@ -55,7 +71,7 @@ export type GetRecentlyAddedLibraryRequest = {
* 4 = episode * 4 = episode
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
*/ */
type: QueryParamType; type: QueryParamTypeOpen;
/** /**
* Adds the Meta object to the response * Adds the Meta object to the response
* *
@@ -289,14 +305,25 @@ export type GetRecentlyAddedLibraryResponse = {
}; };
/** @internal */ /** @internal */
export const QueryParamType$inboundSchema: z.ZodNativeEnum< export const QueryParamType$inboundSchema: z.ZodType<
typeof QueryParamType QueryParamTypeOpen,
> = z.nativeEnum(QueryParamType); z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(QueryParamType),
z.number().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const QueryParamType$outboundSchema: z.ZodNativeEnum< export const QueryParamType$outboundSchema: z.ZodType<
typeof QueryParamType QueryParamTypeOpen,
> = QueryParamType$inboundSchema; z.ZodTypeDef,
QueryParamTypeOpen
> = z.union([
z.nativeEnum(QueryParamType),
z.number().and(z.custom<Unrecognized<number>>()),
]);
/** /**
* @internal * @internal

View File

@@ -5,6 +5,11 @@
import * as z from "zod"; import * as z from "zod";
import { remap as remap$ } from "../../../lib/primitives.js"; import { remap as remap$ } from "../../../lib/primitives.js";
import { safeParse } from "../../../lib/schemas.js"; import { safeParse } from "../../../lib/schemas.js";
import {
catchUnrecognizedEnum,
OpenEnum,
Unrecognized,
} from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js"; import { Result as SafeParseResult } from "../../types/fp.js";
import { RFCDate } from "../../types/rfcdate.js"; import { RFCDate } from "../../types/rfcdate.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js";
@@ -16,6 +21,7 @@ export enum SearchTypes {
People = "people", People = "people",
Tv = "tv", Tv = "tv",
} }
export type SearchTypesOpen = OpenEnum<typeof SearchTypes>;
/** /**
* Whether to include collections in the search results. * Whether to include collections in the search results.
@@ -51,7 +57,7 @@ export type GetSearchAllLibrariesRequest = {
* *
* @remarks * @remarks
*/ */
searchTypes?: Array<SearchTypes> | undefined; searchTypes?: Array<SearchTypesOpen> | undefined;
/** /**
* Whether to include collections in the search results. * Whether to include collections in the search results.
*/ */
@@ -79,6 +85,14 @@ export enum GetSearchAllLibrariesType {
Artist = "artist", Artist = "artist",
Album = "album", Album = "album",
} }
/**
* The type of media content
*
* @remarks
*/
export type GetSearchAllLibrariesTypeOpen = OpenEnum<
typeof GetSearchAllLibrariesType
>;
/** /**
* Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
@@ -88,6 +102,12 @@ export enum GetSearchAllLibrariesFlattenSeasons {
Hide = "0", Hide = "0",
Show = "1", Show = "1",
} }
/**
* Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
*/
export type GetSearchAllLibrariesFlattenSeasonsOpen = OpenEnum<
typeof GetSearchAllLibrariesFlattenSeasons
>;
/** /**
* Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). * Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
@@ -97,6 +117,12 @@ export enum GetSearchAllLibrariesEpisodeSort {
OldestFirst = "0", OldestFirst = "0",
NewestFirst = "1", NewestFirst = "1",
} }
/**
* Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
*/
export type GetSearchAllLibrariesEpisodeSortOpen = OpenEnum<
typeof GetSearchAllLibrariesEpisodeSort
>;
/** /**
* Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). * Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
@@ -105,6 +131,12 @@ export enum GetSearchAllLibrariesEnableCreditsMarkerGeneration {
LibraryDefault = "-1", LibraryDefault = "-1",
Disabled = "0", Disabled = "0",
} }
/**
* Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
*/
export type GetSearchAllLibrariesEnableCreditsMarkerGenerationOpen = OpenEnum<
typeof GetSearchAllLibrariesEnableCreditsMarkerGeneration
>;
/** /**
* Setting that indicates the episode ordering for the show. * Setting that indicates the episode ordering for the show.
@@ -123,6 +155,19 @@ export enum GetSearchAllLibrariesShowOrdering {
TvdbDvd = "dvd", TvdbDvd = "dvd",
TvdbAbsolute = "absolute", TvdbAbsolute = "absolute",
} }
/**
* Setting that indicates the episode ordering for the show.
*
* @remarks
* None = Library default,
* tmdbAiring = The Movie Database (Aired),
* aired = TheTVDB (Aired),
* dvd = TheTVDB (DVD),
* absolute = TheTVDB (Absolute)).
*/
export type GetSearchAllLibrariesShowOrderingOpen = OpenEnum<
typeof GetSearchAllLibrariesShowOrdering
>;
export enum GetSearchAllLibrariesOptimizedForStreaming { export enum GetSearchAllLibrariesOptimizedForStreaming {
Disable = 0, Disable = 0,
@@ -410,10 +455,13 @@ export enum GetSearchAllLibrariesLibraryType {
Snapshot = "snapshot", Snapshot = "snapshot",
ClearLogo = "clearLogo", ClearLogo = "clearLogo",
} }
export type GetSearchAllLibrariesLibraryTypeOpen = OpenEnum<
typeof GetSearchAllLibrariesLibraryType
>;
export type GetSearchAllLibrariesImage = { export type GetSearchAllLibrariesImage = {
alt: string; alt: string;
type: GetSearchAllLibrariesLibraryType; type: GetSearchAllLibrariesLibraryTypeOpen;
url: string; url: string;
}; };
@@ -437,7 +485,7 @@ export type GetSearchAllLibrariesMetadata = {
* *
* @remarks * @remarks
*/ */
type: GetSearchAllLibrariesType; type: GetSearchAllLibrariesTypeOpen;
title: string; title: string;
slug?: string | undefined; slug?: string | undefined;
contentRating?: string | undefined; contentRating?: string | undefined;
@@ -450,16 +498,16 @@ export type GetSearchAllLibrariesMetadata = {
/** /**
* Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
*/ */
flattenSeasons?: GetSearchAllLibrariesFlattenSeasons | undefined; flattenSeasons?: GetSearchAllLibrariesFlattenSeasonsOpen | undefined;
/** /**
* Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). * Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
*/ */
episodeSort?: GetSearchAllLibrariesEpisodeSort | undefined; episodeSort?: GetSearchAllLibrariesEpisodeSortOpen | undefined;
/** /**
* Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). * Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
*/ */
enableCreditsMarkerGeneration?: enableCreditsMarkerGeneration?:
| GetSearchAllLibrariesEnableCreditsMarkerGeneration | GetSearchAllLibrariesEnableCreditsMarkerGenerationOpen
| undefined; | undefined;
/** /**
* Setting that indicates the episode ordering for the show. * Setting that indicates the episode ordering for the show.
@@ -471,7 +519,7 @@ export type GetSearchAllLibrariesMetadata = {
* dvd = TheTVDB (DVD), * dvd = TheTVDB (DVD),
* absolute = TheTVDB (Absolute)). * absolute = TheTVDB (Absolute)).
*/ */
showOrdering?: GetSearchAllLibrariesShowOrdering | undefined; showOrdering?: GetSearchAllLibrariesShowOrderingOpen | undefined;
thumb?: string | undefined; thumb?: string | undefined;
art?: string | undefined; art?: string | undefined;
banner?: string | undefined; banner?: string | undefined;
@@ -586,12 +634,25 @@ export type GetSearchAllLibrariesResponse = {
}; };
/** @internal */ /** @internal */
export const SearchTypes$inboundSchema: z.ZodNativeEnum<typeof SearchTypes> = z export const SearchTypes$inboundSchema: z.ZodType<
.nativeEnum(SearchTypes); SearchTypesOpen,
z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(SearchTypes),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const SearchTypes$outboundSchema: z.ZodNativeEnum<typeof SearchTypes> = export const SearchTypes$outboundSchema: z.ZodType<
SearchTypes$inboundSchema; SearchTypesOpen,
z.ZodTypeDef,
SearchTypesOpen
> = z.union([
z.nativeEnum(SearchTypes),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal
@@ -738,14 +799,25 @@ export function getSearchAllLibrariesRequestFromJSON(
} }
/** @internal */ /** @internal */
export const GetSearchAllLibrariesType$inboundSchema: z.ZodNativeEnum< export const GetSearchAllLibrariesType$inboundSchema: z.ZodType<
typeof GetSearchAllLibrariesType GetSearchAllLibrariesTypeOpen,
> = z.nativeEnum(GetSearchAllLibrariesType); z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(GetSearchAllLibrariesType),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const GetSearchAllLibrariesType$outboundSchema: z.ZodNativeEnum< export const GetSearchAllLibrariesType$outboundSchema: z.ZodType<
typeof GetSearchAllLibrariesType GetSearchAllLibrariesTypeOpen,
> = GetSearchAllLibrariesType$inboundSchema; z.ZodTypeDef,
GetSearchAllLibrariesTypeOpen
> = z.union([
z.nativeEnum(GetSearchAllLibrariesType),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal
@@ -759,14 +831,25 @@ export namespace GetSearchAllLibrariesType$ {
} }
/** @internal */ /** @internal */
export const GetSearchAllLibrariesFlattenSeasons$inboundSchema: z.ZodNativeEnum< export const GetSearchAllLibrariesFlattenSeasons$inboundSchema: z.ZodType<
typeof GetSearchAllLibrariesFlattenSeasons GetSearchAllLibrariesFlattenSeasonsOpen,
> = z.nativeEnum(GetSearchAllLibrariesFlattenSeasons); z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(GetSearchAllLibrariesFlattenSeasons),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const GetSearchAllLibrariesFlattenSeasons$outboundSchema: export const GetSearchAllLibrariesFlattenSeasons$outboundSchema: z.ZodType<
z.ZodNativeEnum<typeof GetSearchAllLibrariesFlattenSeasons> = GetSearchAllLibrariesFlattenSeasonsOpen,
GetSearchAllLibrariesFlattenSeasons$inboundSchema; z.ZodTypeDef,
GetSearchAllLibrariesFlattenSeasonsOpen
> = z.union([
z.nativeEnum(GetSearchAllLibrariesFlattenSeasons),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal
@@ -782,14 +865,25 @@ export namespace GetSearchAllLibrariesFlattenSeasons$ {
} }
/** @internal */ /** @internal */
export const GetSearchAllLibrariesEpisodeSort$inboundSchema: z.ZodNativeEnum< export const GetSearchAllLibrariesEpisodeSort$inboundSchema: z.ZodType<
typeof GetSearchAllLibrariesEpisodeSort GetSearchAllLibrariesEpisodeSortOpen,
> = z.nativeEnum(GetSearchAllLibrariesEpisodeSort); z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(GetSearchAllLibrariesEpisodeSort),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const GetSearchAllLibrariesEpisodeSort$outboundSchema: z.ZodNativeEnum< export const GetSearchAllLibrariesEpisodeSort$outboundSchema: z.ZodType<
typeof GetSearchAllLibrariesEpisodeSort GetSearchAllLibrariesEpisodeSortOpen,
> = GetSearchAllLibrariesEpisodeSort$inboundSchema; z.ZodTypeDef,
GetSearchAllLibrariesEpisodeSortOpen
> = z.union([
z.nativeEnum(GetSearchAllLibrariesEpisodeSort),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal
@@ -804,13 +898,26 @@ export namespace GetSearchAllLibrariesEpisodeSort$ {
/** @internal */ /** @internal */
export const GetSearchAllLibrariesEnableCreditsMarkerGeneration$inboundSchema: export const GetSearchAllLibrariesEnableCreditsMarkerGeneration$inboundSchema:
z.ZodNativeEnum<typeof GetSearchAllLibrariesEnableCreditsMarkerGeneration> = z z.ZodType<
.nativeEnum(GetSearchAllLibrariesEnableCreditsMarkerGeneration); GetSearchAllLibrariesEnableCreditsMarkerGenerationOpen,
z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(GetSearchAllLibrariesEnableCreditsMarkerGeneration),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const GetSearchAllLibrariesEnableCreditsMarkerGeneration$outboundSchema: export const GetSearchAllLibrariesEnableCreditsMarkerGeneration$outboundSchema:
z.ZodNativeEnum<typeof GetSearchAllLibrariesEnableCreditsMarkerGeneration> = z.ZodType<
GetSearchAllLibrariesEnableCreditsMarkerGeneration$inboundSchema; GetSearchAllLibrariesEnableCreditsMarkerGenerationOpen,
z.ZodTypeDef,
GetSearchAllLibrariesEnableCreditsMarkerGenerationOpen
> = z.union([
z.nativeEnum(GetSearchAllLibrariesEnableCreditsMarkerGeneration),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal
@@ -826,14 +933,25 @@ export namespace GetSearchAllLibrariesEnableCreditsMarkerGeneration$ {
} }
/** @internal */ /** @internal */
export const GetSearchAllLibrariesShowOrdering$inboundSchema: z.ZodNativeEnum< export const GetSearchAllLibrariesShowOrdering$inboundSchema: z.ZodType<
typeof GetSearchAllLibrariesShowOrdering GetSearchAllLibrariesShowOrderingOpen,
> = z.nativeEnum(GetSearchAllLibrariesShowOrdering); z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(GetSearchAllLibrariesShowOrdering),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const GetSearchAllLibrariesShowOrdering$outboundSchema: z.ZodNativeEnum< export const GetSearchAllLibrariesShowOrdering$outboundSchema: z.ZodType<
typeof GetSearchAllLibrariesShowOrdering GetSearchAllLibrariesShowOrderingOpen,
> = GetSearchAllLibrariesShowOrdering$inboundSchema; z.ZodTypeDef,
GetSearchAllLibrariesShowOrderingOpen
> = z.union([
z.nativeEnum(GetSearchAllLibrariesShowOrdering),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal
@@ -1873,14 +1991,25 @@ export function getSearchAllLibrariesMetaDataRatingFromJSON(
} }
/** @internal */ /** @internal */
export const GetSearchAllLibrariesLibraryType$inboundSchema: z.ZodNativeEnum< export const GetSearchAllLibrariesLibraryType$inboundSchema: z.ZodType<
typeof GetSearchAllLibrariesLibraryType GetSearchAllLibrariesLibraryTypeOpen,
> = z.nativeEnum(GetSearchAllLibrariesLibraryType); z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(GetSearchAllLibrariesLibraryType),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const GetSearchAllLibrariesLibraryType$outboundSchema: z.ZodNativeEnum< export const GetSearchAllLibrariesLibraryType$outboundSchema: z.ZodType<
typeof GetSearchAllLibrariesLibraryType GetSearchAllLibrariesLibraryTypeOpen,
> = GetSearchAllLibrariesLibraryType$inboundSchema; z.ZodTypeDef,
GetSearchAllLibrariesLibraryTypeOpen
> = z.union([
z.nativeEnum(GetSearchAllLibrariesLibraryType),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal

View File

@@ -5,6 +5,11 @@
import * as z from "zod"; import * as z from "zod";
import { remap as remap$ } from "../../../lib/primitives.js"; import { remap as remap$ } from "../../../lib/primitives.js";
import { safeParse } from "../../../lib/schemas.js"; import { safeParse } from "../../../lib/schemas.js";
import {
catchUnrecognizedEnum,
OpenEnum,
Unrecognized,
} from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js"; import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js";
@@ -27,6 +32,19 @@ export enum GetSearchLibraryQueryParamType {
Album = 9, Album = 9,
Track = 10, Track = 10,
} }
/**
* The type of media to retrieve or filter by.
*
* @remarks
* 1 = movie
* 2 = show
* 3 = season
* 4 = episode
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
*/
export type GetSearchLibraryQueryParamTypeOpen = OpenEnum<
typeof GetSearchLibraryQueryParamType
>;
export type GetSearchLibraryRequest = { export type GetSearchLibraryRequest = {
/** /**
@@ -46,7 +64,7 @@ export type GetSearchLibraryRequest = {
* 4 = episode * 4 = episode
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
*/ */
type: GetSearchLibraryQueryParamType; type: GetSearchLibraryQueryParamTypeOpen;
}; };
export type GetSearchLibraryMetadata = { export type GetSearchLibraryMetadata = {
@@ -115,14 +133,25 @@ export type GetSearchLibraryResponse = {
}; };
/** @internal */ /** @internal */
export const GetSearchLibraryQueryParamType$inboundSchema: z.ZodNativeEnum< export const GetSearchLibraryQueryParamType$inboundSchema: z.ZodType<
typeof GetSearchLibraryQueryParamType GetSearchLibraryQueryParamTypeOpen,
> = z.nativeEnum(GetSearchLibraryQueryParamType); z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(GetSearchLibraryQueryParamType),
z.number().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const GetSearchLibraryQueryParamType$outboundSchema: z.ZodNativeEnum< export const GetSearchLibraryQueryParamType$outboundSchema: z.ZodType<
typeof GetSearchLibraryQueryParamType GetSearchLibraryQueryParamTypeOpen,
> = GetSearchLibraryQueryParamType$inboundSchema; z.ZodTypeDef,
GetSearchLibraryQueryParamTypeOpen
> = z.union([
z.nativeEnum(GetSearchLibraryQueryParamType),
z.number().and(z.custom<Unrecognized<number>>()),
]);
/** /**
* @internal * @internal

View File

@@ -5,6 +5,11 @@
import * as z from "zod"; import * as z from "zod";
import { remap as remap$ } from "../../../lib/primitives.js"; import { remap as remap$ } from "../../../lib/primitives.js";
import { safeParse } from "../../../lib/schemas.js"; import { safeParse } from "../../../lib/schemas.js";
import {
catchUnrecognizedEnum,
OpenEnum,
Unrecognized,
} from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js"; import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js";
@@ -16,6 +21,10 @@ export enum State {
Paused = "paused", Paused = "paused",
Stopped = "stopped", Stopped = "stopped",
} }
/**
* The state of the media item
*/
export type StateOpen = OpenEnum<typeof State>;
export type GetTimelineRequest = { export type GetTimelineRequest = {
/** /**
@@ -29,7 +38,7 @@ export type GetTimelineRequest = {
/** /**
* The state of the media item * The state of the media item
*/ */
state: State; state: StateOpen;
/** /**
* Whether the media item has MDE * Whether the media item has MDE
*/ */
@@ -76,13 +85,22 @@ export type GetTimelineResponse = {
}; };
/** @internal */ /** @internal */
export const State$inboundSchema: z.ZodNativeEnum<typeof State> = z.nativeEnum( export const State$inboundSchema: z.ZodType<StateOpen, z.ZodTypeDef, unknown> =
State, z
); .union([
z.nativeEnum(State),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const State$outboundSchema: z.ZodNativeEnum<typeof State> = export const State$outboundSchema: z.ZodType<
State$inboundSchema; StateOpen,
z.ZodTypeDef,
StateOpen
> = z.union([
z.nativeEnum(State),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal

View File

@@ -5,6 +5,11 @@
import * as z from "zod"; import * as z from "zod";
import { remap as remap$ } from "../../../lib/primitives.js"; import { remap as remap$ } from "../../../lib/primitives.js";
import { safeParse } from "../../../lib/schemas.js"; import { safeParse } from "../../../lib/schemas.js";
import {
catchUnrecognizedEnum,
OpenEnum,
Unrecognized,
} from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js"; import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js";
@@ -19,6 +24,10 @@ export enum MailingListStatus {
Active = "active", Active = "active",
Unsubscribed = "unsubscribed", Unsubscribed = "unsubscribed",
} }
/**
* Your current mailing list status (active or unsubscribed)
*/
export type MailingListStatusOpen = OpenEnum<typeof MailingListStatus>;
/** /**
* The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) * The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
@@ -84,13 +93,14 @@ export enum GetTokenDetailsStatus {
Online = "online", Online = "online",
Offline = "offline", Offline = "offline",
} }
export type GetTokenDetailsStatusOpen = OpenEnum<typeof GetTokenDetailsStatus>;
export type Services = { export type Services = {
identifier: string; identifier: string;
endpoint: string; endpoint: string;
token: string | null; token: string | null;
secret: string | null; secret: string | null;
status: GetTokenDetailsStatus; status: GetTokenDetailsStatusOpen;
}; };
/** /**
@@ -100,6 +110,12 @@ export enum GetTokenDetailsAuthenticationStatus {
Inactive = "Inactive", Inactive = "Inactive",
Active = "Active", Active = "Active",
} }
/**
* String representation of subscriptionActive
*/
export type GetTokenDetailsAuthenticationStatusOpen = OpenEnum<
typeof GetTokenDetailsAuthenticationStatus
>;
/** /**
* If the accounts Plex Pass subscription is active * If the accounts Plex Pass subscription is active
@@ -120,7 +136,7 @@ export type Subscription = {
/** /**
* String representation of subscriptionActive * String representation of subscriptionActive
*/ */
status?: GetTokenDetailsAuthenticationStatus | undefined; status?: GetTokenDetailsAuthenticationStatusOpen | undefined;
/** /**
* Payment service used for your Plex Pass subscription * Payment service used for your Plex Pass subscription
*/ */
@@ -138,6 +154,12 @@ export enum GetTokenDetailsAuthenticationResponseStatus {
Inactive = "Inactive", Inactive = "Inactive",
Active = "Active", Active = "Active",
} }
/**
* String representation of subscriptionActive
*/
export type GetTokenDetailsAuthenticationResponseStatusOpen = OpenEnum<
typeof GetTokenDetailsAuthenticationResponseStatus
>;
export type GetTokenDetailsSubscription = { export type GetTokenDetailsSubscription = {
/** /**
@@ -155,7 +177,7 @@ export type GetTokenDetailsSubscription = {
/** /**
* String representation of subscriptionActive * String representation of subscriptionActive
*/ */
status?: GetTokenDetailsAuthenticationResponseStatus | undefined; status?: GetTokenDetailsAuthenticationResponseStatusOpen | undefined;
/** /**
* Payment service used for your Plex Pass subscription * Payment service used for your Plex Pass subscription
*/ */
@@ -255,7 +277,7 @@ export type GetTokenDetailsUserPlexAccount = {
/** /**
* Your current mailing list status (active or unsubscribed) * Your current mailing list status (active or unsubscribed)
*/ */
mailingListStatus: MailingListStatus; mailingListStatus: MailingListStatusOpen;
/** /**
* The maximum number of accounts allowed in the Plex Home * The maximum number of accounts allowed in the Plex Home
*/ */
@@ -340,14 +362,25 @@ export type GetTokenDetailsResponse = {
}; };
/** @internal */ /** @internal */
export const MailingListStatus$inboundSchema: z.ZodNativeEnum< export const MailingListStatus$inboundSchema: z.ZodType<
typeof MailingListStatus MailingListStatusOpen,
> = z.nativeEnum(MailingListStatus); z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(MailingListStatus),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const MailingListStatus$outboundSchema: z.ZodNativeEnum< export const MailingListStatus$outboundSchema: z.ZodType<
typeof MailingListStatus MailingListStatusOpen,
> = MailingListStatus$inboundSchema; z.ZodTypeDef,
MailingListStatusOpen
> = z.union([
z.nativeEnum(MailingListStatus),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal
@@ -546,14 +579,25 @@ export function userProfileFromJSON(
} }
/** @internal */ /** @internal */
export const GetTokenDetailsStatus$inboundSchema: z.ZodNativeEnum< export const GetTokenDetailsStatus$inboundSchema: z.ZodType<
typeof GetTokenDetailsStatus GetTokenDetailsStatusOpen,
> = z.nativeEnum(GetTokenDetailsStatus); z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(GetTokenDetailsStatus),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const GetTokenDetailsStatus$outboundSchema: z.ZodNativeEnum< export const GetTokenDetailsStatus$outboundSchema: z.ZodType<
typeof GetTokenDetailsStatus GetTokenDetailsStatusOpen,
> = GetTokenDetailsStatus$inboundSchema; z.ZodTypeDef,
GetTokenDetailsStatusOpen
> = z.union([
z.nativeEnum(GetTokenDetailsStatus),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal
@@ -629,14 +673,25 @@ export function servicesFromJSON(
} }
/** @internal */ /** @internal */
export const GetTokenDetailsAuthenticationStatus$inboundSchema: z.ZodNativeEnum< export const GetTokenDetailsAuthenticationStatus$inboundSchema: z.ZodType<
typeof GetTokenDetailsAuthenticationStatus GetTokenDetailsAuthenticationStatusOpen,
> = z.nativeEnum(GetTokenDetailsAuthenticationStatus); z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(GetTokenDetailsAuthenticationStatus),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const GetTokenDetailsAuthenticationStatus$outboundSchema: export const GetTokenDetailsAuthenticationStatus$outboundSchema: z.ZodType<
z.ZodNativeEnum<typeof GetTokenDetailsAuthenticationStatus> = GetTokenDetailsAuthenticationStatusOpen,
GetTokenDetailsAuthenticationStatus$inboundSchema; z.ZodTypeDef,
GetTokenDetailsAuthenticationStatusOpen
> = z.union([
z.nativeEnum(GetTokenDetailsAuthenticationStatus),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal
@@ -718,13 +773,26 @@ export function subscriptionFromJSON(
/** @internal */ /** @internal */
export const GetTokenDetailsAuthenticationResponseStatus$inboundSchema: export const GetTokenDetailsAuthenticationResponseStatus$inboundSchema:
z.ZodNativeEnum<typeof GetTokenDetailsAuthenticationResponseStatus> = z z.ZodType<
.nativeEnum(GetTokenDetailsAuthenticationResponseStatus); GetTokenDetailsAuthenticationResponseStatusOpen,
z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(GetTokenDetailsAuthenticationResponseStatus),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const GetTokenDetailsAuthenticationResponseStatus$outboundSchema: export const GetTokenDetailsAuthenticationResponseStatus$outboundSchema:
z.ZodNativeEnum<typeof GetTokenDetailsAuthenticationResponseStatus> = z.ZodType<
GetTokenDetailsAuthenticationResponseStatus$inboundSchema; GetTokenDetailsAuthenticationResponseStatusOpen,
z.ZodTypeDef,
GetTokenDetailsAuthenticationResponseStatusOpen
> = z.union([
z.nativeEnum(GetTokenDetailsAuthenticationResponseStatus),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal

View File

@@ -5,6 +5,11 @@
import * as z from "zod"; import * as z from "zod";
import { remap as remap$ } from "../../../lib/primitives.js"; import { remap as remap$ } from "../../../lib/primitives.js";
import { safeParse } from "../../../lib/schemas.js"; import { safeParse } from "../../../lib/schemas.js";
import {
catchUnrecognizedEnum,
OpenEnum,
Unrecognized,
} from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js"; import { Result as SafeParseResult } from "../../types/fp.js";
import { RFCDate } from "../../types/rfcdate.js"; import { RFCDate } from "../../types/rfcdate.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js";
@@ -28,6 +33,19 @@ export enum GetTopWatchedContentQueryParamType {
Album = 9, Album = 9,
Track = 10, Track = 10,
} }
/**
* The type of media to retrieve or filter by.
*
* @remarks
* 1 = movie
* 2 = show
* 3 = season
* 4 = episode
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
*/
export type GetTopWatchedContentQueryParamTypeOpen = OpenEnum<
typeof GetTopWatchedContentQueryParamType
>;
export type GetTopWatchedContentRequest = { export type GetTopWatchedContentRequest = {
/** /**
@@ -46,7 +64,7 @@ export type GetTopWatchedContentRequest = {
* 4 = episode * 4 = episode
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
*/ */
type: GetTopWatchedContentQueryParamType; type: GetTopWatchedContentQueryParamTypeOpen;
}; };
export type GetTopWatchedContentGenre = { export type GetTopWatchedContentGenre = {
@@ -149,14 +167,25 @@ export type GetTopWatchedContentResponse = {
}; };
/** @internal */ /** @internal */
export const GetTopWatchedContentQueryParamType$inboundSchema: z.ZodNativeEnum< export const GetTopWatchedContentQueryParamType$inboundSchema: z.ZodType<
typeof GetTopWatchedContentQueryParamType GetTopWatchedContentQueryParamTypeOpen,
> = z.nativeEnum(GetTopWatchedContentQueryParamType); z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(GetTopWatchedContentQueryParamType),
z.number().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const GetTopWatchedContentQueryParamType$outboundSchema: z.ZodNativeEnum< export const GetTopWatchedContentQueryParamType$outboundSchema: z.ZodType<
typeof GetTopWatchedContentQueryParamType GetTopWatchedContentQueryParamTypeOpen,
> = GetTopWatchedContentQueryParamType$inboundSchema; z.ZodTypeDef,
GetTopWatchedContentQueryParamTypeOpen
> = z.union([
z.nativeEnum(GetTopWatchedContentQueryParamType),
z.number().and(z.custom<Unrecognized<number>>()),
]);
/** /**
* @internal * @internal

View File

@@ -5,6 +5,11 @@
import * as z from "zod"; import * as z from "zod";
import { remap as remap$ } from "../../../lib/primitives.js"; import { remap as remap$ } from "../../../lib/primitives.js";
import { safeParse } from "../../../lib/schemas.js"; import { safeParse } from "../../../lib/schemas.js";
import {
catchUnrecognizedEnum,
OpenEnum,
Unrecognized,
} from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js"; import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js";
@@ -22,6 +27,10 @@ export type SharedSources = {};
export enum Status { export enum Status {
Accepted = "accepted", Accepted = "accepted",
} }
/**
* Current friend request status
*/
export type StatusOpen = OpenEnum<typeof Status>;
export type Friend = { export type Friend = {
/** /**
@@ -49,7 +58,7 @@ export type Friend = {
/** /**
* Current friend request status * Current friend request status
*/ */
status: Status; status: StatusOpen;
/** /**
* URL of the account thumbnail * URL of the account thumbnail
*/ */
@@ -176,12 +185,25 @@ export function sharedSourcesFromJSON(
} }
/** @internal */ /** @internal */
export const Status$inboundSchema: z.ZodNativeEnum<typeof Status> = z export const Status$inboundSchema: z.ZodType<
.nativeEnum(Status); StatusOpen,
z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(Status),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const Status$outboundSchema: z.ZodNativeEnum<typeof Status> = export const Status$outboundSchema: z.ZodType<
Status$inboundSchema; StatusOpen,
z.ZodTypeDef,
StatusOpen
> = z.union([
z.nativeEnum(Status),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal

View File

@@ -5,6 +5,11 @@
import * as z from "zod"; import * as z from "zod";
import { remap as remap$ } from "../../../lib/primitives.js"; import { remap as remap$ } from "../../../lib/primitives.js";
import { safeParse } from "../../../lib/schemas.js"; import { safeParse } from "../../../lib/schemas.js";
import {
catchUnrecognizedEnum,
OpenEnum,
Unrecognized,
} from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js"; import { Result as SafeParseResult } from "../../types/fp.js";
import { RFCDate } from "../../types/rfcdate.js"; import { RFCDate } from "../../types/rfcdate.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js";
@@ -24,6 +29,10 @@ export enum Filter {
Available = "available", Available = "available",
Released = "released", Released = "released",
} }
/**
* Filter
*/
export type FilterOpen = OpenEnum<typeof Filter>;
/** /**
* The type of library to filter. Can be "movie" or "show", or all if not present. * The type of library to filter. Can be "movie" or "show", or all if not present.
@@ -34,6 +43,12 @@ export enum Libtype {
Movie = "movie", Movie = "movie",
Show = "show", Show = "show",
} }
/**
* The type of library to filter. Can be "movie" or "show", or all if not present.
*
* @remarks
*/
export type LibtypeOpen = OpenEnum<typeof Libtype>;
/** /**
* include collections in the results * include collections in the results
@@ -59,7 +74,7 @@ export type GetWatchListRequest = {
/** /**
* Filter * Filter
*/ */
filter: Filter; filter: FilterOpen;
/** /**
* In the format "field:dir". Available fields are "watchlistedAt" (Added At), * In the format "field:dir". Available fields are "watchlistedAt" (Added At),
* *
@@ -73,7 +88,7 @@ export type GetWatchListRequest = {
* *
* @remarks * @remarks
*/ */
libtype?: Libtype | undefined; libtype?: LibtypeOpen | undefined;
/** /**
* The number of items to return. If not specified, all items will be returned. * The number of items to return. If not specified, all items will be returned.
* *
@@ -192,12 +207,25 @@ export type GetWatchListResponse = {
}; };
/** @internal */ /** @internal */
export const Filter$inboundSchema: z.ZodNativeEnum<typeof Filter> = z export const Filter$inboundSchema: z.ZodType<
.nativeEnum(Filter); FilterOpen,
z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(Filter),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const Filter$outboundSchema: z.ZodNativeEnum<typeof Filter> = export const Filter$outboundSchema: z.ZodType<
Filter$inboundSchema; FilterOpen,
z.ZodTypeDef,
FilterOpen
> = z.union([
z.nativeEnum(Filter),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal
@@ -211,12 +239,25 @@ export namespace Filter$ {
} }
/** @internal */ /** @internal */
export const Libtype$inboundSchema: z.ZodNativeEnum<typeof Libtype> = z export const Libtype$inboundSchema: z.ZodType<
.nativeEnum(Libtype); LibtypeOpen,
z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(Libtype),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const Libtype$outboundSchema: z.ZodNativeEnum<typeof Libtype> = export const Libtype$outboundSchema: z.ZodType<
Libtype$inboundSchema; LibtypeOpen,
z.ZodTypeDef,
LibtypeOpen
> = z.union([
z.nativeEnum(Libtype),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal

View File

@@ -5,6 +5,11 @@
import * as z from "zod"; import * as z from "zod";
import { remap as remap$ } from "../../../lib/primitives.js"; import { remap as remap$ } from "../../../lib/primitives.js";
import { safeParse } from "../../../lib/schemas.js"; import { safeParse } from "../../../lib/schemas.js";
import {
catchUnrecognizedEnum,
OpenEnum,
Unrecognized,
} from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js"; import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js";
@@ -25,6 +30,17 @@ export enum Level {
Three = 3, Three = 3,
Four = 4, Four = 4,
} }
/**
* An integer log level to write to the PMS log with.
*
* @remarks
* 0: Error
* 1: Warning
* 2: Info
* 3: Debug
* 4: Verbose
*/
export type LevelOpen = OpenEnum<typeof Level>;
export type LogLineRequest = { export type LogLineRequest = {
/** /**
@@ -37,7 +53,7 @@ export type LogLineRequest = {
* 3: Debug * 3: Debug
* 4: Verbose * 4: Verbose
*/ */
level: Level; level: LevelOpen;
/** /**
* The text of the message to write to the log. * The text of the message to write to the log.
*/ */
@@ -64,13 +80,22 @@ export type LogLineResponse = {
}; };
/** @internal */ /** @internal */
export const Level$inboundSchema: z.ZodNativeEnum<typeof Level> = z.nativeEnum( export const Level$inboundSchema: z.ZodType<LevelOpen, z.ZodTypeDef, unknown> =
Level, z
); .union([
z.nativeEnum(Level),
z.number().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const Level$outboundSchema: z.ZodNativeEnum<typeof Level> = export const Level$outboundSchema: z.ZodType<
Level$inboundSchema; LevelOpen,
z.ZodTypeDef,
LevelOpen
> = z.union([
z.nativeEnum(Level),
z.number().and(z.custom<Unrecognized<number>>()),
]);
/** /**
* @internal * @internal

View File

@@ -5,6 +5,11 @@
import * as z from "zod"; import * as z from "zod";
import { remap as remap$ } from "../../../lib/primitives.js"; import { remap as remap$ } from "../../../lib/primitives.js";
import { safeParse } from "../../../lib/schemas.js"; import { safeParse } from "../../../lib/schemas.js";
import {
catchUnrecognizedEnum,
OpenEnum,
Unrecognized,
} from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js"; import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js";
@@ -56,6 +61,12 @@ export enum PostUsersSignInDataMailingListStatus {
Active = "active", Active = "active",
Unsubscribed = "unsubscribed", Unsubscribed = "unsubscribed",
} }
/**
* Your current mailing list status (active or unsubscribed)
*/
export type PostUsersSignInDataMailingListStatusOpen = OpenEnum<
typeof PostUsersSignInDataMailingListStatus
>;
/** /**
* The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) * The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
@@ -125,13 +136,16 @@ export enum PostUsersSignInDataStatus {
Online = "online", Online = "online",
Offline = "offline", Offline = "offline",
} }
export type PostUsersSignInDataStatusOpen = OpenEnum<
typeof PostUsersSignInDataStatus
>;
export type PostUsersSignInDataServices = { export type PostUsersSignInDataServices = {
identifier: string; identifier: string;
endpoint: string; endpoint: string;
token: string | null; token: string | null;
secret: string | null; secret: string | null;
status: PostUsersSignInDataStatus; status: PostUsersSignInDataStatusOpen;
}; };
/** /**
@@ -141,6 +155,12 @@ export enum PostUsersSignInDataAuthenticationStatus {
Inactive = "Inactive", Inactive = "Inactive",
Active = "Active", Active = "Active",
} }
/**
* String representation of subscriptionActive
*/
export type PostUsersSignInDataAuthenticationStatusOpen = OpenEnum<
typeof PostUsersSignInDataAuthenticationStatus
>;
/** /**
* If the accounts Plex Pass subscription is active * If the accounts Plex Pass subscription is active
@@ -161,7 +181,7 @@ export type PostUsersSignInDataSubscription = {
/** /**
* String representation of subscriptionActive * String representation of subscriptionActive
*/ */
status?: PostUsersSignInDataAuthenticationStatus | undefined; status?: PostUsersSignInDataAuthenticationStatusOpen | undefined;
/** /**
* Payment service used for your Plex Pass subscription * Payment service used for your Plex Pass subscription
*/ */
@@ -179,6 +199,12 @@ export enum PostUsersSignInDataAuthenticationResponseStatus {
Inactive = "Inactive", Inactive = "Inactive",
Active = "Active", Active = "Active",
} }
/**
* String representation of subscriptionActive
*/
export type PostUsersSignInDataAuthenticationResponseStatusOpen = OpenEnum<
typeof PostUsersSignInDataAuthenticationResponseStatus
>;
export type PostUsersSignInDataAuthenticationSubscription = { export type PostUsersSignInDataAuthenticationSubscription = {
/** /**
@@ -196,7 +222,7 @@ export type PostUsersSignInDataAuthenticationSubscription = {
/** /**
* String representation of subscriptionActive * String representation of subscriptionActive
*/ */
status?: PostUsersSignInDataAuthenticationResponseStatus | undefined; status?: PostUsersSignInDataAuthenticationResponseStatusOpen | undefined;
/** /**
* Payment service used for your Plex Pass subscription * Payment service used for your Plex Pass subscription
*/ */
@@ -210,6 +236,9 @@ export type PostUsersSignInDataAuthenticationSubscription = {
export enum PostUsersSignInDataState { export enum PostUsersSignInDataState {
Ended = "ended", Ended = "ended",
} }
export type PostUsersSignInDataStateOpen = OpenEnum<
typeof PostUsersSignInDataState
>;
export type InternalPaymentMethod = {}; export type InternalPaymentMethod = {};
@@ -232,7 +261,7 @@ export type PastSubscription = {
canConvert?: boolean | undefined; canConvert?: boolean | undefined;
type: string; type: string;
transfer: string | null; transfer: string | null;
state: PostUsersSignInDataState; state: PostUsersSignInDataStateOpen;
billing: Billing; billing: Billing;
}; };
@@ -327,7 +356,7 @@ export type PostUsersSignInDataUserPlexAccount = {
/** /**
* Your current mailing list status (active or unsubscribed) * Your current mailing list status (active or unsubscribed)
*/ */
mailingListStatus: PostUsersSignInDataMailingListStatus; mailingListStatus: PostUsersSignInDataMailingListStatusOpen;
/** /**
* The maximum number of accounts allowed in the Plex Home * The maximum number of accounts allowed in the Plex Home
*/ */
@@ -570,15 +599,25 @@ export function postUsersSignInDataRequestFromJSON(
} }
/** @internal */ /** @internal */
export const PostUsersSignInDataMailingListStatus$inboundSchema: export const PostUsersSignInDataMailingListStatus$inboundSchema: z.ZodType<
z.ZodNativeEnum<typeof PostUsersSignInDataMailingListStatus> = z.nativeEnum( PostUsersSignInDataMailingListStatusOpen,
PostUsersSignInDataMailingListStatus, z.ZodTypeDef,
); unknown
> = z
.union([
z.nativeEnum(PostUsersSignInDataMailingListStatus),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const PostUsersSignInDataMailingListStatus$outboundSchema: export const PostUsersSignInDataMailingListStatus$outboundSchema: z.ZodType<
z.ZodNativeEnum<typeof PostUsersSignInDataMailingListStatus> = PostUsersSignInDataMailingListStatusOpen,
PostUsersSignInDataMailingListStatus$inboundSchema; z.ZodTypeDef,
PostUsersSignInDataMailingListStatusOpen
> = z.union([
z.nativeEnum(PostUsersSignInDataMailingListStatus),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal
@@ -799,14 +838,25 @@ export function postUsersSignInDataUserProfileFromJSON(
} }
/** @internal */ /** @internal */
export const PostUsersSignInDataStatus$inboundSchema: z.ZodNativeEnum< export const PostUsersSignInDataStatus$inboundSchema: z.ZodType<
typeof PostUsersSignInDataStatus PostUsersSignInDataStatusOpen,
> = z.nativeEnum(PostUsersSignInDataStatus); z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(PostUsersSignInDataStatus),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const PostUsersSignInDataStatus$outboundSchema: z.ZodNativeEnum< export const PostUsersSignInDataStatus$outboundSchema: z.ZodType<
typeof PostUsersSignInDataStatus PostUsersSignInDataStatusOpen,
> = PostUsersSignInDataStatus$inboundSchema; z.ZodTypeDef,
PostUsersSignInDataStatusOpen
> = z.union([
z.nativeEnum(PostUsersSignInDataStatus),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal
@@ -888,14 +938,25 @@ export function postUsersSignInDataServicesFromJSON(
} }
/** @internal */ /** @internal */
export const PostUsersSignInDataAuthenticationStatus$inboundSchema: export const PostUsersSignInDataAuthenticationStatus$inboundSchema: z.ZodType<
z.ZodNativeEnum<typeof PostUsersSignInDataAuthenticationStatus> = z PostUsersSignInDataAuthenticationStatusOpen,
.nativeEnum(PostUsersSignInDataAuthenticationStatus); z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(PostUsersSignInDataAuthenticationStatus),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const PostUsersSignInDataAuthenticationStatus$outboundSchema: export const PostUsersSignInDataAuthenticationStatus$outboundSchema: z.ZodType<
z.ZodNativeEnum<typeof PostUsersSignInDataAuthenticationStatus> = PostUsersSignInDataAuthenticationStatusOpen,
PostUsersSignInDataAuthenticationStatus$inboundSchema; z.ZodTypeDef,
PostUsersSignInDataAuthenticationStatusOpen
> = z.union([
z.nativeEnum(PostUsersSignInDataAuthenticationStatus),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal
@@ -983,13 +1044,26 @@ export function postUsersSignInDataSubscriptionFromJSON(
/** @internal */ /** @internal */
export const PostUsersSignInDataAuthenticationResponseStatus$inboundSchema: export const PostUsersSignInDataAuthenticationResponseStatus$inboundSchema:
z.ZodNativeEnum<typeof PostUsersSignInDataAuthenticationResponseStatus> = z z.ZodType<
.nativeEnum(PostUsersSignInDataAuthenticationResponseStatus); PostUsersSignInDataAuthenticationResponseStatusOpen,
z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(PostUsersSignInDataAuthenticationResponseStatus),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const PostUsersSignInDataAuthenticationResponseStatus$outboundSchema: export const PostUsersSignInDataAuthenticationResponseStatus$outboundSchema:
z.ZodNativeEnum<typeof PostUsersSignInDataAuthenticationResponseStatus> = z.ZodType<
PostUsersSignInDataAuthenticationResponseStatus$inboundSchema; PostUsersSignInDataAuthenticationResponseStatusOpen,
z.ZodTypeDef,
PostUsersSignInDataAuthenticationResponseStatusOpen
> = z.union([
z.nativeEnum(PostUsersSignInDataAuthenticationResponseStatus),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal
@@ -1089,14 +1163,25 @@ export function postUsersSignInDataAuthenticationSubscriptionFromJSON(
} }
/** @internal */ /** @internal */
export const PostUsersSignInDataState$inboundSchema: z.ZodNativeEnum< export const PostUsersSignInDataState$inboundSchema: z.ZodType<
typeof PostUsersSignInDataState PostUsersSignInDataStateOpen,
> = z.nativeEnum(PostUsersSignInDataState); z.ZodTypeDef,
unknown
> = z
.union([
z.nativeEnum(PostUsersSignInDataState),
z.string().transform(catchUnrecognizedEnum),
]);
/** @internal */ /** @internal */
export const PostUsersSignInDataState$outboundSchema: z.ZodNativeEnum< export const PostUsersSignInDataState$outboundSchema: z.ZodType<
typeof PostUsersSignInDataState PostUsersSignInDataStateOpen,
> = PostUsersSignInDataState$inboundSchema; z.ZodTypeDef,
PostUsersSignInDataStateOpen
> = z.union([
z.nativeEnum(PostUsersSignInDataState),
z.string().and(z.custom<Unrecognized<string>>()),
]);
/** /**
* @internal * @internal

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