diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index f2c3ff60..b920e53a 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 16f22cbf-f23f-4419-8924-3a4b06381947 management: - docChecksum: 36ee724f848f28426c2a102c916f4e89 + docChecksum: 3a619a1b9e1e14a2e6e8d574c2e2d637 docVersion: 0.0.3 - speakeasyVersion: 1.531.4 - generationVersion: 2.570.4 - releaseVersion: 0.36.2 - configChecksum: 10fab2b0d3dc4d904f07db6dd8c02510 + speakeasyVersion: 1.535.1 + generationVersion: 2.585.2 + releaseVersion: 0.37.0 + configChecksum: 6123b3157e6662ed6918a7c050ffebc5 repoURL: https://github.com/LukeHagar/plexjs.git repoSubDirectory: . installationURL: https://github.com/LukeHagar/plexjs @@ -31,6 +31,7 @@ features: methodServerURLs: 2.82.1 nameOverrides: 2.81.2 nullables: 0.1.1 + openEnums: 0.1.1 responseFormat: 0.2.3 retries: 2.83.0 sdkHooks: 0.2.0 diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 44a27c36..58e7e716 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -15,7 +15,7 @@ generation: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: false typescript: - version: 0.36.2 + version: 0.37.0 additionalDependencies: dependencies: {} devDependencies: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 0effa3dc..9556615b 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.531.4 +speakeasyVersion: 1.535.1 sources: my-source: sourceNamespace: my-source @@ -9,20 +9,20 @@ sources: - main plexapi: sourceNamespace: plexapi - sourceRevisionDigest: sha256:db75a06885b897418dcb580679b5f744348573ad317155172346d32442420e5e - sourceBlobDigest: sha256:ac0a3c3a6df002378b3522325c2330ba4309fbbbfa503a04b8267398f20033f5 + sourceRevisionDigest: sha256:b2f9599237ceb13cf8f9c1693e38b290177b65fb389cebf0c3c60b8ef4778615 + sourceBlobDigest: sha256:f8df9ef88ada992cd981d601e6c0b45cc82db76aba3d915c2f9d08f90c81ced9 tags: - latest - - speakeasy-sdk-regen-1744589502 + - speakeasy-sdk-regen-1745021437 - 0.0.3 targets: plexjs: source: plexapi sourceNamespace: plexapi - sourceRevisionDigest: sha256:db75a06885b897418dcb580679b5f744348573ad317155172346d32442420e5e - sourceBlobDigest: sha256:ac0a3c3a6df002378b3522325c2330ba4309fbbbfa503a04b8267398f20033f5 + sourceRevisionDigest: sha256:b2f9599237ceb13cf8f9c1693e38b290177b65fb389cebf0c3c60b8ef4778615 + sourceBlobDigest: sha256:f8df9ef88ada992cd981d601e6c0b45cc82db76aba3d915c2f9d08f90c81ced9 codeSamplesNamespace: code-samples-typescript-plexjs - codeSamplesRevisionDigest: sha256:2542621903a932e966c28b4970e8b3a9e7f8b459e42d63ebebdc3940e551cd76 + codeSamplesRevisionDigest: sha256:86b4c9afc42dfef089cf6e9c6ad9f7df1060563fa04a7b1cdaa1f88b4c8cd902 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/RELEASES.md b/RELEASES.md index 132d33be..7273b5da 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1308,4 +1308,14 @@ Based on: ### Generated - [typescript v0.36.2] . ### Releases -- [NPM v0.36.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.36.2 - . \ No newline at end of file +- [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 - . \ No newline at end of file diff --git a/docs/sdk/models/operations/createplaylistqueryparamtype.md b/docs/sdk/models/operations/createplaylistqueryparamtype.md index 127e01de..9c971df9 100644 --- a/docs/sdk/models/operations/createplaylistqueryparamtype.md +++ b/docs/sdk/models/operations/createplaylistqueryparamtype.md @@ -12,8 +12,11 @@ let value: CreatePlaylistQueryParamType = CreatePlaylistQueryParamType.Photo; ## Values -| Name | Value | -| ------- | ------- | -| `Audio` | audio | -| `Video` | video | -| `Photo` | photo | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Audio` | audio | +| `Video` | video | +| `Photo` | photo | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/enablecreditsmarkergeneration.md b/docs/sdk/models/operations/enablecreditsmarkergeneration.md index 2787eaff..d4a436cc 100644 --- a/docs/sdk/models/operations/enablecreditsmarkergeneration.md +++ b/docs/sdk/models/operations/enablecreditsmarkergeneration.md @@ -13,7 +13,10 @@ let value: EnableCreditsMarkerGeneration = ## Values -| Name | Value | -| ---------------- | ---------------- | -| `LibraryDefault` | -1 | -| `Disabled` | 0 | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `LibraryDefault` | -1 | +| `Disabled` | 0 | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/episodesort.md b/docs/sdk/models/operations/episodesort.md index 7e3b4380..0a982bee 100644 --- a/docs/sdk/models/operations/episodesort.md +++ b/docs/sdk/models/operations/episodesort.md @@ -12,8 +12,11 @@ let value: EpisodeSort = EpisodeSort.OldestFirst; ## Values -| Name | Value | -| ---------------- | ---------------- | -| `LibraryDefault` | -1 | -| `OldestFirst` | 0 | -| `NewestFirst` | 1 | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `LibraryDefault` | -1 | +| `OldestFirst` | 0 | +| `NewestFirst` | 1 | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/filter.md b/docs/sdk/models/operations/filter.md index 7579d234..241f407c 100644 --- a/docs/sdk/models/operations/filter.md +++ b/docs/sdk/models/operations/filter.md @@ -12,8 +12,11 @@ let value: Filter = Filter.Available; ## Values -| Name | Value | -| ----------- | ----------- | -| `All` | all | -| `Available` | available | -| `Released` | released | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `All` | all | +| `Available` | available | +| `Released` | released | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/flattenseasons.md b/docs/sdk/models/operations/flattenseasons.md index 3899bb4a..80030063 100644 --- a/docs/sdk/models/operations/flattenseasons.md +++ b/docs/sdk/models/operations/flattenseasons.md @@ -12,8 +12,11 @@ let value: FlattenSeasons = FlattenSeasons.Show; ## Values -| Name | Value | -| ---------------- | ---------------- | -| `LibraryDefault` | -1 | -| `Hide` | 0 | -| `Show` | 1 | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `LibraryDefault` | -1 | +| `Hide` | 0 | +| `Show` | 1 | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getactorslibraryqueryparamtype.md b/docs/sdk/models/operations/getactorslibraryqueryparamtype.md index d21dd58f..6f337e0d 100644 --- a/docs/sdk/models/operations/getactorslibraryqueryparamtype.md +++ b/docs/sdk/models/operations/getactorslibraryqueryparamtype.md @@ -19,12 +19,15 @@ let value: GetActorsLibraryQueryParamType = ## Values -| Name | Value | -| --------- | --------- | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Audio` | 8 | -| `Album` | 9 | -| `Track` | 10 | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Movie` | 1 | +| `TvShow` | 2 | +| `Season` | 3 | +| `Episode` | 4 | +| `Audio` | 8 | +| `Album` | 9 | +| `Track` | 10 | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getalllibrariestype.md b/docs/sdk/models/operations/getalllibrariestype.md index 0e393d81..f7cb59e5 100644 --- a/docs/sdk/models/operations/getalllibrariestype.md +++ b/docs/sdk/models/operations/getalllibrariestype.md @@ -12,11 +12,14 @@ let value: GetAllLibrariesType = GetAllLibrariesType.Movie; ## Values -| Name | Value | -| --------- | --------- | -| `Movie` | movie | -| `TvShow` | show | -| `Season` | season | -| `Episode` | episode | -| `Artist` | artist | -| `Album` | album | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Movie` | movie | +| `TvShow` | show | +| `Season` | season | +| `Episode` | episode | +| `Artist` | artist | +| `Album` | album | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getallmedialibrarylibraryresponsetype.md b/docs/sdk/models/operations/getallmedialibrarylibraryresponsetype.md index ebc1cfb1..eaf6b0a9 100644 --- a/docs/sdk/models/operations/getallmedialibrarylibraryresponsetype.md +++ b/docs/sdk/models/operations/getallmedialibrarylibraryresponsetype.md @@ -11,9 +11,12 @@ let value: GetAllMediaLibraryLibraryResponseType = ## Values -| Name | Value | -| ------------- | ------------- | -| `CoverPoster` | coverPoster | -| `Background` | background | -| `Snapshot` | snapshot | -| `ClearLogo` | clearLogo | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `CoverPoster` | coverPoster | +| `Background` | background | +| `Snapshot` | snapshot | +| `ClearLogo` | clearLogo | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getallmedialibrarylibrarytype.md b/docs/sdk/models/operations/getallmedialibrarylibrarytype.md index 5cbb430d..a73c6389 100644 --- a/docs/sdk/models/operations/getallmedialibrarylibrarytype.md +++ b/docs/sdk/models/operations/getallmedialibrarylibrarytype.md @@ -13,11 +13,14 @@ let value: GetAllMediaLibraryLibraryType = GetAllMediaLibraryLibraryType.Movie; ## Values -| Name | Value | -| --------- | --------- | -| `Movie` | movie | -| `TvShow` | show | -| `Season` | season | -| `Episode` | episode | -| `Artist` | artist | -| `Album` | album | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Movie` | movie | +| `TvShow` | show | +| `Season` | season | +| `Episode` | episode | +| `Artist` | artist | +| `Album` | album | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getallmedialibraryqueryparamtype.md b/docs/sdk/models/operations/getallmedialibraryqueryparamtype.md index 33ad9b94..d0c79ecd 100644 --- a/docs/sdk/models/operations/getallmedialibraryqueryparamtype.md +++ b/docs/sdk/models/operations/getallmedialibraryqueryparamtype.md @@ -19,12 +19,15 @@ let value: GetAllMediaLibraryQueryParamType = ## Values -| Name | Value | -| --------- | --------- | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Audio` | 8 | -| `Album` | 9 | -| `Track` | 10 | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Movie` | 1 | +| `TvShow` | 2 | +| `Season` | 3 | +| `Episode` | 4 | +| `Audio` | 8 | +| `Album` | 9 | +| `Track` | 10 | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcountrieslibraryqueryparamtype.md b/docs/sdk/models/operations/getcountrieslibraryqueryparamtype.md index fac78449..c3e25b28 100644 --- a/docs/sdk/models/operations/getcountrieslibraryqueryparamtype.md +++ b/docs/sdk/models/operations/getcountrieslibraryqueryparamtype.md @@ -19,12 +19,15 @@ let value: GetCountriesLibraryQueryParamType = ## Values -| Name | Value | -| --------- | --------- | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Audio` | 8 | -| `Album` | 9 | -| `Track` | 10 | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Movie` | 1 | +| `TvShow` | 2 | +| `Season` | 3 | +| `Episode` | 4 | +| `Audio` | 8 | +| `Album` | 9 | +| `Track` | 10 | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getgenreslibraryqueryparamtype.md b/docs/sdk/models/operations/getgenreslibraryqueryparamtype.md index e6117b62..51c9c118 100644 --- a/docs/sdk/models/operations/getgenreslibraryqueryparamtype.md +++ b/docs/sdk/models/operations/getgenreslibraryqueryparamtype.md @@ -19,12 +19,15 @@ let value: GetGenresLibraryQueryParamType = ## Values -| Name | Value | -| --------- | --------- | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Audio` | 8 | -| `Album` | 9 | -| `Track` | 10 | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Movie` | 1 | +| `TvShow` | 2 | +| `Season` | 3 | +| `Episode` | 4 | +| `Audio` | 8 | +| `Album` | 9 | +| `Track` | 10 | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarydetailsrequest.md b/docs/sdk/models/operations/getlibrarydetailsrequest.md index 3ab7980f..1d366687 100644 --- a/docs/sdk/models/operations/getlibrarydetailsrequest.md +++ b/docs/sdk/models/operations/getlibrarydetailsrequest.md @@ -12,7 +12,7 @@ let value: GetLibraryDetailsRequest = { ## Fields -| 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).
Only exists for backwards compatibility, media providers other than the server libraries have it on always.
| | -| `sectionKey` | *number* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | \ No newline at end of file +| 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).
Only exists for backwards compatibility, media providers other than the server libraries have it on always.
| | +| `sectionKey` | *number* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemslibraryresponse200type.md b/docs/sdk/models/operations/getlibraryitemslibraryresponse200type.md index 41409524..78664910 100644 --- a/docs/sdk/models/operations/getlibraryitemslibraryresponse200type.md +++ b/docs/sdk/models/operations/getlibraryitemslibraryresponse200type.md @@ -11,9 +11,12 @@ let value: GetLibraryItemsLibraryResponse200Type = ## Values -| Name | Value | -| ------------- | ------------- | -| `CoverPoster` | coverPoster | -| `Background` | background | -| `Snapshot` | snapshot | -| `ClearLogo` | clearLogo | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `CoverPoster` | coverPoster | +| `Background` | background | +| `Snapshot` | snapshot | +| `ClearLogo` | clearLogo | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemslibrarytype.md b/docs/sdk/models/operations/getlibraryitemslibrarytype.md index 6f4897fa..5c95f6c1 100644 --- a/docs/sdk/models/operations/getlibraryitemslibrarytype.md +++ b/docs/sdk/models/operations/getlibraryitemslibrarytype.md @@ -13,11 +13,14 @@ let value: GetLibraryItemsLibraryType = GetLibraryItemsLibraryType.Movie; ## Values -| Name | Value | -| --------- | --------- | -| `Movie` | movie | -| `TvShow` | show | -| `Season` | season | -| `Episode` | episode | -| `Artist` | artist | -| `Album` | album | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Movie` | movie | +| `TvShow` | show | +| `Season` | season | +| `Episode` | episode | +| `Artist` | artist | +| `Album` | album | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemsqueryparamtype.md b/docs/sdk/models/operations/getlibraryitemsqueryparamtype.md index 69a02024..bf7e9d3d 100644 --- a/docs/sdk/models/operations/getlibraryitemsqueryparamtype.md +++ b/docs/sdk/models/operations/getlibraryitemsqueryparamtype.md @@ -18,12 +18,15 @@ let value: GetLibraryItemsQueryParamType = GetLibraryItemsQueryParamType.TvShow; ## Values -| Name | Value | -| --------- | --------- | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Audio` | 8 | -| `Album` | 9 | -| `Track` | 10 | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Movie` | 1 | +| `TvShow` | 2 | +| `Season` | 3 | +| `Episode` | 4 | +| `Audio` | 8 | +| `Album` | 9 | +| `Track` | 10 | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistcontentsqueryparamtype.md b/docs/sdk/models/operations/getplaylistcontentsqueryparamtype.md index 75909969..fc87272e 100644 --- a/docs/sdk/models/operations/getplaylistcontentsqueryparamtype.md +++ b/docs/sdk/models/operations/getplaylistcontentsqueryparamtype.md @@ -19,12 +19,15 @@ let value: GetPlaylistContentsQueryParamType = ## Values -| Name | Value | -| --------- | --------- | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Audio` | 8 | -| `Album` | 9 | -| `Track` | 10 | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Movie` | 1 | +| `TvShow` | 2 | +| `Season` | 3 | +| `Episode` | 4 | +| `Audio` | 8 | +| `Album` | 9 | +| `Track` | 10 | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedhubsresponsetype.md b/docs/sdk/models/operations/getrecentlyaddedhubsresponsetype.md index d52d020d..f3aa6f1b 100644 --- a/docs/sdk/models/operations/getrecentlyaddedhubsresponsetype.md +++ b/docs/sdk/models/operations/getrecentlyaddedhubsresponsetype.md @@ -11,9 +11,12 @@ let value: GetRecentlyAddedHubsResponseType = ## Values -| Name | Value | -| ------------- | ------------- | -| `CoverPoster` | coverPoster | -| `Background` | background | -| `Snapshot` | snapshot | -| `ClearLogo` | clearLogo | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `CoverPoster` | coverPoster | +| `Background` | background | +| `Snapshot` | snapshot | +| `ClearLogo` | clearLogo | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedhubstype.md b/docs/sdk/models/operations/getrecentlyaddedhubstype.md index 78d9d63b..58cc0b6a 100644 --- a/docs/sdk/models/operations/getrecentlyaddedhubstype.md +++ b/docs/sdk/models/operations/getrecentlyaddedhubstype.md @@ -13,11 +13,14 @@ let value: GetRecentlyAddedHubsType = GetRecentlyAddedHubsType.Movie; ## Values -| Name | Value | -| --------- | --------- | -| `Movie` | movie | -| `TvShow` | show | -| `Season` | season | -| `Episode` | episode | -| `Artist` | artist | -| `Album` | album | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Movie` | movie | +| `TvShow` | show | +| `Season` | season | +| `Episode` | episode | +| `Artist` | artist | +| `Album` | album | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrariesenablecreditsmarkergeneration.md b/docs/sdk/models/operations/getsearchalllibrariesenablecreditsmarkergeneration.md index 9d979875..4e184474 100644 --- a/docs/sdk/models/operations/getsearchalllibrariesenablecreditsmarkergeneration.md +++ b/docs/sdk/models/operations/getsearchalllibrariesenablecreditsmarkergeneration.md @@ -13,7 +13,10 @@ let value: GetSearchAllLibrariesEnableCreditsMarkerGeneration = ## Values -| Name | Value | -| ---------------- | ---------------- | -| `LibraryDefault` | -1 | -| `Disabled` | 0 | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `LibraryDefault` | -1 | +| `Disabled` | 0 | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrariesepisodesort.md b/docs/sdk/models/operations/getsearchalllibrariesepisodesort.md index 1732b943..36fce199 100644 --- a/docs/sdk/models/operations/getsearchalllibrariesepisodesort.md +++ b/docs/sdk/models/operations/getsearchalllibrariesepisodesort.md @@ -13,8 +13,11 @@ let value: GetSearchAllLibrariesEpisodeSort = ## Values -| Name | Value | -| ---------------- | ---------------- | -| `LibraryDefault` | -1 | -| `OldestFirst` | 0 | -| `NewestFirst` | 1 | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `LibraryDefault` | -1 | +| `OldestFirst` | 0 | +| `NewestFirst` | 1 | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrariesflattenseasons.md b/docs/sdk/models/operations/getsearchalllibrariesflattenseasons.md index 91ced468..46df29f8 100644 --- a/docs/sdk/models/operations/getsearchalllibrariesflattenseasons.md +++ b/docs/sdk/models/operations/getsearchalllibrariesflattenseasons.md @@ -13,8 +13,11 @@ let value: GetSearchAllLibrariesFlattenSeasons = ## Values -| Name | Value | -| ---------------- | ---------------- | -| `LibraryDefault` | -1 | -| `Hide` | 0 | -| `Show` | 1 | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `LibraryDefault` | -1 | +| `Hide` | 0 | +| `Show` | 1 | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrarieslibrarytype.md b/docs/sdk/models/operations/getsearchalllibrarieslibrarytype.md index 4f400e70..8683ea1a 100644 --- a/docs/sdk/models/operations/getsearchalllibrarieslibrarytype.md +++ b/docs/sdk/models/operations/getsearchalllibrarieslibrarytype.md @@ -11,9 +11,12 @@ let value: GetSearchAllLibrariesLibraryType = ## Values -| Name | Value | -| ------------- | ------------- | -| `CoverPoster` | coverPoster | -| `Background` | background | -| `Snapshot` | snapshot | -| `ClearLogo` | clearLogo | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `CoverPoster` | coverPoster | +| `Background` | background | +| `Snapshot` | snapshot | +| `ClearLogo` | clearLogo | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrariesshowordering.md b/docs/sdk/models/operations/getsearchalllibrariesshowordering.md index 398aba68..236e7753 100644 --- a/docs/sdk/models/operations/getsearchalllibrariesshowordering.md +++ b/docs/sdk/models/operations/getsearchalllibrariesshowordering.md @@ -19,10 +19,13 @@ let value: GetSearchAllLibrariesShowOrdering = ## Values -| Name | Value | -| -------------- | -------------- | -| `None` | None | -| `TmdbAiring` | tmdbAiring | -| `TvdbAired` | aired | -| `TvdbDvd` | dvd | -| `TvdbAbsolute` | absolute | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `None` | None | +| `TmdbAiring` | tmdbAiring | +| `TvdbAired` | aired | +| `TvdbDvd` | dvd | +| `TvdbAbsolute` | absolute | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrariestype.md b/docs/sdk/models/operations/getsearchalllibrariestype.md index 4404b3b0..2ade18c8 100644 --- a/docs/sdk/models/operations/getsearchalllibrariestype.md +++ b/docs/sdk/models/operations/getsearchalllibrariestype.md @@ -13,11 +13,14 @@ let value: GetSearchAllLibrariesType = GetSearchAllLibrariesType.Movie; ## Values -| Name | Value | -| --------- | --------- | -| `Movie` | movie | -| `TvShow` | show | -| `Season` | season | -| `Episode` | episode | -| `Artist` | artist | -| `Album` | album | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Movie` | movie | +| `TvShow` | show | +| `Season` | season | +| `Episode` | episode | +| `Artist` | artist | +| `Album` | album | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchlibraryqueryparamtype.md b/docs/sdk/models/operations/getsearchlibraryqueryparamtype.md index ad1d74cb..00064f13 100644 --- a/docs/sdk/models/operations/getsearchlibraryqueryparamtype.md +++ b/docs/sdk/models/operations/getsearchlibraryqueryparamtype.md @@ -19,12 +19,15 @@ let value: GetSearchLibraryQueryParamType = ## Values -| Name | Value | -| --------- | --------- | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Audio` | 8 | -| `Album` | 9 | -| `Track` | 10 | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Movie` | 1 | +| `TvShow` | 2 | +| `Season` | 3 | +| `Episode` | 4 | +| `Audio` | 8 | +| `Album` | 9 | +| `Track` | 10 | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettokendetailsauthenticationresponsestatus.md b/docs/sdk/models/operations/gettokendetailsauthenticationresponsestatus.md index 9cc83ee0..8414284e 100644 --- a/docs/sdk/models/operations/gettokendetailsauthenticationresponsestatus.md +++ b/docs/sdk/models/operations/gettokendetailsauthenticationresponsestatus.md @@ -13,7 +13,10 @@ let value: GetTokenDetailsAuthenticationResponseStatus = ## Values -| Name | Value | -| ---------- | ---------- | -| `Inactive` | Inactive | -| `Active` | Active | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Inactive` | Inactive | +| `Active` | Active | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettokendetailsauthenticationstatus.md b/docs/sdk/models/operations/gettokendetailsauthenticationstatus.md index 4c8d9e2f..54163881 100644 --- a/docs/sdk/models/operations/gettokendetailsauthenticationstatus.md +++ b/docs/sdk/models/operations/gettokendetailsauthenticationstatus.md @@ -13,7 +13,10 @@ let value: GetTokenDetailsAuthenticationStatus = ## Values -| Name | Value | -| ---------- | ---------- | -| `Inactive` | Inactive | -| `Active` | Active | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Inactive` | Inactive | +| `Active` | Active | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettokendetailsstatus.md b/docs/sdk/models/operations/gettokendetailsstatus.md index 5e02d0ad..f6e2c8b9 100644 --- a/docs/sdk/models/operations/gettokendetailsstatus.md +++ b/docs/sdk/models/operations/gettokendetailsstatus.md @@ -10,7 +10,10 @@ let value: GetTokenDetailsStatus = GetTokenDetailsStatus.Online; ## Values -| Name | Value | -| --------- | --------- | -| `Online` | online | -| `Offline` | offline | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Online` | online | +| `Offline` | offline | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettopwatchedcontentqueryparamtype.md b/docs/sdk/models/operations/gettopwatchedcontentqueryparamtype.md index b48f3a6c..07bc87ca 100644 --- a/docs/sdk/models/operations/gettopwatchedcontentqueryparamtype.md +++ b/docs/sdk/models/operations/gettopwatchedcontentqueryparamtype.md @@ -19,12 +19,15 @@ let value: GetTopWatchedContentQueryParamType = ## Values -| Name | Value | -| --------- | --------- | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Audio` | 8 | -| `Album` | 9 | -| `Track` | 10 | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Movie` | 1 | +| `TvShow` | 2 | +| `Season` | 3 | +| `Episode` | 4 | +| `Audio` | 8 | +| `Album` | 9 | +| `Track` | 10 | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/includedetails.md b/docs/sdk/models/operations/includedetails.md index b9055091..66f98df1 100644 --- a/docs/sdk/models/operations/includedetails.md +++ b/docs/sdk/models/operations/includedetails.md @@ -1,6 +1,6 @@ # 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. diff --git a/docs/sdk/models/operations/level.md b/docs/sdk/models/operations/level.md index 861ffd0b..d9f0b29a 100644 --- a/docs/sdk/models/operations/level.md +++ b/docs/sdk/models/operations/level.md @@ -1,10 +1,10 @@ # Level -An integer log level to write to the PMS log with. -0: Error -1: Warning -2: Info -3: Debug +An integer log level to write to the PMS log with. +0: Error +1: Warning +2: Info +3: Debug 4: Verbose @@ -18,10 +18,13 @@ let value: Level = Level.Two; ## Values -| Name | Value | -| ------- | ------- | -| `Zero` | 0 | -| `One` | 1 | -| `Two` | 2 | -| `Three` | 3 | -| `Four` | 4 | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Zero` | 0 | +| `One` | 1 | +| `Two` | 2 | +| `Three` | 3 | +| `Four` | 4 | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/libtype.md b/docs/sdk/models/operations/libtype.md index 00bd8379..56d99c00 100644 --- a/docs/sdk/models/operations/libtype.md +++ b/docs/sdk/models/operations/libtype.md @@ -13,7 +13,10 @@ let value: Libtype = Libtype.Show; ## Values -| Name | Value | -| ------- | ------- | -| `Movie` | movie | -| `Show` | show | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Movie` | movie | +| `Show` | show | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/loglinerequest.md b/docs/sdk/models/operations/loglinerequest.md index 7a663ca7..b1a24852 100644 --- a/docs/sdk/models/operations/loglinerequest.md +++ b/docs/sdk/models/operations/loglinerequest.md @@ -14,8 +14,8 @@ let value: LogLineRequest = { ## Fields -| 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.
0: Error
1: Warning
2: Info
3: Debug
4: Verbose
| | -| `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 | \ No newline at end of file +| 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.
0: Error
1: Warning
2: Info
3: Debug
4: Verbose
| | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/mailingliststatus.md b/docs/sdk/models/operations/mailingliststatus.md index bb7258fb..480f2282 100644 --- a/docs/sdk/models/operations/mailingliststatus.md +++ b/docs/sdk/models/operations/mailingliststatus.md @@ -12,7 +12,10 @@ let value: MailingListStatus = MailingListStatus.Active; ## Values -| Name | Value | -| -------------- | -------------- | -| `Active` | active | -| `Unsubscribed` | unsubscribed | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Active` | active | +| `Unsubscribed` | unsubscribed | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/pathparamtaskname.md b/docs/sdk/models/operations/pathparamtaskname.md index e5dca812..975fbe3b 100644 --- a/docs/sdk/models/operations/pathparamtaskname.md +++ b/docs/sdk/models/operations/pathparamtaskname.md @@ -12,6 +12,8 @@ let value: PathParamTaskName = PathParamTaskName.RefreshPeriodicMetadata; ## Values +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + | Name | Value | | --------------------------- | --------------------------- | | `BackupDatabase` | BackupDatabase | @@ -27,4 +29,5 @@ let value: PathParamTaskName = PathParamTaskName.RefreshPeriodicMetadata; | `RefreshLibraries` | RefreshLibraries | | `RefreshLocalMedia` | RefreshLocalMedia | | `RefreshPeriodicMetadata` | RefreshPeriodicMetadata | -| `UpgradeMediaAnalysis` | UpgradeMediaAnalysis | \ No newline at end of file +| `UpgradeMediaAnalysis` | UpgradeMediaAnalysis | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/playlisttype.md b/docs/sdk/models/operations/playlisttype.md index bb2c3475..ad3e2862 100644 --- a/docs/sdk/models/operations/playlisttype.md +++ b/docs/sdk/models/operations/playlisttype.md @@ -12,8 +12,11 @@ let value: PlaylistType = PlaylistType.Video; ## Values -| Name | Value | -| ------- | ------- | -| `Audio` | audio | -| `Video` | video | -| `Photo` | photo | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Audio` | audio | +| `Video` | video | +| `Photo` | photo | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/postuserssignindataauthenticationresponsestatus.md b/docs/sdk/models/operations/postuserssignindataauthenticationresponsestatus.md index 1655eed4..e2953287 100644 --- a/docs/sdk/models/operations/postuserssignindataauthenticationresponsestatus.md +++ b/docs/sdk/models/operations/postuserssignindataauthenticationresponsestatus.md @@ -13,7 +13,10 @@ let value: PostUsersSignInDataAuthenticationResponseStatus = ## Values -| Name | Value | -| ---------- | ---------- | -| `Inactive` | Inactive | -| `Active` | Active | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Inactive` | Inactive | +| `Active` | Active | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/postuserssignindataauthenticationstatus.md b/docs/sdk/models/operations/postuserssignindataauthenticationstatus.md index 058a646f..7575c3f0 100644 --- a/docs/sdk/models/operations/postuserssignindataauthenticationstatus.md +++ b/docs/sdk/models/operations/postuserssignindataauthenticationstatus.md @@ -13,7 +13,10 @@ let value: PostUsersSignInDataAuthenticationStatus = ## Values -| Name | Value | -| ---------- | ---------- | -| `Inactive` | Inactive | -| `Active` | Active | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Inactive` | Inactive | +| `Active` | Active | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/postuserssignindatamailingliststatus.md b/docs/sdk/models/operations/postuserssignindatamailingliststatus.md index 93aecfc7..6ca8c57f 100644 --- a/docs/sdk/models/operations/postuserssignindatamailingliststatus.md +++ b/docs/sdk/models/operations/postuserssignindatamailingliststatus.md @@ -13,7 +13,10 @@ let value: PostUsersSignInDataMailingListStatus = ## Values -| Name | Value | -| -------------- | -------------- | -| `Active` | active | -| `Unsubscribed` | unsubscribed | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Active` | active | +| `Unsubscribed` | unsubscribed | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/postuserssignindatastate.md b/docs/sdk/models/operations/postuserssignindatastate.md index f120fcda..33aed12a 100644 --- a/docs/sdk/models/operations/postuserssignindatastate.md +++ b/docs/sdk/models/operations/postuserssignindatastate.md @@ -10,6 +10,9 @@ let value: PostUsersSignInDataState = PostUsersSignInDataState.Ended; ## Values -| Name | Value | -| ------- | ------- | -| `Ended` | ended | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Ended` | ended | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/postuserssignindatastatus.md b/docs/sdk/models/operations/postuserssignindatastatus.md index 07371388..7251b6e0 100644 --- a/docs/sdk/models/operations/postuserssignindatastatus.md +++ b/docs/sdk/models/operations/postuserssignindatastatus.md @@ -10,7 +10,10 @@ let value: PostUsersSignInDataStatus = PostUsersSignInDataStatus.Online; ## Values -| Name | Value | -| --------- | --------- | -| `Online` | online | -| `Offline` | offline | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Online` | online | +| `Offline` | offline | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/queryparamforce.md b/docs/sdk/models/operations/queryparamforce.md index 2fbceaab..8c0c39c0 100644 --- a/docs/sdk/models/operations/queryparamforce.md +++ b/docs/sdk/models/operations/queryparamforce.md @@ -1,8 +1,8 @@ # QueryParamForce -Force overwriting of duplicate playlists. -By default, a playlist file uploaded with the same path will overwrite the existing playlist. -The `force` argument is used to disable overwriting. +Force overwriting of duplicate playlists. +By default, a playlist file uploaded with the same path will overwrite the existing playlist. +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. diff --git a/docs/sdk/models/operations/queryparamsmart.md b/docs/sdk/models/operations/queryparamsmart.md index 354943ab..14485e75 100644 --- a/docs/sdk/models/operations/queryparamsmart.md +++ b/docs/sdk/models/operations/queryparamsmart.md @@ -12,7 +12,10 @@ let value: QueryParamSmart = QueryParamSmart.Zero; ## Values -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Zero` | 0 | +| `One` | 1 | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/queryparamtype.md b/docs/sdk/models/operations/queryparamtype.md index e5f976a6..f03d2b5f 100644 --- a/docs/sdk/models/operations/queryparamtype.md +++ b/docs/sdk/models/operations/queryparamtype.md @@ -18,12 +18,15 @@ let value: QueryParamType = QueryParamType.TvShow; ## Values -| Name | Value | -| --------- | --------- | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Audio` | 8 | -| `Album` | 9 | -| `Track` | 10 | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Movie` | 1 | +| `TvShow` | 2 | +| `Season` | 3 | +| `Episode` | 4 | +| `Audio` | 8 | +| `Album` | 9 | +| `Track` | 10 | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/searchtypes.md b/docs/sdk/models/operations/searchtypes.md index bf38e409..dd2a7ac3 100644 --- a/docs/sdk/models/operations/searchtypes.md +++ b/docs/sdk/models/operations/searchtypes.md @@ -10,10 +10,13 @@ let value: SearchTypes = SearchTypes.Tv; ## Values -| Name | Value | -| ------------- | ------------- | -| `Movies` | movies | -| `Music` | music | -| `OtherVideos` | otherVideos | -| `People` | people | -| `Tv` | tv | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Movies` | movies | +| `Music` | music | +| `OtherVideos` | otherVideos | +| `People` | people | +| `Tv` | tv | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/showordering.md b/docs/sdk/models/operations/showordering.md index 52aded54..9dc6f0af 100644 --- a/docs/sdk/models/operations/showordering.md +++ b/docs/sdk/models/operations/showordering.md @@ -18,10 +18,13 @@ let value: ShowOrdering = ShowOrdering.TvdbAbsolute; ## Values -| Name | Value | -| -------------- | -------------- | -| `None` | None | -| `TmdbAiring` | tmdbAiring | -| `TvdbAired` | aired | -| `TvdbDvd` | dvd | -| `TvdbAbsolute` | absolute | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `None` | None | +| `TmdbAiring` | tmdbAiring | +| `TvdbAired` | aired | +| `TvdbDvd` | dvd | +| `TvdbAbsolute` | absolute | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/state.md b/docs/sdk/models/operations/state.md index ab58c24c..e43155d9 100644 --- a/docs/sdk/models/operations/state.md +++ b/docs/sdk/models/operations/state.md @@ -12,8 +12,11 @@ let value: State = State.Playing; ## Values -| Name | Value | -| --------- | --------- | -| `Playing` | playing | -| `Paused` | paused | -| `Stopped` | stopped | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Playing` | playing | +| `Paused` | paused | +| `Stopped` | stopped | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/status.md b/docs/sdk/models/operations/status.md index c82bd4ff..a1f666da 100644 --- a/docs/sdk/models/operations/status.md +++ b/docs/sdk/models/operations/status.md @@ -12,6 +12,9 @@ let value: Status = Status.Accepted; ## Values -| Name | Value | -| ---------- | ---------- | -| `Accepted` | accepted | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Accepted` | accepted | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/tag.md b/docs/sdk/models/operations/tag.md index 14a72d65..0f10c0fe 100644 --- a/docs/sdk/models/operations/tag.md +++ b/docs/sdk/models/operations/tag.md @@ -12,21 +12,24 @@ let value: Tag = Tag.RecentlyViewed; ## Values -| Name | Value | -| ---------------- | ---------------- | -| `Unwatched` | unwatched | -| `Newest` | newest | -| `RecentlyAdded` | recentlyAdded | -| `RecentlyViewed` | recentlyViewed | -| `OnDeck` | onDeck | -| `Collection` | collection | -| `Edition` | edition | -| `Year` | year | -| `Decade` | decade | -| `Director` | director | -| `ContentRating` | contentRating | -| `Rating` | rating | -| `Resolution` | resolution | -| `FirstCharacter` | firstCharacter | -| `Folder` | folder | -| `Albums` | albums | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Unwatched` | unwatched | +| `Newest` | newest | +| `RecentlyAdded` | recentlyAdded | +| `RecentlyViewed` | recentlyViewed | +| `OnDeck` | onDeck | +| `Collection` | collection | +| `Edition` | edition | +| `Year` | year | +| `Decade` | decade | +| `Director` | director | +| `ContentRating` | contentRating | +| `Rating` | rating | +| `Resolution` | resolution | +| `FirstCharacter` | firstCharacter | +| `Folder` | folder | +| `Albums` | albums | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/taskname.md b/docs/sdk/models/operations/taskname.md index 467833e1..f6e3dabf 100644 --- a/docs/sdk/models/operations/taskname.md +++ b/docs/sdk/models/operations/taskname.md @@ -12,6 +12,8 @@ let value: TaskName = TaskName.RefreshLocalMedia; ## Values +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + | Name | Value | | --------------------------- | --------------------------- | | `BackupDatabase` | BackupDatabase | @@ -27,4 +29,5 @@ let value: TaskName = TaskName.RefreshLocalMedia; | `RefreshLibraries` | RefreshLibraries | | `RefreshLocalMedia` | RefreshLocalMedia | | `RefreshPeriodicMetadata` | RefreshPeriodicMetadata | -| `UpgradeMediaAnalysis` | UpgradeMediaAnalysis | \ No newline at end of file +| `UpgradeMediaAnalysis` | UpgradeMediaAnalysis | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/type.md b/docs/sdk/models/operations/type.md index 90158f6a..ed1df790 100644 --- a/docs/sdk/models/operations/type.md +++ b/docs/sdk/models/operations/type.md @@ -18,12 +18,15 @@ let value: Type = Type.TvShow; ## Values -| Name | Value | -| --------- | --------- | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Audio` | 8 | -| `Album` | 9 | -| `Track` | 10 | \ No newline at end of file +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +| Name | Value | +| ---------------------- | ---------------------- | +| `Movie` | 1 | +| `TvShow` | 2 | +| `Season` | 3 | +| `Episode` | 4 | +| `Audio` | 8 | +| `Album` | 9 | +| `Track` | 10 | +| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/uploadplaylistrequest.md b/docs/sdk/models/operations/uploadplaylistrequest.md index 1efbb2c1..beab4bbb 100644 --- a/docs/sdk/models/operations/uploadplaylistrequest.md +++ b/docs/sdk/models/operations/uploadplaylistrequest.md @@ -14,8 +14,8 @@ let value: UploadPlaylistRequest = { ## Fields -| 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.
If the `path` argument is a directory, that path will be scanned for playlist files to be processed.
Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it.
The GUID of each playlist is based on the filename.
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.
The GUID of each playlist is based on the filename.
| /home/barkley/playlist.m3u | -| `force` | [operations.QueryParamForce](../../../sdk/models/operations/queryparamforce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists.
By default, a playlist file uploaded with the same path will overwrite the existing playlist.
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.
| | -| `sectionID` | *number* | :heavy_check_mark: | Possibly the section ID to upload the playlist to, we are not certain. | 1 | \ No newline at end of file +| 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.
If the `path` argument is a directory, that path will be scanned for playlist files to be processed.
Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it.
The GUID of each playlist is based on the filename.
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.
The GUID of each playlist is based on the filename.
| /home/barkley/playlist.m3u | +| `force` | [operations.QueryParamForce](../../../sdk/models/operations/queryparamforce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists.
By default, a playlist file uploaded with the same path will overwrite the existing playlist.
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.
| | +| `sectionID` | *number* | :heavy_check_mark: | Possibly the section ID to upload the playlist to, we are not certain. | 1 | \ No newline at end of file diff --git a/docs/sdks/library/README.md b/docs/sdks/library/README.md index e054957c..060b93e8 100644 --- a/docs/sdks/library/README.md +++ b/docs/sdks/library/README.md @@ -300,14 +300,14 @@ run(); ## 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: ### Directories Organized into three categories: -- **Primary Directories**: +- **Primary Directories**: - Used in some clients for quick access to media subsets (e.g., "All", "On Deck"). - Most can be replicated via media queries. - Customizable by users. @@ -390,13 +390,13 @@ run(); ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `sectionKey` | *number* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| [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).
Only exists for backwards compatibility, media providers other than the server libraries have it on always.
| | -| `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.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | | +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `sectionKey` | *number* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| [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).
Only exists for backwards compatibility, media providers other than the server libraries have it on always.
| | +| `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.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | | ### Response diff --git a/docs/sdks/log/README.md b/docs/sdks/log/README.md index d99367bb..2b7567fe 100644 --- a/docs/sdks/log/README.md +++ b/docs/sdks/log/README.md @@ -72,7 +72,7 @@ run(); | 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.
0: Error
1: Warning
2: Info
3: Debug
4: Verbose
| | +| `level` | [operations.Level](../../sdk/models/operations/level.md) | :heavy_check_mark: | An integer log level to write to the PMS log with.
0: Error
1: Warning
2: Info
3: Debug
4: Verbose
| | | `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] | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | @@ -93,13 +93,13 @@ run(); ## logMultiLine -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. -Each log entry consists of URL-encoded key-value pairs, specifying log attributes such as 'level', 'message', and 'source'. +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. +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`). -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. +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. +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: - `0`: Error - Critical issues that require immediate attention. diff --git a/docs/sdks/playlists/README.md b/docs/sdks/playlists/README.md index 30c1b5a7..2298724d 100644 --- a/docs/sdks/playlists/README.md +++ b/docs/sdks/playlists/README.md @@ -3,9 +3,9 @@ ## 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. -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. @@ -705,14 +705,14 @@ run(); ### Parameters -| 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.
If the `path` argument is a directory, that path will be scanned for playlist files to be processed.
Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it.
The GUID of each playlist is based on the filename.
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.
The GUID of each playlist is based on the filename.
| [object Object] | -| `force` | [operations.QueryParamForce](../../sdk/models/operations/queryparamforce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists.
By default, a playlist file uploaded with the same path will overwrite the existing playlist.
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.
| | -| `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.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. | | +| 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.
If the `path` argument is a directory, that path will be scanned for playlist files to be processed.
Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it.
The GUID of each playlist is based on the filename.
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.
The GUID of each playlist is based on the filename.
| [object Object] | +| `force` | [operations.QueryParamForce](../../sdk/models/operations/queryparamforce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists.
By default, a playlist file uploaded with the same path will overwrite the existing playlist.
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.
| | +| `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.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. | | ### Response diff --git a/jsr.json b/jsr.json index bdd15a22..a900567a 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@lukehagar/plexjs", - "version": "0.36.2", + "version": "0.37.0", "exports": { ".": "./src/index.ts", "./sdk/models/errors": "./src/sdk/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index 50629d22..07686f17 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@lukehagar/plexjs", - "version": "0.36.2", + "version": "0.37.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@lukehagar/plexjs", - "version": "0.36.2", + "version": "0.37.0", "devDependencies": { "@eslint/js": "^9.19.0", "eslint": "^9.19.0", diff --git a/package.json b/package.json index 59f17bf9..6830b5ed 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lukehagar/plexjs", - "version": "0.36.2", + "version": "0.37.0", "author": "LukeHagar", "main": "./index.js", "sideEffects": false, diff --git a/src/funcs/butlerStartTask.ts b/src/funcs/butlerStartTask.ts index 0273b46f..b87c544f 100644 --- a/src/funcs/butlerStartTask.ts +++ b/src/funcs/butlerStartTask.ts @@ -36,7 +36,7 @@ import { Result } from "../sdk/types/fp.js"; */ export function butlerStartTask( client: PlexAPICore, - taskName: operations.TaskName, + taskName: operations.TaskNameOpen, options?: RequestOptions, ): APIPromise< Result< @@ -61,7 +61,7 @@ export function butlerStartTask( async function $do( client: PlexAPICore, - taskName: operations.TaskName, + taskName: operations.TaskNameOpen, options?: RequestOptions, ): Promise< [ diff --git a/src/funcs/butlerStopTask.ts b/src/funcs/butlerStopTask.ts index 4abda3fe..f311fd7f 100644 --- a/src/funcs/butlerStopTask.ts +++ b/src/funcs/butlerStopTask.ts @@ -32,7 +32,7 @@ import { Result } from "../sdk/types/fp.js"; */ export function butlerStopTask( client: PlexAPICore, - taskName: operations.PathParamTaskName, + taskName: operations.PathParamTaskNameOpen, options?: RequestOptions, ): APIPromise< Result< @@ -57,7 +57,7 @@ export function butlerStopTask( async function $do( client: PlexAPICore, - taskName: operations.PathParamTaskName, + taskName: operations.PathParamTaskNameOpen, options?: RequestOptions, ): Promise< [ diff --git a/src/funcs/libraryGetActorsLibrary.ts b/src/funcs/libraryGetActorsLibrary.ts index 52929fac..289b59f7 100644 --- a/src/funcs/libraryGetActorsLibrary.ts +++ b/src/funcs/libraryGetActorsLibrary.ts @@ -33,7 +33,7 @@ import { Result } from "../sdk/types/fp.js"; export function libraryGetActorsLibrary( client: PlexAPICore, sectionKey: number, - type: operations.GetActorsLibraryQueryParamType, + type: operations.GetActorsLibraryQueryParamTypeOpen, options?: RequestOptions, ): APIPromise< Result< @@ -60,7 +60,7 @@ export function libraryGetActorsLibrary( async function $do( client: PlexAPICore, sectionKey: number, - type: operations.GetActorsLibraryQueryParamType, + type: operations.GetActorsLibraryQueryParamTypeOpen, options?: RequestOptions, ): Promise< [ diff --git a/src/funcs/libraryGetCountriesLibrary.ts b/src/funcs/libraryGetCountriesLibrary.ts index 9e7782f7..c4b6bbce 100644 --- a/src/funcs/libraryGetCountriesLibrary.ts +++ b/src/funcs/libraryGetCountriesLibrary.ts @@ -33,7 +33,7 @@ import { Result } from "../sdk/types/fp.js"; export function libraryGetCountriesLibrary( client: PlexAPICore, sectionKey: number, - type: operations.GetCountriesLibraryQueryParamType, + type: operations.GetCountriesLibraryQueryParamTypeOpen, options?: RequestOptions, ): APIPromise< Result< @@ -60,7 +60,7 @@ export function libraryGetCountriesLibrary( async function $do( client: PlexAPICore, sectionKey: number, - type: operations.GetCountriesLibraryQueryParamType, + type: operations.GetCountriesLibraryQueryParamTypeOpen, options?: RequestOptions, ): Promise< [ diff --git a/src/funcs/libraryGetGenresLibrary.ts b/src/funcs/libraryGetGenresLibrary.ts index e3e9e054..549e4cd0 100644 --- a/src/funcs/libraryGetGenresLibrary.ts +++ b/src/funcs/libraryGetGenresLibrary.ts @@ -33,7 +33,7 @@ import { Result } from "../sdk/types/fp.js"; export function libraryGetGenresLibrary( client: PlexAPICore, sectionKey: number, - type: operations.GetGenresLibraryQueryParamType, + type: operations.GetGenresLibraryQueryParamTypeOpen, options?: RequestOptions, ): APIPromise< Result< @@ -60,7 +60,7 @@ export function libraryGetGenresLibrary( async function $do( client: PlexAPICore, sectionKey: number, - type: operations.GetGenresLibraryQueryParamType, + type: operations.GetGenresLibraryQueryParamTypeOpen, options?: RequestOptions, ): Promise< [ diff --git a/src/funcs/libraryGetSearchLibrary.ts b/src/funcs/libraryGetSearchLibrary.ts index 9c752f39..ad5eee0b 100644 --- a/src/funcs/libraryGetSearchLibrary.ts +++ b/src/funcs/libraryGetSearchLibrary.ts @@ -50,7 +50,7 @@ import { Result } from "../sdk/types/fp.js"; export function libraryGetSearchLibrary( client: PlexAPICore, sectionKey: number, - type: operations.GetSearchLibraryQueryParamType, + type: operations.GetSearchLibraryQueryParamTypeOpen, options?: RequestOptions, ): APIPromise< Result< @@ -77,7 +77,7 @@ export function libraryGetSearchLibrary( async function $do( client: PlexAPICore, sectionKey: number, - type: operations.GetSearchLibraryQueryParamType, + type: operations.GetSearchLibraryQueryParamTypeOpen, options?: RequestOptions, ): Promise< [ diff --git a/src/funcs/libraryGetTopWatchedContent.ts b/src/funcs/libraryGetTopWatchedContent.ts index 4def5627..b1eff377 100644 --- a/src/funcs/libraryGetTopWatchedContent.ts +++ b/src/funcs/libraryGetTopWatchedContent.ts @@ -32,7 +32,7 @@ import { Result } from "../sdk/types/fp.js"; */ export function libraryGetTopWatchedContent( client: PlexAPICore, - type: operations.GetTopWatchedContentQueryParamType, + type: operations.GetTopWatchedContentQueryParamTypeOpen, includeGuids?: number | undefined, options?: RequestOptions, ): APIPromise< @@ -59,7 +59,7 @@ export function libraryGetTopWatchedContent( async function $do( client: PlexAPICore, - type: operations.GetTopWatchedContentQueryParamType, + type: operations.GetTopWatchedContentQueryParamTypeOpen, includeGuids?: number | undefined, options?: RequestOptions, ): Promise< diff --git a/src/funcs/logLogLine.ts b/src/funcs/logLogLine.ts index 09ec933d..81ad32ee 100644 --- a/src/funcs/logLogLine.ts +++ b/src/funcs/logLogLine.ts @@ -32,7 +32,7 @@ import { Result } from "../sdk/types/fp.js"; */ export function logLogLine( client: PlexAPICore, - level: operations.Level, + level: operations.LevelOpen, message: string, source: string, options?: RequestOptions, @@ -61,7 +61,7 @@ export function logLogLine( async function $do( client: PlexAPICore, - level: operations.Level, + level: operations.LevelOpen, message: string, source: string, options?: RequestOptions, diff --git a/src/funcs/playlistsGetPlaylistContents.ts b/src/funcs/playlistsGetPlaylistContents.ts index 4fa44662..4d1bffa3 100644 --- a/src/funcs/playlistsGetPlaylistContents.ts +++ b/src/funcs/playlistsGetPlaylistContents.ts @@ -36,7 +36,7 @@ import { Result } from "../sdk/types/fp.js"; export function playlistsGetPlaylistContents( client: PlexAPICore, playlistID: number, - type: operations.GetPlaylistContentsQueryParamType, + type: operations.GetPlaylistContentsQueryParamTypeOpen, options?: RequestOptions, ): APIPromise< Result< @@ -63,7 +63,7 @@ export function playlistsGetPlaylistContents( async function $do( client: PlexAPICore, playlistID: number, - type: operations.GetPlaylistContentsQueryParamType, + type: operations.GetPlaylistContentsQueryParamTypeOpen, options?: RequestOptions, ): Promise< [ diff --git a/src/funcs/playlistsGetPlaylists.ts b/src/funcs/playlistsGetPlaylists.ts index a7cbf2a2..6a7df02b 100644 --- a/src/funcs/playlistsGetPlaylists.ts +++ b/src/funcs/playlistsGetPlaylists.ts @@ -32,8 +32,8 @@ import { Result } from "../sdk/types/fp.js"; */ export function playlistsGetPlaylists( client: PlexAPICore, - playlistType?: operations.PlaylistType | undefined, - smart?: operations.QueryParamSmart | undefined, + playlistType?: operations.PlaylistTypeOpen | undefined, + smart?: operations.QueryParamSmartOpen | undefined, options?: RequestOptions, ): APIPromise< Result< @@ -59,8 +59,8 @@ export function playlistsGetPlaylists( async function $do( client: PlexAPICore, - playlistType?: operations.PlaylistType | undefined, - smart?: operations.QueryParamSmart | undefined, + playlistType?: operations.PlaylistTypeOpen | undefined, + smart?: operations.QueryParamSmartOpen | undefined, options?: RequestOptions, ): Promise< [ diff --git a/src/lib/config.ts b/src/lib/config.ts index 8ec2b1f9..7a05aa77 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -15,7 +15,7 @@ export const ServerList = [ /** * The full address of your Plex Server */ - "{protocol}://{ip}:{port}", + "https://10.10.10.47:32400", ] as const; /** @@ -90,7 +90,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "0.0.3", - sdkVersion: "0.36.2", - genVersion: "2.570.4", - userAgent: "speakeasy-sdk/typescript 0.36.2 2.570.4 0.0.3 @lukehagar/plexjs", + sdkVersion: "0.37.0", + genVersion: "2.585.2", + userAgent: "speakeasy-sdk/typescript 0.37.0 2.585.2 0.0.3 @lukehagar/plexjs", } as const; diff --git a/src/lib/matchers.ts b/src/lib/matchers.ts index c538ea27..e4d0d731 100644 --- a/src/lib/matchers.ts +++ b/src/lib/matchers.ts @@ -10,6 +10,7 @@ import { isPlainObject } from "./is-plain-object.js"; import { safeParse } from "./schemas.js"; export type Encoding = + | "jsonl" | "json" | "text" | "bytes" @@ -19,6 +20,7 @@ export type Encoding = | "fail"; const DEFAULT_CONTENT_TYPES: Record = { + jsonl: "application/jsonl", json: "application/json", text: "text/plain", bytes: "application/octet-stream", @@ -72,6 +74,21 @@ export function json( return { ...options, enc: "json", codes, schema }; } +export function jsonl( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ValueMatcher { + return { ...options, enc: "jsonl", codes, schema }; +} + +export function jsonlErr( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ErrorMatcher { + return { ...options, err: true, enc: "jsonl", codes, schema }; +} export function textErr( codes: StatusCodePredicate, schema: Schema, @@ -204,6 +221,9 @@ export function match( case "json": raw = await response.json(); break; + case "jsonl": + raw = response.body; + break; case "bytes": raw = new Uint8Array(await response.arrayBuffer()); break; diff --git a/src/lib/sdks.ts b/src/lib/sdks.ts index 78543843..6c32127e 100644 --- a/src/lib/sdks.ts +++ b/src/lib/sdks.ts @@ -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) { if (!logger) { return; @@ -364,9 +366,13 @@ async function logResponse( logger.group("Body:"); switch (true) { case matchContentType(res, "application/json") - || jsonLikeContentTypeRE.test(ct): + || jsonLikeContentTypeRE.test(ct) && !jsonlLikeContentTypeRE.test(ct): logger.log(await res.clone().json()); break; + case matchContentType(res, "application/jsonl") + || jsonlLikeContentTypeRE.test(ct): + logger.log(await res.clone().text()); + break; case matchContentType(res, "text/event-stream"): logger.log(`<${contentType}>`); break; diff --git a/src/sdk/butler.ts b/src/sdk/butler.ts index cec10dc1..03cda4cd 100644 --- a/src/sdk/butler.ts +++ b/src/sdk/butler.ts @@ -72,7 +72,7 @@ export class Butler extends ClientSDK { * 4. If we are outside the configured window, the task will start immediately. */ async startTask( - taskName: operations.TaskName, + taskName: operations.TaskNameOpen, options?: RequestOptions, ): Promise { 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. */ async stopTask( - taskName: operations.PathParamTaskName, + taskName: operations.PathParamTaskNameOpen, options?: RequestOptions, ): Promise { return unwrapAsync(butlerStopTask( diff --git a/src/sdk/library.ts b/src/sdk/library.ts index 8fdbe4cf..e9a294bd 100644 --- a/src/sdk/library.ts +++ b/src/sdk/library.ts @@ -255,7 +255,7 @@ export class Library extends ClientSDK { */ async getSearchLibrary( sectionKey: number, - type: operations.GetSearchLibraryQueryParamType, + type: operations.GetSearchLibraryQueryParamTypeOpen, options?: RequestOptions, ): Promise { return unwrapAsync(libraryGetSearchLibrary( @@ -274,7 +274,7 @@ export class Library extends ClientSDK { */ async getGenresLibrary( sectionKey: number, - type: operations.GetGenresLibraryQueryParamType, + type: operations.GetGenresLibraryQueryParamTypeOpen, options?: RequestOptions, ): Promise { return unwrapAsync(libraryGetGenresLibrary( @@ -293,7 +293,7 @@ export class Library extends ClientSDK { */ async getCountriesLibrary( sectionKey: number, - type: operations.GetCountriesLibraryQueryParamType, + type: operations.GetCountriesLibraryQueryParamTypeOpen, options?: RequestOptions, ): Promise { return unwrapAsync(libraryGetCountriesLibrary( @@ -312,7 +312,7 @@ export class Library extends ClientSDK { */ async getActorsLibrary( sectionKey: number, - type: operations.GetActorsLibraryQueryParamType, + type: operations.GetActorsLibraryQueryParamTypeOpen, options?: RequestOptions, ): Promise { 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 */ async getTopWatchedContent( - type: operations.GetTopWatchedContentQueryParamType, + type: operations.GetTopWatchedContentQueryParamTypeOpen, includeGuids?: number | undefined, options?: RequestOptions, ): Promise { diff --git a/src/sdk/log.ts b/src/sdk/log.ts index 1fcf9719..60153d66 100644 --- a/src/sdk/log.ts +++ b/src/sdk/log.ts @@ -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. */ async logLine( - level: operations.Level, + level: operations.LevelOpen, message: string, source: string, options?: RequestOptions, diff --git a/src/sdk/models/operations/createplaylist.ts b/src/sdk/models/operations/createplaylist.ts index 2c4a91ae..330b9b7f 100644 --- a/src/sdk/models/operations/createplaylist.ts +++ b/src/sdk/models/operations/createplaylist.ts @@ -5,6 +5,11 @@ import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; +import { + catchUnrecognizedEnum, + OpenEnum, + Unrecognized, +} from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -16,6 +21,12 @@ export enum CreatePlaylistQueryParamType { Video = "video", Photo = "photo", } +/** + * type of playlist to create + */ +export type CreatePlaylistQueryParamTypeOpen = OpenEnum< + typeof CreatePlaylistQueryParamType +>; /** * whether the playlist is smart or not @@ -33,7 +44,7 @@ export type CreatePlaylistRequest = { /** * type of playlist to create */ - type: CreatePlaylistQueryParamType; + type: CreatePlaylistQueryParamTypeOpen; /** * whether the playlist is smart or not */ @@ -99,14 +110,25 @@ export type CreatePlaylistResponse = { }; /** @internal */ -export const CreatePlaylistQueryParamType$inboundSchema: z.ZodNativeEnum< - typeof CreatePlaylistQueryParamType -> = z.nativeEnum(CreatePlaylistQueryParamType); +export const CreatePlaylistQueryParamType$inboundSchema: z.ZodType< + CreatePlaylistQueryParamTypeOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(CreatePlaylistQueryParamType), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const CreatePlaylistQueryParamType$outboundSchema: z.ZodNativeEnum< - typeof CreatePlaylistQueryParamType -> = CreatePlaylistQueryParamType$inboundSchema; +export const CreatePlaylistQueryParamType$outboundSchema: z.ZodType< + CreatePlaylistQueryParamTypeOpen, + z.ZodTypeDef, + CreatePlaylistQueryParamTypeOpen +> = z.union([ + z.nativeEnum(CreatePlaylistQueryParamType), + z.string().and(z.custom>()), +]); /** * @internal diff --git a/src/sdk/models/operations/getactorslibrary.ts b/src/sdk/models/operations/getactorslibrary.ts index d8177ffc..4cccf898 100644 --- a/src/sdk/models/operations/getactorslibrary.ts +++ b/src/sdk/models/operations/getactorslibrary.ts @@ -5,6 +5,11 @@ import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; +import { + catchUnrecognizedEnum, + OpenEnum, + Unrecognized, +} from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -27,6 +32,19 @@ export enum GetActorsLibraryQueryParamType { Album = 9, 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 = { /** @@ -46,7 +64,7 @@ export type GetActorsLibraryRequest = { * 4 = episode * 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 = { @@ -150,14 +168,25 @@ export type GetActorsLibraryResponse = { }; /** @internal */ -export const GetActorsLibraryQueryParamType$inboundSchema: z.ZodNativeEnum< - typeof GetActorsLibraryQueryParamType -> = z.nativeEnum(GetActorsLibraryQueryParamType); +export const GetActorsLibraryQueryParamType$inboundSchema: z.ZodType< + GetActorsLibraryQueryParamTypeOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(GetActorsLibraryQueryParamType), + z.number().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const GetActorsLibraryQueryParamType$outboundSchema: z.ZodNativeEnum< - typeof GetActorsLibraryQueryParamType -> = GetActorsLibraryQueryParamType$inboundSchema; +export const GetActorsLibraryQueryParamType$outboundSchema: z.ZodType< + GetActorsLibraryQueryParamTypeOpen, + z.ZodTypeDef, + GetActorsLibraryQueryParamTypeOpen +> = z.union([ + z.nativeEnum(GetActorsLibraryQueryParamType), + z.number().and(z.custom>()), +]); /** * @internal diff --git a/src/sdk/models/operations/getalllibraries.ts b/src/sdk/models/operations/getalllibraries.ts index 9281c85c..89e6de40 100644 --- a/src/sdk/models/operations/getalllibraries.ts +++ b/src/sdk/models/operations/getalllibraries.ts @@ -5,6 +5,11 @@ import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; +import { + catchUnrecognizedEnum, + OpenEnum, + Unrecognized, +} from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -19,6 +24,10 @@ export enum GetAllLibrariesType { Artist = "artist", Album = "album", } +/** + * The library type + */ +export type GetAllLibrariesTypeOpen = OpenEnum; /** * UNKNOWN @@ -68,7 +77,7 @@ export type GetAllLibrariesDirectory = { * The library key representing the unique identifier */ key: string; - type: GetAllLibrariesType; + type: GetAllLibrariesTypeOpen; /** * The title of the library */ @@ -160,14 +169,25 @@ export type GetAllLibrariesResponse = { }; /** @internal */ -export const GetAllLibrariesType$inboundSchema: z.ZodNativeEnum< - typeof GetAllLibrariesType -> = z.nativeEnum(GetAllLibrariesType); +export const GetAllLibrariesType$inboundSchema: z.ZodType< + GetAllLibrariesTypeOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(GetAllLibrariesType), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const GetAllLibrariesType$outboundSchema: z.ZodNativeEnum< - typeof GetAllLibrariesType -> = GetAllLibrariesType$inboundSchema; +export const GetAllLibrariesType$outboundSchema: z.ZodType< + GetAllLibrariesTypeOpen, + z.ZodTypeDef, + GetAllLibrariesTypeOpen +> = z.union([ + z.nativeEnum(GetAllLibrariesType), + z.string().and(z.custom>()), +]); /** * @internal diff --git a/src/sdk/models/operations/getallmedialibrary.ts b/src/sdk/models/operations/getallmedialibrary.ts index aad9f3e0..324de207 100644 --- a/src/sdk/models/operations/getallmedialibrary.ts +++ b/src/sdk/models/operations/getallmedialibrary.ts @@ -5,6 +5,11 @@ import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; +import { + catchUnrecognizedEnum, + OpenEnum, + Unrecognized, +} from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { RFCDate } from "../../types/rfcdate.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -28,6 +33,19 @@ export enum GetAllMediaLibraryQueryParamType { Album = 9, 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 @@ -82,7 +100,7 @@ export type GetAllMediaLibraryRequest = { * 4 = episode * 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 * @@ -217,6 +235,14 @@ export enum GetAllMediaLibraryLibraryType { Artist = "artist", Album = "album", } +/** + * The type of media content + * + * @remarks + */ +export type GetAllMediaLibraryLibraryTypeOpen = OpenEnum< + typeof GetAllMediaLibraryLibraryType +>; export enum GetAllMediaLibraryLibraryResponseType { CoverPoster = "coverPoster", @@ -224,10 +250,13 @@ export enum GetAllMediaLibraryLibraryResponseType { Snapshot = "snapshot", ClearLogo = "clearLogo", } +export type GetAllMediaLibraryLibraryResponseTypeOpen = OpenEnum< + typeof GetAllMediaLibraryLibraryResponseType +>; export type GetAllMediaLibraryImage = { alt: string; - type: GetAllMediaLibraryLibraryResponseType; + type: GetAllMediaLibraryLibraryResponseTypeOpen; url: string; }; @@ -666,7 +695,7 @@ export type GetAllMediaLibraryMetadata = { * The studio that produced the media item. */ studio?: string | undefined; - type: GetAllMediaLibraryLibraryType; + type: GetAllMediaLibraryLibraryTypeOpen; /** * The title of the media item. */ @@ -976,14 +1005,25 @@ export type GetAllMediaLibraryResponse = { }; /** @internal */ -export const GetAllMediaLibraryQueryParamType$inboundSchema: z.ZodNativeEnum< - typeof GetAllMediaLibraryQueryParamType -> = z.nativeEnum(GetAllMediaLibraryQueryParamType); +export const GetAllMediaLibraryQueryParamType$inboundSchema: z.ZodType< + GetAllMediaLibraryQueryParamTypeOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(GetAllMediaLibraryQueryParamType), + z.number().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const GetAllMediaLibraryQueryParamType$outboundSchema: z.ZodNativeEnum< - typeof GetAllMediaLibraryQueryParamType -> = GetAllMediaLibraryQueryParamType$inboundSchema; +export const GetAllMediaLibraryQueryParamType$outboundSchema: z.ZodType< + GetAllMediaLibraryQueryParamTypeOpen, + z.ZodTypeDef, + GetAllMediaLibraryQueryParamTypeOpen +> = z.union([ + z.nativeEnum(GetAllMediaLibraryQueryParamType), + z.number().and(z.custom>()), +]); /** * @internal @@ -1745,14 +1785,25 @@ export function getAllMediaLibraryMetaFromJSON( } /** @internal */ -export const GetAllMediaLibraryLibraryType$inboundSchema: z.ZodNativeEnum< - typeof GetAllMediaLibraryLibraryType -> = z.nativeEnum(GetAllMediaLibraryLibraryType); +export const GetAllMediaLibraryLibraryType$inboundSchema: z.ZodType< + GetAllMediaLibraryLibraryTypeOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(GetAllMediaLibraryLibraryType), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const GetAllMediaLibraryLibraryType$outboundSchema: z.ZodNativeEnum< - typeof GetAllMediaLibraryLibraryType -> = GetAllMediaLibraryLibraryType$inboundSchema; +export const GetAllMediaLibraryLibraryType$outboundSchema: z.ZodType< + GetAllMediaLibraryLibraryTypeOpen, + z.ZodTypeDef, + GetAllMediaLibraryLibraryTypeOpen +> = z.union([ + z.nativeEnum(GetAllMediaLibraryLibraryType), + z.string().and(z.custom>()), +]); /** * @internal @@ -1766,15 +1817,25 @@ export namespace GetAllMediaLibraryLibraryType$ { } /** @internal */ -export const GetAllMediaLibraryLibraryResponseType$inboundSchema: - z.ZodNativeEnum = z.nativeEnum( - GetAllMediaLibraryLibraryResponseType, - ); +export const GetAllMediaLibraryLibraryResponseType$inboundSchema: z.ZodType< + GetAllMediaLibraryLibraryResponseTypeOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(GetAllMediaLibraryLibraryResponseType), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const GetAllMediaLibraryLibraryResponseType$outboundSchema: - z.ZodNativeEnum = - GetAllMediaLibraryLibraryResponseType$inboundSchema; +export const GetAllMediaLibraryLibraryResponseType$outboundSchema: z.ZodType< + GetAllMediaLibraryLibraryResponseTypeOpen, + z.ZodTypeDef, + GetAllMediaLibraryLibraryResponseTypeOpen +> = z.union([ + z.nativeEnum(GetAllMediaLibraryLibraryResponseType), + z.string().and(z.custom>()), +]); /** * @internal diff --git a/src/sdk/models/operations/getcountrieslibrary.ts b/src/sdk/models/operations/getcountrieslibrary.ts index 3e0f1bc2..ae0c65ea 100644 --- a/src/sdk/models/operations/getcountrieslibrary.ts +++ b/src/sdk/models/operations/getcountrieslibrary.ts @@ -5,6 +5,11 @@ import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; +import { + catchUnrecognizedEnum, + OpenEnum, + Unrecognized, +} from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -27,6 +32,19 @@ export enum GetCountriesLibraryQueryParamType { Album = 9, 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 = { /** @@ -46,7 +64,7 @@ export type GetCountriesLibraryRequest = { * 4 = episode * 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 = { @@ -134,14 +152,25 @@ export type GetCountriesLibraryResponse = { }; /** @internal */ -export const GetCountriesLibraryQueryParamType$inboundSchema: z.ZodNativeEnum< - typeof GetCountriesLibraryQueryParamType -> = z.nativeEnum(GetCountriesLibraryQueryParamType); +export const GetCountriesLibraryQueryParamType$inboundSchema: z.ZodType< + GetCountriesLibraryQueryParamTypeOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(GetCountriesLibraryQueryParamType), + z.number().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const GetCountriesLibraryQueryParamType$outboundSchema: z.ZodNativeEnum< - typeof GetCountriesLibraryQueryParamType -> = GetCountriesLibraryQueryParamType$inboundSchema; +export const GetCountriesLibraryQueryParamType$outboundSchema: z.ZodType< + GetCountriesLibraryQueryParamTypeOpen, + z.ZodTypeDef, + GetCountriesLibraryQueryParamTypeOpen +> = z.union([ + z.nativeEnum(GetCountriesLibraryQueryParamType), + z.number().and(z.custom>()), +]); /** * @internal diff --git a/src/sdk/models/operations/getgenreslibrary.ts b/src/sdk/models/operations/getgenreslibrary.ts index 607698da..a3901247 100644 --- a/src/sdk/models/operations/getgenreslibrary.ts +++ b/src/sdk/models/operations/getgenreslibrary.ts @@ -5,6 +5,11 @@ import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; +import { + catchUnrecognizedEnum, + OpenEnum, + Unrecognized, +} from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -27,6 +32,19 @@ export enum GetGenresLibraryQueryParamType { Album = 9, 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 = { /** @@ -46,7 +64,7 @@ export type GetGenresLibraryRequest = { * 4 = episode * 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 = { @@ -135,14 +153,25 @@ export type GetGenresLibraryResponse = { }; /** @internal */ -export const GetGenresLibraryQueryParamType$inboundSchema: z.ZodNativeEnum< - typeof GetGenresLibraryQueryParamType -> = z.nativeEnum(GetGenresLibraryQueryParamType); +export const GetGenresLibraryQueryParamType$inboundSchema: z.ZodType< + GetGenresLibraryQueryParamTypeOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(GetGenresLibraryQueryParamType), + z.number().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const GetGenresLibraryQueryParamType$outboundSchema: z.ZodNativeEnum< - typeof GetGenresLibraryQueryParamType -> = GetGenresLibraryQueryParamType$inboundSchema; +export const GetGenresLibraryQueryParamType$outboundSchema: z.ZodType< + GetGenresLibraryQueryParamTypeOpen, + z.ZodTypeDef, + GetGenresLibraryQueryParamTypeOpen +> = z.union([ + z.nativeEnum(GetGenresLibraryQueryParamType), + z.number().and(z.custom>()), +]); /** * @internal diff --git a/src/sdk/models/operations/getlibraryitems.ts b/src/sdk/models/operations/getlibraryitems.ts index 9c84c1f1..d3e47f11 100644 --- a/src/sdk/models/operations/getlibraryitems.ts +++ b/src/sdk/models/operations/getlibraryitems.ts @@ -5,6 +5,11 @@ import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; +import { + catchUnrecognizedEnum, + OpenEnum, + Unrecognized, +} from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { RFCDate } from "../../types/rfcdate.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -30,6 +35,10 @@ export enum Tag { Folder = "folder", Albums = "albums", } +/** + * A key representing a specific tag within the section. + */ +export type TagOpen = OpenEnum; /** * Adds the Guids object to the response @@ -60,6 +69,19 @@ export enum GetLibraryItemsQueryParamType { Album = 9, 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 @@ -75,7 +97,7 @@ export type GetLibraryItemsRequest = { /** * A key representing a specific tag within the section. */ - tag: Tag; + tag: TagOpen; /** * Adds the Guids object to the response * @@ -92,7 +114,7 @@ export type GetLibraryItemsRequest = { * 4 = episode * 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. * @@ -215,6 +237,14 @@ export enum GetLibraryItemsLibraryType { Artist = "artist", 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). @@ -224,6 +254,10 @@ export enum FlattenSeasons { Hide = "0", 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; /** * 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", 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; /** * Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). @@ -241,6 +279,12 @@ export enum EnableCreditsMarkerGeneration { LibraryDefault = "-1", 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. @@ -259,6 +303,17 @@ export enum ShowOrdering { TvdbDvd = "dvd", 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; export enum GetLibraryItemsOptimizedForStreaming { Disable = 0, @@ -544,10 +599,13 @@ export enum GetLibraryItemsLibraryResponse200Type { Snapshot = "snapshot", ClearLogo = "clearLogo", } +export type GetLibraryItemsLibraryResponse200TypeOpen = OpenEnum< + typeof GetLibraryItemsLibraryResponse200Type +>; export type GetLibraryItemsImage = { alt: string; - type: GetLibraryItemsLibraryResponse200Type; + type: GetLibraryItemsLibraryResponse200TypeOpen; url: string; }; @@ -571,7 +629,7 @@ export type GetLibraryItemsMetadata = { * * @remarks */ - type: GetLibraryItemsLibraryType; + type: GetLibraryItemsLibraryTypeOpen; title: string; slug?: 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). */ - 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). */ - episodeSort?: EpisodeSort | undefined; + episodeSort?: EpisodeSortOpen | undefined; /** * 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. * @@ -603,7 +661,7 @@ export type GetLibraryItemsMetadata = { * dvd = TheTVDB (DVD), * absolute = TheTVDB (Absolute)). */ - showOrdering?: ShowOrdering | undefined; + showOrdering?: ShowOrderingOpen | undefined; thumb?: string | undefined; art?: string | undefined; banner?: string | undefined; @@ -830,11 +888,18 @@ export type GetLibraryItemsResponse = { }; /** @internal */ -export const Tag$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Tag); +export const Tag$inboundSchema: z.ZodType = z + .union([ + z.nativeEnum(Tag), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const Tag$outboundSchema: z.ZodNativeEnum = - Tag$inboundSchema; +export const Tag$outboundSchema: z.ZodType = z + .union([ + z.nativeEnum(Tag), + z.string().and(z.custom>()), + ]); /** * @internal @@ -867,14 +932,25 @@ export namespace IncludeGuids$ { } /** @internal */ -export const GetLibraryItemsQueryParamType$inboundSchema: z.ZodNativeEnum< - typeof GetLibraryItemsQueryParamType -> = z.nativeEnum(GetLibraryItemsQueryParamType); +export const GetLibraryItemsQueryParamType$inboundSchema: z.ZodType< + GetLibraryItemsQueryParamTypeOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(GetLibraryItemsQueryParamType), + z.number().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const GetLibraryItemsQueryParamType$outboundSchema: z.ZodNativeEnum< - typeof GetLibraryItemsQueryParamType -> = GetLibraryItemsQueryParamType$inboundSchema; +export const GetLibraryItemsQueryParamType$outboundSchema: z.ZodType< + GetLibraryItemsQueryParamTypeOpen, + z.ZodTypeDef, + GetLibraryItemsQueryParamTypeOpen +> = z.union([ + z.nativeEnum(GetLibraryItemsQueryParamType), + z.number().and(z.custom>()), +]); /** * @internal @@ -1463,14 +1539,25 @@ export function getLibraryItemsFieldTypeFromJSON( } /** @internal */ -export const GetLibraryItemsLibraryType$inboundSchema: z.ZodNativeEnum< - typeof GetLibraryItemsLibraryType -> = z.nativeEnum(GetLibraryItemsLibraryType); +export const GetLibraryItemsLibraryType$inboundSchema: z.ZodType< + GetLibraryItemsLibraryTypeOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(GetLibraryItemsLibraryType), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const GetLibraryItemsLibraryType$outboundSchema: z.ZodNativeEnum< - typeof GetLibraryItemsLibraryType -> = GetLibraryItemsLibraryType$inboundSchema; +export const GetLibraryItemsLibraryType$outboundSchema: z.ZodType< + GetLibraryItemsLibraryTypeOpen, + z.ZodTypeDef, + GetLibraryItemsLibraryTypeOpen +> = z.union([ + z.nativeEnum(GetLibraryItemsLibraryType), + z.string().and(z.custom>()), +]); /** * @internal @@ -1484,14 +1571,25 @@ export namespace GetLibraryItemsLibraryType$ { } /** @internal */ -export const FlattenSeasons$inboundSchema: z.ZodNativeEnum< - typeof FlattenSeasons -> = z.nativeEnum(FlattenSeasons); +export const FlattenSeasons$inboundSchema: z.ZodType< + FlattenSeasonsOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(FlattenSeasons), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const FlattenSeasons$outboundSchema: z.ZodNativeEnum< - typeof FlattenSeasons -> = FlattenSeasons$inboundSchema; +export const FlattenSeasons$outboundSchema: z.ZodType< + FlattenSeasonsOpen, + z.ZodTypeDef, + FlattenSeasonsOpen +> = z.union([ + z.nativeEnum(FlattenSeasons), + z.string().and(z.custom>()), +]); /** * @internal @@ -1505,12 +1603,25 @@ export namespace FlattenSeasons$ { } /** @internal */ -export const EpisodeSort$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(EpisodeSort); +export const EpisodeSort$inboundSchema: z.ZodType< + EpisodeSortOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(EpisodeSort), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const EpisodeSort$outboundSchema: z.ZodNativeEnum = - EpisodeSort$inboundSchema; +export const EpisodeSort$outboundSchema: z.ZodType< + EpisodeSortOpen, + z.ZodTypeDef, + EpisodeSortOpen +> = z.union([ + z.nativeEnum(EpisodeSort), + z.string().and(z.custom>()), +]); /** * @internal @@ -1524,14 +1635,25 @@ export namespace EpisodeSort$ { } /** @internal */ -export const EnableCreditsMarkerGeneration$inboundSchema: z.ZodNativeEnum< - typeof EnableCreditsMarkerGeneration -> = z.nativeEnum(EnableCreditsMarkerGeneration); +export const EnableCreditsMarkerGeneration$inboundSchema: z.ZodType< + EnableCreditsMarkerGenerationOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(EnableCreditsMarkerGeneration), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const EnableCreditsMarkerGeneration$outboundSchema: z.ZodNativeEnum< - typeof EnableCreditsMarkerGeneration -> = EnableCreditsMarkerGeneration$inboundSchema; +export const EnableCreditsMarkerGeneration$outboundSchema: z.ZodType< + EnableCreditsMarkerGenerationOpen, + z.ZodTypeDef, + EnableCreditsMarkerGenerationOpen +> = z.union([ + z.nativeEnum(EnableCreditsMarkerGeneration), + z.string().and(z.custom>()), +]); /** * @internal @@ -1545,12 +1667,25 @@ export namespace EnableCreditsMarkerGeneration$ { } /** @internal */ -export const ShowOrdering$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(ShowOrdering); +export const ShowOrdering$inboundSchema: z.ZodType< + ShowOrderingOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(ShowOrdering), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const ShowOrdering$outboundSchema: z.ZodNativeEnum = - ShowOrdering$inboundSchema; +export const ShowOrdering$outboundSchema: z.ZodType< + ShowOrderingOpen, + z.ZodTypeDef, + ShowOrderingOpen +> = z.union([ + z.nativeEnum(ShowOrdering), + z.string().and(z.custom>()), +]); /** * @internal @@ -2555,15 +2690,25 @@ export function metaDataRatingFromJSON( } /** @internal */ -export const GetLibraryItemsLibraryResponse200Type$inboundSchema: - z.ZodNativeEnum = z.nativeEnum( - GetLibraryItemsLibraryResponse200Type, - ); +export const GetLibraryItemsLibraryResponse200Type$inboundSchema: z.ZodType< + GetLibraryItemsLibraryResponse200TypeOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(GetLibraryItemsLibraryResponse200Type), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const GetLibraryItemsLibraryResponse200Type$outboundSchema: - z.ZodNativeEnum = - GetLibraryItemsLibraryResponse200Type$inboundSchema; +export const GetLibraryItemsLibraryResponse200Type$outboundSchema: z.ZodType< + GetLibraryItemsLibraryResponse200TypeOpen, + z.ZodTypeDef, + GetLibraryItemsLibraryResponse200TypeOpen +> = z.union([ + z.nativeEnum(GetLibraryItemsLibraryResponse200Type), + z.string().and(z.custom>()), +]); /** * @internal diff --git a/src/sdk/models/operations/getplaylistcontents.ts b/src/sdk/models/operations/getplaylistcontents.ts index 610b59e8..cfc83222 100644 --- a/src/sdk/models/operations/getplaylistcontents.ts +++ b/src/sdk/models/operations/getplaylistcontents.ts @@ -5,6 +5,11 @@ import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; +import { + catchUnrecognizedEnum, + OpenEnum, + Unrecognized, +} from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { RFCDate } from "../../types/rfcdate.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -28,6 +33,19 @@ export enum GetPlaylistContentsQueryParamType { Album = 9, 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 = { /** @@ -44,7 +62,7 @@ export type GetPlaylistContentsRequest = { * 4 = episode * 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 = { @@ -174,14 +192,25 @@ export type GetPlaylistContentsResponse = { }; /** @internal */ -export const GetPlaylistContentsQueryParamType$inboundSchema: z.ZodNativeEnum< - typeof GetPlaylistContentsQueryParamType -> = z.nativeEnum(GetPlaylistContentsQueryParamType); +export const GetPlaylistContentsQueryParamType$inboundSchema: z.ZodType< + GetPlaylistContentsQueryParamTypeOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(GetPlaylistContentsQueryParamType), + z.number().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const GetPlaylistContentsQueryParamType$outboundSchema: z.ZodNativeEnum< - typeof GetPlaylistContentsQueryParamType -> = GetPlaylistContentsQueryParamType$inboundSchema; +export const GetPlaylistContentsQueryParamType$outboundSchema: z.ZodType< + GetPlaylistContentsQueryParamTypeOpen, + z.ZodTypeDef, + GetPlaylistContentsQueryParamTypeOpen +> = z.union([ + z.nativeEnum(GetPlaylistContentsQueryParamType), + z.number().and(z.custom>()), +]); /** * @internal diff --git a/src/sdk/models/operations/getplaylists.ts b/src/sdk/models/operations/getplaylists.ts index af2dee7f..6fd0fea4 100644 --- a/src/sdk/models/operations/getplaylists.ts +++ b/src/sdk/models/operations/getplaylists.ts @@ -5,6 +5,11 @@ import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; +import { + catchUnrecognizedEnum, + OpenEnum, + Unrecognized, +} from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -16,6 +21,10 @@ export enum PlaylistType { Video = "video", Photo = "photo", } +/** + * limit to a type of playlist. + */ +export type PlaylistTypeOpen = OpenEnum; /** * type of playlists to return (default is all). @@ -24,16 +33,20 @@ export enum QueryParamSmart { Zero = 0, One = 1, } +/** + * type of playlists to return (default is all). + */ +export type QueryParamSmartOpen = OpenEnum; export type GetPlaylistsRequest = { /** * limit to a type of playlist. */ - playlistType?: PlaylistType | undefined; + playlistType?: PlaylistTypeOpen | undefined; /** * type of playlists to return (default is all). */ - smart?: QueryParamSmart | undefined; + smart?: QueryParamSmartOpen | undefined; }; export type GetPlaylistsMetadata = { @@ -87,12 +100,25 @@ export type GetPlaylistsResponse = { }; /** @internal */ -export const PlaylistType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(PlaylistType); +export const PlaylistType$inboundSchema: z.ZodType< + PlaylistTypeOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(PlaylistType), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const PlaylistType$outboundSchema: z.ZodNativeEnum = - PlaylistType$inboundSchema; +export const PlaylistType$outboundSchema: z.ZodType< + PlaylistTypeOpen, + z.ZodTypeDef, + PlaylistTypeOpen +> = z.union([ + z.nativeEnum(PlaylistType), + z.string().and(z.custom>()), +]); /** * @internal @@ -106,14 +132,25 @@ export namespace PlaylistType$ { } /** @internal */ -export const QueryParamSmart$inboundSchema: z.ZodNativeEnum< - typeof QueryParamSmart -> = z.nativeEnum(QueryParamSmart); +export const QueryParamSmart$inboundSchema: z.ZodType< + QueryParamSmartOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(QueryParamSmart), + z.number().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const QueryParamSmart$outboundSchema: z.ZodNativeEnum< - typeof QueryParamSmart -> = QueryParamSmart$inboundSchema; +export const QueryParamSmart$outboundSchema: z.ZodType< + QueryParamSmartOpen, + z.ZodTypeDef, + QueryParamSmartOpen +> = z.union([ + z.nativeEnum(QueryParamSmart), + z.number().and(z.custom>()), +]); /** * @internal diff --git a/src/sdk/models/operations/getrecentlyadded.ts b/src/sdk/models/operations/getrecentlyadded.ts index c5309736..146f6405 100644 --- a/src/sdk/models/operations/getrecentlyadded.ts +++ b/src/sdk/models/operations/getrecentlyadded.ts @@ -5,6 +5,11 @@ import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; +import { + catchUnrecognizedEnum, + OpenEnum, + Unrecognized, +} from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { RFCDate } from "../../types/rfcdate.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -28,6 +33,17 @@ export enum Type { Album = 9, 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; /** * Adds the Meta object to the response @@ -62,7 +78,7 @@ export type GetRecentlyAddedRequest = { * 4 = episode * 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 * @@ -188,6 +204,14 @@ export enum GetRecentlyAddedHubsType { Artist = "artist", Album = "album", } +/** + * The type of media content + * + * @remarks + */ +export type GetRecentlyAddedHubsTypeOpen = OpenEnum< + typeof GetRecentlyAddedHubsType +>; export enum GetRecentlyAddedHubsResponseType { CoverPoster = "coverPoster", @@ -195,10 +219,13 @@ export enum GetRecentlyAddedHubsResponseType { Snapshot = "snapshot", ClearLogo = "clearLogo", } +export type GetRecentlyAddedHubsResponseTypeOpen = OpenEnum< + typeof GetRecentlyAddedHubsResponseType +>; export type GetRecentlyAddedImage = { alt: string; - type: GetRecentlyAddedHubsResponseType; + type: GetRecentlyAddedHubsResponseTypeOpen; url: string; }; @@ -918,7 +945,7 @@ export type GetRecentlyAddedMetadata = { * The title of the media item. */ title: string; - type: GetRecentlyAddedHubsType; + type: GetRecentlyAddedHubsTypeOpen; /** * Unix epoch datetime in seconds */ @@ -1019,13 +1046,18 @@ export type GetRecentlyAddedResponse = { }; /** @internal */ -export const Type$inboundSchema: z.ZodNativeEnum = z.nativeEnum( - Type, -); +export const Type$inboundSchema: z.ZodType = z + .union([ + z.nativeEnum(Type), + z.number().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const Type$outboundSchema: z.ZodNativeEnum = - Type$inboundSchema; +export const Type$outboundSchema: z.ZodType = + z.union([ + z.nativeEnum(Type), + z.number().and(z.custom>()), + ]); /** * @internal @@ -1667,14 +1699,25 @@ export function metaFromJSON( } /** @internal */ -export const GetRecentlyAddedHubsType$inboundSchema: z.ZodNativeEnum< - typeof GetRecentlyAddedHubsType -> = z.nativeEnum(GetRecentlyAddedHubsType); +export const GetRecentlyAddedHubsType$inboundSchema: z.ZodType< + GetRecentlyAddedHubsTypeOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(GetRecentlyAddedHubsType), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const GetRecentlyAddedHubsType$outboundSchema: z.ZodNativeEnum< - typeof GetRecentlyAddedHubsType -> = GetRecentlyAddedHubsType$inboundSchema; +export const GetRecentlyAddedHubsType$outboundSchema: z.ZodType< + GetRecentlyAddedHubsTypeOpen, + z.ZodTypeDef, + GetRecentlyAddedHubsTypeOpen +> = z.union([ + z.nativeEnum(GetRecentlyAddedHubsType), + z.string().and(z.custom>()), +]); /** * @internal @@ -1688,14 +1731,25 @@ export namespace GetRecentlyAddedHubsType$ { } /** @internal */ -export const GetRecentlyAddedHubsResponseType$inboundSchema: z.ZodNativeEnum< - typeof GetRecentlyAddedHubsResponseType -> = z.nativeEnum(GetRecentlyAddedHubsResponseType); +export const GetRecentlyAddedHubsResponseType$inboundSchema: z.ZodType< + GetRecentlyAddedHubsResponseTypeOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(GetRecentlyAddedHubsResponseType), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const GetRecentlyAddedHubsResponseType$outboundSchema: z.ZodNativeEnum< - typeof GetRecentlyAddedHubsResponseType -> = GetRecentlyAddedHubsResponseType$inboundSchema; +export const GetRecentlyAddedHubsResponseType$outboundSchema: z.ZodType< + GetRecentlyAddedHubsResponseTypeOpen, + z.ZodTypeDef, + GetRecentlyAddedHubsResponseTypeOpen +> = z.union([ + z.nativeEnum(GetRecentlyAddedHubsResponseType), + z.string().and(z.custom>()), +]); /** * @internal diff --git a/src/sdk/models/operations/getrecentlyaddedlibrary.ts b/src/sdk/models/operations/getrecentlyaddedlibrary.ts index ef298190..5fbb2fbf 100644 --- a/src/sdk/models/operations/getrecentlyaddedlibrary.ts +++ b/src/sdk/models/operations/getrecentlyaddedlibrary.ts @@ -5,6 +5,11 @@ import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; +import { + catchUnrecognizedEnum, + OpenEnum, + Unrecognized, +} from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -27,6 +32,17 @@ export enum QueryParamType { Album = 9, 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; /** * Adds the Meta object to the response @@ -55,7 +71,7 @@ export type GetRecentlyAddedLibraryRequest = { * 4 = episode * 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 * @@ -289,14 +305,25 @@ export type GetRecentlyAddedLibraryResponse = { }; /** @internal */ -export const QueryParamType$inboundSchema: z.ZodNativeEnum< - typeof QueryParamType -> = z.nativeEnum(QueryParamType); +export const QueryParamType$inboundSchema: z.ZodType< + QueryParamTypeOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(QueryParamType), + z.number().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const QueryParamType$outboundSchema: z.ZodNativeEnum< - typeof QueryParamType -> = QueryParamType$inboundSchema; +export const QueryParamType$outboundSchema: z.ZodType< + QueryParamTypeOpen, + z.ZodTypeDef, + QueryParamTypeOpen +> = z.union([ + z.nativeEnum(QueryParamType), + z.number().and(z.custom>()), +]); /** * @internal diff --git a/src/sdk/models/operations/getsearchalllibraries.ts b/src/sdk/models/operations/getsearchalllibraries.ts index d4655a95..fe7bc598 100644 --- a/src/sdk/models/operations/getsearchalllibraries.ts +++ b/src/sdk/models/operations/getsearchalllibraries.ts @@ -5,6 +5,11 @@ import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; +import { + catchUnrecognizedEnum, + OpenEnum, + Unrecognized, +} from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { RFCDate } from "../../types/rfcdate.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -16,6 +21,7 @@ export enum SearchTypes { People = "people", Tv = "tv", } +export type SearchTypesOpen = OpenEnum; /** * Whether to include collections in the search results. @@ -51,7 +57,7 @@ export type GetSearchAllLibrariesRequest = { * * @remarks */ - searchTypes?: Array | undefined; + searchTypes?: Array | undefined; /** * Whether to include collections in the search results. */ @@ -79,6 +85,14 @@ export enum GetSearchAllLibrariesType { Artist = "artist", 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). @@ -88,6 +102,12 @@ export enum GetSearchAllLibrariesFlattenSeasons { Hide = "0", 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). @@ -97,6 +117,12 @@ export enum GetSearchAllLibrariesEpisodeSort { OldestFirst = "0", 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). @@ -105,6 +131,12 @@ export enum GetSearchAllLibrariesEnableCreditsMarkerGeneration { LibraryDefault = "-1", 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. @@ -123,6 +155,19 @@ export enum GetSearchAllLibrariesShowOrdering { TvdbDvd = "dvd", 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 { Disable = 0, @@ -410,10 +455,13 @@ export enum GetSearchAllLibrariesLibraryType { Snapshot = "snapshot", ClearLogo = "clearLogo", } +export type GetSearchAllLibrariesLibraryTypeOpen = OpenEnum< + typeof GetSearchAllLibrariesLibraryType +>; export type GetSearchAllLibrariesImage = { alt: string; - type: GetSearchAllLibrariesLibraryType; + type: GetSearchAllLibrariesLibraryTypeOpen; url: string; }; @@ -437,7 +485,7 @@ export type GetSearchAllLibrariesMetadata = { * * @remarks */ - type: GetSearchAllLibrariesType; + type: GetSearchAllLibrariesTypeOpen; title: string; slug?: 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). */ - 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). */ - episodeSort?: GetSearchAllLibrariesEpisodeSort | undefined; + episodeSort?: GetSearchAllLibrariesEpisodeSortOpen | undefined; /** * Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). */ enableCreditsMarkerGeneration?: - | GetSearchAllLibrariesEnableCreditsMarkerGeneration + | GetSearchAllLibrariesEnableCreditsMarkerGenerationOpen | undefined; /** * Setting that indicates the episode ordering for the show. @@ -471,7 +519,7 @@ export type GetSearchAllLibrariesMetadata = { * dvd = TheTVDB (DVD), * absolute = TheTVDB (Absolute)). */ - showOrdering?: GetSearchAllLibrariesShowOrdering | undefined; + showOrdering?: GetSearchAllLibrariesShowOrderingOpen | undefined; thumb?: string | undefined; art?: string | undefined; banner?: string | undefined; @@ -586,12 +634,25 @@ export type GetSearchAllLibrariesResponse = { }; /** @internal */ -export const SearchTypes$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(SearchTypes); +export const SearchTypes$inboundSchema: z.ZodType< + SearchTypesOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(SearchTypes), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const SearchTypes$outboundSchema: z.ZodNativeEnum = - SearchTypes$inboundSchema; +export const SearchTypes$outboundSchema: z.ZodType< + SearchTypesOpen, + z.ZodTypeDef, + SearchTypesOpen +> = z.union([ + z.nativeEnum(SearchTypes), + z.string().and(z.custom>()), +]); /** * @internal @@ -738,14 +799,25 @@ export function getSearchAllLibrariesRequestFromJSON( } /** @internal */ -export const GetSearchAllLibrariesType$inboundSchema: z.ZodNativeEnum< - typeof GetSearchAllLibrariesType -> = z.nativeEnum(GetSearchAllLibrariesType); +export const GetSearchAllLibrariesType$inboundSchema: z.ZodType< + GetSearchAllLibrariesTypeOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(GetSearchAllLibrariesType), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const GetSearchAllLibrariesType$outboundSchema: z.ZodNativeEnum< - typeof GetSearchAllLibrariesType -> = GetSearchAllLibrariesType$inboundSchema; +export const GetSearchAllLibrariesType$outboundSchema: z.ZodType< + GetSearchAllLibrariesTypeOpen, + z.ZodTypeDef, + GetSearchAllLibrariesTypeOpen +> = z.union([ + z.nativeEnum(GetSearchAllLibrariesType), + z.string().and(z.custom>()), +]); /** * @internal @@ -759,14 +831,25 @@ export namespace GetSearchAllLibrariesType$ { } /** @internal */ -export const GetSearchAllLibrariesFlattenSeasons$inboundSchema: z.ZodNativeEnum< - typeof GetSearchAllLibrariesFlattenSeasons -> = z.nativeEnum(GetSearchAllLibrariesFlattenSeasons); +export const GetSearchAllLibrariesFlattenSeasons$inboundSchema: z.ZodType< + GetSearchAllLibrariesFlattenSeasonsOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(GetSearchAllLibrariesFlattenSeasons), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const GetSearchAllLibrariesFlattenSeasons$outboundSchema: - z.ZodNativeEnum = - GetSearchAllLibrariesFlattenSeasons$inboundSchema; +export const GetSearchAllLibrariesFlattenSeasons$outboundSchema: z.ZodType< + GetSearchAllLibrariesFlattenSeasonsOpen, + z.ZodTypeDef, + GetSearchAllLibrariesFlattenSeasonsOpen +> = z.union([ + z.nativeEnum(GetSearchAllLibrariesFlattenSeasons), + z.string().and(z.custom>()), +]); /** * @internal @@ -782,14 +865,25 @@ export namespace GetSearchAllLibrariesFlattenSeasons$ { } /** @internal */ -export const GetSearchAllLibrariesEpisodeSort$inboundSchema: z.ZodNativeEnum< - typeof GetSearchAllLibrariesEpisodeSort -> = z.nativeEnum(GetSearchAllLibrariesEpisodeSort); +export const GetSearchAllLibrariesEpisodeSort$inboundSchema: z.ZodType< + GetSearchAllLibrariesEpisodeSortOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(GetSearchAllLibrariesEpisodeSort), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const GetSearchAllLibrariesEpisodeSort$outboundSchema: z.ZodNativeEnum< - typeof GetSearchAllLibrariesEpisodeSort -> = GetSearchAllLibrariesEpisodeSort$inboundSchema; +export const GetSearchAllLibrariesEpisodeSort$outboundSchema: z.ZodType< + GetSearchAllLibrariesEpisodeSortOpen, + z.ZodTypeDef, + GetSearchAllLibrariesEpisodeSortOpen +> = z.union([ + z.nativeEnum(GetSearchAllLibrariesEpisodeSort), + z.string().and(z.custom>()), +]); /** * @internal @@ -804,13 +898,26 @@ export namespace GetSearchAllLibrariesEpisodeSort$ { /** @internal */ export const GetSearchAllLibrariesEnableCreditsMarkerGeneration$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(GetSearchAllLibrariesEnableCreditsMarkerGeneration); + z.ZodType< + GetSearchAllLibrariesEnableCreditsMarkerGenerationOpen, + z.ZodTypeDef, + unknown + > = z + .union([ + z.nativeEnum(GetSearchAllLibrariesEnableCreditsMarkerGeneration), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ export const GetSearchAllLibrariesEnableCreditsMarkerGeneration$outboundSchema: - z.ZodNativeEnum = - GetSearchAllLibrariesEnableCreditsMarkerGeneration$inboundSchema; + z.ZodType< + GetSearchAllLibrariesEnableCreditsMarkerGenerationOpen, + z.ZodTypeDef, + GetSearchAllLibrariesEnableCreditsMarkerGenerationOpen + > = z.union([ + z.nativeEnum(GetSearchAllLibrariesEnableCreditsMarkerGeneration), + z.string().and(z.custom>()), + ]); /** * @internal @@ -826,14 +933,25 @@ export namespace GetSearchAllLibrariesEnableCreditsMarkerGeneration$ { } /** @internal */ -export const GetSearchAllLibrariesShowOrdering$inboundSchema: z.ZodNativeEnum< - typeof GetSearchAllLibrariesShowOrdering -> = z.nativeEnum(GetSearchAllLibrariesShowOrdering); +export const GetSearchAllLibrariesShowOrdering$inboundSchema: z.ZodType< + GetSearchAllLibrariesShowOrderingOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(GetSearchAllLibrariesShowOrdering), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const GetSearchAllLibrariesShowOrdering$outboundSchema: z.ZodNativeEnum< - typeof GetSearchAllLibrariesShowOrdering -> = GetSearchAllLibrariesShowOrdering$inboundSchema; +export const GetSearchAllLibrariesShowOrdering$outboundSchema: z.ZodType< + GetSearchAllLibrariesShowOrderingOpen, + z.ZodTypeDef, + GetSearchAllLibrariesShowOrderingOpen +> = z.union([ + z.nativeEnum(GetSearchAllLibrariesShowOrdering), + z.string().and(z.custom>()), +]); /** * @internal @@ -1873,14 +1991,25 @@ export function getSearchAllLibrariesMetaDataRatingFromJSON( } /** @internal */ -export const GetSearchAllLibrariesLibraryType$inboundSchema: z.ZodNativeEnum< - typeof GetSearchAllLibrariesLibraryType -> = z.nativeEnum(GetSearchAllLibrariesLibraryType); +export const GetSearchAllLibrariesLibraryType$inboundSchema: z.ZodType< + GetSearchAllLibrariesLibraryTypeOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(GetSearchAllLibrariesLibraryType), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const GetSearchAllLibrariesLibraryType$outboundSchema: z.ZodNativeEnum< - typeof GetSearchAllLibrariesLibraryType -> = GetSearchAllLibrariesLibraryType$inboundSchema; +export const GetSearchAllLibrariesLibraryType$outboundSchema: z.ZodType< + GetSearchAllLibrariesLibraryTypeOpen, + z.ZodTypeDef, + GetSearchAllLibrariesLibraryTypeOpen +> = z.union([ + z.nativeEnum(GetSearchAllLibrariesLibraryType), + z.string().and(z.custom>()), +]); /** * @internal diff --git a/src/sdk/models/operations/getsearchlibrary.ts b/src/sdk/models/operations/getsearchlibrary.ts index 14b6c6ce..ba8082fd 100644 --- a/src/sdk/models/operations/getsearchlibrary.ts +++ b/src/sdk/models/operations/getsearchlibrary.ts @@ -5,6 +5,11 @@ import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; +import { + catchUnrecognizedEnum, + OpenEnum, + Unrecognized, +} from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -27,6 +32,19 @@ export enum GetSearchLibraryQueryParamType { Album = 9, 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 = { /** @@ -46,7 +64,7 @@ export type GetSearchLibraryRequest = { * 4 = episode * 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 = { @@ -115,14 +133,25 @@ export type GetSearchLibraryResponse = { }; /** @internal */ -export const GetSearchLibraryQueryParamType$inboundSchema: z.ZodNativeEnum< - typeof GetSearchLibraryQueryParamType -> = z.nativeEnum(GetSearchLibraryQueryParamType); +export const GetSearchLibraryQueryParamType$inboundSchema: z.ZodType< + GetSearchLibraryQueryParamTypeOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(GetSearchLibraryQueryParamType), + z.number().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const GetSearchLibraryQueryParamType$outboundSchema: z.ZodNativeEnum< - typeof GetSearchLibraryQueryParamType -> = GetSearchLibraryQueryParamType$inboundSchema; +export const GetSearchLibraryQueryParamType$outboundSchema: z.ZodType< + GetSearchLibraryQueryParamTypeOpen, + z.ZodTypeDef, + GetSearchLibraryQueryParamTypeOpen +> = z.union([ + z.nativeEnum(GetSearchLibraryQueryParamType), + z.number().and(z.custom>()), +]); /** * @internal diff --git a/src/sdk/models/operations/gettimeline.ts b/src/sdk/models/operations/gettimeline.ts index 4479062a..26ef92b3 100644 --- a/src/sdk/models/operations/gettimeline.ts +++ b/src/sdk/models/operations/gettimeline.ts @@ -5,6 +5,11 @@ import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; +import { + catchUnrecognizedEnum, + OpenEnum, + Unrecognized, +} from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -16,6 +21,10 @@ export enum State { Paused = "paused", Stopped = "stopped", } +/** + * The state of the media item + */ +export type StateOpen = OpenEnum; export type GetTimelineRequest = { /** @@ -29,7 +38,7 @@ export type GetTimelineRequest = { /** * The state of the media item */ - state: State; + state: StateOpen; /** * Whether the media item has MDE */ @@ -76,13 +85,22 @@ export type GetTimelineResponse = { }; /** @internal */ -export const State$inboundSchema: z.ZodNativeEnum = z.nativeEnum( - State, -); +export const State$inboundSchema: z.ZodType = + z + .union([ + z.nativeEnum(State), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const State$outboundSchema: z.ZodNativeEnum = - State$inboundSchema; +export const State$outboundSchema: z.ZodType< + StateOpen, + z.ZodTypeDef, + StateOpen +> = z.union([ + z.nativeEnum(State), + z.string().and(z.custom>()), +]); /** * @internal diff --git a/src/sdk/models/operations/gettokendetails.ts b/src/sdk/models/operations/gettokendetails.ts index e1c5f60a..9c34964b 100644 --- a/src/sdk/models/operations/gettokendetails.ts +++ b/src/sdk/models/operations/gettokendetails.ts @@ -5,6 +5,11 @@ import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; +import { + catchUnrecognizedEnum, + OpenEnum, + Unrecognized, +} from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -19,6 +24,10 @@ export enum MailingListStatus { Active = "active", Unsubscribed = "unsubscribed", } +/** + * Your current mailing list status (active or unsubscribed) + */ +export type MailingListStatusOpen = OpenEnum; /** * 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", Offline = "offline", } +export type GetTokenDetailsStatusOpen = OpenEnum; export type Services = { identifier: string; endpoint: string; token: string | null; secret: string | null; - status: GetTokenDetailsStatus; + status: GetTokenDetailsStatusOpen; }; /** @@ -100,6 +110,12 @@ export enum GetTokenDetailsAuthenticationStatus { Inactive = "Inactive", Active = "Active", } +/** + * String representation of subscriptionActive + */ +export type GetTokenDetailsAuthenticationStatusOpen = OpenEnum< + typeof GetTokenDetailsAuthenticationStatus +>; /** * If the account’s Plex Pass subscription is active @@ -120,7 +136,7 @@ export type Subscription = { /** * String representation of subscriptionActive */ - status?: GetTokenDetailsAuthenticationStatus | undefined; + status?: GetTokenDetailsAuthenticationStatusOpen | undefined; /** * Payment service used for your Plex Pass subscription */ @@ -138,6 +154,12 @@ export enum GetTokenDetailsAuthenticationResponseStatus { Inactive = "Inactive", Active = "Active", } +/** + * String representation of subscriptionActive + */ +export type GetTokenDetailsAuthenticationResponseStatusOpen = OpenEnum< + typeof GetTokenDetailsAuthenticationResponseStatus +>; export type GetTokenDetailsSubscription = { /** @@ -155,7 +177,7 @@ export type GetTokenDetailsSubscription = { /** * String representation of subscriptionActive */ - status?: GetTokenDetailsAuthenticationResponseStatus | undefined; + status?: GetTokenDetailsAuthenticationResponseStatusOpen | undefined; /** * Payment service used for your Plex Pass subscription */ @@ -255,7 +277,7 @@ export type GetTokenDetailsUserPlexAccount = { /** * Your current mailing list status (active or unsubscribed) */ - mailingListStatus: MailingListStatus; + mailingListStatus: MailingListStatusOpen; /** * The maximum number of accounts allowed in the Plex Home */ @@ -340,14 +362,25 @@ export type GetTokenDetailsResponse = { }; /** @internal */ -export const MailingListStatus$inboundSchema: z.ZodNativeEnum< - typeof MailingListStatus -> = z.nativeEnum(MailingListStatus); +export const MailingListStatus$inboundSchema: z.ZodType< + MailingListStatusOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(MailingListStatus), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const MailingListStatus$outboundSchema: z.ZodNativeEnum< - typeof MailingListStatus -> = MailingListStatus$inboundSchema; +export const MailingListStatus$outboundSchema: z.ZodType< + MailingListStatusOpen, + z.ZodTypeDef, + MailingListStatusOpen +> = z.union([ + z.nativeEnum(MailingListStatus), + z.string().and(z.custom>()), +]); /** * @internal @@ -546,14 +579,25 @@ export function userProfileFromJSON( } /** @internal */ -export const GetTokenDetailsStatus$inboundSchema: z.ZodNativeEnum< - typeof GetTokenDetailsStatus -> = z.nativeEnum(GetTokenDetailsStatus); +export const GetTokenDetailsStatus$inboundSchema: z.ZodType< + GetTokenDetailsStatusOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(GetTokenDetailsStatus), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const GetTokenDetailsStatus$outboundSchema: z.ZodNativeEnum< - typeof GetTokenDetailsStatus -> = GetTokenDetailsStatus$inboundSchema; +export const GetTokenDetailsStatus$outboundSchema: z.ZodType< + GetTokenDetailsStatusOpen, + z.ZodTypeDef, + GetTokenDetailsStatusOpen +> = z.union([ + z.nativeEnum(GetTokenDetailsStatus), + z.string().and(z.custom>()), +]); /** * @internal @@ -629,14 +673,25 @@ export function servicesFromJSON( } /** @internal */ -export const GetTokenDetailsAuthenticationStatus$inboundSchema: z.ZodNativeEnum< - typeof GetTokenDetailsAuthenticationStatus -> = z.nativeEnum(GetTokenDetailsAuthenticationStatus); +export const GetTokenDetailsAuthenticationStatus$inboundSchema: z.ZodType< + GetTokenDetailsAuthenticationStatusOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(GetTokenDetailsAuthenticationStatus), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const GetTokenDetailsAuthenticationStatus$outboundSchema: - z.ZodNativeEnum = - GetTokenDetailsAuthenticationStatus$inboundSchema; +export const GetTokenDetailsAuthenticationStatus$outboundSchema: z.ZodType< + GetTokenDetailsAuthenticationStatusOpen, + z.ZodTypeDef, + GetTokenDetailsAuthenticationStatusOpen +> = z.union([ + z.nativeEnum(GetTokenDetailsAuthenticationStatus), + z.string().and(z.custom>()), +]); /** * @internal @@ -718,13 +773,26 @@ export function subscriptionFromJSON( /** @internal */ export const GetTokenDetailsAuthenticationResponseStatus$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(GetTokenDetailsAuthenticationResponseStatus); + z.ZodType< + GetTokenDetailsAuthenticationResponseStatusOpen, + z.ZodTypeDef, + unknown + > = z + .union([ + z.nativeEnum(GetTokenDetailsAuthenticationResponseStatus), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ export const GetTokenDetailsAuthenticationResponseStatus$outboundSchema: - z.ZodNativeEnum = - GetTokenDetailsAuthenticationResponseStatus$inboundSchema; + z.ZodType< + GetTokenDetailsAuthenticationResponseStatusOpen, + z.ZodTypeDef, + GetTokenDetailsAuthenticationResponseStatusOpen + > = z.union([ + z.nativeEnum(GetTokenDetailsAuthenticationResponseStatus), + z.string().and(z.custom>()), + ]); /** * @internal diff --git a/src/sdk/models/operations/gettopwatchedcontent.ts b/src/sdk/models/operations/gettopwatchedcontent.ts index 0fd9e6a4..6dea6bba 100644 --- a/src/sdk/models/operations/gettopwatchedcontent.ts +++ b/src/sdk/models/operations/gettopwatchedcontent.ts @@ -5,6 +5,11 @@ import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; +import { + catchUnrecognizedEnum, + OpenEnum, + Unrecognized, +} from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { RFCDate } from "../../types/rfcdate.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -28,6 +33,19 @@ export enum GetTopWatchedContentQueryParamType { Album = 9, 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 = { /** @@ -46,7 +64,7 @@ export type GetTopWatchedContentRequest = { * 4 = episode * 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 = { @@ -149,14 +167,25 @@ export type GetTopWatchedContentResponse = { }; /** @internal */ -export const GetTopWatchedContentQueryParamType$inboundSchema: z.ZodNativeEnum< - typeof GetTopWatchedContentQueryParamType -> = z.nativeEnum(GetTopWatchedContentQueryParamType); +export const GetTopWatchedContentQueryParamType$inboundSchema: z.ZodType< + GetTopWatchedContentQueryParamTypeOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(GetTopWatchedContentQueryParamType), + z.number().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const GetTopWatchedContentQueryParamType$outboundSchema: z.ZodNativeEnum< - typeof GetTopWatchedContentQueryParamType -> = GetTopWatchedContentQueryParamType$inboundSchema; +export const GetTopWatchedContentQueryParamType$outboundSchema: z.ZodType< + GetTopWatchedContentQueryParamTypeOpen, + z.ZodTypeDef, + GetTopWatchedContentQueryParamTypeOpen +> = z.union([ + z.nativeEnum(GetTopWatchedContentQueryParamType), + z.number().and(z.custom>()), +]); /** * @internal diff --git a/src/sdk/models/operations/getuserfriends.ts b/src/sdk/models/operations/getuserfriends.ts index fd99b5d3..bd3a9cfc 100644 --- a/src/sdk/models/operations/getuserfriends.ts +++ b/src/sdk/models/operations/getuserfriends.ts @@ -5,6 +5,11 @@ import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; +import { + catchUnrecognizedEnum, + OpenEnum, + Unrecognized, +} from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -22,6 +27,10 @@ export type SharedSources = {}; export enum Status { Accepted = "accepted", } +/** + * Current friend request status + */ +export type StatusOpen = OpenEnum; export type Friend = { /** @@ -49,7 +58,7 @@ export type Friend = { /** * Current friend request status */ - status: Status; + status: StatusOpen; /** * URL of the account thumbnail */ @@ -176,12 +185,25 @@ export function sharedSourcesFromJSON( } /** @internal */ -export const Status$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(Status); +export const Status$inboundSchema: z.ZodType< + StatusOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(Status), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const Status$outboundSchema: z.ZodNativeEnum = - Status$inboundSchema; +export const Status$outboundSchema: z.ZodType< + StatusOpen, + z.ZodTypeDef, + StatusOpen +> = z.union([ + z.nativeEnum(Status), + z.string().and(z.custom>()), +]); /** * @internal diff --git a/src/sdk/models/operations/getwatchlist.ts b/src/sdk/models/operations/getwatchlist.ts index ac129ae7..567b6660 100644 --- a/src/sdk/models/operations/getwatchlist.ts +++ b/src/sdk/models/operations/getwatchlist.ts @@ -5,6 +5,11 @@ import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; +import { + catchUnrecognizedEnum, + OpenEnum, + Unrecognized, +} from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { RFCDate } from "../../types/rfcdate.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -24,6 +29,10 @@ export enum Filter { Available = "available", Released = "released", } +/** + * Filter + */ +export type FilterOpen = OpenEnum; /** * 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", Show = "show", } +/** + * The type of library to filter. Can be "movie" or "show", or all if not present. + * + * @remarks + */ +export type LibtypeOpen = OpenEnum; /** * include collections in the results @@ -59,7 +74,7 @@ export type GetWatchListRequest = { /** * Filter */ - filter: Filter; + filter: FilterOpen; /** * In the format "field:dir". Available fields are "watchlistedAt" (Added At), * @@ -73,7 +88,7 @@ export type GetWatchListRequest = { * * @remarks */ - libtype?: Libtype | undefined; + libtype?: LibtypeOpen | undefined; /** * The number of items to return. If not specified, all items will be returned. * @@ -192,12 +207,25 @@ export type GetWatchListResponse = { }; /** @internal */ -export const Filter$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(Filter); +export const Filter$inboundSchema: z.ZodType< + FilterOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(Filter), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const Filter$outboundSchema: z.ZodNativeEnum = - Filter$inboundSchema; +export const Filter$outboundSchema: z.ZodType< + FilterOpen, + z.ZodTypeDef, + FilterOpen +> = z.union([ + z.nativeEnum(Filter), + z.string().and(z.custom>()), +]); /** * @internal @@ -211,12 +239,25 @@ export namespace Filter$ { } /** @internal */ -export const Libtype$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(Libtype); +export const Libtype$inboundSchema: z.ZodType< + LibtypeOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(Libtype), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const Libtype$outboundSchema: z.ZodNativeEnum = - Libtype$inboundSchema; +export const Libtype$outboundSchema: z.ZodType< + LibtypeOpen, + z.ZodTypeDef, + LibtypeOpen +> = z.union([ + z.nativeEnum(Libtype), + z.string().and(z.custom>()), +]); /** * @internal diff --git a/src/sdk/models/operations/logline.ts b/src/sdk/models/operations/logline.ts index c3aa8638..33907bbf 100644 --- a/src/sdk/models/operations/logline.ts +++ b/src/sdk/models/operations/logline.ts @@ -5,6 +5,11 @@ import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; +import { + catchUnrecognizedEnum, + OpenEnum, + Unrecognized, +} from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -25,6 +30,17 @@ export enum Level { Three = 3, 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; export type LogLineRequest = { /** @@ -37,7 +53,7 @@ export type LogLineRequest = { * 3: Debug * 4: Verbose */ - level: Level; + level: LevelOpen; /** * The text of the message to write to the log. */ @@ -64,13 +80,22 @@ export type LogLineResponse = { }; /** @internal */ -export const Level$inboundSchema: z.ZodNativeEnum = z.nativeEnum( - Level, -); +export const Level$inboundSchema: z.ZodType = + z + .union([ + z.nativeEnum(Level), + z.number().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const Level$outboundSchema: z.ZodNativeEnum = - Level$inboundSchema; +export const Level$outboundSchema: z.ZodType< + LevelOpen, + z.ZodTypeDef, + LevelOpen +> = z.union([ + z.nativeEnum(Level), + z.number().and(z.custom>()), +]); /** * @internal diff --git a/src/sdk/models/operations/postuserssignindata.ts b/src/sdk/models/operations/postuserssignindata.ts index 8af99dae..2590df7d 100644 --- a/src/sdk/models/operations/postuserssignindata.ts +++ b/src/sdk/models/operations/postuserssignindata.ts @@ -5,6 +5,11 @@ import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; +import { + catchUnrecognizedEnum, + OpenEnum, + Unrecognized, +} from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -56,6 +61,12 @@ export enum PostUsersSignInDataMailingListStatus { Active = "active", 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) @@ -125,13 +136,16 @@ export enum PostUsersSignInDataStatus { Online = "online", Offline = "offline", } +export type PostUsersSignInDataStatusOpen = OpenEnum< + typeof PostUsersSignInDataStatus +>; export type PostUsersSignInDataServices = { identifier: string; endpoint: string; token: string | null; secret: string | null; - status: PostUsersSignInDataStatus; + status: PostUsersSignInDataStatusOpen; }; /** @@ -141,6 +155,12 @@ export enum PostUsersSignInDataAuthenticationStatus { Inactive = "Inactive", Active = "Active", } +/** + * String representation of subscriptionActive + */ +export type PostUsersSignInDataAuthenticationStatusOpen = OpenEnum< + typeof PostUsersSignInDataAuthenticationStatus +>; /** * If the account’s Plex Pass subscription is active @@ -161,7 +181,7 @@ export type PostUsersSignInDataSubscription = { /** * String representation of subscriptionActive */ - status?: PostUsersSignInDataAuthenticationStatus | undefined; + status?: PostUsersSignInDataAuthenticationStatusOpen | undefined; /** * Payment service used for your Plex Pass subscription */ @@ -179,6 +199,12 @@ export enum PostUsersSignInDataAuthenticationResponseStatus { Inactive = "Inactive", Active = "Active", } +/** + * String representation of subscriptionActive + */ +export type PostUsersSignInDataAuthenticationResponseStatusOpen = OpenEnum< + typeof PostUsersSignInDataAuthenticationResponseStatus +>; export type PostUsersSignInDataAuthenticationSubscription = { /** @@ -196,7 +222,7 @@ export type PostUsersSignInDataAuthenticationSubscription = { /** * String representation of subscriptionActive */ - status?: PostUsersSignInDataAuthenticationResponseStatus | undefined; + status?: PostUsersSignInDataAuthenticationResponseStatusOpen | undefined; /** * Payment service used for your Plex Pass subscription */ @@ -210,6 +236,9 @@ export type PostUsersSignInDataAuthenticationSubscription = { export enum PostUsersSignInDataState { Ended = "ended", } +export type PostUsersSignInDataStateOpen = OpenEnum< + typeof PostUsersSignInDataState +>; export type InternalPaymentMethod = {}; @@ -232,7 +261,7 @@ export type PastSubscription = { canConvert?: boolean | undefined; type: string; transfer: string | null; - state: PostUsersSignInDataState; + state: PostUsersSignInDataStateOpen; billing: Billing; }; @@ -327,7 +356,7 @@ export type PostUsersSignInDataUserPlexAccount = { /** * Your current mailing list status (active or unsubscribed) */ - mailingListStatus: PostUsersSignInDataMailingListStatus; + mailingListStatus: PostUsersSignInDataMailingListStatusOpen; /** * The maximum number of accounts allowed in the Plex Home */ @@ -570,15 +599,25 @@ export function postUsersSignInDataRequestFromJSON( } /** @internal */ -export const PostUsersSignInDataMailingListStatus$inboundSchema: - z.ZodNativeEnum = z.nativeEnum( - PostUsersSignInDataMailingListStatus, - ); +export const PostUsersSignInDataMailingListStatus$inboundSchema: z.ZodType< + PostUsersSignInDataMailingListStatusOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(PostUsersSignInDataMailingListStatus), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const PostUsersSignInDataMailingListStatus$outboundSchema: - z.ZodNativeEnum = - PostUsersSignInDataMailingListStatus$inboundSchema; +export const PostUsersSignInDataMailingListStatus$outboundSchema: z.ZodType< + PostUsersSignInDataMailingListStatusOpen, + z.ZodTypeDef, + PostUsersSignInDataMailingListStatusOpen +> = z.union([ + z.nativeEnum(PostUsersSignInDataMailingListStatus), + z.string().and(z.custom>()), +]); /** * @internal @@ -799,14 +838,25 @@ export function postUsersSignInDataUserProfileFromJSON( } /** @internal */ -export const PostUsersSignInDataStatus$inboundSchema: z.ZodNativeEnum< - typeof PostUsersSignInDataStatus -> = z.nativeEnum(PostUsersSignInDataStatus); +export const PostUsersSignInDataStatus$inboundSchema: z.ZodType< + PostUsersSignInDataStatusOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(PostUsersSignInDataStatus), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const PostUsersSignInDataStatus$outboundSchema: z.ZodNativeEnum< - typeof PostUsersSignInDataStatus -> = PostUsersSignInDataStatus$inboundSchema; +export const PostUsersSignInDataStatus$outboundSchema: z.ZodType< + PostUsersSignInDataStatusOpen, + z.ZodTypeDef, + PostUsersSignInDataStatusOpen +> = z.union([ + z.nativeEnum(PostUsersSignInDataStatus), + z.string().and(z.custom>()), +]); /** * @internal @@ -888,14 +938,25 @@ export function postUsersSignInDataServicesFromJSON( } /** @internal */ -export const PostUsersSignInDataAuthenticationStatus$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(PostUsersSignInDataAuthenticationStatus); +export const PostUsersSignInDataAuthenticationStatus$inboundSchema: z.ZodType< + PostUsersSignInDataAuthenticationStatusOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(PostUsersSignInDataAuthenticationStatus), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const PostUsersSignInDataAuthenticationStatus$outboundSchema: - z.ZodNativeEnum = - PostUsersSignInDataAuthenticationStatus$inboundSchema; +export const PostUsersSignInDataAuthenticationStatus$outboundSchema: z.ZodType< + PostUsersSignInDataAuthenticationStatusOpen, + z.ZodTypeDef, + PostUsersSignInDataAuthenticationStatusOpen +> = z.union([ + z.nativeEnum(PostUsersSignInDataAuthenticationStatus), + z.string().and(z.custom>()), +]); /** * @internal @@ -983,13 +1044,26 @@ export function postUsersSignInDataSubscriptionFromJSON( /** @internal */ export const PostUsersSignInDataAuthenticationResponseStatus$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(PostUsersSignInDataAuthenticationResponseStatus); + z.ZodType< + PostUsersSignInDataAuthenticationResponseStatusOpen, + z.ZodTypeDef, + unknown + > = z + .union([ + z.nativeEnum(PostUsersSignInDataAuthenticationResponseStatus), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ export const PostUsersSignInDataAuthenticationResponseStatus$outboundSchema: - z.ZodNativeEnum = - PostUsersSignInDataAuthenticationResponseStatus$inboundSchema; + z.ZodType< + PostUsersSignInDataAuthenticationResponseStatusOpen, + z.ZodTypeDef, + PostUsersSignInDataAuthenticationResponseStatusOpen + > = z.union([ + z.nativeEnum(PostUsersSignInDataAuthenticationResponseStatus), + z.string().and(z.custom>()), + ]); /** * @internal @@ -1089,14 +1163,25 @@ export function postUsersSignInDataAuthenticationSubscriptionFromJSON( } /** @internal */ -export const PostUsersSignInDataState$inboundSchema: z.ZodNativeEnum< - typeof PostUsersSignInDataState -> = z.nativeEnum(PostUsersSignInDataState); +export const PostUsersSignInDataState$inboundSchema: z.ZodType< + PostUsersSignInDataStateOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(PostUsersSignInDataState), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const PostUsersSignInDataState$outboundSchema: z.ZodNativeEnum< - typeof PostUsersSignInDataState -> = PostUsersSignInDataState$inboundSchema; +export const PostUsersSignInDataState$outboundSchema: z.ZodType< + PostUsersSignInDataStateOpen, + z.ZodTypeDef, + PostUsersSignInDataStateOpen +> = z.union([ + z.nativeEnum(PostUsersSignInDataState), + z.string().and(z.custom>()), +]); /** * @internal diff --git a/src/sdk/models/operations/starttask.ts b/src/sdk/models/operations/starttask.ts index 6b7ad6bf..6851164d 100644 --- a/src/sdk/models/operations/starttask.ts +++ b/src/sdk/models/operations/starttask.ts @@ -5,6 +5,11 @@ import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; +import { + catchUnrecognizedEnum, + OpenEnum, + Unrecognized, +} from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -27,12 +32,16 @@ export enum TaskName { RefreshPeriodicMetadata = "RefreshPeriodicMetadata", UpgradeMediaAnalysis = "UpgradeMediaAnalysis", } +/** + * the name of the task to be started. + */ +export type TaskNameOpen = OpenEnum; export type StartTaskRequest = { /** * the name of the task to be started. */ - taskName: TaskName; + taskName: TaskNameOpen; }; export type StartTaskResponse = { @@ -51,12 +60,25 @@ export type StartTaskResponse = { }; /** @internal */ -export const TaskName$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(TaskName); +export const TaskName$inboundSchema: z.ZodType< + TaskNameOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(TaskName), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const TaskName$outboundSchema: z.ZodNativeEnum = - TaskName$inboundSchema; +export const TaskName$outboundSchema: z.ZodType< + TaskNameOpen, + z.ZodTypeDef, + TaskNameOpen +> = z.union([ + z.nativeEnum(TaskName), + z.string().and(z.custom>()), +]); /** * @internal diff --git a/src/sdk/models/operations/stoptask.ts b/src/sdk/models/operations/stoptask.ts index edf30433..3949144a 100644 --- a/src/sdk/models/operations/stoptask.ts +++ b/src/sdk/models/operations/stoptask.ts @@ -5,6 +5,11 @@ import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; +import { + catchUnrecognizedEnum, + OpenEnum, + Unrecognized, +} from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -27,12 +32,16 @@ export enum PathParamTaskName { RefreshPeriodicMetadata = "RefreshPeriodicMetadata", UpgradeMediaAnalysis = "UpgradeMediaAnalysis", } +/** + * The name of the task to be started. + */ +export type PathParamTaskNameOpen = OpenEnum; export type StopTaskRequest = { /** * The name of the task to be started. */ - taskName: PathParamTaskName; + taskName: PathParamTaskNameOpen; }; export type StopTaskResponse = { @@ -51,14 +60,25 @@ export type StopTaskResponse = { }; /** @internal */ -export const PathParamTaskName$inboundSchema: z.ZodNativeEnum< - typeof PathParamTaskName -> = z.nativeEnum(PathParamTaskName); +export const PathParamTaskName$inboundSchema: z.ZodType< + PathParamTaskNameOpen, + z.ZodTypeDef, + unknown +> = z + .union([ + z.nativeEnum(PathParamTaskName), + z.string().transform(catchUnrecognizedEnum), + ]); /** @internal */ -export const PathParamTaskName$outboundSchema: z.ZodNativeEnum< - typeof PathParamTaskName -> = PathParamTaskName$inboundSchema; +export const PathParamTaskName$outboundSchema: z.ZodType< + PathParamTaskNameOpen, + z.ZodTypeDef, + PathParamTaskNameOpen +> = z.union([ + z.nativeEnum(PathParamTaskName), + z.string().and(z.custom>()), +]); /** * @internal diff --git a/src/sdk/playlists.ts b/src/sdk/playlists.ts index ddaadc62..0b8c1eff 100644 --- a/src/sdk/playlists.ts +++ b/src/sdk/playlists.ts @@ -42,8 +42,8 @@ export class Playlists extends ClientSDK { * Get All Playlists given the specified filters. */ async getPlaylists( - playlistType?: operations.PlaylistType | undefined, - smart?: operations.QueryParamSmart | undefined, + playlistType?: operations.PlaylistTypeOpen | undefined, + smart?: operations.QueryParamSmartOpen | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(playlistsGetPlaylists( @@ -121,7 +121,7 @@ export class Playlists extends ClientSDK { */ async getPlaylistContents( playlistID: number, - type: operations.GetPlaylistContentsQueryParamType, + type: operations.GetPlaylistContentsQueryParamTypeOpen, options?: RequestOptions, ): Promise { return unwrapAsync(playlistsGetPlaylistContents(