mirror of
https://github.com/LukeHagar/plexjs.git
synced 2025-12-06 20:47:46 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b562d2a68e |
@@ -1,12 +1,12 @@
|
||||
lockVersion: 2.0.0
|
||||
id: 16f22cbf-f23f-4419-8924-3a4b06381947
|
||||
management:
|
||||
docChecksum: 45c73686e6dbe8c29b7e2857b6194ccf
|
||||
docChecksum: a14d0ae27d4f5bd83b80747112f74352
|
||||
docVersion: 0.0.3
|
||||
speakeasyVersion: internal
|
||||
generationVersion: 2.237.2
|
||||
releaseVersion: 0.4.1
|
||||
configChecksum: 2bbf5255fdb0ef20c753ed46816eda5b
|
||||
releaseVersion: 0.4.2
|
||||
configChecksum: 6e80d271f4991201f5c573665ed48a76
|
||||
repoURL: https://github.com/LukeHagar/plexjs.git
|
||||
repoSubDirectory: .
|
||||
installationURL: https://github.com/LukeHagar/plexjs
|
||||
@@ -272,6 +272,9 @@ generatedFiles:
|
||||
- docs/models/operations/getlibrariesresponse.md
|
||||
- docs/models/operations/includedetails.md
|
||||
- docs/models/operations/getlibraryrequest.md
|
||||
- docs/models/operations/getlibrarydirectory.md
|
||||
- docs/models/operations/getlibrarymediacontainer.md
|
||||
- docs/models/operations/getlibraryresponsebody.md
|
||||
- docs/models/operations/getlibraryresponse.md
|
||||
- docs/models/operations/deletelibraryrequest.md
|
||||
- docs/models/operations/deletelibraryresponse.md
|
||||
|
||||
10
RELEASES.md
10
RELEASES.md
@@ -99,3 +99,13 @@ Based on:
|
||||
- [typescript v0.4.1] .
|
||||
### Releases
|
||||
- [NPM v0.4.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.4.1 - .
|
||||
|
||||
## 2024-01-19 17:27:25
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc 0.0.3
|
||||
- Speakeasy CLI 1.147.0 (2.237.2) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [typescript v0.4.2] .
|
||||
### Releases
|
||||
- [NPM v0.4.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.4.2 - .
|
||||
12
docs/models/operations/getlibrarydirectory.md
Normal file
12
docs/models/operations/getlibrarydirectory.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# GetLibraryDirectory
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `secondary` | *boolean* | :heavy_minus_sign: | N/A | true |
|
||||
| `prompt` | *string* | :heavy_minus_sign: | N/A | Search Movies |
|
||||
| `search` | *boolean* | :heavy_minus_sign: | N/A | true |
|
||||
| `key` | *string* | :heavy_minus_sign: | N/A | search?type=1 |
|
||||
| `title` | *string* | :heavy_minus_sign: | N/A | Search... |
|
||||
20
docs/models/operations/getlibrarymediacontainer.md
Normal file
20
docs/models/operations/getlibrarymediacontainer.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# GetLibraryMediaContainer
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
|
||||
| `size` | *number* | :heavy_minus_sign: | N/A | 20 |
|
||||
| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | false |
|
||||
| `art` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg |
|
||||
| `content` | *string* | :heavy_minus_sign: | N/A | secondary |
|
||||
| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library |
|
||||
| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `mediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ |
|
||||
| `mediaTagVersion` | *number* | :heavy_minus_sign: | N/A | 1698860922 |
|
||||
| `thumb` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie.png |
|
||||
| `title1` | *string* | :heavy_minus_sign: | N/A | Movies |
|
||||
| `viewGroup` | *string* | :heavy_minus_sign: | N/A | secondary |
|
||||
| `viewMode` | *number* | :heavy_minus_sign: | N/A | 65592 |
|
||||
| `directory` | [operations.GetLibraryDirectory](../../models/operations/getlibrarydirectory.md)[] | :heavy_minus_sign: | N/A | [{"key":"search?type=1","prompt":"Search Movies","search":true,"secondary":true,"title":"Search..."}] |
|
||||
@@ -4,7 +4,8 @@
|
||||
## 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.GetLibraryResponseBody](../../models/operations/getlibraryresponsebody.md) | :heavy_minus_sign: | The details of the library |
|
||||
10
docs/models/operations/getlibraryresponsebody.md
Normal file
10
docs/models/operations/getlibraryresponsebody.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# GetLibraryResponseBody
|
||||
|
||||
The details of the library
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
|
||||
| `mediaContainer` | [operations.GetLibraryMediaContainer](../../models/operations/getlibrarymediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||
2
gen.yaml
2
gen.yaml
@@ -8,7 +8,7 @@ generation:
|
||||
fixes:
|
||||
nameResolutionDec2023: false
|
||||
typescript:
|
||||
version: 0.4.1
|
||||
version: 0.4.2
|
||||
author: LukeHagar
|
||||
clientServerStatusCodesAsErrors: true
|
||||
flattenGlobalSecurity: true
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@lukehagar/plexjs",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@lukehagar/plexjs",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"dependencies": {
|
||||
"decimal.js": "^10.4.3",
|
||||
"jsonpath": "^1.1.1"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"type": "commonjs",
|
||||
"name": "@lukehagar/plexjs",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"author": "LukeHagar",
|
||||
"main": "./index.js",
|
||||
"sideEffects": false,
|
||||
|
||||
@@ -79,7 +79,7 @@ export function serverURLFromOptions(options: SDKOptions): URL {
|
||||
export const SDK_METADATA = Object.freeze({
|
||||
language: "typescript",
|
||||
openapiDocVersion: "0.0.3",
|
||||
sdkVersion: "0.4.1",
|
||||
sdkVersion: "0.4.2",
|
||||
genVersion: "2.237.2",
|
||||
userAgent: "speakeasy-sdk/typescript 0.4.1 2.237.2 0.0.3 @lukehagar/plexjs",
|
||||
userAgent: "speakeasy-sdk/typescript 0.4.2 2.237.2 0.0.3 @lukehagar/plexjs",
|
||||
});
|
||||
|
||||
@@ -31,6 +31,37 @@ export type GetLibraryRequest = {
|
||||
includeDetails?: IncludeDetails | undefined;
|
||||
};
|
||||
|
||||
export type GetLibraryDirectory = {
|
||||
secondary?: boolean | undefined;
|
||||
prompt?: string | undefined;
|
||||
search?: boolean | undefined;
|
||||
key?: string | undefined;
|
||||
title?: string | undefined;
|
||||
};
|
||||
|
||||
export type GetLibraryMediaContainer = {
|
||||
size?: number | undefined;
|
||||
allowSync?: boolean | undefined;
|
||||
art?: string | undefined;
|
||||
content?: string | undefined;
|
||||
identifier?: string | undefined;
|
||||
librarySectionID?: number | undefined;
|
||||
mediaTagPrefix?: string | undefined;
|
||||
mediaTagVersion?: number | undefined;
|
||||
thumb?: string | undefined;
|
||||
title1?: string | undefined;
|
||||
viewGroup?: string | undefined;
|
||||
viewMode?: number | undefined;
|
||||
directory?: Array<GetLibraryDirectory> | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The details of the library
|
||||
*/
|
||||
export type GetLibraryResponseBody = {
|
||||
mediaContainer?: GetLibraryMediaContainer | undefined;
|
||||
};
|
||||
|
||||
export type GetLibraryResponse = {
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
@@ -44,6 +75,10 @@ export type GetLibraryResponse = {
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
rawResponse: Response;
|
||||
/**
|
||||
* The details of the library
|
||||
*/
|
||||
object?: GetLibraryResponseBody | undefined;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
@@ -86,12 +121,210 @@ export namespace GetLibraryRequest$ {
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace GetLibraryDirectory$ {
|
||||
export type Inbound = {
|
||||
secondary?: boolean | undefined;
|
||||
prompt?: string | undefined;
|
||||
search?: boolean | undefined;
|
||||
key?: string | undefined;
|
||||
title?: string | undefined;
|
||||
};
|
||||
|
||||
export const inboundSchema: z.ZodType<GetLibraryDirectory, z.ZodTypeDef, Inbound> = z
|
||||
.object({
|
||||
secondary: z.boolean().optional(),
|
||||
prompt: z.string().optional(),
|
||||
search: z.boolean().optional(),
|
||||
key: z.string().optional(),
|
||||
title: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
...(v.secondary === undefined ? null : { secondary: v.secondary }),
|
||||
...(v.prompt === undefined ? null : { prompt: v.prompt }),
|
||||
...(v.search === undefined ? null : { search: v.search }),
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.title === undefined ? null : { title: v.title }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
secondary?: boolean | undefined;
|
||||
prompt?: string | undefined;
|
||||
search?: boolean | undefined;
|
||||
key?: string | undefined;
|
||||
title?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryDirectory> = z
|
||||
.object({
|
||||
secondary: z.boolean().optional(),
|
||||
prompt: z.string().optional(),
|
||||
search: z.boolean().optional(),
|
||||
key: z.string().optional(),
|
||||
title: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
...(v.secondary === undefined ? null : { secondary: v.secondary }),
|
||||
...(v.prompt === undefined ? null : { prompt: v.prompt }),
|
||||
...(v.search === undefined ? null : { search: v.search }),
|
||||
...(v.key === undefined ? null : { key: v.key }),
|
||||
...(v.title === undefined ? null : { title: v.title }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace GetLibraryMediaContainer$ {
|
||||
export type Inbound = {
|
||||
size?: number | undefined;
|
||||
allowSync?: boolean | undefined;
|
||||
art?: string | undefined;
|
||||
content?: string | undefined;
|
||||
identifier?: string | undefined;
|
||||
librarySectionID?: number | undefined;
|
||||
mediaTagPrefix?: string | undefined;
|
||||
mediaTagVersion?: number | undefined;
|
||||
thumb?: string | undefined;
|
||||
title1?: string | undefined;
|
||||
viewGroup?: string | undefined;
|
||||
viewMode?: number | undefined;
|
||||
Directory?: Array<GetLibraryDirectory$.Inbound> | undefined;
|
||||
};
|
||||
|
||||
export const inboundSchema: z.ZodType<GetLibraryMediaContainer, z.ZodTypeDef, Inbound> = z
|
||||
.object({
|
||||
size: z.number().int().optional(),
|
||||
allowSync: z.boolean().optional(),
|
||||
art: z.string().optional(),
|
||||
content: z.string().optional(),
|
||||
identifier: z.string().optional(),
|
||||
librarySectionID: z.number().int().optional(),
|
||||
mediaTagPrefix: z.string().optional(),
|
||||
mediaTagVersion: z.number().int().optional(),
|
||||
thumb: z.string().optional(),
|
||||
title1: z.string().optional(),
|
||||
viewGroup: z.string().optional(),
|
||||
viewMode: z.number().int().optional(),
|
||||
Directory: z.array(z.lazy(() => GetLibraryDirectory$.inboundSchema)).optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
...(v.size === undefined ? null : { size: v.size }),
|
||||
...(v.allowSync === undefined ? null : { allowSync: v.allowSync }),
|
||||
...(v.art === undefined ? null : { art: v.art }),
|
||||
...(v.content === undefined ? null : { content: v.content }),
|
||||
...(v.identifier === undefined ? null : { identifier: v.identifier }),
|
||||
...(v.librarySectionID === undefined
|
||||
? null
|
||||
: { librarySectionID: v.librarySectionID }),
|
||||
...(v.mediaTagPrefix === undefined ? null : { mediaTagPrefix: v.mediaTagPrefix }),
|
||||
...(v.mediaTagVersion === undefined
|
||||
? null
|
||||
: { mediaTagVersion: v.mediaTagVersion }),
|
||||
...(v.thumb === undefined ? null : { thumb: v.thumb }),
|
||||
...(v.title1 === undefined ? null : { title1: v.title1 }),
|
||||
...(v.viewGroup === undefined ? null : { viewGroup: v.viewGroup }),
|
||||
...(v.viewMode === undefined ? null : { viewMode: v.viewMode }),
|
||||
...(v.Directory === undefined ? null : { directory: v.Directory }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
size?: number | undefined;
|
||||
allowSync?: boolean | undefined;
|
||||
art?: string | undefined;
|
||||
content?: string | undefined;
|
||||
identifier?: string | undefined;
|
||||
librarySectionID?: number | undefined;
|
||||
mediaTagPrefix?: string | undefined;
|
||||
mediaTagVersion?: number | undefined;
|
||||
thumb?: string | undefined;
|
||||
title1?: string | undefined;
|
||||
viewGroup?: string | undefined;
|
||||
viewMode?: number | undefined;
|
||||
Directory?: Array<GetLibraryDirectory$.Outbound> | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryMediaContainer> = z
|
||||
.object({
|
||||
size: z.number().int().optional(),
|
||||
allowSync: z.boolean().optional(),
|
||||
art: z.string().optional(),
|
||||
content: z.string().optional(),
|
||||
identifier: z.string().optional(),
|
||||
librarySectionID: z.number().int().optional(),
|
||||
mediaTagPrefix: z.string().optional(),
|
||||
mediaTagVersion: z.number().int().optional(),
|
||||
thumb: z.string().optional(),
|
||||
title1: z.string().optional(),
|
||||
viewGroup: z.string().optional(),
|
||||
viewMode: z.number().int().optional(),
|
||||
directory: z.array(z.lazy(() => GetLibraryDirectory$.outboundSchema)).optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
...(v.size === undefined ? null : { size: v.size }),
|
||||
...(v.allowSync === undefined ? null : { allowSync: v.allowSync }),
|
||||
...(v.art === undefined ? null : { art: v.art }),
|
||||
...(v.content === undefined ? null : { content: v.content }),
|
||||
...(v.identifier === undefined ? null : { identifier: v.identifier }),
|
||||
...(v.librarySectionID === undefined
|
||||
? null
|
||||
: { librarySectionID: v.librarySectionID }),
|
||||
...(v.mediaTagPrefix === undefined ? null : { mediaTagPrefix: v.mediaTagPrefix }),
|
||||
...(v.mediaTagVersion === undefined
|
||||
? null
|
||||
: { mediaTagVersion: v.mediaTagVersion }),
|
||||
...(v.thumb === undefined ? null : { thumb: v.thumb }),
|
||||
...(v.title1 === undefined ? null : { title1: v.title1 }),
|
||||
...(v.viewGroup === undefined ? null : { viewGroup: v.viewGroup }),
|
||||
...(v.viewMode === undefined ? null : { viewMode: v.viewMode }),
|
||||
...(v.directory === undefined ? null : { Directory: v.directory }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace GetLibraryResponseBody$ {
|
||||
export type Inbound = {
|
||||
MediaContainer?: GetLibraryMediaContainer$.Inbound | undefined;
|
||||
};
|
||||
|
||||
export const inboundSchema: z.ZodType<GetLibraryResponseBody, z.ZodTypeDef, Inbound> = z
|
||||
.object({
|
||||
MediaContainer: z.lazy(() => GetLibraryMediaContainer$.inboundSchema).optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
...(v.MediaContainer === undefined ? null : { mediaContainer: v.MediaContainer }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
MediaContainer?: GetLibraryMediaContainer$.Outbound | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryResponseBody> = z
|
||||
.object({
|
||||
mediaContainer: z.lazy(() => GetLibraryMediaContainer$.outboundSchema).optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
...(v.mediaContainer === undefined ? null : { MediaContainer: v.mediaContainer }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace GetLibraryResponse$ {
|
||||
export type Inbound = {
|
||||
ContentType: string;
|
||||
StatusCode: number;
|
||||
RawResponse: Response;
|
||||
object?: GetLibraryResponseBody$.Inbound | undefined;
|
||||
};
|
||||
|
||||
export const inboundSchema: z.ZodType<GetLibraryResponse, z.ZodTypeDef, Inbound> = z
|
||||
@@ -99,12 +332,14 @@ export namespace GetLibraryResponse$ {
|
||||
ContentType: z.string(),
|
||||
StatusCode: z.number().int(),
|
||||
RawResponse: z.instanceof(Response),
|
||||
object: z.lazy(() => GetLibraryResponseBody$.inboundSchema).optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
contentType: v.ContentType,
|
||||
statusCode: v.StatusCode,
|
||||
rawResponse: v.RawResponse,
|
||||
...(v.object === undefined ? null : { object: v.object }),
|
||||
};
|
||||
});
|
||||
|
||||
@@ -112,6 +347,7 @@ export namespace GetLibraryResponse$ {
|
||||
ContentType: string;
|
||||
StatusCode: number;
|
||||
RawResponse: never;
|
||||
object?: GetLibraryResponseBody$.Outbound | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryResponse> = z
|
||||
@@ -121,12 +357,14 @@ export namespace GetLibraryResponse$ {
|
||||
rawResponse: z.instanceof(Response).transform(() => {
|
||||
throw new Error("Response cannot be serialized");
|
||||
}),
|
||||
object: z.lazy(() => GetLibraryResponseBody$.outboundSchema).optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
ContentType: v.contentType,
|
||||
StatusCode: v.statusCode,
|
||||
RawResponse: v.rawResponse,
|
||||
...(v.object === undefined ? null : { object: v.object }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
@@ -299,8 +299,13 @@ export class Library extends ClientSDK {
|
||||
RawResponse: response,
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, 200)) {
|
||||
// fallthrough
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
const responseBody = await response.json();
|
||||
const result = operations.GetLibraryResponse$.inboundSchema.parse({
|
||||
...responseFields$,
|
||||
object: responseBody,
|
||||
});
|
||||
return result;
|
||||
} else if (this.matchResponse(response, 401, "application/json")) {
|
||||
const responseBody = await response.json();
|
||||
const result = errors.GetLibraryResponseBody$.inboundSchema.parse({
|
||||
@@ -312,8 +317,6 @@ export class Library extends ClientSDK {
|
||||
const responseBody = await response.text();
|
||||
throw new errors.SDKError("Unexpected API response", response, responseBody);
|
||||
}
|
||||
|
||||
return operations.GetLibraryResponse$.inboundSchema.parse(responseFields$);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user