diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000..4d160bd2 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,28 @@ +/* eslint-env node */ +module.exports = { + root: true, + extends: [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:import/recommended", + "plugin:import/typescript", + ], + parser: "@typescript-eslint/parser", + plugins: ["@typescript-eslint"], + settings: { + "import/resolver": { + typescript: true, + node: true, + }, + }, + rules: { + // Handled by typescript compiler + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/ban-types": "off", + "@typescript-eslint/no-namespace": "off", + "@typescript-eslint/no-explicit-any": "off", + "import/no-named-as-default-member": "off", + + "import/no-default-export": "error", + }, +}; diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..113eead5 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# This allows generated code to be indexed correctly +*.ts linguist-generated=false \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..19f50213 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +/models +/models/errors +/types +/lib +/sdk +/index.* +/cjs +/node_modules +/.tsbuildinfo diff --git a/.npmignore b/.npmignore new file mode 100644 index 00000000..e8a556cd --- /dev/null +++ b/.npmignore @@ -0,0 +1,8 @@ +/* +/docs/**/*.md +!/**/*.ts +!/**/*.js +!/**/*.map + +/.eslintrc.js +/cjs diff --git a/README.md b/README.md new file mode 100644 index 00000000..f42b3910 --- /dev/null +++ b/README.md @@ -0,0 +1,329 @@ +# openapi + +
+ + + + +
+ + +## 🏗 **Welcome to your new SDK!** 🏗 + +It has been generated successfully based on your OpenAPI spec. However, it is not yet ready for production use. Here are some next steps: +- [ ] 🛠 Make your SDK feel handcrafted by [customizing it](https://www.speakeasyapi.dev/docs/customize-sdks) +- [ ] ♻️ Refine your SDK quickly by iterating locally with the [Speakeasy CLI](https://github.com/speakeasy-api/speakeasy) +- [ ] 🎁 Publish your SDK to package managers by [configuring automatic publishing](https://www.speakeasyapi.dev/docs/productionize-sdks/publish-sdks) +- [ ] ✨ When ready to productionize, delete this section from the README + + +## SDK Installation + +### NPM + +```bash +npm add openapi +``` + +### Yarn + +```bash +yarn add openapi +``` + + + +## SDK Example Usage + +### Example + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const res = await sdk.server.getServerCapabilities(); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); + +``` + + + +## Available Resources and Operations + +### [server](docs/sdks/server/README.md) + +* [getServerCapabilities](docs/sdks/server/README.md#getservercapabilities) - Server Capabilities +* [getServerPreferences](docs/sdks/server/README.md#getserverpreferences) - Get Server Preferences +* [getAvailableClients](docs/sdks/server/README.md#getavailableclients) - Get Available Clients +* [getDevices](docs/sdks/server/README.md#getdevices) - Get Devices +* [getServerIdentity](docs/sdks/server/README.md#getserveridentity) - Get Server Identity +* [getMyPlexAccount](docs/sdks/server/README.md#getmyplexaccount) - Get MyPlex Account +* [getResizedPhoto](docs/sdks/server/README.md#getresizedphoto) - Get a Resized Photo +* [getServerList](docs/sdks/server/README.md#getserverlist) - Get Server List + +### [media](docs/sdks/media/README.md) + +* [markPlayed](docs/sdks/media/README.md#markplayed) - Mark Media Played +* [markUnplayed](docs/sdks/media/README.md#markunplayed) - Mark Media Unplayed +* [updatePlayProgress](docs/sdks/media/README.md#updateplayprogress) - Update Media Play Progress + +### [activities](docs/sdks/activities/README.md) + +* [getServerActivities](docs/sdks/activities/README.md#getserveractivities) - Get Server Activities +* [cancelServerActivities](docs/sdks/activities/README.md#cancelserveractivities) - Cancel Server Activities + +### [butler](docs/sdks/butler/README.md) + +* [getButlerTasks](docs/sdks/butler/README.md#getbutlertasks) - Get Butler tasks +* [startAllTasks](docs/sdks/butler/README.md#startalltasks) - Start all Butler tasks +* [stopAllTasks](docs/sdks/butler/README.md#stopalltasks) - Stop all Butler tasks +* [startTask](docs/sdks/butler/README.md#starttask) - Start a single Butler task +* [stopTask](docs/sdks/butler/README.md#stoptask) - Stop a single Butler task + +### [hubs](docs/sdks/hubs/README.md) + +* [getGlobalHubs](docs/sdks/hubs/README.md#getglobalhubs) - Get Global Hubs +* [getLibraryHubs](docs/sdks/hubs/README.md#getlibraryhubs) - Get library specific hubs + +### [search](docs/sdks/search/README.md) + +* [performSearch](docs/sdks/search/README.md#performsearch) - Perform a search +* [performVoiceSearch](docs/sdks/search/README.md#performvoicesearch) - Perform a voice search +* [getSearchResults](docs/sdks/search/README.md#getsearchresults) - Get Search Results + +### [library](docs/sdks/library/README.md) + +* [getFileHash](docs/sdks/library/README.md#getfilehash) - Get Hash Value +* [getRecentlyAdded](docs/sdks/library/README.md#getrecentlyadded) - Get Recently Added +* [getLibraries](docs/sdks/library/README.md#getlibraries) - Get All Libraries +* [getLibrary](docs/sdks/library/README.md#getlibrary) - Get Library Details +* [deleteLibrary](docs/sdks/library/README.md#deletelibrary) - Delete Library Section +* [getLibraryItems](docs/sdks/library/README.md#getlibraryitems) - Get Library Items +* [refreshLibrary](docs/sdks/library/README.md#refreshlibrary) - Refresh Library +* [getLatestLibraryItems](docs/sdks/library/README.md#getlatestlibraryitems) - Get Latest Library Items +* [getCommonLibraryItems](docs/sdks/library/README.md#getcommonlibraryitems) - Get Common Library Items +* [getMetadata](docs/sdks/library/README.md#getmetadata) - Get Items Metadata +* [getMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children +* [getOnDeck](docs/sdks/library/README.md#getondeck) - Get On Deck + +### [log](docs/sdks/log/README.md) + +* [logLine](docs/sdks/log/README.md#logline) - Logging a single line message. +* [logMultiLine](docs/sdks/log/README.md#logmultiline) - Logging a multi-line message +* [enablePaperTrail](docs/sdks/log/README.md#enablepapertrail) - Enabling Papertrail + +### [playlists](docs/sdks/playlists/README.md) + +* [createPlaylist](docs/sdks/playlists/README.md#createplaylist) - Create a Playlist +* [getPlaylists](docs/sdks/playlists/README.md#getplaylists) - Get All Playlists +* [getPlaylist](docs/sdks/playlists/README.md#getplaylist) - Retrieve Playlist +* [deletePlaylist](docs/sdks/playlists/README.md#deleteplaylist) - Deletes a Playlist +* [updatePlaylist](docs/sdks/playlists/README.md#updateplaylist) - Update a Playlist +* [getPlaylistContents](docs/sdks/playlists/README.md#getplaylistcontents) - Retrieve Playlist Contents +* [clearPlaylistContents](docs/sdks/playlists/README.md#clearplaylistcontents) - Delete Playlist Contents +* [addPlaylistContents](docs/sdks/playlists/README.md#addplaylistcontents) - Adding to a Playlist +* [uploadPlaylist](docs/sdks/playlists/README.md#uploadplaylist) - Upload Playlist + +### [security](docs/sdks/security/README.md) + +* [getTransientToken](docs/sdks/security/README.md#gettransienttoken) - Get a Transient Token. +* [getSourceConnectionInformation](docs/sdks/security/README.md#getsourceconnectioninformation) - Get Source Connection Information + +### [sessions](docs/sdks/sessions/README.md) + +* [getSessions](docs/sdks/sessions/README.md#getsessions) - Get Active Sessions +* [getSessionHistory](docs/sdks/sessions/README.md#getsessionhistory) - Get Session History +* [getTranscodeSessions](docs/sdks/sessions/README.md#gettranscodesessions) - Get Transcode Sessions +* [stopTranscodeSession](docs/sdks/sessions/README.md#stoptranscodesession) - Stop a Transcode Session + +### [updater](docs/sdks/updater/README.md) + +* [getUpdateStatus](docs/sdks/updater/README.md#getupdatestatus) - Querying status of updates +* [checkForUpdates](docs/sdks/updater/README.md#checkforupdates) - Checking for updates +* [applyUpdates](docs/sdks/updater/README.md#applyupdates) - Apply Updates + +### [video](docs/sdks/video/README.md) + +* [startUniversalTranscode](docs/sdks/video/README.md#startuniversaltranscode) - Start Universal Transcode +* [getTimeline](docs/sdks/video/README.md#gettimeline) - Get the timeline for a media item + + + +## Error Handling + +All SDK methods return a response object or throw an error. If Error objects are specified in your OpenAPI Spec, the SDK will throw the appropriate Error type. + +| Error Object | Status Code | Content Type | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| errors.GetServerCapabilitiesResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +Example + +```typescript +import { SDK } from "openapi"; +import * as errors from "openapi/models/errors"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const res = await sdk.server.getServerCapabilities().catch((err) => { + if (err instanceof errors.GetServerCapabilitiesResponseBody) { + console.error(err); // handle exception + return null; + } else { + throw err; + } + }); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); + +``` + + + +## Server Selection + +### Select Server by Index + +You can override the default server globally by passing a server index to the `serverIdx: number` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers: + +| # | Server | Variables | +| - | ------ | --------- | +| 0 | `http://10.10.10.47:32400` | None | +| 1 | `{protocol}://{ip}:{port}` | `protocol` (default is `http`), `ip` (default is `10.10.10.47`), `port` (default is `32400`) | + + + +#### Variables + +Some of the server options above contain variables. If you want to set the values of those variables, the following optional parameters are available when initializing the SDK client instance: + * `protocol: models.ServerProtocol` + * `ip: string` + * `port: string` + +### Override Server URL Per-Client + +The default server can also be overridden globally by passing a URL to the `serverURL: str` optional parameter when initializing the SDK client instance. For example: + + + +## Custom HTTP Client + +The TypeScript SDK makes API calls using an `HTTPClient` that wraps the native +[Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). This +client is a thin wrapper around `fetch` and provides the ability to attach hooks +around the request lifecycle that can be used to modify the request or handle +errors and response. + +The `HTTPClient` constructor takes an optional `fetcher` argument that can be +used to integrate a third-party HTTP client or when writing tests to mock out +the HTTP client and feed in fixtures. + +The following example shows how to use the `"beforeRequest"` hook to to add a +custom header and a timeout to requests and how to use the `"requestError"` hook +to log errors: + +```typescript +import { SDK } from "openapi"; +import { HTTPClient } from "openapi/lib/http"; + +const httpClient = new HTTPClient({ + // fetcher takes a function that has the same signature as native `fetch`. + fetcher: (request) => { + return fetch(request); + } +}); + +httpClient.addHook("beforeRequest", (request) => { + const nextRequest = new Request(request, { + signal: request.signal || AbortSignal.timeout(5000); + }); + + nextRequest.headers.set("x-custom-header", "custom value"); + + return nextRequest; +}); + +httpClient.addHook("requestError", (error, request) => { + console.group("Request Error"); + console.log("Reason:", `${error}`); + console.log("Endpoint:", `${request.method} ${request.url}`); + console.groupEnd(); +}); + +const sdk = new SDK({ httpClient }); +``` + + + +## Authentication + +### Per-Client Security Schemes + +This SDK supports the following security scheme globally: + +| Name | Type | Scheme | +| ------------- | ------------- | ------------- | +| `accessToken` | apiKey | API key | + +To authenticate with the API the `accessToken` parameter must be set when initializing the SDK client instance. For example: +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const res = await sdk.server.getServerCapabilities(); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); + +``` + + + + +# Development + +## Maturity + +This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage +to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally +looking for the latest version. + +## Contributions + +While we value open-source contributions to this SDK, this library is generated programmatically. +Feel free to open a PR or a Github issue as a proof of concept and we'll do our best to include it in a future release! + +### SDK Created by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks) diff --git a/RELEASES.md b/RELEASES.md new file mode 100644 index 00000000..afa6bf2e --- /dev/null +++ b/RELEASES.md @@ -0,0 +1,11 @@ + + +## 2023-12-24 06:37:52 +### Changes +Based on: +- OpenAPI Doc 0.0.3 +- Speakeasy CLI 1.129.1 (2.223.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.1.0] . +### Releases +- [NPM v0.1.0] https://www.npmjs.com/package/openapi/v/0.1.0 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md new file mode 100644 index 00000000..8c4da2a1 --- /dev/null +++ b/USAGE.md @@ -0,0 +1,22 @@ + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const res = await sdk.server.getServerCapabilities(); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); + +``` + \ No newline at end of file diff --git a/docs/models/components/security.md b/docs/models/components/security.md new file mode 100644 index 00000000..72dd5416 --- /dev/null +++ b/docs/models/components/security.md @@ -0,0 +1,8 @@ +# Security + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `accessToken` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/errors/addplaylistcontentserrors.md b/docs/models/errors/addplaylistcontentserrors.md new file mode 100644 index 00000000..6a9cd1d9 --- /dev/null +++ b/docs/models/errors/addplaylistcontentserrors.md @@ -0,0 +1,10 @@ +# AddPlaylistContentsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/addplaylistcontentsresponsebody.md b/docs/models/errors/addplaylistcontentsresponsebody.md new file mode 100644 index 00000000..88275830 --- /dev/null +++ b/docs/models/errors/addplaylistcontentsresponsebody.md @@ -0,0 +1,11 @@ +# AddPlaylistContentsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `errors` | [errors.AddPlaylistContentsErrors](../../models/errors/addplaylistcontentserrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/applyupdateserrors.md b/docs/models/errors/applyupdateserrors.md new file mode 100644 index 00000000..ff74a75d --- /dev/null +++ b/docs/models/errors/applyupdateserrors.md @@ -0,0 +1,10 @@ +# ApplyUpdatesErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/applyupdatesresponsebody.md b/docs/models/errors/applyupdatesresponsebody.md new file mode 100644 index 00000000..9adb245c --- /dev/null +++ b/docs/models/errors/applyupdatesresponsebody.md @@ -0,0 +1,11 @@ +# ApplyUpdatesResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `errors` | [errors.ApplyUpdatesErrors](../../models/errors/applyupdateserrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/cancelserveractivitieserrors.md b/docs/models/errors/cancelserveractivitieserrors.md new file mode 100644 index 00000000..bea7f9a5 --- /dev/null +++ b/docs/models/errors/cancelserveractivitieserrors.md @@ -0,0 +1,10 @@ +# CancelServerActivitiesErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/cancelserveractivitiesresponsebody.md b/docs/models/errors/cancelserveractivitiesresponsebody.md new file mode 100644 index 00000000..bfd6ac8e --- /dev/null +++ b/docs/models/errors/cancelserveractivitiesresponsebody.md @@ -0,0 +1,11 @@ +# CancelServerActivitiesResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `errors` | [errors.CancelServerActivitiesErrors](../../models/errors/cancelserveractivitieserrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/checkforupdateserrors.md b/docs/models/errors/checkforupdateserrors.md new file mode 100644 index 00000000..6f2cea9b --- /dev/null +++ b/docs/models/errors/checkforupdateserrors.md @@ -0,0 +1,10 @@ +# CheckForUpdatesErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/checkforupdatesresponsebody.md b/docs/models/errors/checkforupdatesresponsebody.md new file mode 100644 index 00000000..5f7402af --- /dev/null +++ b/docs/models/errors/checkforupdatesresponsebody.md @@ -0,0 +1,11 @@ +# CheckForUpdatesResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `errors` | [errors.CheckForUpdatesErrors](../../models/errors/checkforupdateserrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/clearplaylistcontentserrors.md b/docs/models/errors/clearplaylistcontentserrors.md new file mode 100644 index 00000000..5cec3cfb --- /dev/null +++ b/docs/models/errors/clearplaylistcontentserrors.md @@ -0,0 +1,10 @@ +# ClearPlaylistContentsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/clearplaylistcontentsresponsebody.md b/docs/models/errors/clearplaylistcontentsresponsebody.md new file mode 100644 index 00000000..a169f66a --- /dev/null +++ b/docs/models/errors/clearplaylistcontentsresponsebody.md @@ -0,0 +1,11 @@ +# ClearPlaylistContentsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `errors` | [errors.ClearPlaylistContentsErrors](../../models/errors/clearplaylistcontentserrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/createplaylisterrors.md b/docs/models/errors/createplaylisterrors.md new file mode 100644 index 00000000..e7767800 --- /dev/null +++ b/docs/models/errors/createplaylisterrors.md @@ -0,0 +1,10 @@ +# CreatePlaylistErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/createplaylistresponsebody.md b/docs/models/errors/createplaylistresponsebody.md new file mode 100644 index 00000000..6a4133c9 --- /dev/null +++ b/docs/models/errors/createplaylistresponsebody.md @@ -0,0 +1,11 @@ +# CreatePlaylistResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `errors` | [errors.CreatePlaylistErrors](../../models/errors/createplaylisterrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/deletelibraryerrors.md b/docs/models/errors/deletelibraryerrors.md new file mode 100644 index 00000000..3daf65a3 --- /dev/null +++ b/docs/models/errors/deletelibraryerrors.md @@ -0,0 +1,10 @@ +# DeleteLibraryErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/deletelibraryresponsebody.md b/docs/models/errors/deletelibraryresponsebody.md new file mode 100644 index 00000000..f81c9609 --- /dev/null +++ b/docs/models/errors/deletelibraryresponsebody.md @@ -0,0 +1,11 @@ +# DeleteLibraryResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `errors` | [errors.DeleteLibraryErrors](../../models/errors/deletelibraryerrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/deleteplaylisterrors.md b/docs/models/errors/deleteplaylisterrors.md new file mode 100644 index 00000000..0faea45c --- /dev/null +++ b/docs/models/errors/deleteplaylisterrors.md @@ -0,0 +1,10 @@ +# DeletePlaylistErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/deleteplaylistresponsebody.md b/docs/models/errors/deleteplaylistresponsebody.md new file mode 100644 index 00000000..8323966b --- /dev/null +++ b/docs/models/errors/deleteplaylistresponsebody.md @@ -0,0 +1,11 @@ +# DeletePlaylistResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `errors` | [errors.DeletePlaylistErrors](../../models/errors/deleteplaylisterrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/enablepapertrailerrors.md b/docs/models/errors/enablepapertrailerrors.md new file mode 100644 index 00000000..1f2b81ac --- /dev/null +++ b/docs/models/errors/enablepapertrailerrors.md @@ -0,0 +1,10 @@ +# EnablePaperTrailErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/enablepapertrailresponsebody.md b/docs/models/errors/enablepapertrailresponsebody.md new file mode 100644 index 00000000..692c3dd9 --- /dev/null +++ b/docs/models/errors/enablepapertrailresponsebody.md @@ -0,0 +1,11 @@ +# EnablePaperTrailResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `errors` | [errors.EnablePaperTrailErrors](../../models/errors/enablepapertrailerrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/errors.md b/docs/models/errors/errors.md new file mode 100644 index 00000000..bc6f5946 --- /dev/null +++ b/docs/models/errors/errors.md @@ -0,0 +1,10 @@ +# Errors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getavailableclientserrors.md b/docs/models/errors/getavailableclientserrors.md new file mode 100644 index 00000000..815e8daa --- /dev/null +++ b/docs/models/errors/getavailableclientserrors.md @@ -0,0 +1,10 @@ +# GetAvailableClientsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getavailableclientsresponsebody.md b/docs/models/errors/getavailableclientsresponsebody.md new file mode 100644 index 00000000..94110ec3 --- /dev/null +++ b/docs/models/errors/getavailableclientsresponsebody.md @@ -0,0 +1,11 @@ +# GetAvailableClientsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `errors` | [errors.GetAvailableClientsErrors](../../models/errors/getavailableclientserrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getbutlertaskserrors.md b/docs/models/errors/getbutlertaskserrors.md new file mode 100644 index 00000000..59f0c6ce --- /dev/null +++ b/docs/models/errors/getbutlertaskserrors.md @@ -0,0 +1,10 @@ +# GetButlerTasksErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getbutlertasksresponsebody.md b/docs/models/errors/getbutlertasksresponsebody.md new file mode 100644 index 00000000..d8e818e9 --- /dev/null +++ b/docs/models/errors/getbutlertasksresponsebody.md @@ -0,0 +1,11 @@ +# GetButlerTasksResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `errors` | [errors.GetButlerTasksErrors](../../models/errors/getbutlertaskserrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getcommonlibraryitemserrors.md b/docs/models/errors/getcommonlibraryitemserrors.md new file mode 100644 index 00000000..119eb7da --- /dev/null +++ b/docs/models/errors/getcommonlibraryitemserrors.md @@ -0,0 +1,10 @@ +# GetCommonLibraryItemsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getcommonlibraryitemsresponsebody.md b/docs/models/errors/getcommonlibraryitemsresponsebody.md new file mode 100644 index 00000000..ddb6e7a3 --- /dev/null +++ b/docs/models/errors/getcommonlibraryitemsresponsebody.md @@ -0,0 +1,11 @@ +# GetCommonLibraryItemsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `errors` | [errors.GetCommonLibraryItemsErrors](../../models/errors/getcommonlibraryitemserrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getdeviceserrors.md b/docs/models/errors/getdeviceserrors.md new file mode 100644 index 00000000..ed05754f --- /dev/null +++ b/docs/models/errors/getdeviceserrors.md @@ -0,0 +1,10 @@ +# GetDevicesErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getdevicesresponsebody.md b/docs/models/errors/getdevicesresponsebody.md new file mode 100644 index 00000000..784e08a3 --- /dev/null +++ b/docs/models/errors/getdevicesresponsebody.md @@ -0,0 +1,11 @@ +# GetDevicesResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `errors` | [errors.GetDevicesErrors](../../models/errors/getdeviceserrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getfilehasherrors.md b/docs/models/errors/getfilehasherrors.md new file mode 100644 index 00000000..6623ae4b --- /dev/null +++ b/docs/models/errors/getfilehasherrors.md @@ -0,0 +1,10 @@ +# GetFileHashErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getfilehashresponsebody.md b/docs/models/errors/getfilehashresponsebody.md new file mode 100644 index 00000000..7ed72bae --- /dev/null +++ b/docs/models/errors/getfilehashresponsebody.md @@ -0,0 +1,11 @@ +# GetFileHashResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `errors` | [errors.GetFileHashErrors](../../models/errors/getfilehasherrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getglobalhubserrors.md b/docs/models/errors/getglobalhubserrors.md new file mode 100644 index 00000000..39069450 --- /dev/null +++ b/docs/models/errors/getglobalhubserrors.md @@ -0,0 +1,10 @@ +# GetGlobalHubsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getglobalhubsresponsebody.md b/docs/models/errors/getglobalhubsresponsebody.md new file mode 100644 index 00000000..ae19d234 --- /dev/null +++ b/docs/models/errors/getglobalhubsresponsebody.md @@ -0,0 +1,11 @@ +# GetGlobalHubsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `errors` | [errors.GetGlobalHubsErrors](../../models/errors/getglobalhubserrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getlatestlibraryitemserrors.md b/docs/models/errors/getlatestlibraryitemserrors.md new file mode 100644 index 00000000..3cc9bda9 --- /dev/null +++ b/docs/models/errors/getlatestlibraryitemserrors.md @@ -0,0 +1,10 @@ +# GetLatestLibraryItemsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getlatestlibraryitemsresponsebody.md b/docs/models/errors/getlatestlibraryitemsresponsebody.md new file mode 100644 index 00000000..67897155 --- /dev/null +++ b/docs/models/errors/getlatestlibraryitemsresponsebody.md @@ -0,0 +1,11 @@ +# GetLatestLibraryItemsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `errors` | [errors.GetLatestLibraryItemsErrors](../../models/errors/getlatestlibraryitemserrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getlibrarieserrors.md b/docs/models/errors/getlibrarieserrors.md new file mode 100644 index 00000000..185f02c9 --- /dev/null +++ b/docs/models/errors/getlibrarieserrors.md @@ -0,0 +1,10 @@ +# GetLibrariesErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getlibrariesresponsebody.md b/docs/models/errors/getlibrariesresponsebody.md new file mode 100644 index 00000000..80464340 --- /dev/null +++ b/docs/models/errors/getlibrariesresponsebody.md @@ -0,0 +1,11 @@ +# GetLibrariesResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `errors` | [errors.GetLibrariesErrors](../../models/errors/getlibrarieserrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getlibraryerrors.md b/docs/models/errors/getlibraryerrors.md new file mode 100644 index 00000000..d4205438 --- /dev/null +++ b/docs/models/errors/getlibraryerrors.md @@ -0,0 +1,10 @@ +# GetLibraryErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getlibraryhubserrors.md b/docs/models/errors/getlibraryhubserrors.md new file mode 100644 index 00000000..086c30cb --- /dev/null +++ b/docs/models/errors/getlibraryhubserrors.md @@ -0,0 +1,10 @@ +# GetLibraryHubsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getlibraryhubsresponsebody.md b/docs/models/errors/getlibraryhubsresponsebody.md new file mode 100644 index 00000000..dc7b0455 --- /dev/null +++ b/docs/models/errors/getlibraryhubsresponsebody.md @@ -0,0 +1,11 @@ +# GetLibraryHubsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `errors` | [errors.GetLibraryHubsErrors](../../models/errors/getlibraryhubserrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getlibraryitemserrors.md b/docs/models/errors/getlibraryitemserrors.md new file mode 100644 index 00000000..55563efd --- /dev/null +++ b/docs/models/errors/getlibraryitemserrors.md @@ -0,0 +1,10 @@ +# GetLibraryItemsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getlibraryitemsresponsebody.md b/docs/models/errors/getlibraryitemsresponsebody.md new file mode 100644 index 00000000..79ec0eba --- /dev/null +++ b/docs/models/errors/getlibraryitemsresponsebody.md @@ -0,0 +1,11 @@ +# GetLibraryItemsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `errors` | [errors.GetLibraryItemsErrors](../../models/errors/getlibraryitemserrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getlibraryresponsebody.md b/docs/models/errors/getlibraryresponsebody.md new file mode 100644 index 00000000..625d814d --- /dev/null +++ b/docs/models/errors/getlibraryresponsebody.md @@ -0,0 +1,11 @@ +# GetLibraryResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `errors` | [errors.GetLibraryErrors](../../models/errors/getlibraryerrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getmetadatachildrenerrors.md b/docs/models/errors/getmetadatachildrenerrors.md new file mode 100644 index 00000000..46532a10 --- /dev/null +++ b/docs/models/errors/getmetadatachildrenerrors.md @@ -0,0 +1,10 @@ +# GetMetadataChildrenErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getmetadatachildrenresponsebody.md b/docs/models/errors/getmetadatachildrenresponsebody.md new file mode 100644 index 00000000..9327e988 --- /dev/null +++ b/docs/models/errors/getmetadatachildrenresponsebody.md @@ -0,0 +1,11 @@ +# GetMetadataChildrenResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `errors` | [errors.GetMetadataChildrenErrors](../../models/errors/getmetadatachildrenerrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getmetadataerrors.md b/docs/models/errors/getmetadataerrors.md new file mode 100644 index 00000000..566d6b35 --- /dev/null +++ b/docs/models/errors/getmetadataerrors.md @@ -0,0 +1,10 @@ +# GetMetadataErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getmetadataresponsebody.md b/docs/models/errors/getmetadataresponsebody.md new file mode 100644 index 00000000..224b377e --- /dev/null +++ b/docs/models/errors/getmetadataresponsebody.md @@ -0,0 +1,11 @@ +# GetMetadataResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `errors` | [errors.GetMetadataErrors](../../models/errors/getmetadataerrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getmyplexaccounterrors.md b/docs/models/errors/getmyplexaccounterrors.md new file mode 100644 index 00000000..2a631363 --- /dev/null +++ b/docs/models/errors/getmyplexaccounterrors.md @@ -0,0 +1,10 @@ +# GetMyPlexAccountErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getmyplexaccountresponsebody.md b/docs/models/errors/getmyplexaccountresponsebody.md new file mode 100644 index 00000000..b1425298 --- /dev/null +++ b/docs/models/errors/getmyplexaccountresponsebody.md @@ -0,0 +1,11 @@ +# GetMyPlexAccountResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `errors` | [errors.GetMyPlexAccountErrors](../../models/errors/getmyplexaccounterrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getondeckerrors.md b/docs/models/errors/getondeckerrors.md new file mode 100644 index 00000000..d6e1519e --- /dev/null +++ b/docs/models/errors/getondeckerrors.md @@ -0,0 +1,10 @@ +# GetOnDeckErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getondeckresponsebody.md b/docs/models/errors/getondeckresponsebody.md new file mode 100644 index 00000000..25b610f2 --- /dev/null +++ b/docs/models/errors/getondeckresponsebody.md @@ -0,0 +1,11 @@ +# GetOnDeckResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `errors` | [errors.GetOnDeckErrors](../../models/errors/getondeckerrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getplaylistcontentserrors.md b/docs/models/errors/getplaylistcontentserrors.md new file mode 100644 index 00000000..73363b9e --- /dev/null +++ b/docs/models/errors/getplaylistcontentserrors.md @@ -0,0 +1,10 @@ +# GetPlaylistContentsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getplaylistcontentsresponsebody.md b/docs/models/errors/getplaylistcontentsresponsebody.md new file mode 100644 index 00000000..dc445ff9 --- /dev/null +++ b/docs/models/errors/getplaylistcontentsresponsebody.md @@ -0,0 +1,11 @@ +# GetPlaylistContentsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `errors` | [errors.GetPlaylistContentsErrors](../../models/errors/getplaylistcontentserrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getplaylisterrors.md b/docs/models/errors/getplaylisterrors.md new file mode 100644 index 00000000..b0cd8162 --- /dev/null +++ b/docs/models/errors/getplaylisterrors.md @@ -0,0 +1,10 @@ +# GetPlaylistErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getplaylistresponsebody.md b/docs/models/errors/getplaylistresponsebody.md new file mode 100644 index 00000000..1e05eb92 --- /dev/null +++ b/docs/models/errors/getplaylistresponsebody.md @@ -0,0 +1,11 @@ +# GetPlaylistResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `errors` | [errors.GetPlaylistErrors](../../models/errors/getplaylisterrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getplaylistserrors.md b/docs/models/errors/getplaylistserrors.md new file mode 100644 index 00000000..01224be6 --- /dev/null +++ b/docs/models/errors/getplaylistserrors.md @@ -0,0 +1,10 @@ +# GetPlaylistsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getplaylistsresponsebody.md b/docs/models/errors/getplaylistsresponsebody.md new file mode 100644 index 00000000..d8295df5 --- /dev/null +++ b/docs/models/errors/getplaylistsresponsebody.md @@ -0,0 +1,11 @@ +# GetPlaylistsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `errors` | [errors.GetPlaylistsErrors](../../models/errors/getplaylistserrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getrecentlyaddederrors.md b/docs/models/errors/getrecentlyaddederrors.md new file mode 100644 index 00000000..72e8d4ef --- /dev/null +++ b/docs/models/errors/getrecentlyaddederrors.md @@ -0,0 +1,10 @@ +# GetRecentlyAddedErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getrecentlyaddedresponsebody.md b/docs/models/errors/getrecentlyaddedresponsebody.md new file mode 100644 index 00000000..85113216 --- /dev/null +++ b/docs/models/errors/getrecentlyaddedresponsebody.md @@ -0,0 +1,11 @@ +# GetRecentlyAddedResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `errors` | [errors.GetRecentlyAddedErrors](../../models/errors/getrecentlyaddederrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getresizedphotoerrors.md b/docs/models/errors/getresizedphotoerrors.md new file mode 100644 index 00000000..d4b7bbaf --- /dev/null +++ b/docs/models/errors/getresizedphotoerrors.md @@ -0,0 +1,10 @@ +# GetResizedPhotoErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getresizedphotoresponsebody.md b/docs/models/errors/getresizedphotoresponsebody.md new file mode 100644 index 00000000..3ee6662a --- /dev/null +++ b/docs/models/errors/getresizedphotoresponsebody.md @@ -0,0 +1,11 @@ +# GetResizedPhotoResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `errors` | [errors.GetResizedPhotoErrors](../../models/errors/getresizedphotoerrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getsearchresultserrors.md b/docs/models/errors/getsearchresultserrors.md new file mode 100644 index 00000000..cc4bc0ed --- /dev/null +++ b/docs/models/errors/getsearchresultserrors.md @@ -0,0 +1,10 @@ +# GetSearchResultsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getsearchresultsresponsebody.md b/docs/models/errors/getsearchresultsresponsebody.md new file mode 100644 index 00000000..cd5b47c8 --- /dev/null +++ b/docs/models/errors/getsearchresultsresponsebody.md @@ -0,0 +1,11 @@ +# GetSearchResultsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `errors` | [errors.GetSearchResultsErrors](../../models/errors/getsearchresultserrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getserveractivitieserrors.md b/docs/models/errors/getserveractivitieserrors.md new file mode 100644 index 00000000..c081aa81 --- /dev/null +++ b/docs/models/errors/getserveractivitieserrors.md @@ -0,0 +1,10 @@ +# GetServerActivitiesErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getserveractivitiesresponsebody.md b/docs/models/errors/getserveractivitiesresponsebody.md new file mode 100644 index 00000000..e1b1e69d --- /dev/null +++ b/docs/models/errors/getserveractivitiesresponsebody.md @@ -0,0 +1,11 @@ +# GetServerActivitiesResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `errors` | [errors.GetServerActivitiesErrors](../../models/errors/getserveractivitieserrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getservercapabilitiesresponsebody.md b/docs/models/errors/getservercapabilitiesresponsebody.md new file mode 100644 index 00000000..bce99759 --- /dev/null +++ b/docs/models/errors/getservercapabilitiesresponsebody.md @@ -0,0 +1,11 @@ +# GetServerCapabilitiesResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `errors` | [errors.Errors](../../models/errors/errors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getserveridentityerrors.md b/docs/models/errors/getserveridentityerrors.md new file mode 100644 index 00000000..e5f6bf74 --- /dev/null +++ b/docs/models/errors/getserveridentityerrors.md @@ -0,0 +1,10 @@ +# GetServerIdentityErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getserveridentityresponsebody.md b/docs/models/errors/getserveridentityresponsebody.md new file mode 100644 index 00000000..d28842e7 --- /dev/null +++ b/docs/models/errors/getserveridentityresponsebody.md @@ -0,0 +1,11 @@ +# GetServerIdentityResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `errors` | [errors.GetServerIdentityErrors](../../models/errors/getserveridentityerrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getserverlisterrors.md b/docs/models/errors/getserverlisterrors.md new file mode 100644 index 00000000..837e7558 --- /dev/null +++ b/docs/models/errors/getserverlisterrors.md @@ -0,0 +1,10 @@ +# GetServerListErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getserverlistresponsebody.md b/docs/models/errors/getserverlistresponsebody.md new file mode 100644 index 00000000..ef354692 --- /dev/null +++ b/docs/models/errors/getserverlistresponsebody.md @@ -0,0 +1,11 @@ +# GetServerListResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `errors` | [errors.GetServerListErrors](../../models/errors/getserverlisterrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getserverpreferenceserrors.md b/docs/models/errors/getserverpreferenceserrors.md new file mode 100644 index 00000000..bdd82a28 --- /dev/null +++ b/docs/models/errors/getserverpreferenceserrors.md @@ -0,0 +1,10 @@ +# GetServerPreferencesErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getserverpreferencesresponsebody.md b/docs/models/errors/getserverpreferencesresponsebody.md new file mode 100644 index 00000000..9cd14716 --- /dev/null +++ b/docs/models/errors/getserverpreferencesresponsebody.md @@ -0,0 +1,11 @@ +# GetServerPreferencesResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `errors` | [errors.GetServerPreferencesErrors](../../models/errors/getserverpreferenceserrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getsessionhistoryerrors.md b/docs/models/errors/getsessionhistoryerrors.md new file mode 100644 index 00000000..8a49ec1e --- /dev/null +++ b/docs/models/errors/getsessionhistoryerrors.md @@ -0,0 +1,10 @@ +# GetSessionHistoryErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getsessionhistoryresponsebody.md b/docs/models/errors/getsessionhistoryresponsebody.md new file mode 100644 index 00000000..acf90287 --- /dev/null +++ b/docs/models/errors/getsessionhistoryresponsebody.md @@ -0,0 +1,11 @@ +# GetSessionHistoryResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `errors` | [errors.GetSessionHistoryErrors](../../models/errors/getsessionhistoryerrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getsessionserrors.md b/docs/models/errors/getsessionserrors.md new file mode 100644 index 00000000..bc4f1281 --- /dev/null +++ b/docs/models/errors/getsessionserrors.md @@ -0,0 +1,10 @@ +# GetSessionsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getsessionsresponsebody.md b/docs/models/errors/getsessionsresponsebody.md new file mode 100644 index 00000000..a72f8b86 --- /dev/null +++ b/docs/models/errors/getsessionsresponsebody.md @@ -0,0 +1,11 @@ +# GetSessionsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `errors` | [errors.GetSessionsErrors](../../models/errors/getsessionserrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getsourceconnectioninformationerrors.md b/docs/models/errors/getsourceconnectioninformationerrors.md new file mode 100644 index 00000000..b605fd63 --- /dev/null +++ b/docs/models/errors/getsourceconnectioninformationerrors.md @@ -0,0 +1,10 @@ +# GetSourceConnectionInformationErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getsourceconnectioninformationresponsebody.md b/docs/models/errors/getsourceconnectioninformationresponsebody.md new file mode 100644 index 00000000..6d0eda28 --- /dev/null +++ b/docs/models/errors/getsourceconnectioninformationresponsebody.md @@ -0,0 +1,11 @@ +# GetSourceConnectionInformationResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `errors` | [errors.GetSourceConnectionInformationErrors](../../models/errors/getsourceconnectioninformationerrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/gettimelineerrors.md b/docs/models/errors/gettimelineerrors.md new file mode 100644 index 00000000..dae4e113 --- /dev/null +++ b/docs/models/errors/gettimelineerrors.md @@ -0,0 +1,10 @@ +# GetTimelineErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/gettimelineresponsebody.md b/docs/models/errors/gettimelineresponsebody.md new file mode 100644 index 00000000..9ef44f0f --- /dev/null +++ b/docs/models/errors/gettimelineresponsebody.md @@ -0,0 +1,11 @@ +# GetTimelineResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `errors` | [errors.GetTimelineErrors](../../models/errors/gettimelineerrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/gettranscodesessionserrors.md b/docs/models/errors/gettranscodesessionserrors.md new file mode 100644 index 00000000..f26ecd1b --- /dev/null +++ b/docs/models/errors/gettranscodesessionserrors.md @@ -0,0 +1,10 @@ +# GetTranscodeSessionsErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/gettranscodesessionsresponsebody.md b/docs/models/errors/gettranscodesessionsresponsebody.md new file mode 100644 index 00000000..365643d2 --- /dev/null +++ b/docs/models/errors/gettranscodesessionsresponsebody.md @@ -0,0 +1,11 @@ +# GetTranscodeSessionsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `errors` | [errors.GetTranscodeSessionsErrors](../../models/errors/gettranscodesessionserrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/gettransienttokenerrors.md b/docs/models/errors/gettransienttokenerrors.md new file mode 100644 index 00000000..c5be21cb --- /dev/null +++ b/docs/models/errors/gettransienttokenerrors.md @@ -0,0 +1,10 @@ +# GetTransientTokenErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/gettransienttokenresponsebody.md b/docs/models/errors/gettransienttokenresponsebody.md new file mode 100644 index 00000000..2b760a82 --- /dev/null +++ b/docs/models/errors/gettransienttokenresponsebody.md @@ -0,0 +1,11 @@ +# GetTransientTokenResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `errors` | [errors.GetTransientTokenErrors](../../models/errors/gettransienttokenerrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/getupdatestatuserrors.md b/docs/models/errors/getupdatestatuserrors.md new file mode 100644 index 00000000..97105c1b --- /dev/null +++ b/docs/models/errors/getupdatestatuserrors.md @@ -0,0 +1,10 @@ +# GetUpdateStatusErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/getupdatestatusresponsebody.md b/docs/models/errors/getupdatestatusresponsebody.md new file mode 100644 index 00000000..77493da9 --- /dev/null +++ b/docs/models/errors/getupdatestatusresponsebody.md @@ -0,0 +1,11 @@ +# GetUpdateStatusResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `errors` | [errors.GetUpdateStatusErrors](../../models/errors/getupdatestatuserrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/loglineerrors.md b/docs/models/errors/loglineerrors.md new file mode 100644 index 00000000..7c095b3a --- /dev/null +++ b/docs/models/errors/loglineerrors.md @@ -0,0 +1,10 @@ +# LogLineErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/loglineresponsebody.md b/docs/models/errors/loglineresponsebody.md new file mode 100644 index 00000000..b9f4ec58 --- /dev/null +++ b/docs/models/errors/loglineresponsebody.md @@ -0,0 +1,11 @@ +# LogLineResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `errors` | [errors.LogLineErrors](../../models/errors/loglineerrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/logmultilineerrors.md b/docs/models/errors/logmultilineerrors.md new file mode 100644 index 00000000..85bbecde --- /dev/null +++ b/docs/models/errors/logmultilineerrors.md @@ -0,0 +1,10 @@ +# LogMultiLineErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/logmultilineresponsebody.md b/docs/models/errors/logmultilineresponsebody.md new file mode 100644 index 00000000..3cde64f5 --- /dev/null +++ b/docs/models/errors/logmultilineresponsebody.md @@ -0,0 +1,11 @@ +# LogMultiLineResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `errors` | [errors.LogMultiLineErrors](../../models/errors/logmultilineerrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/markplayederrors.md b/docs/models/errors/markplayederrors.md new file mode 100644 index 00000000..b1916a24 --- /dev/null +++ b/docs/models/errors/markplayederrors.md @@ -0,0 +1,10 @@ +# MarkPlayedErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/markplayedresponsebody.md b/docs/models/errors/markplayedresponsebody.md new file mode 100644 index 00000000..f7af47de --- /dev/null +++ b/docs/models/errors/markplayedresponsebody.md @@ -0,0 +1,11 @@ +# MarkPlayedResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `errors` | [errors.MarkPlayedErrors](../../models/errors/markplayederrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/markunplayederrors.md b/docs/models/errors/markunplayederrors.md new file mode 100644 index 00000000..4ffd3da1 --- /dev/null +++ b/docs/models/errors/markunplayederrors.md @@ -0,0 +1,10 @@ +# MarkUnplayedErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/markunplayedresponsebody.md b/docs/models/errors/markunplayedresponsebody.md new file mode 100644 index 00000000..8a50edff --- /dev/null +++ b/docs/models/errors/markunplayedresponsebody.md @@ -0,0 +1,11 @@ +# MarkUnplayedResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `errors` | [errors.MarkUnplayedErrors](../../models/errors/markunplayederrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/performsearcherrors.md b/docs/models/errors/performsearcherrors.md new file mode 100644 index 00000000..8b88ac3e --- /dev/null +++ b/docs/models/errors/performsearcherrors.md @@ -0,0 +1,10 @@ +# PerformSearchErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/performsearchresponsebody.md b/docs/models/errors/performsearchresponsebody.md new file mode 100644 index 00000000..11ce94ab --- /dev/null +++ b/docs/models/errors/performsearchresponsebody.md @@ -0,0 +1,11 @@ +# PerformSearchResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `errors` | [errors.PerformSearchErrors](../../models/errors/performsearcherrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/performvoicesearcherrors.md b/docs/models/errors/performvoicesearcherrors.md new file mode 100644 index 00000000..dd048049 --- /dev/null +++ b/docs/models/errors/performvoicesearcherrors.md @@ -0,0 +1,10 @@ +# PerformVoiceSearchErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/performvoicesearchresponsebody.md b/docs/models/errors/performvoicesearchresponsebody.md new file mode 100644 index 00000000..e2940088 --- /dev/null +++ b/docs/models/errors/performvoicesearchresponsebody.md @@ -0,0 +1,11 @@ +# PerformVoiceSearchResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `errors` | [errors.PerformVoiceSearchErrors](../../models/errors/performvoicesearcherrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/refreshlibraryerrors.md b/docs/models/errors/refreshlibraryerrors.md new file mode 100644 index 00000000..8d22faed --- /dev/null +++ b/docs/models/errors/refreshlibraryerrors.md @@ -0,0 +1,10 @@ +# RefreshLibraryErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/refreshlibraryresponsebody.md b/docs/models/errors/refreshlibraryresponsebody.md new file mode 100644 index 00000000..36cc71e9 --- /dev/null +++ b/docs/models/errors/refreshlibraryresponsebody.md @@ -0,0 +1,11 @@ +# RefreshLibraryResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `errors` | [errors.RefreshLibraryErrors](../../models/errors/refreshlibraryerrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/startalltaskserrors.md b/docs/models/errors/startalltaskserrors.md new file mode 100644 index 00000000..d08347c6 --- /dev/null +++ b/docs/models/errors/startalltaskserrors.md @@ -0,0 +1,10 @@ +# StartAllTasksErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/startalltasksresponsebody.md b/docs/models/errors/startalltasksresponsebody.md new file mode 100644 index 00000000..fce770da --- /dev/null +++ b/docs/models/errors/startalltasksresponsebody.md @@ -0,0 +1,11 @@ +# StartAllTasksResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `errors` | [errors.StartAllTasksErrors](../../models/errors/startalltaskserrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/starttaskerrors.md b/docs/models/errors/starttaskerrors.md new file mode 100644 index 00000000..4a7da6fa --- /dev/null +++ b/docs/models/errors/starttaskerrors.md @@ -0,0 +1,10 @@ +# StartTaskErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/starttaskresponsebody.md b/docs/models/errors/starttaskresponsebody.md new file mode 100644 index 00000000..7c0b27e5 --- /dev/null +++ b/docs/models/errors/starttaskresponsebody.md @@ -0,0 +1,11 @@ +# StartTaskResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `errors` | [errors.StartTaskErrors](../../models/errors/starttaskerrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/startuniversaltranscodeerrors.md b/docs/models/errors/startuniversaltranscodeerrors.md new file mode 100644 index 00000000..84f7ff7c --- /dev/null +++ b/docs/models/errors/startuniversaltranscodeerrors.md @@ -0,0 +1,10 @@ +# StartUniversalTranscodeErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/startuniversaltranscoderesponsebody.md b/docs/models/errors/startuniversaltranscoderesponsebody.md new file mode 100644 index 00000000..77dc6a17 --- /dev/null +++ b/docs/models/errors/startuniversaltranscoderesponsebody.md @@ -0,0 +1,11 @@ +# StartUniversalTranscodeResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `errors` | [errors.StartUniversalTranscodeErrors](../../models/errors/startuniversaltranscodeerrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/stopalltaskserrors.md b/docs/models/errors/stopalltaskserrors.md new file mode 100644 index 00000000..7fc89f50 --- /dev/null +++ b/docs/models/errors/stopalltaskserrors.md @@ -0,0 +1,10 @@ +# StopAllTasksErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/stopalltasksresponsebody.md b/docs/models/errors/stopalltasksresponsebody.md new file mode 100644 index 00000000..5e2fd7f8 --- /dev/null +++ b/docs/models/errors/stopalltasksresponsebody.md @@ -0,0 +1,11 @@ +# StopAllTasksResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `errors` | [errors.StopAllTasksErrors](../../models/errors/stopalltaskserrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/stoptaskerrors.md b/docs/models/errors/stoptaskerrors.md new file mode 100644 index 00000000..dc4cf4c1 --- /dev/null +++ b/docs/models/errors/stoptaskerrors.md @@ -0,0 +1,10 @@ +# StopTaskErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/stoptaskresponsebody.md b/docs/models/errors/stoptaskresponsebody.md new file mode 100644 index 00000000..7bbea4c0 --- /dev/null +++ b/docs/models/errors/stoptaskresponsebody.md @@ -0,0 +1,11 @@ +# StopTaskResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `errors` | [errors.StopTaskErrors](../../models/errors/stoptaskerrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/stoptranscodesessionerrors.md b/docs/models/errors/stoptranscodesessionerrors.md new file mode 100644 index 00000000..55e8388f --- /dev/null +++ b/docs/models/errors/stoptranscodesessionerrors.md @@ -0,0 +1,10 @@ +# StopTranscodeSessionErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/stoptranscodesessionresponsebody.md b/docs/models/errors/stoptranscodesessionresponsebody.md new file mode 100644 index 00000000..a5936b64 --- /dev/null +++ b/docs/models/errors/stoptranscodesessionresponsebody.md @@ -0,0 +1,11 @@ +# StopTranscodeSessionResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `errors` | [errors.StopTranscodeSessionErrors](../../models/errors/stoptranscodesessionerrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/updateplaylisterrors.md b/docs/models/errors/updateplaylisterrors.md new file mode 100644 index 00000000..4cafaf00 --- /dev/null +++ b/docs/models/errors/updateplaylisterrors.md @@ -0,0 +1,10 @@ +# UpdatePlaylistErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/updateplaylistresponsebody.md b/docs/models/errors/updateplaylistresponsebody.md new file mode 100644 index 00000000..d434e091 --- /dev/null +++ b/docs/models/errors/updateplaylistresponsebody.md @@ -0,0 +1,11 @@ +# UpdatePlaylistResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `errors` | [errors.UpdatePlaylistErrors](../../models/errors/updateplaylisterrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/updateplayprogresserrors.md b/docs/models/errors/updateplayprogresserrors.md new file mode 100644 index 00000000..b5e88264 --- /dev/null +++ b/docs/models/errors/updateplayprogresserrors.md @@ -0,0 +1,10 @@ +# UpdatePlayProgressErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/updateplayprogressresponsebody.md b/docs/models/errors/updateplayprogressresponsebody.md new file mode 100644 index 00000000..73fe7077 --- /dev/null +++ b/docs/models/errors/updateplayprogressresponsebody.md @@ -0,0 +1,11 @@ +# UpdatePlayProgressResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `errors` | [errors.UpdatePlayProgressErrors](../../models/errors/updateplayprogresserrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/uploadplaylisterrors.md b/docs/models/errors/uploadplaylisterrors.md new file mode 100644 index 00000000..8ccdf353 --- /dev/null +++ b/docs/models/errors/uploadplaylisterrors.md @@ -0,0 +1,10 @@ +# UploadPlaylistErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/uploadplaylistresponsebody.md b/docs/models/errors/uploadplaylistresponsebody.md new file mode 100644 index 00000000..04ebc68b --- /dev/null +++ b/docs/models/errors/uploadplaylistresponsebody.md @@ -0,0 +1,11 @@ +# UploadPlaylistResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `errors` | [errors.UploadPlaylistErrors](../../models/errors/uploadplaylisterrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/activity.md b/docs/models/operations/activity.md new file mode 100644 index 00000000..f61b1fac --- /dev/null +++ b/docs/models/operations/activity.md @@ -0,0 +1,15 @@ +# Activity + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `uuid` | *string* | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | N/A | +| `cancellable` | *boolean* | :heavy_minus_sign: | N/A | +| `userID` | *number* | :heavy_minus_sign: | N/A | +| `title` | *string* | :heavy_minus_sign: | N/A | +| `subtitle` | *string* | :heavy_minus_sign: | N/A | +| `progress` | *number* | :heavy_minus_sign: | N/A | +| `context` | [operations.Context](../../models/operations/context.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/addplaylistcontentsrequest.md b/docs/models/operations/addplaylistcontentsrequest.md new file mode 100644 index 00000000..4b2fc209 --- /dev/null +++ b/docs/models/operations/addplaylistcontentsrequest.md @@ -0,0 +1,10 @@ +# AddPlaylistContentsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `playlistID` | *number* | :heavy_check_mark: | the ID of the playlist | | +| `uri` | *string* | :heavy_check_mark: | the content URI for the playlist | library://.. | +| `playQueueID` | *number* | :heavy_check_mark: | the play queue to add to a playlist | 123 | \ No newline at end of file diff --git a/docs/models/operations/addplaylistcontentsresponse.md b/docs/models/operations/addplaylistcontentsresponse.md new file mode 100644 index 00000000..255b5335 --- /dev/null +++ b/docs/models/operations/addplaylistcontentsresponse.md @@ -0,0 +1,10 @@ +# AddPlaylistContentsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/applyupdatesrequest.md b/docs/models/operations/applyupdatesrequest.md new file mode 100644 index 00000000..6a153460 --- /dev/null +++ b/docs/models/operations/applyupdatesrequest.md @@ -0,0 +1,9 @@ +# ApplyUpdatesRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `tonight` | [operations.Tonight](../../models/operations/tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install | +| `skip` | [operations.Skip](../../models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The entry for this version will have the `state` set to `skipped`. | \ No newline at end of file diff --git a/docs/models/operations/applyupdatesresponse.md b/docs/models/operations/applyupdatesresponse.md new file mode 100644 index 00000000..767b1dc9 --- /dev/null +++ b/docs/models/operations/applyupdatesresponse.md @@ -0,0 +1,10 @@ +# ApplyUpdatesResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/butlertask.md b/docs/models/operations/butlertask.md new file mode 100644 index 00000000..2148949a --- /dev/null +++ b/docs/models/operations/butlertask.md @@ -0,0 +1,13 @@ +# ButlerTask + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | N/A | BackupDatabase | +| `interval` | *number* | :heavy_minus_sign: | N/A | 3 | +| `scheduleRandomized` | *boolean* | :heavy_minus_sign: | N/A | | +| `enabled` | *boolean* | :heavy_minus_sign: | N/A | | +| `title` | *string* | :heavy_minus_sign: | N/A | Backup Database | +| `description` | *string* | :heavy_minus_sign: | N/A | Create a backup copy of the server's database in the configured backup directory | \ No newline at end of file diff --git a/docs/models/operations/butlertasks.md b/docs/models/operations/butlertasks.md new file mode 100644 index 00000000..41e1bffb --- /dev/null +++ b/docs/models/operations/butlertasks.md @@ -0,0 +1,8 @@ +# ButlerTasks + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `butlerTask` | [operations.ButlerTask](../../models/operations/butlertask.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/cancelserveractivitiesrequest.md b/docs/models/operations/cancelserveractivitiesrequest.md new file mode 100644 index 00000000..2e1518f1 --- /dev/null +++ b/docs/models/operations/cancelserveractivitiesrequest.md @@ -0,0 +1,8 @@ +# CancelServerActivitiesRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `activityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. | \ No newline at end of file diff --git a/docs/models/operations/cancelserveractivitiesresponse.md b/docs/models/operations/cancelserveractivitiesresponse.md new file mode 100644 index 00000000..0342fe53 --- /dev/null +++ b/docs/models/operations/cancelserveractivitiesresponse.md @@ -0,0 +1,10 @@ +# CancelServerActivitiesResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/checkforupdatesrequest.md b/docs/models/operations/checkforupdatesrequest.md new file mode 100644 index 00000000..9def527f --- /dev/null +++ b/docs/models/operations/checkforupdatesrequest.md @@ -0,0 +1,8 @@ +# CheckForUpdatesRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `download` | [operations.Download](../../models/operations/download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. | \ No newline at end of file diff --git a/docs/models/operations/checkforupdatesresponse.md b/docs/models/operations/checkforupdatesresponse.md new file mode 100644 index 00000000..99819de9 --- /dev/null +++ b/docs/models/operations/checkforupdatesresponse.md @@ -0,0 +1,10 @@ +# CheckForUpdatesResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/clearplaylistcontentsrequest.md b/docs/models/operations/clearplaylistcontentsrequest.md new file mode 100644 index 00000000..874331ec --- /dev/null +++ b/docs/models/operations/clearplaylistcontentsrequest.md @@ -0,0 +1,8 @@ +# ClearPlaylistContentsRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `playlistID` | *number* | :heavy_check_mark: | the ID of the playlist | \ No newline at end of file diff --git a/docs/models/operations/clearplaylistcontentsresponse.md b/docs/models/operations/clearplaylistcontentsresponse.md new file mode 100644 index 00000000..dbc3597f --- /dev/null +++ b/docs/models/operations/clearplaylistcontentsresponse.md @@ -0,0 +1,10 @@ +# ClearPlaylistContentsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/context.md b/docs/models/operations/context.md new file mode 100644 index 00000000..a83fd168 --- /dev/null +++ b/docs/models/operations/context.md @@ -0,0 +1,8 @@ +# Context + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `librarySectionID` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/country.md b/docs/models/operations/country.md new file mode 100644 index 00000000..f533ce7f --- /dev/null +++ b/docs/models/operations/country.md @@ -0,0 +1,8 @@ +# Country + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `tag` | *string* | :heavy_minus_sign: | N/A | United States of America | \ No newline at end of file diff --git a/docs/models/operations/createplaylistrequest.md b/docs/models/operations/createplaylistrequest.md new file mode 100644 index 00000000..458f1676 --- /dev/null +++ b/docs/models/operations/createplaylistrequest.md @@ -0,0 +1,12 @@ +# CreatePlaylistRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `title` | *string* | :heavy_check_mark: | name of the playlist | +| `type` | [operations.TypeT](../../models/operations/typet.md) | :heavy_check_mark: | type of playlist to create | +| `smart` | [operations.Smart](../../models/operations/smart.md) | :heavy_check_mark: | whether the playlist is smart or not | +| `uri` | *string* | :heavy_minus_sign: | the content URI for the playlist | +| `playQueueID` | *number* | :heavy_minus_sign: | the play queue to copy to a playlist | \ No newline at end of file diff --git a/docs/models/operations/createplaylistresponse.md b/docs/models/operations/createplaylistresponse.md new file mode 100644 index 00000000..32efc1fa --- /dev/null +++ b/docs/models/operations/createplaylistresponse.md @@ -0,0 +1,10 @@ +# CreatePlaylistResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/deletelibraryrequest.md b/docs/models/operations/deletelibraryrequest.md new file mode 100644 index 00000000..50b4f759 --- /dev/null +++ b/docs/models/operations/deletelibraryrequest.md @@ -0,0 +1,8 @@ +# DeleteLibraryRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to query | 1000 | \ No newline at end of file diff --git a/docs/models/operations/deletelibraryresponse.md b/docs/models/operations/deletelibraryresponse.md new file mode 100644 index 00000000..36d1f6bb --- /dev/null +++ b/docs/models/operations/deletelibraryresponse.md @@ -0,0 +1,10 @@ +# DeleteLibraryResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/deleteplaylistrequest.md b/docs/models/operations/deleteplaylistrequest.md new file mode 100644 index 00000000..90ff45e2 --- /dev/null +++ b/docs/models/operations/deleteplaylistrequest.md @@ -0,0 +1,8 @@ +# DeletePlaylistRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `playlistID` | *number* | :heavy_check_mark: | the ID of the playlist | \ No newline at end of file diff --git a/docs/models/operations/deleteplaylistresponse.md b/docs/models/operations/deleteplaylistresponse.md new file mode 100644 index 00000000..dad36640 --- /dev/null +++ b/docs/models/operations/deleteplaylistresponse.md @@ -0,0 +1,10 @@ +# DeletePlaylistResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/device.md b/docs/models/operations/device.md new file mode 100644 index 00000000..504a9f14 --- /dev/null +++ b/docs/models/operations/device.md @@ -0,0 +1,12 @@ +# Device + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_minus_sign: | N/A | 1 | +| `name` | *string* | :heavy_minus_sign: | N/A | iPhone | +| `platform` | *string* | :heavy_minus_sign: | N/A | iOS | +| `clientIdentifier` | *string* | :heavy_minus_sign: | N/A | | +| `createdAt` | *number* | :heavy_minus_sign: | N/A | 1654131230 | \ No newline at end of file diff --git a/docs/models/operations/director.md b/docs/models/operations/director.md new file mode 100644 index 00000000..0101aa59 --- /dev/null +++ b/docs/models/operations/director.md @@ -0,0 +1,8 @@ +# Director + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `tag` | *string* | :heavy_minus_sign: | N/A | Peyton Reed | \ No newline at end of file diff --git a/docs/models/operations/directory.md b/docs/models/operations/directory.md new file mode 100644 index 00000000..34248ce3 --- /dev/null +++ b/docs/models/operations/directory.md @@ -0,0 +1,10 @@ +# Directory + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `count` | *number* | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | N/A | +| `title` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/download.md b/docs/models/operations/download.md new file mode 100644 index 00000000..a29a21ff --- /dev/null +++ b/docs/models/operations/download.md @@ -0,0 +1,11 @@ +# Download + +Indicate that you want to start download any updates found. + + +## Values + +| Name | Value | +| ------ | ------ | +| `Zero` | 0 | +| `One` | 1 | \ No newline at end of file diff --git a/docs/models/operations/enablepapertrailresponse.md b/docs/models/operations/enablepapertrailresponse.md new file mode 100644 index 00000000..63280257 --- /dev/null +++ b/docs/models/operations/enablepapertrailresponse.md @@ -0,0 +1,10 @@ +# EnablePaperTrailResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/force.md b/docs/models/operations/force.md new file mode 100644 index 00000000..1cdfc163 --- /dev/null +++ b/docs/models/operations/force.md @@ -0,0 +1,13 @@ +# Force + +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. + + + +## Values + +| Name | Value | +| ------ | ------ | +| `Zero` | 0 | +| `One` | 1 | \ No newline at end of file diff --git a/docs/models/operations/genre.md b/docs/models/operations/genre.md new file mode 100644 index 00000000..3592371c --- /dev/null +++ b/docs/models/operations/genre.md @@ -0,0 +1,8 @@ +# Genre + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `tag` | *string* | :heavy_minus_sign: | N/A | Comedy | \ No newline at end of file diff --git a/docs/models/operations/getavailableclientsmediacontainer.md b/docs/models/operations/getavailableclientsmediacontainer.md new file mode 100644 index 00000000..5e2d3c83 --- /dev/null +++ b/docs/models/operations/getavailableclientsmediacontainer.md @@ -0,0 +1,9 @@ +# GetAvailableClientsMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `size` | *number* | :heavy_minus_sign: | N/A | 1 | +| `server` | [operations.Server](../../models/operations/server.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getavailableclientsresponse.md b/docs/models/operations/getavailableclientsresponse.md new file mode 100644 index 00000000..97321f7c --- /dev/null +++ b/docs/models/operations/getavailableclientsresponse.md @@ -0,0 +1,11 @@ +# GetAvailableClientsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `responseBodies` | [operations.ResponseBody](../../models/operations/responsebody.md)[] | :heavy_minus_sign: | Available Clients | \ No newline at end of file diff --git a/docs/models/operations/getbutlertasksresponse.md b/docs/models/operations/getbutlertasksresponse.md new file mode 100644 index 00000000..e771ff9e --- /dev/null +++ b/docs/models/operations/getbutlertasksresponse.md @@ -0,0 +1,11 @@ +# GetButlerTasksResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [operations.GetButlerTasksResponseBody](../../models/operations/getbutlertasksresponsebody.md) | :heavy_minus_sign: | All butler tasks | \ No newline at end of file diff --git a/docs/models/operations/getbutlertasksresponsebody.md b/docs/models/operations/getbutlertasksresponsebody.md new file mode 100644 index 00000000..e3f74116 --- /dev/null +++ b/docs/models/operations/getbutlertasksresponsebody.md @@ -0,0 +1,10 @@ +# GetButlerTasksResponseBody + +All butler tasks + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `butlerTasks` | [operations.ButlerTasks](../../models/operations/butlertasks.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getcommonlibraryitemsrequest.md b/docs/models/operations/getcommonlibraryitemsrequest.md new file mode 100644 index 00000000..91773aa0 --- /dev/null +++ b/docs/models/operations/getcommonlibraryitemsrequest.md @@ -0,0 +1,10 @@ +# GetCommonLibraryItemsRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to query | +| `type` | *number* | :heavy_check_mark: | item type | +| `filter` | *string* | :heavy_minus_sign: | the filter parameter | \ No newline at end of file diff --git a/docs/models/operations/getcommonlibraryitemsresponse.md b/docs/models/operations/getcommonlibraryitemsresponse.md new file mode 100644 index 00000000..01a0ccad --- /dev/null +++ b/docs/models/operations/getcommonlibraryitemsresponse.md @@ -0,0 +1,10 @@ +# GetCommonLibraryItemsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getdevicesmediacontainer.md b/docs/models/operations/getdevicesmediacontainer.md new file mode 100644 index 00000000..35b4f9df --- /dev/null +++ b/docs/models/operations/getdevicesmediacontainer.md @@ -0,0 +1,10 @@ +# GetDevicesMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `size` | *number* | :heavy_minus_sign: | N/A | 151 | +| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.system.devices | +| `device` | [operations.Device](../../models/operations/device.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getdevicesresponse.md b/docs/models/operations/getdevicesresponse.md new file mode 100644 index 00000000..df546af0 --- /dev/null +++ b/docs/models/operations/getdevicesresponse.md @@ -0,0 +1,11 @@ +# GetDevicesResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [operations.GetDevicesResponseBody](../../models/operations/getdevicesresponsebody.md) | :heavy_minus_sign: | Devices | \ No newline at end of file diff --git a/docs/models/operations/getdevicesresponsebody.md b/docs/models/operations/getdevicesresponsebody.md new file mode 100644 index 00000000..8cf140bc --- /dev/null +++ b/docs/models/operations/getdevicesresponsebody.md @@ -0,0 +1,10 @@ +# GetDevicesResponseBody + +Devices + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `mediaContainer` | [operations.GetDevicesMediaContainer](../../models/operations/getdevicesmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getfilehashrequest.md b/docs/models/operations/getfilehashrequest.md new file mode 100644 index 00000000..3c5933de --- /dev/null +++ b/docs/models/operations/getfilehashrequest.md @@ -0,0 +1,9 @@ +# GetFileHashRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `url` | *string* | :heavy_check_mark: | This is the path to the local file, must be prefixed by `file://` | file://C:\Image.png&type=13 | +| `type` | *number* | :heavy_minus_sign: | Item type | | \ No newline at end of file diff --git a/docs/models/operations/getfilehashresponse.md b/docs/models/operations/getfilehashresponse.md new file mode 100644 index 00000000..367be6a8 --- /dev/null +++ b/docs/models/operations/getfilehashresponse.md @@ -0,0 +1,10 @@ +# GetFileHashResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getglobalhubsrequest.md b/docs/models/operations/getglobalhubsrequest.md new file mode 100644 index 00000000..09827018 --- /dev/null +++ b/docs/models/operations/getglobalhubsrequest.md @@ -0,0 +1,9 @@ +# GetGlobalHubsRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| `count` | *number* | :heavy_minus_sign: | The number of items to return with each hub. | +| `onlyTransient` | [operations.OnlyTransient](../../models/operations/onlytransient.md) | :heavy_minus_sign: | Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). | \ No newline at end of file diff --git a/docs/models/operations/getglobalhubsresponse.md b/docs/models/operations/getglobalhubsresponse.md new file mode 100644 index 00000000..32f09f2a --- /dev/null +++ b/docs/models/operations/getglobalhubsresponse.md @@ -0,0 +1,10 @@ +# GetGlobalHubsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getlatestlibraryitemsrequest.md b/docs/models/operations/getlatestlibraryitemsrequest.md new file mode 100644 index 00000000..470b5775 --- /dev/null +++ b/docs/models/operations/getlatestlibraryitemsrequest.md @@ -0,0 +1,10 @@ +# GetLatestLibraryItemsRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to query | +| `type` | *number* | :heavy_check_mark: | item type | +| `filter` | *string* | :heavy_minus_sign: | the filter parameter | \ No newline at end of file diff --git a/docs/models/operations/getlatestlibraryitemsresponse.md b/docs/models/operations/getlatestlibraryitemsresponse.md new file mode 100644 index 00000000..640071de --- /dev/null +++ b/docs/models/operations/getlatestlibraryitemsresponse.md @@ -0,0 +1,10 @@ +# GetLatestLibraryItemsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getlibrariesresponse.md b/docs/models/operations/getlibrariesresponse.md new file mode 100644 index 00000000..c50c3ae7 --- /dev/null +++ b/docs/models/operations/getlibrariesresponse.md @@ -0,0 +1,10 @@ +# GetLibrariesResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getlibraryhubsrequest.md b/docs/models/operations/getlibraryhubsrequest.md new file mode 100644 index 00000000..34346555 --- /dev/null +++ b/docs/models/operations/getlibraryhubsrequest.md @@ -0,0 +1,10 @@ +# GetLibraryHubsRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to query | +| `count` | *number* | :heavy_minus_sign: | The number of items to return with each hub. | +| `onlyTransient` | [operations.QueryParamOnlyTransient](../../models/operations/queryparamonlytransient.md) | :heavy_minus_sign: | Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). | \ No newline at end of file diff --git a/docs/models/operations/getlibraryhubsresponse.md b/docs/models/operations/getlibraryhubsresponse.md new file mode 100644 index 00000000..d73df6d7 --- /dev/null +++ b/docs/models/operations/getlibraryhubsresponse.md @@ -0,0 +1,10 @@ +# GetLibraryHubsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getlibraryitemsrequest.md b/docs/models/operations/getlibraryitemsrequest.md new file mode 100644 index 00000000..270c0e80 --- /dev/null +++ b/docs/models/operations/getlibraryitemsrequest.md @@ -0,0 +1,10 @@ +# GetLibraryItemsRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to query | +| `type` | *number* | :heavy_minus_sign: | item type | +| `filter` | *string* | :heavy_minus_sign: | the filter parameter | \ No newline at end of file diff --git a/docs/models/operations/getlibraryitemsresponse.md b/docs/models/operations/getlibraryitemsresponse.md new file mode 100644 index 00000000..cbca6eee --- /dev/null +++ b/docs/models/operations/getlibraryitemsresponse.md @@ -0,0 +1,10 @@ +# GetLibraryItemsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getlibraryrequest.md b/docs/models/operations/getlibraryrequest.md new file mode 100644 index 00000000..3aee3f96 --- /dev/null +++ b/docs/models/operations/getlibraryrequest.md @@ -0,0 +1,9 @@ +# GetLibraryRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to query | 1000 | +| `includeDetails` | [operations.IncludeDetails](../../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.
| | \ No newline at end of file diff --git a/docs/models/operations/getlibraryresponse.md b/docs/models/operations/getlibraryresponse.md new file mode 100644 index 00000000..ced0cd79 --- /dev/null +++ b/docs/models/operations/getlibraryresponse.md @@ -0,0 +1,10 @@ +# GetLibraryResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getmetadatachildrenrequest.md b/docs/models/operations/getmetadatachildrenrequest.md new file mode 100644 index 00000000..d3b774e9 --- /dev/null +++ b/docs/models/operations/getmetadatachildrenrequest.md @@ -0,0 +1,8 @@ +# GetMetadataChildrenRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ratingKey` | *number* | :heavy_check_mark: | the id of the library item to return the children of. | \ No newline at end of file diff --git a/docs/models/operations/getmetadatachildrenresponse.md b/docs/models/operations/getmetadatachildrenresponse.md new file mode 100644 index 00000000..e03dda5d --- /dev/null +++ b/docs/models/operations/getmetadatachildrenresponse.md @@ -0,0 +1,10 @@ +# GetMetadataChildrenResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getmetadatarequest.md b/docs/models/operations/getmetadatarequest.md new file mode 100644 index 00000000..99b24b48 --- /dev/null +++ b/docs/models/operations/getmetadatarequest.md @@ -0,0 +1,8 @@ +# GetMetadataRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ratingKey` | *number* | :heavy_check_mark: | the id of the library item to return the children of. | \ No newline at end of file diff --git a/docs/models/operations/getmetadataresponse.md b/docs/models/operations/getmetadataresponse.md new file mode 100644 index 00000000..b6285e95 --- /dev/null +++ b/docs/models/operations/getmetadataresponse.md @@ -0,0 +1,10 @@ +# GetMetadataResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getmyplexaccountresponse.md b/docs/models/operations/getmyplexaccountresponse.md new file mode 100644 index 00000000..da8735e2 --- /dev/null +++ b/docs/models/operations/getmyplexaccountresponse.md @@ -0,0 +1,11 @@ +# GetMyPlexAccountResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [operations.GetMyPlexAccountResponseBody](../../models/operations/getmyplexaccountresponsebody.md) | :heavy_minus_sign: | MyPlex Account | \ No newline at end of file diff --git a/docs/models/operations/getmyplexaccountresponsebody.md b/docs/models/operations/getmyplexaccountresponsebody.md new file mode 100644 index 00000000..20278a8c --- /dev/null +++ b/docs/models/operations/getmyplexaccountresponsebody.md @@ -0,0 +1,10 @@ +# GetMyPlexAccountResponseBody + +MyPlex Account + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `myPlex` | [operations.MyPlex](../../models/operations/myplex.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getondeckmedia.md b/docs/models/operations/getondeckmedia.md new file mode 100644 index 00000000..2332ecf8 --- /dev/null +++ b/docs/models/operations/getondeckmedia.md @@ -0,0 +1,22 @@ +# GetOnDeckMedia + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | 80994 | +| `duration` | *number* | :heavy_minus_sign: | N/A | 420080 | +| `bitrate` | *number* | :heavy_minus_sign: | N/A | 1046 | +| `width` | *number* | :heavy_minus_sign: | N/A | 1920 | +| `height` | *number* | :heavy_minus_sign: | N/A | 1080 | +| `aspectRatio` | *number* | :heavy_minus_sign: | N/A | 1.78 | +| `audioChannels` | *number* | :heavy_minus_sign: | N/A | 2 | +| `audioCodec` | *string* | :heavy_minus_sign: | N/A | aac | +| `videoCodec` | *string* | :heavy_minus_sign: | N/A | hevc | +| `videoResolution` | *string* | :heavy_minus_sign: | N/A | 1080 | +| `container` | *string* | :heavy_minus_sign: | N/A | mkv | +| `videoFrameRate` | *string* | :heavy_minus_sign: | N/A | PAL | +| `audioProfile` | *string* | :heavy_minus_sign: | N/A | lc | +| `videoProfile` | *string* | :heavy_minus_sign: | N/A | main | +| `part` | [operations.GetOnDeckPart](../../models/operations/getondeckpart.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getondeckmediacontainer.md b/docs/models/operations/getondeckmediacontainer.md new file mode 100644 index 00000000..a09a2d90 --- /dev/null +++ b/docs/models/operations/getondeckmediacontainer.md @@ -0,0 +1,14 @@ +# GetOnDeckMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `size` | *number* | :heavy_minus_sign: | N/A | 16 | +| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | | +| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `mediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `mediaTagVersion` | *number* | :heavy_minus_sign: | N/A | 1680021154 | +| `mixedParents` | *boolean* | :heavy_minus_sign: | N/A | | +| `metadata` | [operations.GetOnDeckMetadata](../../models/operations/getondeckmetadata.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getondeckmetadata.md b/docs/models/operations/getondeckmetadata.md new file mode 100644 index 00000000..f7950613 --- /dev/null +++ b/docs/models/operations/getondeckmetadata.md @@ -0,0 +1,43 @@ +# GetOnDeckMetadata + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | | +| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 2 | +| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | TV Shows | +| `librarySectionUUID` | *string* | :heavy_minus_sign: | N/A | 4bb2521c-8ba9-459b-aaee-8ab8bc35eabd | +| `ratingKey` | *number* | :heavy_minus_sign: | N/A | 49564 | +| `key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/49564 | +| `parentRatingKey` | *number* | :heavy_minus_sign: | N/A | 49557 | +| `grandparentRatingKey` | *number* | :heavy_minus_sign: | N/A | 49556 | +| `guid` | *string* | :heavy_minus_sign: | N/A | plex://episode/5ea7d7402e7ab10042e74d4f | +| `parentGuid` | *string* | :heavy_minus_sign: | N/A | plex://season/602e754d67f4c8002ce54b3d | +| `grandparentGuid` | *string* | :heavy_minus_sign: | N/A | plex://show/5d9c090e705e7a001e6e94d8 | +| `type` | *string* | :heavy_minus_sign: | N/A | episode | +| `title` | *string* | :heavy_minus_sign: | N/A | Circus | +| `grandparentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/49556 | +| `parentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/49557 | +| `librarySectionKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/2 | +| `grandparentTitle` | *string* | :heavy_minus_sign: | N/A | Bluey (2018) | +| `parentTitle` | *string* | :heavy_minus_sign: | N/A | Season 2 | +| `contentRating` | *string* | :heavy_minus_sign: | N/A | TV-Y | +| `summary` | *string* | :heavy_minus_sign: | N/A | Bluey is the ringmaster in a game of circus with her friends but Hercules wants to play his motorcycle game instead. Luckily Bluey has a solution to keep everyone happy. | +| `index` | *number* | :heavy_minus_sign: | N/A | 33 | +| `parentIndex` | *number* | :heavy_minus_sign: | N/A | 2 | +| `lastViewedAt` | *number* | :heavy_minus_sign: | N/A | 1681908352 | +| `year` | *number* | :heavy_minus_sign: | N/A | 2018 | +| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/49564/thumb/1654258204 | +| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/49556/art/1680939546 | +| `parentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/49557/thumb/1654258204 | +| `grandparentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/49556/thumb/1680939546 | +| `grandparentArt` | *string* | :heavy_minus_sign: | N/A | /library/metadata/49556/art/1680939546 | +| `grandparentTheme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/49556/theme/1680939546 | +| `duration` | *number* | :heavy_minus_sign: | N/A | 420080 | +| `originallyAvailableAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | 2020-10-31 00:00:00 +0000 UTC | +| `addedAt` | *number* | :heavy_minus_sign: | N/A | 1654258196 | +| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1654258204 | +| `media` | [operations.GetOnDeckMedia](../../models/operations/getondeckmedia.md)[] | :heavy_minus_sign: | N/A | | +| `guids` | [operations.Guids](../../models/operations/guids.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getondeckpart.md b/docs/models/operations/getondeckpart.md new file mode 100644 index 00000000..b0bb133f --- /dev/null +++ b/docs/models/operations/getondeckpart.md @@ -0,0 +1,16 @@ +# GetOnDeckPart + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | 80994 | +| `key` | *string* | :heavy_minus_sign: | N/A | /library/parts/80994/1655007810/file.mkv | +| `duration` | *number* | :heavy_minus_sign: | N/A | 420080 | +| `file` | *string* | :heavy_minus_sign: | N/A | /tvshows/Bluey (2018)/Bluey (2018) - S02E33 - Circus.mkv | +| `size` | *number* | :heavy_minus_sign: | N/A | 55148931 | +| `audioProfile` | *string* | :heavy_minus_sign: | N/A | lc | +| `container` | *string* | :heavy_minus_sign: | N/A | mkv | +| `videoProfile` | *string* | :heavy_minus_sign: | N/A | main | +| `stream` | [operations.Stream](../../models/operations/stream.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getondeckresponse.md b/docs/models/operations/getondeckresponse.md new file mode 100644 index 00000000..df39cf48 --- /dev/null +++ b/docs/models/operations/getondeckresponse.md @@ -0,0 +1,11 @@ +# GetOnDeckResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [operations.GetOnDeckResponseBody](../../models/operations/getondeckresponsebody.md) | :heavy_minus_sign: | The on Deck content | \ No newline at end of file diff --git a/docs/models/operations/getondeckresponsebody.md b/docs/models/operations/getondeckresponsebody.md new file mode 100644 index 00000000..ef1ac37a --- /dev/null +++ b/docs/models/operations/getondeckresponsebody.md @@ -0,0 +1,10 @@ +# GetOnDeckResponseBody + +The on Deck content + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetOnDeckMediaContainer](../../models/operations/getondeckmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getplaylistcontentsrequest.md b/docs/models/operations/getplaylistcontentsrequest.md new file mode 100644 index 00000000..70736992 --- /dev/null +++ b/docs/models/operations/getplaylistcontentsrequest.md @@ -0,0 +1,9 @@ +# GetPlaylistContentsRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | +| `playlistID` | *number* | :heavy_check_mark: | the ID of the playlist | +| `type` | *number* | :heavy_check_mark: | the metadata type of the item to return | \ No newline at end of file diff --git a/docs/models/operations/getplaylistcontentsresponse.md b/docs/models/operations/getplaylistcontentsresponse.md new file mode 100644 index 00000000..447ba154 --- /dev/null +++ b/docs/models/operations/getplaylistcontentsresponse.md @@ -0,0 +1,10 @@ +# GetPlaylistContentsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getplaylistrequest.md b/docs/models/operations/getplaylistrequest.md new file mode 100644 index 00000000..07df8f2f --- /dev/null +++ b/docs/models/operations/getplaylistrequest.md @@ -0,0 +1,8 @@ +# GetPlaylistRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `playlistID` | *number* | :heavy_check_mark: | the ID of the playlist | \ No newline at end of file diff --git a/docs/models/operations/getplaylistresponse.md b/docs/models/operations/getplaylistresponse.md new file mode 100644 index 00000000..7fbccce3 --- /dev/null +++ b/docs/models/operations/getplaylistresponse.md @@ -0,0 +1,10 @@ +# GetPlaylistResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getplaylistsrequest.md b/docs/models/operations/getplaylistsrequest.md new file mode 100644 index 00000000..2c51b731 --- /dev/null +++ b/docs/models/operations/getplaylistsrequest.md @@ -0,0 +1,9 @@ +# GetPlaylistsRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `playlistType` | [operations.PlaylistType](../../models/operations/playlisttype.md) | :heavy_minus_sign: | limit to a type of playlist. | +| `smart` | [operations.QueryParamSmart](../../models/operations/queryparamsmart.md) | :heavy_minus_sign: | type of playlists to return (default is all). | \ No newline at end of file diff --git a/docs/models/operations/getplaylistsresponse.md b/docs/models/operations/getplaylistsresponse.md new file mode 100644 index 00000000..836f2599 --- /dev/null +++ b/docs/models/operations/getplaylistsresponse.md @@ -0,0 +1,10 @@ +# GetPlaylistsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getrecentlyaddedmediacontainer.md b/docs/models/operations/getrecentlyaddedmediacontainer.md new file mode 100644 index 00000000..f0422aa5 --- /dev/null +++ b/docs/models/operations/getrecentlyaddedmediacontainer.md @@ -0,0 +1,14 @@ +# GetRecentlyAddedMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `size` | *number* | :heavy_minus_sign: | N/A | 50 | +| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | | +| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `mediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `mediaTagVersion` | *number* | :heavy_minus_sign: | N/A | 1680021154 | +| `mixedParents` | *boolean* | :heavy_minus_sign: | N/A | | +| `metadata` | [operations.Metadata](../../models/operations/metadata.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getrecentlyaddedresponse.md b/docs/models/operations/getrecentlyaddedresponse.md new file mode 100644 index 00000000..6f6a1576 --- /dev/null +++ b/docs/models/operations/getrecentlyaddedresponse.md @@ -0,0 +1,11 @@ +# GetRecentlyAddedResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [operations.GetRecentlyAddedResponseBody](../../models/operations/getrecentlyaddedresponsebody.md) | :heavy_minus_sign: | The recently added content | \ No newline at end of file diff --git a/docs/models/operations/getrecentlyaddedresponsebody.md b/docs/models/operations/getrecentlyaddedresponsebody.md new file mode 100644 index 00000000..ec9cdfce --- /dev/null +++ b/docs/models/operations/getrecentlyaddedresponsebody.md @@ -0,0 +1,10 @@ +# GetRecentlyAddedResponseBody + +The recently added content + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `mediaContainer` | [operations.GetRecentlyAddedMediaContainer](../../models/operations/getrecentlyaddedmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getresizedphotorequest.md b/docs/models/operations/getresizedphotorequest.md new file mode 100644 index 00000000..7d9b44c8 --- /dev/null +++ b/docs/models/operations/getresizedphotorequest.md @@ -0,0 +1,14 @@ +# GetResizedPhotoRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `width` | *number* | :heavy_check_mark: | The width for the resized photo | 110 | +| `height` | *number* | :heavy_check_mark: | The height for the resized photo | 165 | +| `opacity` | *number* | :heavy_check_mark: | The opacity for the resized photo | | +| `blur` | *number* | :heavy_check_mark: | The width for the resized photo | 0 | +| `minSize` | [operations.MinSize](../../models/operations/minsize.md) | :heavy_check_mark: | images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against. | | +| `upscale` | [operations.Upscale](../../models/operations/upscale.md) | :heavy_check_mark: | allow images to be resized beyond native dimensions. | | +| `url` | *string* | :heavy_check_mark: | path to image within Plex | /library/metadata/49564/thumb/1654258204 | \ No newline at end of file diff --git a/docs/models/operations/getresizedphotoresponse.md b/docs/models/operations/getresizedphotoresponse.md new file mode 100644 index 00000000..63d8b4cc --- /dev/null +++ b/docs/models/operations/getresizedphotoresponse.md @@ -0,0 +1,10 @@ +# GetResizedPhotoResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getsearchresultscountry.md b/docs/models/operations/getsearchresultscountry.md new file mode 100644 index 00000000..e63aab0a --- /dev/null +++ b/docs/models/operations/getsearchresultscountry.md @@ -0,0 +1,8 @@ +# GetSearchResultsCountry + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `tag` | *string* | :heavy_minus_sign: | N/A | United States of America | \ No newline at end of file diff --git a/docs/models/operations/getsearchresultsdirector.md b/docs/models/operations/getsearchresultsdirector.md new file mode 100644 index 00000000..3bf85017 --- /dev/null +++ b/docs/models/operations/getsearchresultsdirector.md @@ -0,0 +1,8 @@ +# GetSearchResultsDirector + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `tag` | *string* | :heavy_minus_sign: | N/A | Brian De Palma | \ No newline at end of file diff --git a/docs/models/operations/getsearchresultsgenre.md b/docs/models/operations/getsearchresultsgenre.md new file mode 100644 index 00000000..69646c7f --- /dev/null +++ b/docs/models/operations/getsearchresultsgenre.md @@ -0,0 +1,8 @@ +# GetSearchResultsGenre + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `tag` | *string* | :heavy_minus_sign: | N/A | Action | \ No newline at end of file diff --git a/docs/models/operations/getsearchresultsmedia.md b/docs/models/operations/getsearchresultsmedia.md new file mode 100644 index 00000000..23885760 --- /dev/null +++ b/docs/models/operations/getsearchresultsmedia.md @@ -0,0 +1,22 @@ +# GetSearchResultsMedia + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `id` | *number* | :heavy_minus_sign: | N/A | 26610 | +| `duration` | *number* | :heavy_minus_sign: | N/A | 6612628 | +| `bitrate` | *number* | :heavy_minus_sign: | N/A | 4751 | +| `width` | *number* | :heavy_minus_sign: | N/A | 1916 | +| `height` | *number* | :heavy_minus_sign: | N/A | 796 | +| `aspectRatio` | *number* | :heavy_minus_sign: | N/A | 2.35 | +| `audioChannels` | *number* | :heavy_minus_sign: | N/A | 6 | +| `audioCodec` | *string* | :heavy_minus_sign: | N/A | aac | +| `videoCodec` | *string* | :heavy_minus_sign: | N/A | hevc | +| `videoResolution` | *number* | :heavy_minus_sign: | N/A | 1080 | +| `container` | *string* | :heavy_minus_sign: | N/A | mkv | +| `videoFrameRate` | *string* | :heavy_minus_sign: | N/A | 24p | +| `audioProfile` | *string* | :heavy_minus_sign: | N/A | lc | +| `videoProfile` | *string* | :heavy_minus_sign: | N/A | main 10 | +| `part` | [operations.GetSearchResultsPart](../../models/operations/getsearchresultspart.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getsearchresultsmediacontainer.md b/docs/models/operations/getsearchresultsmediacontainer.md new file mode 100644 index 00000000..3074fd14 --- /dev/null +++ b/docs/models/operations/getsearchresultsmediacontainer.md @@ -0,0 +1,13 @@ +# GetSearchResultsMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `size` | *number* | :heavy_minus_sign: | N/A | 26 | +| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `mediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `mediaTagVersion` | *number* | :heavy_minus_sign: | N/A | 1680021154 | +| `metadata` | [operations.GetSearchResultsMetadata](../../models/operations/getsearchresultsmetadata.md)[] | :heavy_minus_sign: | N/A | | +| `provider` | [operations.Provider](../../models/operations/provider.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getsearchresultsmetadata.md b/docs/models/operations/getsearchresultsmetadata.md new file mode 100644 index 00000000..80ee7438 --- /dev/null +++ b/docs/models/operations/getsearchresultsmetadata.md @@ -0,0 +1,41 @@ +# GetSearchResultsMetadata + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | | +| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 | +| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | +| `librarySectionUUID` | *string* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | +| `personal` | *boolean* | :heavy_minus_sign: | N/A | | +| `sourceTitle` | *string* | :heavy_minus_sign: | N/A | Hera | +| `ratingKey` | *number* | :heavy_minus_sign: | N/A | 10398 | +| `key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/10398 | +| `guid` | *string* | :heavy_minus_sign: | N/A | plex://movie/5d7768284de0ee001fcc8f52 | +| `studio` | *string* | :heavy_minus_sign: | N/A | Paramount | +| `type` | *string* | :heavy_minus_sign: | N/A | movie | +| `title` | *string* | :heavy_minus_sign: | N/A | Mission: Impossible | +| `contentRating` | *string* | :heavy_minus_sign: | N/A | PG-13 | +| `summary` | *string* | :heavy_minus_sign: | N/A | When Ethan Hunt the leader of a crack espionage team whose perilous operation has gone awry with no explanation discovers that a mole has penetrated the CIA he's surprised to learn that he's the No. 1 suspect. To clear his name Hunt now must ferret out the real double agent and in the process even the score. | +| `rating` | *number* | :heavy_minus_sign: | N/A | 6.6 | +| `audienceRating` | *number* | :heavy_minus_sign: | N/A | 7.1 | +| `year` | *number* | :heavy_minus_sign: | N/A | 1996 | +| `tagline` | *string* | :heavy_minus_sign: | N/A | Expect the impossible. | +| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/10398/thumb/1679505055 | +| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/10398/art/1679505055 | +| `duration` | *number* | :heavy_minus_sign: | N/A | 6612628 | +| `originallyAvailableAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | 1996-05-22 00:00:00 +0000 UTC | +| `addedAt` | *number* | :heavy_minus_sign: | N/A | 1589234571 | +| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1679505055 | +| `audienceRatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | +| `chapterSource` | *string* | :heavy_minus_sign: | N/A | media | +| `primaryExtraKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/10501 | +| `ratingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | +| `media` | [operations.GetSearchResultsMedia](../../models/operations/getsearchresultsmedia.md)[] | :heavy_minus_sign: | N/A | | +| `genre` | [operations.GetSearchResultsGenre](../../models/operations/getsearchresultsgenre.md)[] | :heavy_minus_sign: | N/A | | +| `director` | [operations.GetSearchResultsDirector](../../models/operations/getsearchresultsdirector.md)[] | :heavy_minus_sign: | N/A | | +| `writer` | [operations.GetSearchResultsWriter](../../models/operations/getsearchresultswriter.md)[] | :heavy_minus_sign: | N/A | | +| `country` | [operations.GetSearchResultsCountry](../../models/operations/getsearchresultscountry.md)[] | :heavy_minus_sign: | N/A | | +| `role` | [operations.GetSearchResultsRole](../../models/operations/getsearchresultsrole.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getsearchresultspart.md b/docs/models/operations/getsearchresultspart.md new file mode 100644 index 00000000..dd780c58 --- /dev/null +++ b/docs/models/operations/getsearchresultspart.md @@ -0,0 +1,15 @@ +# GetSearchResultsPart + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | 26610 | +| `key` | *string* | :heavy_minus_sign: | N/A | /library/parts/26610/1589234571/file.mkv | +| `duration` | *number* | :heavy_minus_sign: | N/A | 6612628 | +| `file` | *string* | :heavy_minus_sign: | N/A | /movies/Mission Impossible (1996)/Mission Impossible (1996) Bluray-1080p.mkv | +| `size` | *number* | :heavy_minus_sign: | N/A | 3926903851 | +| `audioProfile` | *string* | :heavy_minus_sign: | N/A | lc | +| `container` | *string* | :heavy_minus_sign: | N/A | mkv | +| `videoProfile` | *string* | :heavy_minus_sign: | N/A | main 10 | \ No newline at end of file diff --git a/docs/models/operations/getsearchresultsrequest.md b/docs/models/operations/getsearchresultsrequest.md new file mode 100644 index 00000000..72579d97 --- /dev/null +++ b/docs/models/operations/getsearchresultsrequest.md @@ -0,0 +1,8 @@ +# GetSearchResultsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `query` | *string* | :heavy_check_mark: | The search query string to use | 110 | \ No newline at end of file diff --git a/docs/models/operations/getsearchresultsresponse.md b/docs/models/operations/getsearchresultsresponse.md new file mode 100644 index 00000000..433485fd --- /dev/null +++ b/docs/models/operations/getsearchresultsresponse.md @@ -0,0 +1,11 @@ +# GetSearchResultsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [operations.GetSearchResultsResponseBody](../../models/operations/getsearchresultsresponsebody.md) | :heavy_minus_sign: | Search Results | \ No newline at end of file diff --git a/docs/models/operations/getsearchresultsresponsebody.md b/docs/models/operations/getsearchresultsresponsebody.md new file mode 100644 index 00000000..5eb42bc9 --- /dev/null +++ b/docs/models/operations/getsearchresultsresponsebody.md @@ -0,0 +1,10 @@ +# GetSearchResultsResponseBody + +Search Results + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `mediaContainer` | [operations.GetSearchResultsMediaContainer](../../models/operations/getsearchresultsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getsearchresultsrole.md b/docs/models/operations/getsearchresultsrole.md new file mode 100644 index 00000000..719cffc6 --- /dev/null +++ b/docs/models/operations/getsearchresultsrole.md @@ -0,0 +1,8 @@ +# GetSearchResultsRole + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `tag` | *string* | :heavy_minus_sign: | N/A | Tom Cruise | \ No newline at end of file diff --git a/docs/models/operations/getsearchresultswriter.md b/docs/models/operations/getsearchresultswriter.md new file mode 100644 index 00000000..0f842bfe --- /dev/null +++ b/docs/models/operations/getsearchresultswriter.md @@ -0,0 +1,8 @@ +# GetSearchResultsWriter + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `tag` | *string* | :heavy_minus_sign: | N/A | David Koepp | \ No newline at end of file diff --git a/docs/models/operations/getserveractivitiesmediacontainer.md b/docs/models/operations/getserveractivitiesmediacontainer.md new file mode 100644 index 00000000..bc5088ba --- /dev/null +++ b/docs/models/operations/getserveractivitiesmediacontainer.md @@ -0,0 +1,9 @@ +# GetServerActivitiesMediaContainer + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `size` | *number* | :heavy_minus_sign: | N/A | +| `activity` | [operations.Activity](../../models/operations/activity.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getserveractivitiesresponse.md b/docs/models/operations/getserveractivitiesresponse.md new file mode 100644 index 00000000..c3b4229e --- /dev/null +++ b/docs/models/operations/getserveractivitiesresponse.md @@ -0,0 +1,11 @@ +# GetServerActivitiesResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [operations.GetServerActivitiesResponseBody](../../models/operations/getserveractivitiesresponsebody.md) | :heavy_minus_sign: | The Server Activities | \ No newline at end of file diff --git a/docs/models/operations/getserveractivitiesresponsebody.md b/docs/models/operations/getserveractivitiesresponsebody.md new file mode 100644 index 00000000..315fb7c0 --- /dev/null +++ b/docs/models/operations/getserveractivitiesresponsebody.md @@ -0,0 +1,10 @@ +# GetServerActivitiesResponseBody + +The Server Activities + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `mediaContainer` | [operations.GetServerActivitiesMediaContainer](../../models/operations/getserveractivitiesmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getservercapabilitiesresponse.md b/docs/models/operations/getservercapabilitiesresponse.md new file mode 100644 index 00000000..8419363c --- /dev/null +++ b/docs/models/operations/getservercapabilitiesresponse.md @@ -0,0 +1,11 @@ +# GetServerCapabilitiesResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [operations.GetServerCapabilitiesResponseBody](../../models/operations/getservercapabilitiesresponsebody.md) | :heavy_minus_sign: | The Server Capabilities | \ No newline at end of file diff --git a/docs/models/operations/getservercapabilitiesresponsebody.md b/docs/models/operations/getservercapabilitiesresponsebody.md new file mode 100644 index 00000000..c4b229ce --- /dev/null +++ b/docs/models/operations/getservercapabilitiesresponsebody.md @@ -0,0 +1,10 @@ +# GetServerCapabilitiesResponseBody + +The Server Capabilities + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `mediaContainer` | [operations.MediaContainer](../../models/operations/mediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getserveridentitymediacontainer.md b/docs/models/operations/getserveridentitymediacontainer.md new file mode 100644 index 00000000..cfabc04f --- /dev/null +++ b/docs/models/operations/getserveridentitymediacontainer.md @@ -0,0 +1,11 @@ +# GetServerIdentityMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `size` | *number* | :heavy_minus_sign: | N/A | 0 | +| `claimed` | *boolean* | :heavy_minus_sign: | N/A | | +| `machineIdentifier` | *string* | :heavy_minus_sign: | N/A | 96f2fe7a78c9dc1f16a16bedbe90f98149be16b4 | +| `version` | *string* | :heavy_minus_sign: | N/A | 1.31.3.6868-28fc46b27 | \ No newline at end of file diff --git a/docs/models/operations/getserveridentityresponse.md b/docs/models/operations/getserveridentityresponse.md new file mode 100644 index 00000000..8cd926a0 --- /dev/null +++ b/docs/models/operations/getserveridentityresponse.md @@ -0,0 +1,11 @@ +# GetServerIdentityResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [operations.GetServerIdentityResponseBody](../../models/operations/getserveridentityresponsebody.md) | :heavy_minus_sign: | The Transcode Sessions | \ No newline at end of file diff --git a/docs/models/operations/getserveridentityresponsebody.md b/docs/models/operations/getserveridentityresponsebody.md new file mode 100644 index 00000000..87d4623a --- /dev/null +++ b/docs/models/operations/getserveridentityresponsebody.md @@ -0,0 +1,10 @@ +# GetServerIdentityResponseBody + +The Transcode Sessions + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetServerIdentityMediaContainer](../../models/operations/getserveridentitymediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getserverlistmediacontainer.md b/docs/models/operations/getserverlistmediacontainer.md new file mode 100644 index 00000000..69b92baf --- /dev/null +++ b/docs/models/operations/getserverlistmediacontainer.md @@ -0,0 +1,9 @@ +# GetServerListMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `size` | *number* | :heavy_minus_sign: | N/A | 1 | +| `server` | [operations.GetServerListServer](../../models/operations/getserverlistserver.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getserverlistresponse.md b/docs/models/operations/getserverlistresponse.md new file mode 100644 index 00000000..b7b94513 --- /dev/null +++ b/docs/models/operations/getserverlistresponse.md @@ -0,0 +1,11 @@ +# GetServerListResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [operations.GetServerListResponseBody](../../models/operations/getserverlistresponsebody.md) | :heavy_minus_sign: | List of Servers | \ No newline at end of file diff --git a/docs/models/operations/getserverlistresponsebody.md b/docs/models/operations/getserverlistresponsebody.md new file mode 100644 index 00000000..701b29c9 --- /dev/null +++ b/docs/models/operations/getserverlistresponsebody.md @@ -0,0 +1,10 @@ +# GetServerListResponseBody + +List of Servers + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `mediaContainer` | [operations.GetServerListMediaContainer](../../models/operations/getserverlistmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getserverlistserver.md b/docs/models/operations/getserverlistserver.md new file mode 100644 index 00000000..e55d49c3 --- /dev/null +++ b/docs/models/operations/getserverlistserver.md @@ -0,0 +1,13 @@ +# GetServerListServer + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | N/A | Hera | +| `host` | *string* | :heavy_minus_sign: | N/A | 10.10.10.47 | +| `address` | *string* | :heavy_minus_sign: | N/A | 10.10.10.47 | +| `port` | *number* | :heavy_minus_sign: | N/A | 32400 | +| `machineIdentifier` | *string* | :heavy_minus_sign: | N/A | 96f2fe7a78c9dc1f16a16bedbe90f98149be16b4 | +| `version` | *string* | :heavy_minus_sign: | N/A | 1.31.3.6868-28fc46b27 | \ No newline at end of file diff --git a/docs/models/operations/getserverpreferencesresponse.md b/docs/models/operations/getserverpreferencesresponse.md new file mode 100644 index 00000000..63f50daa --- /dev/null +++ b/docs/models/operations/getserverpreferencesresponse.md @@ -0,0 +1,10 @@ +# GetServerPreferencesResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getsessionhistoryresponse.md b/docs/models/operations/getsessionhistoryresponse.md new file mode 100644 index 00000000..dc0651d0 --- /dev/null +++ b/docs/models/operations/getsessionhistoryresponse.md @@ -0,0 +1,10 @@ +# GetSessionHistoryResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getsessionsresponse.md b/docs/models/operations/getsessionsresponse.md new file mode 100644 index 00000000..deba1663 --- /dev/null +++ b/docs/models/operations/getsessionsresponse.md @@ -0,0 +1,10 @@ +# GetSessionsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getsourceconnectioninformationrequest.md b/docs/models/operations/getsourceconnectioninformationrequest.md new file mode 100644 index 00000000..64fdbc4b --- /dev/null +++ b/docs/models/operations/getsourceconnectioninformationrequest.md @@ -0,0 +1,8 @@ +# GetSourceConnectionInformationRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `source` | *string* | :heavy_check_mark: | The source identifier with an included prefix. | server://client-identifier | \ No newline at end of file diff --git a/docs/models/operations/getsourceconnectioninformationresponse.md b/docs/models/operations/getsourceconnectioninformationresponse.md new file mode 100644 index 00000000..f27e12f9 --- /dev/null +++ b/docs/models/operations/getsourceconnectioninformationresponse.md @@ -0,0 +1,10 @@ +# GetSourceConnectionInformationResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/gettimelinerequest.md b/docs/models/operations/gettimelinerequest.md new file mode 100644 index 00000000..3e69675f --- /dev/null +++ b/docs/models/operations/gettimelinerequest.md @@ -0,0 +1,17 @@ +# GetTimelineRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `ratingKey` | *number* | :heavy_check_mark: | The rating key of the media item | +| `key` | *string* | :heavy_check_mark: | The key of the media item to get the timeline for | +| `state` | [operations.State](../../models/operations/state.md) | :heavy_check_mark: | The state of the media item | +| `hasMDE` | *number* | :heavy_check_mark: | Whether the media item has MDE | +| `time` | *number* | :heavy_check_mark: | The time of the media item | +| `duration` | *number* | :heavy_check_mark: | The duration of the media item | +| `context` | *string* | :heavy_check_mark: | The context of the media item | +| `playQueueItemID` | *number* | :heavy_check_mark: | The play queue item ID of the media item | +| `playBackTime` | *number* | :heavy_check_mark: | The playback time of the media item | +| `row` | *number* | :heavy_check_mark: | The row of the media item | \ No newline at end of file diff --git a/docs/models/operations/gettimelineresponse.md b/docs/models/operations/gettimelineresponse.md new file mode 100644 index 00000000..1cc4ac1c --- /dev/null +++ b/docs/models/operations/gettimelineresponse.md @@ -0,0 +1,10 @@ +# GetTimelineResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/gettranscodesessionsmediacontainer.md b/docs/models/operations/gettranscodesessionsmediacontainer.md new file mode 100644 index 00000000..0a3d9841 --- /dev/null +++ b/docs/models/operations/gettranscodesessionsmediacontainer.md @@ -0,0 +1,9 @@ +# GetTranscodeSessionsMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `size` | *number* | :heavy_minus_sign: | N/A | 1 | +| `transcodeSession` | [operations.TranscodeSession](../../models/operations/transcodesession.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/gettranscodesessionsresponse.md b/docs/models/operations/gettranscodesessionsresponse.md new file mode 100644 index 00000000..3e6b28af --- /dev/null +++ b/docs/models/operations/gettranscodesessionsresponse.md @@ -0,0 +1,11 @@ +# GetTranscodeSessionsResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [operations.GetTranscodeSessionsResponseBody](../../models/operations/gettranscodesessionsresponsebody.md) | :heavy_minus_sign: | The Transcode Sessions | \ No newline at end of file diff --git a/docs/models/operations/gettranscodesessionsresponsebody.md b/docs/models/operations/gettranscodesessionsresponsebody.md new file mode 100644 index 00000000..730d12a9 --- /dev/null +++ b/docs/models/operations/gettranscodesessionsresponsebody.md @@ -0,0 +1,10 @@ +# GetTranscodeSessionsResponseBody + +The Transcode Sessions + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetTranscodeSessionsMediaContainer](../../models/operations/gettranscodesessionsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/gettransienttokenrequest.md b/docs/models/operations/gettransienttokenrequest.md new file mode 100644 index 00000000..7f318b4f --- /dev/null +++ b/docs/models/operations/gettransienttokenrequest.md @@ -0,0 +1,9 @@ +# GetTransientTokenRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `type` | [operations.QueryParamType](../../models/operations/queryparamtype.md) | :heavy_check_mark: | `delegation` - This is the only supported `type` parameter. | +| `scope` | [operations.Scope](../../models/operations/scope.md) | :heavy_check_mark: | `all` - This is the only supported `scope` parameter. | \ No newline at end of file diff --git a/docs/models/operations/gettransienttokenresponse.md b/docs/models/operations/gettransienttokenresponse.md new file mode 100644 index 00000000..2c6fde61 --- /dev/null +++ b/docs/models/operations/gettransienttokenresponse.md @@ -0,0 +1,10 @@ +# GetTransientTokenResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getupdatestatusresponse.md b/docs/models/operations/getupdatestatusresponse.md new file mode 100644 index 00000000..95927913 --- /dev/null +++ b/docs/models/operations/getupdatestatusresponse.md @@ -0,0 +1,10 @@ +# GetUpdateStatusResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/guids.md b/docs/models/operations/guids.md new file mode 100644 index 00000000..df5c82b7 --- /dev/null +++ b/docs/models/operations/guids.md @@ -0,0 +1,8 @@ +# Guids + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | imdb://tt13303712 | \ No newline at end of file diff --git a/docs/models/operations/includedetails.md b/docs/models/operations/includedetails.md new file mode 100644 index 00000000..7085055f --- /dev/null +++ b/docs/models/operations/includedetails.md @@ -0,0 +1,13 @@ +# IncludeDetails + +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. + + + +## Values + +| Name | Value | +| ------ | ------ | +| `Zero` | 0 | +| `One` | 1 | \ No newline at end of file diff --git a/docs/models/operations/level.md b/docs/models/operations/level.md new file mode 100644 index 00000000..7be3adbe --- /dev/null +++ b/docs/models/operations/level.md @@ -0,0 +1,20 @@ +# Level + +An integer log level to write to the PMS log with. +0: Error +1: Warning +2: Info +3: Debug +4: Verbose + + + +## Values + +| Name | Value | +| ------- | ------- | +| `Zero` | 0 | +| `One` | 1 | +| `Two` | 2 | +| `Three` | 3 | +| `Four` | 4 | \ No newline at end of file diff --git a/docs/models/operations/loglinerequest.md b/docs/models/operations/loglinerequest.md new file mode 100644 index 00000000..909866b8 --- /dev/null +++ b/docs/models/operations/loglinerequest.md @@ -0,0 +1,10 @@ +# LogLineRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `level` | [operations.Level](../../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. | | +| `source` | *string* | :heavy_check_mark: | a string indicating the source of the message. | | \ No newline at end of file diff --git a/docs/models/operations/loglineresponse.md b/docs/models/operations/loglineresponse.md new file mode 100644 index 00000000..210a9f55 --- /dev/null +++ b/docs/models/operations/loglineresponse.md @@ -0,0 +1,10 @@ +# LogLineResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/logmultilineresponse.md b/docs/models/operations/logmultilineresponse.md new file mode 100644 index 00000000..4ccd754e --- /dev/null +++ b/docs/models/operations/logmultilineresponse.md @@ -0,0 +1,10 @@ +# LogMultiLineResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/markplayedrequest.md b/docs/models/operations/markplayedrequest.md new file mode 100644 index 00000000..de834efb --- /dev/null +++ b/docs/models/operations/markplayedrequest.md @@ -0,0 +1,8 @@ +# MarkPlayedRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `key` | *number* | :heavy_check_mark: | The media key to mark as played | 59398 | \ No newline at end of file diff --git a/docs/models/operations/markplayedresponse.md b/docs/models/operations/markplayedresponse.md new file mode 100644 index 00000000..9787c0b2 --- /dev/null +++ b/docs/models/operations/markplayedresponse.md @@ -0,0 +1,10 @@ +# MarkPlayedResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/markunplayedrequest.md b/docs/models/operations/markunplayedrequest.md new file mode 100644 index 00000000..3715fb83 --- /dev/null +++ b/docs/models/operations/markunplayedrequest.md @@ -0,0 +1,8 @@ +# MarkUnplayedRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `key` | *number* | :heavy_check_mark: | The media key to mark as Unplayed | 59398 | \ No newline at end of file diff --git a/docs/models/operations/markunplayedresponse.md b/docs/models/operations/markunplayedresponse.md new file mode 100644 index 00000000..7ae6b2d6 --- /dev/null +++ b/docs/models/operations/markunplayedresponse.md @@ -0,0 +1,10 @@ +# MarkUnplayedResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/media.md b/docs/models/operations/media.md new file mode 100644 index 00000000..a62784b5 --- /dev/null +++ b/docs/models/operations/media.md @@ -0,0 +1,23 @@ +# Media + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | 120345 | +| `duration` | *number* | :heavy_minus_sign: | N/A | 7474422 | +| `bitrate` | *number* | :heavy_minus_sign: | N/A | 3623 | +| `width` | *number* | :heavy_minus_sign: | N/A | 1920 | +| `height` | *number* | :heavy_minus_sign: | N/A | 804 | +| `aspectRatio` | *number* | :heavy_minus_sign: | N/A | 2.35 | +| `audioChannels` | *number* | :heavy_minus_sign: | N/A | 6 | +| `audioCodec` | *string* | :heavy_minus_sign: | N/A | ac3 | +| `videoCodec` | *string* | :heavy_minus_sign: | N/A | h264 | +| `videoResolution` | *number* | :heavy_minus_sign: | N/A | 1080 | +| `container` | *string* | :heavy_minus_sign: | N/A | mp4 | +| `videoFrameRate` | *string* | :heavy_minus_sign: | N/A | 24p | +| `optimizedForStreaming` | *number* | :heavy_minus_sign: | N/A | 0 | +| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | | +| `videoProfile` | *string* | :heavy_minus_sign: | N/A | high | +| `part` | [operations.Part](../../models/operations/part.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/mediacontainer.md b/docs/models/operations/mediacontainer.md new file mode 100644 index 00000000..ea9d410f --- /dev/null +++ b/docs/models/operations/mediacontainer.md @@ -0,0 +1,58 @@ +# MediaContainer + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `size` | *number* | :heavy_minus_sign: | N/A | +| `allowCameraUpload` | *boolean* | :heavy_minus_sign: | N/A | +| `allowChannelAccess` | *boolean* | :heavy_minus_sign: | N/A | +| `allowMediaDeletion` | *boolean* | :heavy_minus_sign: | N/A | +| `allowSharing` | *boolean* | :heavy_minus_sign: | N/A | +| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | +| `allowTuners` | *boolean* | :heavy_minus_sign: | N/A | +| `backgroundProcessing` | *boolean* | :heavy_minus_sign: | N/A | +| `certificate` | *boolean* | :heavy_minus_sign: | N/A | +| `companionProxy` | *boolean* | :heavy_minus_sign: | N/A | +| `countryCode` | *string* | :heavy_minus_sign: | N/A | +| `diagnostics` | *string* | :heavy_minus_sign: | N/A | +| `eventStream` | *boolean* | :heavy_minus_sign: | N/A | +| `friendlyName` | *string* | :heavy_minus_sign: | N/A | +| `hubSearch` | *boolean* | :heavy_minus_sign: | N/A | +| `itemClusters` | *boolean* | :heavy_minus_sign: | N/A | +| `livetv` | *number* | :heavy_minus_sign: | N/A | +| `machineIdentifier` | *string* | :heavy_minus_sign: | N/A | +| `mediaProviders` | *boolean* | :heavy_minus_sign: | N/A | +| `multiuser` | *boolean* | :heavy_minus_sign: | N/A | +| `musicAnalysis` | *number* | :heavy_minus_sign: | N/A | +| `myPlex` | *boolean* | :heavy_minus_sign: | N/A | +| `myPlexMappingState` | *string* | :heavy_minus_sign: | N/A | +| `myPlexSigninState` | *string* | :heavy_minus_sign: | N/A | +| `myPlexSubscription` | *boolean* | :heavy_minus_sign: | N/A | +| `myPlexUsername` | *string* | :heavy_minus_sign: | N/A | +| `offlineTranscode` | *number* | :heavy_minus_sign: | N/A | +| `ownerFeatures` | *string* | :heavy_minus_sign: | N/A | +| `photoAutoTag` | *boolean* | :heavy_minus_sign: | N/A | +| `platform` | *string* | :heavy_minus_sign: | N/A | +| `platformVersion` | *string* | :heavy_minus_sign: | N/A | +| `pluginHost` | *boolean* | :heavy_minus_sign: | N/A | +| `pushNotifications` | *boolean* | :heavy_minus_sign: | N/A | +| `readOnlyLibraries` | *boolean* | :heavy_minus_sign: | N/A | +| `streamingBrainABRVersion` | *number* | :heavy_minus_sign: | N/A | +| `streamingBrainVersion` | *number* | :heavy_minus_sign: | N/A | +| `sync` | *boolean* | :heavy_minus_sign: | N/A | +| `transcoderActiveVideoSessions` | *number* | :heavy_minus_sign: | N/A | +| `transcoderAudio` | *boolean* | :heavy_minus_sign: | N/A | +| `transcoderLyrics` | *boolean* | :heavy_minus_sign: | N/A | +| `transcoderPhoto` | *boolean* | :heavy_minus_sign: | N/A | +| `transcoderSubtitles` | *boolean* | :heavy_minus_sign: | N/A | +| `transcoderVideo` | *boolean* | :heavy_minus_sign: | N/A | +| `transcoderVideoBitrates` | *string* | :heavy_minus_sign: | N/A | +| `transcoderVideoQualities` | *string* | :heavy_minus_sign: | N/A | +| `transcoderVideoResolutions` | *string* | :heavy_minus_sign: | N/A | +| `updatedAt` | *number* | :heavy_minus_sign: | N/A | +| `updater` | *boolean* | :heavy_minus_sign: | N/A | +| `version` | *string* | :heavy_minus_sign: | N/A | +| `voiceSearch` | *boolean* | :heavy_minus_sign: | N/A | +| `directory` | [operations.Directory](../../models/operations/directory.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/metadata.md b/docs/models/operations/metadata.md new file mode 100644 index 00000000..890bb457 --- /dev/null +++ b/docs/models/operations/metadata.md @@ -0,0 +1,39 @@ +# Metadata + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | | +| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 | +| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | +| `librarySectionUUID` | *string* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | +| `ratingKey` | *number* | :heavy_minus_sign: | N/A | 59398 | +| `key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/59398 | +| `guid` | *string* | :heavy_minus_sign: | N/A | plex://movie/5e161a83bea6ac004126e148 | +| `studio` | *string* | :heavy_minus_sign: | N/A | Marvel Studios | +| `type` | *string* | :heavy_minus_sign: | N/A | movie | +| `title` | *string* | :heavy_minus_sign: | N/A | Ant-Man and the Wasp: Quantumania | +| `contentRating` | *string* | :heavy_minus_sign: | N/A | PG-13 | +| `summary` | *string* | :heavy_minus_sign: | N/A | Scott Lang and Hope Van Dyne along with Hank Pym and Janet Van Dyne explore the Quantum Realm where they interact with strange creatures and embark on an adventure that goes beyond the limits of what they thought was possible. | +| `rating` | *number* | :heavy_minus_sign: | N/A | 4.7 | +| `audienceRating` | *number* | :heavy_minus_sign: | N/A | 8.3 | +| `year` | *number* | :heavy_minus_sign: | N/A | 2023 | +| `tagline` | *string* | :heavy_minus_sign: | N/A | Witness the beginning of a new dynasty. | +| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/59398/thumb/1681888010 | +| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/59398/art/1681888010 | +| `duration` | *number* | :heavy_minus_sign: | N/A | 7474422 | +| `originallyAvailableAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | 2023-02-15 00:00:00 +0000 UTC | +| `addedAt` | *number* | :heavy_minus_sign: | N/A | 1681803215 | +| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1681888010 | +| `audienceRatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | +| `chapterSource` | *string* | :heavy_minus_sign: | N/A | media | +| `primaryExtraKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/59399 | +| `ratingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.rotten | +| `media` | [operations.Media](../../models/operations/media.md)[] | :heavy_minus_sign: | N/A | | +| `genre` | [operations.Genre](../../models/operations/genre.md)[] | :heavy_minus_sign: | N/A | | +| `director` | [operations.Director](../../models/operations/director.md)[] | :heavy_minus_sign: | N/A | | +| `writer` | [operations.Writer](../../models/operations/writer.md)[] | :heavy_minus_sign: | N/A | | +| `country` | [operations.Country](../../models/operations/country.md)[] | :heavy_minus_sign: | N/A | | +| `role` | [operations.Role](../../models/operations/role.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/minsize.md b/docs/models/operations/minsize.md new file mode 100644 index 00000000..cb991b55 --- /dev/null +++ b/docs/models/operations/minsize.md @@ -0,0 +1,11 @@ +# MinSize + +images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against. + + +## Values + +| Name | Value | +| ------ | ------ | +| `Zero` | 0 | +| `One` | 1 | \ No newline at end of file diff --git a/docs/models/operations/myplex.md b/docs/models/operations/myplex.md new file mode 100644 index 00000000..64a6f48e --- /dev/null +++ b/docs/models/operations/myplex.md @@ -0,0 +1,19 @@ +# MyPlex + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `authToken` | *string* | :heavy_minus_sign: | N/A | Z5v-PrNASDFpsaCi3CPK7 | +| `username` | *string* | :heavy_minus_sign: | N/A | example.email@mail.com | +| `mappingState` | *string* | :heavy_minus_sign: | N/A | mapped | +| `mappingError` | *string* | :heavy_minus_sign: | N/A | | +| `signInState` | *string* | :heavy_minus_sign: | N/A | ok | +| `publicAddress` | *string* | :heavy_minus_sign: | N/A | 140.20.68.140 | +| `publicPort` | *number* | :heavy_minus_sign: | N/A | 32400 | +| `privateAddress` | *string* | :heavy_minus_sign: | N/A | 10.10.10.47 | +| `privatePort` | *number* | :heavy_minus_sign: | N/A | 32400 | +| `subscriptionFeatures` | *string* | :heavy_minus_sign: | N/A | federated-auth,hardware_transcoding,home,hwtranscode,item_clusters,kevin-bacon,livetv,loudness,lyrics,music-analysis,music_videos,pass,photo_autotags,photos-v5,photosV6-edit,photosV6-tv-albums,premium_music_metadata,radio,server-manager,session_bandwidth_restrictions,session_kick,shared-radio,sync,trailers,tuner-sharing,type-first,unsupportedtuners,webhooks | +| `subscriptionActive` | *boolean* | :heavy_minus_sign: | N/A | | +| `subscriptionState` | *string* | :heavy_minus_sign: | N/A | Active | \ No newline at end of file diff --git a/docs/models/operations/onlytransient.md b/docs/models/operations/onlytransient.md new file mode 100644 index 00000000..763848f5 --- /dev/null +++ b/docs/models/operations/onlytransient.md @@ -0,0 +1,11 @@ +# OnlyTransient + +Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + + +## Values + +| Name | Value | +| ------ | ------ | +| `Zero` | 0 | +| `One` | 1 | \ No newline at end of file diff --git a/docs/models/operations/part.md b/docs/models/operations/part.md new file mode 100644 index 00000000..1507a994 --- /dev/null +++ b/docs/models/operations/part.md @@ -0,0 +1,17 @@ +# Part + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | 120353 | +| `key` | *string* | :heavy_minus_sign: | N/A | /library/parts/120353/1681803203/file.mp4 | +| `duration` | *number* | :heavy_minus_sign: | N/A | 7474422 | +| `file` | *string* | :heavy_minus_sign: | N/A | /movies/Ant-Man and the Wasp Quantumania (2023)/Ant-Man.and.the.Wasp.Quantumania.2023.1080p.mp4 | +| `size` | *number* | :heavy_minus_sign: | N/A | 3395307162 | +| `container` | *string* | :heavy_minus_sign: | N/A | mp4 | +| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | | +| `hasThumbnail` | *number* | :heavy_minus_sign: | N/A | 1 | +| `optimizedForStreaming` | *boolean* | :heavy_minus_sign: | N/A | | +| `videoProfile` | *string* | :heavy_minus_sign: | N/A | high | \ No newline at end of file diff --git a/docs/models/operations/pathparamtaskname.md b/docs/models/operations/pathparamtaskname.md new file mode 100644 index 00000000..650e15c2 --- /dev/null +++ b/docs/models/operations/pathparamtaskname.md @@ -0,0 +1,23 @@ +# PathParamTaskName + +The name of the task to be started. + + +## Values + +| Name | Value | +| --------------------------- | --------------------------- | +| `BackupDatabase` | BackupDatabase | +| `BuildGracenoteCollections` | BuildGracenoteCollections | +| `CheckForUpdates` | CheckForUpdates | +| `CleanOldBundles` | CleanOldBundles | +| `CleanOldCacheFiles` | CleanOldCacheFiles | +| `DeepMediaAnalysis` | DeepMediaAnalysis | +| `GenerateAutoTags` | GenerateAutoTags | +| `GenerateChapterThumbs` | GenerateChapterThumbs | +| `GenerateMediaIndexFiles` | GenerateMediaIndexFiles | +| `OptimizeDatabase` | OptimizeDatabase | +| `RefreshLibraries` | RefreshLibraries | +| `RefreshLocalMedia` | RefreshLocalMedia | +| `RefreshPeriodicMetadata` | RefreshPeriodicMetadata | +| `UpgradeMediaAnalysis` | UpgradeMediaAnalysis | \ No newline at end of file diff --git a/docs/models/operations/performsearchrequest.md b/docs/models/operations/performsearchrequest.md new file mode 100644 index 00000000..6d71ca60 --- /dev/null +++ b/docs/models/operations/performsearchrequest.md @@ -0,0 +1,10 @@ +# PerformSearchRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `query` | *string* | :heavy_check_mark: | The query term | arnold | +| `sectionId` | *number* | :heavy_minus_sign: | This gives context to the search, and can result in re-ordering of search result hubs | | +| `limit` | *number* | :heavy_minus_sign: | The number of items to return per hub | 5 | \ No newline at end of file diff --git a/docs/models/operations/performsearchresponse.md b/docs/models/operations/performsearchresponse.md new file mode 100644 index 00000000..a6b4edb9 --- /dev/null +++ b/docs/models/operations/performsearchresponse.md @@ -0,0 +1,10 @@ +# PerformSearchResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/performvoicesearchrequest.md b/docs/models/operations/performvoicesearchrequest.md new file mode 100644 index 00000000..61e1c187 --- /dev/null +++ b/docs/models/operations/performvoicesearchrequest.md @@ -0,0 +1,10 @@ +# PerformVoiceSearchRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `query` | *string* | :heavy_check_mark: | The query term | dead+poop | +| `sectionId` | *number* | :heavy_minus_sign: | This gives context to the search, and can result in re-ordering of search result hubs | | +| `limit` | *number* | :heavy_minus_sign: | The number of items to return per hub | 5 | \ No newline at end of file diff --git a/docs/models/operations/performvoicesearchresponse.md b/docs/models/operations/performvoicesearchresponse.md new file mode 100644 index 00000000..b345a2b1 --- /dev/null +++ b/docs/models/operations/performvoicesearchresponse.md @@ -0,0 +1,10 @@ +# PerformVoiceSearchResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/playlisttype.md b/docs/models/operations/playlisttype.md new file mode 100644 index 00000000..c09c1e58 --- /dev/null +++ b/docs/models/operations/playlisttype.md @@ -0,0 +1,12 @@ +# PlaylistType + +limit to a type of playlist. + + +## Values + +| Name | Value | +| ------- | ------- | +| `Audio` | audio | +| `Video` | video | +| `Photo` | photo | \ No newline at end of file diff --git a/docs/models/operations/provider.md b/docs/models/operations/provider.md new file mode 100644 index 00000000..560e33ad --- /dev/null +++ b/docs/models/operations/provider.md @@ -0,0 +1,10 @@ +# Provider + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `key` | *string* | :heavy_minus_sign: | N/A | /system/search | +| `title` | *string* | :heavy_minus_sign: | N/A | Local Network | +| `type` | *string* | :heavy_minus_sign: | N/A | mixed | \ No newline at end of file diff --git a/docs/models/operations/queryparamonlytransient.md b/docs/models/operations/queryparamonlytransient.md new file mode 100644 index 00000000..6ae6613e --- /dev/null +++ b/docs/models/operations/queryparamonlytransient.md @@ -0,0 +1,11 @@ +# QueryParamOnlyTransient + +Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + + +## Values + +| Name | Value | +| ------ | ------ | +| `Zero` | 0 | +| `One` | 1 | \ No newline at end of file diff --git a/docs/models/operations/queryparamsmart.md b/docs/models/operations/queryparamsmart.md new file mode 100644 index 00000000..00f49fb1 --- /dev/null +++ b/docs/models/operations/queryparamsmart.md @@ -0,0 +1,11 @@ +# QueryParamSmart + +type of playlists to return (default is all). + + +## Values + +| Name | Value | +| ------ | ------ | +| `Zero` | 0 | +| `One` | 1 | \ No newline at end of file diff --git a/docs/models/operations/queryparamtype.md b/docs/models/operations/queryparamtype.md new file mode 100644 index 00000000..86cdced7 --- /dev/null +++ b/docs/models/operations/queryparamtype.md @@ -0,0 +1,10 @@ +# QueryParamType + +`delegation` - This is the only supported `type` parameter. + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `Delegation` | delegation | \ No newline at end of file diff --git a/docs/models/operations/refreshlibraryrequest.md b/docs/models/operations/refreshlibraryrequest.md new file mode 100644 index 00000000..a4665ae3 --- /dev/null +++ b/docs/models/operations/refreshlibraryrequest.md @@ -0,0 +1,8 @@ +# RefreshLibraryRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | +| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to refresh | \ No newline at end of file diff --git a/docs/models/operations/refreshlibraryresponse.md b/docs/models/operations/refreshlibraryresponse.md new file mode 100644 index 00000000..0cd5210b --- /dev/null +++ b/docs/models/operations/refreshlibraryresponse.md @@ -0,0 +1,10 @@ +# RefreshLibraryResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/responsebody.md b/docs/models/operations/responsebody.md new file mode 100644 index 00000000..31a46b3f --- /dev/null +++ b/docs/models/operations/responsebody.md @@ -0,0 +1,8 @@ +# ResponseBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `mediaContainer` | [operations.GetAvailableClientsMediaContainer](../../models/operations/getavailableclientsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/role.md b/docs/models/operations/role.md new file mode 100644 index 00000000..bdbf71fe --- /dev/null +++ b/docs/models/operations/role.md @@ -0,0 +1,8 @@ +# Role + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `tag` | *string* | :heavy_minus_sign: | N/A | Paul Rudd | \ No newline at end of file diff --git a/docs/models/operations/scope.md b/docs/models/operations/scope.md new file mode 100644 index 00000000..ac7b0f18 --- /dev/null +++ b/docs/models/operations/scope.md @@ -0,0 +1,10 @@ +# Scope + +`all` - This is the only supported `scope` parameter. + + +## Values + +| Name | Value | +| ----- | ----- | +| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/server.md b/docs/models/operations/server.md new file mode 100644 index 00000000..a4562114 --- /dev/null +++ b/docs/models/operations/server.md @@ -0,0 +1,18 @@ +# Server + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | N/A | iPad | +| `host` | *string* | :heavy_minus_sign: | N/A | 10.10.10.102 | +| `address` | *string* | :heavy_minus_sign: | N/A | 10.10.10.102 | +| `port` | *number* | :heavy_minus_sign: | N/A | 32500 | +| `machineIdentifier` | *string* | :heavy_minus_sign: | N/A | A2E901F8-E016-43A7-ADFB-EF8CA8A4AC05 | +| `version` | *string* | :heavy_minus_sign: | N/A | 8.17 | +| `protocol` | *string* | :heavy_minus_sign: | N/A | plex | +| `product` | *string* | :heavy_minus_sign: | N/A | Plex for iOS | +| `deviceClass` | *string* | :heavy_minus_sign: | N/A | tablet | +| `protocolVersion` | *number* | :heavy_minus_sign: | N/A | 2 | +| `protocolCapabilities` | *string* | :heavy_minus_sign: | N/A | playback,playqueues,timeline,provider-playback | \ No newline at end of file diff --git a/docs/models/operations/skip.md b/docs/models/operations/skip.md new file mode 100644 index 00000000..bdc10b9e --- /dev/null +++ b/docs/models/operations/skip.md @@ -0,0 +1,11 @@ +# Skip + +Indicate that the latest version should be marked as skipped. The entry for this version will have the `state` set to `skipped`. + + +## Values + +| Name | Value | +| ------ | ------ | +| `Zero` | 0 | +| `One` | 1 | \ No newline at end of file diff --git a/docs/models/operations/smart.md b/docs/models/operations/smart.md new file mode 100644 index 00000000..9be17988 --- /dev/null +++ b/docs/models/operations/smart.md @@ -0,0 +1,11 @@ +# Smart + +whether the playlist is smart or not + + +## Values + +| Name | Value | +| ------ | ------ | +| `Zero` | 0 | +| `One` | 1 | \ No newline at end of file diff --git a/docs/models/operations/startalltasksresponse.md b/docs/models/operations/startalltasksresponse.md new file mode 100644 index 00000000..eda57272 --- /dev/null +++ b/docs/models/operations/startalltasksresponse.md @@ -0,0 +1,10 @@ +# StartAllTasksResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/starttaskrequest.md b/docs/models/operations/starttaskrequest.md new file mode 100644 index 00000000..e1c0c395 --- /dev/null +++ b/docs/models/operations/starttaskrequest.md @@ -0,0 +1,8 @@ +# StartTaskRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `taskName` | [operations.TaskName](../../models/operations/taskname.md) | :heavy_check_mark: | the name of the task to be started. | \ No newline at end of file diff --git a/docs/models/operations/starttaskresponse.md b/docs/models/operations/starttaskresponse.md new file mode 100644 index 00000000..d148bb3d --- /dev/null +++ b/docs/models/operations/starttaskresponse.md @@ -0,0 +1,10 @@ +# StartTaskResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/startuniversaltranscoderequest.md b/docs/models/operations/startuniversaltranscoderequest.md new file mode 100644 index 00000000..39dd73a8 --- /dev/null +++ b/docs/models/operations/startuniversaltranscoderequest.md @@ -0,0 +1,23 @@ +# StartUniversalTranscodeRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| `hasMDE` | *number* | :heavy_check_mark: | Whether the media item has MDE | +| `path` | *string* | :heavy_check_mark: | The path to the media item to transcode | +| `mediaIndex` | *number* | :heavy_check_mark: | The index of the media item to transcode | +| `partIndex` | *number* | :heavy_check_mark: | The index of the part to transcode | +| `protocol` | *string* | :heavy_check_mark: | The protocol to use for the transcode session | +| `fastSeek` | *number* | :heavy_minus_sign: | Whether to use fast seek or not | +| `directPlay` | *number* | :heavy_minus_sign: | Whether to use direct play or not | +| `directStream` | *number* | :heavy_minus_sign: | Whether to use direct stream or not | +| `subtitleSize` | *number* | :heavy_minus_sign: | The size of the subtitles | +| `subtites` | *string* | :heavy_minus_sign: | The subtitles | +| `audioBoost` | *number* | :heavy_minus_sign: | The audio boost | +| `location` | *string* | :heavy_minus_sign: | The location of the transcode session | +| `mediaBufferSize` | *number* | :heavy_minus_sign: | The size of the media buffer | +| `session` | *string* | :heavy_minus_sign: | The session ID | +| `addDebugOverlay` | *number* | :heavy_minus_sign: | Whether to add a debug overlay or not | +| `autoAdjustQuality` | *number* | :heavy_minus_sign: | Whether to auto adjust quality or not | \ No newline at end of file diff --git a/docs/models/operations/startuniversaltranscoderesponse.md b/docs/models/operations/startuniversaltranscoderesponse.md new file mode 100644 index 00000000..3c61ba22 --- /dev/null +++ b/docs/models/operations/startuniversaltranscoderesponse.md @@ -0,0 +1,10 @@ +# StartUniversalTranscodeResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/state.md b/docs/models/operations/state.md new file mode 100644 index 00000000..52d6ca44 --- /dev/null +++ b/docs/models/operations/state.md @@ -0,0 +1,12 @@ +# State + +The state of the media item + + +## Values + +| Name | Value | +| --------- | --------- | +| `Playing` | playing | +| `Paused` | paused | +| `Stopped` | stopped | \ No newline at end of file diff --git a/docs/models/operations/stopalltasksresponse.md b/docs/models/operations/stopalltasksresponse.md new file mode 100644 index 00000000..892d67b3 --- /dev/null +++ b/docs/models/operations/stopalltasksresponse.md @@ -0,0 +1,10 @@ +# StopAllTasksResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/stoptaskrequest.md b/docs/models/operations/stoptaskrequest.md new file mode 100644 index 00000000..a6d734ed --- /dev/null +++ b/docs/models/operations/stoptaskrequest.md @@ -0,0 +1,8 @@ +# StopTaskRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `taskName` | [operations.PathParamTaskName](../../models/operations/pathparamtaskname.md) | :heavy_check_mark: | The name of the task to be started. | \ No newline at end of file diff --git a/docs/models/operations/stoptaskresponse.md b/docs/models/operations/stoptaskresponse.md new file mode 100644 index 00000000..39c15d9f --- /dev/null +++ b/docs/models/operations/stoptaskresponse.md @@ -0,0 +1,10 @@ +# StopTaskResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/stoptranscodesessionrequest.md b/docs/models/operations/stoptranscodesessionrequest.md new file mode 100644 index 00000000..ec0ecf06 --- /dev/null +++ b/docs/models/operations/stoptranscodesessionrequest.md @@ -0,0 +1,8 @@ +# StopTranscodeSessionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `sessionKey` | *string* | :heavy_check_mark: | the Key of the transcode session to stop | zz7llzqlx8w9vnrsbnwhbmep | \ No newline at end of file diff --git a/docs/models/operations/stoptranscodesessionresponse.md b/docs/models/operations/stoptranscodesessionresponse.md new file mode 100644 index 00000000..5b372cbd --- /dev/null +++ b/docs/models/operations/stoptranscodesessionresponse.md @@ -0,0 +1,10 @@ +# StopTranscodeSessionResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/stream.md b/docs/models/operations/stream.md new file mode 100644 index 00000000..d5c5f871 --- /dev/null +++ b/docs/models/operations/stream.md @@ -0,0 +1,30 @@ +# Stream + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | 211234 | +| `streamType` | *number* | :heavy_minus_sign: | N/A | 1 | +| `default` | *boolean* | :heavy_minus_sign: | N/A | | +| `codec` | *string* | :heavy_minus_sign: | N/A | hevc | +| `index` | *number* | :heavy_minus_sign: | N/A | 0 | +| `bitrate` | *number* | :heavy_minus_sign: | N/A | 918 | +| `language` | *string* | :heavy_minus_sign: | N/A | English | +| `languageTag` | *string* | :heavy_minus_sign: | N/A | en | +| `languageCode` | *string* | :heavy_minus_sign: | N/A | eng | +| `bitDepth` | *number* | :heavy_minus_sign: | N/A | 8 | +| `chromaLocation` | *string* | :heavy_minus_sign: | N/A | left | +| `chromaSubsampling` | *string* | :heavy_minus_sign: | N/A | 4:2:0 | +| `codedHeight` | *number* | :heavy_minus_sign: | N/A | 1080 | +| `codedWidth` | *number* | :heavy_minus_sign: | N/A | 1920 | +| `colorRange` | *string* | :heavy_minus_sign: | N/A | tv | +| `frameRate` | *number* | :heavy_minus_sign: | N/A | 25 | +| `height` | *number* | :heavy_minus_sign: | N/A | 1080 | +| `level` | *number* | :heavy_minus_sign: | N/A | 120 | +| `profile` | *string* | :heavy_minus_sign: | N/A | main | +| `refFrames` | *number* | :heavy_minus_sign: | N/A | 1 | +| `width` | *number* | :heavy_minus_sign: | N/A | 1920 | +| `displayTitle` | *string* | :heavy_minus_sign: | N/A | 1080p (HEVC Main) | +| `extendedDisplayTitle` | *string* | :heavy_minus_sign: | N/A | 1080p (HEVC Main) | \ No newline at end of file diff --git a/docs/models/operations/taskname.md b/docs/models/operations/taskname.md new file mode 100644 index 00000000..bdefa9d4 --- /dev/null +++ b/docs/models/operations/taskname.md @@ -0,0 +1,23 @@ +# TaskName + +the name of the task to be started. + + +## Values + +| Name | Value | +| --------------------------- | --------------------------- | +| `BackupDatabase` | BackupDatabase | +| `BuildGracenoteCollections` | BuildGracenoteCollections | +| `CheckForUpdates` | CheckForUpdates | +| `CleanOldBundles` | CleanOldBundles | +| `CleanOldCacheFiles` | CleanOldCacheFiles | +| `DeepMediaAnalysis` | DeepMediaAnalysis | +| `GenerateAutoTags` | GenerateAutoTags | +| `GenerateChapterThumbs` | GenerateChapterThumbs | +| `GenerateMediaIndexFiles` | GenerateMediaIndexFiles | +| `OptimizeDatabase` | OptimizeDatabase | +| `RefreshLibraries` | RefreshLibraries | +| `RefreshLocalMedia` | RefreshLocalMedia | +| `RefreshPeriodicMetadata` | RefreshPeriodicMetadata | +| `UpgradeMediaAnalysis` | UpgradeMediaAnalysis | \ No newline at end of file diff --git a/docs/models/operations/tonight.md b/docs/models/operations/tonight.md new file mode 100644 index 00000000..1404bfb6 --- /dev/null +++ b/docs/models/operations/tonight.md @@ -0,0 +1,11 @@ +# Tonight + +Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install + + +## Values + +| Name | Value | +| ------ | ------ | +| `Zero` | 0 | +| `One` | 1 | \ No newline at end of file diff --git a/docs/models/operations/transcodesession.md b/docs/models/operations/transcodesession.md new file mode 100644 index 00000000..422b3d72 --- /dev/null +++ b/docs/models/operations/transcodesession.md @@ -0,0 +1,29 @@ +# TranscodeSession + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `key` | *string* | :heavy_minus_sign: | N/A | zz7llzqlx8w9vnrsbnwhbmep | +| `throttled` | *boolean* | :heavy_minus_sign: | N/A | | +| `complete` | *boolean* | :heavy_minus_sign: | N/A | | +| `progress` | *number* | :heavy_minus_sign: | N/A | 0.4000000059604645 | +| `size` | *number* | :heavy_minus_sign: | N/A | -22 | +| `speed` | *number* | :heavy_minus_sign: | N/A | 22.399999618530273 | +| `error` | *boolean* | :heavy_minus_sign: | N/A | | +| `duration` | *number* | :heavy_minus_sign: | N/A | 2561768 | +| `context` | *string* | :heavy_minus_sign: | N/A | streaming | +| `sourceVideoCodec` | *string* | :heavy_minus_sign: | N/A | h264 | +| `sourceAudioCodec` | *string* | :heavy_minus_sign: | N/A | ac3 | +| `videoDecision` | *string* | :heavy_minus_sign: | N/A | transcode | +| `audioDecision` | *string* | :heavy_minus_sign: | N/A | transcode | +| `protocol` | *string* | :heavy_minus_sign: | N/A | http | +| `container` | *string* | :heavy_minus_sign: | N/A | mkv | +| `videoCodec` | *string* | :heavy_minus_sign: | N/A | h264 | +| `audioCodec` | *string* | :heavy_minus_sign: | N/A | opus | +| `audioChannels` | *number* | :heavy_minus_sign: | N/A | 2 | +| `transcodeHwRequested` | *boolean* | :heavy_minus_sign: | N/A | | +| `timeStamp` | *number* | :heavy_minus_sign: | N/A | 1.6818695357764285e+09 | +| `maxOffsetAvailable` | *number* | :heavy_minus_sign: | N/A | 861.778 | +| `minOffsetAvailable` | *number* | :heavy_minus_sign: | N/A | 0 | \ No newline at end of file diff --git a/docs/models/operations/typet.md b/docs/models/operations/typet.md new file mode 100644 index 00000000..7d855c29 --- /dev/null +++ b/docs/models/operations/typet.md @@ -0,0 +1,12 @@ +# TypeT + +type of playlist to create + + +## Values + +| Name | Value | +| ------- | ------- | +| `Audio` | audio | +| `Video` | video | +| `Photo` | photo | \ No newline at end of file diff --git a/docs/models/operations/updateplaylistrequest.md b/docs/models/operations/updateplaylistrequest.md new file mode 100644 index 00000000..b1b8b6e1 --- /dev/null +++ b/docs/models/operations/updateplaylistrequest.md @@ -0,0 +1,8 @@ +# UpdatePlaylistRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `playlistID` | *number* | :heavy_check_mark: | the ID of the playlist | \ No newline at end of file diff --git a/docs/models/operations/updateplaylistresponse.md b/docs/models/operations/updateplaylistresponse.md new file mode 100644 index 00000000..99326061 --- /dev/null +++ b/docs/models/operations/updateplaylistresponse.md @@ -0,0 +1,10 @@ +# UpdatePlaylistResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/updateplayprogressrequest.md b/docs/models/operations/updateplayprogressrequest.md new file mode 100644 index 00000000..d471ff1d --- /dev/null +++ b/docs/models/operations/updateplayprogressrequest.md @@ -0,0 +1,10 @@ +# UpdatePlayProgressRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `key` | *string* | :heavy_check_mark: | the media key | +| `time` | *number* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. | +| `state` | *string* | :heavy_check_mark: | The playback state of the media item. | \ No newline at end of file diff --git a/docs/models/operations/updateplayprogressresponse.md b/docs/models/operations/updateplayprogressresponse.md new file mode 100644 index 00000000..73b0bb22 --- /dev/null +++ b/docs/models/operations/updateplayprogressresponse.md @@ -0,0 +1,10 @@ +# UpdatePlayProgressResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/uploadplaylistrequest.md b/docs/models/operations/uploadplaylistrequest.md new file mode 100644 index 00000000..fa7f80e0 --- /dev/null +++ b/docs/models/operations/uploadplaylistrequest.md @@ -0,0 +1,9 @@ +# 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.Force](../../models/operations/force.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.
| | \ No newline at end of file diff --git a/docs/models/operations/uploadplaylistresponse.md b/docs/models/operations/uploadplaylistresponse.md new file mode 100644 index 00000000..6a31aedf --- /dev/null +++ b/docs/models/operations/uploadplaylistresponse.md @@ -0,0 +1,10 @@ +# UploadPlaylistResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/upscale.md b/docs/models/operations/upscale.md new file mode 100644 index 00000000..d87109ce --- /dev/null +++ b/docs/models/operations/upscale.md @@ -0,0 +1,11 @@ +# Upscale + +allow images to be resized beyond native dimensions. + + +## Values + +| Name | Value | +| ------ | ------ | +| `Zero` | 0 | +| `One` | 1 | \ No newline at end of file diff --git a/docs/models/operations/writer.md b/docs/models/operations/writer.md new file mode 100644 index 00000000..6d67cadf --- /dev/null +++ b/docs/models/operations/writer.md @@ -0,0 +1,8 @@ +# Writer + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `tag` | *string* | :heavy_minus_sign: | N/A | Jeff Loveness | \ No newline at end of file diff --git a/docs/sdks/activities/README.md b/docs/sdks/activities/README.md new file mode 100644 index 00000000..63cc8109 --- /dev/null +++ b/docs/sdks/activities/README.md @@ -0,0 +1,109 @@ +# Activities +(*activities*) + +## Overview + +Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints. +Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity. +Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. Other details: +- They can contain a `progress` (from 0 to 100) marking the percent completion of the activity. +- They must contain an `type` which is used by clients to distinguish the specific activity. +- They may contain a `Context` object with attributes which associate the activity with various specific entities (items, libraries, etc.) +- The may contain a `Response` object which attributes which represent the result of the asynchronous operation. + + +### Available Operations + +* [getServerActivities](#getserveractivities) - Get Server Activities +* [cancelServerActivities](#cancelserveractivities) - Cancel Server Activities + +## getServerActivities + +Get Server Activities + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const res = await sdk.activities.getServerActivities(); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetServerActivitiesResponse](../../models/operations/getserveractivitiesresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| errors.GetServerActivitiesResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## cancelServerActivities + +Cancel Server Activities + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const activityUUID = "string"; + + const res = await sdk.activities.cancelServerActivities(activityUUID); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `activityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.CancelServerActivitiesResponse](../../models/operations/cancelserveractivitiesresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| errors.CancelServerActivitiesResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/butler/README.md b/docs/sdks/butler/README.md new file mode 100644 index 00000000..10899915 --- /dev/null +++ b/docs/sdks/butler/README.md @@ -0,0 +1,255 @@ +# Butler +(*butler*) + +## Overview + +Butler is the task manager of the Plex Media Server Ecosystem. + + +### Available Operations + +* [getButlerTasks](#getbutlertasks) - Get Butler tasks +* [startAllTasks](#startalltasks) - Start all Butler tasks +* [stopAllTasks](#stopalltasks) - Stop all Butler tasks +* [startTask](#starttask) - Start a single Butler task +* [stopTask](#stoptask) - Stop a single Butler task + +## getButlerTasks + +Returns a list of butler tasks + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const res = await sdk.butler.getButlerTasks(); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetButlerTasksResponse](../../models/operations/getbutlertasksresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.GetButlerTasksResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## startAllTasks + +This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: +1. Any tasks not scheduled to run on the current day will be skipped. +2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. +3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. +4. If we are outside the configured window, the task will start immediately. + + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const res = await sdk.butler.startAllTasks(); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.StartAllTasksResponse](../../models/operations/startalltasksresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------------- | -------------------------------- | -------------------------------- | +| errors.StartAllTasksResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## stopAllTasks + +This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue. + + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const res = await sdk.butler.stopAllTasks(); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.StopAllTasksResponse](../../models/operations/stopalltasksresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.StopAllTasksResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## startTask + +This endpoint will attempt to start a single Butler task that is enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: +1. Any tasks not scheduled to run on the current day will be skipped. +2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. +3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. +4. If we are outside the configured window, the task will start immediately. + + +### Example Usage + +```typescript +import { SDK } from "openapi"; +import { TaskName } from "openapi/models/operations"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const taskName = TaskName.CleanOldBundles; + + const res = await sdk.butler.startTask(taskName); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `taskName` | [operations.TaskName](../../models/operations/taskname.md) | :heavy_check_mark: | the name of the task to be started. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.StartTaskResponse](../../models/operations/starttaskresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.StartTaskResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## stopTask + +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. + + +### Example Usage + +```typescript +import { SDK } from "openapi"; +import { PathParamTaskName } from "openapi/models/operations"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const taskName = PathParamTaskName.BackupDatabase; + + const res = await sdk.butler.stopTask(taskName); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `taskName` | [operations.PathParamTaskName](../../models/operations/pathparamtaskname.md) | :heavy_check_mark: | The name of the task to be started. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.StopTaskResponse](../../models/operations/stoptaskresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.StopTaskResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/hubs/README.md b/docs/sdks/hubs/README.md new file mode 100644 index 00000000..ad48b750 --- /dev/null +++ b/docs/sdks/hubs/README.md @@ -0,0 +1,115 @@ +# Hubs +(*hubs*) + +## Overview + +Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows. + + +### Available Operations + +* [getGlobalHubs](#getglobalhubs) - Get Global Hubs +* [getLibraryHubs](#getlibraryhubs) - Get library specific hubs + +## getGlobalHubs + +Get Global Hubs filtered by the parameters provided. + +### Example Usage + +```typescript +import { SDK } from "openapi"; +import { OnlyTransient } from "openapi/models/operations"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const count = 1262.49; + const onlyTransient = OnlyTransient.One; + + const res = await sdk.hubs.getGlobalHubs(count, onlyTransient); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `count` | *number* | :heavy_minus_sign: | The number of items to return with each hub. | +| `onlyTransient` | [operations.OnlyTransient](../../models/operations/onlytransient.md) | :heavy_minus_sign: | Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetGlobalHubsResponse](../../models/operations/getglobalhubsresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------------- | -------------------------------- | -------------------------------- | +| errors.GetGlobalHubsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## getLibraryHubs + +This endpoint will return a list of library specific hubs + + +### Example Usage + +```typescript +import { SDK } from "openapi"; +import { QueryParamOnlyTransient } from "openapi/models/operations"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const sectionId = 6728.76; + const count = 9010.22; + const onlyTransient = QueryParamOnlyTransient.Zero; + + const res = await sdk.hubs.getLibraryHubs(sectionId, count, onlyTransient); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to query | +| `count` | *number* | :heavy_minus_sign: | The number of items to return with each hub. | +| `onlyTransient` | [operations.QueryParamOnlyTransient](../../models/operations/queryparamonlytransient.md) | :heavy_minus_sign: | Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetLibraryHubsResponse](../../models/operations/getlibraryhubsresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.GetLibraryHubsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/library/README.md b/docs/sdks/library/README.md new file mode 100644 index 00000000..a599b36b --- /dev/null +++ b/docs/sdks/library/README.md @@ -0,0 +1,627 @@ +# Library +(*library*) + +## Overview + +API Calls interacting with Plex Media Server Libraries + + +### Available Operations + +* [getFileHash](#getfilehash) - Get Hash Value +* [getRecentlyAdded](#getrecentlyadded) - Get Recently Added +* [getLibraries](#getlibraries) - Get All Libraries +* [getLibrary](#getlibrary) - Get Library Details +* [deleteLibrary](#deletelibrary) - Delete Library Section +* [getLibraryItems](#getlibraryitems) - Get Library Items +* [refreshLibrary](#refreshlibrary) - Refresh Library +* [getLatestLibraryItems](#getlatestlibraryitems) - Get Latest Library Items +* [getCommonLibraryItems](#getcommonlibraryitems) - Get Common Library Items +* [getMetadata](#getmetadata) - Get Items Metadata +* [getMetadataChildren](#getmetadatachildren) - Get Items Children +* [getOnDeck](#getondeck) - Get On Deck + +## getFileHash + +This resource returns hash values for local files + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const url = "file://C:\Image.png&type=13"; + const type = 4462.17; + + const res = await sdk.library.getFileHash(url, type); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `url` | *string* | :heavy_check_mark: | This is the path to the local file, must be prefixed by `file://` | [object Object] | +| `type` | *number* | :heavy_minus_sign: | Item type | | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | + + +### Response + +**Promise<[operations.GetFileHashResponse](../../models/operations/getfilehashresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| errors.GetFileHashResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## getRecentlyAdded + +This endpoint will return the recently added content. + + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const res = await sdk.library.getRecentlyAdded(); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetRecentlyAddedResponse](../../models/operations/getrecentlyaddedresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| errors.GetRecentlyAddedResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## getLibraries + +A library section (commonly referred to as just a library) is a collection of media. +Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. +For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat. + +Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts. +This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year). + + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const res = await sdk.library.getLibraries(); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetLibrariesResponse](../../models/operations/getlibrariesresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.GetLibrariesResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## getLibrary + +Returns details for the library. This can be thought of as an interstitial endpoint because it contains information about the library, rather than content itself. These details are: + +- A list of `Directory` objects: These used to be used by clients to build a menuing system. There are four flavors of directory found here: + - Primary: (e.g. all, On Deck) These are still used in some clients to provide "shortcuts" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users. + - Secondary: These are marked with `secondary="1"` and were used by old clients to provide nested menus allowing for primative (but structured) navigation. + - Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there's a completely obsolete entry marked `search="1"` which used to be used to allow clients to build search dialogs on the fly. +- A list of `Type` objects: These represent the types of things found in this library, and for each one, a list of `Filter` and `Sort` objects. These can be used to build rich controls around a grid of media to allow filtering and organizing. Note that these filters and sorts are optional, and without them, the client won't render any filtering controls. The `Type` object contains: + - `key`: This provides the root endpoint returning the actual media list for the type. + - `type`: This is the metadata type for the type (if a standard Plex type). + - `title`: The title for for the content of this type (e.g. "Movies"). +- Each `Filter` object contains a description of the filter. Note that it is not an exhaustive list of the full media query language, but an inportant subset useful for top-level API. + - `filter`: This represents the filter name used for the filter, which can be used to construct complex media queries with. + - `filterType`: This is either `string`, `integer`, or `boolean`, and describes the type of values used for the filter. + - `key`: This provides the endpoint where the possible range of values for the filter can be retrieved (e.g. for a "Genre" filter, it returns a list of all the genres in the library). This will include a `type` argument that matches the metadata type of the Type element. + - `title`: The title for the filter. +- Each `Sort` object contains a description of the sort field. + - `defaultDirection`: Can be either `asc` or `desc`, and specifies the default direction for the sort field (e.g. titles default to alphabetically ascending). + - `descKey` and `key`: Contains the parameters passed to the `sort=...` media query for each direction of the sort. + - `title`: The title of the field. + + +### Example Usage + +```typescript +import { SDK } from "openapi"; +import { IncludeDetails } from "openapi/models/operations"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const sectionId = 1000; + const includeDetails = IncludeDetails.Zero; + + const res = await sdk.library.getLibrary(sectionId, includeDetails); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to query | [object Object] | +| `includeDetails` | [operations.IncludeDetails](../../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. | | + + +### Response + +**Promise<[operations.GetLibraryResponse](../../models/operations/getlibraryresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ----------------------------- | ----------------------------- | ----------------------------- | +| errors.GetLibraryResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## deleteLibrary + +Delate a library using a specific section + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const sectionId = 1000; + + const res = await sdk.library.deleteLibrary(sectionId); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to query | [object Object] | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | + + +### Response + +**Promise<[operations.DeleteLibraryResponse](../../models/operations/deletelibraryresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------------- | -------------------------------- | -------------------------------- | +| errors.DeleteLibraryResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## getLibraryItems + +This endpoint will return a list of library items filtered by the filter and type provided + + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const sectionId = 4510.92; + const type = 760.66; + const filter = "string"; + + const res = await sdk.library.getLibraryItems(sectionId, type, filter); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to query | +| `type` | *number* | :heavy_minus_sign: | item type | +| `filter` | *string* | :heavy_minus_sign: | the filter parameter | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetLibraryItemsResponse](../../models/operations/getlibraryitemsresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.GetLibraryItemsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## refreshLibrary + +This endpoint Refreshes the library. + + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const sectionId = 934.16; + + const res = await sdk.library.refreshLibrary(sectionId); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to refresh | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.RefreshLibraryResponse](../../models/operations/refreshlibraryresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.RefreshLibraryResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## getLatestLibraryItems + +This endpoint will return a list of the latest library items filtered by the filter and type provided + + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const sectionId = 7171.54; + const type = 8015.12; + const filter = "string"; + + const res = await sdk.library.getLatestLibraryItems(sectionId, type, filter); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to query | +| `type` | *number* | :heavy_check_mark: | item type | +| `filter` | *string* | :heavy_minus_sign: | the filter parameter | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetLatestLibraryItemsResponse](../../models/operations/getlatestlibraryitemsresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| errors.GetLatestLibraryItemsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## getCommonLibraryItems + +Represents a "Common" item. It contains only the common attributes of the items selected by the provided filter + + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const sectionId = 2710.37; + const type = 2760.31; + const filter = "string"; + + const res = await sdk.library.getCommonLibraryItems(sectionId, type, filter); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to query | +| `type` | *number* | :heavy_check_mark: | item type | +| `filter` | *string* | :heavy_minus_sign: | the filter parameter | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetCommonLibraryItemsResponse](../../models/operations/getcommonlibraryitemsresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| errors.GetCommonLibraryItemsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## getMetadata + +This endpoint will return the metadata of a library item specified with the ratingKey. + + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const ratingKey = 8382.31; + + const res = await sdk.library.getMetadata(ratingKey); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `ratingKey` | *number* | :heavy_check_mark: | the id of the library item to return the children of. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetMetadataResponse](../../models/operations/getmetadataresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| errors.GetMetadataResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## getMetadataChildren + +This endpoint will return the children of of a library item specified with the ratingKey. + + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const ratingKey = 1539.14; + + const res = await sdk.library.getMetadataChildren(ratingKey); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `ratingKey` | *number* | :heavy_check_mark: | the id of the library item to return the children of. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetMetadataChildrenResponse](../../models/operations/getmetadatachildrenresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| errors.GetMetadataChildrenResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## getOnDeck + +This endpoint will return the on deck content. + + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const res = await sdk.library.getOnDeck(); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetOnDeckResponse](../../models/operations/getondeckresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.GetOnDeckResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/log/README.md b/docs/sdks/log/README.md new file mode 100644 index 00000000..6a8aeeb3 --- /dev/null +++ b/docs/sdks/log/README.md @@ -0,0 +1,156 @@ +# Log +(*log*) + +## Overview + +Submit logs to the Log Handler for Plex Media Server + + +### Available Operations + +* [logLine](#logline) - Logging a single line message. +* [logMultiLine](#logmultiline) - Logging a multi-line message +* [enablePaperTrail](#enablepapertrail) - Enabling Papertrail + +## logLine + +This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log. + + +### Example Usage + +```typescript +import { SDK } from "openapi"; +import { Level } from "openapi/models/operations"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const level = Level.Three; + const message = "string"; + const source = "string"; + + const res = await sdk.log.logLine(level, message, source); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `level` | [operations.Level](../../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. | | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | + + +### Response + +**Promise<[operations.LogLineResponse](../../models/operations/loglineresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.LogLineResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## logMultiLine + +This endpoint will write multiple lines to the main Plex Media Server log in a single request. It takes a set of query strings as would normally sent to the above GET endpoint as a linefeed-separated block of POST data. The parameters for each query string match as above. + + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const res = await sdk.log.logMultiLine(); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.LogMultiLineResponse](../../models/operations/logmultilineresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.LogMultiLineResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## enablePaperTrail + +This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time. + + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const res = await sdk.log.enablePaperTrail(); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.EnablePaperTrailResponse](../../models/operations/enablepapertrailresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| errors.EnablePaperTrailResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/media/README.md b/docs/sdks/media/README.md new file mode 100644 index 00000000..1edbfd62 --- /dev/null +++ b/docs/sdks/media/README.md @@ -0,0 +1,159 @@ +# Media +(*media*) + +## Overview + +API Calls interacting with Plex Media Server Media + + +### Available Operations + +* [markPlayed](#markplayed) - Mark Media Played +* [markUnplayed](#markunplayed) - Mark Media Unplayed +* [updatePlayProgress](#updateplayprogress) - Update Media Play Progress + +## markPlayed + +This will mark the provided media key as Played. + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const key = 59398; + + const res = await sdk.media.markPlayed(key); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `key` | *number* | :heavy_check_mark: | The media key to mark as played | [object Object] | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | + + +### Response + +**Promise<[operations.MarkPlayedResponse](../../models/operations/markplayedresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ----------------------------- | ----------------------------- | ----------------------------- | +| errors.MarkPlayedResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## markUnplayed + +This will mark the provided media key as Unplayed. + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const key = 59398; + + const res = await sdk.media.markUnplayed(key); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `key` | *number* | :heavy_check_mark: | The media key to mark as Unplayed | [object Object] | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | + + +### Response + +**Promise<[operations.MarkUnplayedResponse](../../models/operations/markunplayedresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.MarkUnplayedResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## updatePlayProgress + +This API command can be used to update the play progress of a media item. + + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const key = "string"; + const time = 6900.91; + const state = "string"; + + const res = await sdk.media.updatePlayProgress(key, time, state); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `key` | *string* | :heavy_check_mark: | the media key | +| `time` | *number* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. | +| `state` | *string* | :heavy_check_mark: | The playback state of the media item. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.UpdatePlayProgressResponse](../../models/operations/updateplayprogressresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| errors.UpdatePlayProgressResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/playlists/README.md b/docs/sdks/playlists/README.md new file mode 100644 index 00000000..3e79a6a2 --- /dev/null +++ b/docs/sdks/playlists/README.md @@ -0,0 +1,475 @@ +# Playlists +(*playlists*) + +## 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"). +They can be organized in (optionally nesting) folders. +Retrieving a playlist, or its items, will trigger a refresh of its metadata. +This may cause the duration and number of items to change. + + +### Available Operations + +* [createPlaylist](#createplaylist) - Create a Playlist +* [getPlaylists](#getplaylists) - Get All Playlists +* [getPlaylist](#getplaylist) - Retrieve Playlist +* [deletePlaylist](#deleteplaylist) - Deletes a Playlist +* [updatePlaylist](#updateplaylist) - Update a Playlist +* [getPlaylistContents](#getplaylistcontents) - Retrieve Playlist Contents +* [clearPlaylistContents](#clearplaylistcontents) - Delete Playlist Contents +* [addPlaylistContents](#addplaylistcontents) - Adding to a Playlist +* [uploadPlaylist](#uploadplaylist) - Upload Playlist + +## createPlaylist + +Create a new playlist. By default the playlist is blank. To create a playlist along with a first item, pass: +- `uri` - The content URI for what we're playing (e.g. `library://...`). +- `playQueueID` - To create a playlist from an existing play queue. + + +### Example Usage + +```typescript +import { SDK } from "openapi"; +import { Smart, TypeT } from "openapi/models/operations"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const res = await sdk.playlists.createPlaylist({ + title: "string", + type: TypeT.Photo, + smart: Smart.One, + }); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreatePlaylistRequest](../../models/operations/createplaylistrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.CreatePlaylistResponse](../../models/operations/createplaylistresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.CreatePlaylistResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## getPlaylists + +Get All Playlists given the specified filters. + +### Example Usage + +```typescript +import { SDK } from "openapi"; +import { PlaylistType, QueryParamSmart } from "openapi/models/operations"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const playlistType = PlaylistType.Audio; + const smart = QueryParamSmart.Zero; + + const res = await sdk.playlists.getPlaylists(playlistType, smart); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `playlistType` | [operations.PlaylistType](../../models/operations/playlisttype.md) | :heavy_minus_sign: | limit to a type of playlist. | +| `smart` | [operations.QueryParamSmart](../../models/operations/queryparamsmart.md) | :heavy_minus_sign: | type of playlists to return (default is all). | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetPlaylistsResponse](../../models/operations/getplaylistsresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.GetPlaylistsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## getPlaylist + +Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item: +Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing. + + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const playlistID = 4109.48; + + const res = await sdk.playlists.getPlaylist(playlistID); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `playlistID` | *number* | :heavy_check_mark: | the ID of the playlist | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetPlaylistResponse](../../models/operations/getplaylistresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| errors.GetPlaylistResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## deletePlaylist + +This endpoint will delete a playlist + + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const playlistID = 216.22; + + const res = await sdk.playlists.deletePlaylist(playlistID); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `playlistID` | *number* | :heavy_check_mark: | the ID of the playlist | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.DeletePlaylistResponse](../../models/operations/deleteplaylistresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.DeletePlaylistResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## updatePlaylist + +From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}` + + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const playlistID = 3915; + + const res = await sdk.playlists.updatePlaylist(playlistID); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `playlistID` | *number* | :heavy_check_mark: | the ID of the playlist | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.UpdatePlaylistResponse](../../models/operations/updateplaylistresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.UpdatePlaylistResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## getPlaylistContents + +Gets the contents of a playlist. Should be paged by clients via standard mechanisms. +By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter. +For example, you could use this to display a list of recently added albums vis a smart playlist. +Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items. + + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const playlistID = 5004.46; + const type = 9403.59; + + const res = await sdk.playlists.getPlaylistContents(playlistID, type); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `playlistID` | *number* | :heavy_check_mark: | the ID of the playlist | +| `type` | *number* | :heavy_check_mark: | the metadata type of the item to return | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetPlaylistContentsResponse](../../models/operations/getplaylistcontentsresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| errors.GetPlaylistContentsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## clearPlaylistContents + +Clears a playlist, only works with dumb playlists. Returns the playlist. + + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const playlistID = 1893.18; + + const res = await sdk.playlists.clearPlaylistContents(playlistID); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `playlistID` | *number* | :heavy_check_mark: | the ID of the playlist | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.ClearPlaylistContentsResponse](../../models/operations/clearplaylistcontentsresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| errors.ClearPlaylistContentsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## addPlaylistContents + +Adds a generator to a playlist, same parameters as the POST above. With a dumb playlist, this adds the specified items to the playlist. +With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist. + + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const playlistID = 8502.01; + const uri = "library://.."; + const playQueueID = 123; + + const res = await sdk.playlists.addPlaylistContents(playlistID, uri, playQueueID); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `playlistID` | *number* | :heavy_check_mark: | the ID of the playlist | | +| `uri` | *string* | :heavy_check_mark: | the content URI for the playlist | [object Object] | +| `playQueueID` | *number* | :heavy_check_mark: | the play queue to add to a playlist | [object Object] | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | + + +### Response + +**Promise<[operations.AddPlaylistContentsResponse](../../models/operations/addplaylistcontentsresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| errors.AddPlaylistContentsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## uploadPlaylist + +Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file. + + +### Example Usage + +```typescript +import { SDK } from "openapi"; +import { Force } from "openapi/models/operations"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const path = "/home/barkley/playlist.m3u"; + const force = Force.Zero; + + const res = await sdk.playlists.uploadPlaylist(path, force); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +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.Force](../../models/operations/force.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.
| | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | + + +### Response + +**Promise<[operations.UploadPlaylistResponse](../../models/operations/uploadplaylistresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.UploadPlaylistResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/sdk/README.md b/docs/sdks/sdk/README.md new file mode 100644 index 00000000..90cf8ccb --- /dev/null +++ b/docs/sdks/sdk/README.md @@ -0,0 +1,9 @@ +# SDK + + +## Overview + +An Open API Spec for interacting with Plex.tv and Plex Servers + +### Available Operations + diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md new file mode 100644 index 00000000..bfeab4af --- /dev/null +++ b/docs/sdks/search/README.md @@ -0,0 +1,178 @@ +# Search +(*search*) + +## Overview + +API Calls that perform search operations with Plex Media Server + + +### Available Operations + +* [performSearch](#performsearch) - Perform a search +* [performVoiceSearch](#performvoicesearch) - Perform a voice search +* [getSearchResults](#getsearchresults) - Get Search Results + +## performSearch + +This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor). + +In the response's items, the following extra attributes are returned to further describe or disambiguate the result: + +- `reason`: The reason for the result, if not because of a direct search term match; can be either: + - `section`: There are multiple identical results from different sections. + - `originalTitle`: There was a search term match from the original title field (sometimes those can be very different or in a foreign language). + - ``: If the reason for the result is due to a result in another hub, the source hub identifier is returned. For example, if the search is for "dylan" then Bob Dylan may be returned as an artist result, an a few of his albums returned as album results with a reason code of `artist` (the identifier of that particular hub). Or if the search is for "arnold", there might be movie results returned with a reason of `actor` +- `reasonTitle`: The string associated with the reason code. For a section reason, it'll be the section name; For a hub identifier, it'll be a string associated with the match (e.g. `Arnold Schwarzenegger` for movies which were returned because the search was for "arnold"). +- `reasonID`: The ID of the item associated with the reason for the result. This might be a section ID, a tag ID, an artist ID, or a show ID. + +This request is intended to be very fast, and called as the user types. + + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const query = "dylan"; + const sectionId = 1516.53; + const limit = 5; + + const res = await sdk.search.performSearch(query, sectionId, limit); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `query` | *string* | :heavy_check_mark: | The query term | [object Object] | +| `sectionId` | *number* | :heavy_minus_sign: | This gives context to the search, and can result in re-ordering of search result hubs | | +| `limit` | *number* | :heavy_minus_sign: | The number of items to return per hub | [object Object] | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | + + +### Response + +**Promise<[operations.PerformSearchResponse](../../models/operations/performsearchresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------------- | -------------------------------- | -------------------------------- | +| errors.PerformSearchResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## performVoiceSearch + +This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint. +It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint. +Whenever possible, clients should limit the search to the appropriate type. +Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality. + + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const query = "dead+poop"; + const sectionId = 4094.8; + const limit = 5; + + const res = await sdk.search.performVoiceSearch(query, sectionId, limit); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `query` | *string* | :heavy_check_mark: | The query term | [object Object] | +| `sectionId` | *number* | :heavy_minus_sign: | This gives context to the search, and can result in re-ordering of search result hubs | | +| `limit` | *number* | :heavy_minus_sign: | The number of items to return per hub | [object Object] | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | + + +### Response + +**Promise<[operations.PerformVoiceSearchResponse](../../models/operations/performvoicesearchresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| errors.PerformVoiceSearchResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## getSearchResults + +This will search the database for the string provided. + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const query = "110"; + + const res = await sdk.search.getSearchResults(query); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `query` | *string* | :heavy_check_mark: | The search query string to use | [object Object] | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | + + +### Response + +**Promise<[operations.GetSearchResultsResponse](../../models/operations/getsearchresultsresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| errors.GetSearchResultsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/security/README.md b/docs/sdks/security/README.md new file mode 100644 index 00000000..f36e1344 --- /dev/null +++ b/docs/sdks/security/README.md @@ -0,0 +1,112 @@ +# Security +(*security*) + +## Overview + +API Calls against Security for Plex Media Server + + +### Available Operations + +* [getTransientToken](#gettransienttoken) - Get a Transient Token. +* [getSourceConnectionInformation](#getsourceconnectioninformation) - Get Source Connection Information + +## getTransientToken + +This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted. + + +### Example Usage + +```typescript +import { SDK } from "openapi"; +import { QueryParamType, Scope } from "openapi/models/operations"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const type = QueryParamType.Delegation; + const scope = Scope.All; + + const res = await sdk.security.getTransientToken(type, scope); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `type` | [operations.QueryParamType](../../models/operations/queryparamtype.md) | :heavy_check_mark: | `delegation` - This is the only supported `type` parameter. | +| `scope` | [operations.Scope](../../models/operations/scope.md) | :heavy_check_mark: | `all` - This is the only supported `scope` parameter. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetTransientTokenResponse](../../models/operations/gettransienttokenresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | +| errors.GetTransientTokenResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## getSourceConnectionInformation + +If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token. +Note: requires Plex Media Server >= 1.15.4. + + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const source = "server://client-identifier"; + + const res = await sdk.security.getSourceConnectionInformation(source); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `source` | *string* | :heavy_check_mark: | The source identifier with an included prefix. | [object Object] | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | + + +### Response + +**Promise<[operations.GetSourceConnectionInformationResponse](../../models/operations/getsourceconnectioninformationresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| errors.GetSourceConnectionInformationResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/server/README.md b/docs/sdks/server/README.md new file mode 100644 index 00000000..3efb262f --- /dev/null +++ b/docs/sdks/server/README.md @@ -0,0 +1,381 @@ +# Server +(*server*) + +## Overview + +Operations against the Plex Media Server System. + + +### Available Operations + +* [getServerCapabilities](#getservercapabilities) - Server Capabilities +* [getServerPreferences](#getserverpreferences) - Get Server Preferences +* [getAvailableClients](#getavailableclients) - Get Available Clients +* [getDevices](#getdevices) - Get Devices +* [getServerIdentity](#getserveridentity) - Get Server Identity +* [getMyPlexAccount](#getmyplexaccount) - Get MyPlex Account +* [getResizedPhoto](#getresizedphoto) - Get a Resized Photo +* [getServerList](#getserverlist) - Get Server List + +## getServerCapabilities + +Server Capabilities + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const res = await sdk.server.getServerCapabilities(); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetServerCapabilitiesResponse](../../models/operations/getservercapabilitiesresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| errors.GetServerCapabilitiesResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## getServerPreferences + +Get Server Preferences + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const res = await sdk.server.getServerPreferences(); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetServerPreferencesResponse](../../models/operations/getserverpreferencesresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| errors.GetServerPreferencesResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## getAvailableClients + +Get Available Clients + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const res = await sdk.server.getAvailableClients(); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetAvailableClientsResponse](../../models/operations/getavailableclientsresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| errors.GetAvailableClientsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## getDevices + +Get Devices + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const res = await sdk.server.getDevices(); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetDevicesResponse](../../models/operations/getdevicesresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ----------------------------- | ----------------------------- | ----------------------------- | +| errors.GetDevicesResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## getServerIdentity + +Get Server Identity + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const res = await sdk.server.getServerIdentity(); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetServerIdentityResponse](../../models/operations/getserveridentityresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | +| errors.GetServerIdentityResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## getMyPlexAccount + +Returns MyPlex Account Information + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const res = await sdk.server.getMyPlexAccount(); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetMyPlexAccountResponse](../../models/operations/getmyplexaccountresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| errors.GetMyPlexAccountResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## getResizedPhoto + +Plex's Photo transcoder is used throughout the service to serve images at specified sizes. + + +### Example Usage + +```typescript +import { SDK } from "openapi"; +import { MinSize, Upscale } from "openapi/models/operations"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const res = await sdk.server.getResizedPhoto({ + width: 110, + height: 165, + opacity: 643869, + blur: 4000, + minSize: MinSize.Zero, + upscale: Upscale.Zero, + url: "/library/metadata/49564/thumb/1654258204", + }); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetResizedPhotoRequest](../../models/operations/getresizedphotorequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetResizedPhotoResponse](../../models/operations/getresizedphotoresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.GetResizedPhotoResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## getServerList + +Get Server List + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const res = await sdk.server.getServerList(); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetServerListResponse](../../models/operations/getserverlistresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------------- | -------------------------------- | -------------------------------- | +| errors.GetServerListResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/sessions/README.md b/docs/sdks/sessions/README.md new file mode 100644 index 00000000..f97da0a5 --- /dev/null +++ b/docs/sdks/sessions/README.md @@ -0,0 +1,193 @@ +# Sessions +(*sessions*) + +## Overview + +API Calls that perform search operations with Plex Media Server Sessions + + +### Available Operations + +* [getSessions](#getsessions) - Get Active Sessions +* [getSessionHistory](#getsessionhistory) - Get Session History +* [getTranscodeSessions](#gettranscodesessions) - Get Transcode Sessions +* [stopTranscodeSession](#stoptranscodesession) - Stop a Transcode Session + +## getSessions + +This will retrieve the "Now Playing" Information of the PMS. + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const res = await sdk.sessions.getSessions(); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetSessionsResponse](../../models/operations/getsessionsresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| errors.GetSessionsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## getSessionHistory + +This will Retrieve a listing of all history views. + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const res = await sdk.sessions.getSessionHistory(); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetSessionHistoryResponse](../../models/operations/getsessionhistoryresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | +| errors.GetSessionHistoryResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## getTranscodeSessions + +Get Transcode Sessions + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const res = await sdk.sessions.getTranscodeSessions(); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetTranscodeSessionsResponse](../../models/operations/gettranscodesessionsresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| errors.GetTranscodeSessionsResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## stopTranscodeSession + +Stop a Transcode Session + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const sessionKey = "zz7llzqlx8w9vnrsbnwhbmep"; + + const res = await sdk.sessions.stopTranscodeSession(sessionKey); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `sessionKey` | *string* | :heavy_check_mark: | the Key of the transcode session to stop | [object Object] | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | + + +### Response + +**Promise<[operations.StopTranscodeSessionResponse](../../models/operations/stoptranscodesessionresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| errors.StopTranscodeSessionResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/updater/README.md b/docs/sdks/updater/README.md new file mode 100644 index 00000000..0032a298 --- /dev/null +++ b/docs/sdks/updater/README.md @@ -0,0 +1,157 @@ +# Updater +(*updater*) + +## Overview + +This describes the API for searching and applying updates to the Plex Media Server. +Updates to the status can be observed via the Event API. + + +### Available Operations + +* [getUpdateStatus](#getupdatestatus) - Querying status of updates +* [checkForUpdates](#checkforupdates) - Checking for updates +* [applyUpdates](#applyupdates) - Apply Updates + +## getUpdateStatus + +Querying status of updates + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const res = await sdk.updater.getUpdateStatus(); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetUpdateStatusResponse](../../models/operations/getupdatestatusresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.GetUpdateStatusResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## checkForUpdates + +Checking for updates + +### Example Usage + +```typescript +import { SDK } from "openapi"; +import { Download } from "openapi/models/operations"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const download = Download.One; + + const res = await sdk.updater.checkForUpdates(download); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `download` | [operations.Download](../../models/operations/download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.CheckForUpdatesResponse](../../models/operations/checkforupdatesresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.CheckForUpdatesResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## applyUpdates + +Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed + + +### Example Usage + +```typescript +import { SDK } from "openapi"; +import { Skip, Tonight } from "openapi/models/operations"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const tonight = Tonight.One; + const skip = Skip.Zero; + + const res = await sdk.updater.applyUpdates(tonight, skip); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `tonight` | [operations.Tonight](../../models/operations/tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install | +| `skip` | [operations.Skip](../../models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The entry for this version will have the `state` set to `skipped`. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.ApplyUpdatesResponse](../../models/operations/applyupdatesresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ApplyUpdatesResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/video/README.md b/docs/sdks/video/README.md new file mode 100644 index 00000000..70214aa3 --- /dev/null +++ b/docs/sdks/video/README.md @@ -0,0 +1,120 @@ +# Video +(*video*) + +## Overview + +API Calls that perform operations with Plex Media Server Videos + + +### Available Operations + +* [startUniversalTranscode](#startuniversaltranscode) - Start Universal Transcode +* [getTimeline](#gettimeline) - Get the timeline for a media item + +## startUniversalTranscode + +Begin a Universal Transcode Session + +### Example Usage + +```typescript +import { SDK } from "openapi"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const res = await sdk.video.startUniversalTranscode({ + hasMDE: 8924.99, + path: "/etc/mail", + mediaIndex: 9962.95, + partIndex: 1232.82, + protocol: "string", + }); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.StartUniversalTranscodeRequest](../../models/operations/startuniversaltranscoderequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.StartUniversalTranscodeResponse](../../models/operations/startuniversaltranscoderesponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| errors.StartUniversalTranscodeResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## getTimeline + +Get the timeline for a media item + +### Example Usage + +```typescript +import { SDK } from "openapi"; +import { State } from "openapi/models/operations"; + +async function run() { + const sdk = new SDK({ + accessToken: "", + }); + + const res = await sdk.video.getTimeline({ + ratingKey: 716.56, + key: "", + state: State.Paused, + hasMDE: 7574.33, + time: 3327.51, + duration: 7585.39, + context: "string", + playQueueItemID: 1406.21, + playBackTime: 2699.34, + row: 3536.42, + }); + + if (res?.statusCode !== 200) { + throw new Error("Unexpected status code: " + res?.statusCode || "-"); + } + + // handle response +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetTimelineRequest](../../models/operations/gettimelinerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetTimelineResponse](../../models/operations/gettimelineresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| errors.GetTimelineResponseBody | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/files.gen b/files.gen new file mode 100644 index 00000000..0d562158 --- /dev/null +++ b/files.gen @@ -0,0 +1,457 @@ +src/sdk/server.ts +src/sdk/media.ts +src/sdk/activities.ts +src/sdk/butler.ts +src/sdk/hubs.ts +src/sdk/search.ts +src/sdk/library.ts +src/sdk/log.ts +src/sdk/playlists.ts +src/sdk/security.ts +src/sdk/sessions.ts +src/sdk/updater.ts +src/sdk/video.ts +src/sdk/sdk.ts +.eslintrc.js +.npmignore +package-lock.json +package.json +src/index.ts +src/lib/base64.ts +src/lib/config.ts +src/lib/encodings.ts +src/lib/http.ts +src/lib/retries.ts +src/lib/sdks.ts +src/lib/security.ts +src/lib/url.ts +src/sdk/index.ts +src/models/errors/sdkerror.ts +src/types/blobs.ts +src/types/decimal.ts +src/types/index.ts +src/types/operations.ts +src/types/rfcdate.ts +tsconfig.json +src/models/operations/getservercapabilities.ts +src/models/operations/getserverpreferences.ts +src/models/operations/getavailableclients.ts +src/models/operations/getdevices.ts +src/models/operations/getserveridentity.ts +src/models/operations/getmyplexaccount.ts +src/models/operations/getresizedphoto.ts +src/models/operations/getserverlist.ts +src/models/operations/markplayed.ts +src/models/operations/markunplayed.ts +src/models/operations/updateplayprogress.ts +src/models/operations/getserveractivities.ts +src/models/operations/cancelserveractivities.ts +src/models/operations/getbutlertasks.ts +src/models/operations/startalltasks.ts +src/models/operations/stopalltasks.ts +src/models/operations/starttask.ts +src/models/operations/stoptask.ts +src/models/operations/getglobalhubs.ts +src/models/operations/getlibraryhubs.ts +src/models/operations/performsearch.ts +src/models/operations/performvoicesearch.ts +src/models/operations/getsearchresults.ts +src/models/operations/getfilehash.ts +src/models/operations/getrecentlyadded.ts +src/models/operations/getlibraries.ts +src/models/operations/getlibrary.ts +src/models/operations/deletelibrary.ts +src/models/operations/getlibraryitems.ts +src/models/operations/refreshlibrary.ts +src/models/operations/getlatestlibraryitems.ts +src/models/operations/getcommonlibraryitems.ts +src/models/operations/getmetadata.ts +src/models/operations/getmetadatachildren.ts +src/models/operations/getondeck.ts +src/models/operations/logline.ts +src/models/operations/logmultiline.ts +src/models/operations/enablepapertrail.ts +src/models/operations/createplaylist.ts +src/models/operations/getplaylists.ts +src/models/operations/getplaylist.ts +src/models/operations/deleteplaylist.ts +src/models/operations/updateplaylist.ts +src/models/operations/getplaylistcontents.ts +src/models/operations/clearplaylistcontents.ts +src/models/operations/addplaylistcontents.ts +src/models/operations/uploadplaylist.ts +src/models/operations/gettransienttoken.ts +src/models/operations/getsourceconnectioninformation.ts +src/models/operations/getsessions.ts +src/models/operations/getsessionhistory.ts +src/models/operations/gettranscodesessions.ts +src/models/operations/stoptranscodesession.ts +src/models/operations/getupdatestatus.ts +src/models/operations/checkforupdates.ts +src/models/operations/applyupdates.ts +src/models/operations/startuniversaltranscode.ts +src/models/operations/gettimeline.ts +src/models/errors/getservercapabilities.ts +src/models/errors/getserverpreferences.ts +src/models/errors/getavailableclients.ts +src/models/errors/getdevices.ts +src/models/errors/getserveridentity.ts +src/models/errors/getmyplexaccount.ts +src/models/errors/getresizedphoto.ts +src/models/errors/getserverlist.ts +src/models/errors/markplayed.ts +src/models/errors/markunplayed.ts +src/models/errors/updateplayprogress.ts +src/models/errors/getserveractivities.ts +src/models/errors/cancelserveractivities.ts +src/models/errors/getbutlertasks.ts +src/models/errors/startalltasks.ts +src/models/errors/stopalltasks.ts +src/models/errors/starttask.ts +src/models/errors/stoptask.ts +src/models/errors/getglobalhubs.ts +src/models/errors/getlibraryhubs.ts +src/models/errors/performsearch.ts +src/models/errors/performvoicesearch.ts +src/models/errors/getsearchresults.ts +src/models/errors/getfilehash.ts +src/models/errors/getrecentlyadded.ts +src/models/errors/getlibraries.ts +src/models/errors/getlibrary.ts +src/models/errors/deletelibrary.ts +src/models/errors/getlibraryitems.ts +src/models/errors/refreshlibrary.ts +src/models/errors/getlatestlibraryitems.ts +src/models/errors/getcommonlibraryitems.ts +src/models/errors/getmetadata.ts +src/models/errors/getmetadatachildren.ts +src/models/errors/getondeck.ts +src/models/errors/logline.ts +src/models/errors/logmultiline.ts +src/models/errors/enablepapertrail.ts +src/models/errors/createplaylist.ts +src/models/errors/getplaylists.ts +src/models/errors/getplaylist.ts +src/models/errors/deleteplaylist.ts +src/models/errors/updateplaylist.ts +src/models/errors/getplaylistcontents.ts +src/models/errors/clearplaylistcontents.ts +src/models/errors/addplaylistcontents.ts +src/models/errors/uploadplaylist.ts +src/models/errors/gettransienttoken.ts +src/models/errors/getsourceconnectioninformation.ts +src/models/errors/getsessions.ts +src/models/errors/getsessionhistory.ts +src/models/errors/gettranscodesessions.ts +src/models/errors/stoptranscodesession.ts +src/models/errors/getupdatestatus.ts +src/models/errors/checkforupdates.ts +src/models/errors/applyupdates.ts +src/models/errors/startuniversaltranscode.ts +src/models/errors/gettimeline.ts +src/models/components/security.ts +src/models/errors/index.ts +src/models/operations/index.ts +src/models/components/index.ts +docs/models/operations/directory.md +docs/models/operations/mediacontainer.md +docs/models/operations/getservercapabilitiesresponsebody.md +docs/models/operations/getservercapabilitiesresponse.md +docs/models/operations/getserverpreferencesresponse.md +docs/models/operations/server.md +docs/models/operations/getavailableclientsmediacontainer.md +docs/models/operations/responsebody.md +docs/models/operations/getavailableclientsresponse.md +docs/models/operations/device.md +docs/models/operations/getdevicesmediacontainer.md +docs/models/operations/getdevicesresponsebody.md +docs/models/operations/getdevicesresponse.md +docs/models/operations/getserveridentitymediacontainer.md +docs/models/operations/getserveridentityresponsebody.md +docs/models/operations/getserveridentityresponse.md +docs/models/operations/myplex.md +docs/models/operations/getmyplexaccountresponsebody.md +docs/models/operations/getmyplexaccountresponse.md +docs/models/operations/minsize.md +docs/models/operations/upscale.md +docs/models/operations/getresizedphotorequest.md +docs/models/operations/getresizedphotoresponse.md +docs/models/operations/getserverlistserver.md +docs/models/operations/getserverlistmediacontainer.md +docs/models/operations/getserverlistresponsebody.md +docs/models/operations/getserverlistresponse.md +docs/models/operations/markplayedrequest.md +docs/models/operations/markplayedresponse.md +docs/models/operations/markunplayedrequest.md +docs/models/operations/markunplayedresponse.md +docs/models/operations/updateplayprogressrequest.md +docs/models/operations/updateplayprogressresponse.md +docs/models/operations/context.md +docs/models/operations/activity.md +docs/models/operations/getserveractivitiesmediacontainer.md +docs/models/operations/getserveractivitiesresponsebody.md +docs/models/operations/getserveractivitiesresponse.md +docs/models/operations/cancelserveractivitiesrequest.md +docs/models/operations/cancelserveractivitiesresponse.md +docs/models/operations/butlertask.md +docs/models/operations/butlertasks.md +docs/models/operations/getbutlertasksresponsebody.md +docs/models/operations/getbutlertasksresponse.md +docs/models/operations/startalltasksresponse.md +docs/models/operations/stopalltasksresponse.md +docs/models/operations/taskname.md +docs/models/operations/starttaskrequest.md +docs/models/operations/starttaskresponse.md +docs/models/operations/pathparamtaskname.md +docs/models/operations/stoptaskrequest.md +docs/models/operations/stoptaskresponse.md +docs/models/operations/onlytransient.md +docs/models/operations/getglobalhubsrequest.md +docs/models/operations/getglobalhubsresponse.md +docs/models/operations/queryparamonlytransient.md +docs/models/operations/getlibraryhubsrequest.md +docs/models/operations/getlibraryhubsresponse.md +docs/models/operations/performsearchrequest.md +docs/models/operations/performsearchresponse.md +docs/models/operations/performvoicesearchrequest.md +docs/models/operations/performvoicesearchresponse.md +docs/models/operations/getsearchresultsrequest.md +docs/models/operations/getsearchresultspart.md +docs/models/operations/getsearchresultsmedia.md +docs/models/operations/getsearchresultsgenre.md +docs/models/operations/getsearchresultsdirector.md +docs/models/operations/getsearchresultswriter.md +docs/models/operations/getsearchresultscountry.md +docs/models/operations/getsearchresultsrole.md +docs/models/operations/getsearchresultsmetadata.md +docs/models/operations/provider.md +docs/models/operations/getsearchresultsmediacontainer.md +docs/models/operations/getsearchresultsresponsebody.md +docs/models/operations/getsearchresultsresponse.md +docs/models/operations/getfilehashrequest.md +docs/models/operations/getfilehashresponse.md +docs/models/operations/part.md +docs/models/operations/media.md +docs/models/operations/genre.md +docs/models/operations/director.md +docs/models/operations/writer.md +docs/models/operations/country.md +docs/models/operations/role.md +docs/models/operations/metadata.md +docs/models/operations/getrecentlyaddedmediacontainer.md +docs/models/operations/getrecentlyaddedresponsebody.md +docs/models/operations/getrecentlyaddedresponse.md +docs/models/operations/getlibrariesresponse.md +docs/models/operations/includedetails.md +docs/models/operations/getlibraryrequest.md +docs/models/operations/getlibraryresponse.md +docs/models/operations/deletelibraryrequest.md +docs/models/operations/deletelibraryresponse.md +docs/models/operations/getlibraryitemsrequest.md +docs/models/operations/getlibraryitemsresponse.md +docs/models/operations/refreshlibraryrequest.md +docs/models/operations/refreshlibraryresponse.md +docs/models/operations/getlatestlibraryitemsrequest.md +docs/models/operations/getlatestlibraryitemsresponse.md +docs/models/operations/getcommonlibraryitemsrequest.md +docs/models/operations/getcommonlibraryitemsresponse.md +docs/models/operations/getmetadatarequest.md +docs/models/operations/getmetadataresponse.md +docs/models/operations/getmetadatachildrenrequest.md +docs/models/operations/getmetadatachildrenresponse.md +docs/models/operations/stream.md +docs/models/operations/getondeckpart.md +docs/models/operations/getondeckmedia.md +docs/models/operations/guids.md +docs/models/operations/getondeckmetadata.md +docs/models/operations/getondeckmediacontainer.md +docs/models/operations/getondeckresponsebody.md +docs/models/operations/getondeckresponse.md +docs/models/operations/level.md +docs/models/operations/loglinerequest.md +docs/models/operations/loglineresponse.md +docs/models/operations/logmultilineresponse.md +docs/models/operations/enablepapertrailresponse.md +docs/models/operations/typet.md +docs/models/operations/smart.md +docs/models/operations/createplaylistrequest.md +docs/models/operations/createplaylistresponse.md +docs/models/operations/playlisttype.md +docs/models/operations/queryparamsmart.md +docs/models/operations/getplaylistsrequest.md +docs/models/operations/getplaylistsresponse.md +docs/models/operations/getplaylistrequest.md +docs/models/operations/getplaylistresponse.md +docs/models/operations/deleteplaylistrequest.md +docs/models/operations/deleteplaylistresponse.md +docs/models/operations/updateplaylistrequest.md +docs/models/operations/updateplaylistresponse.md +docs/models/operations/getplaylistcontentsrequest.md +docs/models/operations/getplaylistcontentsresponse.md +docs/models/operations/clearplaylistcontentsrequest.md +docs/models/operations/clearplaylistcontentsresponse.md +docs/models/operations/addplaylistcontentsrequest.md +docs/models/operations/addplaylistcontentsresponse.md +docs/models/operations/force.md +docs/models/operations/uploadplaylistrequest.md +docs/models/operations/uploadplaylistresponse.md +docs/models/operations/queryparamtype.md +docs/models/operations/scope.md +docs/models/operations/gettransienttokenrequest.md +docs/models/operations/gettransienttokenresponse.md +docs/models/operations/getsourceconnectioninformationrequest.md +docs/models/operations/getsourceconnectioninformationresponse.md +docs/models/operations/getsessionsresponse.md +docs/models/operations/getsessionhistoryresponse.md +docs/models/operations/transcodesession.md +docs/models/operations/gettranscodesessionsmediacontainer.md +docs/models/operations/gettranscodesessionsresponsebody.md +docs/models/operations/gettranscodesessionsresponse.md +docs/models/operations/stoptranscodesessionrequest.md +docs/models/operations/stoptranscodesessionresponse.md +docs/models/operations/getupdatestatusresponse.md +docs/models/operations/download.md +docs/models/operations/checkforupdatesrequest.md +docs/models/operations/checkforupdatesresponse.md +docs/models/operations/tonight.md +docs/models/operations/skip.md +docs/models/operations/applyupdatesrequest.md +docs/models/operations/applyupdatesresponse.md +docs/models/operations/startuniversaltranscoderequest.md +docs/models/operations/startuniversaltranscoderesponse.md +docs/models/operations/state.md +docs/models/operations/gettimelinerequest.md +docs/models/operations/gettimelineresponse.md +docs/models/errors/errors.md +docs/models/errors/getservercapabilitiesresponsebody.md +docs/models/errors/getserverpreferenceserrors.md +docs/models/errors/getserverpreferencesresponsebody.md +docs/models/errors/getavailableclientserrors.md +docs/models/errors/getavailableclientsresponsebody.md +docs/models/errors/getdeviceserrors.md +docs/models/errors/getdevicesresponsebody.md +docs/models/errors/getserveridentityerrors.md +docs/models/errors/getserveridentityresponsebody.md +docs/models/errors/getmyplexaccounterrors.md +docs/models/errors/getmyplexaccountresponsebody.md +docs/models/errors/getresizedphotoerrors.md +docs/models/errors/getresizedphotoresponsebody.md +docs/models/errors/getserverlisterrors.md +docs/models/errors/getserverlistresponsebody.md +docs/models/errors/markplayederrors.md +docs/models/errors/markplayedresponsebody.md +docs/models/errors/markunplayederrors.md +docs/models/errors/markunplayedresponsebody.md +docs/models/errors/updateplayprogresserrors.md +docs/models/errors/updateplayprogressresponsebody.md +docs/models/errors/getserveractivitieserrors.md +docs/models/errors/getserveractivitiesresponsebody.md +docs/models/errors/cancelserveractivitieserrors.md +docs/models/errors/cancelserveractivitiesresponsebody.md +docs/models/errors/getbutlertaskserrors.md +docs/models/errors/getbutlertasksresponsebody.md +docs/models/errors/startalltaskserrors.md +docs/models/errors/startalltasksresponsebody.md +docs/models/errors/stopalltaskserrors.md +docs/models/errors/stopalltasksresponsebody.md +docs/models/errors/starttaskerrors.md +docs/models/errors/starttaskresponsebody.md +docs/models/errors/stoptaskerrors.md +docs/models/errors/stoptaskresponsebody.md +docs/models/errors/getglobalhubserrors.md +docs/models/errors/getglobalhubsresponsebody.md +docs/models/errors/getlibraryhubserrors.md +docs/models/errors/getlibraryhubsresponsebody.md +docs/models/errors/performsearcherrors.md +docs/models/errors/performsearchresponsebody.md +docs/models/errors/performvoicesearcherrors.md +docs/models/errors/performvoicesearchresponsebody.md +docs/models/errors/getsearchresultserrors.md +docs/models/errors/getsearchresultsresponsebody.md +docs/models/errors/getfilehasherrors.md +docs/models/errors/getfilehashresponsebody.md +docs/models/errors/getrecentlyaddederrors.md +docs/models/errors/getrecentlyaddedresponsebody.md +docs/models/errors/getlibrarieserrors.md +docs/models/errors/getlibrariesresponsebody.md +docs/models/errors/getlibraryerrors.md +docs/models/errors/getlibraryresponsebody.md +docs/models/errors/deletelibraryerrors.md +docs/models/errors/deletelibraryresponsebody.md +docs/models/errors/getlibraryitemserrors.md +docs/models/errors/getlibraryitemsresponsebody.md +docs/models/errors/refreshlibraryerrors.md +docs/models/errors/refreshlibraryresponsebody.md +docs/models/errors/getlatestlibraryitemserrors.md +docs/models/errors/getlatestlibraryitemsresponsebody.md +docs/models/errors/getcommonlibraryitemserrors.md +docs/models/errors/getcommonlibraryitemsresponsebody.md +docs/models/errors/getmetadataerrors.md +docs/models/errors/getmetadataresponsebody.md +docs/models/errors/getmetadatachildrenerrors.md +docs/models/errors/getmetadatachildrenresponsebody.md +docs/models/errors/getondeckerrors.md +docs/models/errors/getondeckresponsebody.md +docs/models/errors/loglineerrors.md +docs/models/errors/loglineresponsebody.md +docs/models/errors/logmultilineerrors.md +docs/models/errors/logmultilineresponsebody.md +docs/models/errors/enablepapertrailerrors.md +docs/models/errors/enablepapertrailresponsebody.md +docs/models/errors/createplaylisterrors.md +docs/models/errors/createplaylistresponsebody.md +docs/models/errors/getplaylistserrors.md +docs/models/errors/getplaylistsresponsebody.md +docs/models/errors/getplaylisterrors.md +docs/models/errors/getplaylistresponsebody.md +docs/models/errors/deleteplaylisterrors.md +docs/models/errors/deleteplaylistresponsebody.md +docs/models/errors/updateplaylisterrors.md +docs/models/errors/updateplaylistresponsebody.md +docs/models/errors/getplaylistcontentserrors.md +docs/models/errors/getplaylistcontentsresponsebody.md +docs/models/errors/clearplaylistcontentserrors.md +docs/models/errors/clearplaylistcontentsresponsebody.md +docs/models/errors/addplaylistcontentserrors.md +docs/models/errors/addplaylistcontentsresponsebody.md +docs/models/errors/uploadplaylisterrors.md +docs/models/errors/uploadplaylistresponsebody.md +docs/models/errors/gettransienttokenerrors.md +docs/models/errors/gettransienttokenresponsebody.md +docs/models/errors/getsourceconnectioninformationerrors.md +docs/models/errors/getsourceconnectioninformationresponsebody.md +docs/models/errors/getsessionserrors.md +docs/models/errors/getsessionsresponsebody.md +docs/models/errors/getsessionhistoryerrors.md +docs/models/errors/getsessionhistoryresponsebody.md +docs/models/errors/gettranscodesessionserrors.md +docs/models/errors/gettranscodesessionsresponsebody.md +docs/models/errors/stoptranscodesessionerrors.md +docs/models/errors/stoptranscodesessionresponsebody.md +docs/models/errors/getupdatestatuserrors.md +docs/models/errors/getupdatestatusresponsebody.md +docs/models/errors/checkforupdateserrors.md +docs/models/errors/checkforupdatesresponsebody.md +docs/models/errors/applyupdateserrors.md +docs/models/errors/applyupdatesresponsebody.md +docs/models/errors/startuniversaltranscodeerrors.md +docs/models/errors/startuniversaltranscoderesponsebody.md +docs/models/errors/gettimelineerrors.md +docs/models/errors/gettimelineresponsebody.md +docs/models/components/security.md +docs/sdks/sdk/README.md +docs/sdks/server/README.md +docs/sdks/media/README.md +docs/sdks/activities/README.md +docs/sdks/butler/README.md +docs/sdks/hubs/README.md +docs/sdks/search/README.md +docs/sdks/library/README.md +docs/sdks/log/README.md +docs/sdks/playlists/README.md +docs/sdks/security/README.md +docs/sdks/sessions/README.md +docs/sdks/updater/README.md +docs/sdks/video/README.md +USAGE.md +.gitattributes \ No newline at end of file diff --git a/gen.yaml b/gen.yaml new file mode 100755 index 00000000..f5d3b432 --- /dev/null +++ b/gen.yaml @@ -0,0 +1,44 @@ +configVersion: 1.0.0 +management: + docChecksum: 550154cf1b4d0c237436fb18c418b5db + docVersion: 0.0.3 + speakeasyVersion: 1.129.1 + generationVersion: 2.223.3 +generation: + comments: {} + sdkClassName: SDK + repoURL: https://github.com/LukeHagar/plexjs.git + maintainOpenAPIOrder: true + usageSnippets: + optionalPropertyRendering: withExample + fixes: + nameResolutionDec2023: true + useClassNamesForArrayFields: true +features: + typescript: + core: 3.3.12 + flattening: 2.81.1 + globalSecurity: 2.82.2 + globalServerURLs: 2.82.1 + nameOverrides: 2.81.1 +typescript: + version: 0.1.0 + author: Speakeasy + clientServerStatusCodesAsErrors: true + flattenGlobalSecurity: true + imports: + option: openapi + paths: + callbacks: models/callbacks + errors: models/errors + operations: models/operations + shared: models/components + webhooks: models/webhooks + inputModelSuffix: input + installationURL: https://github.com/LukeHagar/plexjs + maxMethodParams: 4 + outputModelSuffix: output + packageName: openapi + published: true + repoSubDirectory: . + templateVersion: v2 diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..f8c59dbf --- /dev/null +++ b/package-lock.json @@ -0,0 +1,2974 @@ +{ + "name": "openapi", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "openapi", + "version": "0.1.0", + "dependencies": { + "decimal.js": "^10.4.3", + "jsonpath": "^1.1.1" + }, + "devDependencies": { + "@types/jsonpath": "^0.2.4", + "@typescript-eslint/eslint-plugin": "^6.13.2", + "@typescript-eslint/parser": "^6.13.2", + "eslint": "^8.55.0", + "eslint-import-resolver-typescript": "^3.6.1", + "eslint-plugin-import": "^2.29.0", + "typescript": "^5.3.3", + "zod": "^3.22.4" + }, + "peerDependencies": { + "zod": ">= 3" + } + }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/js": { + "version": "8.55.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.55.0.tgz", + "integrity": "sha512-qQfo2mxH5yVom1kacMtZZJFVdW+E70mqHMJvVg6WTLo+VBuQJ4TojZlfWBjK0ve5BdEeNAVxOsl/nvNMpJOaJA==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.13", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", + "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", + "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", + "dev": true + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true + }, + "node_modules/@types/jsonpath": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@types/jsonpath/-/jsonpath-0.2.4.tgz", + "integrity": "sha512-K3hxB8Blw0qgW6ExKgMbXQv2UPZBoE2GqLpVY+yr7nMD2Pq86lsuIzyAaiQ7eMqFL5B6di6pxSkogLJEyEHoGA==", + "dev": true + }, + "node_modules/@types/semver": { + "version": "7.5.6", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", + "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", + "dev": true + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.14.0.tgz", + "integrity": "sha512-1ZJBykBCXaSHG94vMMKmiHoL0MhNHKSVlcHVYZNw+BKxufhqQVTOawNpwwI1P5nIFZ/4jLVop0mcY6mJJDFNaw==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.14.0", + "@typescript-eslint/type-utils": "6.14.0", + "@typescript-eslint/utils": "6.14.0", + "@typescript-eslint/visitor-keys": "6.14.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.14.0.tgz", + "integrity": "sha512-QjToC14CKacd4Pa7JK4GeB/vHmWFJckec49FR4hmIRf97+KXole0T97xxu9IFiPxVQ1DBWrQ5wreLwAGwWAVQA==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "6.14.0", + "@typescript-eslint/types": "6.14.0", + "@typescript-eslint/typescript-estree": "6.14.0", + "@typescript-eslint/visitor-keys": "6.14.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.14.0.tgz", + "integrity": "sha512-VT7CFWHbZipPncAZtuALr9y3EuzY1b1t1AEkIq2bTXUPKw+pHoXflGNG5L+Gv6nKul1cz1VH8fz16IThIU0tdg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.14.0", + "@typescript-eslint/visitor-keys": "6.14.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.14.0.tgz", + "integrity": "sha512-x6OC9Q7HfYKqjnuNu5a7kffIYs3No30isapRBJl1iCHLitD8O0lFbRcVGiOcuyN837fqXzPZ1NS10maQzZMKqw==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "6.14.0", + "@typescript-eslint/utils": "6.14.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.14.0.tgz", + "integrity": "sha512-uty9H2K4Xs8E47z3SnXEPRNDfsis8JO27amp2GNCnzGETEW3yTqEIVg5+AI7U276oGF/tw6ZA+UesxeQ104ceA==", + "dev": true, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.14.0.tgz", + "integrity": "sha512-yPkaLwK0yH2mZKFE/bXkPAkkFgOv15GJAUzgUVonAbv0Hr4PK/N2yaA/4XQbTZQdygiDkpt5DkxPELqHguNvyw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.14.0", + "@typescript-eslint/visitor-keys": "6.14.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.14.0.tgz", + "integrity": "sha512-XwRTnbvRr7Ey9a1NT6jqdKX8y/atWG+8fAIu3z73HSP8h06i3r/ClMhmaF/RGWGW1tHJEwij1uEg2GbEmPYvYg==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.14.0", + "@typescript-eslint/types": "6.14.0", + "@typescript-eslint/typescript-estree": "6.14.0", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.14.0.tgz", + "integrity": "sha512-fB5cw6GRhJUz03MrROVuj5Zm/Q+XWlVdIsFj+Zb1Hvqouc8t+XP2H5y53QYU/MGtd2dPg6/vJJlhoX3xc2ehfw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.14.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, + "node_modules/acorn": { + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", + "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-includes": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", + "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/array.prototype.findlastindex": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz", + "integrity": "sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", + "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", + "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", + "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "is-array-buffer": "^3.0.2", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/call-bind": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", + "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.1", + "set-function-length": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decimal.js": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==" + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" + }, + "node_modules/define-data-property": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", + "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", + "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/es-abstract": { + "version": "1.22.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz", + "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "arraybuffer.prototype.slice": "^1.0.2", + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.5", + "es-set-tostringtag": "^2.0.1", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.2", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.12", + "is-weakref": "^1.0.2", + "object-inspect": "^1.13.1", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.1", + "safe-array-concat": "^1.0.1", + "safe-regex-test": "^1.0.0", + "string.prototype.trim": "^1.2.8", + "string.prototype.trimend": "^1.0.7", + "string.prototype.trimstart": "^1.0.7", + "typed-array-buffer": "^1.0.0", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", + "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.2", + "has-tostringtag": "^1.0.0", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", + "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", + "dev": true, + "dependencies": { + "hasown": "^2.0.0" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/escodegen": { + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", + "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=4.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/escodegen/node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/escodegen/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/escodegen/node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/escodegen/node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/escodegen/node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/escodegen/node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/eslint": { + "version": "8.55.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.55.0.tgz", + "integrity": "sha512-iyUUAM0PCKj5QpwGfmCAG9XXbZCWsqP/eWAWrG/W0umvjuLRBECwSFdt+rCntju0xEH7teIABPwXpahftIaTdA==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.55.0", + "@humanwhocodes/config-array": "^0.11.13", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", + "dev": true, + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-import-resolver-typescript": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.1.tgz", + "integrity": "sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==", + "dev": true, + "dependencies": { + "debug": "^4.3.4", + "enhanced-resolve": "^5.12.0", + "eslint-module-utils": "^2.7.4", + "fast-glob": "^3.3.1", + "get-tsconfig": "^4.5.0", + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts/projects/eslint-import-resolver-ts" + }, + "peerDependencies": { + "eslint": "*", + "eslint-plugin-import": "*" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", + "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", + "dev": true, + "dependencies": { + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.0.tgz", + "integrity": "sha512-QPOO5NO6Odv5lpoTkddtutccQjysJuFxoPS7fAHO+9m9udNHvTCPSAMW9zGAYj8lAIdr40I8yPCdUYrncXtrwg==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.7", + "array.prototype.findlastindex": "^1.2.3", + "array.prototype.flat": "^1.3.2", + "array.prototype.flatmap": "^1.3.2", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-module-utils": "^2.8.0", + "hasown": "^2.0.0", + "is-core-module": "^2.13.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.7", + "object.groupby": "^1.0.1", + "object.values": "^1.1.7", + "semver": "^6.3.1", + "tsconfig-paths": "^3.14.2" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esprima": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.2.tgz", + "integrity": "sha512-+JpPZam9w5DuJ3Q67SqsMGtiHKENSMRVoxvArfJZK01/BfLEObtZ6orJa/MtoGNR/rfMgp5837T41PAmTwAv/A==", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" + }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", + "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", + "dev": true + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", + "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-tsconfig": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz", + "integrity": "sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==", + "dev": true, + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", + "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ignore": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", + "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/internal-slot": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz", + "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.2", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "dev": true, + "dependencies": { + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "dev": true, + "dependencies": { + "which-typed-array": "^1.1.11" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/jsonpath": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/jsonpath/-/jsonpath-1.1.1.tgz", + "integrity": "sha512-l6Cg7jRpixfbgoWgkrl77dgEj8RPvND0wMH6TwQmi9Qs4TFfS9u5cUFnbeKTwj5ga5Y3BTGGNI28k117LJ009w==", + "dependencies": { + "esprima": "1.2.2", + "static-eval": "2.0.2", + "underscore": "1.12.1" + } + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/object-inspect": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.fromentries": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz", + "integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.groupby": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.1.tgz", + "integrity": "sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1" + } + }, + "node_modules/object.values": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz", + "integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "dev": true, + "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", + "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "set-function-name": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-array-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", + "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/set-function-length": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", + "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.1", + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", + "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-eval": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.0.2.tgz", + "integrity": "sha512-N/D219Hcr2bPjLxPiV+TQE++Tsmrady7TqAJugLy7Xk1EumfDWS/f5dtBbkRCGE7wKKXuYockQoj8Rm2/pVKyg==", + "dependencies": { + "escodegen": "^1.8.1" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", + "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", + "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", + "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-api-utils": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", + "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", + "dev": true, + "engines": { + "node": ">=16.13.0" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, + "node_modules/tsconfig-paths": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", + "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", + "dev": true, + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", + "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", + "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", + "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typescript": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/underscore": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", + "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==" + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", + "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.4", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/zod": { + "version": "3.22.4", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz", + "integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 00000000..79f7ce28 --- /dev/null +++ b/package.json @@ -0,0 +1,36 @@ +{ + "type": "commonjs", + "name": "openapi", + "version": "0.1.0", + "author": "Speakeasy", + "main": "./index.js", + "sideEffects": false, + "repository": { + "type": "git", + "url": "https://github.com/LukeHagar/plexjs.git", + "directory": "." + }, + "scripts": { + "lint": "eslint --max-warnings=0 src", + "build": "tsc", + "prepare": "npm run build" + }, + "keywords": [], + "peerDependencies": { + "zod": ">= 3" + }, + "devDependencies": { + "@typescript-eslint/eslint-plugin": "^6.13.2", + "@typescript-eslint/parser": "^6.13.2", + "eslint": "^8.55.0", + "eslint-import-resolver-typescript": "^3.6.1", + "eslint-plugin-import": "^2.29.0", + "@types/jsonpath": "^0.2.4", + "typescript": "^5.3.3", + "zod": "^3.22.4" + }, + "dependencies": { + "decimal.js": "^10.4.3", + "jsonpath": "^1.1.1" + } +} diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 00000000..32044eba --- /dev/null +++ b/src/index.ts @@ -0,0 +1,6 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +export * from "./sdk"; +export * from "./lib/config"; diff --git a/src/lib/base64.ts b/src/lib/base64.ts new file mode 100644 index 00000000..cda07641 --- /dev/null +++ b/src/lib/base64.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export function bytesToBase64(u8arr: Uint8Array): string { + return btoa(String.fromCodePoint(...u8arr)); +} + +export function bytesFromBase64(encoded: string): Uint8Array { + return Uint8Array.from(atob(encoded), (c) => c.charCodeAt(0)); +} + +export function stringToBytes(str: string): Uint8Array { + return new TextEncoder().encode(str); +} + +export function stringFromBytes(u8arr: Uint8Array): string { + return new TextDecoder().decode(u8arr); +} + +export function stringToBase64(str: string): string { + return bytesToBase64(stringToBytes(str)); +} + +export function stringFromBase64(b64str: string): string { + return stringFromBytes(bytesFromBase64(b64str)); +} + +export const zodOutbound = z + .instanceof(Uint8Array) + .or(z.string().transform(stringToBytes)); + +export const zodInbound = z + .instanceof(Uint8Array) + .or(z.string().transform(bytesFromBase64)); diff --git a/src/lib/config.ts b/src/lib/config.ts new file mode 100644 index 00000000..47e03905 --- /dev/null +++ b/src/lib/config.ts @@ -0,0 +1,90 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { HTTPClient } from "./http"; +import { pathToFunc } from "./url"; +import { RetryConfig } from "./retries"; + +/** + * Contains the list of servers available to the SDK + */ +export const ServerList = [ + /** + * The full address of your Plex Server + */ + "http://10.10.10.47:32400", + /** + * The full address of your Plex Server + */ + "{protocol}://{ip}:{port}", +] as const; + +/** + * The protocol to use when connecting to your plex server. + */ +export enum ServerProtocol { + Http = "http", + Https = "https", +} + +export type SDKOptions = { + accessToken?: string | (() => Promise); + + httpClient?: HTTPClient; + /** + * Allows overriding the default server used by the SDK + */ + serverIdx?: number; + /** + * Allows setting the protocol variable for url substitution + */ + protocol?: ServerProtocol; + /** + * Allows setting the ip variable for url substitution + */ + ip?: string; + /** + * Allows setting the port variable for url substitution + */ + port?: string; + /** + * Allows overriding the default server URL used by the SDK + */ + serverURL?: string; + /** + * Allows overriding the default retry config used by the SDK + */ + retryConfig?: RetryConfig; +}; + +export function serverURLFromOptions(options: SDKOptions): URL { + let serverURL = options.serverURL; + + const serverParams = [ + {}, + { + protocol: options.protocol?.toString() ?? "http", + ip: options.ip?.toString() ?? "10.10.10.47", + port: options.port?.toString() ?? "32400", + }, + ]; + let params: Record = {}; + const serverIdx = options.serverIdx ?? 0; + + if (!serverURL) { + serverURL = ServerList[serverIdx] || ""; + params = serverParams[serverIdx] || {}; + } + + const u = pathToFunc(serverURL)(params); + return new URL(u); +} + +export const SDK_METADATA = Object.freeze({ + language: "typescript", + openapiDocVersion: "0.0.3", + sdkVersion: "0.1.0", + genVersion: "2.223.3", + userAgent: "speakeasy-sdk/typescript 0.1.0 2.223.3 0.0.3 openapi", +}); diff --git a/src/lib/encodings.ts b/src/lib/encodings.ts new file mode 100644 index 00000000..56e87e10 --- /dev/null +++ b/src/lib/encodings.ts @@ -0,0 +1,379 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { bytesToBase64 } from "./base64"; + +export class EncodingError extends Error { + constructor(message: string, options?: ErrorOptions) { + super(message, options); + this.name = "EncodingError"; + } +} + +export function encodeMatrix( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +) { + let out = ""; + const pairs: [string, unknown][] = options?.explode + ? explode(key, value) + : [[key, value]]; + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + const encodeValue = (v: unknown) => encodeString(serializeValue(v)); + + pairs.forEach(([pk, pv]) => { + let tmp = ""; + let encValue = ""; + + if (pv === undefined) { + return; + } else if (Array.isArray(pv)) { + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`).join(","); + } else if (isPlainObject(pv)) { + encValue = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + return `,${encodeString(k)},${encodeValue(v)}`; + }).join(""); + encValue = encValue.slice(1); + } else { + encValue = `${encodeValue(pv)}`; + } + + const keyPrefix = encodeString(pk); + tmp = `${keyPrefix}=${encValue}`; + // trim trailing '=' if value was empty + if (tmp === `${keyPrefix}=`) { + tmp = tmp.slice(0, -1); + } + + // If we end up with the nothing then skip forward + if (!tmp) { + return; + } + + out += `;${tmp}`; + }); + + return out; +} + +export function encodeLabel( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +) { + let out = ""; + const pairs: [string, unknown][] = options?.explode + ? explode(key, value) + : [[key, value]]; + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + const encodeValue = (v: unknown) => encodeString(serializeValue(v)); + + pairs.forEach(([pk, pv]) => { + let encValue = ""; + + if (pv === undefined) { + return; + } else if (Array.isArray(pv)) { + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`).join("."); + } else if (isPlainObject(pv)) { + encValue = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + return `.${encodeString(k)}.${encodeValue(v)}`; + }).join(""); + encValue = encValue.slice(1); + } else { + const k = + options?.explode && isPlainObject(value) ? `${encodeString(pk)}=` : ""; + encValue = `${k}${encodeValue(pv)}`; + } + + out += `.${encValue}`; + }); + + return out; +} + +function formEncoder(sep: string) { + return ( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, + ) => { + let out = ""; + const pairs: [string, unknown][] = options?.explode + ? explode(key, value) + : [[key, value]]; + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + + const encodeValue = (v: unknown) => encodeString(serializeValue(v)); + + const encodedSep = encodeString(sep); + + pairs.forEach(([pk, pv]) => { + let tmp = ""; + let encValue = ""; + + if (pv === undefined) { + return; + } else if (Array.isArray(pv)) { + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`).join(encodedSep); + } else if (isPlainObject(pv)) { + encValue = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + return `${encodeString(k)}${encodedSep}${encodeValue(v)}`; + }).join(encodedSep); + } else { + encValue = `${encodeValue(pv)}`; + } + + tmp = `${encodeString(pk)}=${encValue}`; + + // If we end up with the nothing then skip forward + if (!tmp || tmp === "=") { + return; + } + + out += `&${tmp}`; + }); + + return out.slice(1); + }; +} + +export const encodeForm = formEncoder(","); +export const encodeSpaceDelimited = formEncoder(" "); +export const encodePipeDelimited = formEncoder("|"); + +export function encodeBodyForm( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +) { + let out = ""; + const pairs: [string, unknown][] = options?.explode + ? explode(key, value) + : [[key, value]]; + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + + const encodeValue = (v: unknown) => encodeString(serializeValue(v)); + + pairs.forEach(([pk, pv]) => { + let tmp = ""; + let encValue = ""; + + if (pv === undefined) { + return; + } else if (Array.isArray(pv)) { + encValue = JSON.stringify(pv, jsonReplacer); + } else if (isPlainObject(pv)) { + encValue = JSON.stringify(pv, jsonReplacer); + } else { + encValue = `${encodeValue(pv)}`; + } + + tmp = `${encodeString(pk)}=${encValue}`; + + // If we end up with the nothing then skip forward + if (!tmp || tmp === "=") { + return; + } + + out += `&${tmp}`; + }); + + return out.slice(1); +} + +export function encodeDeepObject( + key: string, + value: unknown, + options?: { charEncoding?: "percent" | "none" }, +) { + let out = ""; + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + + if (!isPlainObject(value)) { + throw new EncodingError( + `Value of parameter '${key}' which uses deepObject encoding must be an object`, + ); + } + + Object.entries(value).forEach(([ck, cv]) => { + if (cv === undefined) { + return; + } + + const pk = `${key}[${ck}]`; + + if (isPlainObject(cv)) { + throw new EncodingError( + `Value of parameter field '${pk}' cannot be an array or object.`, + ); + } + + const pairs: unknown[] = Array.isArray(cv) ? cv : [cv]; + let encoded = ""; + + encoded = mapDefined(pairs, (v) => { + return `${encodeString(pk)}=${encodeString(serializeValue(v))}`; + }).join("&"); + + out += `&${encoded}`; + }); + + return out.slice(1); +} + +export function encodeJSON( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +) { + if (typeof value === "undefined") { + return ""; + } + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + + const encVal = encodeString(JSON.stringify(value, jsonReplacer)); + + return options?.explode ? encVal : `${encodeString(key)}=${encVal}`; +} + +export const encodeSimple = ( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +) => { + let out = ""; + const pairs: [string, unknown][] = options?.explode + ? explode(key, value) + : [[key, value]]; + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + const encodeValue = (v: unknown) => encodeString(serializeValue(v)); + + pairs.forEach(([pk, pv]) => { + let tmp = ""; + + if (pv === undefined) { + return; + } else if (Array.isArray(pv)) { + tmp = mapDefined(pv, (v) => `${encodeValue(v)}`).join(","); + } else if (isPlainObject(pv)) { + tmp = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + return `,${encodeString(k)},${encodeValue(v)}`; + }).join(""); + tmp = tmp.slice(1); + } else { + const k = options?.explode && isPlainObject(value) ? `${pk}=` : ""; + tmp = `${k}${encodeValue(pv)}`; + } + + // If we end up with the nothing then skip forward + if (!tmp) { + return; + } + + out += `,${tmp}`; + }); + + return out.slice(1); +}; + +function explode(key: string, value: unknown): [string, unknown][] { + if (Array.isArray(value)) { + return value.map((v) => [key, v]); + } else if (isPlainObject(value)) { + const o = value ?? {}; + return Object.entries(o).map(([k, v]) => [k, v]); + } else { + return [[key, value]]; + } +} + +function isPlainObject(value: unknown): value is object { + if (typeof value !== "object" || value == null) return false; + const proto = Object.getPrototypeOf(value); + return proto === null || proto === Object.prototype; +} + +function serializeValue(value: unknown): string { + if (value === null) { + return "null"; + } else if (typeof value === "undefined") { + return ""; + } else if (value instanceof Date) { + return value.toISOString(); + } else if (value instanceof Uint8Array) { + return bytesToBase64(value); + } else if (typeof value === "object") { + return JSON.stringify(value, jsonReplacer); + } + + return `${value}`; +} + +function jsonReplacer(_: string, value: unknown) { + if (value instanceof Uint8Array) { + return bytesToBase64(value); + } else { + return value; + } +} + +function mapDefined(inp: T[], mapper: (v: T) => R): R[] { + return inp.reduce((acc, v) => { + if (v === undefined) { + return acc; + } + + const m = mapper(v); + if (m === undefined) { + return acc; + } + + acc.push(m); + + return acc; + }, []); +} + +function mapDefinedEntries( + inp: Iterable<[K, V]>, + mapper: (v: [K, V]) => R, +): R[] { + const acc: R[] = []; + for (const [k, v] of inp) { + if (v === undefined) { + continue; + } + + const m = mapper([k, v]); + if (m === undefined) { + continue; + } + + acc.push(m); + } + + return acc; +} diff --git a/src/lib/http.ts b/src/lib/http.ts new file mode 100644 index 00000000..f22e36a9 --- /dev/null +++ b/src/lib/http.ts @@ -0,0 +1,201 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +export type Fetcher = ( + input: RequestInfo | URL, + init?: RequestInit, +) => Promise; + +export interface HTTPClientOptions { + fetcher?: Fetcher; +} + +type BeforeRequestHook = (req: Request) => Request | void; +type RequestErrorHook = (err: unknown, req: Request) => void; +type ResponseHook = (res: Response, req: Request) => void; + +export class HTTPClient { + private fetcher: Fetcher; + private requestHooks: BeforeRequestHook[] = []; + private requestErrorHooks: RequestErrorHook[] = []; + private responseHooks: ResponseHook[] = []; + + constructor(private options: HTTPClientOptions = {}) { + this.fetcher = options.fetcher || fetch; + } + + async request(request: Request): Promise { + const req = this.requestHooks.reduce((currentReq, fn) => { + const nextRequest = fn(currentReq); + return nextRequest || currentReq; + }, request); + + try { + const res = await this.fetcher(req); + this.responseHooks.forEach((fn) => fn(res, req)); + return res; + } catch (err) { + this.requestErrorHooks.forEach((fn) => fn(err, req)); + throw err; + } + } + + /** + * Registers a hook that is called before a request is made. The hook function + * can mutate the request or return a new request. This may be useful to add + * additional information to request such as request IDs and tracing headers. + */ + addHook(hook: "beforeRequest", fn: BeforeRequestHook): this; + /** + * Registers a hook that is called when a request cannot be made due to a + * network error. + */ + addHook(hook: "requestError", fn: RequestErrorHook): this; + /** + * Registers a hook that is called when a response has been received from the + * server. + */ + addHook(hook: "response", fn: ResponseHook): this; + addHook( + ...args: + | [hook: "beforeRequest", fn: BeforeRequestHook] + | [hook: "requestError", fn: RequestErrorHook] + | [hook: "response", fn: ResponseHook] + ) { + if (args[0] === "beforeRequest") { + this.requestHooks.push(args[1]); + } else if (args[0] === "requestError") { + this.requestErrorHooks.push(args[1]); + } else if (args[0] === "response") { + this.responseHooks.push(args[1]); + } else { + throw new Error(`Invalid hook type: ${args[0]}`); + } + return this; + } + + /** Removes a hook that was previously registered with `addHook`. */ + removeHook(hook: "beforeRequest", fn: BeforeRequestHook): this; + /** Removes a hook that was previously registered with `addHook`. */ + removeHook(hook: "requestError", fn: RequestErrorHook): this; + /** Removes a hook that was previously registered with `addHook`. */ + removeHook(hook: "response", fn: ResponseHook): this; + removeHook( + ...args: + | [hook: "beforeRequest", fn: BeforeRequestHook] + | [hook: "requestError", fn: RequestErrorHook] + | [hook: "response", fn: ResponseHook] + ) { + let target: unknown[]; + if (args[0] === "beforeRequest") { + target = this.requestHooks; + } else if (args[0] === "requestError") { + target = this.requestErrorHooks; + } else if (args[0] === "response") { + target = this.responseHooks; + } else { + throw new Error(`Invalid hook type: ${args[0]}`); + } + + const index = target.findIndex((v) => v === args[1]); + if (index >= 0) { + target.splice(index, 1); + } + + return this; + } + + clone() { + const child = new HTTPClient(this.options); + child.requestHooks = this.requestHooks.slice(); + child.requestErrorHooks = this.requestErrorHooks.slice(); + child.responseHooks = this.responseHooks.slice(); + + return child; + } +} + +export function matchContentType(response: Response, pattern: string): boolean { + if (pattern === "*" || pattern === "*/*") { + return true; + } + + const contentType = + response.headers.get("content-type") ?? "application/octet-stream"; + + const idx = contentType.split(";").findIndex((raw) => { + const ctype = raw.trim(); + if (ctype === pattern) { + return true; + } + + const parts = ctype.split("/"); + if (parts.length !== 2) { + return false; + } + + return `${parts[0]}/*` === pattern || `*/${parts[1]}` === pattern; + }); + + return idx >= 0; +} + +const codeRangeRE = new RegExp("^[0-9]xx$", "i"); + +export function matchStatusCode( + response: Response, + codes: number | string | (number | string)[], +) { + const actual = `${response.status}`; + const expectedCodes = Array.isArray(codes) ? codes : [codes]; + if (!expectedCodes.length) { + return false; + } + + return expectedCodes.some((ec) => { + const code = `${ec}`; + + if (code === "default") { + return true; + } + + if (!codeRangeRE.test(`${code}`)) { + return code === actual; + } + + const expectFamily = code.charAt(0); + if (!expectFamily) { + throw new Error("Invalid status code range"); + } + + const actualFamily = actual.charAt(0); + if (!actualFamily) { + throw new Error(`Invalid response status code: ${actual}`); + } + + return actualFamily === expectFamily; + }); +} + +export function matchResponse( + response: Response, + code: number | string | (number | string)[], + contentTypePattern: string, +): boolean { + return ( + matchStatusCode(response, code) && + matchContentType(response, contentTypePattern) + ); +} + +const headerValRE = /, */; +export function unpackHeaders(headers: Headers): Record { + const out: Record = {}; + + for (const [k, v] of headers.entries()) { + out[k] = v.split(headerValRE); + } + + return out; +} diff --git a/src/lib/retries.ts b/src/lib/retries.ts new file mode 100644 index 00000000..f5e4a5bc --- /dev/null +++ b/src/lib/retries.ts @@ -0,0 +1,207 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +export type BackoffStrategy = { + initialInterval: number; + maxInterval: number; + exponent: number; + maxElapsedTime: number; +}; + +const defaultBackoff: BackoffStrategy = { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, +}; + +export type RetryConfig = + | { strategy: "none" } + | { + strategy: "backoff"; + backoff?: BackoffStrategy; + retryConnectionErrors?: boolean; + }; + +class PermanentError extends Error { + inner: unknown; + + constructor(inner: unknown) { + super("Permanent error"); + this.inner = inner; + + Object.setPrototypeOf(this, PermanentError.prototype); + } +} + +class TemporaryError extends Error { + res: Response; + + constructor(res: Response) { + super("Temporary error"); + this.res = res; + + Object.setPrototypeOf(this, TemporaryError.prototype); + } +} + +export async function retry( + fetchFn: () => Promise, + options: { + config: RetryConfig; + statusCodes: string[]; + }, +): Promise { + switch (options.config.strategy) { + case "backoff": + return retryBackoff( + wrapFetcher(fetchFn, { + statusCodes: options.statusCodes, + retryConnectionErrors: !!options.config.retryConnectionErrors, + }), + options.config.backoff ?? defaultBackoff, + ); + default: + return await fetchFn(); + } +} + +function wrapFetcher( + fn: () => Promise, + options: { + statusCodes: string[]; + retryConnectionErrors: boolean; + }, +): () => Promise { + return async () => { + try { + const res = await fn(); + if (isRetryableResponse(res, options.statusCodes)) { + throw new TemporaryError(res); + } + + return res; + } catch (err) { + if (err instanceof TemporaryError) { + throw err; + } + + if ( + options.retryConnectionErrors && + (isTimeoutError(err) || isConnectionError(err)) + ) { + throw err; + } + + throw new PermanentError(err); + } + }; +} + +function isConnectionError(err: unknown) { + if (typeof err !== "object" || err == null) { + return false; + } + + // Covers fetch in Deno as well + const isBrowserErr = + err instanceof TypeError && + err.message.toLowerCase().startsWith("failed to fetch"); + + const isNodeErr = + err instanceof TypeError && + err.message.toLowerCase().startsWith("fetch failed"); + + const isBunErr = "name" in err && err.name === "ConnectionError"; + + const isGenericErr = + "code" in err && + typeof err.code === "string" && + err.code.toLowerCase() === "econnreset"; + + return isBrowserErr || isNodeErr || isGenericErr || isBunErr; +} + +function isTimeoutError(err: unknown) { + if (typeof err !== "object" || err == null) { + return false; + } + + // Fetch in browser, Node.js, Bun, Deno + const isNative = "name" in err && err.name === "TimeoutError"; + + // Node.js HTTP client and Axios + const isGenericErr = + "code" in err && + typeof err.code === "string" && + err.code.toLowerCase() === "econnaborted"; + + return isNative || isGenericErr; +} + +const codeRangeRE = new RegExp("^[0-9]xx$", "i"); + +function isRetryableResponse(res: Response, statusCodes: string[]): boolean { + const actual = `${res.status}`; + + return statusCodes.some((code) => { + if (!codeRangeRE.test(code)) { + return code === actual; + } + + const expectFamily = code.charAt(0); + if (!expectFamily) { + throw new Error("Invalid status code range"); + } + + const actualFamily = actual.charAt(0); + if (!actualFamily) { + throw new Error(`Invalid response status code: ${actual}`); + } + + return actualFamily === expectFamily; + }); +} + +async function retryBackoff( + fn: () => Promise, + strategy: BackoffStrategy, +): Promise { + const { maxElapsedTime, initialInterval, exponent, maxInterval } = strategy; + + const start = Date.now(); + let x = 0; + + // eslint-disable-next-line no-constant-condition + while (true) { + try { + const res = await fn(); + return res; + } catch (err) { + if (err instanceof PermanentError) { + throw err.inner; + } + const elapsed = Date.now() - start; + if (elapsed > maxElapsedTime) { + if (err instanceof TemporaryError) { + return err.res; + } + + throw err; + } + + const d = Math.min( + initialInterval * Math.pow(x, exponent) + Math.random() * 1000, + maxInterval, + ); + + await delay(d); + x++; + } + } +} + +async function delay(delay: number): Promise { + return new Promise((resolve) => setTimeout(resolve, delay)); +} diff --git a/src/lib/sdks.ts b/src/lib/sdks.ts new file mode 100644 index 00000000..be69e114 --- /dev/null +++ b/src/lib/sdks.ts @@ -0,0 +1,107 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { HTTPClient, matchResponse, matchStatusCode, unpackHeaders } from "./http"; +import { SecurityState, resolveSecurity, resolveGlobalSecurity } from "./security"; +import { pathToFunc } from "./url"; +import { encodeForm } from "./encodings"; +import { stringToBase64 } from "./base64"; + +export type RequestOptions = { + fetchOptions?: Omit; +}; + +type RequestConfig = { + method: string; + path: string; + baseURL?: string | URL; + query?: string; + body?: RequestInit["body"]; + headers?: HeadersInit; + security?: SecurityState | null; +}; + +export class ClientSDK { + readonly #client: HTTPClient; + protected readonly baseURL: URL; + + constructor(init: { client: HTTPClient; baseURL: URL }) { + const url = init.baseURL; + url.pathname = url.pathname.replace(/\/+$/, "") + "/"; + + this.#client = init.client; + this.baseURL = url; + } + + protected async fetch$(conf: RequestConfig, options?: RequestOptions) { + const { method, path, query, headers: opHeaders, security } = conf; + + const reqURL = new URL(conf.baseURL ?? this.baseURL); + const inputURL = new URL(path, reqURL); + + if (path) { + reqURL.pathname += inputURL.pathname.replace(/^\/+/, ""); + } + + let finalQuery = query || ""; + + const secQuery: string[] = []; + for (const [k, v] of Object.entries(security?.queryParams || {})) { + secQuery.push(encodeForm(k, v, { charEncoding: "percent" })); + } + if (secQuery.length) { + finalQuery += `&${secQuery.join("&")}`; + } + + if (finalQuery) { + const q = finalQuery.startsWith("&") ? finalQuery.slice(1) : finalQuery; + reqURL.search = `?${q}`; + } + + const headers = new Headers(opHeaders); + + const username = security?.basic.username || ""; + const password = security?.basic.password || ""; + if (username) { + const encoded = stringToBase64([username, password].join(":")); + headers.set("Authorization", `Basic ${encoded}`); + } + + const securityHeaders = new Headers(security?.headers || {}); + for (const [k, v] of securityHeaders) { + headers.set(k, v); + } + + let cookie = headers.get("cookie") || ""; + for (const [k, v] of Object.entries(security?.cookies || {})) { + cookie += `; ${k}=${v}`; + } + cookie = cookie.startsWith("; ") ? cookie.slice(2) : cookie; + headers.set("cookie", cookie); + + const userHeaders = new Headers(options?.fetchOptions?.headers); + for (const [k, v] of userHeaders) { + headers.set(k, v); + } + + const req = new Request(reqURL, { + ...options?.fetchOptions, + body: conf.body ?? null, + headers, + method, + }); + + return this.#client.request(req); + } + + protected unpackHeaders = unpackHeaders; + + protected matchStatusCode = matchStatusCode; + protected matchResponse = matchResponse; + + protected templateURLComponent = pathToFunc; + + protected resolveSecurity = resolveSecurity; + protected resolveGlobalSecurity = resolveGlobalSecurity; +} diff --git a/src/lib/security.ts b/src/lib/security.ts new file mode 100644 index 00000000..0c7236bf --- /dev/null +++ b/src/lib/security.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as components from "../models/components"; + +export enum SecurityErrorCode { + Incomplete = "incomplete", + UnrecognisedSecurityType = "unrecognized_security_type", +} + +export class SecurityError extends Error { + constructor(public code: SecurityErrorCode, message: string, options?: ErrorOptions) { + super(message, options); + this.name = "SecurityError"; + } + + static incomplete(): SecurityError { + return new SecurityError( + SecurityErrorCode.Incomplete, + "Security requirements not met in order to perform the operation" + ); + } + static unrecognizedType(type: string): SecurityError { + return new SecurityError( + SecurityErrorCode.UnrecognisedSecurityType, + `Unrecognised security type: ${type}` + ); + } +} + +export type SecurityState = { + basic: { username: string; password?: string }; + headers: Record; + queryParams: Record; + cookies: Record; +}; + +type SecurityInputBasicPacked = { + type: "http:basic"; + value: { username: string; password?: string } | null | undefined; +}; + +type SecurityInputBasic = { + type: "http:basic"; + value: string | null | undefined; + fieldName: "username" | "password"; +}; + +type SecurityInputBearer = { + type: "http:bearer"; + value: string | null | undefined; + fieldName: string; +}; + +type SecurityInputAPIKey = { + type: "apiKey:header" | "apiKey:query" | "apiKey:cookie"; + value: string | null | undefined; + fieldName: string; +}; + +type SecurityInputOIDC = { + type: "openIdConnect"; + value: string | null | undefined; + fieldName: string; +}; + +type SecurityInputOAuth2 = { + type: "oauth2"; + value: string | null | undefined; + fieldName: string; +}; + +export type SecurityInput = + | SecurityInputBasic + | SecurityInputBasicPacked + | SecurityInputBearer + | SecurityInputAPIKey + | SecurityInputOAuth2 + | SecurityInputOIDC; + +export function resolveSecurity(...options: SecurityInput[][]): SecurityState | null { + const state: SecurityState = { + basic: { username: "", password: "" }, + headers: {}, + queryParams: {}, + cookies: {}, + }; + + const option = options.find((opts) => opts.every((o) => Boolean(o.value))); + if (option == null) { + return null; + } + + option.forEach((spec) => { + if (spec.value == null) { + return; + } + + const { type } = spec; + + switch (type) { + case "apiKey:header": + state.headers[spec.fieldName] = spec.value; + break; + case "apiKey:query": + state.queryParams[spec.fieldName] = spec.value; + break; + case "apiKey:cookie": + state.cookies[spec.fieldName] = spec.value; + break; + case "http:basic": + applyBasic(state, spec); + break; + case "http:bearer": + applyBearer(state, spec); + break; + case "oauth2": + applyBearer(state, spec); + break; + case "openIdConnect": + applyBearer(state, spec); + break; + default: + spec satisfies never; + throw SecurityError.unrecognizedType(type); + } + }); + + return state; +} + +function applyBasic(state: SecurityState, spec: SecurityInputBasic | SecurityInputBasicPacked) { + if (spec.value == null) { + return; + } + + if ("fieldName" in spec) { + state.basic[spec.fieldName] = spec.value; + } else { + state.basic = spec.value; + } +} + +function applyBearer( + state: SecurityState, + spec: SecurityInputBearer | SecurityInputOAuth2 | SecurityInputOIDC +) { + if (spec.value == null) { + return; + } + + let value = spec.value; + if (value.slice(0, 7).toLowerCase() !== "bearer ") { + value = `Bearer ${value}`; + } + + state.headers[spec.fieldName] = value; +} +export function resolveGlobalSecurity(security: Partial | null | undefined) { + return resolveSecurity([ + { value: security?.accessToken, fieldName: "X-Plex-Token", type: "apiKey:header" }, + ]); +} diff --git a/src/lib/url.ts b/src/lib/url.ts new file mode 100644 index 00000000..3fc4eccf --- /dev/null +++ b/src/lib/url.ts @@ -0,0 +1,31 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +const hasOwn = Object.prototype.hasOwnProperty; + +export function pathToFunc( + pathPattern: string, + options?: { charEncoding?: "percent" | "none" }, +): (params?: Record) => string { + const paramRE = /\{([a-zA-Z0-9_]+?)\}/g; + + return function buildURLPath(params: Record = {}): string { + return pathPattern.replace(paramRE, function (_, placeholder) { + if (!hasOwn.call(params, placeholder)) { + throw new Error(`Parameter '${placeholder}' is required`); + } + + const value = params[placeholder]; + if (typeof value !== "string" && typeof value !== "number") { + throw new Error( + `Parameter '${placeholder}' must be a string or number`, + ); + } + + return options?.charEncoding === "percent" + ? encodeURIComponent(`${value}`) + : `${value}`; + }); + }; +} diff --git a/src/models/components/index.ts b/src/models/components/index.ts new file mode 100644 index 00000000..f11f6ed9 --- /dev/null +++ b/src/models/components/index.ts @@ -0,0 +1,5 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +export * from "./security"; diff --git a/src/models/components/security.ts b/src/models/components/security.ts new file mode 100644 index 00000000..ca369601 --- /dev/null +++ b/src/models/components/security.ts @@ -0,0 +1,7 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +export type Security = { + accessToken: string; +}; diff --git a/src/models/errors/addplaylistcontents.ts b/src/models/errors/addplaylistcontents.ts new file mode 100644 index 00000000..a04e71c2 --- /dev/null +++ b/src/models/errors/addplaylistcontents.ts @@ -0,0 +1,151 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type AddPlaylistContentsErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type AddPlaylistContentsResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class AddPlaylistContentsResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: AddPlaylistContentsResponseBodyData; + + constructor(err: AddPlaylistContentsResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "AddPlaylistContentsResponseBody"; + } +} + +/** @internal */ +export namespace AddPlaylistContentsErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace AddPlaylistContentsResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = + z + .object({ + errors: z.array(z.lazy(() => AddPlaylistContentsErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new AddPlaylistContentsResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + AddPlaylistContentsResponseBody + > = z + .instanceof(AddPlaylistContentsResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z + .array(z.lazy(() => AddPlaylistContentsErrors$.outboundSchema)) + .optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/applyupdates.ts b/src/models/errors/applyupdates.ts new file mode 100644 index 00000000..619e5da9 --- /dev/null +++ b/src/models/errors/applyupdates.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type ApplyUpdatesErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type ApplyUpdatesResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class ApplyUpdatesResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: ApplyUpdatesResponseBodyData; + + constructor(err: ApplyUpdatesResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "ApplyUpdatesResponseBody"; + } +} + +/** @internal */ +export namespace ApplyUpdatesErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace ApplyUpdatesResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => ApplyUpdatesErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new ApplyUpdatesResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(ApplyUpdatesResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => ApplyUpdatesErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/cancelserveractivities.ts b/src/models/errors/cancelserveractivities.ts new file mode 100644 index 00000000..1dfd6af5 --- /dev/null +++ b/src/models/errors/cancelserveractivities.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type CancelServerActivitiesErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type CancelServerActivitiesResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class CancelServerActivitiesResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: CancelServerActivitiesResponseBodyData; + + constructor(err: CancelServerActivitiesResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "CancelServerActivitiesResponseBody"; + } +} + +/** @internal */ +export namespace CancelServerActivitiesErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace CancelServerActivitiesResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType< + CancelServerActivitiesResponseBody, + z.ZodTypeDef, + Inbound + > = z + .object({ + errors: z.array(z.lazy(() => CancelServerActivitiesErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new CancelServerActivitiesResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + CancelServerActivitiesResponseBody + > = z + .instanceof(CancelServerActivitiesResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z + .array(z.lazy(() => CancelServerActivitiesErrors$.outboundSchema)) + .optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/checkforupdates.ts b/src/models/errors/checkforupdates.ts new file mode 100644 index 00000000..240b7617 --- /dev/null +++ b/src/models/errors/checkforupdates.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type CheckForUpdatesErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type CheckForUpdatesResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class CheckForUpdatesResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: CheckForUpdatesResponseBodyData; + + constructor(err: CheckForUpdatesResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "CheckForUpdatesResponseBody"; + } +} + +/** @internal */ +export namespace CheckForUpdatesErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace CheckForUpdatesResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => CheckForUpdatesErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new CheckForUpdatesResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(CheckForUpdatesResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => CheckForUpdatesErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/clearplaylistcontents.ts b/src/models/errors/clearplaylistcontents.ts new file mode 100644 index 00000000..da09e1e7 --- /dev/null +++ b/src/models/errors/clearplaylistcontents.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type ClearPlaylistContentsErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type ClearPlaylistContentsResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class ClearPlaylistContentsResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: ClearPlaylistContentsResponseBodyData; + + constructor(err: ClearPlaylistContentsResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "ClearPlaylistContentsResponseBody"; + } +} + +/** @internal */ +export namespace ClearPlaylistContentsErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace ClearPlaylistContentsResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType< + ClearPlaylistContentsResponseBody, + z.ZodTypeDef, + Inbound + > = z + .object({ + errors: z.array(z.lazy(() => ClearPlaylistContentsErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new ClearPlaylistContentsResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + ClearPlaylistContentsResponseBody + > = z + .instanceof(ClearPlaylistContentsResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z + .array(z.lazy(() => ClearPlaylistContentsErrors$.outboundSchema)) + .optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/createplaylist.ts b/src/models/errors/createplaylist.ts new file mode 100644 index 00000000..1492e516 --- /dev/null +++ b/src/models/errors/createplaylist.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type CreatePlaylistErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type CreatePlaylistResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class CreatePlaylistResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: CreatePlaylistResponseBodyData; + + constructor(err: CreatePlaylistResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "CreatePlaylistResponseBody"; + } +} + +/** @internal */ +export namespace CreatePlaylistErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace CreatePlaylistResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => CreatePlaylistErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new CreatePlaylistResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(CreatePlaylistResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => CreatePlaylistErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/deletelibrary.ts b/src/models/errors/deletelibrary.ts new file mode 100644 index 00000000..6958298a --- /dev/null +++ b/src/models/errors/deletelibrary.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type DeleteLibraryErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type DeleteLibraryResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class DeleteLibraryResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: DeleteLibraryResponseBodyData; + + constructor(err: DeleteLibraryResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "DeleteLibraryResponseBody"; + } +} + +/** @internal */ +export namespace DeleteLibraryErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace DeleteLibraryResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => DeleteLibraryErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new DeleteLibraryResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(DeleteLibraryResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => DeleteLibraryErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/deleteplaylist.ts b/src/models/errors/deleteplaylist.ts new file mode 100644 index 00000000..cdfe224c --- /dev/null +++ b/src/models/errors/deleteplaylist.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type DeletePlaylistErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type DeletePlaylistResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class DeletePlaylistResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: DeletePlaylistResponseBodyData; + + constructor(err: DeletePlaylistResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "DeletePlaylistResponseBody"; + } +} + +/** @internal */ +export namespace DeletePlaylistErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace DeletePlaylistResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => DeletePlaylistErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new DeletePlaylistResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(DeletePlaylistResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => DeletePlaylistErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/enablepapertrail.ts b/src/models/errors/enablepapertrail.ts new file mode 100644 index 00000000..2639241e --- /dev/null +++ b/src/models/errors/enablepapertrail.ts @@ -0,0 +1,146 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type EnablePaperTrailErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type EnablePaperTrailResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class EnablePaperTrailResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: EnablePaperTrailResponseBodyData; + + constructor(err: EnablePaperTrailResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "EnablePaperTrailResponseBody"; + } +} + +/** @internal */ +export namespace EnablePaperTrailErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace EnablePaperTrailResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => EnablePaperTrailErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new EnablePaperTrailResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(EnablePaperTrailResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z + .array(z.lazy(() => EnablePaperTrailErrors$.outboundSchema)) + .optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getavailableclients.ts b/src/models/errors/getavailableclients.ts new file mode 100644 index 00000000..0c311dbd --- /dev/null +++ b/src/models/errors/getavailableclients.ts @@ -0,0 +1,151 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetAvailableClientsErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetAvailableClientsResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetAvailableClientsResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetAvailableClientsResponseBodyData; + + constructor(err: GetAvailableClientsResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetAvailableClientsResponseBody"; + } +} + +/** @internal */ +export namespace GetAvailableClientsErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetAvailableClientsResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = + z + .object({ + errors: z.array(z.lazy(() => GetAvailableClientsErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetAvailableClientsResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + GetAvailableClientsResponseBody + > = z + .instanceof(GetAvailableClientsResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z + .array(z.lazy(() => GetAvailableClientsErrors$.outboundSchema)) + .optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getbutlertasks.ts b/src/models/errors/getbutlertasks.ts new file mode 100644 index 00000000..93cee404 --- /dev/null +++ b/src/models/errors/getbutlertasks.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetButlerTasksErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetButlerTasksResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetButlerTasksResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetButlerTasksResponseBodyData; + + constructor(err: GetButlerTasksResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetButlerTasksResponseBody"; + } +} + +/** @internal */ +export namespace GetButlerTasksErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetButlerTasksResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => GetButlerTasksErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetButlerTasksResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(GetButlerTasksResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => GetButlerTasksErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getcommonlibraryitems.ts b/src/models/errors/getcommonlibraryitems.ts new file mode 100644 index 00000000..2876d299 --- /dev/null +++ b/src/models/errors/getcommonlibraryitems.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetCommonLibraryItemsErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetCommonLibraryItemsResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetCommonLibraryItemsResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetCommonLibraryItemsResponseBodyData; + + constructor(err: GetCommonLibraryItemsResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetCommonLibraryItemsResponseBody"; + } +} + +/** @internal */ +export namespace GetCommonLibraryItemsErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetCommonLibraryItemsResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType< + GetCommonLibraryItemsResponseBody, + z.ZodTypeDef, + Inbound + > = z + .object({ + errors: z.array(z.lazy(() => GetCommonLibraryItemsErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetCommonLibraryItemsResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + GetCommonLibraryItemsResponseBody + > = z + .instanceof(GetCommonLibraryItemsResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z + .array(z.lazy(() => GetCommonLibraryItemsErrors$.outboundSchema)) + .optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getdevices.ts b/src/models/errors/getdevices.ts new file mode 100644 index 00000000..594b73eb --- /dev/null +++ b/src/models/errors/getdevices.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetDevicesErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetDevicesResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetDevicesResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetDevicesResponseBodyData; + + constructor(err: GetDevicesResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetDevicesResponseBody"; + } +} + +/** @internal */ +export namespace GetDevicesErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetDevicesResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => GetDevicesErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetDevicesResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(GetDevicesResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => GetDevicesErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getfilehash.ts b/src/models/errors/getfilehash.ts new file mode 100644 index 00000000..7728b02c --- /dev/null +++ b/src/models/errors/getfilehash.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetFileHashErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetFileHashResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetFileHashResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetFileHashResponseBodyData; + + constructor(err: GetFileHashResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetFileHashResponseBody"; + } +} + +/** @internal */ +export namespace GetFileHashErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetFileHashResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => GetFileHashErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetFileHashResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(GetFileHashResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => GetFileHashErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getglobalhubs.ts b/src/models/errors/getglobalhubs.ts new file mode 100644 index 00000000..40e72ffa --- /dev/null +++ b/src/models/errors/getglobalhubs.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetGlobalHubsErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetGlobalHubsResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetGlobalHubsResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetGlobalHubsResponseBodyData; + + constructor(err: GetGlobalHubsResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetGlobalHubsResponseBody"; + } +} + +/** @internal */ +export namespace GetGlobalHubsErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetGlobalHubsResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => GetGlobalHubsErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetGlobalHubsResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(GetGlobalHubsResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => GetGlobalHubsErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getlatestlibraryitems.ts b/src/models/errors/getlatestlibraryitems.ts new file mode 100644 index 00000000..5c87b776 --- /dev/null +++ b/src/models/errors/getlatestlibraryitems.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetLatestLibraryItemsErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetLatestLibraryItemsResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetLatestLibraryItemsResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetLatestLibraryItemsResponseBodyData; + + constructor(err: GetLatestLibraryItemsResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetLatestLibraryItemsResponseBody"; + } +} + +/** @internal */ +export namespace GetLatestLibraryItemsErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetLatestLibraryItemsResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType< + GetLatestLibraryItemsResponseBody, + z.ZodTypeDef, + Inbound + > = z + .object({ + errors: z.array(z.lazy(() => GetLatestLibraryItemsErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetLatestLibraryItemsResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + GetLatestLibraryItemsResponseBody + > = z + .instanceof(GetLatestLibraryItemsResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z + .array(z.lazy(() => GetLatestLibraryItemsErrors$.outboundSchema)) + .optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getlibraries.ts b/src/models/errors/getlibraries.ts new file mode 100644 index 00000000..233e68f9 --- /dev/null +++ b/src/models/errors/getlibraries.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetLibrariesErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetLibrariesResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetLibrariesResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetLibrariesResponseBodyData; + + constructor(err: GetLibrariesResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetLibrariesResponseBody"; + } +} + +/** @internal */ +export namespace GetLibrariesErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetLibrariesResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => GetLibrariesErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetLibrariesResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(GetLibrariesResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => GetLibrariesErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getlibrary.ts b/src/models/errors/getlibrary.ts new file mode 100644 index 00000000..ea76cca3 --- /dev/null +++ b/src/models/errors/getlibrary.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetLibraryErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetLibraryResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetLibraryResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetLibraryResponseBodyData; + + constructor(err: GetLibraryResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetLibraryResponseBody"; + } +} + +/** @internal */ +export namespace GetLibraryErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetLibraryResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => GetLibraryErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetLibraryResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(GetLibraryResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => GetLibraryErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getlibraryhubs.ts b/src/models/errors/getlibraryhubs.ts new file mode 100644 index 00000000..884bc815 --- /dev/null +++ b/src/models/errors/getlibraryhubs.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetLibraryHubsErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetLibraryHubsResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetLibraryHubsResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetLibraryHubsResponseBodyData; + + constructor(err: GetLibraryHubsResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetLibraryHubsResponseBody"; + } +} + +/** @internal */ +export namespace GetLibraryHubsErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetLibraryHubsResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => GetLibraryHubsErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetLibraryHubsResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(GetLibraryHubsResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => GetLibraryHubsErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getlibraryitems.ts b/src/models/errors/getlibraryitems.ts new file mode 100644 index 00000000..6479f0fe --- /dev/null +++ b/src/models/errors/getlibraryitems.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetLibraryItemsErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetLibraryItemsResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetLibraryItemsResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetLibraryItemsResponseBodyData; + + constructor(err: GetLibraryItemsResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetLibraryItemsResponseBody"; + } +} + +/** @internal */ +export namespace GetLibraryItemsErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetLibraryItemsResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => GetLibraryItemsErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetLibraryItemsResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(GetLibraryItemsResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => GetLibraryItemsErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getmetadata.ts b/src/models/errors/getmetadata.ts new file mode 100644 index 00000000..e53b6b13 --- /dev/null +++ b/src/models/errors/getmetadata.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetMetadataErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetMetadataResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetMetadataResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetMetadataResponseBodyData; + + constructor(err: GetMetadataResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetMetadataResponseBody"; + } +} + +/** @internal */ +export namespace GetMetadataErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetMetadataResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => GetMetadataErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetMetadataResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(GetMetadataResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => GetMetadataErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getmetadatachildren.ts b/src/models/errors/getmetadatachildren.ts new file mode 100644 index 00000000..fdd0c033 --- /dev/null +++ b/src/models/errors/getmetadatachildren.ts @@ -0,0 +1,151 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetMetadataChildrenErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetMetadataChildrenResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetMetadataChildrenResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetMetadataChildrenResponseBodyData; + + constructor(err: GetMetadataChildrenResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetMetadataChildrenResponseBody"; + } +} + +/** @internal */ +export namespace GetMetadataChildrenErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetMetadataChildrenResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = + z + .object({ + errors: z.array(z.lazy(() => GetMetadataChildrenErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetMetadataChildrenResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + GetMetadataChildrenResponseBody + > = z + .instanceof(GetMetadataChildrenResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z + .array(z.lazy(() => GetMetadataChildrenErrors$.outboundSchema)) + .optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getmyplexaccount.ts b/src/models/errors/getmyplexaccount.ts new file mode 100644 index 00000000..14a74ead --- /dev/null +++ b/src/models/errors/getmyplexaccount.ts @@ -0,0 +1,146 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetMyPlexAccountErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetMyPlexAccountResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetMyPlexAccountResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetMyPlexAccountResponseBodyData; + + constructor(err: GetMyPlexAccountResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetMyPlexAccountResponseBody"; + } +} + +/** @internal */ +export namespace GetMyPlexAccountErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetMyPlexAccountResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => GetMyPlexAccountErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetMyPlexAccountResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(GetMyPlexAccountResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z + .array(z.lazy(() => GetMyPlexAccountErrors$.outboundSchema)) + .optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getondeck.ts b/src/models/errors/getondeck.ts new file mode 100644 index 00000000..96c07ba7 --- /dev/null +++ b/src/models/errors/getondeck.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetOnDeckErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetOnDeckResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetOnDeckResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetOnDeckResponseBodyData; + + constructor(err: GetOnDeckResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetOnDeckResponseBody"; + } +} + +/** @internal */ +export namespace GetOnDeckErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetOnDeckResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => GetOnDeckErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetOnDeckResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(GetOnDeckResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => GetOnDeckErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getplaylist.ts b/src/models/errors/getplaylist.ts new file mode 100644 index 00000000..8b076011 --- /dev/null +++ b/src/models/errors/getplaylist.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetPlaylistErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetPlaylistResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetPlaylistResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetPlaylistResponseBodyData; + + constructor(err: GetPlaylistResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetPlaylistResponseBody"; + } +} + +/** @internal */ +export namespace GetPlaylistErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetPlaylistResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => GetPlaylistErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetPlaylistResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(GetPlaylistResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => GetPlaylistErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getplaylistcontents.ts b/src/models/errors/getplaylistcontents.ts new file mode 100644 index 00000000..3bd97ffd --- /dev/null +++ b/src/models/errors/getplaylistcontents.ts @@ -0,0 +1,151 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetPlaylistContentsErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetPlaylistContentsResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetPlaylistContentsResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetPlaylistContentsResponseBodyData; + + constructor(err: GetPlaylistContentsResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetPlaylistContentsResponseBody"; + } +} + +/** @internal */ +export namespace GetPlaylistContentsErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetPlaylistContentsResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = + z + .object({ + errors: z.array(z.lazy(() => GetPlaylistContentsErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetPlaylistContentsResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + GetPlaylistContentsResponseBody + > = z + .instanceof(GetPlaylistContentsResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z + .array(z.lazy(() => GetPlaylistContentsErrors$.outboundSchema)) + .optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getplaylists.ts b/src/models/errors/getplaylists.ts new file mode 100644 index 00000000..67859efc --- /dev/null +++ b/src/models/errors/getplaylists.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetPlaylistsErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetPlaylistsResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetPlaylistsResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetPlaylistsResponseBodyData; + + constructor(err: GetPlaylistsResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetPlaylistsResponseBody"; + } +} + +/** @internal */ +export namespace GetPlaylistsErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetPlaylistsResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => GetPlaylistsErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetPlaylistsResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(GetPlaylistsResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => GetPlaylistsErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getrecentlyadded.ts b/src/models/errors/getrecentlyadded.ts new file mode 100644 index 00000000..7c326be0 --- /dev/null +++ b/src/models/errors/getrecentlyadded.ts @@ -0,0 +1,146 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetRecentlyAddedErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetRecentlyAddedResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetRecentlyAddedResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetRecentlyAddedResponseBodyData; + + constructor(err: GetRecentlyAddedResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetRecentlyAddedResponseBody"; + } +} + +/** @internal */ +export namespace GetRecentlyAddedErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetRecentlyAddedResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => GetRecentlyAddedErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetRecentlyAddedResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(GetRecentlyAddedResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z + .array(z.lazy(() => GetRecentlyAddedErrors$.outboundSchema)) + .optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getresizedphoto.ts b/src/models/errors/getresizedphoto.ts new file mode 100644 index 00000000..2adbc70f --- /dev/null +++ b/src/models/errors/getresizedphoto.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetResizedPhotoErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetResizedPhotoResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetResizedPhotoResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetResizedPhotoResponseBodyData; + + constructor(err: GetResizedPhotoResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetResizedPhotoResponseBody"; + } +} + +/** @internal */ +export namespace GetResizedPhotoErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetResizedPhotoResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => GetResizedPhotoErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetResizedPhotoResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(GetResizedPhotoResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => GetResizedPhotoErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getsearchresults.ts b/src/models/errors/getsearchresults.ts new file mode 100644 index 00000000..2c5378bb --- /dev/null +++ b/src/models/errors/getsearchresults.ts @@ -0,0 +1,146 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetSearchResultsErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetSearchResultsResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetSearchResultsResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetSearchResultsResponseBodyData; + + constructor(err: GetSearchResultsResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetSearchResultsResponseBody"; + } +} + +/** @internal */ +export namespace GetSearchResultsErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetSearchResultsResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => GetSearchResultsErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetSearchResultsResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(GetSearchResultsResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z + .array(z.lazy(() => GetSearchResultsErrors$.outboundSchema)) + .optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getserveractivities.ts b/src/models/errors/getserveractivities.ts new file mode 100644 index 00000000..5b54e564 --- /dev/null +++ b/src/models/errors/getserveractivities.ts @@ -0,0 +1,151 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetServerActivitiesErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetServerActivitiesResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetServerActivitiesResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetServerActivitiesResponseBodyData; + + constructor(err: GetServerActivitiesResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetServerActivitiesResponseBody"; + } +} + +/** @internal */ +export namespace GetServerActivitiesErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetServerActivitiesResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = + z + .object({ + errors: z.array(z.lazy(() => GetServerActivitiesErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetServerActivitiesResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + GetServerActivitiesResponseBody + > = z + .instanceof(GetServerActivitiesResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z + .array(z.lazy(() => GetServerActivitiesErrors$.outboundSchema)) + .optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getservercapabilities.ts b/src/models/errors/getservercapabilities.ts new file mode 100644 index 00000000..522bde26 --- /dev/null +++ b/src/models/errors/getservercapabilities.ts @@ -0,0 +1,152 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type Errors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetServerCapabilitiesResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetServerCapabilitiesResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetServerCapabilitiesResponseBodyData; + + constructor(err: GetServerCapabilitiesResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetServerCapabilitiesResponseBody"; + } +} + +/** @internal */ +export namespace Errors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetServerCapabilitiesResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType< + GetServerCapabilitiesResponseBody, + z.ZodTypeDef, + Inbound + > = z + .object({ + errors: z.array(z.lazy(() => Errors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetServerCapabilitiesResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + GetServerCapabilitiesResponseBody + > = z + .instanceof(GetServerCapabilitiesResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => Errors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getserveridentity.ts b/src/models/errors/getserveridentity.ts new file mode 100644 index 00000000..6f4bf8b8 --- /dev/null +++ b/src/models/errors/getserveridentity.ts @@ -0,0 +1,149 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetServerIdentityErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetServerIdentityResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetServerIdentityResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetServerIdentityResponseBodyData; + + constructor(err: GetServerIdentityResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetServerIdentityResponseBody"; + } +} + +/** @internal */ +export namespace GetServerIdentityErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetServerIdentityResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => GetServerIdentityErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetServerIdentityResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = + z + .instanceof(GetServerIdentityResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z + .array(z.lazy(() => GetServerIdentityErrors$.outboundSchema)) + .optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined + ? null + : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getserverlist.ts b/src/models/errors/getserverlist.ts new file mode 100644 index 00000000..c1b17871 --- /dev/null +++ b/src/models/errors/getserverlist.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetServerListErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetServerListResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetServerListResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetServerListResponseBodyData; + + constructor(err: GetServerListResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetServerListResponseBody"; + } +} + +/** @internal */ +export namespace GetServerListErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetServerListResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => GetServerListErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetServerListResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(GetServerListResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => GetServerListErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getserverpreferences.ts b/src/models/errors/getserverpreferences.ts new file mode 100644 index 00000000..6c352cf8 --- /dev/null +++ b/src/models/errors/getserverpreferences.ts @@ -0,0 +1,151 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetServerPreferencesErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetServerPreferencesResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetServerPreferencesResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetServerPreferencesResponseBodyData; + + constructor(err: GetServerPreferencesResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetServerPreferencesResponseBody"; + } +} + +/** @internal */ +export namespace GetServerPreferencesErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetServerPreferencesResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = + z + .object({ + errors: z.array(z.lazy(() => GetServerPreferencesErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetServerPreferencesResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + GetServerPreferencesResponseBody + > = z + .instanceof(GetServerPreferencesResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z + .array(z.lazy(() => GetServerPreferencesErrors$.outboundSchema)) + .optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getsessionhistory.ts b/src/models/errors/getsessionhistory.ts new file mode 100644 index 00000000..b496ab64 --- /dev/null +++ b/src/models/errors/getsessionhistory.ts @@ -0,0 +1,149 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetSessionHistoryErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetSessionHistoryResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetSessionHistoryResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetSessionHistoryResponseBodyData; + + constructor(err: GetSessionHistoryResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetSessionHistoryResponseBody"; + } +} + +/** @internal */ +export namespace GetSessionHistoryErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetSessionHistoryResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => GetSessionHistoryErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetSessionHistoryResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = + z + .instanceof(GetSessionHistoryResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z + .array(z.lazy(() => GetSessionHistoryErrors$.outboundSchema)) + .optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined + ? null + : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getsessions.ts b/src/models/errors/getsessions.ts new file mode 100644 index 00000000..811f44b0 --- /dev/null +++ b/src/models/errors/getsessions.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetSessionsErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetSessionsResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetSessionsResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetSessionsResponseBodyData; + + constructor(err: GetSessionsResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetSessionsResponseBody"; + } +} + +/** @internal */ +export namespace GetSessionsErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetSessionsResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => GetSessionsErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetSessionsResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(GetSessionsResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => GetSessionsErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getsourceconnectioninformation.ts b/src/models/errors/getsourceconnectioninformation.ts new file mode 100644 index 00000000..ab4f669a --- /dev/null +++ b/src/models/errors/getsourceconnectioninformation.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetSourceConnectionInformationErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetSourceConnectionInformationResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetSourceConnectionInformationResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetSourceConnectionInformationResponseBodyData; + + constructor(err: GetSourceConnectionInformationResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetSourceConnectionInformationResponseBody"; + } +} + +/** @internal */ +export namespace GetSourceConnectionInformationErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType< + GetSourceConnectionInformationErrors, + z.ZodTypeDef, + Inbound + > = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + GetSourceConnectionInformationErrors + > = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetSourceConnectionInformationResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType< + GetSourceConnectionInformationResponseBody, + z.ZodTypeDef, + Inbound + > = z + .object({ + errors: z + .array(z.lazy(() => GetSourceConnectionInformationErrors$.inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetSourceConnectionInformationResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + GetSourceConnectionInformationResponseBody + > = z + .instanceof(GetSourceConnectionInformationResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z + .array(z.lazy(() => GetSourceConnectionInformationErrors$.outboundSchema)) + .optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/gettimeline.ts b/src/models/errors/gettimeline.ts new file mode 100644 index 00000000..4b0a07f8 --- /dev/null +++ b/src/models/errors/gettimeline.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetTimelineErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetTimelineResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetTimelineResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetTimelineResponseBodyData; + + constructor(err: GetTimelineResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetTimelineResponseBody"; + } +} + +/** @internal */ +export namespace GetTimelineErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetTimelineResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => GetTimelineErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetTimelineResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(GetTimelineResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => GetTimelineErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/gettranscodesessions.ts b/src/models/errors/gettranscodesessions.ts new file mode 100644 index 00000000..c7b3a0e3 --- /dev/null +++ b/src/models/errors/gettranscodesessions.ts @@ -0,0 +1,151 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetTranscodeSessionsErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetTranscodeSessionsResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetTranscodeSessionsResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetTranscodeSessionsResponseBodyData; + + constructor(err: GetTranscodeSessionsResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetTranscodeSessionsResponseBody"; + } +} + +/** @internal */ +export namespace GetTranscodeSessionsErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetTranscodeSessionsResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = + z + .object({ + errors: z.array(z.lazy(() => GetTranscodeSessionsErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetTranscodeSessionsResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + GetTranscodeSessionsResponseBody + > = z + .instanceof(GetTranscodeSessionsResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z + .array(z.lazy(() => GetTranscodeSessionsErrors$.outboundSchema)) + .optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/gettransienttoken.ts b/src/models/errors/gettransienttoken.ts new file mode 100644 index 00000000..aad549ea --- /dev/null +++ b/src/models/errors/gettransienttoken.ts @@ -0,0 +1,149 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetTransientTokenErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetTransientTokenResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetTransientTokenResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetTransientTokenResponseBodyData; + + constructor(err: GetTransientTokenResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetTransientTokenResponseBody"; + } +} + +/** @internal */ +export namespace GetTransientTokenErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetTransientTokenResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => GetTransientTokenErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetTransientTokenResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = + z + .instanceof(GetTransientTokenResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z + .array(z.lazy(() => GetTransientTokenErrors$.outboundSchema)) + .optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined + ? null + : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/getupdatestatus.ts b/src/models/errors/getupdatestatus.ts new file mode 100644 index 00000000..2dc9efa9 --- /dev/null +++ b/src/models/errors/getupdatestatus.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetUpdateStatusErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetUpdateStatusResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetUpdateStatusResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetUpdateStatusResponseBodyData; + + constructor(err: GetUpdateStatusResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "GetUpdateStatusResponseBody"; + } +} + +/** @internal */ +export namespace GetUpdateStatusErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace GetUpdateStatusResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => GetUpdateStatusErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new GetUpdateStatusResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(GetUpdateStatusResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => GetUpdateStatusErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/index.ts b/src/models/errors/index.ts new file mode 100644 index 00000000..2a0cb8a1 --- /dev/null +++ b/src/models/errors/index.ts @@ -0,0 +1,63 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +export * from "./addplaylistcontents"; +export * from "./applyupdates"; +export * from "./cancelserveractivities"; +export * from "./checkforupdates"; +export * from "./clearplaylistcontents"; +export * from "./createplaylist"; +export * from "./deletelibrary"; +export * from "./deleteplaylist"; +export * from "./enablepapertrail"; +export * from "./getavailableclients"; +export * from "./getbutlertasks"; +export * from "./getcommonlibraryitems"; +export * from "./getdevices"; +export * from "./getfilehash"; +export * from "./getglobalhubs"; +export * from "./getlatestlibraryitems"; +export * from "./getlibraries"; +export * from "./getlibrary"; +export * from "./getlibraryhubs"; +export * from "./getlibraryitems"; +export * from "./getmetadata"; +export * from "./getmetadatachildren"; +export * from "./getmyplexaccount"; +export * from "./getondeck"; +export * from "./getplaylist"; +export * from "./getplaylistcontents"; +export * from "./getplaylists"; +export * from "./getrecentlyadded"; +export * from "./getresizedphoto"; +export * from "./getsearchresults"; +export * from "./getserveractivities"; +export * from "./getservercapabilities"; +export * from "./getserveridentity"; +export * from "./getserverlist"; +export * from "./getserverpreferences"; +export * from "./getsessionhistory"; +export * from "./getsessions"; +export * from "./getsourceconnectioninformation"; +export * from "./gettimeline"; +export * from "./gettranscodesessions"; +export * from "./gettransienttoken"; +export * from "./getupdatestatus"; +export * from "./logline"; +export * from "./logmultiline"; +export * from "./markplayed"; +export * from "./markunplayed"; +export * from "./performsearch"; +export * from "./performvoicesearch"; +export * from "./refreshlibrary"; +export * from "./sdkerror"; +export * from "./startalltasks"; +export * from "./starttask"; +export * from "./startuniversaltranscode"; +export * from "./stopalltasks"; +export * from "./stoptask"; +export * from "./stoptranscodesession"; +export * from "./updateplaylist"; +export * from "./updateplayprogress"; +export * from "./uploadplaylist"; diff --git a/src/models/errors/logline.ts b/src/models/errors/logline.ts new file mode 100644 index 00000000..67dda36f --- /dev/null +++ b/src/models/errors/logline.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type LogLineErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type LogLineResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class LogLineResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: LogLineResponseBodyData; + + constructor(err: LogLineResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "LogLineResponseBody"; + } +} + +/** @internal */ +export namespace LogLineErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace LogLineResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => LogLineErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new LogLineResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(LogLineResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => LogLineErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/logmultiline.ts b/src/models/errors/logmultiline.ts new file mode 100644 index 00000000..cc6bdfad --- /dev/null +++ b/src/models/errors/logmultiline.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type LogMultiLineErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type LogMultiLineResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class LogMultiLineResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: LogMultiLineResponseBodyData; + + constructor(err: LogMultiLineResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "LogMultiLineResponseBody"; + } +} + +/** @internal */ +export namespace LogMultiLineErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace LogMultiLineResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => LogMultiLineErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new LogMultiLineResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(LogMultiLineResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => LogMultiLineErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/markplayed.ts b/src/models/errors/markplayed.ts new file mode 100644 index 00000000..9803f30e --- /dev/null +++ b/src/models/errors/markplayed.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type MarkPlayedErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type MarkPlayedResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class MarkPlayedResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: MarkPlayedResponseBodyData; + + constructor(err: MarkPlayedResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "MarkPlayedResponseBody"; + } +} + +/** @internal */ +export namespace MarkPlayedErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace MarkPlayedResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => MarkPlayedErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new MarkPlayedResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(MarkPlayedResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => MarkPlayedErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/markunplayed.ts b/src/models/errors/markunplayed.ts new file mode 100644 index 00000000..0ba5cd20 --- /dev/null +++ b/src/models/errors/markunplayed.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type MarkUnplayedErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type MarkUnplayedResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class MarkUnplayedResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: MarkUnplayedResponseBodyData; + + constructor(err: MarkUnplayedResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "MarkUnplayedResponseBody"; + } +} + +/** @internal */ +export namespace MarkUnplayedErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace MarkUnplayedResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => MarkUnplayedErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new MarkUnplayedResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(MarkUnplayedResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => MarkUnplayedErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/performsearch.ts b/src/models/errors/performsearch.ts new file mode 100644 index 00000000..0958c919 --- /dev/null +++ b/src/models/errors/performsearch.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type PerformSearchErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type PerformSearchResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class PerformSearchResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: PerformSearchResponseBodyData; + + constructor(err: PerformSearchResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "PerformSearchResponseBody"; + } +} + +/** @internal */ +export namespace PerformSearchErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace PerformSearchResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => PerformSearchErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new PerformSearchResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(PerformSearchResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => PerformSearchErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/performvoicesearch.ts b/src/models/errors/performvoicesearch.ts new file mode 100644 index 00000000..9957bd74 --- /dev/null +++ b/src/models/errors/performvoicesearch.ts @@ -0,0 +1,149 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type PerformVoiceSearchErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type PerformVoiceSearchResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class PerformVoiceSearchResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: PerformVoiceSearchResponseBodyData; + + constructor(err: PerformVoiceSearchResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "PerformVoiceSearchResponseBody"; + } +} + +/** @internal */ +export namespace PerformVoiceSearchErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace PerformVoiceSearchResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => PerformVoiceSearchErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new PerformVoiceSearchResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = + z + .instanceof(PerformVoiceSearchResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z + .array(z.lazy(() => PerformVoiceSearchErrors$.outboundSchema)) + .optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined + ? null + : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/refreshlibrary.ts b/src/models/errors/refreshlibrary.ts new file mode 100644 index 00000000..02e2ad19 --- /dev/null +++ b/src/models/errors/refreshlibrary.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type RefreshLibraryErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type RefreshLibraryResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class RefreshLibraryResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: RefreshLibraryResponseBodyData; + + constructor(err: RefreshLibraryResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "RefreshLibraryResponseBody"; + } +} + +/** @internal */ +export namespace RefreshLibraryErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace RefreshLibraryResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => RefreshLibraryErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new RefreshLibraryResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(RefreshLibraryResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => RefreshLibraryErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/sdkerror.ts b/src/models/errors/sdkerror.ts new file mode 100644 index 00000000..bcd7873a --- /dev/null +++ b/src/models/errors/sdkerror.ts @@ -0,0 +1,24 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +export class SDKError extends Error { + statusCode: number; + body: string; + rawResponse: Response; + + constructor(message: string, response: Response, body: string = "") { + const statusCode = response.status; + + let bodyString = ""; + if (body.length > 0) { + bodyString = `\n${body}`; + } + + super(`${message}: Status ${statusCode}${bodyString}`); + this.statusCode = statusCode; + this.body = body; + this.rawResponse = response; + this.name = "SDKError"; + } +} diff --git a/src/models/errors/startalltasks.ts b/src/models/errors/startalltasks.ts new file mode 100644 index 00000000..e4db32d4 --- /dev/null +++ b/src/models/errors/startalltasks.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type StartAllTasksErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type StartAllTasksResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class StartAllTasksResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: StartAllTasksResponseBodyData; + + constructor(err: StartAllTasksResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "StartAllTasksResponseBody"; + } +} + +/** @internal */ +export namespace StartAllTasksErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace StartAllTasksResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => StartAllTasksErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new StartAllTasksResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(StartAllTasksResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => StartAllTasksErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/starttask.ts b/src/models/errors/starttask.ts new file mode 100644 index 00000000..f2973d1b --- /dev/null +++ b/src/models/errors/starttask.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type StartTaskErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type StartTaskResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class StartTaskResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: StartTaskResponseBodyData; + + constructor(err: StartTaskResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "StartTaskResponseBody"; + } +} + +/** @internal */ +export namespace StartTaskErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace StartTaskResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => StartTaskErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new StartTaskResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(StartTaskResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => StartTaskErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/startuniversaltranscode.ts b/src/models/errors/startuniversaltranscode.ts new file mode 100644 index 00000000..6c8dc01a --- /dev/null +++ b/src/models/errors/startuniversaltranscode.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type StartUniversalTranscodeErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type StartUniversalTranscodeResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class StartUniversalTranscodeResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: StartUniversalTranscodeResponseBodyData; + + constructor(err: StartUniversalTranscodeResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "StartUniversalTranscodeResponseBody"; + } +} + +/** @internal */ +export namespace StartUniversalTranscodeErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = + z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace StartUniversalTranscodeResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType< + StartUniversalTranscodeResponseBody, + z.ZodTypeDef, + Inbound + > = z + .object({ + errors: z.array(z.lazy(() => StartUniversalTranscodeErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new StartUniversalTranscodeResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + StartUniversalTranscodeResponseBody + > = z + .instanceof(StartUniversalTranscodeResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z + .array(z.lazy(() => StartUniversalTranscodeErrors$.outboundSchema)) + .optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/stopalltasks.ts b/src/models/errors/stopalltasks.ts new file mode 100644 index 00000000..41f2f318 --- /dev/null +++ b/src/models/errors/stopalltasks.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type StopAllTasksErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type StopAllTasksResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class StopAllTasksResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: StopAllTasksResponseBodyData; + + constructor(err: StopAllTasksResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "StopAllTasksResponseBody"; + } +} + +/** @internal */ +export namespace StopAllTasksErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace StopAllTasksResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => StopAllTasksErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new StopAllTasksResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(StopAllTasksResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => StopAllTasksErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/stoptask.ts b/src/models/errors/stoptask.ts new file mode 100644 index 00000000..31c914e5 --- /dev/null +++ b/src/models/errors/stoptask.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type StopTaskErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type StopTaskResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class StopTaskResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: StopTaskResponseBodyData; + + constructor(err: StopTaskResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "StopTaskResponseBody"; + } +} + +/** @internal */ +export namespace StopTaskErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace StopTaskResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => StopTaskErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new StopTaskResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(StopTaskResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => StopTaskErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/stoptranscodesession.ts b/src/models/errors/stoptranscodesession.ts new file mode 100644 index 00000000..05f938c5 --- /dev/null +++ b/src/models/errors/stoptranscodesession.ts @@ -0,0 +1,151 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type StopTranscodeSessionErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type StopTranscodeSessionResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class StopTranscodeSessionResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: StopTranscodeSessionResponseBodyData; + + constructor(err: StopTranscodeSessionResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "StopTranscodeSessionResponseBody"; + } +} + +/** @internal */ +export namespace StopTranscodeSessionErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace StopTranscodeSessionResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = + z + .object({ + errors: z.array(z.lazy(() => StopTranscodeSessionErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new StopTranscodeSessionResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + StopTranscodeSessionResponseBody + > = z + .instanceof(StopTranscodeSessionResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z + .array(z.lazy(() => StopTranscodeSessionErrors$.outboundSchema)) + .optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/updateplaylist.ts b/src/models/errors/updateplaylist.ts new file mode 100644 index 00000000..c888a4f9 --- /dev/null +++ b/src/models/errors/updateplaylist.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type UpdatePlaylistErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type UpdatePlaylistResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class UpdatePlaylistResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: UpdatePlaylistResponseBodyData; + + constructor(err: UpdatePlaylistResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "UpdatePlaylistResponseBody"; + } +} + +/** @internal */ +export namespace UpdatePlaylistErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace UpdatePlaylistResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => UpdatePlaylistErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new UpdatePlaylistResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(UpdatePlaylistResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => UpdatePlaylistErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/updateplayprogress.ts b/src/models/errors/updateplayprogress.ts new file mode 100644 index 00000000..386e0b1e --- /dev/null +++ b/src/models/errors/updateplayprogress.ts @@ -0,0 +1,149 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type UpdatePlayProgressErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type UpdatePlayProgressResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class UpdatePlayProgressResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: UpdatePlayProgressResponseBodyData; + + constructor(err: UpdatePlayProgressResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "UpdatePlayProgressResponseBody"; + } +} + +/** @internal */ +export namespace UpdatePlayProgressErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace UpdatePlayProgressResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => UpdatePlayProgressErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new UpdatePlayProgressResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = + z + .instanceof(UpdatePlayProgressResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z + .array(z.lazy(() => UpdatePlayProgressErrors$.outboundSchema)) + .optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined + ? null + : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/errors/uploadplaylist.ts b/src/models/errors/uploadplaylist.ts new file mode 100644 index 00000000..042607b8 --- /dev/null +++ b/src/models/errors/uploadplaylist.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type UploadPlaylistErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type UploadPlaylistResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class UploadPlaylistResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: UploadPlaylistResponseBodyData; + + constructor(err: UploadPlaylistResponseBodyData, options?: ErrorOptions) { + super("", options); + this.data$ = err; + + if (err.errors != null) { + this.errors = err.errors; + } + if (err.rawResponse != null) { + this.rawResponse = err.rawResponse; + } + + const msg = "message" in err && typeof err.message === "string" ? err.message : ""; + const { rawResponse, ...data } = err; + const content = JSON.stringify(data); + this.message = [msg, content].filter(Boolean).join("\n"); + + this.name = "UploadPlaylistResponseBody"; + } +} + +/** @internal */ +export namespace UploadPlaylistErrors$ { + export type Inbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); + + export type Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: z.number().optional(), + message: z.string().optional(), + status: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.code === undefined ? null : { code: v.code }), + ...(v.message === undefined ? null : { message: v.message }), + ...(v.status === undefined ? null : { status: v.status }), + }; + }); +} + +/** @internal */ +export namespace UploadPlaylistResponseBody$ { + export type Inbound = { + errors?: Array | undefined; + RawResponse?: Response | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + errors: z.array(z.lazy(() => UploadPlaylistErrors$.inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), + }) + .transform((v) => { + return new UploadPlaylistResponseBody({ + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }), + }); + }); + export type Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(UploadPlaylistResponseBody) + .transform((v) => v.data$) + .pipe( + z + .object({ + errors: z.array(z.lazy(() => UploadPlaylistErrors$.outboundSchema)).optional(), + rawResponse: z + .instanceof(Response) + .transform(() => { + throw new Error("Response cannot be serialized"); + }) + .optional(), + }) + .transform((v) => { + return { + ...(v.errors === undefined ? null : { errors: v.errors }), + ...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }), + }; + }) + ); +} diff --git a/src/models/operations/addplaylistcontents.ts b/src/models/operations/addplaylistcontents.ts new file mode 100644 index 00000000..8ae06633 --- /dev/null +++ b/src/models/operations/addplaylistcontents.ts @@ -0,0 +1,123 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type AddPlaylistContentsRequest = { + /** + * the ID of the playlist + */ + playlistID: number; + /** + * the content URI for the playlist + */ + uri: string; + /** + * the play queue to add to a playlist + */ + playQueueID: number; +}; + +export type AddPlaylistContentsResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace AddPlaylistContentsRequest$ { + export type Inbound = { + playlistID: number; + uri: string; + playQueueID: number; + }; + + export const inboundSchema: z.ZodType = z + .object({ + playlistID: z.number(), + uri: z.string(), + playQueueID: z.number(), + }) + .transform((v) => { + return { + playlistID: v.playlistID, + uri: v.uri, + playQueueID: v.playQueueID, + }; + }); + + export type Outbound = { + playlistID: number; + uri: string; + playQueueID: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + playlistID: z.number(), + uri: z.string(), + playQueueID: z.number(), + }) + .transform((v) => { + return { + playlistID: v.playlistID, + uri: v.uri, + playQueueID: v.playQueueID, + }; + }); +} + +/** @internal */ +export namespace AddPlaylistContentsResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/applyupdates.ts b/src/models/operations/applyupdates.ts new file mode 100644 index 00000000..3e85ec84 --- /dev/null +++ b/src/models/operations/applyupdates.ts @@ -0,0 +1,135 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +/** + * Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install + */ +export enum Tonight { + Zero = 0, + One = 1, +} + +/** + * Indicate that the latest version should be marked as skipped. The entry for this version will have the `state` set to `skipped`. + */ +export enum Skip { + Zero = 0, + One = 1, +} + +export type ApplyUpdatesRequest = { + /** + * Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install + */ + tonight?: Tonight | undefined; + /** + * Indicate that the latest version should be marked as skipped. The entry for this version will have the `state` set to `skipped`. + */ + skip?: Skip | undefined; +}; + +export type ApplyUpdatesResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export const Tonight$ = z.nativeEnum(Tonight); + +/** @internal */ +export const Skip$ = z.nativeEnum(Skip); + +/** @internal */ +export namespace ApplyUpdatesRequest$ { + export type Inbound = { + tonight?: Tonight | undefined; + skip?: Skip | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + tonight: Tonight$.optional(), + skip: Skip$.optional(), + }) + .transform((v) => { + return { + ...(v.tonight === undefined ? null : { tonight: v.tonight }), + ...(v.skip === undefined ? null : { skip: v.skip }), + }; + }); + + export type Outbound = { + tonight?: Tonight | undefined; + skip?: Skip | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + tonight: Tonight$.optional(), + skip: Skip$.optional(), + }) + .transform((v) => { + return { + ...(v.tonight === undefined ? null : { tonight: v.tonight }), + ...(v.skip === undefined ? null : { skip: v.skip }), + }; + }); +} + +/** @internal */ +export namespace ApplyUpdatesResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/cancelserveractivities.ts b/src/models/operations/cancelserveractivities.ts new file mode 100644 index 00000000..7eac9fba --- /dev/null +++ b/src/models/operations/cancelserveractivities.ts @@ -0,0 +1,105 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type CancelServerActivitiesRequest = { + /** + * The UUID of the activity to cancel. + */ + activityUUID: string; +}; + +export type CancelServerActivitiesResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace CancelServerActivitiesRequest$ { + export type Inbound = { + activityUUID: string; + }; + + export const inboundSchema: z.ZodType = z + .object({ + activityUUID: z.string(), + }) + .transform((v) => { + return { + activityUUID: v.activityUUID, + }; + }); + + export type Outbound = { + activityUUID: string; + }; + + export const outboundSchema: z.ZodType = + z + .object({ + activityUUID: z.string(), + }) + .transform((v) => { + return { + activityUUID: v.activityUUID, + }; + }); +} + +/** @internal */ +export namespace CancelServerActivitiesResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = + z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/checkforupdates.ts b/src/models/operations/checkforupdates.ts new file mode 100644 index 00000000..e6d94499 --- /dev/null +++ b/src/models/operations/checkforupdates.ts @@ -0,0 +1,114 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +/** + * Indicate that you want to start download any updates found. + */ +export enum Download { + Zero = 0, + One = 1, +} + +export type CheckForUpdatesRequest = { + /** + * Indicate that you want to start download any updates found. + */ + download?: Download | undefined; +}; + +export type CheckForUpdatesResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export const Download$ = z.nativeEnum(Download); + +/** @internal */ +export namespace CheckForUpdatesRequest$ { + export type Inbound = { + download?: Download | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + download: Download$.optional(), + }) + .transform((v) => { + return { + ...(v.download === undefined ? null : { download: v.download }), + }; + }); + + export type Outbound = { + download?: Download | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + download: Download$.optional(), + }) + .transform((v) => { + return { + ...(v.download === undefined ? null : { download: v.download }), + }; + }); +} + +/** @internal */ +export namespace CheckForUpdatesResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/clearplaylistcontents.ts b/src/models/operations/clearplaylistcontents.ts new file mode 100644 index 00000000..3c679314 --- /dev/null +++ b/src/models/operations/clearplaylistcontents.ts @@ -0,0 +1,104 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type ClearPlaylistContentsRequest = { + /** + * the ID of the playlist + */ + playlistID: number; +}; + +export type ClearPlaylistContentsResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace ClearPlaylistContentsRequest$ { + export type Inbound = { + playlistID: number; + }; + + export const inboundSchema: z.ZodType = z + .object({ + playlistID: z.number(), + }) + .transform((v) => { + return { + playlistID: v.playlistID, + }; + }); + + export type Outbound = { + playlistID: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + playlistID: z.number(), + }) + .transform((v) => { + return { + playlistID: v.playlistID, + }; + }); +} + +/** @internal */ +export namespace ClearPlaylistContentsResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = + z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/createplaylist.ts b/src/models/operations/createplaylist.ts new file mode 100644 index 00000000..5df35b42 --- /dev/null +++ b/src/models/operations/createplaylist.ts @@ -0,0 +1,166 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +/** + * type of playlist to create + */ +export enum TypeT { + Audio = "audio", + Video = "video", + Photo = "photo", +} + +/** + * whether the playlist is smart or not + */ +export enum Smart { + Zero = 0, + One = 1, +} + +export type CreatePlaylistRequest = { + /** + * name of the playlist + */ + title: string; + /** + * type of playlist to create + */ + type: TypeT; + /** + * whether the playlist is smart or not + */ + smart: Smart; + /** + * the content URI for the playlist + */ + uri?: string | undefined; + /** + * the play queue to copy to a playlist + */ + playQueueID?: number | undefined; +}; + +export type CreatePlaylistResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export const TypeT$ = z.nativeEnum(TypeT); + +/** @internal */ +export const Smart$ = z.nativeEnum(Smart); + +/** @internal */ +export namespace CreatePlaylistRequest$ { + export type Inbound = { + title: string; + type: TypeT; + smart: Smart; + uri?: string | undefined; + playQueueID?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + title: z.string(), + type: TypeT$, + smart: Smart$, + uri: z.string().optional(), + playQueueID: z.number().optional(), + }) + .transform((v) => { + return { + title: v.title, + type: v.type, + smart: v.smart, + ...(v.uri === undefined ? null : { uri: v.uri }), + ...(v.playQueueID === undefined ? null : { playQueueID: v.playQueueID }), + }; + }); + + export type Outbound = { + title: string; + type: TypeT; + smart: Smart; + uri?: string | undefined; + playQueueID?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + title: z.string(), + type: TypeT$, + smart: Smart$, + uri: z.string().optional(), + playQueueID: z.number().optional(), + }) + .transform((v) => { + return { + title: v.title, + type: v.type, + smart: v.smart, + ...(v.uri === undefined ? null : { uri: v.uri }), + ...(v.playQueueID === undefined ? null : { playQueueID: v.playQueueID }), + }; + }); +} + +/** @internal */ +export namespace CreatePlaylistResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/deletelibrary.ts b/src/models/operations/deletelibrary.ts new file mode 100644 index 00000000..95b51f2c --- /dev/null +++ b/src/models/operations/deletelibrary.ts @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type DeleteLibraryRequest = { + /** + * the Id of the library to query + */ + sectionId: number; +}; + +export type DeleteLibraryResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace DeleteLibraryRequest$ { + export type Inbound = { + sectionId: number; + }; + + export const inboundSchema: z.ZodType = z + .object({ + sectionId: z.number(), + }) + .transform((v) => { + return { + sectionId: v.sectionId, + }; + }); + + export type Outbound = { + sectionId: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + sectionId: z.number(), + }) + .transform((v) => { + return { + sectionId: v.sectionId, + }; + }); +} + +/** @internal */ +export namespace DeleteLibraryResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/deleteplaylist.ts b/src/models/operations/deleteplaylist.ts new file mode 100644 index 00000000..ec2c86c1 --- /dev/null +++ b/src/models/operations/deleteplaylist.ts @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type DeletePlaylistRequest = { + /** + * the ID of the playlist + */ + playlistID: number; +}; + +export type DeletePlaylistResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace DeletePlaylistRequest$ { + export type Inbound = { + playlistID: number; + }; + + export const inboundSchema: z.ZodType = z + .object({ + playlistID: z.number(), + }) + .transform((v) => { + return { + playlistID: v.playlistID, + }; + }); + + export type Outbound = { + playlistID: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + playlistID: z.number(), + }) + .transform((v) => { + return { + playlistID: v.playlistID, + }; + }); +} + +/** @internal */ +export namespace DeletePlaylistResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/enablepapertrail.ts b/src/models/operations/enablepapertrail.ts new file mode 100644 index 00000000..5ac4feb3 --- /dev/null +++ b/src/models/operations/enablepapertrail.ts @@ -0,0 +1,65 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type EnablePaperTrailResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace EnablePaperTrailResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/getavailableclients.ts b/src/models/operations/getavailableclients.ts new file mode 100644 index 00000000..fddb9488 --- /dev/null +++ b/src/models/operations/getavailableclients.ts @@ -0,0 +1,281 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type Server = { + name?: string | undefined; + host?: string | undefined; + address?: string | undefined; + port?: number | undefined; + machineIdentifier?: string | undefined; + version?: string | undefined; + protocol?: string | undefined; + product?: string | undefined; + deviceClass?: string | undefined; + protocolVersion?: number | undefined; + protocolCapabilities?: string | undefined; +}; + +export type GetAvailableClientsMediaContainer = { + size?: number | undefined; + server?: Array | undefined; +}; + +export type ResponseBody = { + mediaContainer?: GetAvailableClientsMediaContainer | undefined; +}; + +export type GetAvailableClientsResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Available Clients + */ + responseBodies?: Array | undefined; +}; + +/** @internal */ +export namespace Server$ { + export type Inbound = { + name?: string | undefined; + host?: string | undefined; + address?: string | undefined; + port?: number | undefined; + machineIdentifier?: string | undefined; + version?: string | undefined; + protocol?: string | undefined; + product?: string | undefined; + deviceClass?: string | undefined; + protocolVersion?: number | undefined; + protocolCapabilities?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + name: z.string().optional(), + host: z.string().optional(), + address: z.string().optional(), + port: z.number().optional(), + machineIdentifier: z.string().optional(), + version: z.string().optional(), + protocol: z.string().optional(), + product: z.string().optional(), + deviceClass: z.string().optional(), + protocolVersion: z.number().optional(), + protocolCapabilities: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.name === undefined ? null : { name: v.name }), + ...(v.host === undefined ? null : { host: v.host }), + ...(v.address === undefined ? null : { address: v.address }), + ...(v.port === undefined ? null : { port: v.port }), + ...(v.machineIdentifier === undefined + ? null + : { machineIdentifier: v.machineIdentifier }), + ...(v.version === undefined ? null : { version: v.version }), + ...(v.protocol === undefined ? null : { protocol: v.protocol }), + ...(v.product === undefined ? null : { product: v.product }), + ...(v.deviceClass === undefined ? null : { deviceClass: v.deviceClass }), + ...(v.protocolVersion === undefined + ? null + : { protocolVersion: v.protocolVersion }), + ...(v.protocolCapabilities === undefined + ? null + : { protocolCapabilities: v.protocolCapabilities }), + }; + }); + + export type Outbound = { + name?: string | undefined; + host?: string | undefined; + address?: string | undefined; + port?: number | undefined; + machineIdentifier?: string | undefined; + version?: string | undefined; + protocol?: string | undefined; + product?: string | undefined; + deviceClass?: string | undefined; + protocolVersion?: number | undefined; + protocolCapabilities?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + name: z.string().optional(), + host: z.string().optional(), + address: z.string().optional(), + port: z.number().optional(), + machineIdentifier: z.string().optional(), + version: z.string().optional(), + protocol: z.string().optional(), + product: z.string().optional(), + deviceClass: z.string().optional(), + protocolVersion: z.number().optional(), + protocolCapabilities: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.name === undefined ? null : { name: v.name }), + ...(v.host === undefined ? null : { host: v.host }), + ...(v.address === undefined ? null : { address: v.address }), + ...(v.port === undefined ? null : { port: v.port }), + ...(v.machineIdentifier === undefined + ? null + : { machineIdentifier: v.machineIdentifier }), + ...(v.version === undefined ? null : { version: v.version }), + ...(v.protocol === undefined ? null : { protocol: v.protocol }), + ...(v.product === undefined ? null : { product: v.product }), + ...(v.deviceClass === undefined ? null : { deviceClass: v.deviceClass }), + ...(v.protocolVersion === undefined + ? null + : { protocolVersion: v.protocolVersion }), + ...(v.protocolCapabilities === undefined + ? null + : { protocolCapabilities: v.protocolCapabilities }), + }; + }); +} + +/** @internal */ +export namespace GetAvailableClientsMediaContainer$ { + export type Inbound = { + size?: number | undefined; + Server?: Array | undefined; + }; + + export const inboundSchema: z.ZodType< + GetAvailableClientsMediaContainer, + z.ZodTypeDef, + Inbound + > = z + .object({ + size: z.number().optional(), + Server: z.array(z.lazy(() => Server$.inboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.size === undefined ? null : { size: v.size }), + ...(v.Server === undefined ? null : { server: v.Server }), + }; + }); + + export type Outbound = { + size?: number | undefined; + Server?: Array | undefined; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + GetAvailableClientsMediaContainer + > = z + .object({ + size: z.number().optional(), + server: z.array(z.lazy(() => Server$.outboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.size === undefined ? null : { size: v.size }), + ...(v.server === undefined ? null : { Server: v.server }), + }; + }); +} + +/** @internal */ +export namespace ResponseBody$ { + export type Inbound = { + MediaContainer?: GetAvailableClientsMediaContainer$.Inbound | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + MediaContainer: z + .lazy(() => GetAvailableClientsMediaContainer$.inboundSchema) + .optional(), + }) + .transform((v) => { + return { + ...(v.MediaContainer === undefined ? null : { mediaContainer: v.MediaContainer }), + }; + }); + + export type Outbound = { + MediaContainer?: GetAvailableClientsMediaContainer$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + mediaContainer: z + .lazy(() => GetAvailableClientsMediaContainer$.outboundSchema) + .optional(), + }) + .transform((v) => { + return { + ...(v.mediaContainer === undefined ? null : { MediaContainer: v.mediaContainer }), + }; + }); +} + +/** @internal */ +export namespace GetAvailableClientsResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + responseBodies?: Array | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + responseBodies: z.array(z.lazy(() => ResponseBody$.inboundSchema)).optional(), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + ...(v.responseBodies === undefined ? null : { responseBodies: v.responseBodies }), + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + responseBodies?: Array | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + responseBodies: z.array(z.lazy(() => ResponseBody$.outboundSchema)).optional(), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + ...(v.responseBodies === undefined ? null : { responseBodies: v.responseBodies }), + }; + }); +} diff --git a/src/models/operations/getbutlertasks.ts b/src/models/operations/getbutlertasks.ts new file mode 100644 index 00000000..3ac7c27a --- /dev/null +++ b/src/models/operations/getbutlertasks.ts @@ -0,0 +1,222 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type ButlerTask = { + name?: string | undefined; + interval?: number | undefined; + scheduleRandomized?: boolean | undefined; + enabled?: boolean | undefined; + title?: string | undefined; + description?: string | undefined; +}; + +export type ButlerTasks = { + butlerTask?: Array | undefined; +}; + +/** + * All butler tasks + */ +export type GetButlerTasksResponseBody = { + butlerTasks?: ButlerTasks | undefined; +}; + +export type GetButlerTasksResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * All butler tasks + */ + object?: GetButlerTasksResponseBody | undefined; +}; + +/** @internal */ +export namespace ButlerTask$ { + export type Inbound = { + name?: string | undefined; + interval?: number | undefined; + scheduleRandomized?: boolean | undefined; + enabled?: boolean | undefined; + title?: string | undefined; + description?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + name: z.string().optional(), + interval: z.number().optional(), + scheduleRandomized: z.boolean().optional(), + enabled: z.boolean().optional(), + title: z.string().optional(), + description: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.name === undefined ? null : { name: v.name }), + ...(v.interval === undefined ? null : { interval: v.interval }), + ...(v.scheduleRandomized === undefined + ? null + : { scheduleRandomized: v.scheduleRandomized }), + ...(v.enabled === undefined ? null : { enabled: v.enabled }), + ...(v.title === undefined ? null : { title: v.title }), + ...(v.description === undefined ? null : { description: v.description }), + }; + }); + + export type Outbound = { + name?: string | undefined; + interval?: number | undefined; + scheduleRandomized?: boolean | undefined; + enabled?: boolean | undefined; + title?: string | undefined; + description?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + name: z.string().optional(), + interval: z.number().optional(), + scheduleRandomized: z.boolean().optional(), + enabled: z.boolean().optional(), + title: z.string().optional(), + description: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.name === undefined ? null : { name: v.name }), + ...(v.interval === undefined ? null : { interval: v.interval }), + ...(v.scheduleRandomized === undefined + ? null + : { scheduleRandomized: v.scheduleRandomized }), + ...(v.enabled === undefined ? null : { enabled: v.enabled }), + ...(v.title === undefined ? null : { title: v.title }), + ...(v.description === undefined ? null : { description: v.description }), + }; + }); +} + +/** @internal */ +export namespace ButlerTasks$ { + export type Inbound = { + ButlerTask?: Array | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ButlerTask: z.array(z.lazy(() => ButlerTask$.inboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.ButlerTask === undefined ? null : { butlerTask: v.ButlerTask }), + }; + }); + + export type Outbound = { + ButlerTask?: Array | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + butlerTask: z.array(z.lazy(() => ButlerTask$.outboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.butlerTask === undefined ? null : { ButlerTask: v.butlerTask }), + }; + }); +} + +/** @internal */ +export namespace GetButlerTasksResponseBody$ { + export type Inbound = { + ButlerTasks?: ButlerTasks$.Inbound | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ButlerTasks: z.lazy(() => ButlerTasks$.inboundSchema).optional(), + }) + .transform((v) => { + return { + ...(v.ButlerTasks === undefined ? null : { butlerTasks: v.ButlerTasks }), + }; + }); + + export type Outbound = { + ButlerTasks?: ButlerTasks$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + butlerTasks: z.lazy(() => ButlerTasks$.outboundSchema).optional(), + }) + .transform((v) => { + return { + ...(v.butlerTasks === undefined ? null : { ButlerTasks: v.butlerTasks }), + }; + }); +} + +/** @internal */ +export namespace GetButlerTasksResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + object?: GetButlerTasksResponseBody$.Inbound | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetButlerTasksResponseBody$.inboundSchema).optional(), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + ...(v.object === undefined ? null : { object: v.object }), + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetButlerTasksResponseBody$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetButlerTasksResponseBody$.outboundSchema).optional(), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + ...(v.object === undefined ? null : { object: v.object }), + }; + }); +} diff --git a/src/models/operations/getcommonlibraryitems.ts b/src/models/operations/getcommonlibraryitems.ts new file mode 100644 index 00000000..0021dc2d --- /dev/null +++ b/src/models/operations/getcommonlibraryitems.ts @@ -0,0 +1,124 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetCommonLibraryItemsRequest = { + /** + * the Id of the library to query + */ + sectionId: number; + /** + * item type + */ + type: number; + /** + * the filter parameter + */ + filter?: string | undefined; +}; + +export type GetCommonLibraryItemsResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace GetCommonLibraryItemsRequest$ { + export type Inbound = { + sectionId: number; + type: number; + filter?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + sectionId: z.number(), + type: z.number(), + filter: z.string().optional(), + }) + .transform((v) => { + return { + sectionId: v.sectionId, + type: v.type, + ...(v.filter === undefined ? null : { filter: v.filter }), + }; + }); + + export type Outbound = { + sectionId: number; + type: number; + filter?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + sectionId: z.number(), + type: z.number(), + filter: z.string().optional(), + }) + .transform((v) => { + return { + sectionId: v.sectionId, + type: v.type, + ...(v.filter === undefined ? null : { filter: v.filter }), + }; + }); +} + +/** @internal */ +export namespace GetCommonLibraryItemsResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = + z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/getdevices.ts b/src/models/operations/getdevices.ts new file mode 100644 index 00000000..7e427eff --- /dev/null +++ b/src/models/operations/getdevices.ts @@ -0,0 +1,229 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type Device = { + id?: number | undefined; + name?: string | undefined; + platform?: string | undefined; + clientIdentifier?: string | undefined; + createdAt?: number | undefined; +}; + +export type GetDevicesMediaContainer = { + size?: number | undefined; + identifier?: string | undefined; + device?: Array | undefined; +}; + +/** + * Devices + */ +export type GetDevicesResponseBody = { + mediaContainer?: GetDevicesMediaContainer | undefined; +}; + +export type GetDevicesResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Devices + */ + object?: GetDevicesResponseBody | undefined; +}; + +/** @internal */ +export namespace Device$ { + export type Inbound = { + id?: number | undefined; + name?: string | undefined; + platform?: string | undefined; + clientIdentifier?: string | undefined; + createdAt?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + id: z.number().optional(), + name: z.string().optional(), + platform: z.string().optional(), + clientIdentifier: z.string().optional(), + createdAt: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.id === undefined ? null : { id: v.id }), + ...(v.name === undefined ? null : { name: v.name }), + ...(v.platform === undefined ? null : { platform: v.platform }), + ...(v.clientIdentifier === undefined + ? null + : { clientIdentifier: v.clientIdentifier }), + ...(v.createdAt === undefined ? null : { createdAt: v.createdAt }), + }; + }); + + export type Outbound = { + id?: number | undefined; + name?: string | undefined; + platform?: string | undefined; + clientIdentifier?: string | undefined; + createdAt?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + id: z.number().optional(), + name: z.string().optional(), + platform: z.string().optional(), + clientIdentifier: z.string().optional(), + createdAt: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.id === undefined ? null : { id: v.id }), + ...(v.name === undefined ? null : { name: v.name }), + ...(v.platform === undefined ? null : { platform: v.platform }), + ...(v.clientIdentifier === undefined + ? null + : { clientIdentifier: v.clientIdentifier }), + ...(v.createdAt === undefined ? null : { createdAt: v.createdAt }), + }; + }); +} + +/** @internal */ +export namespace GetDevicesMediaContainer$ { + export type Inbound = { + size?: number | undefined; + identifier?: string | undefined; + Device?: Array | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + size: z.number().optional(), + identifier: z.string().optional(), + Device: z.array(z.lazy(() => Device$.inboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.size === undefined ? null : { size: v.size }), + ...(v.identifier === undefined ? null : { identifier: v.identifier }), + ...(v.Device === undefined ? null : { device: v.Device }), + }; + }); + + export type Outbound = { + size?: number | undefined; + identifier?: string | undefined; + Device?: Array | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + size: z.number().optional(), + identifier: z.string().optional(), + device: z.array(z.lazy(() => Device$.outboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.size === undefined ? null : { size: v.size }), + ...(v.identifier === undefined ? null : { identifier: v.identifier }), + ...(v.device === undefined ? null : { Device: v.device }), + }; + }); +} + +/** @internal */ +export namespace GetDevicesResponseBody$ { + export type Inbound = { + MediaContainer?: GetDevicesMediaContainer$.Inbound | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + MediaContainer: z.lazy(() => GetDevicesMediaContainer$.inboundSchema).optional(), + }) + .transform((v) => { + return { + ...(v.MediaContainer === undefined ? null : { mediaContainer: v.MediaContainer }), + }; + }); + + export type Outbound = { + MediaContainer?: GetDevicesMediaContainer$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + mediaContainer: z.lazy(() => GetDevicesMediaContainer$.outboundSchema).optional(), + }) + .transform((v) => { + return { + ...(v.mediaContainer === undefined ? null : { MediaContainer: v.mediaContainer }), + }; + }); +} + +/** @internal */ +export namespace GetDevicesResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + object?: GetDevicesResponseBody$.Inbound | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetDevicesResponseBody$.inboundSchema).optional(), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + ...(v.object === undefined ? null : { object: v.object }), + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetDevicesResponseBody$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetDevicesResponseBody$.outboundSchema).optional(), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + ...(v.object === undefined ? null : { object: v.object }), + }; + }); +} diff --git a/src/models/operations/getfilehash.ts b/src/models/operations/getfilehash.ts new file mode 100644 index 00000000..7e0ee996 --- /dev/null +++ b/src/models/operations/getfilehash.ts @@ -0,0 +1,113 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetFileHashRequest = { + /** + * This is the path to the local file, must be prefixed by `file://` + */ + url: string; + /** + * Item type + */ + type?: number | undefined; +}; + +export type GetFileHashResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace GetFileHashRequest$ { + export type Inbound = { + url: string; + type?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + url: z.string(), + type: z.number().optional(), + }) + .transform((v) => { + return { + url: v.url, + ...(v.type === undefined ? null : { type: v.type }), + }; + }); + + export type Outbound = { + url: string; + type?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + url: z.string(), + type: z.number().optional(), + }) + .transform((v) => { + return { + url: v.url, + ...(v.type === undefined ? null : { type: v.type }), + }; + }); +} + +/** @internal */ +export namespace GetFileHashResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/getglobalhubs.ts b/src/models/operations/getglobalhubs.ts new file mode 100644 index 00000000..b34d5d7f --- /dev/null +++ b/src/models/operations/getglobalhubs.ts @@ -0,0 +1,124 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +/** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + */ +export enum OnlyTransient { + Zero = 0, + One = 1, +} + +export type GetGlobalHubsRequest = { + /** + * The number of items to return with each hub. + */ + count?: number | undefined; + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + */ + onlyTransient?: OnlyTransient | undefined; +}; + +export type GetGlobalHubsResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export const OnlyTransient$ = z.nativeEnum(OnlyTransient); + +/** @internal */ +export namespace GetGlobalHubsRequest$ { + export type Inbound = { + count?: number | undefined; + onlyTransient?: OnlyTransient | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + count: z.number().optional(), + onlyTransient: OnlyTransient$.optional(), + }) + .transform((v) => { + return { + ...(v.count === undefined ? null : { count: v.count }), + ...(v.onlyTransient === undefined ? null : { onlyTransient: v.onlyTransient }), + }; + }); + + export type Outbound = { + count?: number | undefined; + onlyTransient?: OnlyTransient | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + count: z.number().optional(), + onlyTransient: OnlyTransient$.optional(), + }) + .transform((v) => { + return { + ...(v.count === undefined ? null : { count: v.count }), + ...(v.onlyTransient === undefined ? null : { onlyTransient: v.onlyTransient }), + }; + }); +} + +/** @internal */ +export namespace GetGlobalHubsResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/getlatestlibraryitems.ts b/src/models/operations/getlatestlibraryitems.ts new file mode 100644 index 00000000..3f3b8651 --- /dev/null +++ b/src/models/operations/getlatestlibraryitems.ts @@ -0,0 +1,124 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetLatestLibraryItemsRequest = { + /** + * the Id of the library to query + */ + sectionId: number; + /** + * item type + */ + type: number; + /** + * the filter parameter + */ + filter?: string | undefined; +}; + +export type GetLatestLibraryItemsResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace GetLatestLibraryItemsRequest$ { + export type Inbound = { + sectionId: number; + type: number; + filter?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + sectionId: z.number(), + type: z.number(), + filter: z.string().optional(), + }) + .transform((v) => { + return { + sectionId: v.sectionId, + type: v.type, + ...(v.filter === undefined ? null : { filter: v.filter }), + }; + }); + + export type Outbound = { + sectionId: number; + type: number; + filter?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + sectionId: z.number(), + type: z.number(), + filter: z.string().optional(), + }) + .transform((v) => { + return { + sectionId: v.sectionId, + type: v.type, + ...(v.filter === undefined ? null : { filter: v.filter }), + }; + }); +} + +/** @internal */ +export namespace GetLatestLibraryItemsResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = + z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/getlibraries.ts b/src/models/operations/getlibraries.ts new file mode 100644 index 00000000..e97dccd2 --- /dev/null +++ b/src/models/operations/getlibraries.ts @@ -0,0 +1,65 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetLibrariesResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace GetLibrariesResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/getlibrary.ts b/src/models/operations/getlibrary.ts new file mode 100644 index 00000000..0bba315c --- /dev/null +++ b/src/models/operations/getlibrary.ts @@ -0,0 +1,132 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +/** + * Whether or not to include details for a section (types, filters, and sorts). + * + * @remarks + * Only exists for backwards compatibility, media providers other than the server libraries have it on always. + * + */ +export enum IncludeDetails { + Zero = 0, + One = 1, +} + +export type GetLibraryRequest = { + /** + * the Id of the library to query + */ + sectionId: number; + /** + * Whether or not to include details for a section (types, filters, and sorts). + * + * @remarks + * Only exists for backwards compatibility, media providers other than the server libraries have it on always. + * + */ + includeDetails?: IncludeDetails | undefined; +}; + +export type GetLibraryResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export const IncludeDetails$ = z.nativeEnum(IncludeDetails); + +/** @internal */ +export namespace GetLibraryRequest$ { + export type Inbound = { + sectionId: number; + includeDetails?: IncludeDetails | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + sectionId: z.number(), + includeDetails: IncludeDetails$.optional(), + }) + .transform((v) => { + return { + sectionId: v.sectionId, + ...(v.includeDetails === undefined ? null : { includeDetails: v.includeDetails }), + }; + }); + + export type Outbound = { + sectionId: number; + includeDetails?: IncludeDetails | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + sectionId: z.number(), + includeDetails: IncludeDetails$.optional(), + }) + .transform((v) => { + return { + sectionId: v.sectionId, + ...(v.includeDetails === undefined ? null : { includeDetails: v.includeDetails }), + }; + }); +} + +/** @internal */ +export namespace GetLibraryResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/getlibraryhubs.ts b/src/models/operations/getlibraryhubs.ts new file mode 100644 index 00000000..559ef022 --- /dev/null +++ b/src/models/operations/getlibraryhubs.ts @@ -0,0 +1,134 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +/** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + */ +export enum QueryParamOnlyTransient { + Zero = 0, + One = 1, +} + +export type GetLibraryHubsRequest = { + /** + * the Id of the library to query + */ + sectionId: number; + /** + * The number of items to return with each hub. + */ + count?: number | undefined; + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + */ + onlyTransient?: QueryParamOnlyTransient | undefined; +}; + +export type GetLibraryHubsResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export const QueryParamOnlyTransient$ = z.nativeEnum(QueryParamOnlyTransient); + +/** @internal */ +export namespace GetLibraryHubsRequest$ { + export type Inbound = { + sectionId: number; + count?: number | undefined; + onlyTransient?: QueryParamOnlyTransient | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + sectionId: z.number(), + count: z.number().optional(), + onlyTransient: QueryParamOnlyTransient$.optional(), + }) + .transform((v) => { + return { + sectionId: v.sectionId, + ...(v.count === undefined ? null : { count: v.count }), + ...(v.onlyTransient === undefined ? null : { onlyTransient: v.onlyTransient }), + }; + }); + + export type Outbound = { + sectionId: number; + count?: number | undefined; + onlyTransient?: QueryParamOnlyTransient | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + sectionId: z.number(), + count: z.number().optional(), + onlyTransient: QueryParamOnlyTransient$.optional(), + }) + .transform((v) => { + return { + sectionId: v.sectionId, + ...(v.count === undefined ? null : { count: v.count }), + ...(v.onlyTransient === undefined ? null : { onlyTransient: v.onlyTransient }), + }; + }); +} + +/** @internal */ +export namespace GetLibraryHubsResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/getlibraryitems.ts b/src/models/operations/getlibraryitems.ts new file mode 100644 index 00000000..e3ca4f61 --- /dev/null +++ b/src/models/operations/getlibraryitems.ts @@ -0,0 +1,123 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetLibraryItemsRequest = { + /** + * the Id of the library to query + */ + sectionId: number; + /** + * item type + */ + type?: number | undefined; + /** + * the filter parameter + */ + filter?: string | undefined; +}; + +export type GetLibraryItemsResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace GetLibraryItemsRequest$ { + export type Inbound = { + sectionId: number; + type?: number | undefined; + filter?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + sectionId: z.number(), + type: z.number().optional(), + filter: z.string().optional(), + }) + .transform((v) => { + return { + sectionId: v.sectionId, + ...(v.type === undefined ? null : { type: v.type }), + ...(v.filter === undefined ? null : { filter: v.filter }), + }; + }); + + export type Outbound = { + sectionId: number; + type?: number | undefined; + filter?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + sectionId: z.number(), + type: z.number().optional(), + filter: z.string().optional(), + }) + .transform((v) => { + return { + sectionId: v.sectionId, + ...(v.type === undefined ? null : { type: v.type }), + ...(v.filter === undefined ? null : { filter: v.filter }), + }; + }); +} + +/** @internal */ +export namespace GetLibraryItemsResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/getmetadata.ts b/src/models/operations/getmetadata.ts new file mode 100644 index 00000000..9f077073 --- /dev/null +++ b/src/models/operations/getmetadata.ts @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetMetadataRequest = { + /** + * the id of the library item to return the children of. + */ + ratingKey: number; +}; + +export type GetMetadataResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace GetMetadataRequest$ { + export type Inbound = { + ratingKey: number; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ratingKey: z.number(), + }) + .transform((v) => { + return { + ratingKey: v.ratingKey, + }; + }); + + export type Outbound = { + ratingKey: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + ratingKey: z.number(), + }) + .transform((v) => { + return { + ratingKey: v.ratingKey, + }; + }); +} + +/** @internal */ +export namespace GetMetadataResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/getmetadatachildren.ts b/src/models/operations/getmetadatachildren.ts new file mode 100644 index 00000000..eb33dd66 --- /dev/null +++ b/src/models/operations/getmetadatachildren.ts @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetMetadataChildrenRequest = { + /** + * the id of the library item to return the children of. + */ + ratingKey: number; +}; + +export type GetMetadataChildrenResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace GetMetadataChildrenRequest$ { + export type Inbound = { + ratingKey: number; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ratingKey: z.number(), + }) + .transform((v) => { + return { + ratingKey: v.ratingKey, + }; + }); + + export type Outbound = { + ratingKey: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + ratingKey: z.number(), + }) + .transform((v) => { + return { + ratingKey: v.ratingKey, + }; + }); +} + +/** @internal */ +export namespace GetMetadataChildrenResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/getmyplexaccount.ts b/src/models/operations/getmyplexaccount.ts new file mode 100644 index 00000000..db27dfb6 --- /dev/null +++ b/src/models/operations/getmyplexaccount.ts @@ -0,0 +1,237 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type MyPlex = { + authToken?: string | undefined; + username?: string | undefined; + mappingState?: string | undefined; + mappingError?: string | undefined; + signInState?: string | undefined; + publicAddress?: string | undefined; + publicPort?: number | undefined; + privateAddress?: string | undefined; + privatePort?: number | undefined; + subscriptionFeatures?: string | undefined; + subscriptionActive?: boolean | undefined; + subscriptionState?: string | undefined; +}; + +/** + * MyPlex Account + */ +export type GetMyPlexAccountResponseBody = { + myPlex?: MyPlex | undefined; +}; + +export type GetMyPlexAccountResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * MyPlex Account + */ + object?: GetMyPlexAccountResponseBody | undefined; +}; + +/** @internal */ +export namespace MyPlex$ { + export type Inbound = { + authToken?: string | undefined; + username?: string | undefined; + mappingState?: string | undefined; + mappingError?: string | undefined; + signInState?: string | undefined; + publicAddress?: string | undefined; + publicPort?: number | undefined; + privateAddress?: string | undefined; + privatePort?: number | undefined; + subscriptionFeatures?: string | undefined; + subscriptionActive?: boolean | undefined; + subscriptionState?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + authToken: z.string().optional(), + username: z.string().optional(), + mappingState: z.string().optional(), + mappingError: z.string().optional(), + signInState: z.string().optional(), + publicAddress: z.string().optional(), + publicPort: z.number().optional(), + privateAddress: z.string().optional(), + privatePort: z.number().optional(), + subscriptionFeatures: z.string().optional(), + subscriptionActive: z.boolean().optional(), + subscriptionState: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.authToken === undefined ? null : { authToken: v.authToken }), + ...(v.username === undefined ? null : { username: v.username }), + ...(v.mappingState === undefined ? null : { mappingState: v.mappingState }), + ...(v.mappingError === undefined ? null : { mappingError: v.mappingError }), + ...(v.signInState === undefined ? null : { signInState: v.signInState }), + ...(v.publicAddress === undefined ? null : { publicAddress: v.publicAddress }), + ...(v.publicPort === undefined ? null : { publicPort: v.publicPort }), + ...(v.privateAddress === undefined ? null : { privateAddress: v.privateAddress }), + ...(v.privatePort === undefined ? null : { privatePort: v.privatePort }), + ...(v.subscriptionFeatures === undefined + ? null + : { subscriptionFeatures: v.subscriptionFeatures }), + ...(v.subscriptionActive === undefined + ? null + : { subscriptionActive: v.subscriptionActive }), + ...(v.subscriptionState === undefined + ? null + : { subscriptionState: v.subscriptionState }), + }; + }); + + export type Outbound = { + authToken?: string | undefined; + username?: string | undefined; + mappingState?: string | undefined; + mappingError?: string | undefined; + signInState?: string | undefined; + publicAddress?: string | undefined; + publicPort?: number | undefined; + privateAddress?: string | undefined; + privatePort?: number | undefined; + subscriptionFeatures?: string | undefined; + subscriptionActive?: boolean | undefined; + subscriptionState?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + authToken: z.string().optional(), + username: z.string().optional(), + mappingState: z.string().optional(), + mappingError: z.string().optional(), + signInState: z.string().optional(), + publicAddress: z.string().optional(), + publicPort: z.number().optional(), + privateAddress: z.string().optional(), + privatePort: z.number().optional(), + subscriptionFeatures: z.string().optional(), + subscriptionActive: z.boolean().optional(), + subscriptionState: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.authToken === undefined ? null : { authToken: v.authToken }), + ...(v.username === undefined ? null : { username: v.username }), + ...(v.mappingState === undefined ? null : { mappingState: v.mappingState }), + ...(v.mappingError === undefined ? null : { mappingError: v.mappingError }), + ...(v.signInState === undefined ? null : { signInState: v.signInState }), + ...(v.publicAddress === undefined ? null : { publicAddress: v.publicAddress }), + ...(v.publicPort === undefined ? null : { publicPort: v.publicPort }), + ...(v.privateAddress === undefined ? null : { privateAddress: v.privateAddress }), + ...(v.privatePort === undefined ? null : { privatePort: v.privatePort }), + ...(v.subscriptionFeatures === undefined + ? null + : { subscriptionFeatures: v.subscriptionFeatures }), + ...(v.subscriptionActive === undefined + ? null + : { subscriptionActive: v.subscriptionActive }), + ...(v.subscriptionState === undefined + ? null + : { subscriptionState: v.subscriptionState }), + }; + }); +} + +/** @internal */ +export namespace GetMyPlexAccountResponseBody$ { + export type Inbound = { + MyPlex?: MyPlex$.Inbound | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + MyPlex: z.lazy(() => MyPlex$.inboundSchema).optional(), + }) + .transform((v) => { + return { + ...(v.MyPlex === undefined ? null : { myPlex: v.MyPlex }), + }; + }); + + export type Outbound = { + MyPlex?: MyPlex$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + myPlex: z.lazy(() => MyPlex$.outboundSchema).optional(), + }) + .transform((v) => { + return { + ...(v.myPlex === undefined ? null : { MyPlex: v.myPlex }), + }; + }); +} + +/** @internal */ +export namespace GetMyPlexAccountResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + object?: GetMyPlexAccountResponseBody$.Inbound | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetMyPlexAccountResponseBody$.inboundSchema).optional(), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + ...(v.object === undefined ? null : { object: v.object }), + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetMyPlexAccountResponseBody$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetMyPlexAccountResponseBody$.outboundSchema).optional(), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + ...(v.object === undefined ? null : { object: v.object }), + }; + }); +} diff --git a/src/models/operations/getondeck.ts b/src/models/operations/getondeck.ts new file mode 100644 index 00000000..e1cc6543 --- /dev/null +++ b/src/models/operations/getondeck.ts @@ -0,0 +1,985 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type Stream = { + id?: number | undefined; + streamType?: number | undefined; + default?: boolean | undefined; + codec?: string | undefined; + index?: number | undefined; + bitrate?: number | undefined; + language?: string | undefined; + languageTag?: string | undefined; + languageCode?: string | undefined; + bitDepth?: number | undefined; + chromaLocation?: string | undefined; + chromaSubsampling?: string | undefined; + codedHeight?: number | undefined; + codedWidth?: number | undefined; + colorRange?: string | undefined; + frameRate?: number | undefined; + height?: number | undefined; + level?: number | undefined; + profile?: string | undefined; + refFrames?: number | undefined; + width?: number | undefined; + displayTitle?: string | undefined; + extendedDisplayTitle?: string | undefined; +}; + +export type GetOnDeckPart = { + id?: number | undefined; + key?: string | undefined; + duration?: number | undefined; + file?: string | undefined; + size?: number | undefined; + audioProfile?: string | undefined; + container?: string | undefined; + videoProfile?: string | undefined; + stream?: Array | undefined; +}; + +export type GetOnDeckMedia = { + id?: number | undefined; + duration?: number | undefined; + bitrate?: number | undefined; + width?: number | undefined; + height?: number | undefined; + aspectRatio?: number | undefined; + audioChannels?: number | undefined; + audioCodec?: string | undefined; + videoCodec?: string | undefined; + videoResolution?: string | undefined; + container?: string | undefined; + videoFrameRate?: string | undefined; + audioProfile?: string | undefined; + videoProfile?: string | undefined; + part?: Array | undefined; +}; + +export type Guids = { + id?: string | undefined; +}; + +export type GetOnDeckMetadata = { + allowSync?: boolean | undefined; + librarySectionID?: number | undefined; + librarySectionTitle?: string | undefined; + librarySectionUUID?: string | undefined; + ratingKey?: number | undefined; + key?: string | undefined; + parentRatingKey?: number | undefined; + grandparentRatingKey?: number | undefined; + guid?: string | undefined; + parentGuid?: string | undefined; + grandparentGuid?: string | undefined; + type?: string | undefined; + title?: string | undefined; + grandparentKey?: string | undefined; + parentKey?: string | undefined; + librarySectionKey?: string | undefined; + grandparentTitle?: string | undefined; + parentTitle?: string | undefined; + contentRating?: string | undefined; + summary?: string | undefined; + index?: number | undefined; + parentIndex?: number | undefined; + lastViewedAt?: number | undefined; + year?: number | undefined; + thumb?: string | undefined; + art?: string | undefined; + parentThumb?: string | undefined; + grandparentThumb?: string | undefined; + grandparentArt?: string | undefined; + grandparentTheme?: string | undefined; + duration?: number | undefined; + originallyAvailableAt?: Date | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + media?: Array | undefined; + guids?: Array | undefined; +}; + +export type GetOnDeckMediaContainer = { + size?: number | undefined; + allowSync?: boolean | undefined; + identifier?: string | undefined; + mediaTagPrefix?: string | undefined; + mediaTagVersion?: number | undefined; + mixedParents?: boolean | undefined; + metadata?: Array | undefined; +}; + +/** + * The on Deck content + */ +export type GetOnDeckResponseBody = { + mediaContainer?: GetOnDeckMediaContainer | undefined; +}; + +export type GetOnDeckResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * The on Deck content + */ + object?: GetOnDeckResponseBody | undefined; +}; + +/** @internal */ +export namespace Stream$ { + export type Inbound = { + id?: number | undefined; + streamType?: number | undefined; + default?: boolean | undefined; + codec?: string | undefined; + index?: number | undefined; + bitrate?: number | undefined; + language?: string | undefined; + languageTag?: string | undefined; + languageCode?: string | undefined; + bitDepth?: number | undefined; + chromaLocation?: string | undefined; + chromaSubsampling?: string | undefined; + codedHeight?: number | undefined; + codedWidth?: number | undefined; + colorRange?: string | undefined; + frameRate?: number | undefined; + height?: number | undefined; + level?: number | undefined; + profile?: string | undefined; + refFrames?: number | undefined; + width?: number | undefined; + displayTitle?: string | undefined; + extendedDisplayTitle?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + id: z.number().optional(), + streamType: z.number().optional(), + default: z.boolean().optional(), + codec: z.string().optional(), + index: z.number().optional(), + bitrate: z.number().optional(), + language: z.string().optional(), + languageTag: z.string().optional(), + languageCode: z.string().optional(), + bitDepth: z.number().optional(), + chromaLocation: z.string().optional(), + chromaSubsampling: z.string().optional(), + codedHeight: z.number().optional(), + codedWidth: z.number().optional(), + colorRange: z.string().optional(), + frameRate: z.number().optional(), + height: z.number().optional(), + level: z.number().optional(), + profile: z.string().optional(), + refFrames: z.number().optional(), + width: z.number().optional(), + displayTitle: z.string().optional(), + extendedDisplayTitle: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.id === undefined ? null : { id: v.id }), + ...(v.streamType === undefined ? null : { streamType: v.streamType }), + ...(v.default === undefined ? null : { default: v.default }), + ...(v.codec === undefined ? null : { codec: v.codec }), + ...(v.index === undefined ? null : { index: v.index }), + ...(v.bitrate === undefined ? null : { bitrate: v.bitrate }), + ...(v.language === undefined ? null : { language: v.language }), + ...(v.languageTag === undefined ? null : { languageTag: v.languageTag }), + ...(v.languageCode === undefined ? null : { languageCode: v.languageCode }), + ...(v.bitDepth === undefined ? null : { bitDepth: v.bitDepth }), + ...(v.chromaLocation === undefined ? null : { chromaLocation: v.chromaLocation }), + ...(v.chromaSubsampling === undefined + ? null + : { chromaSubsampling: v.chromaSubsampling }), + ...(v.codedHeight === undefined ? null : { codedHeight: v.codedHeight }), + ...(v.codedWidth === undefined ? null : { codedWidth: v.codedWidth }), + ...(v.colorRange === undefined ? null : { colorRange: v.colorRange }), + ...(v.frameRate === undefined ? null : { frameRate: v.frameRate }), + ...(v.height === undefined ? null : { height: v.height }), + ...(v.level === undefined ? null : { level: v.level }), + ...(v.profile === undefined ? null : { profile: v.profile }), + ...(v.refFrames === undefined ? null : { refFrames: v.refFrames }), + ...(v.width === undefined ? null : { width: v.width }), + ...(v.displayTitle === undefined ? null : { displayTitle: v.displayTitle }), + ...(v.extendedDisplayTitle === undefined + ? null + : { extendedDisplayTitle: v.extendedDisplayTitle }), + }; + }); + + export type Outbound = { + id?: number | undefined; + streamType?: number | undefined; + default?: boolean | undefined; + codec?: string | undefined; + index?: number | undefined; + bitrate?: number | undefined; + language?: string | undefined; + languageTag?: string | undefined; + languageCode?: string | undefined; + bitDepth?: number | undefined; + chromaLocation?: string | undefined; + chromaSubsampling?: string | undefined; + codedHeight?: number | undefined; + codedWidth?: number | undefined; + colorRange?: string | undefined; + frameRate?: number | undefined; + height?: number | undefined; + level?: number | undefined; + profile?: string | undefined; + refFrames?: number | undefined; + width?: number | undefined; + displayTitle?: string | undefined; + extendedDisplayTitle?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + id: z.number().optional(), + streamType: z.number().optional(), + default: z.boolean().optional(), + codec: z.string().optional(), + index: z.number().optional(), + bitrate: z.number().optional(), + language: z.string().optional(), + languageTag: z.string().optional(), + languageCode: z.string().optional(), + bitDepth: z.number().optional(), + chromaLocation: z.string().optional(), + chromaSubsampling: z.string().optional(), + codedHeight: z.number().optional(), + codedWidth: z.number().optional(), + colorRange: z.string().optional(), + frameRate: z.number().optional(), + height: z.number().optional(), + level: z.number().optional(), + profile: z.string().optional(), + refFrames: z.number().optional(), + width: z.number().optional(), + displayTitle: z.string().optional(), + extendedDisplayTitle: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.id === undefined ? null : { id: v.id }), + ...(v.streamType === undefined ? null : { streamType: v.streamType }), + ...(v.default === undefined ? null : { default: v.default }), + ...(v.codec === undefined ? null : { codec: v.codec }), + ...(v.index === undefined ? null : { index: v.index }), + ...(v.bitrate === undefined ? null : { bitrate: v.bitrate }), + ...(v.language === undefined ? null : { language: v.language }), + ...(v.languageTag === undefined ? null : { languageTag: v.languageTag }), + ...(v.languageCode === undefined ? null : { languageCode: v.languageCode }), + ...(v.bitDepth === undefined ? null : { bitDepth: v.bitDepth }), + ...(v.chromaLocation === undefined ? null : { chromaLocation: v.chromaLocation }), + ...(v.chromaSubsampling === undefined + ? null + : { chromaSubsampling: v.chromaSubsampling }), + ...(v.codedHeight === undefined ? null : { codedHeight: v.codedHeight }), + ...(v.codedWidth === undefined ? null : { codedWidth: v.codedWidth }), + ...(v.colorRange === undefined ? null : { colorRange: v.colorRange }), + ...(v.frameRate === undefined ? null : { frameRate: v.frameRate }), + ...(v.height === undefined ? null : { height: v.height }), + ...(v.level === undefined ? null : { level: v.level }), + ...(v.profile === undefined ? null : { profile: v.profile }), + ...(v.refFrames === undefined ? null : { refFrames: v.refFrames }), + ...(v.width === undefined ? null : { width: v.width }), + ...(v.displayTitle === undefined ? null : { displayTitle: v.displayTitle }), + ...(v.extendedDisplayTitle === undefined + ? null + : { extendedDisplayTitle: v.extendedDisplayTitle }), + }; + }); +} + +/** @internal */ +export namespace GetOnDeckPart$ { + export type Inbound = { + id?: number | undefined; + key?: string | undefined; + duration?: number | undefined; + file?: string | undefined; + size?: number | undefined; + audioProfile?: string | undefined; + container?: string | undefined; + videoProfile?: string | undefined; + Stream?: Array | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + id: z.number().optional(), + key: z.string().optional(), + duration: z.number().optional(), + file: z.string().optional(), + size: z.number().optional(), + audioProfile: z.string().optional(), + container: z.string().optional(), + videoProfile: z.string().optional(), + Stream: z.array(z.lazy(() => Stream$.inboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.id === undefined ? null : { id: v.id }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.duration === undefined ? null : { duration: v.duration }), + ...(v.file === undefined ? null : { file: v.file }), + ...(v.size === undefined ? null : { size: v.size }), + ...(v.audioProfile === undefined ? null : { audioProfile: v.audioProfile }), + ...(v.container === undefined ? null : { container: v.container }), + ...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }), + ...(v.Stream === undefined ? null : { stream: v.Stream }), + }; + }); + + export type Outbound = { + id?: number | undefined; + key?: string | undefined; + duration?: number | undefined; + file?: string | undefined; + size?: number | undefined; + audioProfile?: string | undefined; + container?: string | undefined; + videoProfile?: string | undefined; + Stream?: Array | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + id: z.number().optional(), + key: z.string().optional(), + duration: z.number().optional(), + file: z.string().optional(), + size: z.number().optional(), + audioProfile: z.string().optional(), + container: z.string().optional(), + videoProfile: z.string().optional(), + stream: z.array(z.lazy(() => Stream$.outboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.id === undefined ? null : { id: v.id }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.duration === undefined ? null : { duration: v.duration }), + ...(v.file === undefined ? null : { file: v.file }), + ...(v.size === undefined ? null : { size: v.size }), + ...(v.audioProfile === undefined ? null : { audioProfile: v.audioProfile }), + ...(v.container === undefined ? null : { container: v.container }), + ...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }), + ...(v.stream === undefined ? null : { Stream: v.stream }), + }; + }); +} + +/** @internal */ +export namespace GetOnDeckMedia$ { + export type Inbound = { + id?: number | undefined; + duration?: number | undefined; + bitrate?: number | undefined; + width?: number | undefined; + height?: number | undefined; + aspectRatio?: number | undefined; + audioChannels?: number | undefined; + audioCodec?: string | undefined; + videoCodec?: string | undefined; + videoResolution?: string | undefined; + container?: string | undefined; + videoFrameRate?: string | undefined; + audioProfile?: string | undefined; + videoProfile?: string | undefined; + Part?: Array | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + id: z.number().optional(), + duration: z.number().optional(), + bitrate: z.number().optional(), + width: z.number().optional(), + height: z.number().optional(), + aspectRatio: z.number().optional(), + audioChannels: z.number().optional(), + audioCodec: z.string().optional(), + videoCodec: z.string().optional(), + videoResolution: z.string().optional(), + container: z.string().optional(), + videoFrameRate: z.string().optional(), + audioProfile: z.string().optional(), + videoProfile: z.string().optional(), + Part: z.array(z.lazy(() => GetOnDeckPart$.inboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.id === undefined ? null : { id: v.id }), + ...(v.duration === undefined ? null : { duration: v.duration }), + ...(v.bitrate === undefined ? null : { bitrate: v.bitrate }), + ...(v.width === undefined ? null : { width: v.width }), + ...(v.height === undefined ? null : { height: v.height }), + ...(v.aspectRatio === undefined ? null : { aspectRatio: v.aspectRatio }), + ...(v.audioChannels === undefined ? null : { audioChannels: v.audioChannels }), + ...(v.audioCodec === undefined ? null : { audioCodec: v.audioCodec }), + ...(v.videoCodec === undefined ? null : { videoCodec: v.videoCodec }), + ...(v.videoResolution === undefined + ? null + : { videoResolution: v.videoResolution }), + ...(v.container === undefined ? null : { container: v.container }), + ...(v.videoFrameRate === undefined ? null : { videoFrameRate: v.videoFrameRate }), + ...(v.audioProfile === undefined ? null : { audioProfile: v.audioProfile }), + ...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }), + ...(v.Part === undefined ? null : { part: v.Part }), + }; + }); + + export type Outbound = { + id?: number | undefined; + duration?: number | undefined; + bitrate?: number | undefined; + width?: number | undefined; + height?: number | undefined; + aspectRatio?: number | undefined; + audioChannels?: number | undefined; + audioCodec?: string | undefined; + videoCodec?: string | undefined; + videoResolution?: string | undefined; + container?: string | undefined; + videoFrameRate?: string | undefined; + audioProfile?: string | undefined; + videoProfile?: string | undefined; + Part?: Array | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + id: z.number().optional(), + duration: z.number().optional(), + bitrate: z.number().optional(), + width: z.number().optional(), + height: z.number().optional(), + aspectRatio: z.number().optional(), + audioChannels: z.number().optional(), + audioCodec: z.string().optional(), + videoCodec: z.string().optional(), + videoResolution: z.string().optional(), + container: z.string().optional(), + videoFrameRate: z.string().optional(), + audioProfile: z.string().optional(), + videoProfile: z.string().optional(), + part: z.array(z.lazy(() => GetOnDeckPart$.outboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.id === undefined ? null : { id: v.id }), + ...(v.duration === undefined ? null : { duration: v.duration }), + ...(v.bitrate === undefined ? null : { bitrate: v.bitrate }), + ...(v.width === undefined ? null : { width: v.width }), + ...(v.height === undefined ? null : { height: v.height }), + ...(v.aspectRatio === undefined ? null : { aspectRatio: v.aspectRatio }), + ...(v.audioChannels === undefined ? null : { audioChannels: v.audioChannels }), + ...(v.audioCodec === undefined ? null : { audioCodec: v.audioCodec }), + ...(v.videoCodec === undefined ? null : { videoCodec: v.videoCodec }), + ...(v.videoResolution === undefined + ? null + : { videoResolution: v.videoResolution }), + ...(v.container === undefined ? null : { container: v.container }), + ...(v.videoFrameRate === undefined ? null : { videoFrameRate: v.videoFrameRate }), + ...(v.audioProfile === undefined ? null : { audioProfile: v.audioProfile }), + ...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }), + ...(v.part === undefined ? null : { Part: v.part }), + }; + }); +} + +/** @internal */ +export namespace Guids$ { + export type Inbound = { + id?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + id: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.id === undefined ? null : { id: v.id }), + }; + }); + + export type Outbound = { + id?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + id: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.id === undefined ? null : { id: v.id }), + }; + }); +} + +/** @internal */ +export namespace GetOnDeckMetadata$ { + export type Inbound = { + allowSync?: boolean | undefined; + librarySectionID?: number | undefined; + librarySectionTitle?: string | undefined; + librarySectionUUID?: string | undefined; + ratingKey?: number | undefined; + key?: string | undefined; + parentRatingKey?: number | undefined; + grandparentRatingKey?: number | undefined; + guid?: string | undefined; + parentGuid?: string | undefined; + grandparentGuid?: string | undefined; + type?: string | undefined; + title?: string | undefined; + grandparentKey?: string | undefined; + parentKey?: string | undefined; + librarySectionKey?: string | undefined; + grandparentTitle?: string | undefined; + parentTitle?: string | undefined; + contentRating?: string | undefined; + summary?: string | undefined; + index?: number | undefined; + parentIndex?: number | undefined; + lastViewedAt?: number | undefined; + year?: number | undefined; + thumb?: string | undefined; + art?: string | undefined; + parentThumb?: string | undefined; + grandparentThumb?: string | undefined; + grandparentArt?: string | undefined; + grandparentTheme?: string | undefined; + duration?: number | undefined; + originallyAvailableAt?: string | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + Media?: Array | undefined; + guids?: Array | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + allowSync: z.boolean().optional(), + librarySectionID: z.number().optional(), + librarySectionTitle: z.string().optional(), + librarySectionUUID: z.string().optional(), + ratingKey: z.number().optional(), + key: z.string().optional(), + parentRatingKey: z.number().optional(), + grandparentRatingKey: z.number().optional(), + guid: z.string().optional(), + parentGuid: z.string().optional(), + grandparentGuid: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + grandparentKey: z.string().optional(), + parentKey: z.string().optional(), + librarySectionKey: z.string().optional(), + grandparentTitle: z.string().optional(), + parentTitle: z.string().optional(), + contentRating: z.string().optional(), + summary: z.string().optional(), + index: z.number().optional(), + parentIndex: z.number().optional(), + lastViewedAt: z.number().optional(), + year: z.number().optional(), + thumb: z.string().optional(), + art: z.string().optional(), + parentThumb: z.string().optional(), + grandparentThumb: z.string().optional(), + grandparentArt: z.string().optional(), + grandparentTheme: z.string().optional(), + duration: z.number().optional(), + originallyAvailableAt: z + .string() + .datetime({ offset: true }) + .transform((v) => new Date(v)) + .optional(), + addedAt: z.number().optional(), + updatedAt: z.number().optional(), + Media: z.array(z.lazy(() => GetOnDeckMedia$.inboundSchema)).optional(), + guids: z.array(z.lazy(() => Guids$.inboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.allowSync === undefined ? null : { allowSync: v.allowSync }), + ...(v.librarySectionID === undefined + ? null + : { librarySectionID: v.librarySectionID }), + ...(v.librarySectionTitle === undefined + ? null + : { librarySectionTitle: v.librarySectionTitle }), + ...(v.librarySectionUUID === undefined + ? null + : { librarySectionUUID: v.librarySectionUUID }), + ...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.parentRatingKey === undefined + ? null + : { parentRatingKey: v.parentRatingKey }), + ...(v.grandparentRatingKey === undefined + ? null + : { grandparentRatingKey: v.grandparentRatingKey }), + ...(v.guid === undefined ? null : { guid: v.guid }), + ...(v.parentGuid === undefined ? null : { parentGuid: v.parentGuid }), + ...(v.grandparentGuid === undefined + ? null + : { grandparentGuid: v.grandparentGuid }), + ...(v.type === undefined ? null : { type: v.type }), + ...(v.title === undefined ? null : { title: v.title }), + ...(v.grandparentKey === undefined ? null : { grandparentKey: v.grandparentKey }), + ...(v.parentKey === undefined ? null : { parentKey: v.parentKey }), + ...(v.librarySectionKey === undefined + ? null + : { librarySectionKey: v.librarySectionKey }), + ...(v.grandparentTitle === undefined + ? null + : { grandparentTitle: v.grandparentTitle }), + ...(v.parentTitle === undefined ? null : { parentTitle: v.parentTitle }), + ...(v.contentRating === undefined ? null : { contentRating: v.contentRating }), + ...(v.summary === undefined ? null : { summary: v.summary }), + ...(v.index === undefined ? null : { index: v.index }), + ...(v.parentIndex === undefined ? null : { parentIndex: v.parentIndex }), + ...(v.lastViewedAt === undefined ? null : { lastViewedAt: v.lastViewedAt }), + ...(v.year === undefined ? null : { year: v.year }), + ...(v.thumb === undefined ? null : { thumb: v.thumb }), + ...(v.art === undefined ? null : { art: v.art }), + ...(v.parentThumb === undefined ? null : { parentThumb: v.parentThumb }), + ...(v.grandparentThumb === undefined + ? null + : { grandparentThumb: v.grandparentThumb }), + ...(v.grandparentArt === undefined ? null : { grandparentArt: v.grandparentArt }), + ...(v.grandparentTheme === undefined + ? null + : { grandparentTheme: v.grandparentTheme }), + ...(v.duration === undefined ? null : { duration: v.duration }), + ...(v.originallyAvailableAt === undefined + ? null + : { originallyAvailableAt: v.originallyAvailableAt }), + ...(v.addedAt === undefined ? null : { addedAt: v.addedAt }), + ...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }), + ...(v.Media === undefined ? null : { media: v.Media }), + ...(v.guids === undefined ? null : { guids: v.guids }), + }; + }); + + export type Outbound = { + allowSync?: boolean | undefined; + librarySectionID?: number | undefined; + librarySectionTitle?: string | undefined; + librarySectionUUID?: string | undefined; + ratingKey?: number | undefined; + key?: string | undefined; + parentRatingKey?: number | undefined; + grandparentRatingKey?: number | undefined; + guid?: string | undefined; + parentGuid?: string | undefined; + grandparentGuid?: string | undefined; + type?: string | undefined; + title?: string | undefined; + grandparentKey?: string | undefined; + parentKey?: string | undefined; + librarySectionKey?: string | undefined; + grandparentTitle?: string | undefined; + parentTitle?: string | undefined; + contentRating?: string | undefined; + summary?: string | undefined; + index?: number | undefined; + parentIndex?: number | undefined; + lastViewedAt?: number | undefined; + year?: number | undefined; + thumb?: string | undefined; + art?: string | undefined; + parentThumb?: string | undefined; + grandparentThumb?: string | undefined; + grandparentArt?: string | undefined; + grandparentTheme?: string | undefined; + duration?: number | undefined; + originallyAvailableAt?: string | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + Media?: Array | undefined; + guids?: Array | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + allowSync: z.boolean().optional(), + librarySectionID: z.number().optional(), + librarySectionTitle: z.string().optional(), + librarySectionUUID: z.string().optional(), + ratingKey: z.number().optional(), + key: z.string().optional(), + parentRatingKey: z.number().optional(), + grandparentRatingKey: z.number().optional(), + guid: z.string().optional(), + parentGuid: z.string().optional(), + grandparentGuid: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + grandparentKey: z.string().optional(), + parentKey: z.string().optional(), + librarySectionKey: z.string().optional(), + grandparentTitle: z.string().optional(), + parentTitle: z.string().optional(), + contentRating: z.string().optional(), + summary: z.string().optional(), + index: z.number().optional(), + parentIndex: z.number().optional(), + lastViewedAt: z.number().optional(), + year: z.number().optional(), + thumb: z.string().optional(), + art: z.string().optional(), + parentThumb: z.string().optional(), + grandparentThumb: z.string().optional(), + grandparentArt: z.string().optional(), + grandparentTheme: z.string().optional(), + duration: z.number().optional(), + originallyAvailableAt: z + .date() + .transform((v) => v.toISOString()) + .optional(), + addedAt: z.number().optional(), + updatedAt: z.number().optional(), + media: z.array(z.lazy(() => GetOnDeckMedia$.outboundSchema)).optional(), + guids: z.array(z.lazy(() => Guids$.outboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.allowSync === undefined ? null : { allowSync: v.allowSync }), + ...(v.librarySectionID === undefined + ? null + : { librarySectionID: v.librarySectionID }), + ...(v.librarySectionTitle === undefined + ? null + : { librarySectionTitle: v.librarySectionTitle }), + ...(v.librarySectionUUID === undefined + ? null + : { librarySectionUUID: v.librarySectionUUID }), + ...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.parentRatingKey === undefined + ? null + : { parentRatingKey: v.parentRatingKey }), + ...(v.grandparentRatingKey === undefined + ? null + : { grandparentRatingKey: v.grandparentRatingKey }), + ...(v.guid === undefined ? null : { guid: v.guid }), + ...(v.parentGuid === undefined ? null : { parentGuid: v.parentGuid }), + ...(v.grandparentGuid === undefined + ? null + : { grandparentGuid: v.grandparentGuid }), + ...(v.type === undefined ? null : { type: v.type }), + ...(v.title === undefined ? null : { title: v.title }), + ...(v.grandparentKey === undefined ? null : { grandparentKey: v.grandparentKey }), + ...(v.parentKey === undefined ? null : { parentKey: v.parentKey }), + ...(v.librarySectionKey === undefined + ? null + : { librarySectionKey: v.librarySectionKey }), + ...(v.grandparentTitle === undefined + ? null + : { grandparentTitle: v.grandparentTitle }), + ...(v.parentTitle === undefined ? null : { parentTitle: v.parentTitle }), + ...(v.contentRating === undefined ? null : { contentRating: v.contentRating }), + ...(v.summary === undefined ? null : { summary: v.summary }), + ...(v.index === undefined ? null : { index: v.index }), + ...(v.parentIndex === undefined ? null : { parentIndex: v.parentIndex }), + ...(v.lastViewedAt === undefined ? null : { lastViewedAt: v.lastViewedAt }), + ...(v.year === undefined ? null : { year: v.year }), + ...(v.thumb === undefined ? null : { thumb: v.thumb }), + ...(v.art === undefined ? null : { art: v.art }), + ...(v.parentThumb === undefined ? null : { parentThumb: v.parentThumb }), + ...(v.grandparentThumb === undefined + ? null + : { grandparentThumb: v.grandparentThumb }), + ...(v.grandparentArt === undefined ? null : { grandparentArt: v.grandparentArt }), + ...(v.grandparentTheme === undefined + ? null + : { grandparentTheme: v.grandparentTheme }), + ...(v.duration === undefined ? null : { duration: v.duration }), + ...(v.originallyAvailableAt === undefined + ? null + : { originallyAvailableAt: v.originallyAvailableAt }), + ...(v.addedAt === undefined ? null : { addedAt: v.addedAt }), + ...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }), + ...(v.media === undefined ? null : { Media: v.media }), + ...(v.guids === undefined ? null : { guids: v.guids }), + }; + }); +} + +/** @internal */ +export namespace GetOnDeckMediaContainer$ { + export type Inbound = { + size?: number | undefined; + allowSync?: boolean | undefined; + identifier?: string | undefined; + mediaTagPrefix?: string | undefined; + mediaTagVersion?: number | undefined; + mixedParents?: boolean | undefined; + Metadata?: Array | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + size: z.number().optional(), + allowSync: z.boolean().optional(), + identifier: z.string().optional(), + mediaTagPrefix: z.string().optional(), + mediaTagVersion: z.number().optional(), + mixedParents: z.boolean().optional(), + Metadata: z.array(z.lazy(() => GetOnDeckMetadata$.inboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.size === undefined ? null : { size: v.size }), + ...(v.allowSync === undefined ? null : { allowSync: v.allowSync }), + ...(v.identifier === undefined ? null : { identifier: v.identifier }), + ...(v.mediaTagPrefix === undefined ? null : { mediaTagPrefix: v.mediaTagPrefix }), + ...(v.mediaTagVersion === undefined + ? null + : { mediaTagVersion: v.mediaTagVersion }), + ...(v.mixedParents === undefined ? null : { mixedParents: v.mixedParents }), + ...(v.Metadata === undefined ? null : { metadata: v.Metadata }), + }; + }); + + export type Outbound = { + size?: number | undefined; + allowSync?: boolean | undefined; + identifier?: string | undefined; + mediaTagPrefix?: string | undefined; + mediaTagVersion?: number | undefined; + mixedParents?: boolean | undefined; + Metadata?: Array | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + size: z.number().optional(), + allowSync: z.boolean().optional(), + identifier: z.string().optional(), + mediaTagPrefix: z.string().optional(), + mediaTagVersion: z.number().optional(), + mixedParents: z.boolean().optional(), + metadata: z.array(z.lazy(() => GetOnDeckMetadata$.outboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.size === undefined ? null : { size: v.size }), + ...(v.allowSync === undefined ? null : { allowSync: v.allowSync }), + ...(v.identifier === undefined ? null : { identifier: v.identifier }), + ...(v.mediaTagPrefix === undefined ? null : { mediaTagPrefix: v.mediaTagPrefix }), + ...(v.mediaTagVersion === undefined + ? null + : { mediaTagVersion: v.mediaTagVersion }), + ...(v.mixedParents === undefined ? null : { mixedParents: v.mixedParents }), + ...(v.metadata === undefined ? null : { Metadata: v.metadata }), + }; + }); +} + +/** @internal */ +export namespace GetOnDeckResponseBody$ { + export type Inbound = { + MediaContainer?: GetOnDeckMediaContainer$.Inbound | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + MediaContainer: z.lazy(() => GetOnDeckMediaContainer$.inboundSchema).optional(), + }) + .transform((v) => { + return { + ...(v.MediaContainer === undefined ? null : { mediaContainer: v.MediaContainer }), + }; + }); + + export type Outbound = { + MediaContainer?: GetOnDeckMediaContainer$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + mediaContainer: z.lazy(() => GetOnDeckMediaContainer$.outboundSchema).optional(), + }) + .transform((v) => { + return { + ...(v.mediaContainer === undefined ? null : { MediaContainer: v.mediaContainer }), + }; + }); +} + +/** @internal */ +export namespace GetOnDeckResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + object?: GetOnDeckResponseBody$.Inbound | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetOnDeckResponseBody$.inboundSchema).optional(), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + ...(v.object === undefined ? null : { object: v.object }), + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetOnDeckResponseBody$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetOnDeckResponseBody$.outboundSchema).optional(), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + ...(v.object === undefined ? null : { object: v.object }), + }; + }); +} diff --git a/src/models/operations/getplaylist.ts b/src/models/operations/getplaylist.ts new file mode 100644 index 00000000..ba388c9d --- /dev/null +++ b/src/models/operations/getplaylist.ts @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetPlaylistRequest = { + /** + * the ID of the playlist + */ + playlistID: number; +}; + +export type GetPlaylistResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace GetPlaylistRequest$ { + export type Inbound = { + playlistID: number; + }; + + export const inboundSchema: z.ZodType = z + .object({ + playlistID: z.number(), + }) + .transform((v) => { + return { + playlistID: v.playlistID, + }; + }); + + export type Outbound = { + playlistID: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + playlistID: z.number(), + }) + .transform((v) => { + return { + playlistID: v.playlistID, + }; + }); +} + +/** @internal */ +export namespace GetPlaylistResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/getplaylistcontents.ts b/src/models/operations/getplaylistcontents.ts new file mode 100644 index 00000000..90e1d96f --- /dev/null +++ b/src/models/operations/getplaylistcontents.ts @@ -0,0 +1,113 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetPlaylistContentsRequest = { + /** + * the ID of the playlist + */ + playlistID: number; + /** + * the metadata type of the item to return + */ + type: number; +}; + +export type GetPlaylistContentsResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace GetPlaylistContentsRequest$ { + export type Inbound = { + playlistID: number; + type: number; + }; + + export const inboundSchema: z.ZodType = z + .object({ + playlistID: z.number(), + type: z.number(), + }) + .transform((v) => { + return { + playlistID: v.playlistID, + type: v.type, + }; + }); + + export type Outbound = { + playlistID: number; + type: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + playlistID: z.number(), + type: z.number(), + }) + .transform((v) => { + return { + playlistID: v.playlistID, + type: v.type, + }; + }); +} + +/** @internal */ +export namespace GetPlaylistContentsResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/getplaylists.ts b/src/models/operations/getplaylists.ts new file mode 100644 index 00000000..1093731a --- /dev/null +++ b/src/models/operations/getplaylists.ts @@ -0,0 +1,136 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +/** + * limit to a type of playlist. + */ +export enum PlaylistType { + Audio = "audio", + Video = "video", + Photo = "photo", +} + +/** + * type of playlists to return (default is all). + */ +export enum QueryParamSmart { + Zero = 0, + One = 1, +} + +export type GetPlaylistsRequest = { + /** + * limit to a type of playlist. + */ + playlistType?: PlaylistType | undefined; + /** + * type of playlists to return (default is all). + */ + smart?: QueryParamSmart | undefined; +}; + +export type GetPlaylistsResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export const PlaylistType$ = z.nativeEnum(PlaylistType); + +/** @internal */ +export const QueryParamSmart$ = z.nativeEnum(QueryParamSmart); + +/** @internal */ +export namespace GetPlaylistsRequest$ { + export type Inbound = { + playlistType?: PlaylistType | undefined; + smart?: QueryParamSmart | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + playlistType: PlaylistType$.optional(), + smart: QueryParamSmart$.optional(), + }) + .transform((v) => { + return { + ...(v.playlistType === undefined ? null : { playlistType: v.playlistType }), + ...(v.smart === undefined ? null : { smart: v.smart }), + }; + }); + + export type Outbound = { + playlistType?: PlaylistType | undefined; + smart?: QueryParamSmart | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + playlistType: PlaylistType$.optional(), + smart: QueryParamSmart$.optional(), + }) + .transform((v) => { + return { + ...(v.playlistType === undefined ? null : { playlistType: v.playlistType }), + ...(v.smart === undefined ? null : { smart: v.smart }), + }; + }); +} + +/** @internal */ +export namespace GetPlaylistsResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/getrecentlyadded.ts b/src/models/operations/getrecentlyadded.ts new file mode 100644 index 00000000..f76225a6 --- /dev/null +++ b/src/models/operations/getrecentlyadded.ts @@ -0,0 +1,913 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type Part = { + id?: number | undefined; + key?: string | undefined; + duration?: number | undefined; + file?: string | undefined; + size?: number | undefined; + container?: string | undefined; + has64bitOffsets?: boolean | undefined; + hasThumbnail?: number | undefined; + optimizedForStreaming?: boolean | undefined; + videoProfile?: string | undefined; +}; + +export type Media = { + id?: number | undefined; + duration?: number | undefined; + bitrate?: number | undefined; + width?: number | undefined; + height?: number | undefined; + aspectRatio?: number | undefined; + audioChannels?: number | undefined; + audioCodec?: string | undefined; + videoCodec?: string | undefined; + videoResolution?: number | undefined; + container?: string | undefined; + videoFrameRate?: string | undefined; + optimizedForStreaming?: number | undefined; + has64bitOffsets?: boolean | undefined; + videoProfile?: string | undefined; + part?: Array | undefined; +}; + +export type Genre = { + tag?: string | undefined; +}; + +export type Director = { + tag?: string | undefined; +}; + +export type Writer = { + tag?: string | undefined; +}; + +export type Country = { + tag?: string | undefined; +}; + +export type Role = { + tag?: string | undefined; +}; + +export type Metadata = { + allowSync?: boolean | undefined; + librarySectionID?: number | undefined; + librarySectionTitle?: string | undefined; + librarySectionUUID?: string | undefined; + ratingKey?: number | undefined; + key?: string | undefined; + guid?: string | undefined; + studio?: string | undefined; + type?: string | undefined; + title?: string | undefined; + contentRating?: string | undefined; + summary?: string | undefined; + rating?: number | undefined; + audienceRating?: number | undefined; + year?: number | undefined; + tagline?: string | undefined; + thumb?: string | undefined; + art?: string | undefined; + duration?: number | undefined; + originallyAvailableAt?: Date | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + audienceRatingImage?: string | undefined; + chapterSource?: string | undefined; + primaryExtraKey?: string | undefined; + ratingImage?: string | undefined; + media?: Array | undefined; + genre?: Array | undefined; + director?: Array | undefined; + writer?: Array | undefined; + country?: Array | undefined; + role?: Array | undefined; +}; + +export type GetRecentlyAddedMediaContainer = { + size?: number | undefined; + allowSync?: boolean | undefined; + identifier?: string | undefined; + mediaTagPrefix?: string | undefined; + mediaTagVersion?: number | undefined; + mixedParents?: boolean | undefined; + metadata?: Array | undefined; +}; + +/** + * The recently added content + */ +export type GetRecentlyAddedResponseBody = { + mediaContainer?: GetRecentlyAddedMediaContainer | undefined; +}; + +export type GetRecentlyAddedResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * The recently added content + */ + object?: GetRecentlyAddedResponseBody | undefined; +}; + +/** @internal */ +export namespace Part$ { + export type Inbound = { + id?: number | undefined; + key?: string | undefined; + duration?: number | undefined; + file?: string | undefined; + size?: number | undefined; + container?: string | undefined; + has64bitOffsets?: boolean | undefined; + hasThumbnail?: number | undefined; + optimizedForStreaming?: boolean | undefined; + videoProfile?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + id: z.number().optional(), + key: z.string().optional(), + duration: z.number().optional(), + file: z.string().optional(), + size: z.number().optional(), + container: z.string().optional(), + has64bitOffsets: z.boolean().optional(), + hasThumbnail: z.number().optional(), + optimizedForStreaming: z.boolean().optional(), + videoProfile: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.id === undefined ? null : { id: v.id }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.duration === undefined ? null : { duration: v.duration }), + ...(v.file === undefined ? null : { file: v.file }), + ...(v.size === undefined ? null : { size: v.size }), + ...(v.container === undefined ? null : { container: v.container }), + ...(v.has64bitOffsets === undefined + ? null + : { has64bitOffsets: v.has64bitOffsets }), + ...(v.hasThumbnail === undefined ? null : { hasThumbnail: v.hasThumbnail }), + ...(v.optimizedForStreaming === undefined + ? null + : { optimizedForStreaming: v.optimizedForStreaming }), + ...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }), + }; + }); + + export type Outbound = { + id?: number | undefined; + key?: string | undefined; + duration?: number | undefined; + file?: string | undefined; + size?: number | undefined; + container?: string | undefined; + has64bitOffsets?: boolean | undefined; + hasThumbnail?: number | undefined; + optimizedForStreaming?: boolean | undefined; + videoProfile?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + id: z.number().optional(), + key: z.string().optional(), + duration: z.number().optional(), + file: z.string().optional(), + size: z.number().optional(), + container: z.string().optional(), + has64bitOffsets: z.boolean().optional(), + hasThumbnail: z.number().optional(), + optimizedForStreaming: z.boolean().optional(), + videoProfile: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.id === undefined ? null : { id: v.id }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.duration === undefined ? null : { duration: v.duration }), + ...(v.file === undefined ? null : { file: v.file }), + ...(v.size === undefined ? null : { size: v.size }), + ...(v.container === undefined ? null : { container: v.container }), + ...(v.has64bitOffsets === undefined + ? null + : { has64bitOffsets: v.has64bitOffsets }), + ...(v.hasThumbnail === undefined ? null : { hasThumbnail: v.hasThumbnail }), + ...(v.optimizedForStreaming === undefined + ? null + : { optimizedForStreaming: v.optimizedForStreaming }), + ...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }), + }; + }); +} + +/** @internal */ +export namespace Media$ { + export type Inbound = { + id?: number | undefined; + duration?: number | undefined; + bitrate?: number | undefined; + width?: number | undefined; + height?: number | undefined; + aspectRatio?: number | undefined; + audioChannels?: number | undefined; + audioCodec?: string | undefined; + videoCodec?: string | undefined; + videoResolution?: number | undefined; + container?: string | undefined; + videoFrameRate?: string | undefined; + optimizedForStreaming?: number | undefined; + has64bitOffsets?: boolean | undefined; + videoProfile?: string | undefined; + Part?: Array | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + id: z.number().optional(), + duration: z.number().optional(), + bitrate: z.number().optional(), + width: z.number().optional(), + height: z.number().optional(), + aspectRatio: z.number().optional(), + audioChannels: z.number().optional(), + audioCodec: z.string().optional(), + videoCodec: z.string().optional(), + videoResolution: z.number().optional(), + container: z.string().optional(), + videoFrameRate: z.string().optional(), + optimizedForStreaming: z.number().optional(), + has64bitOffsets: z.boolean().optional(), + videoProfile: z.string().optional(), + Part: z.array(z.lazy(() => Part$.inboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.id === undefined ? null : { id: v.id }), + ...(v.duration === undefined ? null : { duration: v.duration }), + ...(v.bitrate === undefined ? null : { bitrate: v.bitrate }), + ...(v.width === undefined ? null : { width: v.width }), + ...(v.height === undefined ? null : { height: v.height }), + ...(v.aspectRatio === undefined ? null : { aspectRatio: v.aspectRatio }), + ...(v.audioChannels === undefined ? null : { audioChannels: v.audioChannels }), + ...(v.audioCodec === undefined ? null : { audioCodec: v.audioCodec }), + ...(v.videoCodec === undefined ? null : { videoCodec: v.videoCodec }), + ...(v.videoResolution === undefined + ? null + : { videoResolution: v.videoResolution }), + ...(v.container === undefined ? null : { container: v.container }), + ...(v.videoFrameRate === undefined ? null : { videoFrameRate: v.videoFrameRate }), + ...(v.optimizedForStreaming === undefined + ? null + : { optimizedForStreaming: v.optimizedForStreaming }), + ...(v.has64bitOffsets === undefined + ? null + : { has64bitOffsets: v.has64bitOffsets }), + ...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }), + ...(v.Part === undefined ? null : { part: v.Part }), + }; + }); + + export type Outbound = { + id?: number | undefined; + duration?: number | undefined; + bitrate?: number | undefined; + width?: number | undefined; + height?: number | undefined; + aspectRatio?: number | undefined; + audioChannels?: number | undefined; + audioCodec?: string | undefined; + videoCodec?: string | undefined; + videoResolution?: number | undefined; + container?: string | undefined; + videoFrameRate?: string | undefined; + optimizedForStreaming?: number | undefined; + has64bitOffsets?: boolean | undefined; + videoProfile?: string | undefined; + Part?: Array | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + id: z.number().optional(), + duration: z.number().optional(), + bitrate: z.number().optional(), + width: z.number().optional(), + height: z.number().optional(), + aspectRatio: z.number().optional(), + audioChannels: z.number().optional(), + audioCodec: z.string().optional(), + videoCodec: z.string().optional(), + videoResolution: z.number().optional(), + container: z.string().optional(), + videoFrameRate: z.string().optional(), + optimizedForStreaming: z.number().optional(), + has64bitOffsets: z.boolean().optional(), + videoProfile: z.string().optional(), + part: z.array(z.lazy(() => Part$.outboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.id === undefined ? null : { id: v.id }), + ...(v.duration === undefined ? null : { duration: v.duration }), + ...(v.bitrate === undefined ? null : { bitrate: v.bitrate }), + ...(v.width === undefined ? null : { width: v.width }), + ...(v.height === undefined ? null : { height: v.height }), + ...(v.aspectRatio === undefined ? null : { aspectRatio: v.aspectRatio }), + ...(v.audioChannels === undefined ? null : { audioChannels: v.audioChannels }), + ...(v.audioCodec === undefined ? null : { audioCodec: v.audioCodec }), + ...(v.videoCodec === undefined ? null : { videoCodec: v.videoCodec }), + ...(v.videoResolution === undefined + ? null + : { videoResolution: v.videoResolution }), + ...(v.container === undefined ? null : { container: v.container }), + ...(v.videoFrameRate === undefined ? null : { videoFrameRate: v.videoFrameRate }), + ...(v.optimizedForStreaming === undefined + ? null + : { optimizedForStreaming: v.optimizedForStreaming }), + ...(v.has64bitOffsets === undefined + ? null + : { has64bitOffsets: v.has64bitOffsets }), + ...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }), + ...(v.part === undefined ? null : { Part: v.part }), + }; + }); +} + +/** @internal */ +export namespace Genre$ { + export type Inbound = { + tag?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); + + export type Outbound = { + tag?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); +} + +/** @internal */ +export namespace Director$ { + export type Inbound = { + tag?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); + + export type Outbound = { + tag?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); +} + +/** @internal */ +export namespace Writer$ { + export type Inbound = { + tag?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); + + export type Outbound = { + tag?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); +} + +/** @internal */ +export namespace Country$ { + export type Inbound = { + tag?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); + + export type Outbound = { + tag?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); +} + +/** @internal */ +export namespace Role$ { + export type Inbound = { + tag?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); + + export type Outbound = { + tag?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); +} + +/** @internal */ +export namespace Metadata$ { + export type Inbound = { + allowSync?: boolean | undefined; + librarySectionID?: number | undefined; + librarySectionTitle?: string | undefined; + librarySectionUUID?: string | undefined; + ratingKey?: number | undefined; + key?: string | undefined; + guid?: string | undefined; + studio?: string | undefined; + type?: string | undefined; + title?: string | undefined; + contentRating?: string | undefined; + summary?: string | undefined; + rating?: number | undefined; + audienceRating?: number | undefined; + year?: number | undefined; + tagline?: string | undefined; + thumb?: string | undefined; + art?: string | undefined; + duration?: number | undefined; + originallyAvailableAt?: string | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + audienceRatingImage?: string | undefined; + chapterSource?: string | undefined; + primaryExtraKey?: string | undefined; + ratingImage?: string | undefined; + Media?: Array | undefined; + Genre?: Array | undefined; + Director?: Array | undefined; + Writer?: Array | undefined; + Country?: Array | undefined; + Role?: Array | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + allowSync: z.boolean().optional(), + librarySectionID: z.number().optional(), + librarySectionTitle: z.string().optional(), + librarySectionUUID: z.string().optional(), + ratingKey: z.number().optional(), + key: z.string().optional(), + guid: z.string().optional(), + studio: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + contentRating: z.string().optional(), + summary: z.string().optional(), + rating: z.number().optional(), + audienceRating: z.number().optional(), + year: z.number().optional(), + tagline: z.string().optional(), + thumb: z.string().optional(), + art: z.string().optional(), + duration: z.number().optional(), + originallyAvailableAt: z + .string() + .datetime({ offset: true }) + .transform((v) => new Date(v)) + .optional(), + addedAt: z.number().optional(), + updatedAt: z.number().optional(), + audienceRatingImage: z.string().optional(), + chapterSource: z.string().optional(), + primaryExtraKey: z.string().optional(), + ratingImage: z.string().optional(), + Media: z.array(z.lazy(() => Media$.inboundSchema)).optional(), + Genre: z.array(z.lazy(() => Genre$.inboundSchema)).optional(), + Director: z.array(z.lazy(() => Director$.inboundSchema)).optional(), + Writer: z.array(z.lazy(() => Writer$.inboundSchema)).optional(), + Country: z.array(z.lazy(() => Country$.inboundSchema)).optional(), + Role: z.array(z.lazy(() => Role$.inboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.allowSync === undefined ? null : { allowSync: v.allowSync }), + ...(v.librarySectionID === undefined + ? null + : { librarySectionID: v.librarySectionID }), + ...(v.librarySectionTitle === undefined + ? null + : { librarySectionTitle: v.librarySectionTitle }), + ...(v.librarySectionUUID === undefined + ? null + : { librarySectionUUID: v.librarySectionUUID }), + ...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.guid === undefined ? null : { guid: v.guid }), + ...(v.studio === undefined ? null : { studio: v.studio }), + ...(v.type === undefined ? null : { type: v.type }), + ...(v.title === undefined ? null : { title: v.title }), + ...(v.contentRating === undefined ? null : { contentRating: v.contentRating }), + ...(v.summary === undefined ? null : { summary: v.summary }), + ...(v.rating === undefined ? null : { rating: v.rating }), + ...(v.audienceRating === undefined ? null : { audienceRating: v.audienceRating }), + ...(v.year === undefined ? null : { year: v.year }), + ...(v.tagline === undefined ? null : { tagline: v.tagline }), + ...(v.thumb === undefined ? null : { thumb: v.thumb }), + ...(v.art === undefined ? null : { art: v.art }), + ...(v.duration === undefined ? null : { duration: v.duration }), + ...(v.originallyAvailableAt === undefined + ? null + : { originallyAvailableAt: v.originallyAvailableAt }), + ...(v.addedAt === undefined ? null : { addedAt: v.addedAt }), + ...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }), + ...(v.audienceRatingImage === undefined + ? null + : { audienceRatingImage: v.audienceRatingImage }), + ...(v.chapterSource === undefined ? null : { chapterSource: v.chapterSource }), + ...(v.primaryExtraKey === undefined + ? null + : { primaryExtraKey: v.primaryExtraKey }), + ...(v.ratingImage === undefined ? null : { ratingImage: v.ratingImage }), + ...(v.Media === undefined ? null : { media: v.Media }), + ...(v.Genre === undefined ? null : { genre: v.Genre }), + ...(v.Director === undefined ? null : { director: v.Director }), + ...(v.Writer === undefined ? null : { writer: v.Writer }), + ...(v.Country === undefined ? null : { country: v.Country }), + ...(v.Role === undefined ? null : { role: v.Role }), + }; + }); + + export type Outbound = { + allowSync?: boolean | undefined; + librarySectionID?: number | undefined; + librarySectionTitle?: string | undefined; + librarySectionUUID?: string | undefined; + ratingKey?: number | undefined; + key?: string | undefined; + guid?: string | undefined; + studio?: string | undefined; + type?: string | undefined; + title?: string | undefined; + contentRating?: string | undefined; + summary?: string | undefined; + rating?: number | undefined; + audienceRating?: number | undefined; + year?: number | undefined; + tagline?: string | undefined; + thumb?: string | undefined; + art?: string | undefined; + duration?: number | undefined; + originallyAvailableAt?: string | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + audienceRatingImage?: string | undefined; + chapterSource?: string | undefined; + primaryExtraKey?: string | undefined; + ratingImage?: string | undefined; + Media?: Array | undefined; + Genre?: Array | undefined; + Director?: Array | undefined; + Writer?: Array | undefined; + Country?: Array | undefined; + Role?: Array | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + allowSync: z.boolean().optional(), + librarySectionID: z.number().optional(), + librarySectionTitle: z.string().optional(), + librarySectionUUID: z.string().optional(), + ratingKey: z.number().optional(), + key: z.string().optional(), + guid: z.string().optional(), + studio: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + contentRating: z.string().optional(), + summary: z.string().optional(), + rating: z.number().optional(), + audienceRating: z.number().optional(), + year: z.number().optional(), + tagline: z.string().optional(), + thumb: z.string().optional(), + art: z.string().optional(), + duration: z.number().optional(), + originallyAvailableAt: z + .date() + .transform((v) => v.toISOString()) + .optional(), + addedAt: z.number().optional(), + updatedAt: z.number().optional(), + audienceRatingImage: z.string().optional(), + chapterSource: z.string().optional(), + primaryExtraKey: z.string().optional(), + ratingImage: z.string().optional(), + media: z.array(z.lazy(() => Media$.outboundSchema)).optional(), + genre: z.array(z.lazy(() => Genre$.outboundSchema)).optional(), + director: z.array(z.lazy(() => Director$.outboundSchema)).optional(), + writer: z.array(z.lazy(() => Writer$.outboundSchema)).optional(), + country: z.array(z.lazy(() => Country$.outboundSchema)).optional(), + role: z.array(z.lazy(() => Role$.outboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.allowSync === undefined ? null : { allowSync: v.allowSync }), + ...(v.librarySectionID === undefined + ? null + : { librarySectionID: v.librarySectionID }), + ...(v.librarySectionTitle === undefined + ? null + : { librarySectionTitle: v.librarySectionTitle }), + ...(v.librarySectionUUID === undefined + ? null + : { librarySectionUUID: v.librarySectionUUID }), + ...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.guid === undefined ? null : { guid: v.guid }), + ...(v.studio === undefined ? null : { studio: v.studio }), + ...(v.type === undefined ? null : { type: v.type }), + ...(v.title === undefined ? null : { title: v.title }), + ...(v.contentRating === undefined ? null : { contentRating: v.contentRating }), + ...(v.summary === undefined ? null : { summary: v.summary }), + ...(v.rating === undefined ? null : { rating: v.rating }), + ...(v.audienceRating === undefined ? null : { audienceRating: v.audienceRating }), + ...(v.year === undefined ? null : { year: v.year }), + ...(v.tagline === undefined ? null : { tagline: v.tagline }), + ...(v.thumb === undefined ? null : { thumb: v.thumb }), + ...(v.art === undefined ? null : { art: v.art }), + ...(v.duration === undefined ? null : { duration: v.duration }), + ...(v.originallyAvailableAt === undefined + ? null + : { originallyAvailableAt: v.originallyAvailableAt }), + ...(v.addedAt === undefined ? null : { addedAt: v.addedAt }), + ...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }), + ...(v.audienceRatingImage === undefined + ? null + : { audienceRatingImage: v.audienceRatingImage }), + ...(v.chapterSource === undefined ? null : { chapterSource: v.chapterSource }), + ...(v.primaryExtraKey === undefined + ? null + : { primaryExtraKey: v.primaryExtraKey }), + ...(v.ratingImage === undefined ? null : { ratingImage: v.ratingImage }), + ...(v.media === undefined ? null : { Media: v.media }), + ...(v.genre === undefined ? null : { Genre: v.genre }), + ...(v.director === undefined ? null : { Director: v.director }), + ...(v.writer === undefined ? null : { Writer: v.writer }), + ...(v.country === undefined ? null : { Country: v.country }), + ...(v.role === undefined ? null : { Role: v.role }), + }; + }); +} + +/** @internal */ +export namespace GetRecentlyAddedMediaContainer$ { + export type Inbound = { + size?: number | undefined; + allowSync?: boolean | undefined; + identifier?: string | undefined; + mediaTagPrefix?: string | undefined; + mediaTagVersion?: number | undefined; + mixedParents?: boolean | undefined; + Metadata?: Array | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + size: z.number().optional(), + allowSync: z.boolean().optional(), + identifier: z.string().optional(), + mediaTagPrefix: z.string().optional(), + mediaTagVersion: z.number().optional(), + mixedParents: z.boolean().optional(), + Metadata: z.array(z.lazy(() => Metadata$.inboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.size === undefined ? null : { size: v.size }), + ...(v.allowSync === undefined ? null : { allowSync: v.allowSync }), + ...(v.identifier === undefined ? null : { identifier: v.identifier }), + ...(v.mediaTagPrefix === undefined ? null : { mediaTagPrefix: v.mediaTagPrefix }), + ...(v.mediaTagVersion === undefined + ? null + : { mediaTagVersion: v.mediaTagVersion }), + ...(v.mixedParents === undefined ? null : { mixedParents: v.mixedParents }), + ...(v.Metadata === undefined ? null : { metadata: v.Metadata }), + }; + }); + + export type Outbound = { + size?: number | undefined; + allowSync?: boolean | undefined; + identifier?: string | undefined; + mediaTagPrefix?: string | undefined; + mediaTagVersion?: number | undefined; + mixedParents?: boolean | undefined; + Metadata?: Array | undefined; + }; + + export const outboundSchema: z.ZodType = + z + .object({ + size: z.number().optional(), + allowSync: z.boolean().optional(), + identifier: z.string().optional(), + mediaTagPrefix: z.string().optional(), + mediaTagVersion: z.number().optional(), + mixedParents: z.boolean().optional(), + metadata: z.array(z.lazy(() => Metadata$.outboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.size === undefined ? null : { size: v.size }), + ...(v.allowSync === undefined ? null : { allowSync: v.allowSync }), + ...(v.identifier === undefined ? null : { identifier: v.identifier }), + ...(v.mediaTagPrefix === undefined + ? null + : { mediaTagPrefix: v.mediaTagPrefix }), + ...(v.mediaTagVersion === undefined + ? null + : { mediaTagVersion: v.mediaTagVersion }), + ...(v.mixedParents === undefined ? null : { mixedParents: v.mixedParents }), + ...(v.metadata === undefined ? null : { Metadata: v.metadata }), + }; + }); +} + +/** @internal */ +export namespace GetRecentlyAddedResponseBody$ { + export type Inbound = { + MediaContainer?: GetRecentlyAddedMediaContainer$.Inbound | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + MediaContainer: z.lazy(() => GetRecentlyAddedMediaContainer$.inboundSchema).optional(), + }) + .transform((v) => { + return { + ...(v.MediaContainer === undefined ? null : { mediaContainer: v.MediaContainer }), + }; + }); + + export type Outbound = { + MediaContainer?: GetRecentlyAddedMediaContainer$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + mediaContainer: z.lazy(() => GetRecentlyAddedMediaContainer$.outboundSchema).optional(), + }) + .transform((v) => { + return { + ...(v.mediaContainer === undefined ? null : { MediaContainer: v.mediaContainer }), + }; + }); +} + +/** @internal */ +export namespace GetRecentlyAddedResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + object?: GetRecentlyAddedResponseBody$.Inbound | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetRecentlyAddedResponseBody$.inboundSchema).optional(), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + ...(v.object === undefined ? null : { object: v.object }), + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetRecentlyAddedResponseBody$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetRecentlyAddedResponseBody$.outboundSchema).optional(), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + ...(v.object === undefined ? null : { object: v.object }), + }; + }); +} diff --git a/src/models/operations/getresizedphoto.ts b/src/models/operations/getresizedphoto.ts new file mode 100644 index 00000000..31e3f285 --- /dev/null +++ b/src/models/operations/getresizedphoto.ts @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +/** + * images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against. + */ +export enum MinSize { + Zero = 0, + One = 1, +} + +/** + * allow images to be resized beyond native dimensions. + */ +export enum Upscale { + Zero = 0, + One = 1, +} + +export type GetResizedPhotoRequest = { + /** + * The width for the resized photo + */ + width: number; + /** + * The height for the resized photo + */ + height: number; + /** + * The opacity for the resized photo + */ + opacity: number; + /** + * The width for the resized photo + */ + blur: number; + /** + * images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against. + */ + minSize: MinSize; + /** + * allow images to be resized beyond native dimensions. + */ + upscale: Upscale; + /** + * path to image within Plex + */ + url: string; +}; + +export type GetResizedPhotoResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export const MinSize$ = z.nativeEnum(MinSize); + +/** @internal */ +export const Upscale$ = z.nativeEnum(Upscale); + +/** @internal */ +export namespace GetResizedPhotoRequest$ { + export type Inbound = { + width: number; + height: number; + opacity: number; + blur: number; + minSize: MinSize; + upscale: Upscale; + url: string; + }; + + export const inboundSchema: z.ZodType = z + .object({ + width: z.number(), + height: z.number(), + opacity: z.number().int(), + blur: z.number(), + minSize: MinSize$, + upscale: Upscale$, + url: z.string(), + }) + .transform((v) => { + return { + width: v.width, + height: v.height, + opacity: v.opacity, + blur: v.blur, + minSize: v.minSize, + upscale: v.upscale, + url: v.url, + }; + }); + + export type Outbound = { + width: number; + height: number; + opacity: number; + blur: number; + minSize: MinSize; + upscale: Upscale; + url: string; + }; + + export const outboundSchema: z.ZodType = z + .object({ + width: z.number(), + height: z.number(), + opacity: z.number().int(), + blur: z.number(), + minSize: MinSize$, + upscale: Upscale$, + url: z.string(), + }) + .transform((v) => { + return { + width: v.width, + height: v.height, + opacity: v.opacity, + blur: v.blur, + minSize: v.minSize, + upscale: v.upscale, + url: v.url, + }; + }); +} + +/** @internal */ +export namespace GetResizedPhotoResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/getsearchresults.ts b/src/models/operations/getsearchresults.ts new file mode 100644 index 00000000..9f2b5c95 --- /dev/null +++ b/src/models/operations/getsearchresults.ts @@ -0,0 +1,972 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetSearchResultsRequest = { + /** + * The search query string to use + */ + query: string; +}; + +export type GetSearchResultsPart = { + id?: number | undefined; + key?: string | undefined; + duration?: number | undefined; + file?: string | undefined; + size?: number | undefined; + audioProfile?: string | undefined; + container?: string | undefined; + videoProfile?: string | undefined; +}; + +export type GetSearchResultsMedia = { + id?: number | undefined; + duration?: number | undefined; + bitrate?: number | undefined; + width?: number | undefined; + height?: number | undefined; + aspectRatio?: number | undefined; + audioChannels?: number | undefined; + audioCodec?: string | undefined; + videoCodec?: string | undefined; + videoResolution?: number | undefined; + container?: string | undefined; + videoFrameRate?: string | undefined; + audioProfile?: string | undefined; + videoProfile?: string | undefined; + part?: Array | undefined; +}; + +export type GetSearchResultsGenre = { + tag?: string | undefined; +}; + +export type GetSearchResultsDirector = { + tag?: string | undefined; +}; + +export type GetSearchResultsWriter = { + tag?: string | undefined; +}; + +export type GetSearchResultsCountry = { + tag?: string | undefined; +}; + +export type GetSearchResultsRole = { + tag?: string | undefined; +}; + +export type GetSearchResultsMetadata = { + allowSync?: boolean | undefined; + librarySectionID?: number | undefined; + librarySectionTitle?: string | undefined; + librarySectionUUID?: string | undefined; + personal?: boolean | undefined; + sourceTitle?: string | undefined; + ratingKey?: number | undefined; + key?: string | undefined; + guid?: string | undefined; + studio?: string | undefined; + type?: string | undefined; + title?: string | undefined; + contentRating?: string | undefined; + summary?: string | undefined; + rating?: number | undefined; + audienceRating?: number | undefined; + year?: number | undefined; + tagline?: string | undefined; + thumb?: string | undefined; + art?: string | undefined; + duration?: number | undefined; + originallyAvailableAt?: Date | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + audienceRatingImage?: string | undefined; + chapterSource?: string | undefined; + primaryExtraKey?: string | undefined; + ratingImage?: string | undefined; + media?: Array | undefined; + genre?: Array | undefined; + director?: Array | undefined; + writer?: Array | undefined; + country?: Array | undefined; + role?: Array | undefined; +}; + +export type Provider = { + key?: string | undefined; + title?: string | undefined; + type?: string | undefined; +}; + +export type GetSearchResultsMediaContainer = { + size?: number | undefined; + identifier?: string | undefined; + mediaTagPrefix?: string | undefined; + mediaTagVersion?: number | undefined; + metadata?: Array | undefined; + provider?: Array | undefined; +}; + +/** + * Search Results + */ +export type GetSearchResultsResponseBody = { + mediaContainer?: GetSearchResultsMediaContainer | undefined; +}; + +export type GetSearchResultsResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Search Results + */ + object?: GetSearchResultsResponseBody | undefined; +}; + +/** @internal */ +export namespace GetSearchResultsRequest$ { + export type Inbound = { + query: string; + }; + + export const inboundSchema: z.ZodType = z + .object({ + query: z.string(), + }) + .transform((v) => { + return { + query: v.query, + }; + }); + + export type Outbound = { + query: string; + }; + + export const outboundSchema: z.ZodType = z + .object({ + query: z.string(), + }) + .transform((v) => { + return { + query: v.query, + }; + }); +} + +/** @internal */ +export namespace GetSearchResultsPart$ { + export type Inbound = { + id?: number | undefined; + key?: string | undefined; + duration?: number | undefined; + file?: string | undefined; + size?: number | undefined; + audioProfile?: string | undefined; + container?: string | undefined; + videoProfile?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + id: z.number().optional(), + key: z.string().optional(), + duration: z.number().optional(), + file: z.string().optional(), + size: z.number().optional(), + audioProfile: z.string().optional(), + container: z.string().optional(), + videoProfile: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.id === undefined ? null : { id: v.id }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.duration === undefined ? null : { duration: v.duration }), + ...(v.file === undefined ? null : { file: v.file }), + ...(v.size === undefined ? null : { size: v.size }), + ...(v.audioProfile === undefined ? null : { audioProfile: v.audioProfile }), + ...(v.container === undefined ? null : { container: v.container }), + ...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }), + }; + }); + + export type Outbound = { + id?: number | undefined; + key?: string | undefined; + duration?: number | undefined; + file?: string | undefined; + size?: number | undefined; + audioProfile?: string | undefined; + container?: string | undefined; + videoProfile?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + id: z.number().optional(), + key: z.string().optional(), + duration: z.number().optional(), + file: z.string().optional(), + size: z.number().optional(), + audioProfile: z.string().optional(), + container: z.string().optional(), + videoProfile: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.id === undefined ? null : { id: v.id }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.duration === undefined ? null : { duration: v.duration }), + ...(v.file === undefined ? null : { file: v.file }), + ...(v.size === undefined ? null : { size: v.size }), + ...(v.audioProfile === undefined ? null : { audioProfile: v.audioProfile }), + ...(v.container === undefined ? null : { container: v.container }), + ...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }), + }; + }); +} + +/** @internal */ +export namespace GetSearchResultsMedia$ { + export type Inbound = { + id?: number | undefined; + duration?: number | undefined; + bitrate?: number | undefined; + width?: number | undefined; + height?: number | undefined; + aspectRatio?: number | undefined; + audioChannels?: number | undefined; + audioCodec?: string | undefined; + videoCodec?: string | undefined; + videoResolution?: number | undefined; + container?: string | undefined; + videoFrameRate?: string | undefined; + audioProfile?: string | undefined; + videoProfile?: string | undefined; + Part?: Array | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + id: z.number().optional(), + duration: z.number().optional(), + bitrate: z.number().optional(), + width: z.number().optional(), + height: z.number().optional(), + aspectRatio: z.number().optional(), + audioChannels: z.number().optional(), + audioCodec: z.string().optional(), + videoCodec: z.string().optional(), + videoResolution: z.number().optional(), + container: z.string().optional(), + videoFrameRate: z.string().optional(), + audioProfile: z.string().optional(), + videoProfile: z.string().optional(), + Part: z.array(z.lazy(() => GetSearchResultsPart$.inboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.id === undefined ? null : { id: v.id }), + ...(v.duration === undefined ? null : { duration: v.duration }), + ...(v.bitrate === undefined ? null : { bitrate: v.bitrate }), + ...(v.width === undefined ? null : { width: v.width }), + ...(v.height === undefined ? null : { height: v.height }), + ...(v.aspectRatio === undefined ? null : { aspectRatio: v.aspectRatio }), + ...(v.audioChannels === undefined ? null : { audioChannels: v.audioChannels }), + ...(v.audioCodec === undefined ? null : { audioCodec: v.audioCodec }), + ...(v.videoCodec === undefined ? null : { videoCodec: v.videoCodec }), + ...(v.videoResolution === undefined + ? null + : { videoResolution: v.videoResolution }), + ...(v.container === undefined ? null : { container: v.container }), + ...(v.videoFrameRate === undefined ? null : { videoFrameRate: v.videoFrameRate }), + ...(v.audioProfile === undefined ? null : { audioProfile: v.audioProfile }), + ...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }), + ...(v.Part === undefined ? null : { part: v.Part }), + }; + }); + + export type Outbound = { + id?: number | undefined; + duration?: number | undefined; + bitrate?: number | undefined; + width?: number | undefined; + height?: number | undefined; + aspectRatio?: number | undefined; + audioChannels?: number | undefined; + audioCodec?: string | undefined; + videoCodec?: string | undefined; + videoResolution?: number | undefined; + container?: string | undefined; + videoFrameRate?: string | undefined; + audioProfile?: string | undefined; + videoProfile?: string | undefined; + Part?: Array | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + id: z.number().optional(), + duration: z.number().optional(), + bitrate: z.number().optional(), + width: z.number().optional(), + height: z.number().optional(), + aspectRatio: z.number().optional(), + audioChannels: z.number().optional(), + audioCodec: z.string().optional(), + videoCodec: z.string().optional(), + videoResolution: z.number().optional(), + container: z.string().optional(), + videoFrameRate: z.string().optional(), + audioProfile: z.string().optional(), + videoProfile: z.string().optional(), + part: z.array(z.lazy(() => GetSearchResultsPart$.outboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.id === undefined ? null : { id: v.id }), + ...(v.duration === undefined ? null : { duration: v.duration }), + ...(v.bitrate === undefined ? null : { bitrate: v.bitrate }), + ...(v.width === undefined ? null : { width: v.width }), + ...(v.height === undefined ? null : { height: v.height }), + ...(v.aspectRatio === undefined ? null : { aspectRatio: v.aspectRatio }), + ...(v.audioChannels === undefined ? null : { audioChannels: v.audioChannels }), + ...(v.audioCodec === undefined ? null : { audioCodec: v.audioCodec }), + ...(v.videoCodec === undefined ? null : { videoCodec: v.videoCodec }), + ...(v.videoResolution === undefined + ? null + : { videoResolution: v.videoResolution }), + ...(v.container === undefined ? null : { container: v.container }), + ...(v.videoFrameRate === undefined ? null : { videoFrameRate: v.videoFrameRate }), + ...(v.audioProfile === undefined ? null : { audioProfile: v.audioProfile }), + ...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }), + ...(v.part === undefined ? null : { Part: v.part }), + }; + }); +} + +/** @internal */ +export namespace GetSearchResultsGenre$ { + export type Inbound = { + tag?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); + + export type Outbound = { + tag?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); +} + +/** @internal */ +export namespace GetSearchResultsDirector$ { + export type Inbound = { + tag?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); + + export type Outbound = { + tag?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); +} + +/** @internal */ +export namespace GetSearchResultsWriter$ { + export type Inbound = { + tag?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); + + export type Outbound = { + tag?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); +} + +/** @internal */ +export namespace GetSearchResultsCountry$ { + export type Inbound = { + tag?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); + + export type Outbound = { + tag?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); +} + +/** @internal */ +export namespace GetSearchResultsRole$ { + export type Inbound = { + tag?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); + + export type Outbound = { + tag?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + tag: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.tag === undefined ? null : { tag: v.tag }), + }; + }); +} + +/** @internal */ +export namespace GetSearchResultsMetadata$ { + export type Inbound = { + allowSync?: boolean | undefined; + librarySectionID?: number | undefined; + librarySectionTitle?: string | undefined; + librarySectionUUID?: string | undefined; + personal?: boolean | undefined; + sourceTitle?: string | undefined; + ratingKey?: number | undefined; + key?: string | undefined; + guid?: string | undefined; + studio?: string | undefined; + type?: string | undefined; + title?: string | undefined; + contentRating?: string | undefined; + summary?: string | undefined; + rating?: number | undefined; + audienceRating?: number | undefined; + year?: number | undefined; + tagline?: string | undefined; + thumb?: string | undefined; + art?: string | undefined; + duration?: number | undefined; + originallyAvailableAt?: string | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + audienceRatingImage?: string | undefined; + chapterSource?: string | undefined; + primaryExtraKey?: string | undefined; + ratingImage?: string | undefined; + Media?: Array | undefined; + Genre?: Array | undefined; + Director?: Array | undefined; + Writer?: Array | undefined; + Country?: Array | undefined; + Role?: Array | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + allowSync: z.boolean().optional(), + librarySectionID: z.number().optional(), + librarySectionTitle: z.string().optional(), + librarySectionUUID: z.string().optional(), + personal: z.boolean().optional(), + sourceTitle: z.string().optional(), + ratingKey: z.number().optional(), + key: z.string().optional(), + guid: z.string().optional(), + studio: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + contentRating: z.string().optional(), + summary: z.string().optional(), + rating: z.number().optional(), + audienceRating: z.number().optional(), + year: z.number().optional(), + tagline: z.string().optional(), + thumb: z.string().optional(), + art: z.string().optional(), + duration: z.number().optional(), + originallyAvailableAt: z + .string() + .datetime({ offset: true }) + .transform((v) => new Date(v)) + .optional(), + addedAt: z.number().optional(), + updatedAt: z.number().optional(), + audienceRatingImage: z.string().optional(), + chapterSource: z.string().optional(), + primaryExtraKey: z.string().optional(), + ratingImage: z.string().optional(), + Media: z.array(z.lazy(() => GetSearchResultsMedia$.inboundSchema)).optional(), + Genre: z.array(z.lazy(() => GetSearchResultsGenre$.inboundSchema)).optional(), + Director: z.array(z.lazy(() => GetSearchResultsDirector$.inboundSchema)).optional(), + Writer: z.array(z.lazy(() => GetSearchResultsWriter$.inboundSchema)).optional(), + Country: z.array(z.lazy(() => GetSearchResultsCountry$.inboundSchema)).optional(), + Role: z.array(z.lazy(() => GetSearchResultsRole$.inboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.allowSync === undefined ? null : { allowSync: v.allowSync }), + ...(v.librarySectionID === undefined + ? null + : { librarySectionID: v.librarySectionID }), + ...(v.librarySectionTitle === undefined + ? null + : { librarySectionTitle: v.librarySectionTitle }), + ...(v.librarySectionUUID === undefined + ? null + : { librarySectionUUID: v.librarySectionUUID }), + ...(v.personal === undefined ? null : { personal: v.personal }), + ...(v.sourceTitle === undefined ? null : { sourceTitle: v.sourceTitle }), + ...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.guid === undefined ? null : { guid: v.guid }), + ...(v.studio === undefined ? null : { studio: v.studio }), + ...(v.type === undefined ? null : { type: v.type }), + ...(v.title === undefined ? null : { title: v.title }), + ...(v.contentRating === undefined ? null : { contentRating: v.contentRating }), + ...(v.summary === undefined ? null : { summary: v.summary }), + ...(v.rating === undefined ? null : { rating: v.rating }), + ...(v.audienceRating === undefined ? null : { audienceRating: v.audienceRating }), + ...(v.year === undefined ? null : { year: v.year }), + ...(v.tagline === undefined ? null : { tagline: v.tagline }), + ...(v.thumb === undefined ? null : { thumb: v.thumb }), + ...(v.art === undefined ? null : { art: v.art }), + ...(v.duration === undefined ? null : { duration: v.duration }), + ...(v.originallyAvailableAt === undefined + ? null + : { originallyAvailableAt: v.originallyAvailableAt }), + ...(v.addedAt === undefined ? null : { addedAt: v.addedAt }), + ...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }), + ...(v.audienceRatingImage === undefined + ? null + : { audienceRatingImage: v.audienceRatingImage }), + ...(v.chapterSource === undefined ? null : { chapterSource: v.chapterSource }), + ...(v.primaryExtraKey === undefined + ? null + : { primaryExtraKey: v.primaryExtraKey }), + ...(v.ratingImage === undefined ? null : { ratingImage: v.ratingImage }), + ...(v.Media === undefined ? null : { media: v.Media }), + ...(v.Genre === undefined ? null : { genre: v.Genre }), + ...(v.Director === undefined ? null : { director: v.Director }), + ...(v.Writer === undefined ? null : { writer: v.Writer }), + ...(v.Country === undefined ? null : { country: v.Country }), + ...(v.Role === undefined ? null : { role: v.Role }), + }; + }); + + export type Outbound = { + allowSync?: boolean | undefined; + librarySectionID?: number | undefined; + librarySectionTitle?: string | undefined; + librarySectionUUID?: string | undefined; + personal?: boolean | undefined; + sourceTitle?: string | undefined; + ratingKey?: number | undefined; + key?: string | undefined; + guid?: string | undefined; + studio?: string | undefined; + type?: string | undefined; + title?: string | undefined; + contentRating?: string | undefined; + summary?: string | undefined; + rating?: number | undefined; + audienceRating?: number | undefined; + year?: number | undefined; + tagline?: string | undefined; + thumb?: string | undefined; + art?: string | undefined; + duration?: number | undefined; + originallyAvailableAt?: string | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + audienceRatingImage?: string | undefined; + chapterSource?: string | undefined; + primaryExtraKey?: string | undefined; + ratingImage?: string | undefined; + Media?: Array | undefined; + Genre?: Array | undefined; + Director?: Array | undefined; + Writer?: Array | undefined; + Country?: Array | undefined; + Role?: Array | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + allowSync: z.boolean().optional(), + librarySectionID: z.number().optional(), + librarySectionTitle: z.string().optional(), + librarySectionUUID: z.string().optional(), + personal: z.boolean().optional(), + sourceTitle: z.string().optional(), + ratingKey: z.number().optional(), + key: z.string().optional(), + guid: z.string().optional(), + studio: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + contentRating: z.string().optional(), + summary: z.string().optional(), + rating: z.number().optional(), + audienceRating: z.number().optional(), + year: z.number().optional(), + tagline: z.string().optional(), + thumb: z.string().optional(), + art: z.string().optional(), + duration: z.number().optional(), + originallyAvailableAt: z + .date() + .transform((v) => v.toISOString()) + .optional(), + addedAt: z.number().optional(), + updatedAt: z.number().optional(), + audienceRatingImage: z.string().optional(), + chapterSource: z.string().optional(), + primaryExtraKey: z.string().optional(), + ratingImage: z.string().optional(), + media: z.array(z.lazy(() => GetSearchResultsMedia$.outboundSchema)).optional(), + genre: z.array(z.lazy(() => GetSearchResultsGenre$.outboundSchema)).optional(), + director: z.array(z.lazy(() => GetSearchResultsDirector$.outboundSchema)).optional(), + writer: z.array(z.lazy(() => GetSearchResultsWriter$.outboundSchema)).optional(), + country: z.array(z.lazy(() => GetSearchResultsCountry$.outboundSchema)).optional(), + role: z.array(z.lazy(() => GetSearchResultsRole$.outboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.allowSync === undefined ? null : { allowSync: v.allowSync }), + ...(v.librarySectionID === undefined + ? null + : { librarySectionID: v.librarySectionID }), + ...(v.librarySectionTitle === undefined + ? null + : { librarySectionTitle: v.librarySectionTitle }), + ...(v.librarySectionUUID === undefined + ? null + : { librarySectionUUID: v.librarySectionUUID }), + ...(v.personal === undefined ? null : { personal: v.personal }), + ...(v.sourceTitle === undefined ? null : { sourceTitle: v.sourceTitle }), + ...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.guid === undefined ? null : { guid: v.guid }), + ...(v.studio === undefined ? null : { studio: v.studio }), + ...(v.type === undefined ? null : { type: v.type }), + ...(v.title === undefined ? null : { title: v.title }), + ...(v.contentRating === undefined ? null : { contentRating: v.contentRating }), + ...(v.summary === undefined ? null : { summary: v.summary }), + ...(v.rating === undefined ? null : { rating: v.rating }), + ...(v.audienceRating === undefined ? null : { audienceRating: v.audienceRating }), + ...(v.year === undefined ? null : { year: v.year }), + ...(v.tagline === undefined ? null : { tagline: v.tagline }), + ...(v.thumb === undefined ? null : { thumb: v.thumb }), + ...(v.art === undefined ? null : { art: v.art }), + ...(v.duration === undefined ? null : { duration: v.duration }), + ...(v.originallyAvailableAt === undefined + ? null + : { originallyAvailableAt: v.originallyAvailableAt }), + ...(v.addedAt === undefined ? null : { addedAt: v.addedAt }), + ...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }), + ...(v.audienceRatingImage === undefined + ? null + : { audienceRatingImage: v.audienceRatingImage }), + ...(v.chapterSource === undefined ? null : { chapterSource: v.chapterSource }), + ...(v.primaryExtraKey === undefined + ? null + : { primaryExtraKey: v.primaryExtraKey }), + ...(v.ratingImage === undefined ? null : { ratingImage: v.ratingImage }), + ...(v.media === undefined ? null : { Media: v.media }), + ...(v.genre === undefined ? null : { Genre: v.genre }), + ...(v.director === undefined ? null : { Director: v.director }), + ...(v.writer === undefined ? null : { Writer: v.writer }), + ...(v.country === undefined ? null : { Country: v.country }), + ...(v.role === undefined ? null : { Role: v.role }), + }; + }); +} + +/** @internal */ +export namespace Provider$ { + export type Inbound = { + key?: string | undefined; + title?: string | undefined; + type?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + key: z.string().optional(), + title: z.string().optional(), + type: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.key === undefined ? null : { key: v.key }), + ...(v.title === undefined ? null : { title: v.title }), + ...(v.type === undefined ? null : { type: v.type }), + }; + }); + + export type Outbound = { + key?: string | undefined; + title?: string | undefined; + type?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + key: z.string().optional(), + title: z.string().optional(), + type: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.key === undefined ? null : { key: v.key }), + ...(v.title === undefined ? null : { title: v.title }), + ...(v.type === undefined ? null : { type: v.type }), + }; + }); +} + +/** @internal */ +export namespace GetSearchResultsMediaContainer$ { + export type Inbound = { + size?: number | undefined; + identifier?: string | undefined; + mediaTagPrefix?: string | undefined; + mediaTagVersion?: number | undefined; + Metadata?: Array | undefined; + Provider?: Array | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + size: z.number().optional(), + identifier: z.string().optional(), + mediaTagPrefix: z.string().optional(), + mediaTagVersion: z.number().optional(), + Metadata: z.array(z.lazy(() => GetSearchResultsMetadata$.inboundSchema)).optional(), + Provider: z.array(z.lazy(() => Provider$.inboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.size === undefined ? null : { size: v.size }), + ...(v.identifier === undefined ? null : { identifier: v.identifier }), + ...(v.mediaTagPrefix === undefined ? null : { mediaTagPrefix: v.mediaTagPrefix }), + ...(v.mediaTagVersion === undefined + ? null + : { mediaTagVersion: v.mediaTagVersion }), + ...(v.Metadata === undefined ? null : { metadata: v.Metadata }), + ...(v.Provider === undefined ? null : { provider: v.Provider }), + }; + }); + + export type Outbound = { + size?: number | undefined; + identifier?: string | undefined; + mediaTagPrefix?: string | undefined; + mediaTagVersion?: number | undefined; + Metadata?: Array | undefined; + Provider?: Array | undefined; + }; + + export const outboundSchema: z.ZodType = + z + .object({ + size: z.number().optional(), + identifier: z.string().optional(), + mediaTagPrefix: z.string().optional(), + mediaTagVersion: z.number().optional(), + metadata: z + .array(z.lazy(() => GetSearchResultsMetadata$.outboundSchema)) + .optional(), + provider: z.array(z.lazy(() => Provider$.outboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.size === undefined ? null : { size: v.size }), + ...(v.identifier === undefined ? null : { identifier: v.identifier }), + ...(v.mediaTagPrefix === undefined + ? null + : { mediaTagPrefix: v.mediaTagPrefix }), + ...(v.mediaTagVersion === undefined + ? null + : { mediaTagVersion: v.mediaTagVersion }), + ...(v.metadata === undefined ? null : { Metadata: v.metadata }), + ...(v.provider === undefined ? null : { Provider: v.provider }), + }; + }); +} + +/** @internal */ +export namespace GetSearchResultsResponseBody$ { + export type Inbound = { + MediaContainer?: GetSearchResultsMediaContainer$.Inbound | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + MediaContainer: z.lazy(() => GetSearchResultsMediaContainer$.inboundSchema).optional(), + }) + .transform((v) => { + return { + ...(v.MediaContainer === undefined ? null : { mediaContainer: v.MediaContainer }), + }; + }); + + export type Outbound = { + MediaContainer?: GetSearchResultsMediaContainer$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + mediaContainer: z.lazy(() => GetSearchResultsMediaContainer$.outboundSchema).optional(), + }) + .transform((v) => { + return { + ...(v.mediaContainer === undefined ? null : { MediaContainer: v.mediaContainer }), + }; + }); +} + +/** @internal */ +export namespace GetSearchResultsResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + object?: GetSearchResultsResponseBody$.Inbound | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetSearchResultsResponseBody$.inboundSchema).optional(), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + ...(v.object === undefined ? null : { object: v.object }), + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetSearchResultsResponseBody$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetSearchResultsResponseBody$.outboundSchema).optional(), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + ...(v.object === undefined ? null : { object: v.object }), + }; + }); +} diff --git a/src/models/operations/getserveractivities.ts b/src/models/operations/getserveractivities.ts new file mode 100644 index 00000000..b0db4eac --- /dev/null +++ b/src/models/operations/getserveractivities.ts @@ -0,0 +1,297 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type Context = { + librarySectionID?: string | undefined; +}; + +export type Activity = { + uuid?: string | undefined; + type?: string | undefined; + cancellable?: boolean | undefined; + userID?: number | undefined; + title?: string | undefined; + subtitle?: string | undefined; + progress?: number | undefined; + context?: Context | undefined; +}; + +export type GetServerActivitiesMediaContainer = { + size?: number | undefined; + activity?: Array | undefined; +}; + +/** + * The Server Activities + */ +export type GetServerActivitiesResponseBody = { + mediaContainer?: GetServerActivitiesMediaContainer | undefined; +}; + +export type GetServerActivitiesResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * The Server Activities + */ + object?: GetServerActivitiesResponseBody | undefined; +}; + +/** @internal */ +export namespace Context$ { + export type Inbound = { + librarySectionID?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + librarySectionID: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.librarySectionID === undefined + ? null + : { librarySectionID: v.librarySectionID }), + }; + }); + + export type Outbound = { + librarySectionID?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + librarySectionID: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.librarySectionID === undefined + ? null + : { librarySectionID: v.librarySectionID }), + }; + }); +} + +/** @internal */ +export namespace Activity$ { + export type Inbound = { + uuid?: string | undefined; + type?: string | undefined; + cancellable?: boolean | undefined; + userID?: number | undefined; + title?: string | undefined; + subtitle?: string | undefined; + progress?: number | undefined; + Context?: Context$.Inbound | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + uuid: z.string().optional(), + type: z.string().optional(), + cancellable: z.boolean().optional(), + userID: z.number().optional(), + title: z.string().optional(), + subtitle: z.string().optional(), + progress: z.number().optional(), + Context: z.lazy(() => Context$.inboundSchema).optional(), + }) + .transform((v) => { + return { + ...(v.uuid === undefined ? null : { uuid: v.uuid }), + ...(v.type === undefined ? null : { type: v.type }), + ...(v.cancellable === undefined ? null : { cancellable: v.cancellable }), + ...(v.userID === undefined ? null : { userID: v.userID }), + ...(v.title === undefined ? null : { title: v.title }), + ...(v.subtitle === undefined ? null : { subtitle: v.subtitle }), + ...(v.progress === undefined ? null : { progress: v.progress }), + ...(v.Context === undefined ? null : { context: v.Context }), + }; + }); + + export type Outbound = { + uuid?: string | undefined; + type?: string | undefined; + cancellable?: boolean | undefined; + userID?: number | undefined; + title?: string | undefined; + subtitle?: string | undefined; + progress?: number | undefined; + Context?: Context$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + uuid: z.string().optional(), + type: z.string().optional(), + cancellable: z.boolean().optional(), + userID: z.number().optional(), + title: z.string().optional(), + subtitle: z.string().optional(), + progress: z.number().optional(), + context: z.lazy(() => Context$.outboundSchema).optional(), + }) + .transform((v) => { + return { + ...(v.uuid === undefined ? null : { uuid: v.uuid }), + ...(v.type === undefined ? null : { type: v.type }), + ...(v.cancellable === undefined ? null : { cancellable: v.cancellable }), + ...(v.userID === undefined ? null : { userID: v.userID }), + ...(v.title === undefined ? null : { title: v.title }), + ...(v.subtitle === undefined ? null : { subtitle: v.subtitle }), + ...(v.progress === undefined ? null : { progress: v.progress }), + ...(v.context === undefined ? null : { Context: v.context }), + }; + }); +} + +/** @internal */ +export namespace GetServerActivitiesMediaContainer$ { + export type Inbound = { + size?: number | undefined; + Activity?: Array | undefined; + }; + + export const inboundSchema: z.ZodType< + GetServerActivitiesMediaContainer, + z.ZodTypeDef, + Inbound + > = z + .object({ + size: z.number().optional(), + Activity: z.array(z.lazy(() => Activity$.inboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.size === undefined ? null : { size: v.size }), + ...(v.Activity === undefined ? null : { activity: v.Activity }), + }; + }); + + export type Outbound = { + size?: number | undefined; + Activity?: Array | undefined; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + GetServerActivitiesMediaContainer + > = z + .object({ + size: z.number().optional(), + activity: z.array(z.lazy(() => Activity$.outboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.size === undefined ? null : { size: v.size }), + ...(v.activity === undefined ? null : { Activity: v.activity }), + }; + }); +} + +/** @internal */ +export namespace GetServerActivitiesResponseBody$ { + export type Inbound = { + MediaContainer?: GetServerActivitiesMediaContainer$.Inbound | undefined; + }; + + export const inboundSchema: z.ZodType = + z + .object({ + MediaContainer: z + .lazy(() => GetServerActivitiesMediaContainer$.inboundSchema) + .optional(), + }) + .transform((v) => { + return { + ...(v.MediaContainer === undefined + ? null + : { mediaContainer: v.MediaContainer }), + }; + }); + + export type Outbound = { + MediaContainer?: GetServerActivitiesMediaContainer$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + GetServerActivitiesResponseBody + > = z + .object({ + mediaContainer: z + .lazy(() => GetServerActivitiesMediaContainer$.outboundSchema) + .optional(), + }) + .transform((v) => { + return { + ...(v.mediaContainer === undefined ? null : { MediaContainer: v.mediaContainer }), + }; + }); +} + +/** @internal */ +export namespace GetServerActivitiesResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + object?: GetServerActivitiesResponseBody$.Inbound | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetServerActivitiesResponseBody$.inboundSchema).optional(), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + ...(v.object === undefined ? null : { object: v.object }), + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetServerActivitiesResponseBody$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetServerActivitiesResponseBody$.outboundSchema).optional(), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + ...(v.object === undefined ? null : { object: v.object }), + }; + }); +} diff --git a/src/models/operations/getservercapabilities.ts b/src/models/operations/getservercapabilities.ts new file mode 100644 index 00000000..d67389d6 --- /dev/null +++ b/src/models/operations/getservercapabilities.ts @@ -0,0 +1,648 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type Directory = { + count?: number | undefined; + key?: string | undefined; + title?: string | undefined; +}; + +export type MediaContainer = { + size?: number | undefined; + allowCameraUpload?: boolean | undefined; + allowChannelAccess?: boolean | undefined; + allowMediaDeletion?: boolean | undefined; + allowSharing?: boolean | undefined; + allowSync?: boolean | undefined; + allowTuners?: boolean | undefined; + backgroundProcessing?: boolean | undefined; + certificate?: boolean | undefined; + companionProxy?: boolean | undefined; + countryCode?: string | undefined; + diagnostics?: string | undefined; + eventStream?: boolean | undefined; + friendlyName?: string | undefined; + hubSearch?: boolean | undefined; + itemClusters?: boolean | undefined; + livetv?: number | undefined; + machineIdentifier?: string | undefined; + mediaProviders?: boolean | undefined; + multiuser?: boolean | undefined; + musicAnalysis?: number | undefined; + myPlex?: boolean | undefined; + myPlexMappingState?: string | undefined; + myPlexSigninState?: string | undefined; + myPlexSubscription?: boolean | undefined; + myPlexUsername?: string | undefined; + offlineTranscode?: number | undefined; + ownerFeatures?: string | undefined; + photoAutoTag?: boolean | undefined; + platform?: string | undefined; + platformVersion?: string | undefined; + pluginHost?: boolean | undefined; + pushNotifications?: boolean | undefined; + readOnlyLibraries?: boolean | undefined; + streamingBrainABRVersion?: number | undefined; + streamingBrainVersion?: number | undefined; + sync?: boolean | undefined; + transcoderActiveVideoSessions?: number | undefined; + transcoderAudio?: boolean | undefined; + transcoderLyrics?: boolean | undefined; + transcoderPhoto?: boolean | undefined; + transcoderSubtitles?: boolean | undefined; + transcoderVideo?: boolean | undefined; + transcoderVideoBitrates?: string | undefined; + transcoderVideoQualities?: string | undefined; + transcoderVideoResolutions?: string | undefined; + updatedAt?: number | undefined; + updater?: boolean | undefined; + version?: string | undefined; + voiceSearch?: boolean | undefined; + directory?: Array | undefined; +}; + +/** + * The Server Capabilities + */ +export type GetServerCapabilitiesResponseBody = { + mediaContainer?: MediaContainer | undefined; +}; + +export type GetServerCapabilitiesResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * The Server Capabilities + */ + object?: GetServerCapabilitiesResponseBody | undefined; +}; + +/** @internal */ +export namespace Directory$ { + export type Inbound = { + count?: number | undefined; + key?: string | undefined; + title?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + count: z.number().optional(), + key: z.string().optional(), + title: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.count === undefined ? null : { count: v.count }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.title === undefined ? null : { title: v.title }), + }; + }); + + export type Outbound = { + count?: number | undefined; + key?: string | undefined; + title?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + count: z.number().optional(), + key: z.string().optional(), + title: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.count === undefined ? null : { count: v.count }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.title === undefined ? null : { title: v.title }), + }; + }); +} + +/** @internal */ +export namespace MediaContainer$ { + export type Inbound = { + size?: number | undefined; + allowCameraUpload?: boolean | undefined; + allowChannelAccess?: boolean | undefined; + allowMediaDeletion?: boolean | undefined; + allowSharing?: boolean | undefined; + allowSync?: boolean | undefined; + allowTuners?: boolean | undefined; + backgroundProcessing?: boolean | undefined; + certificate?: boolean | undefined; + companionProxy?: boolean | undefined; + countryCode?: string | undefined; + diagnostics?: string | undefined; + eventStream?: boolean | undefined; + friendlyName?: string | undefined; + hubSearch?: boolean | undefined; + itemClusters?: boolean | undefined; + livetv?: number | undefined; + machineIdentifier?: string | undefined; + mediaProviders?: boolean | undefined; + multiuser?: boolean | undefined; + musicAnalysis?: number | undefined; + myPlex?: boolean | undefined; + myPlexMappingState?: string | undefined; + myPlexSigninState?: string | undefined; + myPlexSubscription?: boolean | undefined; + myPlexUsername?: string | undefined; + offlineTranscode?: number | undefined; + ownerFeatures?: string | undefined; + photoAutoTag?: boolean | undefined; + platform?: string | undefined; + platformVersion?: string | undefined; + pluginHost?: boolean | undefined; + pushNotifications?: boolean | undefined; + readOnlyLibraries?: boolean | undefined; + streamingBrainABRVersion?: number | undefined; + streamingBrainVersion?: number | undefined; + sync?: boolean | undefined; + transcoderActiveVideoSessions?: number | undefined; + transcoderAudio?: boolean | undefined; + transcoderLyrics?: boolean | undefined; + transcoderPhoto?: boolean | undefined; + transcoderSubtitles?: boolean | undefined; + transcoderVideo?: boolean | undefined; + transcoderVideoBitrates?: string | undefined; + transcoderVideoQualities?: string | undefined; + transcoderVideoResolutions?: string | undefined; + updatedAt?: number | undefined; + updater?: boolean | undefined; + version?: string | undefined; + voiceSearch?: boolean | undefined; + Directory?: Array | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + size: z.number().optional(), + allowCameraUpload: z.boolean().optional(), + allowChannelAccess: z.boolean().optional(), + allowMediaDeletion: z.boolean().optional(), + allowSharing: z.boolean().optional(), + allowSync: z.boolean().optional(), + allowTuners: z.boolean().optional(), + backgroundProcessing: z.boolean().optional(), + certificate: z.boolean().optional(), + companionProxy: z.boolean().optional(), + countryCode: z.string().optional(), + diagnostics: z.string().optional(), + eventStream: z.boolean().optional(), + friendlyName: z.string().optional(), + hubSearch: z.boolean().optional(), + itemClusters: z.boolean().optional(), + livetv: z.number().optional(), + machineIdentifier: z.string().optional(), + mediaProviders: z.boolean().optional(), + multiuser: z.boolean().optional(), + musicAnalysis: z.number().optional(), + myPlex: z.boolean().optional(), + myPlexMappingState: z.string().optional(), + myPlexSigninState: z.string().optional(), + myPlexSubscription: z.boolean().optional(), + myPlexUsername: z.string().optional(), + offlineTranscode: z.number().optional(), + ownerFeatures: z.string().optional(), + photoAutoTag: z.boolean().optional(), + platform: z.string().optional(), + platformVersion: z.string().optional(), + pluginHost: z.boolean().optional(), + pushNotifications: z.boolean().optional(), + readOnlyLibraries: z.boolean().optional(), + streamingBrainABRVersion: z.number().optional(), + streamingBrainVersion: z.number().optional(), + sync: z.boolean().optional(), + transcoderActiveVideoSessions: z.number().optional(), + transcoderAudio: z.boolean().optional(), + transcoderLyrics: z.boolean().optional(), + transcoderPhoto: z.boolean().optional(), + transcoderSubtitles: z.boolean().optional(), + transcoderVideo: z.boolean().optional(), + transcoderVideoBitrates: z.string().optional(), + transcoderVideoQualities: z.string().optional(), + transcoderVideoResolutions: z.string().optional(), + updatedAt: z.number().optional(), + updater: z.boolean().optional(), + version: z.string().optional(), + voiceSearch: z.boolean().optional(), + Directory: z.array(z.lazy(() => Directory$.inboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.size === undefined ? null : { size: v.size }), + ...(v.allowCameraUpload === undefined + ? null + : { allowCameraUpload: v.allowCameraUpload }), + ...(v.allowChannelAccess === undefined + ? null + : { allowChannelAccess: v.allowChannelAccess }), + ...(v.allowMediaDeletion === undefined + ? null + : { allowMediaDeletion: v.allowMediaDeletion }), + ...(v.allowSharing === undefined ? null : { allowSharing: v.allowSharing }), + ...(v.allowSync === undefined ? null : { allowSync: v.allowSync }), + ...(v.allowTuners === undefined ? null : { allowTuners: v.allowTuners }), + ...(v.backgroundProcessing === undefined + ? null + : { backgroundProcessing: v.backgroundProcessing }), + ...(v.certificate === undefined ? null : { certificate: v.certificate }), + ...(v.companionProxy === undefined ? null : { companionProxy: v.companionProxy }), + ...(v.countryCode === undefined ? null : { countryCode: v.countryCode }), + ...(v.diagnostics === undefined ? null : { diagnostics: v.diagnostics }), + ...(v.eventStream === undefined ? null : { eventStream: v.eventStream }), + ...(v.friendlyName === undefined ? null : { friendlyName: v.friendlyName }), + ...(v.hubSearch === undefined ? null : { hubSearch: v.hubSearch }), + ...(v.itemClusters === undefined ? null : { itemClusters: v.itemClusters }), + ...(v.livetv === undefined ? null : { livetv: v.livetv }), + ...(v.machineIdentifier === undefined + ? null + : { machineIdentifier: v.machineIdentifier }), + ...(v.mediaProviders === undefined ? null : { mediaProviders: v.mediaProviders }), + ...(v.multiuser === undefined ? null : { multiuser: v.multiuser }), + ...(v.musicAnalysis === undefined ? null : { musicAnalysis: v.musicAnalysis }), + ...(v.myPlex === undefined ? null : { myPlex: v.myPlex }), + ...(v.myPlexMappingState === undefined + ? null + : { myPlexMappingState: v.myPlexMappingState }), + ...(v.myPlexSigninState === undefined + ? null + : { myPlexSigninState: v.myPlexSigninState }), + ...(v.myPlexSubscription === undefined + ? null + : { myPlexSubscription: v.myPlexSubscription }), + ...(v.myPlexUsername === undefined ? null : { myPlexUsername: v.myPlexUsername }), + ...(v.offlineTranscode === undefined + ? null + : { offlineTranscode: v.offlineTranscode }), + ...(v.ownerFeatures === undefined ? null : { ownerFeatures: v.ownerFeatures }), + ...(v.photoAutoTag === undefined ? null : { photoAutoTag: v.photoAutoTag }), + ...(v.platform === undefined ? null : { platform: v.platform }), + ...(v.platformVersion === undefined + ? null + : { platformVersion: v.platformVersion }), + ...(v.pluginHost === undefined ? null : { pluginHost: v.pluginHost }), + ...(v.pushNotifications === undefined + ? null + : { pushNotifications: v.pushNotifications }), + ...(v.readOnlyLibraries === undefined + ? null + : { readOnlyLibraries: v.readOnlyLibraries }), + ...(v.streamingBrainABRVersion === undefined + ? null + : { streamingBrainABRVersion: v.streamingBrainABRVersion }), + ...(v.streamingBrainVersion === undefined + ? null + : { streamingBrainVersion: v.streamingBrainVersion }), + ...(v.sync === undefined ? null : { sync: v.sync }), + ...(v.transcoderActiveVideoSessions === undefined + ? null + : { transcoderActiveVideoSessions: v.transcoderActiveVideoSessions }), + ...(v.transcoderAudio === undefined + ? null + : { transcoderAudio: v.transcoderAudio }), + ...(v.transcoderLyrics === undefined + ? null + : { transcoderLyrics: v.transcoderLyrics }), + ...(v.transcoderPhoto === undefined + ? null + : { transcoderPhoto: v.transcoderPhoto }), + ...(v.transcoderSubtitles === undefined + ? null + : { transcoderSubtitles: v.transcoderSubtitles }), + ...(v.transcoderVideo === undefined + ? null + : { transcoderVideo: v.transcoderVideo }), + ...(v.transcoderVideoBitrates === undefined + ? null + : { transcoderVideoBitrates: v.transcoderVideoBitrates }), + ...(v.transcoderVideoQualities === undefined + ? null + : { transcoderVideoQualities: v.transcoderVideoQualities }), + ...(v.transcoderVideoResolutions === undefined + ? null + : { transcoderVideoResolutions: v.transcoderVideoResolutions }), + ...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }), + ...(v.updater === undefined ? null : { updater: v.updater }), + ...(v.version === undefined ? null : { version: v.version }), + ...(v.voiceSearch === undefined ? null : { voiceSearch: v.voiceSearch }), + ...(v.Directory === undefined ? null : { directory: v.Directory }), + }; + }); + + export type Outbound = { + size?: number | undefined; + allowCameraUpload?: boolean | undefined; + allowChannelAccess?: boolean | undefined; + allowMediaDeletion?: boolean | undefined; + allowSharing?: boolean | undefined; + allowSync?: boolean | undefined; + allowTuners?: boolean | undefined; + backgroundProcessing?: boolean | undefined; + certificate?: boolean | undefined; + companionProxy?: boolean | undefined; + countryCode?: string | undefined; + diagnostics?: string | undefined; + eventStream?: boolean | undefined; + friendlyName?: string | undefined; + hubSearch?: boolean | undefined; + itemClusters?: boolean | undefined; + livetv?: number | undefined; + machineIdentifier?: string | undefined; + mediaProviders?: boolean | undefined; + multiuser?: boolean | undefined; + musicAnalysis?: number | undefined; + myPlex?: boolean | undefined; + myPlexMappingState?: string | undefined; + myPlexSigninState?: string | undefined; + myPlexSubscription?: boolean | undefined; + myPlexUsername?: string | undefined; + offlineTranscode?: number | undefined; + ownerFeatures?: string | undefined; + photoAutoTag?: boolean | undefined; + platform?: string | undefined; + platformVersion?: string | undefined; + pluginHost?: boolean | undefined; + pushNotifications?: boolean | undefined; + readOnlyLibraries?: boolean | undefined; + streamingBrainABRVersion?: number | undefined; + streamingBrainVersion?: number | undefined; + sync?: boolean | undefined; + transcoderActiveVideoSessions?: number | undefined; + transcoderAudio?: boolean | undefined; + transcoderLyrics?: boolean | undefined; + transcoderPhoto?: boolean | undefined; + transcoderSubtitles?: boolean | undefined; + transcoderVideo?: boolean | undefined; + transcoderVideoBitrates?: string | undefined; + transcoderVideoQualities?: string | undefined; + transcoderVideoResolutions?: string | undefined; + updatedAt?: number | undefined; + updater?: boolean | undefined; + version?: string | undefined; + voiceSearch?: boolean | undefined; + Directory?: Array | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + size: z.number().optional(), + allowCameraUpload: z.boolean().optional(), + allowChannelAccess: z.boolean().optional(), + allowMediaDeletion: z.boolean().optional(), + allowSharing: z.boolean().optional(), + allowSync: z.boolean().optional(), + allowTuners: z.boolean().optional(), + backgroundProcessing: z.boolean().optional(), + certificate: z.boolean().optional(), + companionProxy: z.boolean().optional(), + countryCode: z.string().optional(), + diagnostics: z.string().optional(), + eventStream: z.boolean().optional(), + friendlyName: z.string().optional(), + hubSearch: z.boolean().optional(), + itemClusters: z.boolean().optional(), + livetv: z.number().optional(), + machineIdentifier: z.string().optional(), + mediaProviders: z.boolean().optional(), + multiuser: z.boolean().optional(), + musicAnalysis: z.number().optional(), + myPlex: z.boolean().optional(), + myPlexMappingState: z.string().optional(), + myPlexSigninState: z.string().optional(), + myPlexSubscription: z.boolean().optional(), + myPlexUsername: z.string().optional(), + offlineTranscode: z.number().optional(), + ownerFeatures: z.string().optional(), + photoAutoTag: z.boolean().optional(), + platform: z.string().optional(), + platformVersion: z.string().optional(), + pluginHost: z.boolean().optional(), + pushNotifications: z.boolean().optional(), + readOnlyLibraries: z.boolean().optional(), + streamingBrainABRVersion: z.number().optional(), + streamingBrainVersion: z.number().optional(), + sync: z.boolean().optional(), + transcoderActiveVideoSessions: z.number().optional(), + transcoderAudio: z.boolean().optional(), + transcoderLyrics: z.boolean().optional(), + transcoderPhoto: z.boolean().optional(), + transcoderSubtitles: z.boolean().optional(), + transcoderVideo: z.boolean().optional(), + transcoderVideoBitrates: z.string().optional(), + transcoderVideoQualities: z.string().optional(), + transcoderVideoResolutions: z.string().optional(), + updatedAt: z.number().optional(), + updater: z.boolean().optional(), + version: z.string().optional(), + voiceSearch: z.boolean().optional(), + directory: z.array(z.lazy(() => Directory$.outboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.size === undefined ? null : { size: v.size }), + ...(v.allowCameraUpload === undefined + ? null + : { allowCameraUpload: v.allowCameraUpload }), + ...(v.allowChannelAccess === undefined + ? null + : { allowChannelAccess: v.allowChannelAccess }), + ...(v.allowMediaDeletion === undefined + ? null + : { allowMediaDeletion: v.allowMediaDeletion }), + ...(v.allowSharing === undefined ? null : { allowSharing: v.allowSharing }), + ...(v.allowSync === undefined ? null : { allowSync: v.allowSync }), + ...(v.allowTuners === undefined ? null : { allowTuners: v.allowTuners }), + ...(v.backgroundProcessing === undefined + ? null + : { backgroundProcessing: v.backgroundProcessing }), + ...(v.certificate === undefined ? null : { certificate: v.certificate }), + ...(v.companionProxy === undefined ? null : { companionProxy: v.companionProxy }), + ...(v.countryCode === undefined ? null : { countryCode: v.countryCode }), + ...(v.diagnostics === undefined ? null : { diagnostics: v.diagnostics }), + ...(v.eventStream === undefined ? null : { eventStream: v.eventStream }), + ...(v.friendlyName === undefined ? null : { friendlyName: v.friendlyName }), + ...(v.hubSearch === undefined ? null : { hubSearch: v.hubSearch }), + ...(v.itemClusters === undefined ? null : { itemClusters: v.itemClusters }), + ...(v.livetv === undefined ? null : { livetv: v.livetv }), + ...(v.machineIdentifier === undefined + ? null + : { machineIdentifier: v.machineIdentifier }), + ...(v.mediaProviders === undefined ? null : { mediaProviders: v.mediaProviders }), + ...(v.multiuser === undefined ? null : { multiuser: v.multiuser }), + ...(v.musicAnalysis === undefined ? null : { musicAnalysis: v.musicAnalysis }), + ...(v.myPlex === undefined ? null : { myPlex: v.myPlex }), + ...(v.myPlexMappingState === undefined + ? null + : { myPlexMappingState: v.myPlexMappingState }), + ...(v.myPlexSigninState === undefined + ? null + : { myPlexSigninState: v.myPlexSigninState }), + ...(v.myPlexSubscription === undefined + ? null + : { myPlexSubscription: v.myPlexSubscription }), + ...(v.myPlexUsername === undefined ? null : { myPlexUsername: v.myPlexUsername }), + ...(v.offlineTranscode === undefined + ? null + : { offlineTranscode: v.offlineTranscode }), + ...(v.ownerFeatures === undefined ? null : { ownerFeatures: v.ownerFeatures }), + ...(v.photoAutoTag === undefined ? null : { photoAutoTag: v.photoAutoTag }), + ...(v.platform === undefined ? null : { platform: v.platform }), + ...(v.platformVersion === undefined + ? null + : { platformVersion: v.platformVersion }), + ...(v.pluginHost === undefined ? null : { pluginHost: v.pluginHost }), + ...(v.pushNotifications === undefined + ? null + : { pushNotifications: v.pushNotifications }), + ...(v.readOnlyLibraries === undefined + ? null + : { readOnlyLibraries: v.readOnlyLibraries }), + ...(v.streamingBrainABRVersion === undefined + ? null + : { streamingBrainABRVersion: v.streamingBrainABRVersion }), + ...(v.streamingBrainVersion === undefined + ? null + : { streamingBrainVersion: v.streamingBrainVersion }), + ...(v.sync === undefined ? null : { sync: v.sync }), + ...(v.transcoderActiveVideoSessions === undefined + ? null + : { transcoderActiveVideoSessions: v.transcoderActiveVideoSessions }), + ...(v.transcoderAudio === undefined + ? null + : { transcoderAudio: v.transcoderAudio }), + ...(v.transcoderLyrics === undefined + ? null + : { transcoderLyrics: v.transcoderLyrics }), + ...(v.transcoderPhoto === undefined + ? null + : { transcoderPhoto: v.transcoderPhoto }), + ...(v.transcoderSubtitles === undefined + ? null + : { transcoderSubtitles: v.transcoderSubtitles }), + ...(v.transcoderVideo === undefined + ? null + : { transcoderVideo: v.transcoderVideo }), + ...(v.transcoderVideoBitrates === undefined + ? null + : { transcoderVideoBitrates: v.transcoderVideoBitrates }), + ...(v.transcoderVideoQualities === undefined + ? null + : { transcoderVideoQualities: v.transcoderVideoQualities }), + ...(v.transcoderVideoResolutions === undefined + ? null + : { transcoderVideoResolutions: v.transcoderVideoResolutions }), + ...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }), + ...(v.updater === undefined ? null : { updater: v.updater }), + ...(v.version === undefined ? null : { version: v.version }), + ...(v.voiceSearch === undefined ? null : { voiceSearch: v.voiceSearch }), + ...(v.directory === undefined ? null : { Directory: v.directory }), + }; + }); +} + +/** @internal */ +export namespace GetServerCapabilitiesResponseBody$ { + export type Inbound = { + MediaContainer?: MediaContainer$.Inbound | undefined; + }; + + export const inboundSchema: z.ZodType< + GetServerCapabilitiesResponseBody, + z.ZodTypeDef, + Inbound + > = z + .object({ + MediaContainer: z.lazy(() => MediaContainer$.inboundSchema).optional(), + }) + .transform((v) => { + return { + ...(v.MediaContainer === undefined ? null : { mediaContainer: v.MediaContainer }), + }; + }); + + export type Outbound = { + MediaContainer?: MediaContainer$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + GetServerCapabilitiesResponseBody + > = z + .object({ + mediaContainer: z.lazy(() => MediaContainer$.outboundSchema).optional(), + }) + .transform((v) => { + return { + ...(v.mediaContainer === undefined ? null : { MediaContainer: v.mediaContainer }), + }; + }); +} + +/** @internal */ +export namespace GetServerCapabilitiesResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + object?: GetServerCapabilitiesResponseBody$.Inbound | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetServerCapabilitiesResponseBody$.inboundSchema).optional(), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + ...(v.object === undefined ? null : { object: v.object }), + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetServerCapabilitiesResponseBody$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType = + z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetServerCapabilitiesResponseBody$.outboundSchema).optional(), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + ...(v.object === undefined ? null : { object: v.object }), + }; + }); +} diff --git a/src/models/operations/getserveridentity.ts b/src/models/operations/getserveridentity.ts new file mode 100644 index 00000000..5f52553b --- /dev/null +++ b/src/models/operations/getserveridentity.ts @@ -0,0 +1,183 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetServerIdentityMediaContainer = { + size?: number | undefined; + claimed?: boolean | undefined; + machineIdentifier?: string | undefined; + version?: string | undefined; +}; + +/** + * The Transcode Sessions + */ +export type GetServerIdentityResponseBody = { + mediaContainer?: GetServerIdentityMediaContainer | undefined; +}; + +export type GetServerIdentityResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * The Transcode Sessions + */ + object?: GetServerIdentityResponseBody | undefined; +}; + +/** @internal */ +export namespace GetServerIdentityMediaContainer$ { + export type Inbound = { + size?: number | undefined; + claimed?: boolean | undefined; + machineIdentifier?: string | undefined; + version?: string | undefined; + }; + + export const inboundSchema: z.ZodType = + z + .object({ + size: z.number().optional(), + claimed: z.boolean().optional(), + machineIdentifier: z.string().optional(), + version: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.size === undefined ? null : { size: v.size }), + ...(v.claimed === undefined ? null : { claimed: v.claimed }), + ...(v.machineIdentifier === undefined + ? null + : { machineIdentifier: v.machineIdentifier }), + ...(v.version === undefined ? null : { version: v.version }), + }; + }); + + export type Outbound = { + size?: number | undefined; + claimed?: boolean | undefined; + machineIdentifier?: string | undefined; + version?: string | undefined; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + GetServerIdentityMediaContainer + > = z + .object({ + size: z.number().optional(), + claimed: z.boolean().optional(), + machineIdentifier: z.string().optional(), + version: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.size === undefined ? null : { size: v.size }), + ...(v.claimed === undefined ? null : { claimed: v.claimed }), + ...(v.machineIdentifier === undefined + ? null + : { machineIdentifier: v.machineIdentifier }), + ...(v.version === undefined ? null : { version: v.version }), + }; + }); +} + +/** @internal */ +export namespace GetServerIdentityResponseBody$ { + export type Inbound = { + MediaContainer?: GetServerIdentityMediaContainer$.Inbound | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + MediaContainer: z.lazy(() => GetServerIdentityMediaContainer$.inboundSchema).optional(), + }) + .transform((v) => { + return { + ...(v.MediaContainer === undefined ? null : { mediaContainer: v.MediaContainer }), + }; + }); + + export type Outbound = { + MediaContainer?: GetServerIdentityMediaContainer$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType = + z + .object({ + mediaContainer: z + .lazy(() => GetServerIdentityMediaContainer$.outboundSchema) + .optional(), + }) + .transform((v) => { + return { + ...(v.mediaContainer === undefined + ? null + : { MediaContainer: v.mediaContainer }), + }; + }); +} + +/** @internal */ +export namespace GetServerIdentityResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + object?: GetServerIdentityResponseBody$.Inbound | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetServerIdentityResponseBody$.inboundSchema).optional(), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + ...(v.object === undefined ? null : { object: v.object }), + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetServerIdentityResponseBody$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetServerIdentityResponseBody$.outboundSchema).optional(), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + ...(v.object === undefined ? null : { object: v.object }), + }; + }); +} diff --git a/src/models/operations/getserverlist.ts b/src/models/operations/getserverlist.ts new file mode 100644 index 00000000..77ff671a --- /dev/null +++ b/src/models/operations/getserverlist.ts @@ -0,0 +1,229 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetServerListServer = { + name?: string | undefined; + host?: string | undefined; + address?: string | undefined; + port?: number | undefined; + machineIdentifier?: string | undefined; + version?: string | undefined; +}; + +export type GetServerListMediaContainer = { + size?: number | undefined; + server?: Array | undefined; +}; + +/** + * List of Servers + */ +export type GetServerListResponseBody = { + mediaContainer?: GetServerListMediaContainer | undefined; +}; + +export type GetServerListResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * List of Servers + */ + object?: GetServerListResponseBody | undefined; +}; + +/** @internal */ +export namespace GetServerListServer$ { + export type Inbound = { + name?: string | undefined; + host?: string | undefined; + address?: string | undefined; + port?: number | undefined; + machineIdentifier?: string | undefined; + version?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + name: z.string().optional(), + host: z.string().optional(), + address: z.string().optional(), + port: z.number().optional(), + machineIdentifier: z.string().optional(), + version: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.name === undefined ? null : { name: v.name }), + ...(v.host === undefined ? null : { host: v.host }), + ...(v.address === undefined ? null : { address: v.address }), + ...(v.port === undefined ? null : { port: v.port }), + ...(v.machineIdentifier === undefined + ? null + : { machineIdentifier: v.machineIdentifier }), + ...(v.version === undefined ? null : { version: v.version }), + }; + }); + + export type Outbound = { + name?: string | undefined; + host?: string | undefined; + address?: string | undefined; + port?: number | undefined; + machineIdentifier?: string | undefined; + version?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + name: z.string().optional(), + host: z.string().optional(), + address: z.string().optional(), + port: z.number().optional(), + machineIdentifier: z.string().optional(), + version: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.name === undefined ? null : { name: v.name }), + ...(v.host === undefined ? null : { host: v.host }), + ...(v.address === undefined ? null : { address: v.address }), + ...(v.port === undefined ? null : { port: v.port }), + ...(v.machineIdentifier === undefined + ? null + : { machineIdentifier: v.machineIdentifier }), + ...(v.version === undefined ? null : { version: v.version }), + }; + }); +} + +/** @internal */ +export namespace GetServerListMediaContainer$ { + export type Inbound = { + size?: number | undefined; + Server?: Array | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + size: z.number().optional(), + Server: z.array(z.lazy(() => GetServerListServer$.inboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.size === undefined ? null : { size: v.size }), + ...(v.Server === undefined ? null : { server: v.Server }), + }; + }); + + export type Outbound = { + size?: number | undefined; + Server?: Array | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + size: z.number().optional(), + server: z.array(z.lazy(() => GetServerListServer$.outboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.size === undefined ? null : { size: v.size }), + ...(v.server === undefined ? null : { Server: v.server }), + }; + }); +} + +/** @internal */ +export namespace GetServerListResponseBody$ { + export type Inbound = { + MediaContainer?: GetServerListMediaContainer$.Inbound | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + MediaContainer: z.lazy(() => GetServerListMediaContainer$.inboundSchema).optional(), + }) + .transform((v) => { + return { + ...(v.MediaContainer === undefined ? null : { mediaContainer: v.MediaContainer }), + }; + }); + + export type Outbound = { + MediaContainer?: GetServerListMediaContainer$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + mediaContainer: z.lazy(() => GetServerListMediaContainer$.outboundSchema).optional(), + }) + .transform((v) => { + return { + ...(v.mediaContainer === undefined ? null : { MediaContainer: v.mediaContainer }), + }; + }); +} + +/** @internal */ +export namespace GetServerListResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + object?: GetServerListResponseBody$.Inbound | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetServerListResponseBody$.inboundSchema).optional(), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + ...(v.object === undefined ? null : { object: v.object }), + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetServerListResponseBody$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetServerListResponseBody$.outboundSchema).optional(), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + ...(v.object === undefined ? null : { object: v.object }), + }; + }); +} diff --git a/src/models/operations/getserverpreferences.ts b/src/models/operations/getserverpreferences.ts new file mode 100644 index 00000000..6f98c7cf --- /dev/null +++ b/src/models/operations/getserverpreferences.ts @@ -0,0 +1,65 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetServerPreferencesResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace GetServerPreferencesResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/getsessionhistory.ts b/src/models/operations/getsessionhistory.ts new file mode 100644 index 00000000..af903bc2 --- /dev/null +++ b/src/models/operations/getsessionhistory.ts @@ -0,0 +1,65 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetSessionHistoryResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace GetSessionHistoryResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/getsessions.ts b/src/models/operations/getsessions.ts new file mode 100644 index 00000000..320c5fdd --- /dev/null +++ b/src/models/operations/getsessions.ts @@ -0,0 +1,65 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetSessionsResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace GetSessionsResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/getsourceconnectioninformation.ts b/src/models/operations/getsourceconnectioninformation.ts new file mode 100644 index 00000000..4dd93cad --- /dev/null +++ b/src/models/operations/getsourceconnectioninformation.ts @@ -0,0 +1,119 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetSourceConnectionInformationRequest = { + /** + * The source identifier with an included prefix. + */ + source: string; +}; + +export type GetSourceConnectionInformationResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace GetSourceConnectionInformationRequest$ { + export type Inbound = { + source: string; + }; + + export const inboundSchema: z.ZodType< + GetSourceConnectionInformationRequest, + z.ZodTypeDef, + Inbound + > = z + .object({ + source: z.string(), + }) + .transform((v) => { + return { + source: v.source, + }; + }); + + export type Outbound = { + source: string; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + GetSourceConnectionInformationRequest + > = z + .object({ + source: z.string(), + }) + .transform((v) => { + return { + source: v.source, + }; + }); +} + +/** @internal */ +export namespace GetSourceConnectionInformationResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType< + GetSourceConnectionInformationResponse, + z.ZodTypeDef, + Inbound + > = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + GetSourceConnectionInformationResponse + > = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/gettimeline.ts b/src/models/operations/gettimeline.ts new file mode 100644 index 00000000..4cea3a0a --- /dev/null +++ b/src/models/operations/gettimeline.ts @@ -0,0 +1,205 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +/** + * The state of the media item + */ +export enum State { + Playing = "playing", + Paused = "paused", + Stopped = "stopped", +} + +export type GetTimelineRequest = { + /** + * The rating key of the media item + */ + ratingKey: number; + /** + * The key of the media item to get the timeline for + */ + key: string; + /** + * The state of the media item + */ + state: State; + /** + * Whether the media item has MDE + */ + hasMDE: number; + /** + * The time of the media item + */ + time: number; + /** + * The duration of the media item + */ + duration: number; + /** + * The context of the media item + */ + context: string; + /** + * The play queue item ID of the media item + */ + playQueueItemID: number; + /** + * The playback time of the media item + */ + playBackTime: number; + /** + * The row of the media item + */ + row: number; +}; + +export type GetTimelineResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export const State$ = z.nativeEnum(State); + +/** @internal */ +export namespace GetTimelineRequest$ { + export type Inbound = { + ratingKey: number; + key: string; + state: State; + hasMDE: number; + time: number; + duration: number; + context: string; + playQueueItemID: number; + playBackTime: number; + row: number; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ratingKey: z.number(), + key: z.string(), + state: State$, + hasMDE: z.number(), + time: z.number(), + duration: z.number(), + context: z.string(), + playQueueItemID: z.number(), + playBackTime: z.number(), + row: z.number(), + }) + .transform((v) => { + return { + ratingKey: v.ratingKey, + key: v.key, + state: v.state, + hasMDE: v.hasMDE, + time: v.time, + duration: v.duration, + context: v.context, + playQueueItemID: v.playQueueItemID, + playBackTime: v.playBackTime, + row: v.row, + }; + }); + + export type Outbound = { + ratingKey: number; + key: string; + state: State; + hasMDE: number; + time: number; + duration: number; + context: string; + playQueueItemID: number; + playBackTime: number; + row: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + ratingKey: z.number(), + key: z.string(), + state: State$, + hasMDE: z.number(), + time: z.number(), + duration: z.number(), + context: z.string(), + playQueueItemID: z.number(), + playBackTime: z.number(), + row: z.number(), + }) + .transform((v) => { + return { + ratingKey: v.ratingKey, + key: v.key, + state: v.state, + hasMDE: v.hasMDE, + time: v.time, + duration: v.duration, + context: v.context, + playQueueItemID: v.playQueueItemID, + playBackTime: v.playBackTime, + row: v.row, + }; + }); +} + +/** @internal */ +export namespace GetTimelineResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/gettranscodesessions.ts b/src/models/operations/gettranscodesessions.ts new file mode 100644 index 00000000..58c7a2d2 --- /dev/null +++ b/src/models/operations/gettranscodesessions.ts @@ -0,0 +1,380 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type TranscodeSession = { + key?: string | undefined; + throttled?: boolean | undefined; + complete?: boolean | undefined; + progress?: number | undefined; + size?: number | undefined; + speed?: number | undefined; + error?: boolean | undefined; + duration?: number | undefined; + context?: string | undefined; + sourceVideoCodec?: string | undefined; + sourceAudioCodec?: string | undefined; + videoDecision?: string | undefined; + audioDecision?: string | undefined; + protocol?: string | undefined; + container?: string | undefined; + videoCodec?: string | undefined; + audioCodec?: string | undefined; + audioChannels?: number | undefined; + transcodeHwRequested?: boolean | undefined; + timeStamp?: number | undefined; + maxOffsetAvailable?: number | undefined; + minOffsetAvailable?: number | undefined; +}; + +export type GetTranscodeSessionsMediaContainer = { + size?: number | undefined; + transcodeSession?: Array | undefined; +}; + +/** + * The Transcode Sessions + */ +export type GetTranscodeSessionsResponseBody = { + mediaContainer?: GetTranscodeSessionsMediaContainer | undefined; +}; + +export type GetTranscodeSessionsResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * The Transcode Sessions + */ + object?: GetTranscodeSessionsResponseBody | undefined; +}; + +/** @internal */ +export namespace TranscodeSession$ { + export type Inbound = { + key?: string | undefined; + throttled?: boolean | undefined; + complete?: boolean | undefined; + progress?: number | undefined; + size?: number | undefined; + speed?: number | undefined; + error?: boolean | undefined; + duration?: number | undefined; + context?: string | undefined; + sourceVideoCodec?: string | undefined; + sourceAudioCodec?: string | undefined; + videoDecision?: string | undefined; + audioDecision?: string | undefined; + protocol?: string | undefined; + container?: string | undefined; + videoCodec?: string | undefined; + audioCodec?: string | undefined; + audioChannels?: number | undefined; + transcodeHwRequested?: boolean | undefined; + timeStamp?: number | undefined; + maxOffsetAvailable?: number | undefined; + minOffsetAvailable?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + key: z.string().optional(), + throttled: z.boolean().optional(), + complete: z.boolean().optional(), + progress: z.number().optional(), + size: z.number().optional(), + speed: z.number().optional(), + error: z.boolean().optional(), + duration: z.number().optional(), + context: z.string().optional(), + sourceVideoCodec: z.string().optional(), + sourceAudioCodec: z.string().optional(), + videoDecision: z.string().optional(), + audioDecision: z.string().optional(), + protocol: z.string().optional(), + container: z.string().optional(), + videoCodec: z.string().optional(), + audioCodec: z.string().optional(), + audioChannels: z.number().optional(), + transcodeHwRequested: z.boolean().optional(), + timeStamp: z.number().optional(), + maxOffsetAvailable: z.number().optional(), + minOffsetAvailable: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.key === undefined ? null : { key: v.key }), + ...(v.throttled === undefined ? null : { throttled: v.throttled }), + ...(v.complete === undefined ? null : { complete: v.complete }), + ...(v.progress === undefined ? null : { progress: v.progress }), + ...(v.size === undefined ? null : { size: v.size }), + ...(v.speed === undefined ? null : { speed: v.speed }), + ...(v.error === undefined ? null : { error: v.error }), + ...(v.duration === undefined ? null : { duration: v.duration }), + ...(v.context === undefined ? null : { context: v.context }), + ...(v.sourceVideoCodec === undefined + ? null + : { sourceVideoCodec: v.sourceVideoCodec }), + ...(v.sourceAudioCodec === undefined + ? null + : { sourceAudioCodec: v.sourceAudioCodec }), + ...(v.videoDecision === undefined ? null : { videoDecision: v.videoDecision }), + ...(v.audioDecision === undefined ? null : { audioDecision: v.audioDecision }), + ...(v.protocol === undefined ? null : { protocol: v.protocol }), + ...(v.container === undefined ? null : { container: v.container }), + ...(v.videoCodec === undefined ? null : { videoCodec: v.videoCodec }), + ...(v.audioCodec === undefined ? null : { audioCodec: v.audioCodec }), + ...(v.audioChannels === undefined ? null : { audioChannels: v.audioChannels }), + ...(v.transcodeHwRequested === undefined + ? null + : { transcodeHwRequested: v.transcodeHwRequested }), + ...(v.timeStamp === undefined ? null : { timeStamp: v.timeStamp }), + ...(v.maxOffsetAvailable === undefined + ? null + : { maxOffsetAvailable: v.maxOffsetAvailable }), + ...(v.minOffsetAvailable === undefined + ? null + : { minOffsetAvailable: v.minOffsetAvailable }), + }; + }); + + export type Outbound = { + key?: string | undefined; + throttled?: boolean | undefined; + complete?: boolean | undefined; + progress?: number | undefined; + size?: number | undefined; + speed?: number | undefined; + error?: boolean | undefined; + duration?: number | undefined; + context?: string | undefined; + sourceVideoCodec?: string | undefined; + sourceAudioCodec?: string | undefined; + videoDecision?: string | undefined; + audioDecision?: string | undefined; + protocol?: string | undefined; + container?: string | undefined; + videoCodec?: string | undefined; + audioCodec?: string | undefined; + audioChannels?: number | undefined; + transcodeHwRequested?: boolean | undefined; + timeStamp?: number | undefined; + maxOffsetAvailable?: number | undefined; + minOffsetAvailable?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + key: z.string().optional(), + throttled: z.boolean().optional(), + complete: z.boolean().optional(), + progress: z.number().optional(), + size: z.number().optional(), + speed: z.number().optional(), + error: z.boolean().optional(), + duration: z.number().optional(), + context: z.string().optional(), + sourceVideoCodec: z.string().optional(), + sourceAudioCodec: z.string().optional(), + videoDecision: z.string().optional(), + audioDecision: z.string().optional(), + protocol: z.string().optional(), + container: z.string().optional(), + videoCodec: z.string().optional(), + audioCodec: z.string().optional(), + audioChannels: z.number().optional(), + transcodeHwRequested: z.boolean().optional(), + timeStamp: z.number().optional(), + maxOffsetAvailable: z.number().optional(), + minOffsetAvailable: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.key === undefined ? null : { key: v.key }), + ...(v.throttled === undefined ? null : { throttled: v.throttled }), + ...(v.complete === undefined ? null : { complete: v.complete }), + ...(v.progress === undefined ? null : { progress: v.progress }), + ...(v.size === undefined ? null : { size: v.size }), + ...(v.speed === undefined ? null : { speed: v.speed }), + ...(v.error === undefined ? null : { error: v.error }), + ...(v.duration === undefined ? null : { duration: v.duration }), + ...(v.context === undefined ? null : { context: v.context }), + ...(v.sourceVideoCodec === undefined + ? null + : { sourceVideoCodec: v.sourceVideoCodec }), + ...(v.sourceAudioCodec === undefined + ? null + : { sourceAudioCodec: v.sourceAudioCodec }), + ...(v.videoDecision === undefined ? null : { videoDecision: v.videoDecision }), + ...(v.audioDecision === undefined ? null : { audioDecision: v.audioDecision }), + ...(v.protocol === undefined ? null : { protocol: v.protocol }), + ...(v.container === undefined ? null : { container: v.container }), + ...(v.videoCodec === undefined ? null : { videoCodec: v.videoCodec }), + ...(v.audioCodec === undefined ? null : { audioCodec: v.audioCodec }), + ...(v.audioChannels === undefined ? null : { audioChannels: v.audioChannels }), + ...(v.transcodeHwRequested === undefined + ? null + : { transcodeHwRequested: v.transcodeHwRequested }), + ...(v.timeStamp === undefined ? null : { timeStamp: v.timeStamp }), + ...(v.maxOffsetAvailable === undefined + ? null + : { maxOffsetAvailable: v.maxOffsetAvailable }), + ...(v.minOffsetAvailable === undefined + ? null + : { minOffsetAvailable: v.minOffsetAvailable }), + }; + }); +} + +/** @internal */ +export namespace GetTranscodeSessionsMediaContainer$ { + export type Inbound = { + size?: number | undefined; + TranscodeSession?: Array | undefined; + }; + + export const inboundSchema: z.ZodType< + GetTranscodeSessionsMediaContainer, + z.ZodTypeDef, + Inbound + > = z + .object({ + size: z.number().optional(), + TranscodeSession: z.array(z.lazy(() => TranscodeSession$.inboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.size === undefined ? null : { size: v.size }), + ...(v.TranscodeSession === undefined + ? null + : { transcodeSession: v.TranscodeSession }), + }; + }); + + export type Outbound = { + size?: number | undefined; + TranscodeSession?: Array | undefined; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + GetTranscodeSessionsMediaContainer + > = z + .object({ + size: z.number().optional(), + transcodeSession: z.array(z.lazy(() => TranscodeSession$.outboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.size === undefined ? null : { size: v.size }), + ...(v.transcodeSession === undefined + ? null + : { TranscodeSession: v.transcodeSession }), + }; + }); +} + +/** @internal */ +export namespace GetTranscodeSessionsResponseBody$ { + export type Inbound = { + MediaContainer?: GetTranscodeSessionsMediaContainer$.Inbound | undefined; + }; + + export const inboundSchema: z.ZodType = + z + .object({ + MediaContainer: z + .lazy(() => GetTranscodeSessionsMediaContainer$.inboundSchema) + .optional(), + }) + .transform((v) => { + return { + ...(v.MediaContainer === undefined + ? null + : { mediaContainer: v.MediaContainer }), + }; + }); + + export type Outbound = { + MediaContainer?: GetTranscodeSessionsMediaContainer$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + GetTranscodeSessionsResponseBody + > = z + .object({ + mediaContainer: z + .lazy(() => GetTranscodeSessionsMediaContainer$.outboundSchema) + .optional(), + }) + .transform((v) => { + return { + ...(v.mediaContainer === undefined ? null : { MediaContainer: v.mediaContainer }), + }; + }); +} + +/** @internal */ +export namespace GetTranscodeSessionsResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + object?: GetTranscodeSessionsResponseBody$.Inbound | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetTranscodeSessionsResponseBody$.inboundSchema).optional(), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + ...(v.object === undefined ? null : { object: v.object }), + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetTranscodeSessionsResponseBody$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetTranscodeSessionsResponseBody$.outboundSchema).optional(), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + ...(v.object === undefined ? null : { object: v.object }), + }; + }); +} diff --git a/src/models/operations/gettransienttoken.ts b/src/models/operations/gettransienttoken.ts new file mode 100644 index 00000000..f3c4705b --- /dev/null +++ b/src/models/operations/gettransienttoken.ts @@ -0,0 +1,133 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +/** + * `delegation` - This is the only supported `type` parameter. + */ +export enum QueryParamType { + Delegation = "delegation", +} + +/** + * `all` - This is the only supported `scope` parameter. + */ +export enum Scope { + All = "all", +} + +export type GetTransientTokenRequest = { + /** + * `delegation` - This is the only supported `type` parameter. + */ + type: QueryParamType; + /** + * `all` - This is the only supported `scope` parameter. + */ + scope: Scope; +}; + +export type GetTransientTokenResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export const QueryParamType$ = z.nativeEnum(QueryParamType); + +/** @internal */ +export const Scope$ = z.nativeEnum(Scope); + +/** @internal */ +export namespace GetTransientTokenRequest$ { + export type Inbound = { + type: QueryParamType; + scope: Scope; + }; + + export const inboundSchema: z.ZodType = z + .object({ + type: QueryParamType$, + scope: Scope$, + }) + .transform((v) => { + return { + type: v.type, + scope: v.scope, + }; + }); + + export type Outbound = { + type: QueryParamType; + scope: Scope; + }; + + export const outboundSchema: z.ZodType = z + .object({ + type: QueryParamType$, + scope: Scope$, + }) + .transform((v) => { + return { + type: v.type, + scope: v.scope, + }; + }); +} + +/** @internal */ +export namespace GetTransientTokenResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/getupdatestatus.ts b/src/models/operations/getupdatestatus.ts new file mode 100644 index 00000000..28d2b265 --- /dev/null +++ b/src/models/operations/getupdatestatus.ts @@ -0,0 +1,65 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type GetUpdateStatusResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace GetUpdateStatusResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/index.ts b/src/models/operations/index.ts new file mode 100644 index 00000000..032a26ed --- /dev/null +++ b/src/models/operations/index.ts @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +export * from "./addplaylistcontents"; +export * from "./applyupdates"; +export * from "./cancelserveractivities"; +export * from "./checkforupdates"; +export * from "./clearplaylistcontents"; +export * from "./createplaylist"; +export * from "./deletelibrary"; +export * from "./deleteplaylist"; +export * from "./enablepapertrail"; +export * from "./getavailableclients"; +export * from "./getbutlertasks"; +export * from "./getcommonlibraryitems"; +export * from "./getdevices"; +export * from "./getfilehash"; +export * from "./getglobalhubs"; +export * from "./getlatestlibraryitems"; +export * from "./getlibraries"; +export * from "./getlibrary"; +export * from "./getlibraryhubs"; +export * from "./getlibraryitems"; +export * from "./getmetadata"; +export * from "./getmetadatachildren"; +export * from "./getmyplexaccount"; +export * from "./getondeck"; +export * from "./getplaylist"; +export * from "./getplaylistcontents"; +export * from "./getplaylists"; +export * from "./getrecentlyadded"; +export * from "./getresizedphoto"; +export * from "./getsearchresults"; +export * from "./getserveractivities"; +export * from "./getservercapabilities"; +export * from "./getserveridentity"; +export * from "./getserverlist"; +export * from "./getserverpreferences"; +export * from "./getsessionhistory"; +export * from "./getsessions"; +export * from "./getsourceconnectioninformation"; +export * from "./gettimeline"; +export * from "./gettranscodesessions"; +export * from "./gettransienttoken"; +export * from "./getupdatestatus"; +export * from "./logline"; +export * from "./logmultiline"; +export * from "./markplayed"; +export * from "./markunplayed"; +export * from "./performsearch"; +export * from "./performvoicesearch"; +export * from "./refreshlibrary"; +export * from "./startalltasks"; +export * from "./starttask"; +export * from "./startuniversaltranscode"; +export * from "./stopalltasks"; +export * from "./stoptask"; +export * from "./stoptranscodesession"; +export * from "./updateplaylist"; +export * from "./updateplayprogress"; +export * from "./uploadplaylist"; diff --git a/src/models/operations/logline.ts b/src/models/operations/logline.ts new file mode 100644 index 00000000..28fa8e56 --- /dev/null +++ b/src/models/operations/logline.ts @@ -0,0 +1,153 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +/** + * An integer log level to write to the PMS log with. + * + * @remarks + * 0: Error + * 1: Warning + * 2: Info + * 3: Debug + * 4: Verbose + * + */ +export enum Level { + Zero = 0, + One = 1, + Two = 2, + Three = 3, + Four = 4, +} + +export type LogLineRequest = { + /** + * An integer log level to write to the PMS log with. + * + * @remarks + * 0: Error + * 1: Warning + * 2: Info + * 3: Debug + * 4: Verbose + * + */ + level: Level; + /** + * The text of the message to write to the log. + */ + message: string; + /** + * a string indicating the source of the message. + */ + source: string; +}; + +export type LogLineResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export const Level$ = z.nativeEnum(Level); + +/** @internal */ +export namespace LogLineRequest$ { + export type Inbound = { + level: Level; + message: string; + source: string; + }; + + export const inboundSchema: z.ZodType = z + .object({ + level: Level$, + message: z.string(), + source: z.string(), + }) + .transform((v) => { + return { + level: v.level, + message: v.message, + source: v.source, + }; + }); + + export type Outbound = { + level: Level; + message: string; + source: string; + }; + + export const outboundSchema: z.ZodType = z + .object({ + level: Level$, + message: z.string(), + source: z.string(), + }) + .transform((v) => { + return { + level: v.level, + message: v.message, + source: v.source, + }; + }); +} + +/** @internal */ +export namespace LogLineResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/logmultiline.ts b/src/models/operations/logmultiline.ts new file mode 100644 index 00000000..dbe092f5 --- /dev/null +++ b/src/models/operations/logmultiline.ts @@ -0,0 +1,65 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type LogMultiLineResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace LogMultiLineResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/markplayed.ts b/src/models/operations/markplayed.ts new file mode 100644 index 00000000..48aab69d --- /dev/null +++ b/src/models/operations/markplayed.ts @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type MarkPlayedRequest = { + /** + * The media key to mark as played + */ + key: number; +}; + +export type MarkPlayedResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace MarkPlayedRequest$ { + export type Inbound = { + key: number; + }; + + export const inboundSchema: z.ZodType = z + .object({ + key: z.number(), + }) + .transform((v) => { + return { + key: v.key, + }; + }); + + export type Outbound = { + key: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + key: z.number(), + }) + .transform((v) => { + return { + key: v.key, + }; + }); +} + +/** @internal */ +export namespace MarkPlayedResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/markunplayed.ts b/src/models/operations/markunplayed.ts new file mode 100644 index 00000000..2b3b06be --- /dev/null +++ b/src/models/operations/markunplayed.ts @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type MarkUnplayedRequest = { + /** + * The media key to mark as Unplayed + */ + key: number; +}; + +export type MarkUnplayedResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace MarkUnplayedRequest$ { + export type Inbound = { + key: number; + }; + + export const inboundSchema: z.ZodType = z + .object({ + key: z.number(), + }) + .transform((v) => { + return { + key: v.key, + }; + }); + + export type Outbound = { + key: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + key: z.number(), + }) + .transform((v) => { + return { + key: v.key, + }; + }); +} + +/** @internal */ +export namespace MarkUnplayedResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/performsearch.ts b/src/models/operations/performsearch.ts new file mode 100644 index 00000000..d2a23b11 --- /dev/null +++ b/src/models/operations/performsearch.ts @@ -0,0 +1,123 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type PerformSearchRequest = { + /** + * The query term + */ + query: string; + /** + * This gives context to the search, and can result in re-ordering of search result hubs + */ + sectionId?: number | undefined; + /** + * The number of items to return per hub + */ + limit?: number | undefined; +}; + +export type PerformSearchResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace PerformSearchRequest$ { + export type Inbound = { + query: string; + sectionId?: number | undefined; + limit?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + query: z.string(), + sectionId: z.number().optional(), + limit: z.number().optional(), + }) + .transform((v) => { + return { + query: v.query, + ...(v.sectionId === undefined ? null : { sectionId: v.sectionId }), + ...(v.limit === undefined ? null : { limit: v.limit }), + }; + }); + + export type Outbound = { + query: string; + sectionId?: number | undefined; + limit?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + query: z.string(), + sectionId: z.number().optional(), + limit: z.number().optional(), + }) + .transform((v) => { + return { + query: v.query, + ...(v.sectionId === undefined ? null : { sectionId: v.sectionId }), + ...(v.limit === undefined ? null : { limit: v.limit }), + }; + }); +} + +/** @internal */ +export namespace PerformSearchResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/performvoicesearch.ts b/src/models/operations/performvoicesearch.ts new file mode 100644 index 00000000..a0e91bcc --- /dev/null +++ b/src/models/operations/performvoicesearch.ts @@ -0,0 +1,123 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type PerformVoiceSearchRequest = { + /** + * The query term + */ + query: string; + /** + * This gives context to the search, and can result in re-ordering of search result hubs + */ + sectionId?: number | undefined; + /** + * The number of items to return per hub + */ + limit?: number | undefined; +}; + +export type PerformVoiceSearchResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace PerformVoiceSearchRequest$ { + export type Inbound = { + query: string; + sectionId?: number | undefined; + limit?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + query: z.string(), + sectionId: z.number().optional(), + limit: z.number().optional(), + }) + .transform((v) => { + return { + query: v.query, + ...(v.sectionId === undefined ? null : { sectionId: v.sectionId }), + ...(v.limit === undefined ? null : { limit: v.limit }), + }; + }); + + export type Outbound = { + query: string; + sectionId?: number | undefined; + limit?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + query: z.string(), + sectionId: z.number().optional(), + limit: z.number().optional(), + }) + .transform((v) => { + return { + query: v.query, + ...(v.sectionId === undefined ? null : { sectionId: v.sectionId }), + ...(v.limit === undefined ? null : { limit: v.limit }), + }; + }); +} + +/** @internal */ +export namespace PerformVoiceSearchResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/refreshlibrary.ts b/src/models/operations/refreshlibrary.ts new file mode 100644 index 00000000..f98290f7 --- /dev/null +++ b/src/models/operations/refreshlibrary.ts @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type RefreshLibraryRequest = { + /** + * the Id of the library to refresh + */ + sectionId: number; +}; + +export type RefreshLibraryResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace RefreshLibraryRequest$ { + export type Inbound = { + sectionId: number; + }; + + export const inboundSchema: z.ZodType = z + .object({ + sectionId: z.number(), + }) + .transform((v) => { + return { + sectionId: v.sectionId, + }; + }); + + export type Outbound = { + sectionId: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + sectionId: z.number(), + }) + .transform((v) => { + return { + sectionId: v.sectionId, + }; + }); +} + +/** @internal */ +export namespace RefreshLibraryResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/startalltasks.ts b/src/models/operations/startalltasks.ts new file mode 100644 index 00000000..f267caf6 --- /dev/null +++ b/src/models/operations/startalltasks.ts @@ -0,0 +1,65 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type StartAllTasksResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace StartAllTasksResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/starttask.ts b/src/models/operations/starttask.ts new file mode 100644 index 00000000..ceedaa89 --- /dev/null +++ b/src/models/operations/starttask.ts @@ -0,0 +1,126 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +/** + * the name of the task to be started. + */ +export enum TaskName { + BackupDatabase = "BackupDatabase", + BuildGracenoteCollections = "BuildGracenoteCollections", + CheckForUpdates = "CheckForUpdates", + CleanOldBundles = "CleanOldBundles", + CleanOldCacheFiles = "CleanOldCacheFiles", + DeepMediaAnalysis = "DeepMediaAnalysis", + GenerateAutoTags = "GenerateAutoTags", + GenerateChapterThumbs = "GenerateChapterThumbs", + GenerateMediaIndexFiles = "GenerateMediaIndexFiles", + OptimizeDatabase = "OptimizeDatabase", + RefreshLibraries = "RefreshLibraries", + RefreshLocalMedia = "RefreshLocalMedia", + RefreshPeriodicMetadata = "RefreshPeriodicMetadata", + UpgradeMediaAnalysis = "UpgradeMediaAnalysis", +} + +export type StartTaskRequest = { + /** + * the name of the task to be started. + */ + taskName: TaskName; +}; + +export type StartTaskResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export const TaskName$ = z.nativeEnum(TaskName); + +/** @internal */ +export namespace StartTaskRequest$ { + export type Inbound = { + taskName: TaskName; + }; + + export const inboundSchema: z.ZodType = z + .object({ + taskName: TaskName$, + }) + .transform((v) => { + return { + taskName: v.taskName, + }; + }); + + export type Outbound = { + taskName: TaskName; + }; + + export const outboundSchema: z.ZodType = z + .object({ + taskName: TaskName$, + }) + .transform((v) => { + return { + taskName: v.taskName, + }; + }); +} + +/** @internal */ +export namespace StartTaskResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/startuniversaltranscode.ts b/src/models/operations/startuniversaltranscode.ts new file mode 100644 index 00000000..8e256f74 --- /dev/null +++ b/src/models/operations/startuniversaltranscode.ts @@ -0,0 +1,271 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type StartUniversalTranscodeRequest = { + /** + * Whether the media item has MDE + */ + hasMDE: number; + /** + * The path to the media item to transcode + */ + path: string; + /** + * The index of the media item to transcode + */ + mediaIndex: number; + /** + * The index of the part to transcode + */ + partIndex: number; + /** + * The protocol to use for the transcode session + */ + protocol: string; + /** + * Whether to use fast seek or not + */ + fastSeek?: number | undefined; + /** + * Whether to use direct play or not + */ + directPlay?: number | undefined; + /** + * Whether to use direct stream or not + */ + directStream?: number | undefined; + /** + * The size of the subtitles + */ + subtitleSize?: number | undefined; + /** + * The subtitles + */ + subtites?: string | undefined; + /** + * The audio boost + */ + audioBoost?: number | undefined; + /** + * The location of the transcode session + */ + location?: string | undefined; + /** + * The size of the media buffer + */ + mediaBufferSize?: number | undefined; + /** + * The session ID + */ + session?: string | undefined; + /** + * Whether to add a debug overlay or not + */ + addDebugOverlay?: number | undefined; + /** + * Whether to auto adjust quality or not + */ + autoAdjustQuality?: number | undefined; +}; + +export type StartUniversalTranscodeResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace StartUniversalTranscodeRequest$ { + export type Inbound = { + hasMDE: number; + path: string; + mediaIndex: number; + partIndex: number; + protocol: string; + fastSeek?: number | undefined; + directPlay?: number | undefined; + directStream?: number | undefined; + subtitleSize?: number | undefined; + subtites?: string | undefined; + audioBoost?: number | undefined; + location?: string | undefined; + mediaBufferSize?: number | undefined; + session?: string | undefined; + addDebugOverlay?: number | undefined; + autoAdjustQuality?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + hasMDE: z.number(), + path: z.string(), + mediaIndex: z.number(), + partIndex: z.number(), + protocol: z.string(), + fastSeek: z.number().optional(), + directPlay: z.number().optional(), + directStream: z.number().optional(), + subtitleSize: z.number().optional(), + subtites: z.string().optional(), + audioBoost: z.number().optional(), + location: z.string().optional(), + mediaBufferSize: z.number().optional(), + session: z.string().optional(), + addDebugOverlay: z.number().optional(), + autoAdjustQuality: z.number().optional(), + }) + .transform((v) => { + return { + hasMDE: v.hasMDE, + path: v.path, + mediaIndex: v.mediaIndex, + partIndex: v.partIndex, + protocol: v.protocol, + ...(v.fastSeek === undefined ? null : { fastSeek: v.fastSeek }), + ...(v.directPlay === undefined ? null : { directPlay: v.directPlay }), + ...(v.directStream === undefined ? null : { directStream: v.directStream }), + ...(v.subtitleSize === undefined ? null : { subtitleSize: v.subtitleSize }), + ...(v.subtites === undefined ? null : { subtites: v.subtites }), + ...(v.audioBoost === undefined ? null : { audioBoost: v.audioBoost }), + ...(v.location === undefined ? null : { location: v.location }), + ...(v.mediaBufferSize === undefined + ? null + : { mediaBufferSize: v.mediaBufferSize }), + ...(v.session === undefined ? null : { session: v.session }), + ...(v.addDebugOverlay === undefined + ? null + : { addDebugOverlay: v.addDebugOverlay }), + ...(v.autoAdjustQuality === undefined + ? null + : { autoAdjustQuality: v.autoAdjustQuality }), + }; + }); + + export type Outbound = { + hasMDE: number; + path: string; + mediaIndex: number; + partIndex: number; + protocol: string; + fastSeek?: number | undefined; + directPlay?: number | undefined; + directStream?: number | undefined; + subtitleSize?: number | undefined; + subtites?: string | undefined; + audioBoost?: number | undefined; + location?: string | undefined; + mediaBufferSize?: number | undefined; + session?: string | undefined; + addDebugOverlay?: number | undefined; + autoAdjustQuality?: number | undefined; + }; + + export const outboundSchema: z.ZodType = + z + .object({ + hasMDE: z.number(), + path: z.string(), + mediaIndex: z.number(), + partIndex: z.number(), + protocol: z.string(), + fastSeek: z.number().optional(), + directPlay: z.number().optional(), + directStream: z.number().optional(), + subtitleSize: z.number().optional(), + subtites: z.string().optional(), + audioBoost: z.number().optional(), + location: z.string().optional(), + mediaBufferSize: z.number().optional(), + session: z.string().optional(), + addDebugOverlay: z.number().optional(), + autoAdjustQuality: z.number().optional(), + }) + .transform((v) => { + return { + hasMDE: v.hasMDE, + path: v.path, + mediaIndex: v.mediaIndex, + partIndex: v.partIndex, + protocol: v.protocol, + ...(v.fastSeek === undefined ? null : { fastSeek: v.fastSeek }), + ...(v.directPlay === undefined ? null : { directPlay: v.directPlay }), + ...(v.directStream === undefined ? null : { directStream: v.directStream }), + ...(v.subtitleSize === undefined ? null : { subtitleSize: v.subtitleSize }), + ...(v.subtites === undefined ? null : { subtites: v.subtites }), + ...(v.audioBoost === undefined ? null : { audioBoost: v.audioBoost }), + ...(v.location === undefined ? null : { location: v.location }), + ...(v.mediaBufferSize === undefined + ? null + : { mediaBufferSize: v.mediaBufferSize }), + ...(v.session === undefined ? null : { session: v.session }), + ...(v.addDebugOverlay === undefined + ? null + : { addDebugOverlay: v.addDebugOverlay }), + ...(v.autoAdjustQuality === undefined + ? null + : { autoAdjustQuality: v.autoAdjustQuality }), + }; + }); +} + +/** @internal */ +export namespace StartUniversalTranscodeResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = + z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + StartUniversalTranscodeResponse + > = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/stopalltasks.ts b/src/models/operations/stopalltasks.ts new file mode 100644 index 00000000..dac55f3e --- /dev/null +++ b/src/models/operations/stopalltasks.ts @@ -0,0 +1,65 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type StopAllTasksResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace StopAllTasksResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/stoptask.ts b/src/models/operations/stoptask.ts new file mode 100644 index 00000000..ce458b08 --- /dev/null +++ b/src/models/operations/stoptask.ts @@ -0,0 +1,126 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +/** + * The name of the task to be started. + */ +export enum PathParamTaskName { + BackupDatabase = "BackupDatabase", + BuildGracenoteCollections = "BuildGracenoteCollections", + CheckForUpdates = "CheckForUpdates", + CleanOldBundles = "CleanOldBundles", + CleanOldCacheFiles = "CleanOldCacheFiles", + DeepMediaAnalysis = "DeepMediaAnalysis", + GenerateAutoTags = "GenerateAutoTags", + GenerateChapterThumbs = "GenerateChapterThumbs", + GenerateMediaIndexFiles = "GenerateMediaIndexFiles", + OptimizeDatabase = "OptimizeDatabase", + RefreshLibraries = "RefreshLibraries", + RefreshLocalMedia = "RefreshLocalMedia", + RefreshPeriodicMetadata = "RefreshPeriodicMetadata", + UpgradeMediaAnalysis = "UpgradeMediaAnalysis", +} + +export type StopTaskRequest = { + /** + * The name of the task to be started. + */ + taskName: PathParamTaskName; +}; + +export type StopTaskResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export const PathParamTaskName$ = z.nativeEnum(PathParamTaskName); + +/** @internal */ +export namespace StopTaskRequest$ { + export type Inbound = { + taskName: PathParamTaskName; + }; + + export const inboundSchema: z.ZodType = z + .object({ + taskName: PathParamTaskName$, + }) + .transform((v) => { + return { + taskName: v.taskName, + }; + }); + + export type Outbound = { + taskName: PathParamTaskName; + }; + + export const outboundSchema: z.ZodType = z + .object({ + taskName: PathParamTaskName$, + }) + .transform((v) => { + return { + taskName: v.taskName, + }; + }); +} + +/** @internal */ +export namespace StopTaskResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/stoptranscodesession.ts b/src/models/operations/stoptranscodesession.ts new file mode 100644 index 00000000..40538404 --- /dev/null +++ b/src/models/operations/stoptranscodesession.ts @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type StopTranscodeSessionRequest = { + /** + * the Key of the transcode session to stop + */ + sessionKey: string; +}; + +export type StopTranscodeSessionResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace StopTranscodeSessionRequest$ { + export type Inbound = { + sessionKey: string; + }; + + export const inboundSchema: z.ZodType = z + .object({ + sessionKey: z.string(), + }) + .transform((v) => { + return { + sessionKey: v.sessionKey, + }; + }); + + export type Outbound = { + sessionKey: string; + }; + + export const outboundSchema: z.ZodType = z + .object({ + sessionKey: z.string(), + }) + .transform((v) => { + return { + sessionKey: v.sessionKey, + }; + }); +} + +/** @internal */ +export namespace StopTranscodeSessionResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/updateplaylist.ts b/src/models/operations/updateplaylist.ts new file mode 100644 index 00000000..1e5aba43 --- /dev/null +++ b/src/models/operations/updateplaylist.ts @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type UpdatePlaylistRequest = { + /** + * the ID of the playlist + */ + playlistID: number; +}; + +export type UpdatePlaylistResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace UpdatePlaylistRequest$ { + export type Inbound = { + playlistID: number; + }; + + export const inboundSchema: z.ZodType = z + .object({ + playlistID: z.number(), + }) + .transform((v) => { + return { + playlistID: v.playlistID, + }; + }); + + export type Outbound = { + playlistID: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + playlistID: z.number(), + }) + .transform((v) => { + return { + playlistID: v.playlistID, + }; + }); +} + +/** @internal */ +export namespace UpdatePlaylistResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/updateplayprogress.ts b/src/models/operations/updateplayprogress.ts new file mode 100644 index 00000000..9340c0a1 --- /dev/null +++ b/src/models/operations/updateplayprogress.ts @@ -0,0 +1,123 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +export type UpdatePlayProgressRequest = { + /** + * the media key + */ + key: string; + /** + * The time, in milliseconds, used to set the media playback progress. + */ + time: number; + /** + * The playback state of the media item. + */ + state: string; +}; + +export type UpdatePlayProgressResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace UpdatePlayProgressRequest$ { + export type Inbound = { + key: string; + time: number; + state: string; + }; + + export const inboundSchema: z.ZodType = z + .object({ + key: z.string(), + time: z.number(), + state: z.string(), + }) + .transform((v) => { + return { + key: v.key, + time: v.time, + state: v.state, + }; + }); + + export type Outbound = { + key: string; + time: number; + state: string; + }; + + export const outboundSchema: z.ZodType = z + .object({ + key: z.string(), + time: z.number(), + state: z.string(), + }) + .transform((v) => { + return { + key: v.key, + time: v.time, + state: v.state, + }; + }); +} + +/** @internal */ +export namespace UpdatePlayProgressResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/models/operations/uploadplaylist.ts b/src/models/operations/uploadplaylist.ts new file mode 100644 index 00000000..3608077e --- /dev/null +++ b/src/models/operations/uploadplaylist.ts @@ -0,0 +1,140 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { z } from "zod"; + +/** + * force overwriting of duplicate playlists. By default, a playlist file uploaded with the same path will overwrite the existing playlist. + * + * @remarks + * 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. + * + */ +export enum Force { + Zero = 0, + One = 1, +} + +export type UploadPlaylistRequest = { + /** + * absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. + * + * @remarks + * 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. + * + */ + path: string; + /** + * force overwriting of duplicate playlists. By default, a playlist file uploaded with the same path will overwrite the existing playlist. + * + * @remarks + * 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. + * + */ + force: Force; +}; + +export type UploadPlaylistResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export const Force$ = z.nativeEnum(Force); + +/** @internal */ +export namespace UploadPlaylistRequest$ { + export type Inbound = { + path: string; + force: Force; + }; + + export const inboundSchema: z.ZodType = z + .object({ + path: z.string(), + force: Force$, + }) + .transform((v) => { + return { + path: v.path, + force: v.force, + }; + }); + + export type Outbound = { + path: string; + force: Force; + }; + + export const outboundSchema: z.ZodType = z + .object({ + path: z.string(), + force: Force$, + }) + .transform((v) => { + return { + path: v.path, + force: v.force, + }; + }); +} + +/** @internal */ +export namespace UploadPlaylistResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/sdk/activities.ts b/src/sdk/activities.ts new file mode 100644 index 00000000..502d65d2 --- /dev/null +++ b/src/sdk/activities.ts @@ -0,0 +1,152 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config"; +import * as enc$ from "../lib/encodings"; +import { HTTPClient } from "../lib/http"; +import { ClientSDK, RequestOptions } from "../lib/sdks"; +import * as errors from "../models/errors"; +import * as operations from "../models/operations"; + +export class Activities extends ClientSDK { + private readonly options$: SDKOptions; + + constructor(options: SDKOptions = {}) { + super({ + client: options.httpClient || new HTTPClient(), + baseURL: serverURLFromOptions(options), + }); + + this.options$ = options; + void this.options$; + } + /** + * Get Server Activities + * + * @remarks + * Get Server Activities + */ + async getServerActivities( + options?: RequestOptions + ): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const path$ = this.templateURLComponent("/activities")(); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { security: securitySettings$, method: "get", path: path$, headers: headers$ }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = operations.GetServerActivitiesResponse$.inboundSchema.parse({ + ...responseFields$, + object: responseBody, + }); + return result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetServerActivitiesResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } + + /** + * Cancel Server Activities + * + * @remarks + * Cancel Server Activities + */ + async cancelServerActivities( + activityUUID: string, + options?: RequestOptions + ): Promise { + const input$: operations.CancelServerActivitiesRequest = { + activityUUID: activityUUID, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.CancelServerActivitiesRequest$.outboundSchema.parse(input$); + const body$ = null; + + const pathParams$ = { + activityUUID: enc$.encodeSimple("activityUUID", payload$.activityUUID, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = this.templateURLComponent("/activities/{activityUUID}")(pathParams$); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "delete", + path: path$, + headers: headers$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.CancelServerActivitiesResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.CancelServerActivitiesResponse$.inboundSchema.parse(responseFields$); + } +} diff --git a/src/sdk/butler.ts b/src/sdk/butler.ts new file mode 100644 index 00000000..02ceb7f5 --- /dev/null +++ b/src/sdk/butler.ts @@ -0,0 +1,337 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config"; +import * as enc$ from "../lib/encodings"; +import { HTTPClient } from "../lib/http"; +import { ClientSDK, RequestOptions } from "../lib/sdks"; +import * as errors from "../models/errors"; +import * as operations from "../models/operations"; + +export class Butler extends ClientSDK { + private readonly options$: SDKOptions; + + constructor(options: SDKOptions = {}) { + super({ + client: options.httpClient || new HTTPClient(), + baseURL: serverURLFromOptions(options), + }); + + this.options$ = options; + void this.options$; + } + /** + * Get Butler tasks + * + * @remarks + * Returns a list of butler tasks + */ + async getButlerTasks(options?: RequestOptions): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const path$ = this.templateURLComponent("/butler")(); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { security: securitySettings$, method: "get", path: path$, headers: headers$ }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = operations.GetButlerTasksResponse$.inboundSchema.parse({ + ...responseFields$, + object: responseBody, + }); + return result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetButlerTasksResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } + + /** + * Start all Butler tasks + * + * @remarks + * This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: + * 1. Any tasks not scheduled to run on the current day will be skipped. + * 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. + * 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. + * 4. If we are outside the configured window, the task will start immediately. + * + */ + async startAllTasks(options?: RequestOptions): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const path$ = this.templateURLComponent("/butler")(); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { security: securitySettings$, method: "post", path: path$, headers: headers$ }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.StartAllTasksResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.StartAllTasksResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Stop all Butler tasks + * + * @remarks + * This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue. + * + */ + async stopAllTasks(options?: RequestOptions): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const path$ = this.templateURLComponent("/butler")(); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { security: securitySettings$, method: "delete", path: path$, headers: headers$ }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.StopAllTasksResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.StopAllTasksResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Start a single Butler task + * + * @remarks + * This endpoint will attempt to start a single Butler task that is enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: + * 1. Any tasks not scheduled to run on the current day will be skipped. + * 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. + * 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. + * 4. If we are outside the configured window, the task will start immediately. + * + */ + async startTask( + taskName: operations.TaskName, + options?: RequestOptions + ): Promise { + const input$: operations.StartTaskRequest = { + taskName: taskName, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.StartTaskRequest$.outboundSchema.parse(input$); + const body$ = null; + + const pathParams$ = { + taskName: enc$.encodeSimple("taskName", payload$.taskName, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = this.templateURLComponent("/butler/{taskName}")(pathParams$); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "post", + path: path$, + headers: headers$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, [200, 202])) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.StartTaskResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.StartTaskResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Stop a single Butler task + * + * @remarks + * 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, + options?: RequestOptions + ): Promise { + const input$: operations.StopTaskRequest = { + taskName: taskName, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.StopTaskRequest$.outboundSchema.parse(input$); + const body$ = null; + + const pathParams$ = { + taskName: enc$.encodeSimple("taskName", payload$.taskName, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = this.templateURLComponent("/butler/{taskName}")(pathParams$); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "delete", + path: path$, + headers: headers$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.StopTaskResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.StopTaskResponse$.inboundSchema.parse(responseFields$); + } +} diff --git a/src/sdk/hubs.ts b/src/sdk/hubs.ts new file mode 100644 index 00000000..26fc1121 --- /dev/null +++ b/src/sdk/hubs.ts @@ -0,0 +1,191 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config"; +import * as enc$ from "../lib/encodings"; +import { HTTPClient } from "../lib/http"; +import { ClientSDK, RequestOptions } from "../lib/sdks"; +import * as errors from "../models/errors"; +import * as operations from "../models/operations"; + +export class Hubs extends ClientSDK { + private readonly options$: SDKOptions; + + constructor(options: SDKOptions = {}) { + super({ + client: options.httpClient || new HTTPClient(), + baseURL: serverURLFromOptions(options), + }); + + this.options$ = options; + void this.options$; + } + /** + * Get Global Hubs + * + * @remarks + * Get Global Hubs filtered by the parameters provided. + */ + async getGlobalHubs( + count?: number | undefined, + onlyTransient?: operations.OnlyTransient | undefined, + options?: RequestOptions + ): Promise { + const input$: operations.GetGlobalHubsRequest = { + count: count, + onlyTransient: onlyTransient, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.GetGlobalHubsRequest$.outboundSchema.parse(input$); + const body$ = null; + + const path$ = this.templateURLComponent("/hubs")(); + + const query$ = [ + enc$.encodeForm("count", payload$.count, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("onlyTransient", payload$.onlyTransient, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "get", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetGlobalHubsResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.GetGlobalHubsResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Get library specific hubs + * + * @remarks + * This endpoint will return a list of library specific hubs + * + */ + async getLibraryHubs( + sectionId: number, + count?: number | undefined, + onlyTransient?: operations.QueryParamOnlyTransient | undefined, + options?: RequestOptions + ): Promise { + const input$: operations.GetLibraryHubsRequest = { + sectionId: sectionId, + count: count, + onlyTransient: onlyTransient, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.GetLibraryHubsRequest$.outboundSchema.parse(input$); + const body$ = null; + + const pathParams$ = { + sectionId: enc$.encodeSimple("sectionId", payload$.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = this.templateURLComponent("/hubs/sections/{sectionId}")(pathParams$); + + const query$ = [ + enc$.encodeForm("count", payload$.count, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("onlyTransient", payload$.onlyTransient, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "get", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetLibraryHubsResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.GetLibraryHubsResponse$.inboundSchema.parse(responseFields$); + } +} diff --git a/src/sdk/index.ts b/src/sdk/index.ts new file mode 100644 index 00000000..31303148 --- /dev/null +++ b/src/sdk/index.ts @@ -0,0 +1,5 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +export * from "./sdk"; diff --git a/src/sdk/library.ts b/src/sdk/library.ts new file mode 100644 index 00000000..82af7040 --- /dev/null +++ b/src/sdk/library.ts @@ -0,0 +1,931 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config"; +import * as enc$ from "../lib/encodings"; +import { HTTPClient } from "../lib/http"; +import { ClientSDK, RequestOptions } from "../lib/sdks"; +import * as errors from "../models/errors"; +import * as operations from "../models/operations"; + +export class Library extends ClientSDK { + private readonly options$: SDKOptions; + + constructor(options: SDKOptions = {}) { + super({ + client: options.httpClient || new HTTPClient(), + baseURL: serverURLFromOptions(options), + }); + + this.options$ = options; + void this.options$; + } + /** + * Get Hash Value + * + * @remarks + * This resource returns hash values for local files + */ + async getFileHash( + url: string, + type?: number | undefined, + options?: RequestOptions + ): Promise { + const input$: operations.GetFileHashRequest = { + url: url, + type: type, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.GetFileHashRequest$.outboundSchema.parse(input$); + const body$ = null; + + const path$ = this.templateURLComponent("/library/hashes")(); + + const query$ = [ + enc$.encodeForm("type", payload$.type, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "get", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetFileHashResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.GetFileHashResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Get Recently Added + * + * @remarks + * This endpoint will return the recently added content. + * + */ + async getRecentlyAdded(options?: RequestOptions): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const path$ = this.templateURLComponent("/library/recentlyAdded")(); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { security: securitySettings$, method: "get", path: path$, headers: headers$ }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = operations.GetRecentlyAddedResponse$.inboundSchema.parse({ + ...responseFields$, + object: responseBody, + }); + return result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetRecentlyAddedResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } + + /** + * Get All Libraries + * + * @remarks + * A library section (commonly referred to as just a library) is a collection of media. + * Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. + * For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat. + * + * Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts. + * This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year). + * + */ + async getLibraries(options?: RequestOptions): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const path$ = this.templateURLComponent("/library/sections")(); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { security: securitySettings$, method: "get", path: path$, headers: headers$ }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetLibrariesResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.GetLibrariesResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Get Library Details + * + * @remarks + * Returns details for the library. This can be thought of as an interstitial endpoint because it contains information about the library, rather than content itself. These details are: + * + * - A list of `Directory` objects: These used to be used by clients to build a menuing system. There are four flavors of directory found here: + * - Primary: (e.g. all, On Deck) These are still used in some clients to provide "shortcuts" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users. + * - Secondary: These are marked with `secondary="1"` and were used by old clients to provide nested menus allowing for primative (but structured) navigation. + * - Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there's a completely obsolete entry marked `search="1"` which used to be used to allow clients to build search dialogs on the fly. + * - A list of `Type` objects: These represent the types of things found in this library, and for each one, a list of `Filter` and `Sort` objects. These can be used to build rich controls around a grid of media to allow filtering and organizing. Note that these filters and sorts are optional, and without them, the client won't render any filtering controls. The `Type` object contains: + * - `key`: This provides the root endpoint returning the actual media list for the type. + * - `type`: This is the metadata type for the type (if a standard Plex type). + * - `title`: The title for for the content of this type (e.g. "Movies"). + * - Each `Filter` object contains a description of the filter. Note that it is not an exhaustive list of the full media query language, but an inportant subset useful for top-level API. + * - `filter`: This represents the filter name used for the filter, which can be used to construct complex media queries with. + * - `filterType`: This is either `string`, `integer`, or `boolean`, and describes the type of values used for the filter. + * - `key`: This provides the endpoint where the possible range of values for the filter can be retrieved (e.g. for a "Genre" filter, it returns a list of all the genres in the library). This will include a `type` argument that matches the metadata type of the Type element. + * - `title`: The title for the filter. + * - Each `Sort` object contains a description of the sort field. + * - `defaultDirection`: Can be either `asc` or `desc`, and specifies the default direction for the sort field (e.g. titles default to alphabetically ascending). + * - `descKey` and `key`: Contains the parameters passed to the `sort=...` media query for each direction of the sort. + * - `title`: The title of the field. + * + */ + async getLibrary( + sectionId: number, + includeDetails?: operations.IncludeDetails | undefined, + options?: RequestOptions + ): Promise { + const input$: operations.GetLibraryRequest = { + sectionId: sectionId, + includeDetails: includeDetails, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.GetLibraryRequest$.outboundSchema.parse(input$); + const body$ = null; + + const pathParams$ = { + sectionId: enc$.encodeSimple("sectionId", payload$.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = this.templateURLComponent("/library/sections/{sectionId}")(pathParams$); + + const query$ = [ + enc$.encodeForm("includeDetails", payload$.includeDetails, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "get", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetLibraryResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.GetLibraryResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Delete Library Section + * + * @remarks + * Delate a library using a specific section + */ + async deleteLibrary( + sectionId: number, + options?: RequestOptions + ): Promise { + const input$: operations.DeleteLibraryRequest = { + sectionId: sectionId, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.DeleteLibraryRequest$.outboundSchema.parse(input$); + const body$ = null; + + const pathParams$ = { + sectionId: enc$.encodeSimple("sectionId", payload$.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = this.templateURLComponent("/library/sections/{sectionId}")(pathParams$); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "delete", + path: path$, + headers: headers$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.DeleteLibraryResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.DeleteLibraryResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Get Library Items + * + * @remarks + * This endpoint will return a list of library items filtered by the filter and type provided + * + */ + async getLibraryItems( + sectionId: number, + type?: number | undefined, + filter?: string | undefined, + options?: RequestOptions + ): Promise { + const input$: operations.GetLibraryItemsRequest = { + sectionId: sectionId, + type: type, + filter: filter, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.GetLibraryItemsRequest$.outboundSchema.parse(input$); + const body$ = null; + + const pathParams$ = { + sectionId: enc$.encodeSimple("sectionId", payload$.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = this.templateURLComponent("/library/sections/{sectionId}/all")(pathParams$); + + const query$ = [ + enc$.encodeForm("filter", payload$.filter, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("type", payload$.type, { explode: true, charEncoding: "percent" }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "get", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetLibraryItemsResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.GetLibraryItemsResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Refresh Library + * + * @remarks + * This endpoint Refreshes the library. + * + */ + async refreshLibrary( + sectionId: number, + options?: RequestOptions + ): Promise { + const input$: operations.RefreshLibraryRequest = { + sectionId: sectionId, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.RefreshLibraryRequest$.outboundSchema.parse(input$); + const body$ = null; + + const pathParams$ = { + sectionId: enc$.encodeSimple("sectionId", payload$.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = this.templateURLComponent("/library/sections/{sectionId}/refresh")( + pathParams$ + ); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "get", + path: path$, + headers: headers$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.RefreshLibraryResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.RefreshLibraryResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Get Latest Library Items + * + * @remarks + * This endpoint will return a list of the latest library items filtered by the filter and type provided + * + */ + async getLatestLibraryItems( + sectionId: number, + type: number, + filter?: string | undefined, + options?: RequestOptions + ): Promise { + const input$: operations.GetLatestLibraryItemsRequest = { + sectionId: sectionId, + type: type, + filter: filter, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.GetLatestLibraryItemsRequest$.outboundSchema.parse(input$); + const body$ = null; + + const pathParams$ = { + sectionId: enc$.encodeSimple("sectionId", payload$.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = this.templateURLComponent("/library/sections/{sectionId}/latest")( + pathParams$ + ); + + const query$ = [ + enc$.encodeForm("filter", payload$.filter, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("type", payload$.type, { explode: true, charEncoding: "percent" }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "get", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetLatestLibraryItemsResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.GetLatestLibraryItemsResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Get Common Library Items + * + * @remarks + * Represents a "Common" item. It contains only the common attributes of the items selected by the provided filter + * + */ + async getCommonLibraryItems( + sectionId: number, + type: number, + filter?: string | undefined, + options?: RequestOptions + ): Promise { + const input$: operations.GetCommonLibraryItemsRequest = { + sectionId: sectionId, + type: type, + filter: filter, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.GetCommonLibraryItemsRequest$.outboundSchema.parse(input$); + const body$ = null; + + const pathParams$ = { + sectionId: enc$.encodeSimple("sectionId", payload$.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = this.templateURLComponent("/library/sections/{sectionId}/common")( + pathParams$ + ); + + const query$ = [ + enc$.encodeForm("filter", payload$.filter, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("type", payload$.type, { explode: true, charEncoding: "percent" }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "get", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetCommonLibraryItemsResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.GetCommonLibraryItemsResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Get Items Metadata + * + * @remarks + * This endpoint will return the metadata of a library item specified with the ratingKey. + * + */ + async getMetadata( + ratingKey: number, + options?: RequestOptions + ): Promise { + const input$: operations.GetMetadataRequest = { + ratingKey: ratingKey, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.GetMetadataRequest$.outboundSchema.parse(input$); + const body$ = null; + + const pathParams$ = { + ratingKey: enc$.encodeSimple("ratingKey", payload$.ratingKey, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = this.templateURLComponent("/library/metadata/{ratingKey}")(pathParams$); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "get", + path: path$, + headers: headers$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetMetadataResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.GetMetadataResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Get Items Children + * + * @remarks + * This endpoint will return the children of of a library item specified with the ratingKey. + * + */ + async getMetadataChildren( + ratingKey: number, + options?: RequestOptions + ): Promise { + const input$: operations.GetMetadataChildrenRequest = { + ratingKey: ratingKey, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.GetMetadataChildrenRequest$.outboundSchema.parse(input$); + const body$ = null; + + const pathParams$ = { + ratingKey: enc$.encodeSimple("ratingKey", payload$.ratingKey, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = this.templateURLComponent("/library/metadata/{ratingKey}/children")( + pathParams$ + ); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "get", + path: path$, + headers: headers$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetMetadataChildrenResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.GetMetadataChildrenResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Get On Deck + * + * @remarks + * This endpoint will return the on deck content. + * + */ + async getOnDeck(options?: RequestOptions): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const path$ = this.templateURLComponent("/library/onDeck")(); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { security: securitySettings$, method: "get", path: path$, headers: headers$ }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = operations.GetOnDeckResponse$.inboundSchema.parse({ + ...responseFields$, + object: responseBody, + }); + return result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetOnDeckResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } +} diff --git a/src/sdk/log.ts b/src/sdk/log.ts new file mode 100644 index 00000000..9dfc1d3b --- /dev/null +++ b/src/sdk/log.ts @@ -0,0 +1,210 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config"; +import * as enc$ from "../lib/encodings"; +import { HTTPClient } from "../lib/http"; +import { ClientSDK, RequestOptions } from "../lib/sdks"; +import * as errors from "../models/errors"; +import * as operations from "../models/operations"; + +export class Log extends ClientSDK { + private readonly options$: SDKOptions; + + constructor(options: SDKOptions = {}) { + super({ + client: options.httpClient || new HTTPClient(), + baseURL: serverURLFromOptions(options), + }); + + this.options$ = options; + void this.options$; + } + /** + * Logging a single line message. + * + * @remarks + * 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, + message: string, + source: string, + options?: RequestOptions + ): Promise { + const input$: operations.LogLineRequest = { + level: level, + message: message, + source: source, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.LogLineRequest$.outboundSchema.parse(input$); + const body$ = null; + + const path$ = this.templateURLComponent("/log")(); + + const query$ = [ + enc$.encodeForm("level", payload$.level, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("message", payload$.message, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("source", payload$.source, { explode: true, charEncoding: "percent" }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "get", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.LogLineResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.LogLineResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Logging a multi-line message + * + * @remarks + * This endpoint will write multiple lines to the main Plex Media Server log in a single request. It takes a set of query strings as would normally sent to the above GET endpoint as a linefeed-separated block of POST data. The parameters for each query string match as above. + * + */ + async logMultiLine(options?: RequestOptions): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const path$ = this.templateURLComponent("/log")(); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { security: securitySettings$, method: "post", path: path$, headers: headers$ }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.LogMultiLineResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.LogMultiLineResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Enabling Papertrail + * + * @remarks + * This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time. + * + */ + async enablePaperTrail(options?: RequestOptions): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const path$ = this.templateURLComponent("/log/networked")(); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { security: securitySettings$, method: "get", path: path$, headers: headers$ }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.EnablePaperTrailResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.EnablePaperTrailResponse$.inboundSchema.parse(responseFields$); + } +} diff --git a/src/sdk/media.ts b/src/sdk/media.ts new file mode 100644 index 00000000..6c6f7d33 --- /dev/null +++ b/src/sdk/media.ts @@ -0,0 +1,249 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config"; +import * as enc$ from "../lib/encodings"; +import { HTTPClient } from "../lib/http"; +import { ClientSDK, RequestOptions } from "../lib/sdks"; +import * as errors from "../models/errors"; +import * as operations from "../models/operations"; + +export class Media extends ClientSDK { + private readonly options$: SDKOptions; + + constructor(options: SDKOptions = {}) { + super({ + client: options.httpClient || new HTTPClient(), + baseURL: serverURLFromOptions(options), + }); + + this.options$ = options; + void this.options$; + } + /** + * Mark Media Played + * + * @remarks + * This will mark the provided media key as Played. + */ + async markPlayed( + key: number, + options?: RequestOptions + ): Promise { + const input$: operations.MarkPlayedRequest = { + key: key, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.MarkPlayedRequest$.outboundSchema.parse(input$); + const body$ = null; + + const path$ = this.templateURLComponent("/:/scrobble")(); + + const query$ = [ + enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "get", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.MarkPlayedResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.MarkPlayedResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Mark Media Unplayed + * + * @remarks + * This will mark the provided media key as Unplayed. + */ + async markUnplayed( + key: number, + options?: RequestOptions + ): Promise { + const input$: operations.MarkUnplayedRequest = { + key: key, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.MarkUnplayedRequest$.outboundSchema.parse(input$); + const body$ = null; + + const path$ = this.templateURLComponent("/:/unscrobble")(); + + const query$ = [ + enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "get", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.MarkUnplayedResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.MarkUnplayedResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Update Media Play Progress + * + * @remarks + * This API command can be used to update the play progress of a media item. + * + */ + async updatePlayProgress( + key: string, + time: number, + state: string, + options?: RequestOptions + ): Promise { + const input$: operations.UpdatePlayProgressRequest = { + key: key, + time: time, + state: state, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.UpdatePlayProgressRequest$.outboundSchema.parse(input$); + const body$ = null; + + const path$ = this.templateURLComponent("/:/progress")(); + + const query$ = [ + enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("state", payload$.state, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("time", payload$.time, { explode: true, charEncoding: "percent" }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "post", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.UpdatePlayProgressResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.UpdatePlayProgressResponse$.inboundSchema.parse(responseFields$); + } +} diff --git a/src/sdk/playlists.ts b/src/sdk/playlists.ts new file mode 100644 index 00000000..3d05ee7c --- /dev/null +++ b/src/sdk/playlists.ts @@ -0,0 +1,732 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config"; +import * as enc$ from "../lib/encodings"; +import { HTTPClient } from "../lib/http"; +import { ClientSDK, RequestOptions } from "../lib/sdks"; +import * as errors from "../models/errors"; +import * as operations from "../models/operations"; + +export class Playlists extends ClientSDK { + private readonly options$: SDKOptions; + + constructor(options: SDKOptions = {}) { + super({ + client: options.httpClient || new HTTPClient(), + baseURL: serverURLFromOptions(options), + }); + + this.options$ = options; + void this.options$; + } + /** + * Create a Playlist + * + * @remarks + * Create a new playlist. By default the playlist is blank. To create a playlist along with a first item, pass: + * - `uri` - The content URI for what we're playing (e.g. `library://...`). + * - `playQueueID` - To create a playlist from an existing play queue. + * + */ + async createPlaylist( + input: operations.CreatePlaylistRequest, + options?: RequestOptions + ): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.CreatePlaylistRequest$.outboundSchema.parse(input); + const body$ = null; + + const path$ = this.templateURLComponent("/playlists")(); + + const query$ = [ + enc$.encodeForm("playQueueID", payload$.playQueueID, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("smart", payload$.smart, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("title", payload$.title, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("type", payload$.type, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("uri", payload$.uri, { explode: true, charEncoding: "percent" }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "post", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.CreatePlaylistResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.CreatePlaylistResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Get All Playlists + * + * @remarks + * Get All Playlists given the specified filters. + */ + async getPlaylists( + playlistType?: operations.PlaylistType | undefined, + smart?: operations.QueryParamSmart | undefined, + options?: RequestOptions + ): Promise { + const input$: operations.GetPlaylistsRequest = { + playlistType: playlistType, + smart: smart, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.GetPlaylistsRequest$.outboundSchema.parse(input$); + const body$ = null; + + const path$ = this.templateURLComponent("/playlists/all")(); + + const query$ = [ + enc$.encodeForm("playlistType", payload$.playlistType, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("smart", payload$.smart, { explode: true, charEncoding: "percent" }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "get", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetPlaylistsResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.GetPlaylistsResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Retrieve Playlist + * + * @remarks + * Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item: + * Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing. + * + */ + async getPlaylist( + playlistID: number, + options?: RequestOptions + ): Promise { + const input$: operations.GetPlaylistRequest = { + playlistID: playlistID, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.GetPlaylistRequest$.outboundSchema.parse(input$); + const body$ = null; + + const pathParams$ = { + playlistID: enc$.encodeSimple("playlistID", payload$.playlistID, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = this.templateURLComponent("/playlists/{playlistID}")(pathParams$); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "get", + path: path$, + headers: headers$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetPlaylistResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.GetPlaylistResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Deletes a Playlist + * + * @remarks + * This endpoint will delete a playlist + * + */ + async deletePlaylist( + playlistID: number, + options?: RequestOptions + ): Promise { + const input$: operations.DeletePlaylistRequest = { + playlistID: playlistID, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.DeletePlaylistRequest$.outboundSchema.parse(input$); + const body$ = null; + + const pathParams$ = { + playlistID: enc$.encodeSimple("playlistID", payload$.playlistID, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = this.templateURLComponent("/playlists/{playlistID}")(pathParams$); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "delete", + path: path$, + headers: headers$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.DeletePlaylistResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.DeletePlaylistResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Update a Playlist + * + * @remarks + * From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}` + * + */ + async updatePlaylist( + playlistID: number, + options?: RequestOptions + ): Promise { + const input$: operations.UpdatePlaylistRequest = { + playlistID: playlistID, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.UpdatePlaylistRequest$.outboundSchema.parse(input$); + const body$ = null; + + const pathParams$ = { + playlistID: enc$.encodeSimple("playlistID", payload$.playlistID, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = this.templateURLComponent("/playlists/{playlistID}")(pathParams$); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "put", + path: path$, + headers: headers$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.UpdatePlaylistResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.UpdatePlaylistResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Retrieve Playlist Contents + * + * @remarks + * Gets the contents of a playlist. Should be paged by clients via standard mechanisms. + * By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter. + * For example, you could use this to display a list of recently added albums vis a smart playlist. + * Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items. + * + */ + async getPlaylistContents( + playlistID: number, + type: number, + options?: RequestOptions + ): Promise { + const input$: operations.GetPlaylistContentsRequest = { + playlistID: playlistID, + type: type, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.GetPlaylistContentsRequest$.outboundSchema.parse(input$); + const body$ = null; + + const pathParams$ = { + playlistID: enc$.encodeSimple("playlistID", payload$.playlistID, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = this.templateURLComponent("/playlists/{playlistID}/items")(pathParams$); + + const query$ = [ + enc$.encodeForm("type", payload$.type, { explode: true, charEncoding: "percent" }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "get", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetPlaylistContentsResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.GetPlaylistContentsResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Delete Playlist Contents + * + * @remarks + * Clears a playlist, only works with dumb playlists. Returns the playlist. + * + */ + async clearPlaylistContents( + playlistID: number, + options?: RequestOptions + ): Promise { + const input$: operations.ClearPlaylistContentsRequest = { + playlistID: playlistID, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.ClearPlaylistContentsRequest$.outboundSchema.parse(input$); + const body$ = null; + + const pathParams$ = { + playlistID: enc$.encodeSimple("playlistID", payload$.playlistID, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = this.templateURLComponent("/playlists/{playlistID}/items")(pathParams$); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "delete", + path: path$, + headers: headers$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.ClearPlaylistContentsResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.ClearPlaylistContentsResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Adding to a Playlist + * + * @remarks + * Adds a generator to a playlist, same parameters as the POST above. With a dumb playlist, this adds the specified items to the playlist. + * With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist. + * + */ + async addPlaylistContents( + playlistID: number, + uri: string, + playQueueID: number, + options?: RequestOptions + ): Promise { + const input$: operations.AddPlaylistContentsRequest = { + playlistID: playlistID, + uri: uri, + playQueueID: playQueueID, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.AddPlaylistContentsRequest$.outboundSchema.parse(input$); + const body$ = null; + + const pathParams$ = { + playlistID: enc$.encodeSimple("playlistID", payload$.playlistID, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = this.templateURLComponent("/playlists/{playlistID}/items")(pathParams$); + + const query$ = [ + enc$.encodeForm("playQueueID", payload$.playQueueID, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("uri", payload$.uri, { explode: true, charEncoding: "percent" }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "put", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.AddPlaylistContentsResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.AddPlaylistContentsResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Upload Playlist + * + * @remarks + * Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file. + * + */ + async uploadPlaylist( + path: string, + force: operations.Force, + options?: RequestOptions + ): Promise { + const input$: operations.UploadPlaylistRequest = { + path: path, + force: force, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.UploadPlaylistRequest$.outboundSchema.parse(input$); + const body$ = null; + + const path$ = this.templateURLComponent("/playlists/upload")(); + + const query$ = [ + enc$.encodeForm("force", payload$.force, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("path", payload$.path, { explode: true, charEncoding: "percent" }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "post", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.UploadPlaylistResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.UploadPlaylistResponse$.inboundSchema.parse(responseFields$); + } +} diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts new file mode 100644 index 00000000..acf82bda --- /dev/null +++ b/src/sdk/sdk.ts @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { SDKOptions, serverURLFromOptions } from "../lib/config"; +import { HTTPClient } from "../lib/http"; +import { ClientSDK } from "../lib/sdks"; +import { Activities } from "./activities"; +import { Butler } from "./butler"; +import { Hubs } from "./hubs"; +import { Library } from "./library"; +import { Log } from "./log"; +import { Media } from "./media"; +import { Playlists } from "./playlists"; +import { Search } from "./search"; +import { Security } from "./security"; +import { Server } from "./server"; +import { Sessions } from "./sessions"; +import { Updater } from "./updater"; +import { Video } from "./video"; + +export class SDK extends ClientSDK { + private readonly options$: SDKOptions; + + constructor(options: SDKOptions = {}) { + super({ + client: options.httpClient || new HTTPClient(), + baseURL: serverURLFromOptions(options), + }); + + this.options$ = options; + void this.options$; + } + + private _server?: Server; + get server() { + return (this._server ??= new Server(this.options$)); + } + + private _media?: Media; + get media() { + return (this._media ??= new Media(this.options$)); + } + + private _activities?: Activities; + get activities() { + return (this._activities ??= new Activities(this.options$)); + } + + private _butler?: Butler; + get butler() { + return (this._butler ??= new Butler(this.options$)); + } + + private _hubs?: Hubs; + get hubs() { + return (this._hubs ??= new Hubs(this.options$)); + } + + private _search?: Search; + get search() { + return (this._search ??= new Search(this.options$)); + } + + private _library?: Library; + get library() { + return (this._library ??= new Library(this.options$)); + } + + private _log?: Log; + get log() { + return (this._log ??= new Log(this.options$)); + } + + private _playlists?: Playlists; + get playlists() { + return (this._playlists ??= new Playlists(this.options$)); + } + + private _security?: Security; + get security() { + return (this._security ??= new Security(this.options$)); + } + + private _sessions?: Sessions; + get sessions() { + return (this._sessions ??= new Sessions(this.options$)); + } + + private _updater?: Updater; + get updater() { + return (this._updater ??= new Updater(this.options$)); + } + + private _video?: Video; + get video() { + return (this._video ??= new Video(this.options$)); + } +} diff --git a/src/sdk/search.ts b/src/sdk/search.ts new file mode 100644 index 00000000..a9140824 --- /dev/null +++ b/src/sdk/search.ts @@ -0,0 +1,279 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config"; +import * as enc$ from "../lib/encodings"; +import { HTTPClient } from "../lib/http"; +import { ClientSDK, RequestOptions } from "../lib/sdks"; +import * as errors from "../models/errors"; +import * as operations from "../models/operations"; + +export class Search extends ClientSDK { + private readonly options$: SDKOptions; + + constructor(options: SDKOptions = {}) { + super({ + client: options.httpClient || new HTTPClient(), + baseURL: serverURLFromOptions(options), + }); + + this.options$ = options; + void this.options$; + } + /** + * Perform a search + * + * @remarks + * This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor). + * + * In the response's items, the following extra attributes are returned to further describe or disambiguate the result: + * + * - `reason`: The reason for the result, if not because of a direct search term match; can be either: + * - `section`: There are multiple identical results from different sections. + * - `originalTitle`: There was a search term match from the original title field (sometimes those can be very different or in a foreign language). + * - ``: If the reason for the result is due to a result in another hub, the source hub identifier is returned. For example, if the search is for "dylan" then Bob Dylan may be returned as an artist result, an a few of his albums returned as album results with a reason code of `artist` (the identifier of that particular hub). Or if the search is for "arnold", there might be movie results returned with a reason of `actor` + * - `reasonTitle`: The string associated with the reason code. For a section reason, it'll be the section name; For a hub identifier, it'll be a string associated with the match (e.g. `Arnold Schwarzenegger` for movies which were returned because the search was for "arnold"). + * - `reasonID`: The ID of the item associated with the reason for the result. This might be a section ID, a tag ID, an artist ID, or a show ID. + * + * This request is intended to be very fast, and called as the user types. + * + */ + async performSearch( + query: string, + sectionId?: number | undefined, + limit?: number | undefined, + options?: RequestOptions + ): Promise { + const input$: operations.PerformSearchRequest = { + query: query, + sectionId: sectionId, + limit: limit, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.PerformSearchRequest$.outboundSchema.parse(input$); + const body$ = null; + + const path$ = this.templateURLComponent("/hubs/search")(); + + const query$ = [ + enc$.encodeForm("limit", payload$.limit, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("query", payload$.query, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("sectionId", payload$.sectionId, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "get", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.PerformSearchResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.PerformSearchResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Perform a voice search + * + * @remarks + * This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint. + * It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint. + * Whenever possible, clients should limit the search to the appropriate type. + * Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality. + * + */ + async performVoiceSearch( + query: string, + sectionId?: number | undefined, + limit?: number | undefined, + options?: RequestOptions + ): Promise { + const input$: operations.PerformVoiceSearchRequest = { + query: query, + sectionId: sectionId, + limit: limit, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.PerformVoiceSearchRequest$.outboundSchema.parse(input$); + const body$ = null; + + const path$ = this.templateURLComponent("/hubs/search/voice")(); + + const query$ = [ + enc$.encodeForm("limit", payload$.limit, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("query", payload$.query, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("sectionId", payload$.sectionId, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "get", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.PerformVoiceSearchResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.PerformVoiceSearchResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Get Search Results + * + * @remarks + * This will search the database for the string provided. + */ + async getSearchResults( + query: string, + options?: RequestOptions + ): Promise { + const input$: operations.GetSearchResultsRequest = { + query: query, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.GetSearchResultsRequest$.outboundSchema.parse(input$); + const body$ = null; + + const path$ = this.templateURLComponent("/search")(); + + const query$ = [ + enc$.encodeForm("query", payload$.query, { explode: true, charEncoding: "percent" }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "get", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = operations.GetSearchResultsResponse$.inboundSchema.parse({ + ...responseFields$, + object: responseBody, + }); + return result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetSearchResultsResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } +} diff --git a/src/sdk/security.ts b/src/sdk/security.ts new file mode 100644 index 00000000..d0ed37ea --- /dev/null +++ b/src/sdk/security.ts @@ -0,0 +1,178 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config"; +import * as enc$ from "../lib/encodings"; +import { HTTPClient } from "../lib/http"; +import { ClientSDK, RequestOptions } from "../lib/sdks"; +import * as errors from "../models/errors"; +import * as operations from "../models/operations"; + +export class Security extends ClientSDK { + private readonly options$: SDKOptions; + + constructor(options: SDKOptions = {}) { + super({ + client: options.httpClient || new HTTPClient(), + baseURL: serverURLFromOptions(options), + }); + + this.options$ = options; + void this.options$; + } + /** + * Get a Transient Token. + * + * @remarks + * This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted. + * + */ + async getTransientToken( + type: operations.QueryParamType, + scope: operations.Scope, + options?: RequestOptions + ): Promise { + const input$: operations.GetTransientTokenRequest = { + type: type, + scope: scope, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.GetTransientTokenRequest$.outboundSchema.parse(input$); + const body$ = null; + + const path$ = this.templateURLComponent("/security/token")(); + + const query$ = [ + enc$.encodeForm("scope", payload$.scope, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("type", payload$.type, { explode: true, charEncoding: "percent" }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "get", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetTransientTokenResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.GetTransientTokenResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Get Source Connection Information + * + * @remarks + * If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token. + * Note: requires Plex Media Server >= 1.15.4. + * + */ + async getSourceConnectionInformation( + source: string, + options?: RequestOptions + ): Promise { + const input$: operations.GetSourceConnectionInformationRequest = { + source: source, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = + operations.GetSourceConnectionInformationRequest$.outboundSchema.parse(input$); + const body$ = null; + + const path$ = this.templateURLComponent("/security/resources")(); + + const query$ = [ + enc$.encodeForm("source", payload$.source, { explode: true, charEncoding: "percent" }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "get", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetSourceConnectionInformationResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.GetSourceConnectionInformationResponse$.inboundSchema.parse( + responseFields$ + ); + } +} diff --git a/src/sdk/server.ts b/src/sdk/server.ts new file mode 100644 index 00000000..1efd2352 --- /dev/null +++ b/src/sdk/server.ts @@ -0,0 +1,492 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config"; +import * as enc$ from "../lib/encodings"; +import { HTTPClient } from "../lib/http"; +import { ClientSDK, RequestOptions } from "../lib/sdks"; +import * as errors from "../models/errors"; +import * as operations from "../models/operations"; + +export class Server extends ClientSDK { + private readonly options$: SDKOptions; + + constructor(options: SDKOptions = {}) { + super({ + client: options.httpClient || new HTTPClient(), + baseURL: serverURLFromOptions(options), + }); + + this.options$ = options; + void this.options$; + } + /** + * Server Capabilities + * + * @remarks + * Server Capabilities + */ + async getServerCapabilities( + options?: RequestOptions + ): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const path$ = this.templateURLComponent("/")(); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { security: securitySettings$, method: "get", path: path$, headers: headers$ }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = operations.GetServerCapabilitiesResponse$.inboundSchema.parse({ + ...responseFields$, + object: responseBody, + }); + return result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetServerCapabilitiesResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } + + /** + * Get Server Preferences + * + * @remarks + * Get Server Preferences + */ + async getServerPreferences( + options?: RequestOptions + ): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const path$ = this.templateURLComponent("/:/prefs")(); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { security: securitySettings$, method: "get", path: path$, headers: headers$ }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetServerPreferencesResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.GetServerPreferencesResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Get Available Clients + * + * @remarks + * Get Available Clients + */ + async getAvailableClients( + options?: RequestOptions + ): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const path$ = this.templateURLComponent("/clients")(); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { security: securitySettings$, method: "get", path: path$, headers: headers$ }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = operations.GetAvailableClientsResponse$.inboundSchema.parse({ + ...responseFields$, + responseBodies: responseBody, + }); + return result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetAvailableClientsResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } + + /** + * Get Devices + * + * @remarks + * Get Devices + */ + async getDevices(options?: RequestOptions): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const path$ = this.templateURLComponent("/devices")(); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { security: securitySettings$, method: "get", path: path$, headers: headers$ }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = operations.GetDevicesResponse$.inboundSchema.parse({ + ...responseFields$, + object: responseBody, + }); + return result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetDevicesResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } + + /** + * Get Server Identity + * + * @remarks + * Get Server Identity + */ + async getServerIdentity( + options?: RequestOptions + ): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const path$ = this.templateURLComponent("/identity")(); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { security: securitySettings$, method: "get", path: path$, headers: headers$ }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = operations.GetServerIdentityResponse$.inboundSchema.parse({ + ...responseFields$, + object: responseBody, + }); + return result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetServerIdentityResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } + + /** + * Get MyPlex Account + * + * @remarks + * Returns MyPlex Account Information + */ + async getMyPlexAccount(options?: RequestOptions): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const path$ = this.templateURLComponent("/myplex/account")(); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { security: securitySettings$, method: "get", path: path$, headers: headers$ }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = operations.GetMyPlexAccountResponse$.inboundSchema.parse({ + ...responseFields$, + object: responseBody, + }); + return result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetMyPlexAccountResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } + + /** + * Get a Resized Photo + * + * @remarks + * Plex's Photo transcoder is used throughout the service to serve images at specified sizes. + * + */ + async getResizedPhoto( + input: operations.GetResizedPhotoRequest, + options?: RequestOptions + ): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.GetResizedPhotoRequest$.outboundSchema.parse(input); + const body$ = null; + + const path$ = this.templateURLComponent("/photo/:/transcode")(); + + const query$ = [ + enc$.encodeForm("blur", payload$.blur, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("height", payload$.height, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("minSize", payload$.minSize, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("opacity", payload$.opacity, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("upscale", payload$.upscale, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("width", payload$.width, { explode: true, charEncoding: "percent" }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "get", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetResizedPhotoResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.GetResizedPhotoResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Get Server List + * + * @remarks + * Get Server List + */ + async getServerList(options?: RequestOptions): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const path$ = this.templateURLComponent("/servers")(); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { security: securitySettings$, method: "get", path: path$, headers: headers$ }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = operations.GetServerListResponse$.inboundSchema.parse({ + ...responseFields$, + object: responseBody, + }); + return result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetServerListResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } +} diff --git a/src/sdk/sessions.ts b/src/sdk/sessions.ts new file mode 100644 index 00000000..4ccfcc66 --- /dev/null +++ b/src/sdk/sessions.ts @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config"; +import * as enc$ from "../lib/encodings"; +import { HTTPClient } from "../lib/http"; +import { ClientSDK, RequestOptions } from "../lib/sdks"; +import * as errors from "../models/errors"; +import * as operations from "../models/operations"; + +export class Sessions extends ClientSDK { + private readonly options$: SDKOptions; + + constructor(options: SDKOptions = {}) { + super({ + client: options.httpClient || new HTTPClient(), + baseURL: serverURLFromOptions(options), + }); + + this.options$ = options; + void this.options$; + } + /** + * Get Active Sessions + * + * @remarks + * This will retrieve the "Now Playing" Information of the PMS. + */ + async getSessions(options?: RequestOptions): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const path$ = this.templateURLComponent("/status/sessions")(); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { security: securitySettings$, method: "get", path: path$, headers: headers$ }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetSessionsResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.GetSessionsResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Get Session History + * + * @remarks + * This will Retrieve a listing of all history views. + */ + async getSessionHistory( + options?: RequestOptions + ): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const path$ = this.templateURLComponent("/status/sessions/history/all")(); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { security: securitySettings$, method: "get", path: path$, headers: headers$ }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetSessionHistoryResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.GetSessionHistoryResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Get Transcode Sessions + * + * @remarks + * Get Transcode Sessions + */ + async getTranscodeSessions( + options?: RequestOptions + ): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const path$ = this.templateURLComponent("/transcode/sessions")(); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { security: securitySettings$, method: "get", path: path$, headers: headers$ }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = operations.GetTranscodeSessionsResponse$.inboundSchema.parse({ + ...responseFields$, + object: responseBody, + }); + return result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetTranscodeSessionsResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } + + /** + * Stop a Transcode Session + * + * @remarks + * Stop a Transcode Session + */ + async stopTranscodeSession( + sessionKey: string, + options?: RequestOptions + ): Promise { + const input$: operations.StopTranscodeSessionRequest = { + sessionKey: sessionKey, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.StopTranscodeSessionRequest$.outboundSchema.parse(input$); + const body$ = null; + + const pathParams$ = { + sessionKey: enc$.encodeSimple("sessionKey", payload$.sessionKey, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = this.templateURLComponent("/transcode/sessions/{sessionKey}")(pathParams$); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "delete", + path: path$, + headers: headers$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.StopTranscodeSessionResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.StopTranscodeSessionResponse$.inboundSchema.parse(responseFields$); + } +} diff --git a/src/sdk/updater.ts b/src/sdk/updater.ts new file mode 100644 index 00000000..40495840 --- /dev/null +++ b/src/sdk/updater.ts @@ -0,0 +1,230 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config"; +import * as enc$ from "../lib/encodings"; +import { HTTPClient } from "../lib/http"; +import { ClientSDK, RequestOptions } from "../lib/sdks"; +import * as errors from "../models/errors"; +import * as operations from "../models/operations"; + +export class Updater extends ClientSDK { + private readonly options$: SDKOptions; + + constructor(options: SDKOptions = {}) { + super({ + client: options.httpClient || new HTTPClient(), + baseURL: serverURLFromOptions(options), + }); + + this.options$ = options; + void this.options$; + } + /** + * Querying status of updates + * + * @remarks + * Querying status of updates + */ + async getUpdateStatus(options?: RequestOptions): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const path$ = this.templateURLComponent("/updater/status")(); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { security: securitySettings$, method: "get", path: path$, headers: headers$ }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetUpdateStatusResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.GetUpdateStatusResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Checking for updates + * + * @remarks + * Checking for updates + */ + async checkForUpdates( + download?: operations.Download | undefined, + options?: RequestOptions + ): Promise { + const input$: operations.CheckForUpdatesRequest = { + download: download, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.CheckForUpdatesRequest$.outboundSchema.parse(input$); + const body$ = null; + + const path$ = this.templateURLComponent("/updater/check")(); + + const query$ = [ + enc$.encodeForm("download", payload$.download, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "put", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.CheckForUpdatesResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.CheckForUpdatesResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Apply Updates + * + * @remarks + * Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed + * + */ + async applyUpdates( + tonight?: operations.Tonight | undefined, + skip?: operations.Skip | undefined, + options?: RequestOptions + ): Promise { + const input$: operations.ApplyUpdatesRequest = { + tonight: tonight, + skip: skip, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.ApplyUpdatesRequest$.outboundSchema.parse(input$); + const body$ = null; + + const path$ = this.templateURLComponent("/updater/apply")(); + + const query$ = [ + enc$.encodeForm("skip", payload$.skip, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("tonight", payload$.tonight, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "put", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.ApplyUpdatesResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.ApplyUpdatesResponse$.inboundSchema.parse(responseFields$); + } +} diff --git a/src/sdk/video.ts b/src/sdk/video.ts new file mode 100644 index 00000000..bb8c9ec7 --- /dev/null +++ b/src/sdk/video.ts @@ -0,0 +1,244 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config"; +import * as enc$ from "../lib/encodings"; +import { HTTPClient } from "../lib/http"; +import { ClientSDK, RequestOptions } from "../lib/sdks"; +import * as errors from "../models/errors"; +import * as operations from "../models/operations"; + +export class Video extends ClientSDK { + private readonly options$: SDKOptions; + + constructor(options: SDKOptions = {}) { + super({ + client: options.httpClient || new HTTPClient(), + baseURL: serverURLFromOptions(options), + }); + + this.options$ = options; + void this.options$; + } + /** + * Start Universal Transcode + * + * @remarks + * Begin a Universal Transcode Session + */ + async startUniversalTranscode( + input: operations.StartUniversalTranscodeRequest, + options?: RequestOptions + ): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.StartUniversalTranscodeRequest$.outboundSchema.parse(input); + const body$ = null; + + const path$ = this.templateURLComponent("/video/:/transcode/universal/start.mpd")(); + + const query$ = [ + enc$.encodeForm("addDebugOverlay", payload$.addDebugOverlay, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("audioBoost", payload$.audioBoost, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("autoAdjustQuality", payload$.autoAdjustQuality, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("directPlay", payload$.directPlay, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("directStream", payload$.directStream, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("fastSeek", payload$.fastSeek, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("hasMDE", payload$.hasMDE, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("location", payload$.location, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("mediaBufferSize", payload$.mediaBufferSize, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("mediaIndex", payload$.mediaIndex, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("partIndex", payload$.partIndex, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("path", payload$.path, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("protocol", payload$.protocol, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("session", payload$.session, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("subtites", payload$.subtites, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("subtitleSize", payload$.subtitleSize, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "get", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.StartUniversalTranscodeResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.StartUniversalTranscodeResponse$.inboundSchema.parse(responseFields$); + } + + /** + * Get the timeline for a media item + * + * @remarks + * Get the timeline for a media item + */ + async getTimeline( + input: operations.GetTimelineRequest, + options?: RequestOptions + ): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = operations.GetTimelineRequest$.outboundSchema.parse(input); + const body$ = null; + + const path$ = this.templateURLComponent("/:/timeline")(); + + const query$ = [ + enc$.encodeForm("context", payload$.context, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("duration", payload$.duration, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("hasMDE", payload$.hasMDE, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("playBackTime", payload$.playBackTime, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("playQueueItemID", payload$.playQueueItemID, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("ratingKey", payload$.ratingKey, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("row", payload$.row, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("state", payload$.state, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("time", payload$.time, { explode: true, charEncoding: "percent" }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.accessToken === "function") { + security$ = { accessToken: await this.options$.accessToken() }; + } else if (this.options$.accessToken) { + security$ = { accessToken: this.options$.accessToken }; + } else { + security$ = {}; + } + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const response = await this.fetch$( + { + security: securitySettings$, + method: "get", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + }; + + if (this.matchStatusCode(response, 200)) { + // fallthrough + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = errors.GetTimelineResponseBody$.inboundSchema.parse({ + ...responseFields$, + ...responseBody, + }); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + + return operations.GetTimelineResponse$.inboundSchema.parse(responseFields$); + } +} diff --git a/src/types/blobs.ts b/src/types/blobs.ts new file mode 100644 index 00000000..2c21e410 --- /dev/null +++ b/src/types/blobs.ts @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export const blobLikeSchema = z.custom(isBlobLike, { + message: "expected a Blob, File or Blob-like object", + fatal: true, +}); + +export function isBlobLike(val: unknown): val is Blob { + if (val instanceof Blob) { + return true; + } + + if (typeof val !== "object" || val == null || !(Symbol.toStringTag in val)) { + return false; + } + + const name = val[Symbol.toStringTag]; + if (typeof name !== "string") { + return false; + } + if (name !== "Blob" && name !== "File") { + return false; + } + + return "stream" in val && typeof val.stream === "function"; +} diff --git a/src/types/decimal.ts b/src/types/decimal.ts new file mode 100644 index 00000000..aeba085f --- /dev/null +++ b/src/types/decimal.ts @@ -0,0 +1,5 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +export * from "decimal.js"; diff --git a/src/types/index.ts b/src/types/index.ts new file mode 100644 index 00000000..b3a84de4 --- /dev/null +++ b/src/types/index.ts @@ -0,0 +1,8 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +export { Decimal } from "./decimal"; +export { RFCDate } from "./rfcdate"; +export { blobLikeSchema, isBlobLike } from "./blobs"; +export type { Paginated, Paginator } from "./operations"; diff --git a/src/types/operations.ts b/src/types/operations.ts new file mode 100644 index 00000000..2cfe4e42 --- /dev/null +++ b/src/types/operations.ts @@ -0,0 +1,6 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +export type Paginated = Result & { next: Paginator }; +export type Paginator = () => Promise> | null; diff --git a/src/types/rfcdate.ts b/src/types/rfcdate.ts new file mode 100644 index 00000000..c37d292b --- /dev/null +++ b/src/types/rfcdate.ts @@ -0,0 +1,54 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +const dateRE = /^\d{4}-\d{2}-\d{2}$/; + +export class RFCDate { + private serialized: string; + + /** + * Creates a new RFCDate instance using today's date. + */ + static today() { + return new RFCDate(new Date()); + } + + /** + * Creates a new RFCDate instance using the provided input. + * If a string is used then in must be in the format YYYY-MM-DD. + * + * @param date A Date object or a date string in YYYY-MM-DD format + * @example + * new RFCDate("2022-01-01") + * @example + * new RFCDate(new Date()) + */ + constructor(date: Date | string) { + if (typeof date === "string" && !dateRE.test(date)) { + throw new RangeError( + "RFCDate: date strings must be in the format YYYY-MM-DD: " + date, + ); + } + + const value = new Date(date); + if (isNaN(+value)) { + throw new RangeError("RFCDate: invalid date provided: " + date); + } + + this.serialized = value.toISOString().slice(0, "YYYY-MM-DD".length); + if (!dateRE.test(this.serialized)) { + throw new TypeError( + `RFCDate: failed to build valid date with given value: ${date} serialized to ${this.serialized}`, + ); + } + } + + toJSON(): string { + return this.toString(); + } + + toString(): string { + return this.serialized; + } +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..7a86d2d9 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,40 @@ +{ + "compilerOptions": { + "incremental": true, + "tsBuildInfoFile": ".tsbuildinfo", + "target": "ES2018", + "lib": ["ES2022", "DOM", "DOM.Iterable"], + + "module": "Node16", + "moduleResolution": "Node16", + + "allowJs": true, + + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "outDir": ".", + + + // https://github.com/tsconfig/bases/blob/a1bf7c0fa2e094b068ca3e1448ca2ece4157977e/bases/strictest.json + "strict": true, + "allowUnusedLabels": false, + "allowUnreachableCode": false, + "exactOptionalPropertyTypes": true, + "useUnknownInCatchVariables": true, + "noFallthroughCasesInSwitch": true, + "noImplicitOverride": true, + "noImplicitReturns": true, + "noPropertyAccessFromIndexSignature": true, + "noUncheckedIndexedAccess": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "isolatedModules": true, + "checkJs": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true + }, + "include": ["src"], + "exclude": ["node_modules"] +}