mirror of
https://github.com/LukeHagar/plexjs.git
synced 2025-12-06 12:37:46 +00:00
ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.193.0
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
/hooks
|
||||||
/models
|
/models
|
||||||
/models/errors
|
/models/errors
|
||||||
/types
|
/types
|
||||||
|
|||||||
@@ -1,29 +1,30 @@
|
|||||||
lockVersion: 2.0.0
|
lockVersion: 2.0.0
|
||||||
id: 16f22cbf-f23f-4419-8924-3a4b06381947
|
id: 16f22cbf-f23f-4419-8924-3a4b06381947
|
||||||
management:
|
management:
|
||||||
docChecksum: 099fc5bbb987ae7e391f7f07b4212860
|
docChecksum: 278d186496d83d5830ba4870f8cad39d
|
||||||
docVersion: 0.0.3
|
docVersion: 0.0.3
|
||||||
speakeasyVersion: internal
|
speakeasyVersion: internal
|
||||||
generationVersion: 2.249.1
|
generationVersion: 2.269.0
|
||||||
releaseVersion: 0.7.0
|
releaseVersion: 0.8.0
|
||||||
configChecksum: b3d1de88036ff1f77a38604e4ce3ffa1
|
configChecksum: ebb8bf50e4df7f6adf9363aaa49f8a39
|
||||||
repoURL: https://github.com/LukeHagar/plexjs.git
|
repoURL: https://github.com/LukeHagar/plexjs.git
|
||||||
repoSubDirectory: .
|
repoSubDirectory: .
|
||||||
installationURL: https://github.com/LukeHagar/plexjs
|
installationURL: https://github.com/LukeHagar/plexjs
|
||||||
published: true
|
published: true
|
||||||
features:
|
features:
|
||||||
typescript:
|
typescript:
|
||||||
constsAndDefaults: 0.1.1
|
constsAndDefaults: 0.1.3
|
||||||
core: 3.4.8
|
core: 3.5.1
|
||||||
flattening: 2.81.1
|
flattening: 2.81.1
|
||||||
globalSecurity: 2.82.2
|
globalSecurity: 2.82.2
|
||||||
globalServerURLs: 2.82.1
|
globalServerURLs: 2.82.3
|
||||||
methodServerURLs: 2.82.1
|
methodServerURLs: 2.82.1
|
||||||
nameOverrides: 2.81.1
|
nameOverrides: 2.81.1
|
||||||
unions: 2.85.1
|
responseFormat: 0.1.0
|
||||||
generatedFiles:
|
generatedFiles:
|
||||||
- src/sdk/server.ts
|
- src/sdk/server.ts
|
||||||
- src/sdk/media.ts
|
- src/sdk/media.ts
|
||||||
|
- src/sdk/video.ts
|
||||||
- src/sdk/activities.ts
|
- src/sdk/activities.ts
|
||||||
- src/sdk/butler.ts
|
- src/sdk/butler.ts
|
||||||
- src/sdk/hubs.ts
|
- src/sdk/hubs.ts
|
||||||
@@ -33,14 +34,13 @@ generatedFiles:
|
|||||||
- src/sdk/plex.ts
|
- src/sdk/plex.ts
|
||||||
- src/sdk/playlists.ts
|
- src/sdk/playlists.ts
|
||||||
- src/sdk/security.ts
|
- src/sdk/security.ts
|
||||||
|
- src/sdk/statistics.ts
|
||||||
- src/sdk/sessions.ts
|
- src/sdk/sessions.ts
|
||||||
- src/sdk/updater.ts
|
- src/sdk/updater.ts
|
||||||
- src/sdk/video.ts
|
|
||||||
- src/sdk/sdk.ts
|
- src/sdk/sdk.ts
|
||||||
- .eslintrc.js
|
- .eslintrc.js
|
||||||
- .npmignore
|
- .npmignore
|
||||||
- RUNTIMES.md
|
- RUNTIMES.md
|
||||||
- package-lock.json
|
|
||||||
- package.json
|
- package.json
|
||||||
- src/index.ts
|
- src/index.ts
|
||||||
- src/lib/base64.ts
|
- src/lib/base64.ts
|
||||||
@@ -71,6 +71,8 @@ generatedFiles:
|
|||||||
- src/models/operations/markplayed.ts
|
- src/models/operations/markplayed.ts
|
||||||
- src/models/operations/markunplayed.ts
|
- src/models/operations/markunplayed.ts
|
||||||
- src/models/operations/updateplayprogress.ts
|
- src/models/operations/updateplayprogress.ts
|
||||||
|
- src/models/operations/gettimeline.ts
|
||||||
|
- src/models/operations/startuniversaltranscode.ts
|
||||||
- src/models/operations/getserveractivities.ts
|
- src/models/operations/getserveractivities.ts
|
||||||
- src/models/operations/cancelserveractivities.ts
|
- src/models/operations/cancelserveractivities.ts
|
||||||
- src/models/operations/getbutlertasks.ts
|
- src/models/operations/getbutlertasks.ts
|
||||||
@@ -110,6 +112,7 @@ generatedFiles:
|
|||||||
- src/models/operations/uploadplaylist.ts
|
- src/models/operations/uploadplaylist.ts
|
||||||
- src/models/operations/gettransienttoken.ts
|
- src/models/operations/gettransienttoken.ts
|
||||||
- src/models/operations/getsourceconnectioninformation.ts
|
- src/models/operations/getsourceconnectioninformation.ts
|
||||||
|
- src/models/operations/getstatistics.ts
|
||||||
- src/models/operations/getsessions.ts
|
- src/models/operations/getsessions.ts
|
||||||
- src/models/operations/getsessionhistory.ts
|
- src/models/operations/getsessionhistory.ts
|
||||||
- src/models/operations/gettranscodesessions.ts
|
- src/models/operations/gettranscodesessions.ts
|
||||||
@@ -117,8 +120,6 @@ generatedFiles:
|
|||||||
- src/models/operations/getupdatestatus.ts
|
- src/models/operations/getupdatestatus.ts
|
||||||
- src/models/operations/checkforupdates.ts
|
- src/models/operations/checkforupdates.ts
|
||||||
- src/models/operations/applyupdates.ts
|
- src/models/operations/applyupdates.ts
|
||||||
- src/models/operations/startuniversaltranscode.ts
|
|
||||||
- src/models/operations/gettimeline.ts
|
|
||||||
- src/models/errors/getservercapabilities.ts
|
- src/models/errors/getservercapabilities.ts
|
||||||
- src/models/errors/getserverpreferences.ts
|
- src/models/errors/getserverpreferences.ts
|
||||||
- src/models/errors/getavailableclients.ts
|
- src/models/errors/getavailableclients.ts
|
||||||
@@ -130,6 +131,8 @@ generatedFiles:
|
|||||||
- src/models/errors/markplayed.ts
|
- src/models/errors/markplayed.ts
|
||||||
- src/models/errors/markunplayed.ts
|
- src/models/errors/markunplayed.ts
|
||||||
- src/models/errors/updateplayprogress.ts
|
- src/models/errors/updateplayprogress.ts
|
||||||
|
- src/models/errors/gettimeline.ts
|
||||||
|
- src/models/errors/startuniversaltranscode.ts
|
||||||
- src/models/errors/getserveractivities.ts
|
- src/models/errors/getserveractivities.ts
|
||||||
- src/models/errors/cancelserveractivities.ts
|
- src/models/errors/cancelserveractivities.ts
|
||||||
- src/models/errors/getbutlertasks.ts
|
- src/models/errors/getbutlertasks.ts
|
||||||
@@ -167,6 +170,7 @@ generatedFiles:
|
|||||||
- src/models/errors/uploadplaylist.ts
|
- src/models/errors/uploadplaylist.ts
|
||||||
- src/models/errors/gettransienttoken.ts
|
- src/models/errors/gettransienttoken.ts
|
||||||
- src/models/errors/getsourceconnectioninformation.ts
|
- src/models/errors/getsourceconnectioninformation.ts
|
||||||
|
- src/models/errors/getstatistics.ts
|
||||||
- src/models/errors/getsessions.ts
|
- src/models/errors/getsessions.ts
|
||||||
- src/models/errors/getsessionhistory.ts
|
- src/models/errors/getsessionhistory.ts
|
||||||
- src/models/errors/gettranscodesessions.ts
|
- src/models/errors/gettranscodesessions.ts
|
||||||
@@ -174,8 +178,6 @@ generatedFiles:
|
|||||||
- src/models/errors/getupdatestatus.ts
|
- src/models/errors/getupdatestatus.ts
|
||||||
- src/models/errors/checkforupdates.ts
|
- src/models/errors/checkforupdates.ts
|
||||||
- src/models/errors/applyupdates.ts
|
- src/models/errors/applyupdates.ts
|
||||||
- src/models/errors/startuniversaltranscode.ts
|
|
||||||
- src/models/errors/gettimeline.ts
|
|
||||||
- src/models/components/security.ts
|
- src/models/components/security.ts
|
||||||
- src/models/errors/index.ts
|
- src/models/errors/index.ts
|
||||||
- src/models/operations/index.ts
|
- src/models/operations/index.ts
|
||||||
@@ -184,8 +186,6 @@ generatedFiles:
|
|||||||
- docs/models/operations/mediacontainer.md
|
- docs/models/operations/mediacontainer.md
|
||||||
- docs/models/operations/getservercapabilitiesresponsebody.md
|
- docs/models/operations/getservercapabilitiesresponsebody.md
|
||||||
- docs/models/operations/getservercapabilitiesresponse.md
|
- docs/models/operations/getservercapabilitiesresponse.md
|
||||||
- docs/models/operations/two.md
|
|
||||||
- docs/models/operations/one.md
|
|
||||||
- docs/models/operations/setting.md
|
- docs/models/operations/setting.md
|
||||||
- docs/models/operations/getserverpreferencesmediacontainer.md
|
- docs/models/operations/getserverpreferencesmediacontainer.md
|
||||||
- docs/models/operations/getserverpreferencesresponsebody.md
|
- docs/models/operations/getserverpreferencesresponsebody.md
|
||||||
@@ -218,6 +218,11 @@ generatedFiles:
|
|||||||
- docs/models/operations/markunplayedresponse.md
|
- docs/models/operations/markunplayedresponse.md
|
||||||
- docs/models/operations/updateplayprogressrequest.md
|
- docs/models/operations/updateplayprogressrequest.md
|
||||||
- docs/models/operations/updateplayprogressresponse.md
|
- docs/models/operations/updateplayprogressresponse.md
|
||||||
|
- docs/models/operations/state.md
|
||||||
|
- docs/models/operations/gettimelinerequest.md
|
||||||
|
- docs/models/operations/gettimelineresponse.md
|
||||||
|
- docs/models/operations/startuniversaltranscoderequest.md
|
||||||
|
- docs/models/operations/startuniversaltranscoderesponse.md
|
||||||
- docs/models/operations/context.md
|
- docs/models/operations/context.md
|
||||||
- docs/models/operations/activity.md
|
- docs/models/operations/activity.md
|
||||||
- docs/models/operations/getserveractivitiesmediacontainer.md
|
- docs/models/operations/getserveractivitiesmediacontainer.md
|
||||||
@@ -421,6 +426,13 @@ generatedFiles:
|
|||||||
- docs/models/operations/gettransienttokenresponse.md
|
- docs/models/operations/gettransienttokenresponse.md
|
||||||
- docs/models/operations/getsourceconnectioninformationrequest.md
|
- docs/models/operations/getsourceconnectioninformationrequest.md
|
||||||
- docs/models/operations/getsourceconnectioninformationresponse.md
|
- docs/models/operations/getsourceconnectioninformationresponse.md
|
||||||
|
- docs/models/operations/getstatisticsrequest.md
|
||||||
|
- docs/models/operations/getstatisticsdevice.md
|
||||||
|
- docs/models/operations/account.md
|
||||||
|
- docs/models/operations/statisticsmedia.md
|
||||||
|
- docs/models/operations/getstatisticsmediacontainer.md
|
||||||
|
- docs/models/operations/getstatisticsresponsebody.md
|
||||||
|
- docs/models/operations/getstatisticsresponse.md
|
||||||
- docs/models/operations/getsessionsstream.md
|
- docs/models/operations/getsessionsstream.md
|
||||||
- docs/models/operations/getsessionspart.md
|
- docs/models/operations/getsessionspart.md
|
||||||
- docs/models/operations/getsessionsmedia.md
|
- docs/models/operations/getsessionsmedia.md
|
||||||
@@ -452,11 +464,6 @@ generatedFiles:
|
|||||||
- docs/models/operations/skip.md
|
- docs/models/operations/skip.md
|
||||||
- docs/models/operations/applyupdatesrequest.md
|
- docs/models/operations/applyupdatesrequest.md
|
||||||
- docs/models/operations/applyupdatesresponse.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/errors.md
|
||||||
- docs/models/errors/getservercapabilitiesresponsebody.md
|
- docs/models/errors/getservercapabilitiesresponsebody.md
|
||||||
- docs/models/errors/getserverpreferenceserrors.md
|
- docs/models/errors/getserverpreferenceserrors.md
|
||||||
@@ -479,6 +486,10 @@ generatedFiles:
|
|||||||
- docs/models/errors/markunplayedresponsebody.md
|
- docs/models/errors/markunplayedresponsebody.md
|
||||||
- docs/models/errors/updateplayprogresserrors.md
|
- docs/models/errors/updateplayprogresserrors.md
|
||||||
- docs/models/errors/updateplayprogressresponsebody.md
|
- docs/models/errors/updateplayprogressresponsebody.md
|
||||||
|
- docs/models/errors/gettimelineerrors.md
|
||||||
|
- docs/models/errors/gettimelineresponsebody.md
|
||||||
|
- docs/models/errors/startuniversaltranscodeerrors.md
|
||||||
|
- docs/models/errors/startuniversaltranscoderesponsebody.md
|
||||||
- docs/models/errors/getserveractivitieserrors.md
|
- docs/models/errors/getserveractivitieserrors.md
|
||||||
- docs/models/errors/getserveractivitiesresponsebody.md
|
- docs/models/errors/getserveractivitiesresponsebody.md
|
||||||
- docs/models/errors/cancelserveractivitieserrors.md
|
- docs/models/errors/cancelserveractivitieserrors.md
|
||||||
@@ -553,6 +564,8 @@ generatedFiles:
|
|||||||
- docs/models/errors/gettransienttokenresponsebody.md
|
- docs/models/errors/gettransienttokenresponsebody.md
|
||||||
- docs/models/errors/getsourceconnectioninformationerrors.md
|
- docs/models/errors/getsourceconnectioninformationerrors.md
|
||||||
- docs/models/errors/getsourceconnectioninformationresponsebody.md
|
- docs/models/errors/getsourceconnectioninformationresponsebody.md
|
||||||
|
- docs/models/errors/getstatisticserrors.md
|
||||||
|
- docs/models/errors/getstatisticsresponsebody.md
|
||||||
- docs/models/errors/getsessionserrors.md
|
- docs/models/errors/getsessionserrors.md
|
||||||
- docs/models/errors/getsessionsresponsebody.md
|
- docs/models/errors/getsessionsresponsebody.md
|
||||||
- docs/models/errors/getsessionhistoryerrors.md
|
- docs/models/errors/getsessionhistoryerrors.md
|
||||||
@@ -567,14 +580,11 @@ generatedFiles:
|
|||||||
- docs/models/errors/checkforupdatesresponsebody.md
|
- docs/models/errors/checkforupdatesresponsebody.md
|
||||||
- docs/models/errors/applyupdateserrors.md
|
- docs/models/errors/applyupdateserrors.md
|
||||||
- docs/models/errors/applyupdatesresponsebody.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/models/components/security.md
|
||||||
- docs/sdks/plexapi/README.md
|
- docs/sdks/plexapi/README.md
|
||||||
- docs/sdks/server/README.md
|
- docs/sdks/server/README.md
|
||||||
- docs/sdks/media/README.md
|
- docs/sdks/media/README.md
|
||||||
|
- docs/sdks/video/README.md
|
||||||
- docs/sdks/activities/README.md
|
- docs/sdks/activities/README.md
|
||||||
- docs/sdks/butler/README.md
|
- docs/sdks/butler/README.md
|
||||||
- docs/sdks/hubs/README.md
|
- docs/sdks/hubs/README.md
|
||||||
@@ -584,8 +594,11 @@ generatedFiles:
|
|||||||
- docs/sdks/plex/README.md
|
- docs/sdks/plex/README.md
|
||||||
- docs/sdks/playlists/README.md
|
- docs/sdks/playlists/README.md
|
||||||
- docs/sdks/security/README.md
|
- docs/sdks/security/README.md
|
||||||
|
- docs/sdks/statistics/README.md
|
||||||
- docs/sdks/sessions/README.md
|
- docs/sdks/sessions/README.md
|
||||||
- docs/sdks/updater/README.md
|
- docs/sdks/updater/README.md
|
||||||
- docs/sdks/video/README.md
|
|
||||||
- USAGE.md
|
- USAGE.md
|
||||||
- .gitattributes
|
- .gitattributes
|
||||||
|
- src/hooks/hooks.ts
|
||||||
|
- src/hooks/types.ts
|
||||||
|
- src/hooks/index.ts
|
||||||
|
|||||||
17
README.md
17
README.md
@@ -67,6 +67,11 @@ run();
|
|||||||
* [markUnplayed](docs/sdks/media/README.md#markunplayed) - Mark Media Unplayed
|
* [markUnplayed](docs/sdks/media/README.md#markunplayed) - Mark Media Unplayed
|
||||||
* [updatePlayProgress](docs/sdks/media/README.md#updateplayprogress) - Update Media Play Progress
|
* [updatePlayProgress](docs/sdks/media/README.md#updateplayprogress) - Update Media Play Progress
|
||||||
|
|
||||||
|
### [video](docs/sdks/video/README.md)
|
||||||
|
|
||||||
|
* [getTimeline](docs/sdks/video/README.md#gettimeline) - Get the timeline for a media item
|
||||||
|
* [startUniversalTranscode](docs/sdks/video/README.md#startuniversaltranscode) - Start Universal Transcode
|
||||||
|
|
||||||
### [activities](docs/sdks/activities/README.md)
|
### [activities](docs/sdks/activities/README.md)
|
||||||
|
|
||||||
* [getServerActivities](docs/sdks/activities/README.md#getserveractivities) - Get Server Activities
|
* [getServerActivities](docs/sdks/activities/README.md#getserveractivities) - Get Server Activities
|
||||||
@@ -133,6 +138,10 @@ run();
|
|||||||
* [getTransientToken](docs/sdks/security/README.md#gettransienttoken) - Get a Transient Token.
|
* [getTransientToken](docs/sdks/security/README.md#gettransienttoken) - Get a Transient Token.
|
||||||
* [getSourceConnectionInformation](docs/sdks/security/README.md#getsourceconnectioninformation) - Get Source Connection Information
|
* [getSourceConnectionInformation](docs/sdks/security/README.md#getsourceconnectioninformation) - Get Source Connection Information
|
||||||
|
|
||||||
|
### [statistics](docs/sdks/statistics/README.md)
|
||||||
|
|
||||||
|
* [getStatistics](docs/sdks/statistics/README.md#getstatistics) - Get Media Statistics
|
||||||
|
|
||||||
### [sessions](docs/sdks/sessions/README.md)
|
### [sessions](docs/sdks/sessions/README.md)
|
||||||
|
|
||||||
* [getSessions](docs/sdks/sessions/README.md#getsessions) - Get Active Sessions
|
* [getSessions](docs/sdks/sessions/README.md#getsessions) - Get Active Sessions
|
||||||
@@ -145,11 +154,6 @@ run();
|
|||||||
* [getUpdateStatus](docs/sdks/updater/README.md#getupdatestatus) - Querying status of updates
|
* [getUpdateStatus](docs/sdks/updater/README.md#getupdatestatus) - Querying status of updates
|
||||||
* [checkForUpdates](docs/sdks/updater/README.md#checkforupdates) - Checking for updates
|
* [checkForUpdates](docs/sdks/updater/README.md#checkforupdates) - Checking for updates
|
||||||
* [applyUpdates](docs/sdks/updater/README.md#applyupdates) - Apply 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
|
|
||||||
<!-- End Available Resources and Operations [operations] -->
|
<!-- End Available Resources and Operations [operations] -->
|
||||||
|
|
||||||
<!-- Start Error Handling [errors] -->
|
<!-- Start Error Handling [errors] -->
|
||||||
@@ -166,7 +170,6 @@ Example
|
|||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { PlexAPI } from "@lukehagar/plexjs";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
import * as errors from "@lukehagar/plexjs/models/errors";
|
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new PlexAPI({
|
const sdk = new PlexAPI({
|
||||||
@@ -268,7 +271,7 @@ async function run() {
|
|||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const xPlexClientIdentifier = "string";
|
const xPlexClientIdentifier = "<value>";
|
||||||
const strong = false;
|
const strong = false;
|
||||||
|
|
||||||
const result = await sdk.plex.getPin(xPlexClientIdentifier, strong, {
|
const result = await sdk.plex.getPin(xPlexClientIdentifier, strong, {
|
||||||
|
|||||||
10
RELEASES.md
10
RELEASES.md
@@ -179,3 +179,13 @@ Based on:
|
|||||||
- [typescript v0.7.0] .
|
- [typescript v0.7.0] .
|
||||||
### Releases
|
### Releases
|
||||||
- [NPM v0.7.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.7.0 - .
|
- [NPM v0.7.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.7.0 - .
|
||||||
|
|
||||||
|
## 2024-02-23 14:46:22
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc 0.0.3
|
||||||
|
- Speakeasy CLI 1.193.0 (2.269.0) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.8.0] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.8.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.8.0 - .
|
||||||
10
docs/models/errors/getstatisticserrors.md
Normal file
10
docs/models/errors/getstatisticserrors.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# GetStatisticsErrors
|
||||||
|
|
||||||
|
|
||||||
|
## 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 |
|
||||||
11
docs/models/errors/getstatisticsresponsebody.md
Normal file
11
docs/models/errors/getstatisticsresponsebody.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# GetStatisticsResponseBody
|
||||||
|
|
||||||
|
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
|
||||||
|
| `errors` | [errors.GetStatisticsErrors](../../models/errors/getstatisticserrors.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 |
|
||||||
15
docs/models/operations/account.md
Normal file
15
docs/models/operations/account.md
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# Account
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
|
||||||
|
| `id` | *number* | :heavy_minus_sign: | N/A | 238960586 |
|
||||||
|
| `key` | *string* | :heavy_minus_sign: | N/A | /accounts/238960586 |
|
||||||
|
| `name` | *string* | :heavy_minus_sign: | N/A | Diane |
|
||||||
|
| `defaultAudioLanguage` | *string* | :heavy_minus_sign: | N/A | en |
|
||||||
|
| `autoSelectAudio` | *boolean* | :heavy_minus_sign: | N/A | true |
|
||||||
|
| `defaultSubtitleLanguage` | *string* | :heavy_minus_sign: | N/A | en |
|
||||||
|
| `subtitleMode` | *number* | :heavy_minus_sign: | N/A | 1 |
|
||||||
|
| `thumb` | *string* | :heavy_minus_sign: | N/A | https://plex.tv/users/50d83634246da1de/avatar?c=1707110967 |
|
||||||
@@ -4,6 +4,6 @@
|
|||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `size` | *number* | :heavy_minus_sign: | N/A | 161 |
|
| `size` | *number* | :heavy_minus_sign: | N/A | 161 |
|
||||||
| `setting` | *operations.Setting*[] | :heavy_minus_sign: | N/A | [{"advanced":false,"default":"","group":"general","hidden":false,"id":"FriendlyName","label":"Friendly name","summary":"This name will be used to identify this media server to other computers on your network. If you leave it blank, your computer's name will be used instead.","type":"text","value":"Hera"},{"advanced":false,"default":3600,"enumValues":"900:every 15 minutes\|1800:every 30 minutes\|3600:hourly\|7200:every 2 hours\|21600:every 6 hours\|43200:every 12 hours\|86400:daily","group":"library","hidden":false,"id":"ScheduledLibraryUpdateInterval","label":"Library scan interval","summary":"","type":"int","value":3600}] |
|
| `setting` | [operations.Setting](../../models/operations/setting.md)[] | :heavy_minus_sign: | N/A | [{"advanced":false,"default":false,"enumValues":"1:admin only\|2:everyone","group":"","hidden":true,"id":"EnableDatabaseTrace","label":"","summary":"","type":"bool","value":false}] |
|
||||||
12
docs/models/operations/getstatisticsdevice.md
Normal file
12
docs/models/operations/getstatisticsdevice.md
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# GetStatisticsDevice
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
|
||||||
|
| `id` | *number* | :heavy_minus_sign: | N/A | 208 |
|
||||||
|
| `name` | *string* | :heavy_minus_sign: | N/A | Roku Express |
|
||||||
|
| `platform` | *string* | :heavy_minus_sign: | N/A | Roku |
|
||||||
|
| `clientIdentifier` | *string* | :heavy_minus_sign: | N/A | 793095d235660625108ef785cc7646e9 |
|
||||||
|
| `createdAt` | *number* | :heavy_minus_sign: | N/A | 1706470556 |
|
||||||
@@ -1,17 +1,11 @@
|
|||||||
# Two
|
# GetStatisticsMediaContainer
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `id` | *string* | :heavy_minus_sign: | N/A | ScheduledLibraryUpdateInterval |
|
| `size` | *number* | :heavy_minus_sign: | N/A | 5497 |
|
||||||
| `label` | *string* | :heavy_minus_sign: | N/A | Library scan interval |
|
| `device` | [operations.GetStatisticsDevice](../../models/operations/getstatisticsdevice.md)[] | :heavy_minus_sign: | N/A | [{"clientIdentifier":"793095d235660625108ef785cc7646e9","createdAt":1706470556,"id":208,"name":"Roku Express","platform":"Roku"}] |
|
||||||
| `summary` | *string* | :heavy_minus_sign: | N/A | |
|
| `account` | [operations.Account](../../models/operations/account.md)[] | :heavy_minus_sign: | N/A | [{"autoSelectAudio":true,"defaultAudioLanguage":"en","defaultSubtitleLanguage":"en","id":238960586,"key":"/accounts/238960586","name":"Diane","subtitleMode":1,"thumb":"https://plex.tv/users/50d83634246da1de/avatar?c=1707110967"}] |
|
||||||
| `type` | *string* | :heavy_minus_sign: | N/A | int |
|
| `statisticsMedia` | [operations.StatisticsMedia](../../models/operations/statisticsmedia.md)[] | :heavy_minus_sign: | N/A | [{"accountID":1,"at":1707141600,"count":1,"deviceID":13,"duration":1555,"metadataType":4,"timespan":4}] |
|
||||||
| `default` | *number* | :heavy_minus_sign: | N/A | 3600 |
|
|
||||||
| `value` | *number* | :heavy_minus_sign: | N/A | 3600 |
|
|
||||||
| `hidden` | *boolean* | :heavy_minus_sign: | N/A | false |
|
|
||||||
| `advanced` | *boolean* | :heavy_minus_sign: | N/A | false |
|
|
||||||
| `group` | *string* | :heavy_minus_sign: | N/A | library |
|
|
||||||
| `enumValues` | *string* | :heavy_minus_sign: | N/A | 900:every 15 minutes\|1800:every 30 minutes\|3600:hourly\|7200:every 2 hours\|21600:every 6 hours\|43200:every 12 hours\|86400:daily |
|
|
||||||
8
docs/models/operations/getstatisticsrequest.md
Normal file
8
docs/models/operations/getstatisticsrequest.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# GetStatisticsRequest
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
||||||
|
| `timespan` | *number* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> |
|
||||||
11
docs/models/operations/getstatisticsresponse.md
Normal file
11
docs/models/operations/getstatisticsresponse.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# GetStatisticsResponse
|
||||||
|
|
||||||
|
|
||||||
|
## 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.GetStatisticsResponseBody](../../models/operations/getstatisticsresponsebody.md) | :heavy_minus_sign: | Media Statistics |
|
||||||
10
docs/models/operations/getstatisticsresponsebody.md
Normal file
10
docs/models/operations/getstatisticsresponsebody.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# GetStatisticsResponseBody
|
||||||
|
|
||||||
|
Media Statistics
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
|
||||||
|
| `mediaContainer` | [operations.GetStatisticsMediaContainer](../../models/operations/getstatisticsmediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
# One
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
||||||
| `id` | *string* | :heavy_minus_sign: | N/A | FriendlyName |
|
|
||||||
| `label` | *string* | :heavy_minus_sign: | N/A | Friendly name |
|
|
||||||
| `summary` | *string* | :heavy_minus_sign: | N/A | This name will be used to identify this media server to other computers on your network. If you leave it blank, your computer's name will be used instead. |
|
|
||||||
| `type` | *string* | :heavy_minus_sign: | N/A | text |
|
|
||||||
| `default` | *string* | :heavy_minus_sign: | N/A | |
|
|
||||||
| `value` | *string* | :heavy_minus_sign: | N/A | Hera |
|
|
||||||
| `hidden` | *boolean* | :heavy_minus_sign: | N/A | false |
|
|
||||||
| `advanced` | *boolean* | :heavy_minus_sign: | N/A | false |
|
|
||||||
| `group` | *string* | :heavy_minus_sign: | N/A | general |
|
|
||||||
@@ -1,2 +1,17 @@
|
|||||||
# Setting
|
# Setting
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ----------------------- | ----------------------- | ----------------------- | ----------------------- | ----------------------- |
|
||||||
|
| `id` | *string* | :heavy_minus_sign: | N/A | EnableDatabaseTrace |
|
||||||
|
| `label` | *string* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `summary` | *string* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `type` | *string* | :heavy_minus_sign: | N/A | bool |
|
||||||
|
| `default` | *boolean* | :heavy_minus_sign: | N/A | false |
|
||||||
|
| `value` | *boolean* | :heavy_minus_sign: | N/A | false |
|
||||||
|
| `hidden` | *boolean* | :heavy_minus_sign: | N/A | true |
|
||||||
|
| `advanced` | *boolean* | :heavy_minus_sign: | N/A | false |
|
||||||
|
| `group` | *string* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `enumValues` | *string* | :heavy_minus_sign: | N/A | 1:admin only\|2:everyone |
|
||||||
14
docs/models/operations/statisticsmedia.md
Normal file
14
docs/models/operations/statisticsmedia.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# StatisticsMedia
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||||
|
| `accountID` | *number* | :heavy_minus_sign: | N/A | 1 |
|
||||||
|
| `deviceID` | *number* | :heavy_minus_sign: | N/A | 13 |
|
||||||
|
| `timespan` | *number* | :heavy_minus_sign: | N/A | 4 |
|
||||||
|
| `at` | *number* | :heavy_minus_sign: | N/A | 1707141600 |
|
||||||
|
| `metadataType` | *number* | :heavy_minus_sign: | N/A | 4 |
|
||||||
|
| `count` | *number* | :heavy_minus_sign: | N/A | 1 |
|
||||||
|
| `duration` | *number* | :heavy_minus_sign: | N/A | 1555 |
|
||||||
@@ -72,7 +72,7 @@ async function run() {
|
|||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const activityUUID = "string";
|
const activityUUID = "<value>";
|
||||||
|
|
||||||
const result = await sdk.activities.cancelServerActivities(activityUUID);
|
const result = await sdk.activities.cancelServerActivities(activityUUID);
|
||||||
|
|
||||||
|
|||||||
@@ -115,9 +115,9 @@ async function run() {
|
|||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const key = "string";
|
const key = "<value>";
|
||||||
const time = 6900.91;
|
const time = 6900.91;
|
||||||
const state = "string";
|
const state = "<value>";
|
||||||
|
|
||||||
const result = await sdk.media.updatePlayProgress(key, time, state);
|
const result = await sdk.media.updatePlayProgress(key, time, state);
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ async function run() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const result = await sdk.playlists.createPlaylist({
|
const result = await sdk.playlists.createPlaylist({
|
||||||
title: "string",
|
title: "<value>",
|
||||||
type: QueryParamType.Photo,
|
type: QueryParamType.Photo,
|
||||||
smart: Smart.One,
|
smart: Smart.One,
|
||||||
uri: "https://inborn-brochure.biz",
|
uri: "https://inborn-brochure.biz",
|
||||||
@@ -226,8 +226,8 @@ async function run() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const playlistID = 3915;
|
const playlistID = 3915;
|
||||||
const title = "string";
|
const title = "<value>";
|
||||||
const summary = "string";
|
const summary = "<value>";
|
||||||
|
|
||||||
const result = await sdk.playlists.updatePlaylist(playlistID, title, summary);
|
const result = await sdk.playlists.updatePlaylist(playlistID, title, summary);
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ async function run() {
|
|||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const xPlexClientIdentifier = "string";
|
const xPlexClientIdentifier = "<value>";
|
||||||
const strong = false;
|
const strong = false;
|
||||||
|
|
||||||
const result = await sdk.plex.getPin(xPlexClientIdentifier, strong);
|
const result = await sdk.plex.getPin(xPlexClientIdentifier, strong);
|
||||||
@@ -72,8 +72,8 @@ async function run() {
|
|||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const pinID = "string";
|
const pinID = "<value>";
|
||||||
const xPlexClientIdentifier = "string";
|
const xPlexClientIdentifier = "<value>";
|
||||||
|
|
||||||
const result = await sdk.plex.getToken(pinID, xPlexClientIdentifier);
|
const result = await sdk.plex.getToken(pinID, xPlexClientIdentifier);
|
||||||
|
|
||||||
|
|||||||
55
docs/sdks/statistics/README.md
Normal file
55
docs/sdks/statistics/README.md
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
# Statistics
|
||||||
|
(*statistics*)
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
API Calls that perform operations with Plex Media Server Statistics
|
||||||
|
|
||||||
|
|
||||||
|
### Available Operations
|
||||||
|
|
||||||
|
* [getStatistics](#getstatistics) - Get Media Statistics
|
||||||
|
|
||||||
|
## getStatistics
|
||||||
|
|
||||||
|
This will return the media statistics for the server
|
||||||
|
|
||||||
|
### Example Usage
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
|
async function run() {
|
||||||
|
const sdk = new PlexAPI({
|
||||||
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
|
});
|
||||||
|
|
||||||
|
const timespan = 411769;
|
||||||
|
|
||||||
|
const result = await sdk.statistics.getStatistics(timespan);
|
||||||
|
|
||||||
|
// Handle the result
|
||||||
|
console.log(result)
|
||||||
|
}
|
||||||
|
|
||||||
|
run();
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
| Parameter | Type | Required | Description |
|
||||||
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||||
|
| `timespan` | *number* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> |
|
||||||
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
||||||
|
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
||||||
|
|
||||||
|
|
||||||
|
### Response
|
||||||
|
|
||||||
|
**Promise<[operations.GetStatisticsResponse](../../models/operations/getstatisticsresponse.md)>**
|
||||||
|
### Errors
|
||||||
|
|
||||||
|
| Error Object | Status Code | Content Type |
|
||||||
|
| -------------------------------- | -------------------------------- | -------------------------------- |
|
||||||
|
| errors.GetStatisticsResponseBody | 401 | application/json |
|
||||||
|
| errors.SDKError | 4xx-5xx | */* |
|
||||||
@@ -8,56 +8,8 @@ API Calls that perform operations with Plex Media Server Videos
|
|||||||
|
|
||||||
### Available Operations
|
### Available Operations
|
||||||
|
|
||||||
* [startUniversalTranscode](#startuniversaltranscode) - Start Universal Transcode
|
|
||||||
* [getTimeline](#gettimeline) - Get the timeline for a media item
|
* [getTimeline](#gettimeline) - Get the timeline for a media item
|
||||||
|
* [startUniversalTranscode](#startuniversaltranscode) - Start Universal Transcode
|
||||||
## startUniversalTranscode
|
|
||||||
|
|
||||||
Begin a Universal Transcode Session
|
|
||||||
|
|
||||||
### Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { PlexAPI } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
async function run() {
|
|
||||||
const sdk = new PlexAPI({
|
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
|
||||||
});
|
|
||||||
|
|
||||||
const result = await sdk.video.startUniversalTranscode({
|
|
||||||
hasMDE: 8924.99,
|
|
||||||
path: "/etc/mail",
|
|
||||||
mediaIndex: 9962.95,
|
|
||||||
partIndex: 1232.82,
|
|
||||||
protocol: "string",
|
|
||||||
});
|
|
||||||
|
|
||||||
// Handle the result
|
|
||||||
console.log(result)
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
## getTimeline
|
||||||
|
|
||||||
@@ -81,7 +33,7 @@ async function run() {
|
|||||||
hasMDE: 7574.33,
|
hasMDE: 7574.33,
|
||||||
time: 3327.51,
|
time: 3327.51,
|
||||||
duration: 7585.39,
|
duration: 7585.39,
|
||||||
context: "string",
|
context: "<value>",
|
||||||
playQueueItemID: 1406.21,
|
playQueueItemID: 1406.21,
|
||||||
playBackTime: 2699.34,
|
playBackTime: 2699.34,
|
||||||
row: 3536.42,
|
row: 3536.42,
|
||||||
@@ -112,3 +64,51 @@ run();
|
|||||||
| ------------------------------ | ------------------------------ | ------------------------------ |
|
| ------------------------------ | ------------------------------ | ------------------------------ |
|
||||||
| errors.GetTimelineResponseBody | 401 | application/json |
|
| errors.GetTimelineResponseBody | 401 | application/json |
|
||||||
| errors.SDKError | 4xx-5xx | */* |
|
| errors.SDKError | 4xx-5xx | */* |
|
||||||
|
|
||||||
|
## startUniversalTranscode
|
||||||
|
|
||||||
|
Begin a Universal Transcode Session
|
||||||
|
|
||||||
|
### Example Usage
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
|
async function run() {
|
||||||
|
const sdk = new PlexAPI({
|
||||||
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
|
});
|
||||||
|
|
||||||
|
const result = await sdk.video.startUniversalTranscode({
|
||||||
|
hasMDE: 8924.99,
|
||||||
|
path: "/etc/mail",
|
||||||
|
mediaIndex: 9962.95,
|
||||||
|
partIndex: 1232.82,
|
||||||
|
protocol: "<value>",
|
||||||
|
});
|
||||||
|
|
||||||
|
// Handle the result
|
||||||
|
console.log(result)
|
||||||
|
}
|
||||||
|
|
||||||
|
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 | */* |
|
||||||
|
|||||||
8
gen.yaml
8
gen.yaml
@@ -8,8 +8,13 @@ generation:
|
|||||||
fixes:
|
fixes:
|
||||||
nameResolutionDec2023: false
|
nameResolutionDec2023: false
|
||||||
parameterOrderingFeb2024: false
|
parameterOrderingFeb2024: false
|
||||||
|
requestResponseComponentNamesFeb2024: false
|
||||||
typescript:
|
typescript:
|
||||||
version: 0.7.0
|
version: 0.8.0
|
||||||
|
additionalDependencies:
|
||||||
|
dependencies: {}
|
||||||
|
devDependencies: {}
|
||||||
|
peerDependencies: {}
|
||||||
author: LukeHagar
|
author: LukeHagar
|
||||||
clientServerStatusCodesAsErrors: true
|
clientServerStatusCodesAsErrors: true
|
||||||
flattenGlobalSecurity: true
|
flattenGlobalSecurity: true
|
||||||
@@ -25,4 +30,5 @@ typescript:
|
|||||||
maxMethodParams: 4
|
maxMethodParams: 4
|
||||||
outputModelSuffix: output
|
outputModelSuffix: output
|
||||||
packageName: '@lukehagar/plexjs'
|
packageName: '@lukehagar/plexjs'
|
||||||
|
responseFormat: envelope
|
||||||
templateVersion: v2
|
templateVersion: v2
|
||||||
|
|||||||
2974
package-lock.json
generated
2974
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
"type": "commonjs",
|
|
||||||
"name": "@lukehagar/plexjs",
|
"name": "@lukehagar/plexjs",
|
||||||
"version": "0.7.0",
|
"version": "0.8.0",
|
||||||
"author": "LukeHagar",
|
"author": "LukeHagar",
|
||||||
"main": "./index.js",
|
"main": "./index.js",
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
@@ -20,12 +19,12 @@
|
|||||||
"zod": ">= 3"
|
"zod": ">= 3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/jsonpath": "^0.2.4",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.13.2",
|
"@typescript-eslint/eslint-plugin": "^6.13.2",
|
||||||
"@typescript-eslint/parser": "^6.13.2",
|
"@typescript-eslint/parser": "^6.13.2",
|
||||||
"eslint": "^8.55.0",
|
"eslint": "^8.55.0",
|
||||||
"eslint-import-resolver-typescript": "^3.6.1",
|
"eslint-import-resolver-typescript": "^3.6.1",
|
||||||
"eslint-plugin-import": "^2.29.0",
|
"eslint-plugin-import": "^2.29.0",
|
||||||
"@types/jsonpath": "^0.2.4",
|
|
||||||
"typescript": "^5.3.3",
|
"typescript": "^5.3.3",
|
||||||
"zod": "^3.22.4"
|
"zod": "^3.22.4"
|
||||||
},
|
},
|
||||||
|
|||||||
85
src/hooks/hooks.ts
Normal file
85
src/hooks/hooks.ts
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
/*
|
||||||
|
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import {
|
||||||
|
AfterErrorContext,
|
||||||
|
AfterErrorHook,
|
||||||
|
AfterSuccessContext,
|
||||||
|
AfterSuccessHook,
|
||||||
|
BeforeRequestContext,
|
||||||
|
BeforeRequestHook,
|
||||||
|
ClientInitHook,
|
||||||
|
Hooks,
|
||||||
|
} from "./types";
|
||||||
|
|
||||||
|
import { HTTPClient } from "../lib/http";
|
||||||
|
import { initHooks } from "./registration";
|
||||||
|
|
||||||
|
export class SDKHooks implements Hooks {
|
||||||
|
clientInitHooks: ClientInitHook[] = [];
|
||||||
|
beforeRequestHooks: BeforeRequestHook[] = [];
|
||||||
|
afterSuccessHooks: AfterSuccessHook[] = [];
|
||||||
|
afterErrorHooks: AfterErrorHook[] = [];
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
initHooks(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
registerClientInitHook(hook: ClientInitHook) {
|
||||||
|
this.clientInitHooks.push(hook);
|
||||||
|
}
|
||||||
|
|
||||||
|
registerBeforeRequestHook(hook: BeforeRequestHook) {
|
||||||
|
this.beforeRequestHooks.push(hook);
|
||||||
|
}
|
||||||
|
|
||||||
|
registerAfterSuccessHook(hook: AfterSuccessHook) {
|
||||||
|
this.afterSuccessHooks.push(hook);
|
||||||
|
}
|
||||||
|
|
||||||
|
registerAfterErrorHook(hook: AfterErrorHook) {
|
||||||
|
this.afterErrorHooks.push(hook);
|
||||||
|
}
|
||||||
|
|
||||||
|
clientInit(client: HTTPClient): HTTPClient {
|
||||||
|
return this.clientInitHooks.reduce((client, hook) => hook.clientInit(client), client);
|
||||||
|
}
|
||||||
|
|
||||||
|
async beforeRequest(hookCtx: BeforeRequestContext, request: Request): Promise<Request> {
|
||||||
|
let req = request;
|
||||||
|
|
||||||
|
for (const hook of this.beforeRequestHooks) {
|
||||||
|
req = await hook.beforeRequest(hookCtx, req);
|
||||||
|
}
|
||||||
|
|
||||||
|
return req;
|
||||||
|
}
|
||||||
|
|
||||||
|
async afterSuccess(hookCtx: AfterSuccessContext, response: Response): Promise<Response> {
|
||||||
|
let res = response;
|
||||||
|
|
||||||
|
for (const hook of this.afterSuccessHooks) {
|
||||||
|
res = await hook.afterSuccess(hookCtx, res);
|
||||||
|
}
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
async afterError(
|
||||||
|
hookCtx: AfterErrorContext,
|
||||||
|
response: Response | null,
|
||||||
|
error: unknown
|
||||||
|
): Promise<{ response: Response | null; error: unknown }> {
|
||||||
|
let res = response;
|
||||||
|
let err = error;
|
||||||
|
|
||||||
|
for (const hook of this.afterErrorHooks) {
|
||||||
|
const result = await hook.afterError(hookCtx, res, err);
|
||||||
|
res = result.response;
|
||||||
|
err = result.error;
|
||||||
|
}
|
||||||
|
|
||||||
|
return { response: res, error: err };
|
||||||
|
}
|
||||||
|
}
|
||||||
6
src/hooks/index.ts
Normal file
6
src/hooks/index.ts
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
/*
|
||||||
|
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export * from "./types";
|
||||||
|
export * from "./hooks";
|
||||||
14
src/hooks/registration.ts
Normal file
14
src/hooks/registration.ts
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import { Hooks } from "./types";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is only ever generated once on the first generation and then is free to be modified.
|
||||||
|
* Any hooks you wish to add should be registered in the initHooks function. Feel free to define them
|
||||||
|
* in this file or in separate files in the hooks folder.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// @ts-expect-error remove this line when you add your first hook and hooks is used
|
||||||
|
export function initHooks(hooks: Hooks) {
|
||||||
|
// Add hooks by calling hooks.register{ClientInit/BeforeRequest/AfterRequest/AfterError}Hook
|
||||||
|
// with an instance of a hook that implements that specific Hook interface
|
||||||
|
// Hooks are registered per SDK instance, and are valid for the lifetime of the SDK instance
|
||||||
|
}
|
||||||
68
src/hooks/types.ts
Normal file
68
src/hooks/types.ts
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { HTTPClient } from "../lib/http";
|
||||||
|
|
||||||
|
export type HookContext = {
|
||||||
|
operationID: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type Awaitable<T> = T | Promise<T>;
|
||||||
|
|
||||||
|
export type BeforeRequestContext = HookContext & {};
|
||||||
|
export type AfterSuccessContext = HookContext & {};
|
||||||
|
export type AfterErrorContext = HookContext & {};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ClientInitHook is called when the SDK is initializing the HTTP client. The
|
||||||
|
* hook can return a new HTTP client to be used by the SDK.
|
||||||
|
*/
|
||||||
|
export interface ClientInitHook {
|
||||||
|
clientInit: (client: HTTPClient) => HTTPClient;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BeforeRequestHook is called before the SDK sends a request. The hook can
|
||||||
|
* modify the request before it is sent or throw an error to stop the request
|
||||||
|
* from being sent.
|
||||||
|
*/
|
||||||
|
export interface BeforeRequestHook {
|
||||||
|
beforeRequest: (hookCtx: BeforeRequestContext, request: Request) => Awaitable<Request>;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AfterSuccessHook is called after the SDK receives a response. The hook can
|
||||||
|
* modify the response before it is handled or throw an error to stop the
|
||||||
|
* response from being handled.
|
||||||
|
*/
|
||||||
|
export interface AfterSuccessHook {
|
||||||
|
afterSuccess: (hookCtx: AfterSuccessContext, response: Response) => Awaitable<Response>;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AfterErrorHook is called after the SDK encounters an error, or a
|
||||||
|
* non-successful response. The hook can modify the response if available
|
||||||
|
* otherwise modify the error.
|
||||||
|
*/
|
||||||
|
export interface AfterErrorHook {
|
||||||
|
afterError: (
|
||||||
|
hookCtx: AfterErrorContext,
|
||||||
|
response: Response | null,
|
||||||
|
error: unknown
|
||||||
|
) => Awaitable<{
|
||||||
|
response: Response | null;
|
||||||
|
error: unknown;
|
||||||
|
}>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Hooks {
|
||||||
|
/** Registers a hook to be used by the SDK for client initialization. */
|
||||||
|
registerClientInitHook(hook: ClientInitHook): void;
|
||||||
|
/** Registers a hook to be used by the SDK for the before request event. */
|
||||||
|
registerBeforeRequestHook(hook: BeforeRequestHook): void;
|
||||||
|
/** Registers a hook to be used by the SDK for the after success event. */
|
||||||
|
registerAfterSuccessHook(hook: AfterSuccessHook): void;
|
||||||
|
/** Registers a hook to be used by the SDK for the after error event. */
|
||||||
|
registerAfterErrorHook(hook: AfterErrorHook): void;
|
||||||
|
}
|
||||||
@@ -3,8 +3,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { HTTPClient } from "./http";
|
import { HTTPClient } from "./http";
|
||||||
import { pathToFunc } from "./url";
|
|
||||||
import { RetryConfig } from "./retries";
|
import { RetryConfig } from "./retries";
|
||||||
|
import { pathToFunc } from "./url";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Contains the list of servers available to the SDK
|
* Contains the list of servers available to the SDK
|
||||||
@@ -54,7 +54,7 @@ export type SDKOptions = {
|
|||||||
retryConfig?: RetryConfig;
|
retryConfig?: RetryConfig;
|
||||||
};
|
};
|
||||||
|
|
||||||
export function serverURLFromOptions(options: SDKOptions): URL {
|
export function serverURLFromOptions(options: SDKOptions): URL | null {
|
||||||
let serverURL = options.serverURL;
|
let serverURL = options.serverURL;
|
||||||
|
|
||||||
const serverParams = [
|
const serverParams = [
|
||||||
@@ -79,7 +79,7 @@ export function serverURLFromOptions(options: SDKOptions): URL {
|
|||||||
export const SDK_METADATA = Object.freeze({
|
export const SDK_METADATA = Object.freeze({
|
||||||
language: "typescript",
|
language: "typescript",
|
||||||
openapiDocVersion: "0.0.3",
|
openapiDocVersion: "0.0.3",
|
||||||
sdkVersion: "0.7.0",
|
sdkVersion: "0.8.0",
|
||||||
genVersion: "2.249.1",
|
genVersion: "2.269.0",
|
||||||
userAgent: "speakeasy-sdk/typescript 0.7.0 2.249.1 0.0.3 @lukehagar/plexjs",
|
userAgent: "speakeasy-sdk/typescript 0.8.0 2.269.0 0.0.3 @lukehagar/plexjs",
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -191,10 +191,29 @@ async function retryBackoff(
|
|||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
|
|
||||||
const d = Math.min(
|
let retryInterval = 0;
|
||||||
initialInterval * Math.pow(x, exponent) + Math.random() * 1000,
|
if (err instanceof TemporaryError && err.res && err.res.headers) {
|
||||||
maxInterval,
|
const retryVal = err.res.headers.get("retry-after") || "";
|
||||||
);
|
if (retryVal != "") {
|
||||||
|
const parsedNumber = Number(retryVal);
|
||||||
|
if (!isNaN(parsedNumber) && Number.isInteger(parsedNumber)) {
|
||||||
|
retryInterval = parsedNumber * 1000;
|
||||||
|
} else {
|
||||||
|
const parsedDate = Date.parse(retryVal);
|
||||||
|
if (!isNaN(parsedDate)) {
|
||||||
|
const deltaMS = parsedDate - Date.now();
|
||||||
|
retryInterval = deltaMS > 0 ? Math.ceil(deltaMS) : 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (retryInterval == 0) {
|
||||||
|
retryInterval =
|
||||||
|
initialInterval * Math.pow(x, exponent) + Math.random() * 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
const d = Math.min(retryInterval, maxInterval);
|
||||||
|
|
||||||
await delay(d);
|
await delay(d);
|
||||||
x++;
|
x++;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { SecurityState, resolveSecurity, resolveGlobalSecurity } from "./securit
|
|||||||
import { pathToFunc } from "./url";
|
import { pathToFunc } from "./url";
|
||||||
import { encodeForm } from "./encodings";
|
import { encodeForm } from "./encodings";
|
||||||
import { stringToBase64 } from "./base64";
|
import { stringToBase64 } from "./base64";
|
||||||
|
import { SDKHooks, HookContext } from "../hooks";
|
||||||
|
|
||||||
export type RequestOptions = {
|
export type RequestOptions = {
|
||||||
fetchOptions?: Omit<RequestInit, "method" | "body">;
|
fetchOptions?: Omit<RequestInit, "method" | "body">;
|
||||||
@@ -15,6 +16,7 @@ export type RequestOptions = {
|
|||||||
type RequestConfig = {
|
type RequestConfig = {
|
||||||
method: string;
|
method: string;
|
||||||
path: string;
|
path: string;
|
||||||
|
context: HookContext;
|
||||||
baseURL?: string | URL;
|
baseURL?: string | URL;
|
||||||
query?: string;
|
query?: string;
|
||||||
body?: RequestInit["body"];
|
body?: RequestInit["body"];
|
||||||
@@ -24,20 +26,28 @@ type RequestConfig = {
|
|||||||
|
|
||||||
export class ClientSDK {
|
export class ClientSDK {
|
||||||
private readonly client: HTTPClient;
|
private readonly client: HTTPClient;
|
||||||
protected readonly baseURL: URL;
|
protected readonly baseURL: URL | null;
|
||||||
|
protected readonly hooks$: SDKHooks;
|
||||||
|
|
||||||
constructor(init: { client: HTTPClient; baseURL: URL }) {
|
constructor(init: { client: HTTPClient; baseURL: URL | null; hooks: SDKHooks }) {
|
||||||
const url = init.baseURL;
|
const url = init.baseURL;
|
||||||
|
if (url) {
|
||||||
url.pathname = url.pathname.replace(/\/+$/, "") + "/";
|
url.pathname = url.pathname.replace(/\/+$/, "") + "/";
|
||||||
|
}
|
||||||
|
|
||||||
this.client = init.client;
|
this.hooks$ = init.hooks;
|
||||||
|
this.client = this.hooks$.clientInit(init.client);
|
||||||
this.baseURL = url;
|
this.baseURL = url;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async fetch$(conf: RequestConfig, options?: RequestOptions) {
|
protected async createRequest$(conf: RequestConfig, options?: RequestOptions) {
|
||||||
const { method, path, query, headers: opHeaders, security } = conf;
|
const { context, method, path, query, headers: opHeaders, security } = conf;
|
||||||
|
|
||||||
const reqURL = new URL(conf.baseURL ?? this.baseURL);
|
const base = conf.baseURL ?? this.baseURL;
|
||||||
|
if (!base) {
|
||||||
|
throw new TypeError("No base URL provided for operation");
|
||||||
|
}
|
||||||
|
const reqURL = new URL(base);
|
||||||
const inputURL = new URL(path, reqURL);
|
const inputURL = new URL(path, reqURL);
|
||||||
|
|
||||||
if (path) {
|
if (path) {
|
||||||
@@ -92,7 +102,31 @@ export class ClientSDK {
|
|||||||
method,
|
method,
|
||||||
});
|
});
|
||||||
|
|
||||||
return this.client.request(req);
|
return this.hooks$.beforeRequest(context, req);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected async do$(
|
||||||
|
req: Request,
|
||||||
|
options: {
|
||||||
|
context: HookContext;
|
||||||
|
errorCodes: number | string | (number | string)[];
|
||||||
|
}
|
||||||
|
) {
|
||||||
|
const { context, errorCodes } = options;
|
||||||
|
|
||||||
|
let response = await this.client.request(req);
|
||||||
|
|
||||||
|
if (this.matchStatusCode(response, errorCodes)) {
|
||||||
|
const result = await this.hooks$.afterError(context, response, null);
|
||||||
|
if (result.error) {
|
||||||
|
throw result.error;
|
||||||
|
}
|
||||||
|
response = result.response || response;
|
||||||
|
} else {
|
||||||
|
response = await this.hooks$.afterSuccess(context, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected unpackHeaders = unpackHeaders;
|
protected unpackHeaders = unpackHeaders;
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class AddPlaylistContentsResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "AddPlaylistContentsResponseBody";
|
this.name = "AddPlaylistContentsResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class ApplyUpdatesResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "ApplyUpdatesResponseBody";
|
this.name = "ApplyUpdatesResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class CancelServerActivitiesResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "CancelServerActivitiesResponseBody";
|
this.name = "CancelServerActivitiesResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class CheckForUpdatesResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "CheckForUpdatesResponseBody";
|
this.name = "CheckForUpdatesResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class ClearPlaylistContentsResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "ClearPlaylistContentsResponseBody";
|
this.name = "ClearPlaylistContentsResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class CreatePlaylistResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "CreatePlaylistResponseBody";
|
this.name = "CreatePlaylistResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class DeleteLibraryResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "DeleteLibraryResponseBody";
|
this.name = "DeleteLibraryResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class DeletePlaylistResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "DeletePlaylistResponseBody";
|
this.name = "DeletePlaylistResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class EnablePaperTrailResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "EnablePaperTrailResponseBody";
|
this.name = "EnablePaperTrailResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetAvailableClientsResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetAvailableClientsResponseBody";
|
this.name = "GetAvailableClientsResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetButlerTasksResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetButlerTasksResponseBody";
|
this.name = "GetButlerTasksResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetDevicesResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetDevicesResponseBody";
|
this.name = "GetDevicesResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetFileHashResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetFileHashResponseBody";
|
this.name = "GetFileHashResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetGlobalHubsResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetGlobalHubsResponseBody";
|
this.name = "GetGlobalHubsResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetLibrariesResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetLibrariesResponseBody";
|
this.name = "GetLibrariesResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetLibraryResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetLibraryResponseBody";
|
this.name = "GetLibraryResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetLibraryHubsResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetLibraryHubsResponseBody";
|
this.name = "GetLibraryHubsResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetMetadataResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetMetadataResponseBody";
|
this.name = "GetMetadataResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetMetadataChildrenResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetMetadataChildrenResponseBody";
|
this.name = "GetMetadataChildrenResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetMyPlexAccountResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetMyPlexAccountResponseBody";
|
this.name = "GetMyPlexAccountResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetOnDeckResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetOnDeckResponseBody";
|
this.name = "GetOnDeckResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetPinResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetPinResponseBody";
|
this.name = "GetPinResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetPlaylistResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetPlaylistResponseBody";
|
this.name = "GetPlaylistResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetPlaylistContentsResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetPlaylistContentsResponseBody";
|
this.name = "GetPlaylistContentsResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetPlaylistsResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetPlaylistsResponseBody";
|
this.name = "GetPlaylistsResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetRecentlyAddedResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetRecentlyAddedResponseBody";
|
this.name = "GetRecentlyAddedResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetResizedPhotoResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetResizedPhotoResponseBody";
|
this.name = "GetResizedPhotoResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetSearchResultsResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetSearchResultsResponseBody";
|
this.name = "GetSearchResultsResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetServerActivitiesResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetServerActivitiesResponseBody";
|
this.name = "GetServerActivitiesResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetServerCapabilitiesResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetServerCapabilitiesResponseBody";
|
this.name = "GetServerCapabilitiesResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetServerIdentityResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetServerIdentityResponseBody";
|
this.name = "GetServerIdentityResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetServerListResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetServerListResponseBody";
|
this.name = "GetServerListResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetServerPreferencesResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetServerPreferencesResponseBody";
|
this.name = "GetServerPreferencesResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetSessionHistoryResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetSessionHistoryResponseBody";
|
this.name = "GetSessionHistoryResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetSessionsResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetSessionsResponseBody";
|
this.name = "GetSessionsResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetSourceConnectionInformationResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetSourceConnectionInformationResponseBody";
|
this.name = "GetSourceConnectionInformationResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
144
src/models/errors/getstatistics.ts
Normal file
144
src/models/errors/getstatistics.ts
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
/*
|
||||||
|
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { z } from "zod";
|
||||||
|
|
||||||
|
export type GetStatisticsErrors = {
|
||||||
|
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 GetStatisticsResponseBodyData = {
|
||||||
|
errors?: Array<GetStatisticsErrors> | 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 GetStatisticsResponseBody extends Error {
|
||||||
|
errors?: Array<GetStatisticsErrors> | undefined;
|
||||||
|
/**
|
||||||
|
* Raw HTTP response; suitable for custom response parsing
|
||||||
|
*/
|
||||||
|
rawResponse?: Response | undefined;
|
||||||
|
|
||||||
|
/** The original data that was passed to this error instance. */
|
||||||
|
data$: GetStatisticsResponseBodyData;
|
||||||
|
|
||||||
|
constructor(err: GetStatisticsResponseBodyData) {
|
||||||
|
super("");
|
||||||
|
this.data$ = err;
|
||||||
|
|
||||||
|
if (err.errors != null) {
|
||||||
|
this.errors = err.errors;
|
||||||
|
}
|
||||||
|
if (err.rawResponse != null) {
|
||||||
|
this.rawResponse = err.rawResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.message =
|
||||||
|
"message" in err && typeof err.message === "string"
|
||||||
|
? err.message
|
||||||
|
: "API error occurred";
|
||||||
|
|
||||||
|
this.name = "GetStatisticsResponseBody";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @internal */
|
||||||
|
export namespace GetStatisticsErrors$ {
|
||||||
|
export type Inbound = {
|
||||||
|
code?: number | undefined;
|
||||||
|
message?: string | undefined;
|
||||||
|
status?: number | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const inboundSchema: z.ZodType<GetStatisticsErrors, 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, GetStatisticsErrors> = 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 GetStatisticsResponseBody$ {
|
||||||
|
export type Inbound = {
|
||||||
|
errors?: Array<GetStatisticsErrors$.Inbound> | undefined;
|
||||||
|
RawResponse?: Response | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const inboundSchema: z.ZodType<GetStatisticsResponseBody, z.ZodTypeDef, Inbound> = z
|
||||||
|
.object({
|
||||||
|
errors: z.array(z.lazy(() => GetStatisticsErrors$.inboundSchema)).optional(),
|
||||||
|
RawResponse: z.instanceof(Response).optional(),
|
||||||
|
})
|
||||||
|
.transform((v) => {
|
||||||
|
return new GetStatisticsResponseBody({
|
||||||
|
...(v.errors === undefined ? null : { errors: v.errors }),
|
||||||
|
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
|
||||||
|
});
|
||||||
|
});
|
||||||
|
export type Outbound = {
|
||||||
|
errors?: Array<GetStatisticsErrors$.Outbound> | undefined;
|
||||||
|
RawResponse?: never | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetStatisticsResponseBody> = z
|
||||||
|
.instanceof(GetStatisticsResponseBody)
|
||||||
|
.transform((v) => v.data$)
|
||||||
|
.pipe(
|
||||||
|
z
|
||||||
|
.object({
|
||||||
|
errors: z.array(z.lazy(() => GetStatisticsErrors$.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 }),
|
||||||
|
};
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -45,10 +45,10 @@ export class GetTimelineResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetTimelineResponseBody";
|
this.name = "GetTimelineResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetTokenResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetTokenResponseBody";
|
this.name = "GetTokenResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetTranscodeSessionsResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetTranscodeSessionsResponseBody";
|
this.name = "GetTranscodeSessionsResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetTransientTokenResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetTransientTokenResponseBody";
|
this.name = "GetTransientTokenResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class GetUpdateStatusResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "GetUpdateStatusResponseBody";
|
this.name = "GetUpdateStatusResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ export * from "./getserverpreferences";
|
|||||||
export * from "./getsessionhistory";
|
export * from "./getsessionhistory";
|
||||||
export * from "./getsessions";
|
export * from "./getsessions";
|
||||||
export * from "./getsourceconnectioninformation";
|
export * from "./getsourceconnectioninformation";
|
||||||
|
export * from "./getstatistics";
|
||||||
export * from "./gettimeline";
|
export * from "./gettimeline";
|
||||||
export * from "./gettoken";
|
export * from "./gettoken";
|
||||||
export * from "./gettranscodesessions";
|
export * from "./gettranscodesessions";
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class LogLineResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "LogLineResponseBody";
|
this.name = "LogLineResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class LogMultiLineResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "LogMultiLineResponseBody";
|
this.name = "LogMultiLineResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class MarkPlayedResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "MarkPlayedResponseBody";
|
this.name = "MarkPlayedResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class MarkUnplayedResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "MarkUnplayedResponseBody";
|
this.name = "MarkUnplayedResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class PerformSearchResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "PerformSearchResponseBody";
|
this.name = "PerformSearchResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class PerformVoiceSearchResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "PerformVoiceSearchResponseBody";
|
this.name = "PerformVoiceSearchResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class RefreshLibraryResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "RefreshLibraryResponseBody";
|
this.name = "RefreshLibraryResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,22 +3,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export class SDKError extends Error {
|
export class SDKError extends Error {
|
||||||
statusCode: number;
|
public readonly statusCode: number;
|
||||||
body: string;
|
|
||||||
rawResponse: Response;
|
|
||||||
|
|
||||||
constructor(message: string, response: Response, body: string = "") {
|
constructor(
|
||||||
const statusCode = response.status;
|
message: string,
|
||||||
|
public readonly rawResponse: Response,
|
||||||
let bodyString = "";
|
public readonly body: string = ""
|
||||||
if (body.length > 0) {
|
) {
|
||||||
bodyString = `\n${body}`;
|
const statusCode = rawResponse.status;
|
||||||
}
|
const bodyString = body.length > 0 ? `\n${body}` : "";
|
||||||
|
|
||||||
super(`${message}: Status ${statusCode}${bodyString}`);
|
super(`${message}: Status ${statusCode}${bodyString}`);
|
||||||
|
|
||||||
this.statusCode = statusCode;
|
this.statusCode = statusCode;
|
||||||
this.body = body;
|
|
||||||
this.rawResponse = response;
|
|
||||||
this.name = "SDKError";
|
this.name = "SDKError";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class StartAllTasksResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "StartAllTasksResponseBody";
|
this.name = "StartAllTasksResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class StartTaskResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "StartTaskResponseBody";
|
this.name = "StartTaskResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class StartUniversalTranscodeResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "StartUniversalTranscodeResponseBody";
|
this.name = "StartUniversalTranscodeResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class StopAllTasksResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "StopAllTasksResponseBody";
|
this.name = "StopAllTasksResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class StopTaskResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "StopTaskResponseBody";
|
this.name = "StopTaskResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class StopTranscodeSessionResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "StopTranscodeSessionResponseBody";
|
this.name = "StopTranscodeSessionResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class UpdatePlaylistResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "UpdatePlaylistResponseBody";
|
this.name = "UpdatePlaylistResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class UpdatePlayProgressResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "UpdatePlayProgressResponseBody";
|
this.name = "UpdatePlayProgressResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export class UploadPlaylistResponseBody extends Error {
|
|||||||
this.rawResponse = err.rawResponse;
|
this.rawResponse = err.rawResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
this.message =
|
||||||
const { rawResponse, ...data } = err;
|
"message" in err && typeof err.message === "string"
|
||||||
const content = JSON.stringify(data);
|
? err.message
|
||||||
this.message = [msg, content].filter(Boolean).join("\n");
|
: "API error occurred";
|
||||||
|
|
||||||
this.name = "UploadPlaylistResponseBody";
|
this.name = "UploadPlaylistResponseBody";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ export namespace GetLibraryRequest$ {
|
|||||||
.transform((v) => {
|
.transform((v) => {
|
||||||
return {
|
return {
|
||||||
sectionId: v.sectionId,
|
sectionId: v.sectionId,
|
||||||
...(v.includeDetails === undefined ? null : { includeDetails: v.includeDetails }),
|
includeDetails: v.includeDetails,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ export namespace GetPinRequest$ {
|
|||||||
.transform((v) => {
|
.transform((v) => {
|
||||||
return {
|
return {
|
||||||
xPlexClientIdentifier: v["X-Plex-Client-Identifier"],
|
xPlexClientIdentifier: v["X-Plex-Client-Identifier"],
|
||||||
...(v.strong === undefined ? null : { strong: v.strong }),
|
strong: v.strong,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ export namespace GetResizedPhotoRequest$ {
|
|||||||
return {
|
return {
|
||||||
width: v.width,
|
width: v.width,
|
||||||
height: v.height,
|
height: v.height,
|
||||||
...(v.opacity === undefined ? null : { opacity: v.opacity }),
|
opacity: v.opacity,
|
||||||
blur: v.blur,
|
blur: v.blur,
|
||||||
minSize: v.minSize,
|
minSize: v.minSize,
|
||||||
upscale: v.upscale,
|
upscale: v.upscale,
|
||||||
|
|||||||
@@ -4,36 +4,22 @@
|
|||||||
|
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
export type Two = {
|
export type Setting = {
|
||||||
id?: string | undefined;
|
id?: string | undefined;
|
||||||
label?: string | undefined;
|
label?: string | undefined;
|
||||||
summary?: string | undefined;
|
summary?: string | undefined;
|
||||||
type?: string | undefined;
|
type?: string | undefined;
|
||||||
default?: number | undefined;
|
default?: boolean | undefined;
|
||||||
value?: number | undefined;
|
value?: boolean | undefined;
|
||||||
hidden?: boolean | undefined;
|
hidden?: boolean | undefined;
|
||||||
advanced?: boolean | undefined;
|
advanced?: boolean | undefined;
|
||||||
group?: string | undefined;
|
group?: string | undefined;
|
||||||
enumValues?: string | undefined;
|
enumValues?: string | undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type One = {
|
|
||||||
id?: string | undefined;
|
|
||||||
label?: string | undefined;
|
|
||||||
summary?: string | undefined;
|
|
||||||
type?: string | undefined;
|
|
||||||
default?: string | undefined;
|
|
||||||
value?: string | undefined;
|
|
||||||
hidden?: boolean | undefined;
|
|
||||||
advanced?: boolean | undefined;
|
|
||||||
group?: string | undefined;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type Setting = One | Two;
|
|
||||||
|
|
||||||
export type GetServerPreferencesMediaContainer = {
|
export type GetServerPreferencesMediaContainer = {
|
||||||
size?: number | undefined;
|
size?: number | undefined;
|
||||||
setting?: Array<One | Two> | undefined;
|
setting?: Array<Setting> | undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -62,192 +48,96 @@ export type GetServerPreferencesResponse = {
|
|||||||
object?: GetServerPreferencesResponseBody | undefined;
|
object?: GetServerPreferencesResponseBody | undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @internal */
|
|
||||||
export namespace Two$ {
|
|
||||||
export type Inbound = {
|
|
||||||
id?: string | undefined;
|
|
||||||
label?: string | undefined;
|
|
||||||
summary?: string | undefined;
|
|
||||||
type?: string | undefined;
|
|
||||||
default?: number | undefined;
|
|
||||||
value?: number | undefined;
|
|
||||||
hidden?: boolean | undefined;
|
|
||||||
advanced?: boolean | undefined;
|
|
||||||
group?: string | undefined;
|
|
||||||
enumValues?: string | undefined;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const inboundSchema: z.ZodType<Two, z.ZodTypeDef, Inbound> = z
|
|
||||||
.object({
|
|
||||||
id: z.string().optional(),
|
|
||||||
label: z.string().optional(),
|
|
||||||
summary: z.string().optional(),
|
|
||||||
type: z.string().optional(),
|
|
||||||
default: z.number().int().optional(),
|
|
||||||
value: z.number().int().optional(),
|
|
||||||
hidden: z.boolean().optional(),
|
|
||||||
advanced: z.boolean().optional(),
|
|
||||||
group: z.string().optional(),
|
|
||||||
enumValues: z.string().optional(),
|
|
||||||
})
|
|
||||||
.transform((v) => {
|
|
||||||
return {
|
|
||||||
...(v.id === undefined ? null : { id: v.id }),
|
|
||||||
...(v.label === undefined ? null : { label: v.label }),
|
|
||||||
...(v.summary === undefined ? null : { summary: v.summary }),
|
|
||||||
...(v.type === undefined ? null : { type: v.type }),
|
|
||||||
...(v.default === undefined ? null : { default: v.default }),
|
|
||||||
...(v.value === undefined ? null : { value: v.value }),
|
|
||||||
...(v.hidden === undefined ? null : { hidden: v.hidden }),
|
|
||||||
...(v.advanced === undefined ? null : { advanced: v.advanced }),
|
|
||||||
...(v.group === undefined ? null : { group: v.group }),
|
|
||||||
...(v.enumValues === undefined ? null : { enumValues: v.enumValues }),
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
export type Outbound = {
|
|
||||||
id?: string | undefined;
|
|
||||||
label?: string | undefined;
|
|
||||||
summary?: string | undefined;
|
|
||||||
type?: string | undefined;
|
|
||||||
default?: number | undefined;
|
|
||||||
value?: number | undefined;
|
|
||||||
hidden?: boolean | undefined;
|
|
||||||
advanced?: boolean | undefined;
|
|
||||||
group?: string | undefined;
|
|
||||||
enumValues?: string | undefined;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Two> = z
|
|
||||||
.object({
|
|
||||||
id: z.string().optional(),
|
|
||||||
label: z.string().optional(),
|
|
||||||
summary: z.string().optional(),
|
|
||||||
type: z.string().optional(),
|
|
||||||
default: z.number().int().optional(),
|
|
||||||
value: z.number().int().optional(),
|
|
||||||
hidden: z.boolean().optional(),
|
|
||||||
advanced: z.boolean().optional(),
|
|
||||||
group: z.string().optional(),
|
|
||||||
enumValues: z.string().optional(),
|
|
||||||
})
|
|
||||||
.transform((v) => {
|
|
||||||
return {
|
|
||||||
...(v.id === undefined ? null : { id: v.id }),
|
|
||||||
...(v.label === undefined ? null : { label: v.label }),
|
|
||||||
...(v.summary === undefined ? null : { summary: v.summary }),
|
|
||||||
...(v.type === undefined ? null : { type: v.type }),
|
|
||||||
...(v.default === undefined ? null : { default: v.default }),
|
|
||||||
...(v.value === undefined ? null : { value: v.value }),
|
|
||||||
...(v.hidden === undefined ? null : { hidden: v.hidden }),
|
|
||||||
...(v.advanced === undefined ? null : { advanced: v.advanced }),
|
|
||||||
...(v.group === undefined ? null : { group: v.group }),
|
|
||||||
...(v.enumValues === undefined ? null : { enumValues: v.enumValues }),
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @internal */
|
|
||||||
export namespace One$ {
|
|
||||||
export type Inbound = {
|
|
||||||
id?: string | undefined;
|
|
||||||
label?: string | undefined;
|
|
||||||
summary?: string | undefined;
|
|
||||||
type?: string | undefined;
|
|
||||||
default?: string | undefined;
|
|
||||||
value?: string | undefined;
|
|
||||||
hidden?: boolean | undefined;
|
|
||||||
advanced?: boolean | undefined;
|
|
||||||
group?: string | undefined;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const inboundSchema: z.ZodType<One, z.ZodTypeDef, Inbound> = z
|
|
||||||
.object({
|
|
||||||
id: z.string().optional(),
|
|
||||||
label: z.string().optional(),
|
|
||||||
summary: z.string().optional(),
|
|
||||||
type: z.string().optional(),
|
|
||||||
default: z.string().optional(),
|
|
||||||
value: z.string().optional(),
|
|
||||||
hidden: z.boolean().optional(),
|
|
||||||
advanced: z.boolean().optional(),
|
|
||||||
group: z.string().optional(),
|
|
||||||
})
|
|
||||||
.transform((v) => {
|
|
||||||
return {
|
|
||||||
...(v.id === undefined ? null : { id: v.id }),
|
|
||||||
...(v.label === undefined ? null : { label: v.label }),
|
|
||||||
...(v.summary === undefined ? null : { summary: v.summary }),
|
|
||||||
...(v.type === undefined ? null : { type: v.type }),
|
|
||||||
...(v.default === undefined ? null : { default: v.default }),
|
|
||||||
...(v.value === undefined ? null : { value: v.value }),
|
|
||||||
...(v.hidden === undefined ? null : { hidden: v.hidden }),
|
|
||||||
...(v.advanced === undefined ? null : { advanced: v.advanced }),
|
|
||||||
...(v.group === undefined ? null : { group: v.group }),
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
export type Outbound = {
|
|
||||||
id?: string | undefined;
|
|
||||||
label?: string | undefined;
|
|
||||||
summary?: string | undefined;
|
|
||||||
type?: string | undefined;
|
|
||||||
default?: string | undefined;
|
|
||||||
value?: string | undefined;
|
|
||||||
hidden?: boolean | undefined;
|
|
||||||
advanced?: boolean | undefined;
|
|
||||||
group?: string | undefined;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, One> = z
|
|
||||||
.object({
|
|
||||||
id: z.string().optional(),
|
|
||||||
label: z.string().optional(),
|
|
||||||
summary: z.string().optional(),
|
|
||||||
type: z.string().optional(),
|
|
||||||
default: z.string().optional(),
|
|
||||||
value: z.string().optional(),
|
|
||||||
hidden: z.boolean().optional(),
|
|
||||||
advanced: z.boolean().optional(),
|
|
||||||
group: z.string().optional(),
|
|
||||||
})
|
|
||||||
.transform((v) => {
|
|
||||||
return {
|
|
||||||
...(v.id === undefined ? null : { id: v.id }),
|
|
||||||
...(v.label === undefined ? null : { label: v.label }),
|
|
||||||
...(v.summary === undefined ? null : { summary: v.summary }),
|
|
||||||
...(v.type === undefined ? null : { type: v.type }),
|
|
||||||
...(v.default === undefined ? null : { default: v.default }),
|
|
||||||
...(v.value === undefined ? null : { value: v.value }),
|
|
||||||
...(v.hidden === undefined ? null : { hidden: v.hidden }),
|
|
||||||
...(v.advanced === undefined ? null : { advanced: v.advanced }),
|
|
||||||
...(v.group === undefined ? null : { group: v.group }),
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @internal */
|
/** @internal */
|
||||||
export namespace Setting$ {
|
export namespace Setting$ {
|
||||||
export type Inbound = One$.Inbound | Two$.Inbound;
|
export type Inbound = {
|
||||||
|
id?: string | undefined;
|
||||||
|
label?: string | undefined;
|
||||||
|
summary?: string | undefined;
|
||||||
|
type?: string | undefined;
|
||||||
|
default?: boolean | undefined;
|
||||||
|
value?: boolean | undefined;
|
||||||
|
hidden?: boolean | undefined;
|
||||||
|
advanced?: boolean | undefined;
|
||||||
|
group?: string | undefined;
|
||||||
|
enumValues?: string | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
export type Outbound = One$.Outbound | Two$.Outbound;
|
export const inboundSchema: z.ZodType<Setting, z.ZodTypeDef, Inbound> = z
|
||||||
|
.object({
|
||||||
|
id: z.string().optional(),
|
||||||
|
label: z.string().optional(),
|
||||||
|
summary: z.string().optional(),
|
||||||
|
type: z.string().optional(),
|
||||||
|
default: z.boolean().optional(),
|
||||||
|
value: z.boolean().optional(),
|
||||||
|
hidden: z.boolean().optional(),
|
||||||
|
advanced: z.boolean().optional(),
|
||||||
|
group: z.string().optional(),
|
||||||
|
enumValues: z.string().optional(),
|
||||||
|
})
|
||||||
|
.transform((v) => {
|
||||||
|
return {
|
||||||
|
...(v.id === undefined ? null : { id: v.id }),
|
||||||
|
...(v.label === undefined ? null : { label: v.label }),
|
||||||
|
...(v.summary === undefined ? null : { summary: v.summary }),
|
||||||
|
...(v.type === undefined ? null : { type: v.type }),
|
||||||
|
...(v.default === undefined ? null : { default: v.default }),
|
||||||
|
...(v.value === undefined ? null : { value: v.value }),
|
||||||
|
...(v.hidden === undefined ? null : { hidden: v.hidden }),
|
||||||
|
...(v.advanced === undefined ? null : { advanced: v.advanced }),
|
||||||
|
...(v.group === undefined ? null : { group: v.group }),
|
||||||
|
...(v.enumValues === undefined ? null : { enumValues: v.enumValues }),
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
export const inboundSchema: z.ZodType<Setting, z.ZodTypeDef, Inbound> = z.union([
|
export type Outbound = {
|
||||||
z.lazy(() => One$.inboundSchema),
|
id?: string | undefined;
|
||||||
z.lazy(() => Two$.inboundSchema),
|
label?: string | undefined;
|
||||||
]);
|
summary?: string | undefined;
|
||||||
|
type?: string | undefined;
|
||||||
|
default?: boolean | undefined;
|
||||||
|
value?: boolean | undefined;
|
||||||
|
hidden?: boolean | undefined;
|
||||||
|
advanced?: boolean | undefined;
|
||||||
|
group?: string | undefined;
|
||||||
|
enumValues?: string | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Setting> = z.union([
|
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Setting> = z
|
||||||
z.lazy(() => One$.outboundSchema),
|
.object({
|
||||||
z.lazy(() => Two$.outboundSchema),
|
id: z.string().optional(),
|
||||||
]);
|
label: z.string().optional(),
|
||||||
|
summary: z.string().optional(),
|
||||||
|
type: z.string().optional(),
|
||||||
|
default: z.boolean().optional(),
|
||||||
|
value: z.boolean().optional(),
|
||||||
|
hidden: z.boolean().optional(),
|
||||||
|
advanced: z.boolean().optional(),
|
||||||
|
group: z.string().optional(),
|
||||||
|
enumValues: z.string().optional(),
|
||||||
|
})
|
||||||
|
.transform((v) => {
|
||||||
|
return {
|
||||||
|
...(v.id === undefined ? null : { id: v.id }),
|
||||||
|
...(v.label === undefined ? null : { label: v.label }),
|
||||||
|
...(v.summary === undefined ? null : { summary: v.summary }),
|
||||||
|
...(v.type === undefined ? null : { type: v.type }),
|
||||||
|
...(v.default === undefined ? null : { default: v.default }),
|
||||||
|
...(v.value === undefined ? null : { value: v.value }),
|
||||||
|
...(v.hidden === undefined ? null : { hidden: v.hidden }),
|
||||||
|
...(v.advanced === undefined ? null : { advanced: v.advanced }),
|
||||||
|
...(v.group === undefined ? null : { group: v.group }),
|
||||||
|
...(v.enumValues === undefined ? null : { enumValues: v.enumValues }),
|
||||||
|
};
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @internal */
|
/** @internal */
|
||||||
export namespace GetServerPreferencesMediaContainer$ {
|
export namespace GetServerPreferencesMediaContainer$ {
|
||||||
export type Inbound = {
|
export type Inbound = {
|
||||||
size?: number | undefined;
|
size?: number | undefined;
|
||||||
Setting?: Array<One$.Inbound | Two$.Inbound> | undefined;
|
Setting?: Array<Setting$.Inbound> | undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const inboundSchema: z.ZodType<
|
export const inboundSchema: z.ZodType<
|
||||||
@@ -257,11 +147,7 @@ export namespace GetServerPreferencesMediaContainer$ {
|
|||||||
> = z
|
> = z
|
||||||
.object({
|
.object({
|
||||||
size: z.number().int().optional(),
|
size: z.number().int().optional(),
|
||||||
Setting: z
|
Setting: z.array(z.lazy(() => Setting$.inboundSchema)).optional(),
|
||||||
.array(
|
|
||||||
z.union([z.lazy(() => One$.inboundSchema), z.lazy(() => Two$.inboundSchema)])
|
|
||||||
)
|
|
||||||
.optional(),
|
|
||||||
})
|
})
|
||||||
.transform((v) => {
|
.transform((v) => {
|
||||||
return {
|
return {
|
||||||
@@ -272,7 +158,7 @@ export namespace GetServerPreferencesMediaContainer$ {
|
|||||||
|
|
||||||
export type Outbound = {
|
export type Outbound = {
|
||||||
size?: number | undefined;
|
size?: number | undefined;
|
||||||
Setting?: Array<One$.Outbound | Two$.Outbound> | undefined;
|
Setting?: Array<Setting$.Outbound> | undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const outboundSchema: z.ZodType<
|
export const outboundSchema: z.ZodType<
|
||||||
@@ -282,11 +168,7 @@ export namespace GetServerPreferencesMediaContainer$ {
|
|||||||
> = z
|
> = z
|
||||||
.object({
|
.object({
|
||||||
size: z.number().int().optional(),
|
size: z.number().int().optional(),
|
||||||
setting: z
|
setting: z.array(z.lazy(() => Setting$.outboundSchema)).optional(),
|
||||||
.array(
|
|
||||||
z.union([z.lazy(() => One$.outboundSchema), z.lazy(() => Two$.outboundSchema)])
|
|
||||||
)
|
|
||||||
.optional(),
|
|
||||||
})
|
})
|
||||||
.transform((v) => {
|
.transform((v) => {
|
||||||
return {
|
return {
|
||||||
|
|||||||
455
src/models/operations/getstatistics.ts
Normal file
455
src/models/operations/getstatistics.ts
Normal file
@@ -0,0 +1,455 @@
|
|||||||
|
/*
|
||||||
|
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { z } from "zod";
|
||||||
|
|
||||||
|
export type GetStatisticsRequest = {
|
||||||
|
/**
|
||||||
|
* The timespan to retrieve statistics for
|
||||||
|
*
|
||||||
|
* @remarks
|
||||||
|
* the exact meaning of this parameter is not known
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
timespan?: number | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type GetStatisticsDevice = {
|
||||||
|
id?: number | undefined;
|
||||||
|
name?: string | undefined;
|
||||||
|
platform?: string | undefined;
|
||||||
|
clientIdentifier?: string | undefined;
|
||||||
|
createdAt?: number | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type Account = {
|
||||||
|
id?: number | undefined;
|
||||||
|
key?: string | undefined;
|
||||||
|
name?: string | undefined;
|
||||||
|
defaultAudioLanguage?: string | undefined;
|
||||||
|
autoSelectAudio?: boolean | undefined;
|
||||||
|
defaultSubtitleLanguage?: string | undefined;
|
||||||
|
subtitleMode?: number | undefined;
|
||||||
|
thumb?: string | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type StatisticsMedia = {
|
||||||
|
accountID?: number | undefined;
|
||||||
|
deviceID?: number | undefined;
|
||||||
|
timespan?: number | undefined;
|
||||||
|
at?: number | undefined;
|
||||||
|
metadataType?: number | undefined;
|
||||||
|
count?: number | undefined;
|
||||||
|
duration?: number | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type GetStatisticsMediaContainer = {
|
||||||
|
size?: number | undefined;
|
||||||
|
device?: Array<GetStatisticsDevice> | undefined;
|
||||||
|
account?: Array<Account> | undefined;
|
||||||
|
statisticsMedia?: Array<StatisticsMedia> | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Media Statistics
|
||||||
|
*/
|
||||||
|
export type GetStatisticsResponseBody = {
|
||||||
|
mediaContainer?: GetStatisticsMediaContainer | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type GetStatisticsResponse = {
|
||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
/**
|
||||||
|
* Media Statistics
|
||||||
|
*/
|
||||||
|
object?: GetStatisticsResponseBody | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** @internal */
|
||||||
|
export namespace GetStatisticsRequest$ {
|
||||||
|
export type Inbound = {
|
||||||
|
Timespan?: number | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const inboundSchema: z.ZodType<GetStatisticsRequest, z.ZodTypeDef, Inbound> = z
|
||||||
|
.object({
|
||||||
|
Timespan: z.number().int().optional(),
|
||||||
|
})
|
||||||
|
.transform((v) => {
|
||||||
|
return {
|
||||||
|
...(v.Timespan === undefined ? null : { timespan: v.Timespan }),
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
export type Outbound = {
|
||||||
|
Timespan?: number | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetStatisticsRequest> = z
|
||||||
|
.object({
|
||||||
|
timespan: z.number().int().optional(),
|
||||||
|
})
|
||||||
|
.transform((v) => {
|
||||||
|
return {
|
||||||
|
...(v.timespan === undefined ? null : { Timespan: v.timespan }),
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @internal */
|
||||||
|
export namespace GetStatisticsDevice$ {
|
||||||
|
export type Inbound = {
|
||||||
|
id?: number | undefined;
|
||||||
|
name?: string | undefined;
|
||||||
|
platform?: string | undefined;
|
||||||
|
clientIdentifier?: string | undefined;
|
||||||
|
createdAt?: number | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const inboundSchema: z.ZodType<GetStatisticsDevice, z.ZodTypeDef, Inbound> = z
|
||||||
|
.object({
|
||||||
|
id: z.number().int().optional(),
|
||||||
|
name: z.string().optional(),
|
||||||
|
platform: z.string().optional(),
|
||||||
|
clientIdentifier: z.string().optional(),
|
||||||
|
createdAt: z.number().int().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<Outbound, z.ZodTypeDef, GetStatisticsDevice> = z
|
||||||
|
.object({
|
||||||
|
id: z.number().int().optional(),
|
||||||
|
name: z.string().optional(),
|
||||||
|
platform: z.string().optional(),
|
||||||
|
clientIdentifier: z.string().optional(),
|
||||||
|
createdAt: z.number().int().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 Account$ {
|
||||||
|
export type Inbound = {
|
||||||
|
id?: number | undefined;
|
||||||
|
key?: string | undefined;
|
||||||
|
name?: string | undefined;
|
||||||
|
defaultAudioLanguage?: string | undefined;
|
||||||
|
autoSelectAudio?: boolean | undefined;
|
||||||
|
defaultSubtitleLanguage?: string | undefined;
|
||||||
|
subtitleMode?: number | undefined;
|
||||||
|
thumb?: string | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const inboundSchema: z.ZodType<Account, z.ZodTypeDef, Inbound> = z
|
||||||
|
.object({
|
||||||
|
id: z.number().int().optional(),
|
||||||
|
key: z.string().optional(),
|
||||||
|
name: z.string().optional(),
|
||||||
|
defaultAudioLanguage: z.string().optional(),
|
||||||
|
autoSelectAudio: z.boolean().optional(),
|
||||||
|
defaultSubtitleLanguage: z.string().optional(),
|
||||||
|
subtitleMode: z.number().int().optional(),
|
||||||
|
thumb: z.string().optional(),
|
||||||
|
})
|
||||||
|
.transform((v) => {
|
||||||
|
return {
|
||||||
|
...(v.id === undefined ? null : { id: v.id }),
|
||||||
|
...(v.key === undefined ? null : { key: v.key }),
|
||||||
|
...(v.name === undefined ? null : { name: v.name }),
|
||||||
|
...(v.defaultAudioLanguage === undefined
|
||||||
|
? null
|
||||||
|
: { defaultAudioLanguage: v.defaultAudioLanguage }),
|
||||||
|
...(v.autoSelectAudio === undefined
|
||||||
|
? null
|
||||||
|
: { autoSelectAudio: v.autoSelectAudio }),
|
||||||
|
...(v.defaultSubtitleLanguage === undefined
|
||||||
|
? null
|
||||||
|
: { defaultSubtitleLanguage: v.defaultSubtitleLanguage }),
|
||||||
|
...(v.subtitleMode === undefined ? null : { subtitleMode: v.subtitleMode }),
|
||||||
|
...(v.thumb === undefined ? null : { thumb: v.thumb }),
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
export type Outbound = {
|
||||||
|
id?: number | undefined;
|
||||||
|
key?: string | undefined;
|
||||||
|
name?: string | undefined;
|
||||||
|
defaultAudioLanguage?: string | undefined;
|
||||||
|
autoSelectAudio?: boolean | undefined;
|
||||||
|
defaultSubtitleLanguage?: string | undefined;
|
||||||
|
subtitleMode?: number | undefined;
|
||||||
|
thumb?: string | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Account> = z
|
||||||
|
.object({
|
||||||
|
id: z.number().int().optional(),
|
||||||
|
key: z.string().optional(),
|
||||||
|
name: z.string().optional(),
|
||||||
|
defaultAudioLanguage: z.string().optional(),
|
||||||
|
autoSelectAudio: z.boolean().optional(),
|
||||||
|
defaultSubtitleLanguage: z.string().optional(),
|
||||||
|
subtitleMode: z.number().int().optional(),
|
||||||
|
thumb: z.string().optional(),
|
||||||
|
})
|
||||||
|
.transform((v) => {
|
||||||
|
return {
|
||||||
|
...(v.id === undefined ? null : { id: v.id }),
|
||||||
|
...(v.key === undefined ? null : { key: v.key }),
|
||||||
|
...(v.name === undefined ? null : { name: v.name }),
|
||||||
|
...(v.defaultAudioLanguage === undefined
|
||||||
|
? null
|
||||||
|
: { defaultAudioLanguage: v.defaultAudioLanguage }),
|
||||||
|
...(v.autoSelectAudio === undefined
|
||||||
|
? null
|
||||||
|
: { autoSelectAudio: v.autoSelectAudio }),
|
||||||
|
...(v.defaultSubtitleLanguage === undefined
|
||||||
|
? null
|
||||||
|
: { defaultSubtitleLanguage: v.defaultSubtitleLanguage }),
|
||||||
|
...(v.subtitleMode === undefined ? null : { subtitleMode: v.subtitleMode }),
|
||||||
|
...(v.thumb === undefined ? null : { thumb: v.thumb }),
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @internal */
|
||||||
|
export namespace StatisticsMedia$ {
|
||||||
|
export type Inbound = {
|
||||||
|
accountID?: number | undefined;
|
||||||
|
deviceID?: number | undefined;
|
||||||
|
timespan?: number | undefined;
|
||||||
|
at?: number | undefined;
|
||||||
|
metadataType?: number | undefined;
|
||||||
|
count?: number | undefined;
|
||||||
|
duration?: number | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const inboundSchema: z.ZodType<StatisticsMedia, z.ZodTypeDef, Inbound> = z
|
||||||
|
.object({
|
||||||
|
accountID: z.number().int().optional(),
|
||||||
|
deviceID: z.number().int().optional(),
|
||||||
|
timespan: z.number().int().optional(),
|
||||||
|
at: z.number().int().optional(),
|
||||||
|
metadataType: z.number().int().optional(),
|
||||||
|
count: z.number().int().optional(),
|
||||||
|
duration: z.number().int().optional(),
|
||||||
|
})
|
||||||
|
.transform((v) => {
|
||||||
|
return {
|
||||||
|
...(v.accountID === undefined ? null : { accountID: v.accountID }),
|
||||||
|
...(v.deviceID === undefined ? null : { deviceID: v.deviceID }),
|
||||||
|
...(v.timespan === undefined ? null : { timespan: v.timespan }),
|
||||||
|
...(v.at === undefined ? null : { at: v.at }),
|
||||||
|
...(v.metadataType === undefined ? null : { metadataType: v.metadataType }),
|
||||||
|
...(v.count === undefined ? null : { count: v.count }),
|
||||||
|
...(v.duration === undefined ? null : { duration: v.duration }),
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
export type Outbound = {
|
||||||
|
accountID?: number | undefined;
|
||||||
|
deviceID?: number | undefined;
|
||||||
|
timespan?: number | undefined;
|
||||||
|
at?: number | undefined;
|
||||||
|
metadataType?: number | undefined;
|
||||||
|
count?: number | undefined;
|
||||||
|
duration?: number | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, StatisticsMedia> = z
|
||||||
|
.object({
|
||||||
|
accountID: z.number().int().optional(),
|
||||||
|
deviceID: z.number().int().optional(),
|
||||||
|
timespan: z.number().int().optional(),
|
||||||
|
at: z.number().int().optional(),
|
||||||
|
metadataType: z.number().int().optional(),
|
||||||
|
count: z.number().int().optional(),
|
||||||
|
duration: z.number().int().optional(),
|
||||||
|
})
|
||||||
|
.transform((v) => {
|
||||||
|
return {
|
||||||
|
...(v.accountID === undefined ? null : { accountID: v.accountID }),
|
||||||
|
...(v.deviceID === undefined ? null : { deviceID: v.deviceID }),
|
||||||
|
...(v.timespan === undefined ? null : { timespan: v.timespan }),
|
||||||
|
...(v.at === undefined ? null : { at: v.at }),
|
||||||
|
...(v.metadataType === undefined ? null : { metadataType: v.metadataType }),
|
||||||
|
...(v.count === undefined ? null : { count: v.count }),
|
||||||
|
...(v.duration === undefined ? null : { duration: v.duration }),
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @internal */
|
||||||
|
export namespace GetStatisticsMediaContainer$ {
|
||||||
|
export type Inbound = {
|
||||||
|
size?: number | undefined;
|
||||||
|
Device?: Array<GetStatisticsDevice$.Inbound> | undefined;
|
||||||
|
Account?: Array<Account$.Inbound> | undefined;
|
||||||
|
StatisticsMedia?: Array<StatisticsMedia$.Inbound> | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const inboundSchema: z.ZodType<GetStatisticsMediaContainer, z.ZodTypeDef, Inbound> = z
|
||||||
|
.object({
|
||||||
|
size: z.number().int().optional(),
|
||||||
|
Device: z.array(z.lazy(() => GetStatisticsDevice$.inboundSchema)).optional(),
|
||||||
|
Account: z.array(z.lazy(() => Account$.inboundSchema)).optional(),
|
||||||
|
StatisticsMedia: z.array(z.lazy(() => StatisticsMedia$.inboundSchema)).optional(),
|
||||||
|
})
|
||||||
|
.transform((v) => {
|
||||||
|
return {
|
||||||
|
...(v.size === undefined ? null : { size: v.size }),
|
||||||
|
...(v.Device === undefined ? null : { device: v.Device }),
|
||||||
|
...(v.Account === undefined ? null : { account: v.Account }),
|
||||||
|
...(v.StatisticsMedia === undefined
|
||||||
|
? null
|
||||||
|
: { statisticsMedia: v.StatisticsMedia }),
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
export type Outbound = {
|
||||||
|
size?: number | undefined;
|
||||||
|
Device?: Array<GetStatisticsDevice$.Outbound> | undefined;
|
||||||
|
Account?: Array<Account$.Outbound> | undefined;
|
||||||
|
StatisticsMedia?: Array<StatisticsMedia$.Outbound> | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetStatisticsMediaContainer> = z
|
||||||
|
.object({
|
||||||
|
size: z.number().int().optional(),
|
||||||
|
device: z.array(z.lazy(() => GetStatisticsDevice$.outboundSchema)).optional(),
|
||||||
|
account: z.array(z.lazy(() => Account$.outboundSchema)).optional(),
|
||||||
|
statisticsMedia: z.array(z.lazy(() => StatisticsMedia$.outboundSchema)).optional(),
|
||||||
|
})
|
||||||
|
.transform((v) => {
|
||||||
|
return {
|
||||||
|
...(v.size === undefined ? null : { size: v.size }),
|
||||||
|
...(v.device === undefined ? null : { Device: v.device }),
|
||||||
|
...(v.account === undefined ? null : { Account: v.account }),
|
||||||
|
...(v.statisticsMedia === undefined
|
||||||
|
? null
|
||||||
|
: { StatisticsMedia: v.statisticsMedia }),
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @internal */
|
||||||
|
export namespace GetStatisticsResponseBody$ {
|
||||||
|
export type Inbound = {
|
||||||
|
MediaContainer?: GetStatisticsMediaContainer$.Inbound | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const inboundSchema: z.ZodType<GetStatisticsResponseBody, z.ZodTypeDef, Inbound> = z
|
||||||
|
.object({
|
||||||
|
MediaContainer: z.lazy(() => GetStatisticsMediaContainer$.inboundSchema).optional(),
|
||||||
|
})
|
||||||
|
.transform((v) => {
|
||||||
|
return {
|
||||||
|
...(v.MediaContainer === undefined ? null : { mediaContainer: v.MediaContainer }),
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
export type Outbound = {
|
||||||
|
MediaContainer?: GetStatisticsMediaContainer$.Outbound | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetStatisticsResponseBody> = z
|
||||||
|
.object({
|
||||||
|
mediaContainer: z.lazy(() => GetStatisticsMediaContainer$.outboundSchema).optional(),
|
||||||
|
})
|
||||||
|
.transform((v) => {
|
||||||
|
return {
|
||||||
|
...(v.mediaContainer === undefined ? null : { MediaContainer: v.mediaContainer }),
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @internal */
|
||||||
|
export namespace GetStatisticsResponse$ {
|
||||||
|
export type Inbound = {
|
||||||
|
ContentType: string;
|
||||||
|
StatusCode: number;
|
||||||
|
RawResponse: Response;
|
||||||
|
object?: GetStatisticsResponseBody$.Inbound | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const inboundSchema: z.ZodType<GetStatisticsResponse, z.ZodTypeDef, Inbound> = z
|
||||||
|
.object({
|
||||||
|
ContentType: z.string(),
|
||||||
|
StatusCode: z.number().int(),
|
||||||
|
RawResponse: z.instanceof(Response),
|
||||||
|
object: z.lazy(() => GetStatisticsResponseBody$.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?: GetStatisticsResponseBody$.Outbound | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetStatisticsResponse> = z
|
||||||
|
.object({
|
||||||
|
contentType: z.string(),
|
||||||
|
statusCode: z.number().int(),
|
||||||
|
rawResponse: z.instanceof(Response).transform(() => {
|
||||||
|
throw new Error("Response cannot be serialized");
|
||||||
|
}),
|
||||||
|
object: z.lazy(() => GetStatisticsResponseBody$.outboundSchema).optional(),
|
||||||
|
})
|
||||||
|
.transform((v) => {
|
||||||
|
return {
|
||||||
|
ContentType: v.contentType,
|
||||||
|
StatusCode: v.statusCode,
|
||||||
|
RawResponse: v.rawResponse,
|
||||||
|
...(v.object === undefined ? null : { object: v.object }),
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -39,6 +39,7 @@ export * from "./getserverpreferences";
|
|||||||
export * from "./getsessionhistory";
|
export * from "./getsessionhistory";
|
||||||
export * from "./getsessions";
|
export * from "./getsessions";
|
||||||
export * from "./getsourceconnectioninformation";
|
export * from "./getsourceconnectioninformation";
|
||||||
|
export * from "./getstatistics";
|
||||||
export * from "./gettimeline";
|
export * from "./gettimeline";
|
||||||
export * from "./gettoken";
|
export * from "./gettoken";
|
||||||
export * from "./gettranscodesessions";
|
export * from "./gettranscodesessions";
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ export namespace PerformSearchRequest$ {
|
|||||||
return {
|
return {
|
||||||
query: v.query,
|
query: v.query,
|
||||||
...(v.sectionId === undefined ? null : { sectionId: v.sectionId }),
|
...(v.sectionId === undefined ? null : { sectionId: v.sectionId }),
|
||||||
...(v.limit === undefined ? null : { limit: v.limit }),
|
limit: v.limit,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ export namespace PerformVoiceSearchRequest$ {
|
|||||||
return {
|
return {
|
||||||
query: v.query,
|
query: v.query,
|
||||||
...(v.sectionId === undefined ? null : { sectionId: v.sectionId }),
|
...(v.sectionId === undefined ? null : { sectionId: v.sectionId }),
|
||||||
...(v.limit === undefined ? null : { limit: v.limit }),
|
limit: v.limit,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user