Compare commits

...

7 Commits

Author SHA1 Message Date
speakeasybot
738f7c347d ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.300.0 2024-06-06 00:30:16 +00:00
speakeasybot
5a3c016a7f ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.299.7 2024-06-05 00:28:41 +00:00
speakeasybot
bb1b355abf ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.299.6 2024-06-04 00:30:37 +00:00
speakeasybot
78522ed5bf ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.299.4 2024-06-03 00:29:55 +00:00
speakeasybot
8a524cf9e6 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.299.4 2024-06-02 00:31:30 +00:00
speakeasybot
7e8aef026b ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.299.4 2024-06-01 00:31:12 +00:00
speakeasybot
886f24cade ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.299.3 2024-05-31 00:28:19 +00:00
132 changed files with 4511 additions and 9453 deletions

View File

@@ -3,10 +3,10 @@ id: 16f22cbf-f23f-4419-8924-3a4b06381947
management:
docChecksum: 911d74baa0d06121d2ce2c71d94e977a
docVersion: 0.0.3
speakeasyVersion: 1.299.1
generationVersion: 2.338.5
releaseVersion: 0.16.2
configChecksum: 3db609966ab8ab6b8d6b084f8c5fee42
speakeasyVersion: 1.300.0
generationVersion: 2.338.14
releaseVersion: 0.16.4
configChecksum: 1dd152d0b7683cd3ad5f8f7a08553e72
repoURL: https://github.com/LukeHagar/plexjs.git
repoSubDirectory: .
installationURL: https://github.com/LukeHagar/plexjs
@@ -15,7 +15,7 @@ features:
typescript:
additionalDependencies: 0.1.0
constsAndDefaults: 0.1.5
core: 3.9.10
core: 3.9.12
flattening: 2.81.1
globalSecurity: 2.82.9
globalSecurityCallbacks: 0.1.0
@@ -54,6 +54,7 @@ generatedFiles:
- src/lib/encodings.ts
- src/lib/http.ts
- src/lib/is-plain-object.ts
- src/lib/primitives.ts
- src/lib/retries.ts
- src/lib/schemas.ts
- src/lib/sdks.ts

View File

@@ -12,7 +12,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: false
typescript:
version: 0.16.2
version: 0.16.4
additionalDependencies:
dependencies: {}
devDependencies: {}

View File

@@ -1,9 +1,9 @@
speakeasyVersion: 1.299.1
speakeasyVersion: 1.300.0
sources:
my-source:
sourceNamespace: my-source
sourceRevisionDigest: sha256:1ab13b10425db2772a912403f865e7c66fb8c5f9608bde1ec6783e65c1379dda
sourceBlobDigest: sha256:3e17557e9e8d8debd3f178b3d78a230bdfc8208868d428be40c4a52c4a31d514
sourceRevisionDigest: sha256:31ee48b100bebabe13cfbe15c880f40812cd1db5d9b81e28dcf0e9d4ea6aff79
sourceBlobDigest: sha256:9d2bf709e5a90650a617963ce8fa023f7f08a9ee25df905c715895cde1605161
tags:
- latest
- main
@@ -11,8 +11,8 @@ targets:
plexjs:
source: my-source
sourceNamespace: my-source
sourceRevisionDigest: sha256:1ab13b10425db2772a912403f865e7c66fb8c5f9608bde1ec6783e65c1379dda
sourceBlobDigest: sha256:3e17557e9e8d8debd3f178b3d78a230bdfc8208868d428be40c4a52c4a31d514
sourceRevisionDigest: sha256:31ee48b100bebabe13cfbe15c880f40812cd1db5d9b81e28dcf0e9d4ea6aff79
sourceBlobDigest: sha256:9d2bf709e5a90650a617963ce8fa023f7f08a9ee25df905c715895cde1605161
outLocation: /github/workspace/repo
workflow:
workflowVersion: 1.0.0

View File

@@ -649,3 +649,73 @@ Based on:
- [typescript v0.16.2] .
### Releases
- [NPM v0.16.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.16.2 - .
## 2024-05-31 00:27:50
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.299.3 (2.338.7) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.16.2] .
### Releases
- [NPM v0.16.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.16.2 - .
## 2024-06-01 00:30:42
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.299.4 (2.338.7) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.16.2] .
### Releases
- [NPM v0.16.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.16.2 - .
## 2024-06-02 00:31:00
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.299.4 (2.338.7) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.16.2] .
### Releases
- [NPM v0.16.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.16.2 - .
## 2024-06-03 00:29:24
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.299.4 (2.338.7) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.16.2] .
### Releases
- [NPM v0.16.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.16.2 - .
## 2024-06-04 00:28:27
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.299.6 (2.338.12) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.16.3] .
### Releases
- [NPM v0.16.3] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.16.3 - .
## 2024-06-05 00:28:12
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.299.7 (2.338.12) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.16.3] .
### Releases
- [NPM v0.16.3] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.16.3 - .
## 2024-06-06 00:28:24
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.300.0 (2.338.14) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.16.4] .
### Releases
- [NPM v0.16.4] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.16.4 - .

File diff suppressed because it is too large Load Diff

View File

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

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@lukehagar/plexjs",
"version": "0.16.2",
"version": "0.16.4",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@lukehagar/plexjs",
"version": "0.16.2",
"version": "0.16.4",
"devDependencies": {
"@types/jsonpath": "^0.2.4",
"@typescript-eslint/eslint-plugin": "^7.7.1",

View File

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

View File

@@ -87,7 +87,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "0.0.3",
sdkVersion: "0.16.2",
genVersion: "2.338.5",
userAgent: "speakeasy-sdk/typescript 0.16.2 2.338.5 0.0.3 @lukehagar/plexjs",
sdkVersion: "0.16.4",
genVersion: "2.338.14",
userAgent: "speakeasy-sdk/typescript 0.16.4 2.338.14 0.0.3 @lukehagar/plexjs",
} as const;

40
src/lib/primitives.ts Normal file
View File

@@ -0,0 +1,40 @@
/*
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
export type Remap<Inp, Mapping extends { [k in keyof Inp]?: string | null }> = {
[k in keyof Inp as Mapping[k] extends string /* if we have a string mapping for this key then use it */
? Mapping[k]
: Mapping[k] extends null /* if the mapping is to `null` then drop the key */
? never
: k /* otherwise keep the key as-is */]: Inp[k];
};
/**
* Converts or omits an object's keys according to a mapping.
*
* @param inp An object whose keys will be remapped
* @param mappings A mapping of original keys to new keys. If a key is not present in the mapping, it will be left as is. If a key is mapped to `null`, it will be removed in the resulting object.
* @returns A new object with keys remapped or omitted according to the mappings
*/
export function remap<
Inp extends Record<string, unknown>,
const Mapping extends { [k in keyof Inp]?: string | null },
>(inp: Inp, mappings: Mapping): Remap<Inp, Mapping> {
let out: any = {};
if (!Object.keys(mappings).length) {
out = inp;
return out;
}
for (const [k, v] of Object.entries(inp)) {
const j = mappings[k];
if (j === null) {
continue;
}
out[j ?? k] = v;
}
return out;
}

View File

@@ -2,8 +2,8 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { ZodError } from "zod";
import * as errors from "../models/errors";
import { output, ZodEffects, ZodError, ZodObject, ZodRawShape, ZodTypeAny } from "zod";
import { SDKValidationError } from "../models/errors/sdkvalidationerror";
/**
* Utility function that executes some code which may throw a ZodError. It
@@ -15,8 +15,42 @@ export function parse<Inp, Out>(rawValue: Inp, fn: (value: Inp) => Out, errorMes
return fn(rawValue);
} catch (err) {
if (err instanceof ZodError) {
throw new errors.SDKValidationError(errorMessage, err, rawValue);
throw new SDKValidationError(errorMessage, err, rawValue);
}
throw err;
}
}
export function collectExtraKeys<
Shape extends ZodRawShape,
Catchall extends ZodTypeAny,
K extends string
>(
obj: ZodObject<Shape, "strip", Catchall>,
extrasKey: K
): ZodEffects<
typeof obj,
output<ZodObject<Shape, "strict">> & {
[k in K]: Record<string, output<Catchall>>;
}
> {
return obj.transform((val) => {
const extras: Record<string, output<Catchall>> = {};
const { shape } = obj;
for (const [key] of Object.entries(val)) {
if (key in shape) {
continue;
}
const v = val[key];
if (typeof v === "undefined") {
continue;
}
extras[key] = v;
delete val[key];
}
return { ...val, [extrasKey]: extras };
});
}

View File

@@ -10,27 +10,15 @@ export type Security = {
/** @internal */
export namespace Security$ {
export const inboundSchema: z.ZodType<Security, z.ZodTypeDef, unknown> = z
.object({
accessToken: z.string(),
})
.transform((v) => {
return {
accessToken: v.accessToken,
};
});
export const inboundSchema: z.ZodType<Security, z.ZodTypeDef, unknown> = z.object({
accessToken: z.string(),
});
export type Outbound = {
accessToken: string;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Security> = z
.object({
accessToken: z.string(),
})
.transform((v) => {
return {
accessToken: v.accessToken,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Security> = z.object({
accessToken: z.string(),
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type AddPlaylistContentsErrors = {
@@ -56,18 +57,11 @@ export class AddPlaylistContentsResponseBody extends Error {
/** @internal */
export namespace AddPlaylistContentsErrors$ {
export const inboundSchema: z.ZodType<AddPlaylistContentsErrors, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<AddPlaylistContentsErrors, z.ZodTypeDef, unknown> =
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 = {
@@ -76,18 +70,11 @@ export namespace AddPlaylistContentsErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, AddPlaylistContentsErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, AddPlaylistContentsErrors> =
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 }),
};
});
}
@@ -100,10 +87,11 @@ export namespace AddPlaylistContentsResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new AddPlaylistContentsResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new AddPlaylistContentsResponseBody(remapped);
});
export type Outbound = {
@@ -132,10 +120,9 @@ export namespace AddPlaylistContentsResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type ApplyUpdatesErrors = {
@@ -56,19 +57,11 @@ export class ApplyUpdatesResponseBody extends Error {
/** @internal */
export namespace ApplyUpdatesErrors$ {
export const inboundSchema: z.ZodType<ApplyUpdatesErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<ApplyUpdatesErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,11 @@ export namespace ApplyUpdatesErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ApplyUpdatesErrors> = 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 const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ApplyUpdatesErrors> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -99,10 +84,11 @@ export namespace ApplyUpdatesResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new ApplyUpdatesResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new ApplyUpdatesResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +111,9 @@ export namespace ApplyUpdatesResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type CancelServerActivitiesErrors = {
@@ -56,18 +57,11 @@ export class CancelServerActivitiesResponseBody extends Error {
/** @internal */
export namespace CancelServerActivitiesErrors$ {
export const inboundSchema: z.ZodType<CancelServerActivitiesErrors, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<CancelServerActivitiesErrors, z.ZodTypeDef, unknown> =
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 = {
@@ -76,18 +70,11 @@ export namespace CancelServerActivitiesErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CancelServerActivitiesErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CancelServerActivitiesErrors> =
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 }),
};
});
}
@@ -103,10 +90,11 @@ export namespace CancelServerActivitiesResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new CancelServerActivitiesResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new CancelServerActivitiesResponseBody(remapped);
});
export type Outbound = {
@@ -135,10 +123,9 @@ export namespace CancelServerActivitiesResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type CheckForUpdatesErrors = {
@@ -56,19 +57,11 @@ export class CheckForUpdatesResponseBody extends Error {
/** @internal */
export namespace CheckForUpdatesErrors$ {
export const inboundSchema: z.ZodType<CheckForUpdatesErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<CheckForUpdatesErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,18 +69,11 @@ export namespace CheckForUpdatesErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CheckForUpdatesErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CheckForUpdatesErrors> =
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 }),
};
});
}
@@ -99,10 +85,11 @@ export namespace CheckForUpdatesResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new CheckForUpdatesResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new CheckForUpdatesResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +112,9 @@ export namespace CheckForUpdatesResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type ClearPlaylistContentsErrors = {
@@ -56,18 +57,11 @@ export class ClearPlaylistContentsResponseBody extends Error {
/** @internal */
export namespace ClearPlaylistContentsErrors$ {
export const inboundSchema: z.ZodType<ClearPlaylistContentsErrors, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<ClearPlaylistContentsErrors, z.ZodTypeDef, unknown> =
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 = {
@@ -76,18 +70,11 @@ export namespace ClearPlaylistContentsErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ClearPlaylistContentsErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ClearPlaylistContentsErrors> =
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 }),
};
});
}
@@ -103,10 +90,11 @@ export namespace ClearPlaylistContentsResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new ClearPlaylistContentsResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new ClearPlaylistContentsResponseBody(remapped);
});
export type Outbound = {
@@ -135,10 +123,9 @@ export namespace ClearPlaylistContentsResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type CreatePlaylistErrors = {
@@ -56,19 +57,11 @@ export class CreatePlaylistResponseBody extends Error {
/** @internal */
export namespace CreatePlaylistErrors$ {
export const inboundSchema: z.ZodType<CreatePlaylistErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<CreatePlaylistErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,13 @@ export namespace CreatePlaylistErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreatePlaylistErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreatePlaylistErrors> = 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 */
@@ -99,10 +86,11 @@ export namespace CreatePlaylistResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new CreatePlaylistResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new CreatePlaylistResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +113,9 @@ export namespace CreatePlaylistResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type DeleteLibraryErrors = {
@@ -56,19 +57,11 @@ export class DeleteLibraryResponseBody extends Error {
/** @internal */
export namespace DeleteLibraryErrors$ {
export const inboundSchema: z.ZodType<DeleteLibraryErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<DeleteLibraryErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,11 @@ export namespace DeleteLibraryErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DeleteLibraryErrors> = 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 const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DeleteLibraryErrors> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -99,10 +84,11 @@ export namespace DeleteLibraryResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new DeleteLibraryResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new DeleteLibraryResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +111,9 @@ export namespace DeleteLibraryResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type DeletePlaylistErrors = {
@@ -56,19 +57,11 @@ export class DeletePlaylistResponseBody extends Error {
/** @internal */
export namespace DeletePlaylistErrors$ {
export const inboundSchema: z.ZodType<DeletePlaylistErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<DeletePlaylistErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,13 @@ export namespace DeletePlaylistErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DeletePlaylistErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DeletePlaylistErrors> = 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 */
@@ -99,10 +86,11 @@ export namespace DeletePlaylistResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new DeletePlaylistResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new DeletePlaylistResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +113,9 @@ export namespace DeletePlaylistResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type EnablePaperTrailErrors = {
@@ -56,19 +57,13 @@ export class EnablePaperTrailResponseBody extends Error {
/** @internal */
export namespace EnablePaperTrailErrors$ {
export const inboundSchema: z.ZodType<EnablePaperTrailErrors, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<EnablePaperTrailErrors, z.ZodTypeDef, unknown> = 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;
@@ -76,18 +71,11 @@ export namespace EnablePaperTrailErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, EnablePaperTrailErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, EnablePaperTrailErrors> =
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 }),
};
});
}
@@ -99,10 +87,11 @@ export namespace EnablePaperTrailResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new EnablePaperTrailResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new EnablePaperTrailResponseBody(remapped);
});
export type Outbound = {
@@ -127,10 +116,9 @@ export namespace EnablePaperTrailResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetAvailableClientsErrors = {
@@ -56,18 +57,11 @@ export class GetAvailableClientsResponseBody extends Error {
/** @internal */
export namespace GetAvailableClientsErrors$ {
export const inboundSchema: z.ZodType<GetAvailableClientsErrors, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<GetAvailableClientsErrors, z.ZodTypeDef, unknown> =
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 = {
@@ -76,18 +70,11 @@ export namespace GetAvailableClientsErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetAvailableClientsErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetAvailableClientsErrors> =
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 }),
};
});
}
@@ -100,10 +87,11 @@ export namespace GetAvailableClientsResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetAvailableClientsResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetAvailableClientsResponseBody(remapped);
});
export type Outbound = {
@@ -132,10 +120,9 @@ export namespace GetAvailableClientsResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetButlerTasksErrors = {
@@ -56,19 +57,11 @@ export class GetButlerTasksResponseBody extends Error {
/** @internal */
export namespace GetButlerTasksErrors$ {
export const inboundSchema: z.ZodType<GetButlerTasksErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<GetButlerTasksErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,13 @@ export namespace GetButlerTasksErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetButlerTasksErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetButlerTasksErrors> = 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 */
@@ -99,10 +86,11 @@ export namespace GetButlerTasksResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetButlerTasksResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetButlerTasksResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +113,9 @@ export namespace GetButlerTasksResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetDevicesErrors = {
@@ -56,19 +57,11 @@ export class GetDevicesResponseBody extends Error {
/** @internal */
export namespace GetDevicesErrors$ {
export const inboundSchema: z.ZodType<GetDevicesErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<GetDevicesErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,11 @@ export namespace GetDevicesErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetDevicesErrors> = 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 const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetDevicesErrors> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -99,10 +84,11 @@ export namespace GetDevicesResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetDevicesResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetDevicesResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +111,9 @@ export namespace GetDevicesResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetFileHashErrors = {
@@ -56,19 +57,11 @@ export class GetFileHashResponseBody extends Error {
/** @internal */
export namespace GetFileHashErrors$ {
export const inboundSchema: z.ZodType<GetFileHashErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<GetFileHashErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,11 @@ export namespace GetFileHashErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetFileHashErrors> = 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 const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetFileHashErrors> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -99,10 +84,11 @@ export namespace GetFileHashResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetFileHashResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetFileHashResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +111,9 @@ export namespace GetFileHashResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetGlobalHubsErrors = {
@@ -56,19 +57,11 @@ export class GetGlobalHubsResponseBody extends Error {
/** @internal */
export namespace GetGlobalHubsErrors$ {
export const inboundSchema: z.ZodType<GetGlobalHubsErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<GetGlobalHubsErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,11 @@ export namespace GetGlobalHubsErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetGlobalHubsErrors> = 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 const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetGlobalHubsErrors> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -99,10 +84,11 @@ export namespace GetGlobalHubsResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetGlobalHubsResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetGlobalHubsResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +111,9 @@ export namespace GetGlobalHubsResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetLibrariesErrors = {
@@ -56,19 +57,11 @@ export class GetLibrariesResponseBody extends Error {
/** @internal */
export namespace GetLibrariesErrors$ {
export const inboundSchema: z.ZodType<GetLibrariesErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<GetLibrariesErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,11 @@ export namespace GetLibrariesErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibrariesErrors> = 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 const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibrariesErrors> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -99,10 +84,11 @@ export namespace GetLibrariesResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetLibrariesResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetLibrariesResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +111,9 @@ export namespace GetLibrariesResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetLibraryErrors = {
@@ -56,19 +57,11 @@ export class GetLibraryResponseBody extends Error {
/** @internal */
export namespace GetLibraryErrors$ {
export const inboundSchema: z.ZodType<GetLibraryErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<GetLibraryErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,11 @@ export namespace GetLibraryErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryErrors> = 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 const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryErrors> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -99,10 +84,11 @@ export namespace GetLibraryResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetLibraryResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetLibraryResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +111,9 @@ export namespace GetLibraryResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetLibraryHubsErrors = {
@@ -56,19 +57,11 @@ export class GetLibraryHubsResponseBody extends Error {
/** @internal */
export namespace GetLibraryHubsErrors$ {
export const inboundSchema: z.ZodType<GetLibraryHubsErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<GetLibraryHubsErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,13 @@ export namespace GetLibraryHubsErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryHubsErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryHubsErrors> = 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 */
@@ -99,10 +86,11 @@ export namespace GetLibraryHubsResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetLibraryHubsResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetLibraryHubsResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +113,9 @@ export namespace GetLibraryHubsResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetLibraryItemsErrors = {
@@ -56,19 +57,11 @@ export class GetLibraryItemsResponseBody extends Error {
/** @internal */
export namespace GetLibraryItemsErrors$ {
export const inboundSchema: z.ZodType<GetLibraryItemsErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<GetLibraryItemsErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,18 +69,11 @@ export namespace GetLibraryItemsErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryItemsErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryItemsErrors> =
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 }),
};
});
}
@@ -99,10 +85,11 @@ export namespace GetLibraryItemsResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetLibraryItemsResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetLibraryItemsResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +112,9 @@ export namespace GetLibraryItemsResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetMetadataErrors = {
@@ -56,19 +57,11 @@ export class GetMetadataResponseBody extends Error {
/** @internal */
export namespace GetMetadataErrors$ {
export const inboundSchema: z.ZodType<GetMetadataErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<GetMetadataErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,11 @@ export namespace GetMetadataErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMetadataErrors> = 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 const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMetadataErrors> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -99,10 +84,11 @@ export namespace GetMetadataResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetMetadataResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetMetadataResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +111,9 @@ export namespace GetMetadataResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetMetadataChildrenErrors = {
@@ -56,18 +57,11 @@ export class GetMetadataChildrenResponseBody extends Error {
/** @internal */
export namespace GetMetadataChildrenErrors$ {
export const inboundSchema: z.ZodType<GetMetadataChildrenErrors, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<GetMetadataChildrenErrors, z.ZodTypeDef, unknown> =
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 = {
@@ -76,18 +70,11 @@ export namespace GetMetadataChildrenErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMetadataChildrenErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMetadataChildrenErrors> =
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 }),
};
});
}
@@ -100,10 +87,11 @@ export namespace GetMetadataChildrenResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetMetadataChildrenResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetMetadataChildrenResponseBody(remapped);
});
export type Outbound = {
@@ -132,10 +120,9 @@ export namespace GetMetadataChildrenResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetMyPlexAccountErrors = {
@@ -56,19 +57,13 @@ export class GetMyPlexAccountResponseBody extends Error {
/** @internal */
export namespace GetMyPlexAccountErrors$ {
export const inboundSchema: z.ZodType<GetMyPlexAccountErrors, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<GetMyPlexAccountErrors, z.ZodTypeDef, unknown> = 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;
@@ -76,18 +71,11 @@ export namespace GetMyPlexAccountErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMyPlexAccountErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMyPlexAccountErrors> =
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 }),
};
});
}
@@ -99,10 +87,11 @@ export namespace GetMyPlexAccountResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetMyPlexAccountResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetMyPlexAccountResponseBody(remapped);
});
export type Outbound = {
@@ -127,10 +116,9 @@ export namespace GetMyPlexAccountResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetOnDeckErrors = {
@@ -56,19 +57,11 @@ export class GetOnDeckResponseBody extends Error {
/** @internal */
export namespace GetOnDeckErrors$ {
export const inboundSchema: z.ZodType<GetOnDeckErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<GetOnDeckErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,11 @@ export namespace GetOnDeckErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetOnDeckErrors> = 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 const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetOnDeckErrors> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -99,10 +84,11 @@ export namespace GetOnDeckResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetOnDeckResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetOnDeckResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +111,9 @@ export namespace GetOnDeckResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetPinErrors = {
@@ -56,19 +57,11 @@ export class GetPinResponseBody extends Error {
/** @internal */
export namespace GetPinErrors$ {
export const inboundSchema: z.ZodType<GetPinErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<GetPinErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,11 @@ export namespace GetPinErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPinErrors> = 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 const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPinErrors> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -99,10 +84,11 @@ export namespace GetPinResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetPinResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetPinResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +111,9 @@ export namespace GetPinResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetPlaylistErrors = {
@@ -56,19 +57,11 @@ export class GetPlaylistResponseBody extends Error {
/** @internal */
export namespace GetPlaylistErrors$ {
export const inboundSchema: z.ZodType<GetPlaylistErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<GetPlaylistErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,11 @@ export namespace GetPlaylistErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPlaylistErrors> = 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 const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPlaylistErrors> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -99,10 +84,11 @@ export namespace GetPlaylistResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetPlaylistResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetPlaylistResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +111,9 @@ export namespace GetPlaylistResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetPlaylistContentsErrors = {
@@ -56,18 +57,11 @@ export class GetPlaylistContentsResponseBody extends Error {
/** @internal */
export namespace GetPlaylistContentsErrors$ {
export const inboundSchema: z.ZodType<GetPlaylistContentsErrors, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<GetPlaylistContentsErrors, z.ZodTypeDef, unknown> =
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 = {
@@ -76,18 +70,11 @@ export namespace GetPlaylistContentsErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPlaylistContentsErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPlaylistContentsErrors> =
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 }),
};
});
}
@@ -100,10 +87,11 @@ export namespace GetPlaylistContentsResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetPlaylistContentsResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetPlaylistContentsResponseBody(remapped);
});
export type Outbound = {
@@ -132,10 +120,9 @@ export namespace GetPlaylistContentsResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetPlaylistsErrors = {
@@ -56,19 +57,11 @@ export class GetPlaylistsResponseBody extends Error {
/** @internal */
export namespace GetPlaylistsErrors$ {
export const inboundSchema: z.ZodType<GetPlaylistsErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<GetPlaylistsErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,11 @@ export namespace GetPlaylistsErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPlaylistsErrors> = 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 const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPlaylistsErrors> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -99,10 +84,11 @@ export namespace GetPlaylistsResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetPlaylistsResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetPlaylistsResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +111,9 @@ export namespace GetPlaylistsResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetRecentlyAddedErrors = {
@@ -56,19 +57,13 @@ export class GetRecentlyAddedResponseBody extends Error {
/** @internal */
export namespace GetRecentlyAddedErrors$ {
export const inboundSchema: z.ZodType<GetRecentlyAddedErrors, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<GetRecentlyAddedErrors, z.ZodTypeDef, unknown> = 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;
@@ -76,18 +71,11 @@ export namespace GetRecentlyAddedErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetRecentlyAddedErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetRecentlyAddedErrors> =
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 }),
};
});
}
@@ -99,10 +87,11 @@ export namespace GetRecentlyAddedResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetRecentlyAddedResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetRecentlyAddedResponseBody(remapped);
});
export type Outbound = {
@@ -127,10 +116,9 @@ export namespace GetRecentlyAddedResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetResizedPhotoErrors = {
@@ -56,19 +57,11 @@ export class GetResizedPhotoResponseBody extends Error {
/** @internal */
export namespace GetResizedPhotoErrors$ {
export const inboundSchema: z.ZodType<GetResizedPhotoErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<GetResizedPhotoErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,18 +69,11 @@ export namespace GetResizedPhotoErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetResizedPhotoErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetResizedPhotoErrors> =
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 }),
};
});
}
@@ -99,10 +85,11 @@ export namespace GetResizedPhotoResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetResizedPhotoResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetResizedPhotoResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +112,9 @@ export namespace GetResizedPhotoResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetSearchResultsErrors = {
@@ -56,19 +57,13 @@ export class GetSearchResultsResponseBody extends Error {
/** @internal */
export namespace GetSearchResultsErrors$ {
export const inboundSchema: z.ZodType<GetSearchResultsErrors, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<GetSearchResultsErrors, z.ZodTypeDef, unknown> = 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;
@@ -76,18 +71,11 @@ export namespace GetSearchResultsErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetSearchResultsErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetSearchResultsErrors> =
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 }),
};
});
}
@@ -99,10 +87,11 @@ export namespace GetSearchResultsResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetSearchResultsResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetSearchResultsResponseBody(remapped);
});
export type Outbound = {
@@ -127,10 +116,9 @@ export namespace GetSearchResultsResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetServerActivitiesErrors = {
@@ -56,18 +57,11 @@ export class GetServerActivitiesResponseBody extends Error {
/** @internal */
export namespace GetServerActivitiesErrors$ {
export const inboundSchema: z.ZodType<GetServerActivitiesErrors, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<GetServerActivitiesErrors, z.ZodTypeDef, unknown> =
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 = {
@@ -76,18 +70,11 @@ export namespace GetServerActivitiesErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetServerActivitiesErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetServerActivitiesErrors> =
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 }),
};
});
}
@@ -100,10 +87,11 @@ export namespace GetServerActivitiesResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetServerActivitiesResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetServerActivitiesResponseBody(remapped);
});
export type Outbound = {
@@ -132,10 +120,9 @@ export namespace GetServerActivitiesResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type Errors = {
@@ -56,19 +57,11 @@ export class GetServerCapabilitiesResponseBody extends Error {
/** @internal */
export namespace Errors$ {
export const inboundSchema: z.ZodType<Errors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<Errors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,11 @@ export namespace Errors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Errors> = 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 const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Errors> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -103,10 +88,11 @@ export namespace GetServerCapabilitiesResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetServerCapabilitiesResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetServerCapabilitiesResponseBody(remapped);
});
export type Outbound = {
@@ -133,10 +119,9 @@ export namespace GetServerCapabilitiesResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetServerIdentityErrors = {
@@ -56,18 +57,11 @@ export class GetServerIdentityResponseBody extends Error {
/** @internal */
export namespace GetServerIdentityErrors$ {
export const inboundSchema: z.ZodType<GetServerIdentityErrors, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<GetServerIdentityErrors, z.ZodTypeDef, unknown> =
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 = {
@@ -76,18 +70,11 @@ export namespace GetServerIdentityErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetServerIdentityErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetServerIdentityErrors> =
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 }),
};
});
}
@@ -99,10 +86,11 @@ export namespace GetServerIdentityResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetServerIdentityResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetServerIdentityResponseBody(remapped);
});
export type Outbound = {
@@ -128,12 +116,9 @@ export namespace GetServerIdentityResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined
? null
: { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetServerListErrors = {
@@ -56,19 +57,11 @@ export class GetServerListResponseBody extends Error {
/** @internal */
export namespace GetServerListErrors$ {
export const inboundSchema: z.ZodType<GetServerListErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<GetServerListErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,11 @@ export namespace GetServerListErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetServerListErrors> = 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 const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetServerListErrors> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -99,10 +84,11 @@ export namespace GetServerListResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetServerListResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetServerListResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +111,9 @@ export namespace GetServerListResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetServerPreferencesErrors = {
@@ -56,18 +57,11 @@ export class GetServerPreferencesResponseBody extends Error {
/** @internal */
export namespace GetServerPreferencesErrors$ {
export const inboundSchema: z.ZodType<GetServerPreferencesErrors, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<GetServerPreferencesErrors, z.ZodTypeDef, unknown> =
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 = {
@@ -76,18 +70,11 @@ export namespace GetServerPreferencesErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetServerPreferencesErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetServerPreferencesErrors> =
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 }),
};
});
}
@@ -100,10 +87,11 @@ export namespace GetServerPreferencesResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetServerPreferencesResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetServerPreferencesResponseBody(remapped);
});
export type Outbound = {
@@ -132,10 +120,9 @@ export namespace GetServerPreferencesResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetSessionHistoryErrors = {
@@ -56,18 +57,11 @@ export class GetSessionHistoryResponseBody extends Error {
/** @internal */
export namespace GetSessionHistoryErrors$ {
export const inboundSchema: z.ZodType<GetSessionHistoryErrors, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<GetSessionHistoryErrors, z.ZodTypeDef, unknown> =
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 = {
@@ -76,18 +70,11 @@ export namespace GetSessionHistoryErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetSessionHistoryErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetSessionHistoryErrors> =
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 }),
};
});
}
@@ -99,10 +86,11 @@ export namespace GetSessionHistoryResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetSessionHistoryResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetSessionHistoryResponseBody(remapped);
});
export type Outbound = {
@@ -128,12 +116,9 @@ export namespace GetSessionHistoryResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined
? null
: { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetSessionsErrors = {
@@ -56,19 +57,11 @@ export class GetSessionsResponseBody extends Error {
/** @internal */
export namespace GetSessionsErrors$ {
export const inboundSchema: z.ZodType<GetSessionsErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<GetSessionsErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,11 @@ export namespace GetSessionsErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetSessionsErrors> = 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 const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetSessionsErrors> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -99,10 +84,11 @@ export namespace GetSessionsResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetSessionsResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetSessionsResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +111,9 @@ export namespace GetSessionsResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetSourceConnectionInformationErrors = {
@@ -60,19 +61,11 @@ export namespace GetSourceConnectionInformationErrors$ {
GetSourceConnectionInformationErrors,
z.ZodTypeDef,
unknown
> = 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 }),
};
});
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -84,19 +77,11 @@ export namespace GetSourceConnectionInformationErrors$ {
Outbound,
z.ZodTypeDef,
GetSourceConnectionInformationErrors
> = z
.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
})
.transform((v) => {
return {
...(v.code === undefined ? null : { code: v.code }),
...(v.message === undefined ? null : { message: v.message }),
...(v.status === undefined ? null : { status: v.status }),
};
});
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -113,10 +98,11 @@ export namespace GetSourceConnectionInformationResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetSourceConnectionInformationResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetSourceConnectionInformationResponseBody(remapped);
});
export type Outbound = {
@@ -145,10 +131,9 @@ export namespace GetSourceConnectionInformationResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetStatisticsErrors = {
@@ -56,19 +57,11 @@ export class GetStatisticsResponseBody extends Error {
/** @internal */
export namespace GetStatisticsErrors$ {
export const inboundSchema: z.ZodType<GetStatisticsErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<GetStatisticsErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,11 @@ export namespace GetStatisticsErrors$ {
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 }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetStatisticsErrors> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -99,10 +84,11 @@ export namespace GetStatisticsResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetStatisticsResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetStatisticsResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +111,9 @@ export namespace GetStatisticsResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetTimelineErrors = {
@@ -56,19 +57,11 @@ export class GetTimelineResponseBody extends Error {
/** @internal */
export namespace GetTimelineErrors$ {
export const inboundSchema: z.ZodType<GetTimelineErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<GetTimelineErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,11 @@ export namespace GetTimelineErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetTimelineErrors> = 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 const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetTimelineErrors> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -99,10 +84,11 @@ export namespace GetTimelineResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetTimelineResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetTimelineResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +111,9 @@ export namespace GetTimelineResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetTokenErrors = {
@@ -56,19 +57,11 @@ export class GetTokenResponseBody extends Error {
/** @internal */
export namespace GetTokenErrors$ {
export const inboundSchema: z.ZodType<GetTokenErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<GetTokenErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,11 @@ export namespace GetTokenErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetTokenErrors> = 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 const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetTokenErrors> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -99,10 +84,11 @@ export namespace GetTokenResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetTokenResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetTokenResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +111,9 @@ export namespace GetTokenResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetTranscodeSessionsErrors = {
@@ -56,18 +57,11 @@ export class GetTranscodeSessionsResponseBody extends Error {
/** @internal */
export namespace GetTranscodeSessionsErrors$ {
export const inboundSchema: z.ZodType<GetTranscodeSessionsErrors, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<GetTranscodeSessionsErrors, z.ZodTypeDef, unknown> =
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 = {
@@ -76,18 +70,11 @@ export namespace GetTranscodeSessionsErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetTranscodeSessionsErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetTranscodeSessionsErrors> =
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 }),
};
});
}
@@ -100,10 +87,11 @@ export namespace GetTranscodeSessionsResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetTranscodeSessionsResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetTranscodeSessionsResponseBody(remapped);
});
export type Outbound = {
@@ -132,10 +120,9 @@ export namespace GetTranscodeSessionsResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetTransientTokenErrors = {
@@ -56,18 +57,11 @@ export class GetTransientTokenResponseBody extends Error {
/** @internal */
export namespace GetTransientTokenErrors$ {
export const inboundSchema: z.ZodType<GetTransientTokenErrors, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<GetTransientTokenErrors, z.ZodTypeDef, unknown> =
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 = {
@@ -76,18 +70,11 @@ export namespace GetTransientTokenErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetTransientTokenErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetTransientTokenErrors> =
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 }),
};
});
}
@@ -99,10 +86,11 @@ export namespace GetTransientTokenResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetTransientTokenResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetTransientTokenResponseBody(remapped);
});
export type Outbound = {
@@ -128,12 +116,9 @@ export namespace GetTransientTokenResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined
? null
: { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetUpdateStatusErrors = {
@@ -56,19 +57,11 @@ export class GetUpdateStatusResponseBody extends Error {
/** @internal */
export namespace GetUpdateStatusErrors$ {
export const inboundSchema: z.ZodType<GetUpdateStatusErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<GetUpdateStatusErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,18 +69,11 @@ export namespace GetUpdateStatusErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetUpdateStatusErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetUpdateStatusErrors> =
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 }),
};
});
}
@@ -99,10 +85,11 @@ export namespace GetUpdateStatusResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new GetUpdateStatusResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetUpdateStatusResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +112,9 @@ export namespace GetUpdateStatusResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type LogLineErrors = {
@@ -56,19 +57,11 @@ export class LogLineResponseBody extends Error {
/** @internal */
export namespace LogLineErrors$ {
export const inboundSchema: z.ZodType<LogLineErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<LogLineErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,11 @@ export namespace LogLineErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, LogLineErrors> = 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 const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, LogLineErrors> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -99,10 +84,11 @@ export namespace LogLineResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new LogLineResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new LogLineResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +111,9 @@ export namespace LogLineResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type LogMultiLineErrors = {
@@ -56,19 +57,11 @@ export class LogMultiLineResponseBody extends Error {
/** @internal */
export namespace LogMultiLineErrors$ {
export const inboundSchema: z.ZodType<LogMultiLineErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<LogMultiLineErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,11 @@ export namespace LogMultiLineErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, LogMultiLineErrors> = 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 const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, LogMultiLineErrors> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -99,10 +84,11 @@ export namespace LogMultiLineResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new LogMultiLineResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new LogMultiLineResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +111,9 @@ export namespace LogMultiLineResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type MarkPlayedErrors = {
@@ -56,19 +57,11 @@ export class MarkPlayedResponseBody extends Error {
/** @internal */
export namespace MarkPlayedErrors$ {
export const inboundSchema: z.ZodType<MarkPlayedErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<MarkPlayedErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,11 @@ export namespace MarkPlayedErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, MarkPlayedErrors> = 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 const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, MarkPlayedErrors> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -99,10 +84,11 @@ export namespace MarkPlayedResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new MarkPlayedResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new MarkPlayedResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +111,9 @@ export namespace MarkPlayedResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type MarkUnplayedErrors = {
@@ -56,19 +57,11 @@ export class MarkUnplayedResponseBody extends Error {
/** @internal */
export namespace MarkUnplayedErrors$ {
export const inboundSchema: z.ZodType<MarkUnplayedErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<MarkUnplayedErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,11 @@ export namespace MarkUnplayedErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, MarkUnplayedErrors> = 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 const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, MarkUnplayedErrors> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -99,10 +84,11 @@ export namespace MarkUnplayedResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new MarkUnplayedResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new MarkUnplayedResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +111,9 @@ export namespace MarkUnplayedResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type PerformSearchErrors = {
@@ -56,19 +57,11 @@ export class PerformSearchResponseBody extends Error {
/** @internal */
export namespace PerformSearchErrors$ {
export const inboundSchema: z.ZodType<PerformSearchErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<PerformSearchErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,11 @@ export namespace PerformSearchErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, PerformSearchErrors> = 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 const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, PerformSearchErrors> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -99,10 +84,11 @@ export namespace PerformSearchResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new PerformSearchResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new PerformSearchResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +111,9 @@ export namespace PerformSearchResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type PerformVoiceSearchErrors = {
@@ -56,18 +57,11 @@ export class PerformVoiceSearchResponseBody extends Error {
/** @internal */
export namespace PerformVoiceSearchErrors$ {
export const inboundSchema: z.ZodType<PerformVoiceSearchErrors, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<PerformVoiceSearchErrors, z.ZodTypeDef, unknown> =
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 = {
@@ -76,18 +70,11 @@ export namespace PerformVoiceSearchErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, PerformVoiceSearchErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, PerformVoiceSearchErrors> =
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 }),
};
});
}
@@ -99,10 +86,11 @@ export namespace PerformVoiceSearchResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new PerformVoiceSearchResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new PerformVoiceSearchResponseBody(remapped);
});
export type Outbound = {
@@ -128,12 +116,9 @@ export namespace PerformVoiceSearchResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined
? null
: { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type RefreshLibraryErrors = {
@@ -56,19 +57,11 @@ export class RefreshLibraryResponseBody extends Error {
/** @internal */
export namespace RefreshLibraryErrors$ {
export const inboundSchema: z.ZodType<RefreshLibraryErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<RefreshLibraryErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,13 @@ export namespace RefreshLibraryErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, RefreshLibraryErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, RefreshLibraryErrors> = 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 */
@@ -99,10 +86,11 @@ export namespace RefreshLibraryResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new RefreshLibraryResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new RefreshLibraryResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +113,9 @@ export namespace RefreshLibraryResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type SearchLibraryErrors = {
@@ -56,19 +57,11 @@ export class SearchLibraryResponseBody extends Error {
/** @internal */
export namespace SearchLibraryErrors$ {
export const inboundSchema: z.ZodType<SearchLibraryErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<SearchLibraryErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,11 @@ export namespace SearchLibraryErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SearchLibraryErrors> = 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 const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SearchLibraryErrors> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -99,10 +84,11 @@ export namespace SearchLibraryResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new SearchLibraryResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new SearchLibraryResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +111,9 @@ export namespace SearchLibraryResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type StartAllTasksErrors = {
@@ -56,19 +57,11 @@ export class StartAllTasksResponseBody extends Error {
/** @internal */
export namespace StartAllTasksErrors$ {
export const inboundSchema: z.ZodType<StartAllTasksErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<StartAllTasksErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,11 @@ export namespace StartAllTasksErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, StartAllTasksErrors> = 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 const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, StartAllTasksErrors> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -99,10 +84,11 @@ export namespace StartAllTasksResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new StartAllTasksResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new StartAllTasksResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +111,9 @@ export namespace StartAllTasksResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type StartTaskErrors = {
@@ -56,19 +57,11 @@ export class StartTaskResponseBody extends Error {
/** @internal */
export namespace StartTaskErrors$ {
export const inboundSchema: z.ZodType<StartTaskErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<StartTaskErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,11 @@ export namespace StartTaskErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, StartTaskErrors> = 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 const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, StartTaskErrors> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -99,10 +84,11 @@ export namespace StartTaskResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new StartTaskResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new StartTaskResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +111,9 @@ export namespace StartTaskResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type StartUniversalTranscodeErrors = {
@@ -56,18 +57,11 @@ export class StartUniversalTranscodeResponseBody extends Error {
/** @internal */
export namespace StartUniversalTranscodeErrors$ {
export const inboundSchema: z.ZodType<StartUniversalTranscodeErrors, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<StartUniversalTranscodeErrors, z.ZodTypeDef, unknown> =
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 = {
@@ -77,19 +71,11 @@ export namespace StartUniversalTranscodeErrors$ {
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, StartUniversalTranscodeErrors> =
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 }),
};
});
z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -104,10 +90,11 @@ export namespace StartUniversalTranscodeResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new StartUniversalTranscodeResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new StartUniversalTranscodeResponseBody(remapped);
});
export type Outbound = {
@@ -136,10 +123,9 @@ export namespace StartUniversalTranscodeResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type StopAllTasksErrors = {
@@ -56,19 +57,11 @@ export class StopAllTasksResponseBody extends Error {
/** @internal */
export namespace StopAllTasksErrors$ {
export const inboundSchema: z.ZodType<StopAllTasksErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<StopAllTasksErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,11 @@ export namespace StopAllTasksErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, StopAllTasksErrors> = 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 const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, StopAllTasksErrors> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -99,10 +84,11 @@ export namespace StopAllTasksResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new StopAllTasksResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new StopAllTasksResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +111,9 @@ export namespace StopAllTasksResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type StopTaskErrors = {
@@ -56,19 +57,11 @@ export class StopTaskResponseBody extends Error {
/** @internal */
export namespace StopTaskErrors$ {
export const inboundSchema: z.ZodType<StopTaskErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<StopTaskErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,11 @@ export namespace StopTaskErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, StopTaskErrors> = 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 const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, StopTaskErrors> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
}
/** @internal */
@@ -99,10 +84,11 @@ export namespace StopTaskResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new StopTaskResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new StopTaskResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +111,9 @@ export namespace StopTaskResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type StopTranscodeSessionErrors = {
@@ -56,18 +57,11 @@ export class StopTranscodeSessionResponseBody extends Error {
/** @internal */
export namespace StopTranscodeSessionErrors$ {
export const inboundSchema: z.ZodType<StopTranscodeSessionErrors, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<StopTranscodeSessionErrors, z.ZodTypeDef, unknown> =
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 = {
@@ -76,18 +70,11 @@ export namespace StopTranscodeSessionErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, StopTranscodeSessionErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, StopTranscodeSessionErrors> =
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 }),
};
});
}
@@ -100,10 +87,11 @@ export namespace StopTranscodeSessionResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new StopTranscodeSessionResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new StopTranscodeSessionResponseBody(remapped);
});
export type Outbound = {
@@ -132,10 +120,9 @@ export namespace StopTranscodeSessionResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type UpdatePlaylistErrors = {
@@ -56,19 +57,11 @@ export class UpdatePlaylistResponseBody extends Error {
/** @internal */
export namespace UpdatePlaylistErrors$ {
export const inboundSchema: z.ZodType<UpdatePlaylistErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<UpdatePlaylistErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,13 @@ export namespace UpdatePlaylistErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdatePlaylistErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdatePlaylistErrors> = 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 */
@@ -99,10 +86,11 @@ export namespace UpdatePlaylistResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new UpdatePlaylistResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new UpdatePlaylistResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +113,9 @@ export namespace UpdatePlaylistResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type UpdatePlayProgressErrors = {
@@ -56,18 +57,11 @@ export class UpdatePlayProgressResponseBody extends Error {
/** @internal */
export namespace UpdatePlayProgressErrors$ {
export const inboundSchema: z.ZodType<UpdatePlayProgressErrors, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<UpdatePlayProgressErrors, z.ZodTypeDef, unknown> =
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 = {
@@ -76,18 +70,11 @@ export namespace UpdatePlayProgressErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdatePlayProgressErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdatePlayProgressErrors> =
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 }),
};
});
}
@@ -99,10 +86,11 @@ export namespace UpdatePlayProgressResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new UpdatePlayProgressResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new UpdatePlayProgressResponseBody(remapped);
});
export type Outbound = {
@@ -128,12 +116,9 @@ export namespace UpdatePlayProgressResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined
? null
: { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type UploadPlaylistErrors = {
@@ -56,19 +57,11 @@ export class UploadPlaylistResponseBody extends Error {
/** @internal */
export namespace UploadPlaylistErrors$ {
export const inboundSchema: z.ZodType<UploadPlaylistErrors, z.ZodTypeDef, unknown> = 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 const inboundSchema: z.ZodType<UploadPlaylistErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
export type Outbound = {
code?: number | undefined;
@@ -76,19 +69,13 @@ export namespace UploadPlaylistErrors$ {
status?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UploadPlaylistErrors> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UploadPlaylistErrors> = 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 */
@@ -99,10 +86,11 @@ export namespace UploadPlaylistResponseBody$ {
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
return new UploadPlaylistResponseBody({
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new UploadPlaylistResponseBody(remapped);
});
export type Outbound = {
@@ -125,10 +113,9 @@ export namespace UploadPlaylistResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.errors === undefined ? null : { errors: v.errors }),
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
};
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type AddPlaylistContentsRequest = {
@@ -70,18 +71,11 @@ export type AddPlaylistContentsResponse = {
/** @internal */
export namespace AddPlaylistContentsRequest$ {
export const inboundSchema: z.ZodType<AddPlaylistContentsRequest, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<AddPlaylistContentsRequest, z.ZodTypeDef, unknown> =
z.object({
playlistID: z.number(),
uri: z.string(),
playQueueID: z.number().optional(),
})
.transform((v) => {
return {
playlistID: v.playlistID,
uri: v.uri,
...(v.playQueueID === undefined ? null : { playQueueID: v.playQueueID }),
};
});
export type Outbound = {
@@ -90,25 +84,18 @@ export namespace AddPlaylistContentsRequest$ {
playQueueID?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, AddPlaylistContentsRequest> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, AddPlaylistContentsRequest> =
z.object({
playlistID: z.number(),
uri: z.string(),
playQueueID: z.number().optional(),
})
.transform((v) => {
return {
playlistID: v.playlistID,
uri: v.uri,
...(v.playQueueID === undefined ? null : { playQueueID: v.playQueueID }),
};
});
}
/** @internal */
export namespace AddPlaylistContentsMetadata$ {
export const inboundSchema: z.ZodType<AddPlaylistContentsMetadata, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<AddPlaylistContentsMetadata, z.ZodTypeDef, unknown> =
z.object({
ratingKey: z.string().optional(),
key: z.string().optional(),
guid: z.string().optional(),
@@ -122,23 +109,6 @@ export namespace AddPlaylistContentsMetadata$ {
leafCount: z.number().int().optional(),
addedAt: z.number().int().optional(),
updatedAt: z.number().int().optional(),
})
.transform((v) => {
return {
...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }),
...(v.key === undefined ? null : { key: v.key }),
...(v.guid === undefined ? null : { guid: v.guid }),
...(v.type === undefined ? null : { type: v.type }),
...(v.title === undefined ? null : { title: v.title }),
...(v.summary === undefined ? null : { summary: v.summary }),
...(v.smart === undefined ? null : { smart: v.smart }),
...(v.playlistType === undefined ? null : { playlistType: v.playlistType }),
...(v.composite === undefined ? null : { composite: v.composite }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.leafCount === undefined ? null : { leafCount: v.leafCount }),
...(v.addedAt === undefined ? null : { addedAt: v.addedAt }),
...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }),
};
});
export type Outbound = {
@@ -157,8 +127,8 @@ export namespace AddPlaylistContentsMetadata$ {
updatedAt?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, AddPlaylistContentsMetadata> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, AddPlaylistContentsMetadata> =
z.object({
ratingKey: z.string().optional(),
key: z.string().optional(),
guid: z.string().optional(),
@@ -172,23 +142,6 @@ export namespace AddPlaylistContentsMetadata$ {
leafCount: z.number().int().optional(),
addedAt: z.number().int().optional(),
updatedAt: z.number().int().optional(),
})
.transform((v) => {
return {
...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }),
...(v.key === undefined ? null : { key: v.key }),
...(v.guid === undefined ? null : { guid: v.guid }),
...(v.type === undefined ? null : { type: v.type }),
...(v.title === undefined ? null : { title: v.title }),
...(v.summary === undefined ? null : { summary: v.summary }),
...(v.smart === undefined ? null : { smart: v.smart }),
...(v.playlistType === undefined ? null : { playlistType: v.playlistType }),
...(v.composite === undefined ? null : { composite: v.composite }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.leafCount === undefined ? null : { leafCount: v.leafCount }),
...(v.addedAt === undefined ? null : { addedAt: v.addedAt }),
...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }),
};
});
}
@@ -206,14 +159,9 @@ export namespace AddPlaylistContentsMediaContainer$ {
Metadata: z.array(z.lazy(() => AddPlaylistContentsMetadata$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.size === undefined ? null : { size: v.size }),
...(v.leafCountAdded === undefined ? null : { leafCountAdded: v.leafCountAdded }),
...(v.leafCountRequested === undefined
? null
: { leafCountRequested: v.leafCountRequested }),
...(v.Metadata === undefined ? null : { metadata: v.Metadata }),
};
return remap$(v, {
Metadata: "metadata",
});
});
export type Outbound = {
@@ -235,14 +183,9 @@ export namespace AddPlaylistContentsMediaContainer$ {
metadata: z.array(z.lazy(() => AddPlaylistContentsMetadata$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.size === undefined ? null : { size: v.size }),
...(v.leafCountAdded === undefined ? null : { leafCountAdded: v.leafCountAdded }),
...(v.leafCountRequested === undefined
? null
: { leafCountRequested: v.leafCountRequested }),
...(v.metadata === undefined ? null : { Metadata: v.metadata }),
};
return remap$(v, {
metadata: "Metadata",
});
});
}
@@ -256,11 +199,9 @@ export namespace AddPlaylistContentsResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.MediaContainer === undefined
? null
: { mediaContainer: v.MediaContainer }),
};
return remap$(v, {
MediaContainer: "mediaContainer",
});
});
export type Outbound = {
@@ -278,9 +219,9 @@ export namespace AddPlaylistContentsResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.mediaContainer === undefined ? null : { MediaContainer: v.mediaContainer }),
};
return remap$(v, {
mediaContainer: "MediaContainer",
});
});
}
@@ -294,12 +235,11 @@ export namespace AddPlaylistContentsResponse$ {
object: z.lazy(() => AddPlaylistContentsResponseBody$.inboundSchema).optional(),
})
.transform((v) => {
return {
contentType: v.ContentType,
statusCode: v.StatusCode,
rawResponse: v.RawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
@@ -319,11 +259,10 @@ export namespace AddPlaylistContentsResponse$ {
object: z.lazy(() => AddPlaylistContentsResponseBody$.outboundSchema).optional(),
})
.transform((v) => {
return {
ContentType: v.contentType,
StatusCode: v.statusCode,
RawResponse: v.rawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
/**
@@ -60,34 +61,20 @@ export namespace Skip$ {
/** @internal */
export namespace ApplyUpdatesRequest$ {
export const inboundSchema: z.ZodType<ApplyUpdatesRequest, z.ZodTypeDef, unknown> = z
.object({
tonight: Tonight$.inboundSchema.optional(),
skip: Skip$.inboundSchema.optional(),
})
.transform((v) => {
return {
...(v.tonight === undefined ? null : { tonight: v.tonight }),
...(v.skip === undefined ? null : { skip: v.skip }),
};
});
export const inboundSchema: z.ZodType<ApplyUpdatesRequest, z.ZodTypeDef, unknown> = z.object({
tonight: Tonight$.inboundSchema.optional(),
skip: Skip$.inboundSchema.optional(),
});
export type Outbound = {
tonight?: number | undefined;
skip?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ApplyUpdatesRequest> = z
.object({
tonight: Tonight$.outboundSchema.optional(),
skip: Skip$.outboundSchema.optional(),
})
.transform((v) => {
return {
...(v.tonight === undefined ? null : { tonight: v.tonight }),
...(v.skip === undefined ? null : { skip: v.skip }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ApplyUpdatesRequest> = z.object({
tonight: Tonight$.outboundSchema.optional(),
skip: Skip$.outboundSchema.optional(),
});
}
/** @internal */
@@ -99,11 +86,11 @@ export namespace ApplyUpdatesResponse$ {
RawResponse: z.instanceof(Response),
})
.transform((v) => {
return {
contentType: v.ContentType,
statusCode: v.StatusCode,
rawResponse: v.RawResponse,
};
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
@@ -121,10 +108,10 @@ export namespace ApplyUpdatesResponse$ {
}),
})
.transform((v) => {
return {
ContentType: v.contentType,
StatusCode: v.statusCode,
RawResponse: v.rawResponse,
};
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type CancelServerActivitiesRequest = {
@@ -28,14 +29,9 @@ export type CancelServerActivitiesResponse = {
/** @internal */
export namespace CancelServerActivitiesRequest$ {
export const inboundSchema: z.ZodType<CancelServerActivitiesRequest, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<CancelServerActivitiesRequest, z.ZodTypeDef, unknown> =
z.object({
activityUUID: z.string(),
})
.transform((v) => {
return {
activityUUID: v.activityUUID,
};
});
export type Outbound = {
@@ -43,15 +39,9 @@ export namespace CancelServerActivitiesRequest$ {
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CancelServerActivitiesRequest> =
z
.object({
activityUUID: z.string(),
})
.transform((v) => {
return {
activityUUID: v.activityUUID,
};
});
z.object({
activityUUID: z.string(),
});
}
/** @internal */
@@ -63,11 +53,11 @@ export namespace CancelServerActivitiesResponse$ {
RawResponse: z.instanceof(Response),
})
.transform((v) => {
return {
contentType: v.ContentType,
statusCode: v.StatusCode,
rawResponse: v.RawResponse,
};
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
@@ -86,10 +76,10 @@ export namespace CancelServerActivitiesResponse$ {
}),
})
.transform((v) => {
return {
ContentType: v.contentType,
StatusCode: v.statusCode,
RawResponse: v.rawResponse,
};
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
/**
@@ -42,28 +43,19 @@ export namespace Download$ {
/** @internal */
export namespace CheckForUpdatesRequest$ {
export const inboundSchema: z.ZodType<CheckForUpdatesRequest, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<CheckForUpdatesRequest, z.ZodTypeDef, unknown> = z.object(
{
download: Download$.inboundSchema.optional(),
})
.transform((v) => {
return {
...(v.download === undefined ? null : { download: v.download }),
};
});
}
);
export type Outbound = {
download?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CheckForUpdatesRequest> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CheckForUpdatesRequest> =
z.object({
download: Download$.outboundSchema.optional(),
})
.transform((v) => {
return {
...(v.download === undefined ? null : { download: v.download }),
};
});
}
@@ -76,11 +68,11 @@ export namespace CheckForUpdatesResponse$ {
RawResponse: z.instanceof(Response),
})
.transform((v) => {
return {
contentType: v.ContentType,
statusCode: v.StatusCode,
rawResponse: v.RawResponse,
};
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
@@ -98,10 +90,10 @@ export namespace CheckForUpdatesResponse$ {
}),
})
.transform((v) => {
return {
ContentType: v.contentType,
StatusCode: v.statusCode,
RawResponse: v.rawResponse,
};
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type ClearPlaylistContentsRequest = {
@@ -28,28 +29,18 @@ export type ClearPlaylistContentsResponse = {
/** @internal */
export namespace ClearPlaylistContentsRequest$ {
export const inboundSchema: z.ZodType<ClearPlaylistContentsRequest, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<ClearPlaylistContentsRequest, z.ZodTypeDef, unknown> =
z.object({
playlistID: z.number(),
})
.transform((v) => {
return {
playlistID: v.playlistID,
};
});
export type Outbound = {
playlistID: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ClearPlaylistContentsRequest> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ClearPlaylistContentsRequest> =
z.object({
playlistID: z.number(),
})
.transform((v) => {
return {
playlistID: v.playlistID,
};
});
}
@@ -62,11 +53,11 @@ export namespace ClearPlaylistContentsResponse$ {
RawResponse: z.instanceof(Response),
})
.transform((v) => {
return {
contentType: v.ContentType,
statusCode: v.StatusCode,
rawResponse: v.RawResponse,
};
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
@@ -85,10 +76,10 @@ export namespace ClearPlaylistContentsResponse$ {
}),
})
.transform((v) => {
return {
ContentType: v.contentType,
StatusCode: v.statusCode,
RawResponse: v.rawResponse,
};
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
/**
@@ -108,23 +109,13 @@ export namespace Smart$ {
/** @internal */
export namespace CreatePlaylistRequest$ {
export const inboundSchema: z.ZodType<CreatePlaylistRequest, z.ZodTypeDef, unknown> = z
.object({
title: z.string(),
type: QueryParamType$.inboundSchema,
smart: Smart$.inboundSchema,
uri: z.string(),
playQueueID: z.number().optional(),
})
.transform((v) => {
return {
title: v.title,
type: v.type,
smart: v.smart,
uri: v.uri,
...(v.playQueueID === undefined ? null : { playQueueID: v.playQueueID }),
};
});
export const inboundSchema: z.ZodType<CreatePlaylistRequest, z.ZodTypeDef, unknown> = z.object({
title: z.string(),
type: QueryParamType$.inboundSchema,
smart: Smart$.inboundSchema,
uri: z.string(),
playQueueID: z.number().optional(),
});
export type Outbound = {
title: string;
@@ -134,29 +125,20 @@ export namespace CreatePlaylistRequest$ {
playQueueID?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreatePlaylistRequest> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreatePlaylistRequest> =
z.object({
title: z.string(),
type: QueryParamType$.outboundSchema,
smart: Smart$.outboundSchema,
uri: z.string(),
playQueueID: z.number().optional(),
})
.transform((v) => {
return {
title: v.title,
type: v.type,
smart: v.smart,
uri: v.uri,
...(v.playQueueID === undefined ? null : { playQueueID: v.playQueueID }),
};
});
}
/** @internal */
export namespace CreatePlaylistMetadata$ {
export const inboundSchema: z.ZodType<CreatePlaylistMetadata, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<CreatePlaylistMetadata, z.ZodTypeDef, unknown> = z.object(
{
ratingKey: z.string().optional(),
key: z.string().optional(),
guid: z.string().optional(),
@@ -173,27 +155,8 @@ export namespace CreatePlaylistMetadata$ {
updatedAt: z.number().int().optional(),
composite: z.string().optional(),
duration: z.number().int().optional(),
})
.transform((v) => {
return {
...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }),
...(v.key === undefined ? null : { key: v.key }),
...(v.guid === undefined ? null : { guid: v.guid }),
...(v.type === undefined ? null : { type: v.type }),
...(v.title === undefined ? null : { title: v.title }),
...(v.summary === undefined ? null : { summary: v.summary }),
...(v.smart === undefined ? null : { smart: v.smart }),
...(v.playlistType === undefined ? null : { playlistType: v.playlistType }),
...(v.icon === undefined ? null : { icon: v.icon }),
...(v.viewCount === undefined ? null : { viewCount: v.viewCount }),
...(v.lastViewedAt === undefined ? null : { lastViewedAt: v.lastViewedAt }),
...(v.leafCount === undefined ? null : { leafCount: v.leafCount }),
...(v.addedAt === undefined ? null : { addedAt: v.addedAt }),
...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }),
...(v.composite === undefined ? null : { composite: v.composite }),
...(v.duration === undefined ? null : { duration: v.duration }),
};
});
}
);
export type Outbound = {
ratingKey?: string | undefined;
@@ -214,8 +177,8 @@ export namespace CreatePlaylistMetadata$ {
duration?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreatePlaylistMetadata> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreatePlaylistMetadata> =
z.object({
ratingKey: z.string().optional(),
key: z.string().optional(),
guid: z.string().optional(),
@@ -232,26 +195,6 @@ export namespace CreatePlaylistMetadata$ {
updatedAt: z.number().int().optional(),
composite: z.string().optional(),
duration: z.number().int().optional(),
})
.transform((v) => {
return {
...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }),
...(v.key === undefined ? null : { key: v.key }),
...(v.guid === undefined ? null : { guid: v.guid }),
...(v.type === undefined ? null : { type: v.type }),
...(v.title === undefined ? null : { title: v.title }),
...(v.summary === undefined ? null : { summary: v.summary }),
...(v.smart === undefined ? null : { smart: v.smart }),
...(v.playlistType === undefined ? null : { playlistType: v.playlistType }),
...(v.icon === undefined ? null : { icon: v.icon }),
...(v.viewCount === undefined ? null : { viewCount: v.viewCount }),
...(v.lastViewedAt === undefined ? null : { lastViewedAt: v.lastViewedAt }),
...(v.leafCount === undefined ? null : { leafCount: v.leafCount }),
...(v.addedAt === undefined ? null : { addedAt: v.addedAt }),
...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }),
...(v.composite === undefined ? null : { composite: v.composite }),
...(v.duration === undefined ? null : { duration: v.duration }),
};
});
}
@@ -263,10 +206,9 @@ export namespace CreatePlaylistMediaContainer$ {
Metadata: z.array(z.lazy(() => CreatePlaylistMetadata$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.size === undefined ? null : { size: v.size }),
...(v.Metadata === undefined ? null : { metadata: v.Metadata }),
};
return remap$(v, {
Metadata: "metadata",
});
});
export type Outbound = {
@@ -280,10 +222,9 @@ export namespace CreatePlaylistMediaContainer$ {
metadata: z.array(z.lazy(() => CreatePlaylistMetadata$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.size === undefined ? null : { size: v.size }),
...(v.metadata === undefined ? null : { Metadata: v.metadata }),
};
return remap$(v, {
metadata: "Metadata",
});
});
}
@@ -294,9 +235,9 @@ export namespace CreatePlaylistResponseBody$ {
MediaContainer: z.lazy(() => CreatePlaylistMediaContainer$.inboundSchema).optional(),
})
.transform((v) => {
return {
...(v.MediaContainer === undefined ? null : { mediaContainer: v.MediaContainer }),
};
return remap$(v, {
MediaContainer: "mediaContainer",
});
});
export type Outbound = {
@@ -308,9 +249,9 @@ export namespace CreatePlaylistResponseBody$ {
mediaContainer: z.lazy(() => CreatePlaylistMediaContainer$.outboundSchema).optional(),
})
.transform((v) => {
return {
...(v.mediaContainer === undefined ? null : { MediaContainer: v.mediaContainer }),
};
return remap$(v, {
mediaContainer: "MediaContainer",
});
});
}
@@ -324,12 +265,11 @@ export namespace CreatePlaylistResponse$ {
object: z.lazy(() => CreatePlaylistResponseBody$.inboundSchema).optional(),
})
.transform((v) => {
return {
contentType: v.ContentType,
statusCode: v.StatusCode,
rawResponse: v.RawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
@@ -349,11 +289,10 @@ export namespace CreatePlaylistResponse$ {
object: z.lazy(() => CreatePlaylistResponseBody$.outboundSchema).optional(),
})
.transform((v) => {
return {
ContentType: v.contentType,
StatusCode: v.statusCode,
RawResponse: v.rawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type DeleteLibraryRequest = {
@@ -28,29 +29,19 @@ export type DeleteLibraryResponse = {
/** @internal */
export namespace DeleteLibraryRequest$ {
export const inboundSchema: z.ZodType<DeleteLibraryRequest, z.ZodTypeDef, unknown> = z
.object({
sectionId: z.number(),
})
.transform((v) => {
return {
sectionId: v.sectionId,
};
});
export const inboundSchema: z.ZodType<DeleteLibraryRequest, z.ZodTypeDef, unknown> = z.object({
sectionId: z.number(),
});
export type Outbound = {
sectionId: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DeleteLibraryRequest> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DeleteLibraryRequest> = z.object(
{
sectionId: z.number(),
})
.transform((v) => {
return {
sectionId: v.sectionId,
};
});
}
);
}
/** @internal */
@@ -62,11 +53,11 @@ export namespace DeleteLibraryResponse$ {
RawResponse: z.instanceof(Response),
})
.transform((v) => {
return {
contentType: v.ContentType,
statusCode: v.StatusCode,
rawResponse: v.RawResponse,
};
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
@@ -84,10 +75,10 @@ export namespace DeleteLibraryResponse$ {
}),
})
.transform((v) => {
return {
ContentType: v.contentType,
StatusCode: v.statusCode,
RawResponse: v.rawResponse,
};
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type DeletePlaylistRequest = {
@@ -28,28 +29,17 @@ export type DeletePlaylistResponse = {
/** @internal */
export namespace DeletePlaylistRequest$ {
export const inboundSchema: z.ZodType<DeletePlaylistRequest, z.ZodTypeDef, unknown> = z
.object({
playlistID: z.number(),
})
.transform((v) => {
return {
playlistID: v.playlistID,
};
});
export const inboundSchema: z.ZodType<DeletePlaylistRequest, z.ZodTypeDef, unknown> = z.object({
playlistID: z.number(),
});
export type Outbound = {
playlistID: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DeletePlaylistRequest> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DeletePlaylistRequest> =
z.object({
playlistID: z.number(),
})
.transform((v) => {
return {
playlistID: v.playlistID,
};
});
}
@@ -62,11 +52,11 @@ export namespace DeletePlaylistResponse$ {
RawResponse: z.instanceof(Response),
})
.transform((v) => {
return {
contentType: v.ContentType,
statusCode: v.StatusCode,
rawResponse: v.RawResponse,
};
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
@@ -84,10 +74,10 @@ export namespace DeletePlaylistResponse$ {
}),
})
.transform((v) => {
return {
ContentType: v.contentType,
StatusCode: v.statusCode,
RawResponse: v.rawResponse,
};
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type EnablePaperTrailResponse = {
@@ -28,11 +29,11 @@ export namespace EnablePaperTrailResponse$ {
RawResponse: z.instanceof(Response),
})
.transform((v) => {
return {
contentType: v.ContentType,
statusCode: v.StatusCode,
rawResponse: v.RawResponse,
};
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
@@ -50,10 +51,10 @@ export namespace EnablePaperTrailResponse$ {
}),
})
.transform((v) => {
return {
ContentType: v.contentType,
StatusCode: v.statusCode,
RawResponse: v.rawResponse,
};
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type Server = {
@@ -51,41 +52,19 @@ export type GetAvailableClientsResponse = {
/** @internal */
export namespace Server$ {
export const inboundSchema: z.ZodType<Server, z.ZodTypeDef, unknown> = z
.object({
name: z.string().optional(),
host: z.string().optional(),
address: z.string().optional(),
port: z.number().optional(),
machineIdentifier: z.string().optional(),
version: z.string().optional(),
protocol: z.string().optional(),
product: z.string().optional(),
deviceClass: z.string().optional(),
protocolVersion: z.number().optional(),
protocolCapabilities: z.string().optional(),
})
.transform((v) => {
return {
...(v.name === undefined ? null : { name: v.name }),
...(v.host === undefined ? null : { host: v.host }),
...(v.address === undefined ? null : { address: v.address }),
...(v.port === undefined ? null : { port: v.port }),
...(v.machineIdentifier === undefined
? null
: { machineIdentifier: v.machineIdentifier }),
...(v.version === undefined ? null : { version: v.version }),
...(v.protocol === undefined ? null : { protocol: v.protocol }),
...(v.product === undefined ? null : { product: v.product }),
...(v.deviceClass === undefined ? null : { deviceClass: v.deviceClass }),
...(v.protocolVersion === undefined
? null
: { protocolVersion: v.protocolVersion }),
...(v.protocolCapabilities === undefined
? null
: { protocolCapabilities: v.protocolCapabilities }),
};
});
export const inboundSchema: z.ZodType<Server, z.ZodTypeDef, unknown> = z.object({
name: z.string().optional(),
host: z.string().optional(),
address: z.string().optional(),
port: z.number().optional(),
machineIdentifier: z.string().optional(),
version: z.string().optional(),
protocol: z.string().optional(),
product: z.string().optional(),
deviceClass: z.string().optional(),
protocolVersion: z.number().optional(),
protocolCapabilities: z.string().optional(),
});
export type Outbound = {
name?: string | undefined;
@@ -101,41 +80,19 @@ export namespace Server$ {
protocolCapabilities?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Server> = z
.object({
name: z.string().optional(),
host: z.string().optional(),
address: z.string().optional(),
port: z.number().optional(),
machineIdentifier: z.string().optional(),
version: z.string().optional(),
protocol: z.string().optional(),
product: z.string().optional(),
deviceClass: z.string().optional(),
protocolVersion: z.number().optional(),
protocolCapabilities: z.string().optional(),
})
.transform((v) => {
return {
...(v.name === undefined ? null : { name: v.name }),
...(v.host === undefined ? null : { host: v.host }),
...(v.address === undefined ? null : { address: v.address }),
...(v.port === undefined ? null : { port: v.port }),
...(v.machineIdentifier === undefined
? null
: { machineIdentifier: v.machineIdentifier }),
...(v.version === undefined ? null : { version: v.version }),
...(v.protocol === undefined ? null : { protocol: v.protocol }),
...(v.product === undefined ? null : { product: v.product }),
...(v.deviceClass === undefined ? null : { deviceClass: v.deviceClass }),
...(v.protocolVersion === undefined
? null
: { protocolVersion: v.protocolVersion }),
...(v.protocolCapabilities === undefined
? null
: { protocolCapabilities: v.protocolCapabilities }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Server> = z.object({
name: z.string().optional(),
host: z.string().optional(),
address: z.string().optional(),
port: z.number().optional(),
machineIdentifier: z.string().optional(),
version: z.string().optional(),
protocol: z.string().optional(),
product: z.string().optional(),
deviceClass: z.string().optional(),
protocolVersion: z.number().optional(),
protocolCapabilities: z.string().optional(),
});
}
/** @internal */
@@ -150,10 +107,9 @@ export namespace GetAvailableClientsMediaContainer$ {
Server: z.array(z.lazy(() => Server$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.size === undefined ? null : { size: v.size }),
...(v.Server === undefined ? null : { server: v.Server }),
};
return remap$(v, {
Server: "server",
});
});
export type Outbound = {
@@ -171,10 +127,9 @@ export namespace GetAvailableClientsMediaContainer$ {
server: z.array(z.lazy(() => Server$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.size === undefined ? null : { size: v.size }),
...(v.server === undefined ? null : { Server: v.server }),
};
return remap$(v, {
server: "Server",
});
});
}
@@ -188,11 +143,9 @@ export namespace GetAvailableClientsResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.MediaContainer === undefined
? null
: { mediaContainer: v.MediaContainer }),
};
return remap$(v, {
MediaContainer: "mediaContainer",
});
});
export type Outbound = {
@@ -210,9 +163,9 @@ export namespace GetAvailableClientsResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.mediaContainer === undefined ? null : { MediaContainer: v.mediaContainer }),
};
return remap$(v, {
mediaContainer: "MediaContainer",
});
});
}
@@ -226,12 +179,11 @@ export namespace GetAvailableClientsResponse$ {
object: z.lazy(() => GetAvailableClientsResponseBody$.inboundSchema).optional(),
})
.transform((v) => {
return {
contentType: v.ContentType,
statusCode: v.StatusCode,
rawResponse: v.RawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
@@ -251,11 +203,10 @@ export namespace GetAvailableClientsResponse$ {
object: z.lazy(() => GetAvailableClientsResponseBody$.outboundSchema).optional(),
})
.transform((v) => {
return {
ContentType: v.contentType,
StatusCode: v.statusCode,
RawResponse: v.rawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type ButlerTask = {
@@ -45,27 +46,14 @@ export type GetButlerTasksResponse = {
/** @internal */
export namespace ButlerTask$ {
export const inboundSchema: z.ZodType<ButlerTask, z.ZodTypeDef, unknown> = z
.object({
name: z.string().optional(),
interval: z.number().optional(),
scheduleRandomized: z.boolean().optional(),
enabled: z.boolean().optional(),
title: z.string().optional(),
description: z.string().optional(),
})
.transform((v) => {
return {
...(v.name === undefined ? null : { name: v.name }),
...(v.interval === undefined ? null : { interval: v.interval }),
...(v.scheduleRandomized === undefined
? null
: { scheduleRandomized: v.scheduleRandomized }),
...(v.enabled === undefined ? null : { enabled: v.enabled }),
...(v.title === undefined ? null : { title: v.title }),
...(v.description === undefined ? null : { description: v.description }),
};
});
export const inboundSchema: z.ZodType<ButlerTask, z.ZodTypeDef, unknown> = z.object({
name: z.string().optional(),
interval: z.number().optional(),
scheduleRandomized: z.boolean().optional(),
enabled: z.boolean().optional(),
title: z.string().optional(),
description: z.string().optional(),
});
export type Outbound = {
name?: string | undefined;
@@ -76,27 +64,14 @@ export namespace ButlerTask$ {
description?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ButlerTask> = z
.object({
name: z.string().optional(),
interval: z.number().optional(),
scheduleRandomized: z.boolean().optional(),
enabled: z.boolean().optional(),
title: z.string().optional(),
description: z.string().optional(),
})
.transform((v) => {
return {
...(v.name === undefined ? null : { name: v.name }),
...(v.interval === undefined ? null : { interval: v.interval }),
...(v.scheduleRandomized === undefined
? null
: { scheduleRandomized: v.scheduleRandomized }),
...(v.enabled === undefined ? null : { enabled: v.enabled }),
...(v.title === undefined ? null : { title: v.title }),
...(v.description === undefined ? null : { description: v.description }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ButlerTask> = z.object({
name: z.string().optional(),
interval: z.number().optional(),
scheduleRandomized: z.boolean().optional(),
enabled: z.boolean().optional(),
title: z.string().optional(),
description: z.string().optional(),
});
}
/** @internal */
@@ -106,9 +81,9 @@ export namespace ButlerTasks$ {
ButlerTask: z.array(z.lazy(() => ButlerTask$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.ButlerTask === undefined ? null : { butlerTask: v.ButlerTask }),
};
return remap$(v, {
ButlerTask: "butlerTask",
});
});
export type Outbound = {
@@ -120,9 +95,9 @@ export namespace ButlerTasks$ {
butlerTask: z.array(z.lazy(() => ButlerTask$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.butlerTask === undefined ? null : { ButlerTask: v.butlerTask }),
};
return remap$(v, {
butlerTask: "ButlerTask",
});
});
}
@@ -133,9 +108,9 @@ export namespace GetButlerTasksResponseBody$ {
ButlerTasks: z.lazy(() => ButlerTasks$.inboundSchema).optional(),
})
.transform((v) => {
return {
...(v.ButlerTasks === undefined ? null : { butlerTasks: v.ButlerTasks }),
};
return remap$(v, {
ButlerTasks: "butlerTasks",
});
});
export type Outbound = {
@@ -147,9 +122,9 @@ export namespace GetButlerTasksResponseBody$ {
butlerTasks: z.lazy(() => ButlerTasks$.outboundSchema).optional(),
})
.transform((v) => {
return {
...(v.butlerTasks === undefined ? null : { ButlerTasks: v.butlerTasks }),
};
return remap$(v, {
butlerTasks: "ButlerTasks",
});
});
}
@@ -163,12 +138,11 @@ export namespace GetButlerTasksResponse$ {
object: z.lazy(() => GetButlerTasksResponseBody$.inboundSchema).optional(),
})
.transform((v) => {
return {
contentType: v.ContentType,
statusCode: v.StatusCode,
rawResponse: v.RawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
@@ -188,11 +162,10 @@ export namespace GetButlerTasksResponse$ {
object: z.lazy(() => GetButlerTasksResponseBody$.outboundSchema).optional(),
})
.transform((v) => {
return {
ContentType: v.contentType,
StatusCode: v.statusCode,
RawResponse: v.rawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type Device = {
@@ -46,25 +47,13 @@ export type GetDevicesResponse = {
/** @internal */
export namespace Device$ {
export const inboundSchema: z.ZodType<Device, z.ZodTypeDef, unknown> = z
.object({
id: z.number().optional(),
name: z.string().optional(),
platform: z.string().optional(),
clientIdentifier: z.string().optional(),
createdAt: z.number().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.name === undefined ? null : { name: v.name }),
...(v.platform === undefined ? null : { platform: v.platform }),
...(v.clientIdentifier === undefined
? null
: { clientIdentifier: v.clientIdentifier }),
...(v.createdAt === undefined ? null : { createdAt: v.createdAt }),
};
});
export const inboundSchema: z.ZodType<Device, z.ZodTypeDef, unknown> = z.object({
id: z.number().optional(),
name: z.string().optional(),
platform: z.string().optional(),
clientIdentifier: z.string().optional(),
createdAt: z.number().optional(),
});
export type Outbound = {
id?: number | undefined;
@@ -74,25 +63,13 @@ export namespace Device$ {
createdAt?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Device> = z
.object({
id: z.number().optional(),
name: z.string().optional(),
platform: z.string().optional(),
clientIdentifier: z.string().optional(),
createdAt: z.number().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.name === undefined ? null : { name: v.name }),
...(v.platform === undefined ? null : { platform: v.platform }),
...(v.clientIdentifier === undefined
? null
: { clientIdentifier: v.clientIdentifier }),
...(v.createdAt === undefined ? null : { createdAt: v.createdAt }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Device> = z.object({
id: z.number().optional(),
name: z.string().optional(),
platform: z.string().optional(),
clientIdentifier: z.string().optional(),
createdAt: z.number().optional(),
});
}
/** @internal */
@@ -104,11 +81,9 @@ export namespace GetDevicesMediaContainer$ {
Device: z.array(z.lazy(() => Device$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.size === undefined ? null : { size: v.size }),
...(v.identifier === undefined ? null : { identifier: v.identifier }),
...(v.Device === undefined ? null : { device: v.Device }),
};
return remap$(v, {
Device: "device",
});
});
export type Outbound = {
@@ -124,11 +99,9 @@ export namespace GetDevicesMediaContainer$ {
device: z.array(z.lazy(() => Device$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.size === undefined ? null : { size: v.size }),
...(v.identifier === undefined ? null : { identifier: v.identifier }),
...(v.device === undefined ? null : { Device: v.device }),
};
return remap$(v, {
device: "Device",
});
});
}
@@ -139,9 +112,9 @@ export namespace GetDevicesResponseBody$ {
MediaContainer: z.lazy(() => GetDevicesMediaContainer$.inboundSchema).optional(),
})
.transform((v) => {
return {
...(v.MediaContainer === undefined ? null : { mediaContainer: v.MediaContainer }),
};
return remap$(v, {
MediaContainer: "mediaContainer",
});
});
export type Outbound = {
@@ -153,9 +126,9 @@ export namespace GetDevicesResponseBody$ {
mediaContainer: z.lazy(() => GetDevicesMediaContainer$.outboundSchema).optional(),
})
.transform((v) => {
return {
...(v.mediaContainer === undefined ? null : { MediaContainer: v.mediaContainer }),
};
return remap$(v, {
mediaContainer: "MediaContainer",
});
});
}
@@ -169,12 +142,11 @@ export namespace GetDevicesResponse$ {
object: z.lazy(() => GetDevicesResponseBody$.inboundSchema).optional(),
})
.transform((v) => {
return {
contentType: v.ContentType,
statusCode: v.StatusCode,
rawResponse: v.RawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
@@ -194,11 +166,10 @@ export namespace GetDevicesResponse$ {
object: z.lazy(() => GetDevicesResponseBody$.outboundSchema).optional(),
})
.transform((v) => {
return {
ContentType: v.contentType,
StatusCode: v.statusCode,
RawResponse: v.rawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetFileHashRequest = {
@@ -32,34 +33,20 @@ export type GetFileHashResponse = {
/** @internal */
export namespace GetFileHashRequest$ {
export const inboundSchema: z.ZodType<GetFileHashRequest, z.ZodTypeDef, unknown> = z
.object({
url: z.string(),
type: z.number().optional(),
})
.transform((v) => {
return {
url: v.url,
...(v.type === undefined ? null : { type: v.type }),
};
});
export const inboundSchema: z.ZodType<GetFileHashRequest, z.ZodTypeDef, unknown> = z.object({
url: z.string(),
type: z.number().optional(),
});
export type Outbound = {
url: string;
type?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetFileHashRequest> = z
.object({
url: z.string(),
type: z.number().optional(),
})
.transform((v) => {
return {
url: v.url,
...(v.type === undefined ? null : { type: v.type }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetFileHashRequest> = z.object({
url: z.string(),
type: z.number().optional(),
});
}
/** @internal */
@@ -71,11 +58,11 @@ export namespace GetFileHashResponse$ {
RawResponse: z.instanceof(Response),
})
.transform((v) => {
return {
contentType: v.ContentType,
statusCode: v.StatusCode,
rawResponse: v.RawResponse,
};
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
@@ -93,10 +80,10 @@ export namespace GetFileHashResponse$ {
}),
})
.transform((v) => {
return {
ContentType: v.contentType,
StatusCode: v.statusCode,
RawResponse: v.rawResponse,
};
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
/**
@@ -98,79 +99,45 @@ export namespace OnlyTransient$ {
/** @internal */
export namespace GetGlobalHubsRequest$ {
export const inboundSchema: z.ZodType<GetGlobalHubsRequest, z.ZodTypeDef, unknown> = z
.object({
count: z.number().optional(),
onlyTransient: OnlyTransient$.inboundSchema.optional(),
})
.transform((v) => {
return {
...(v.count === undefined ? null : { count: v.count }),
...(v.onlyTransient === undefined ? null : { onlyTransient: v.onlyTransient }),
};
});
export const inboundSchema: z.ZodType<GetGlobalHubsRequest, z.ZodTypeDef, unknown> = z.object({
count: z.number().optional(),
onlyTransient: OnlyTransient$.inboundSchema.optional(),
});
export type Outbound = {
count?: number | undefined;
onlyTransient?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetGlobalHubsRequest> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetGlobalHubsRequest> = z.object(
{
count: z.number().optional(),
onlyTransient: OnlyTransient$.outboundSchema.optional(),
})
.transform((v) => {
return {
...(v.count === undefined ? null : { count: v.count }),
...(v.onlyTransient === undefined ? null : { onlyTransient: v.onlyTransient }),
};
});
}
);
}
/** @internal */
export namespace GetGlobalHubsMetadata$ {
export const inboundSchema: z.ZodType<GetGlobalHubsMetadata, z.ZodTypeDef, unknown> = z
.object({
ratingKey: z.string().optional(),
key: z.string().optional(),
guid: z.string().optional(),
type: z.string().optional(),
title: z.string().optional(),
titleSort: z.string().optional(),
summary: z.string().optional(),
smart: z.boolean().optional(),
playlistType: z.string().optional(),
composite: z.string().optional(),
icon: z.string().optional(),
viewCount: z.number().int().optional(),
lastViewedAt: z.number().int().optional(),
duration: z.number().int().optional(),
leafCount: z.number().int().optional(),
addedAt: z.number().int().optional(),
updatedAt: z.number().int().optional(),
})
.transform((v) => {
return {
...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }),
...(v.key === undefined ? null : { key: v.key }),
...(v.guid === undefined ? null : { guid: v.guid }),
...(v.type === undefined ? null : { type: v.type }),
...(v.title === undefined ? null : { title: v.title }),
...(v.titleSort === undefined ? null : { titleSort: v.titleSort }),
...(v.summary === undefined ? null : { summary: v.summary }),
...(v.smart === undefined ? null : { smart: v.smart }),
...(v.playlistType === undefined ? null : { playlistType: v.playlistType }),
...(v.composite === undefined ? null : { composite: v.composite }),
...(v.icon === undefined ? null : { icon: v.icon }),
...(v.viewCount === undefined ? null : { viewCount: v.viewCount }),
...(v.lastViewedAt === undefined ? null : { lastViewedAt: v.lastViewedAt }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.leafCount === undefined ? null : { leafCount: v.leafCount }),
...(v.addedAt === undefined ? null : { addedAt: v.addedAt }),
...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }),
};
});
export const inboundSchema: z.ZodType<GetGlobalHubsMetadata, z.ZodTypeDef, unknown> = z.object({
ratingKey: z.string().optional(),
key: z.string().optional(),
guid: z.string().optional(),
type: z.string().optional(),
title: z.string().optional(),
titleSort: z.string().optional(),
summary: z.string().optional(),
smart: z.boolean().optional(),
playlistType: z.string().optional(),
composite: z.string().optional(),
icon: z.string().optional(),
viewCount: z.number().int().optional(),
lastViewedAt: z.number().int().optional(),
duration: z.number().int().optional(),
leafCount: z.number().int().optional(),
addedAt: z.number().int().optional(),
updatedAt: z.number().int().optional(),
});
export type Outbound = {
ratingKey?: string | undefined;
@@ -192,8 +159,8 @@ export namespace GetGlobalHubsMetadata$ {
updatedAt?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetGlobalHubsMetadata> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetGlobalHubsMetadata> =
z.object({
ratingKey: z.string().optional(),
key: z.string().optional(),
guid: z.string().optional(),
@@ -211,27 +178,6 @@ export namespace GetGlobalHubsMetadata$ {
leafCount: z.number().int().optional(),
addedAt: z.number().int().optional(),
updatedAt: z.number().int().optional(),
})
.transform((v) => {
return {
...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }),
...(v.key === undefined ? null : { key: v.key }),
...(v.guid === undefined ? null : { guid: v.guid }),
...(v.type === undefined ? null : { type: v.type }),
...(v.title === undefined ? null : { title: v.title }),
...(v.titleSort === undefined ? null : { titleSort: v.titleSort }),
...(v.summary === undefined ? null : { summary: v.summary }),
...(v.smart === undefined ? null : { smart: v.smart }),
...(v.playlistType === undefined ? null : { playlistType: v.playlistType }),
...(v.composite === undefined ? null : { composite: v.composite }),
...(v.icon === undefined ? null : { icon: v.icon }),
...(v.viewCount === undefined ? null : { viewCount: v.viewCount }),
...(v.lastViewedAt === undefined ? null : { lastViewedAt: v.lastViewedAt }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.leafCount === undefined ? null : { leafCount: v.leafCount }),
...(v.addedAt === undefined ? null : { addedAt: v.addedAt }),
...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }),
};
});
}
@@ -252,19 +198,9 @@ export namespace Hub$ {
Metadata: z.array(z.lazy(() => GetGlobalHubsMetadata$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.hubKey === undefined ? null : { hubKey: v.hubKey }),
...(v.key === undefined ? null : { key: v.key }),
...(v.title === undefined ? null : { title: v.title }),
...(v.type === undefined ? null : { type: v.type }),
...(v.hubIdentifier === undefined ? null : { hubIdentifier: v.hubIdentifier }),
...(v.context === undefined ? null : { context: v.context }),
...(v.size === undefined ? null : { size: v.size }),
...(v.more === undefined ? null : { more: v.more }),
...(v.style === undefined ? null : { style: v.style }),
...(v.promoted === undefined ? null : { promoted: v.promoted }),
...(v.Metadata === undefined ? null : { metadata: v.Metadata }),
};
return remap$(v, {
Metadata: "metadata",
});
});
export type Outbound = {
@@ -296,19 +232,9 @@ export namespace Hub$ {
metadata: z.array(z.lazy(() => GetGlobalHubsMetadata$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.hubKey === undefined ? null : { hubKey: v.hubKey }),
...(v.key === undefined ? null : { key: v.key }),
...(v.title === undefined ? null : { title: v.title }),
...(v.type === undefined ? null : { type: v.type }),
...(v.hubIdentifier === undefined ? null : { hubIdentifier: v.hubIdentifier }),
...(v.context === undefined ? null : { context: v.context }),
...(v.size === undefined ? null : { size: v.size }),
...(v.more === undefined ? null : { more: v.more }),
...(v.style === undefined ? null : { style: v.style }),
...(v.promoted === undefined ? null : { promoted: v.promoted }),
...(v.metadata === undefined ? null : { Metadata: v.metadata }),
};
return remap$(v, {
metadata: "Metadata",
});
});
}
@@ -322,12 +248,9 @@ export namespace GetGlobalHubsMediaContainer$ {
Hub: z.array(z.lazy(() => Hub$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.size === undefined ? null : { size: v.size }),
...(v.allowSync === undefined ? null : { allowSync: v.allowSync }),
...(v.identifier === undefined ? null : { identifier: v.identifier }),
...(v.Hub === undefined ? null : { hub: v.Hub }),
};
return remap$(v, {
Hub: "hub",
});
});
export type Outbound = {
@@ -345,12 +268,9 @@ export namespace GetGlobalHubsMediaContainer$ {
hub: z.array(z.lazy(() => Hub$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.size === undefined ? null : { size: v.size }),
...(v.allowSync === undefined ? null : { allowSync: v.allowSync }),
...(v.identifier === undefined ? null : { identifier: v.identifier }),
...(v.hub === undefined ? null : { Hub: v.hub }),
};
return remap$(v, {
hub: "Hub",
});
});
}
@@ -361,9 +281,9 @@ export namespace GetGlobalHubsResponseBody$ {
MediaContainer: z.lazy(() => GetGlobalHubsMediaContainer$.inboundSchema).optional(),
})
.transform((v) => {
return {
...(v.MediaContainer === undefined ? null : { mediaContainer: v.MediaContainer }),
};
return remap$(v, {
MediaContainer: "mediaContainer",
});
});
export type Outbound = {
@@ -375,9 +295,9 @@ export namespace GetGlobalHubsResponseBody$ {
mediaContainer: z.lazy(() => GetGlobalHubsMediaContainer$.outboundSchema).optional(),
})
.transform((v) => {
return {
...(v.mediaContainer === undefined ? null : { MediaContainer: v.mediaContainer }),
};
return remap$(v, {
mediaContainer: "MediaContainer",
});
});
}
@@ -391,12 +311,11 @@ export namespace GetGlobalHubsResponse$ {
object: z.lazy(() => GetGlobalHubsResponseBody$.inboundSchema).optional(),
})
.transform((v) => {
return {
contentType: v.ContentType,
statusCode: v.StatusCode,
rawResponse: v.RawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
@@ -416,11 +335,10 @@ export namespace GetGlobalHubsResponse$ {
object: z.lazy(() => GetGlobalHubsResponseBody$.outboundSchema).optional(),
})
.transform((v) => {
return {
ContentType: v.contentType,
StatusCode: v.statusCode,
RawResponse: v.rawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetLibrariesLocation = {
@@ -68,34 +69,22 @@ export type GetLibrariesResponse = {
/** @internal */
export namespace GetLibrariesLocation$ {
export const inboundSchema: z.ZodType<GetLibrariesLocation, z.ZodTypeDef, unknown> = z
.object({
id: z.number().int().optional(),
path: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.path === undefined ? null : { path: v.path }),
};
});
export const inboundSchema: z.ZodType<GetLibrariesLocation, z.ZodTypeDef, unknown> = z.object({
id: z.number().int().optional(),
path: z.string().optional(),
});
export type Outbound = {
id?: number | undefined;
path?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibrariesLocation> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibrariesLocation> = z.object(
{
id: z.number().int().optional(),
path: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.path === undefined ? null : { path: v.path }),
};
});
}
);
}
/** @internal */
@@ -125,31 +114,9 @@ export namespace GetLibrariesDirectory$ {
Location: z.array(z.lazy(() => GetLibrariesLocation$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.allowSync === undefined ? null : { allowSync: v.allowSync }),
...(v.art === undefined ? null : { art: v.art }),
...(v.composite === undefined ? null : { composite: v.composite }),
...(v.filters === undefined ? null : { filters: v.filters }),
...(v.refreshing === undefined ? null : { refreshing: v.refreshing }),
...(v.thumb === undefined ? null : { thumb: v.thumb }),
...(v.key === undefined ? null : { key: v.key }),
...(v.type === undefined ? null : { type: v.type }),
...(v.title === undefined ? null : { title: v.title }),
...(v.agent === undefined ? null : { agent: v.agent }),
...(v.scanner === undefined ? null : { scanner: v.scanner }),
...(v.language === undefined ? null : { language: v.language }),
...(v.uuid === undefined ? null : { uuid: v.uuid }),
...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }),
...(v.createdAt === undefined ? null : { createdAt: v.createdAt }),
...(v.scannedAt === undefined ? null : { scannedAt: v.scannedAt }),
...(v.content === undefined ? null : { content: v.content }),
...(v.directory === undefined ? null : { directory: v.directory }),
...(v.contentChangedAt === undefined
? null
: { contentChangedAt: v.contentChangedAt }),
...(v.hidden === undefined ? null : { hidden: v.hidden }),
...(v.Location === undefined ? null : { location: v.Location }),
};
return remap$(v, {
Location: "location",
});
});
export type Outbound = {
@@ -201,31 +168,9 @@ export namespace GetLibrariesDirectory$ {
location: z.array(z.lazy(() => GetLibrariesLocation$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.allowSync === undefined ? null : { allowSync: v.allowSync }),
...(v.art === undefined ? null : { art: v.art }),
...(v.composite === undefined ? null : { composite: v.composite }),
...(v.filters === undefined ? null : { filters: v.filters }),
...(v.refreshing === undefined ? null : { refreshing: v.refreshing }),
...(v.thumb === undefined ? null : { thumb: v.thumb }),
...(v.key === undefined ? null : { key: v.key }),
...(v.type === undefined ? null : { type: v.type }),
...(v.title === undefined ? null : { title: v.title }),
...(v.agent === undefined ? null : { agent: v.agent }),
...(v.scanner === undefined ? null : { scanner: v.scanner }),
...(v.language === undefined ? null : { language: v.language }),
...(v.uuid === undefined ? null : { uuid: v.uuid }),
...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }),
...(v.createdAt === undefined ? null : { createdAt: v.createdAt }),
...(v.scannedAt === undefined ? null : { scannedAt: v.scannedAt }),
...(v.content === undefined ? null : { content: v.content }),
...(v.directory === undefined ? null : { directory: v.directory }),
...(v.contentChangedAt === undefined
? null
: { contentChangedAt: v.contentChangedAt }),
...(v.hidden === undefined ? null : { hidden: v.hidden }),
...(v.location === undefined ? null : { Location: v.location }),
};
return remap$(v, {
location: "Location",
});
});
}
@@ -239,12 +184,9 @@ export namespace GetLibrariesMediaContainer$ {
Directory: z.array(z.lazy(() => GetLibrariesDirectory$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.size === undefined ? null : { size: v.size }),
...(v.allowSync === undefined ? null : { allowSync: v.allowSync }),
...(v.title1 === undefined ? null : { title1: v.title1 }),
...(v.Directory === undefined ? null : { directory: v.Directory }),
};
return remap$(v, {
Directory: "directory",
});
});
export type Outbound = {
@@ -262,12 +204,9 @@ export namespace GetLibrariesMediaContainer$ {
directory: z.array(z.lazy(() => GetLibrariesDirectory$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.size === undefined ? null : { size: v.size }),
...(v.allowSync === undefined ? null : { allowSync: v.allowSync }),
...(v.title1 === undefined ? null : { title1: v.title1 }),
...(v.directory === undefined ? null : { Directory: v.directory }),
};
return remap$(v, {
directory: "Directory",
});
});
}
@@ -278,9 +217,9 @@ export namespace GetLibrariesResponseBody$ {
MediaContainer: z.lazy(() => GetLibrariesMediaContainer$.inboundSchema).optional(),
})
.transform((v) => {
return {
...(v.MediaContainer === undefined ? null : { mediaContainer: v.MediaContainer }),
};
return remap$(v, {
MediaContainer: "mediaContainer",
});
});
export type Outbound = {
@@ -292,9 +231,9 @@ export namespace GetLibrariesResponseBody$ {
mediaContainer: z.lazy(() => GetLibrariesMediaContainer$.outboundSchema).optional(),
})
.transform((v) => {
return {
...(v.mediaContainer === undefined ? null : { MediaContainer: v.mediaContainer }),
};
return remap$(v, {
mediaContainer: "MediaContainer",
});
});
}
@@ -308,12 +247,11 @@ export namespace GetLibrariesResponse$ {
object: z.lazy(() => GetLibrariesResponseBody$.inboundSchema).optional(),
})
.transform((v) => {
return {
contentType: v.ContentType,
statusCode: v.StatusCode,
rawResponse: v.RawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
@@ -333,11 +271,10 @@ export namespace GetLibrariesResponse$ {
object: z.lazy(() => GetLibrariesResponseBody$.outboundSchema).optional(),
})
.transform((v) => {
return {
ContentType: v.contentType,
StatusCode: v.statusCode,
RawResponse: v.rawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
/**
@@ -135,55 +136,31 @@ export namespace IncludeDetails$ {
/** @internal */
export namespace GetLibraryRequest$ {
export const inboundSchema: z.ZodType<GetLibraryRequest, z.ZodTypeDef, unknown> = z
.object({
sectionId: z.number(),
includeDetails: IncludeDetails$.inboundSchema.default(IncludeDetails.Zero),
})
.transform((v) => {
return {
sectionId: v.sectionId,
includeDetails: v.includeDetails,
};
});
export const inboundSchema: z.ZodType<GetLibraryRequest, z.ZodTypeDef, unknown> = z.object({
sectionId: z.number(),
includeDetails: IncludeDetails$.inboundSchema.default(IncludeDetails.Zero),
});
export type Outbound = {
sectionId: number;
includeDetails: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryRequest> = z
.object({
sectionId: z.number(),
includeDetails: IncludeDetails$.outboundSchema.default(IncludeDetails.Zero),
})
.transform((v) => {
return {
sectionId: v.sectionId,
includeDetails: v.includeDetails,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryRequest> = z.object({
sectionId: z.number(),
includeDetails: IncludeDetails$.outboundSchema.default(IncludeDetails.Zero),
});
}
/** @internal */
export namespace GetLibraryDirectory$ {
export const inboundSchema: z.ZodType<GetLibraryDirectory, z.ZodTypeDef, unknown> = z
.object({
key: z.string().optional(),
title: z.string().optional(),
secondary: z.boolean().optional(),
prompt: z.string().optional(),
search: z.boolean().optional(),
})
.transform((v) => {
return {
...(v.key === undefined ? null : { key: v.key }),
...(v.title === undefined ? null : { title: v.title }),
...(v.secondary === undefined ? null : { secondary: v.secondary }),
...(v.prompt === undefined ? null : { prompt: v.prompt }),
...(v.search === undefined ? null : { search: v.search }),
};
});
export const inboundSchema: z.ZodType<GetLibraryDirectory, z.ZodTypeDef, unknown> = z.object({
key: z.string().optional(),
title: z.string().optional(),
secondary: z.boolean().optional(),
prompt: z.string().optional(),
search: z.boolean().optional(),
});
export type Outbound = {
key?: string | undefined;
@@ -193,44 +170,24 @@ export namespace GetLibraryDirectory$ {
search?: boolean | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryDirectory> = z
.object({
key: z.string().optional(),
title: z.string().optional(),
secondary: z.boolean().optional(),
prompt: z.string().optional(),
search: z.boolean().optional(),
})
.transform((v) => {
return {
...(v.key === undefined ? null : { key: v.key }),
...(v.title === undefined ? null : { title: v.title }),
...(v.secondary === undefined ? null : { secondary: v.secondary }),
...(v.prompt === undefined ? null : { prompt: v.prompt }),
...(v.search === undefined ? null : { search: v.search }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryDirectory> = z.object({
key: z.string().optional(),
title: z.string().optional(),
secondary: z.boolean().optional(),
prompt: z.string().optional(),
search: z.boolean().optional(),
});
}
/** @internal */
export namespace Filter$ {
export const inboundSchema: z.ZodType<Filter, z.ZodTypeDef, unknown> = z
.object({
filter: z.string().optional(),
filterType: z.string().optional(),
key: z.string().optional(),
title: z.string().optional(),
type: z.string().optional(),
})
.transform((v) => {
return {
...(v.filter === undefined ? null : { filter: v.filter }),
...(v.filterType === undefined ? null : { filterType: v.filterType }),
...(v.key === undefined ? null : { key: v.key }),
...(v.title === undefined ? null : { title: v.title }),
...(v.type === undefined ? null : { type: v.type }),
};
});
export const inboundSchema: z.ZodType<Filter, z.ZodTypeDef, unknown> = z.object({
filter: z.string().optional(),
filterType: z.string().optional(),
key: z.string().optional(),
title: z.string().optional(),
type: z.string().optional(),
});
export type Outbound = {
filter?: string | undefined;
@@ -240,50 +197,25 @@ export namespace Filter$ {
type?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Filter> = z
.object({
filter: z.string().optional(),
filterType: z.string().optional(),
key: z.string().optional(),
title: z.string().optional(),
type: z.string().optional(),
})
.transform((v) => {
return {
...(v.filter === undefined ? null : { filter: v.filter }),
...(v.filterType === undefined ? null : { filterType: v.filterType }),
...(v.key === undefined ? null : { key: v.key }),
...(v.title === undefined ? null : { title: v.title }),
...(v.type === undefined ? null : { type: v.type }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Filter> = z.object({
filter: z.string().optional(),
filterType: z.string().optional(),
key: z.string().optional(),
title: z.string().optional(),
type: z.string().optional(),
});
}
/** @internal */
export namespace Sort$ {
export const inboundSchema: z.ZodType<Sort, z.ZodTypeDef, unknown> = z
.object({
default: z.string().optional(),
defaultDirection: z.string().optional(),
descKey: z.string().optional(),
firstCharacterKey: z.string().optional(),
key: z.string().optional(),
title: z.string().optional(),
})
.transform((v) => {
return {
...(v.default === undefined ? null : { default: v.default }),
...(v.defaultDirection === undefined
? null
: { defaultDirection: v.defaultDirection }),
...(v.descKey === undefined ? null : { descKey: v.descKey }),
...(v.firstCharacterKey === undefined
? null
: { firstCharacterKey: v.firstCharacterKey }),
...(v.key === undefined ? null : { key: v.key }),
...(v.title === undefined ? null : { title: v.title }),
};
});
export const inboundSchema: z.ZodType<Sort, z.ZodTypeDef, unknown> = z.object({
default: z.string().optional(),
defaultDirection: z.string().optional(),
descKey: z.string().optional(),
firstCharacterKey: z.string().optional(),
key: z.string().optional(),
title: z.string().optional(),
});
export type Outbound = {
default?: string | undefined;
@@ -294,48 +226,24 @@ export namespace Sort$ {
title?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Sort> = z
.object({
default: z.string().optional(),
defaultDirection: z.string().optional(),
descKey: z.string().optional(),
firstCharacterKey: z.string().optional(),
key: z.string().optional(),
title: z.string().optional(),
})
.transform((v) => {
return {
...(v.default === undefined ? null : { default: v.default }),
...(v.defaultDirection === undefined
? null
: { defaultDirection: v.defaultDirection }),
...(v.descKey === undefined ? null : { descKey: v.descKey }),
...(v.firstCharacterKey === undefined
? null
: { firstCharacterKey: v.firstCharacterKey }),
...(v.key === undefined ? null : { key: v.key }),
...(v.title === undefined ? null : { title: v.title }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Sort> = z.object({
default: z.string().optional(),
defaultDirection: z.string().optional(),
descKey: z.string().optional(),
firstCharacterKey: z.string().optional(),
key: z.string().optional(),
title: z.string().optional(),
});
}
/** @internal */
export namespace Field$ {
export const inboundSchema: z.ZodType<Field, z.ZodTypeDef, unknown> = z
.object({
key: z.string().optional(),
title: z.string().optional(),
type: z.string().optional(),
subType: z.string().optional(),
})
.transform((v) => {
return {
...(v.key === undefined ? null : { key: v.key }),
...(v.title === undefined ? null : { title: v.title }),
...(v.type === undefined ? null : { type: v.type }),
...(v.subType === undefined ? null : { subType: v.subType }),
};
});
export const inboundSchema: z.ZodType<Field, z.ZodTypeDef, unknown> = z.object({
key: z.string().optional(),
title: z.string().optional(),
type: z.string().optional(),
subType: z.string().optional(),
});
export type Outbound = {
key?: string | undefined;
@@ -344,21 +252,12 @@ export namespace Field$ {
subType?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Field> = z
.object({
key: z.string().optional(),
title: z.string().optional(),
type: z.string().optional(),
subType: z.string().optional(),
})
.transform((v) => {
return {
...(v.key === undefined ? null : { key: v.key }),
...(v.title === undefined ? null : { title: v.title }),
...(v.type === undefined ? null : { type: v.type }),
...(v.subType === undefined ? null : { subType: v.subType }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Field> = z.object({
key: z.string().optional(),
title: z.string().optional(),
type: z.string().optional(),
subType: z.string().optional(),
});
}
/** @internal */
@@ -374,15 +273,11 @@ export namespace GetLibraryType$ {
Field: z.array(z.lazy(() => Field$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.key === undefined ? null : { key: v.key }),
...(v.type === undefined ? null : { type: v.type }),
...(v.title === undefined ? null : { title: v.title }),
...(v.active === undefined ? null : { active: v.active }),
...(v.Filter === undefined ? null : { filter: v.Filter }),
...(v.Sort === undefined ? null : { sort: v.Sort }),
...(v.Field === undefined ? null : { field: v.Field }),
};
return remap$(v, {
Filter: "filter",
Sort: "sort",
Field: "field",
});
});
export type Outbound = {
@@ -406,48 +301,30 @@ export namespace GetLibraryType$ {
field: z.array(z.lazy(() => Field$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.key === undefined ? null : { key: v.key }),
...(v.type === undefined ? null : { type: v.type }),
...(v.title === undefined ? null : { title: v.title }),
...(v.active === undefined ? null : { active: v.active }),
...(v.filter === undefined ? null : { Filter: v.filter }),
...(v.sort === undefined ? null : { Sort: v.sort }),
...(v.field === undefined ? null : { Field: v.field }),
};
return remap$(v, {
filter: "Filter",
sort: "Sort",
field: "Field",
});
});
}
/** @internal */
export namespace Operator$ {
export const inboundSchema: z.ZodType<Operator, z.ZodTypeDef, unknown> = z
.object({
key: z.string().optional(),
title: z.string().optional(),
})
.transform((v) => {
return {
...(v.key === undefined ? null : { key: v.key }),
...(v.title === undefined ? null : { title: v.title }),
};
});
export const inboundSchema: z.ZodType<Operator, z.ZodTypeDef, unknown> = z.object({
key: z.string().optional(),
title: z.string().optional(),
});
export type Outbound = {
key?: string | undefined;
title?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Operator> = z
.object({
key: z.string().optional(),
title: z.string().optional(),
})
.transform((v) => {
return {
...(v.key === undefined ? null : { key: v.key }),
...(v.title === undefined ? null : { title: v.title }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Operator> = z.object({
key: z.string().optional(),
title: z.string().optional(),
});
}
/** @internal */
@@ -458,10 +335,9 @@ export namespace FieldType$ {
Operator: z.array(z.lazy(() => Operator$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.type === undefined ? null : { type: v.type }),
...(v.Operator === undefined ? null : { operator: v.Operator }),
};
return remap$(v, {
Operator: "operator",
});
});
export type Outbound = {
@@ -475,10 +351,9 @@ export namespace FieldType$ {
operator: z.array(z.lazy(() => Operator$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.type === undefined ? null : { type: v.type }),
...(v.operator === undefined ? null : { Operator: v.operator }),
};
return remap$(v, {
operator: "Operator",
});
});
}
@@ -503,27 +378,11 @@ export namespace GetLibraryMediaContainer$ {
FieldType: z.array(z.lazy(() => FieldType$.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 }),
...(v.Type === undefined ? null : { type: v.Type }),
...(v.FieldType === undefined ? null : { fieldType: v.FieldType }),
};
return remap$(v, {
Directory: "directory",
Type: "type",
FieldType: "fieldType",
});
});
export type Outbound = {
@@ -563,27 +422,11 @@ export namespace GetLibraryMediaContainer$ {
fieldType: z.array(z.lazy(() => FieldType$.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 }),
...(v.type === undefined ? null : { Type: v.type }),
...(v.fieldType === undefined ? null : { FieldType: v.fieldType }),
};
return remap$(v, {
directory: "Directory",
type: "Type",
fieldType: "FieldType",
});
});
}
@@ -594,9 +437,9 @@ export namespace GetLibraryResponseBody$ {
MediaContainer: z.lazy(() => GetLibraryMediaContainer$.inboundSchema).optional(),
})
.transform((v) => {
return {
...(v.MediaContainer === undefined ? null : { mediaContainer: v.MediaContainer }),
};
return remap$(v, {
MediaContainer: "mediaContainer",
});
});
export type Outbound = {
@@ -608,9 +451,9 @@ export namespace GetLibraryResponseBody$ {
mediaContainer: z.lazy(() => GetLibraryMediaContainer$.outboundSchema).optional(),
})
.transform((v) => {
return {
...(v.mediaContainer === undefined ? null : { MediaContainer: v.mediaContainer }),
};
return remap$(v, {
mediaContainer: "MediaContainer",
});
});
}
@@ -624,12 +467,11 @@ export namespace GetLibraryResponse$ {
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 }),
};
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
@@ -649,11 +491,10 @@ export namespace GetLibraryResponse$ {
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 }),
};
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import { RFCDate } from "../../types";
import * as z from "zod";
@@ -177,19 +178,11 @@ export namespace QueryParamOnlyTransient$ {
/** @internal */
export namespace GetLibraryHubsRequest$ {
export const inboundSchema: z.ZodType<GetLibraryHubsRequest, z.ZodTypeDef, unknown> = z
.object({
sectionId: z.number(),
count: z.number().optional(),
onlyTransient: QueryParamOnlyTransient$.inboundSchema.optional(),
})
.transform((v) => {
return {
sectionId: v.sectionId,
...(v.count === undefined ? null : { count: v.count }),
...(v.onlyTransient === undefined ? null : { onlyTransient: v.onlyTransient }),
};
});
export const inboundSchema: z.ZodType<GetLibraryHubsRequest, z.ZodTypeDef, unknown> = z.object({
sectionId: z.number(),
count: z.number().optional(),
onlyTransient: QueryParamOnlyTransient$.inboundSchema.optional(),
});
export type Outbound = {
sectionId: number;
@@ -197,54 +190,28 @@ export namespace GetLibraryHubsRequest$ {
onlyTransient?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryHubsRequest> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryHubsRequest> =
z.object({
sectionId: z.number(),
count: z.number().optional(),
onlyTransient: QueryParamOnlyTransient$.outboundSchema.optional(),
})
.transform((v) => {
return {
sectionId: v.sectionId,
...(v.count === undefined ? null : { count: v.count }),
...(v.onlyTransient === undefined ? null : { onlyTransient: v.onlyTransient }),
};
});
}
/** @internal */
export namespace GetLibraryHubsPart$ {
export const inboundSchema: z.ZodType<GetLibraryHubsPart, z.ZodTypeDef, unknown> = z
.object({
id: z.number().int().optional(),
key: z.string().optional(),
duration: z.number().int().optional(),
file: z.string().optional(),
size: z.number().int().optional(),
audioProfile: z.string().optional(),
container: z.string().optional(),
has64bitOffsets: z.boolean().optional(),
optimizedForStreaming: z.boolean().optional(),
videoProfile: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.key === undefined ? null : { key: v.key }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.file === undefined ? null : { file: v.file }),
...(v.size === undefined ? null : { size: v.size }),
...(v.audioProfile === undefined ? null : { audioProfile: v.audioProfile }),
...(v.container === undefined ? null : { container: v.container }),
...(v.has64bitOffsets === undefined
? null
: { has64bitOffsets: v.has64bitOffsets }),
...(v.optimizedForStreaming === undefined
? null
: { optimizedForStreaming: v.optimizedForStreaming }),
...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }),
};
});
export const inboundSchema: z.ZodType<GetLibraryHubsPart, z.ZodTypeDef, unknown> = z.object({
id: z.number().int().optional(),
key: z.string().optional(),
duration: z.number().int().optional(),
file: z.string().optional(),
size: z.number().int().optional(),
audioProfile: z.string().optional(),
container: z.string().optional(),
has64bitOffsets: z.boolean().optional(),
optimizedForStreaming: z.boolean().optional(),
videoProfile: z.string().optional(),
});
export type Outbound = {
id?: number | undefined;
@@ -259,37 +226,18 @@ export namespace GetLibraryHubsPart$ {
videoProfile?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryHubsPart> = z
.object({
id: z.number().int().optional(),
key: z.string().optional(),
duration: z.number().int().optional(),
file: z.string().optional(),
size: z.number().int().optional(),
audioProfile: z.string().optional(),
container: z.string().optional(),
has64bitOffsets: z.boolean().optional(),
optimizedForStreaming: z.boolean().optional(),
videoProfile: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.key === undefined ? null : { key: v.key }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.file === undefined ? null : { file: v.file }),
...(v.size === undefined ? null : { size: v.size }),
...(v.audioProfile === undefined ? null : { audioProfile: v.audioProfile }),
...(v.container === undefined ? null : { container: v.container }),
...(v.has64bitOffsets === undefined
? null
: { has64bitOffsets: v.has64bitOffsets }),
...(v.optimizedForStreaming === undefined
? null
: { optimizedForStreaming: v.optimizedForStreaming }),
...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryHubsPart> = z.object({
id: z.number().int().optional(),
key: z.string().optional(),
duration: z.number().int().optional(),
file: z.string().optional(),
size: z.number().int().optional(),
audioProfile: z.string().optional(),
container: z.string().optional(),
has64bitOffsets: z.boolean().optional(),
optimizedForStreaming: z.boolean().optional(),
videoProfile: z.string().optional(),
});
}
/** @internal */
@@ -315,31 +263,9 @@ export namespace GetLibraryHubsMedia$ {
Part: z.array(z.lazy(() => GetLibraryHubsPart$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.bitrate === undefined ? null : { bitrate: v.bitrate }),
...(v.width === undefined ? null : { width: v.width }),
...(v.height === undefined ? null : { height: v.height }),
...(v.aspectRatio === undefined ? null : { aspectRatio: v.aspectRatio }),
...(v.audioChannels === undefined ? null : { audioChannels: v.audioChannels }),
...(v.audioCodec === undefined ? null : { audioCodec: v.audioCodec }),
...(v.videoCodec === undefined ? null : { videoCodec: v.videoCodec }),
...(v.videoResolution === undefined
? null
: { videoResolution: v.videoResolution }),
...(v.container === undefined ? null : { container: v.container }),
...(v.videoFrameRate === undefined ? null : { videoFrameRate: v.videoFrameRate }),
...(v.optimizedForStreaming === undefined
? null
: { optimizedForStreaming: v.optimizedForStreaming }),
...(v.audioProfile === undefined ? null : { audioProfile: v.audioProfile }),
...(v.has64bitOffsets === undefined
? null
: { has64bitOffsets: v.has64bitOffsets }),
...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }),
...(v.Part === undefined ? null : { part: v.Part }),
};
return remap$(v, {
Part: "part",
});
});
export type Outbound = {
@@ -383,167 +309,91 @@ export namespace GetLibraryHubsMedia$ {
part: z.array(z.lazy(() => GetLibraryHubsPart$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.bitrate === undefined ? null : { bitrate: v.bitrate }),
...(v.width === undefined ? null : { width: v.width }),
...(v.height === undefined ? null : { height: v.height }),
...(v.aspectRatio === undefined ? null : { aspectRatio: v.aspectRatio }),
...(v.audioChannels === undefined ? null : { audioChannels: v.audioChannels }),
...(v.audioCodec === undefined ? null : { audioCodec: v.audioCodec }),
...(v.videoCodec === undefined ? null : { videoCodec: v.videoCodec }),
...(v.videoResolution === undefined
? null
: { videoResolution: v.videoResolution }),
...(v.container === undefined ? null : { container: v.container }),
...(v.videoFrameRate === undefined ? null : { videoFrameRate: v.videoFrameRate }),
...(v.optimizedForStreaming === undefined
? null
: { optimizedForStreaming: v.optimizedForStreaming }),
...(v.audioProfile === undefined ? null : { audioProfile: v.audioProfile }),
...(v.has64bitOffsets === undefined
? null
: { has64bitOffsets: v.has64bitOffsets }),
...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }),
...(v.part === undefined ? null : { Part: v.part }),
};
return remap$(v, {
part: "Part",
});
});
}
/** @internal */
export namespace GetLibraryHubsGenre$ {
export const inboundSchema: z.ZodType<GetLibraryHubsGenre, z.ZodTypeDef, unknown> = z
.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
export const inboundSchema: z.ZodType<GetLibraryHubsGenre, z.ZodTypeDef, unknown> = z.object({
tag: z.string().optional(),
});
export type Outbound = {
tag?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryHubsGenre> = z
.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryHubsGenre> = z.object({
tag: z.string().optional(),
});
}
/** @internal */
export namespace GetLibraryHubsCountry$ {
export const inboundSchema: z.ZodType<GetLibraryHubsCountry, z.ZodTypeDef, unknown> = z
.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
export const inboundSchema: z.ZodType<GetLibraryHubsCountry, z.ZodTypeDef, unknown> = z.object({
tag: z.string().optional(),
});
export type Outbound = {
tag?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryHubsCountry> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryHubsCountry> =
z.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
}
/** @internal */
export namespace GetLibraryHubsDirector$ {
export const inboundSchema: z.ZodType<GetLibraryHubsDirector, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<GetLibraryHubsDirector, z.ZodTypeDef, unknown> = z.object(
{
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
}
);
export type Outbound = {
tag?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryHubsDirector> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryHubsDirector> =
z.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
}
/** @internal */
export namespace GetLibraryHubsRole$ {
export const inboundSchema: z.ZodType<GetLibraryHubsRole, z.ZodTypeDef, unknown> = z
.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
export const inboundSchema: z.ZodType<GetLibraryHubsRole, z.ZodTypeDef, unknown> = z.object({
tag: z.string().optional(),
});
export type Outbound = {
tag?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryHubsRole> = z
.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryHubsRole> = z.object({
tag: z.string().optional(),
});
}
/** @internal */
export namespace GetLibraryHubsWriter$ {
export const inboundSchema: z.ZodType<GetLibraryHubsWriter, z.ZodTypeDef, unknown> = z
.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
export const inboundSchema: z.ZodType<GetLibraryHubsWriter, z.ZodTypeDef, unknown> = z.object({
tag: z.string().optional(),
});
export type Outbound = {
tag?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryHubsWriter> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryHubsWriter> = z.object(
{
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
}
);
}
/** @internal */
@@ -589,54 +439,14 @@ export namespace GetLibraryHubsMetadata$ {
chapterSource: z.string().optional(),
})
.transform((v) => {
return {
...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }),
...(v.key === undefined ? null : { key: v.key }),
...(v.guid === undefined ? null : { guid: v.guid }),
...(v.studio === undefined ? null : { studio: v.studio }),
...(v.type === undefined ? null : { type: v.type }),
...(v.title === undefined ? null : { title: v.title }),
...(v.librarySectionTitle === undefined
? null
: { librarySectionTitle: v.librarySectionTitle }),
...(v.librarySectionID === undefined
? null
: { librarySectionID: v.librarySectionID }),
...(v.librarySectionKey === undefined
? null
: { librarySectionKey: v.librarySectionKey }),
...(v.contentRating === undefined ? null : { contentRating: v.contentRating }),
...(v.summary === undefined ? null : { summary: v.summary }),
...(v.rating === undefined ? null : { rating: v.rating }),
...(v.audienceRating === undefined ? null : { audienceRating: v.audienceRating }),
...(v.viewCount === undefined ? null : { viewCount: v.viewCount }),
...(v.lastViewedAt === undefined ? null : { lastViewedAt: v.lastViewedAt }),
...(v.year === undefined ? null : { year: v.year }),
...(v.tagline === undefined ? null : { tagline: v.tagline }),
...(v.thumb === undefined ? null : { thumb: v.thumb }),
...(v.art === undefined ? null : { art: v.art }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.originallyAvailableAt === undefined
? null
: { originallyAvailableAt: v.originallyAvailableAt }),
...(v.addedAt === undefined ? null : { addedAt: v.addedAt }),
...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }),
...(v.audienceRatingImage === undefined
? null
: { audienceRatingImage: v.audienceRatingImage }),
...(v.primaryExtraKey === undefined
? null
: { primaryExtraKey: v.primaryExtraKey }),
...(v.ratingImage === undefined ? null : { ratingImage: v.ratingImage }),
...(v.Media === undefined ? null : { media: v.Media }),
...(v.Genre === undefined ? null : { genre: v.Genre }),
...(v.Country === undefined ? null : { country: v.Country }),
...(v.Director === undefined ? null : { director: v.Director }),
...(v.Role === undefined ? null : { role: v.Role }),
...(v.Writer === undefined ? null : { writer: v.Writer }),
...(v.skipCount === undefined ? null : { skipCount: v.skipCount }),
...(v.chapterSource === undefined ? null : { chapterSource: v.chapterSource }),
};
return remap$(v, {
Media: "media",
Genre: "genre",
Country: "country",
Director: "director",
Role: "role",
Writer: "writer",
});
});
export type Outbound = {
@@ -717,54 +527,14 @@ export namespace GetLibraryHubsMetadata$ {
chapterSource: z.string().optional(),
})
.transform((v) => {
return {
...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }),
...(v.key === undefined ? null : { key: v.key }),
...(v.guid === undefined ? null : { guid: v.guid }),
...(v.studio === undefined ? null : { studio: v.studio }),
...(v.type === undefined ? null : { type: v.type }),
...(v.title === undefined ? null : { title: v.title }),
...(v.librarySectionTitle === undefined
? null
: { librarySectionTitle: v.librarySectionTitle }),
...(v.librarySectionID === undefined
? null
: { librarySectionID: v.librarySectionID }),
...(v.librarySectionKey === undefined
? null
: { librarySectionKey: v.librarySectionKey }),
...(v.contentRating === undefined ? null : { contentRating: v.contentRating }),
...(v.summary === undefined ? null : { summary: v.summary }),
...(v.rating === undefined ? null : { rating: v.rating }),
...(v.audienceRating === undefined ? null : { audienceRating: v.audienceRating }),
...(v.viewCount === undefined ? null : { viewCount: v.viewCount }),
...(v.lastViewedAt === undefined ? null : { lastViewedAt: v.lastViewedAt }),
...(v.year === undefined ? null : { year: v.year }),
...(v.tagline === undefined ? null : { tagline: v.tagline }),
...(v.thumb === undefined ? null : { thumb: v.thumb }),
...(v.art === undefined ? null : { art: v.art }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.originallyAvailableAt === undefined
? null
: { originallyAvailableAt: v.originallyAvailableAt }),
...(v.addedAt === undefined ? null : { addedAt: v.addedAt }),
...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }),
...(v.audienceRatingImage === undefined
? null
: { audienceRatingImage: v.audienceRatingImage }),
...(v.primaryExtraKey === undefined
? null
: { primaryExtraKey: v.primaryExtraKey }),
...(v.ratingImage === undefined ? null : { ratingImage: v.ratingImage }),
...(v.media === undefined ? null : { Media: v.media }),
...(v.genre === undefined ? null : { Genre: v.genre }),
...(v.country === undefined ? null : { Country: v.country }),
...(v.director === undefined ? null : { Director: v.director }),
...(v.role === undefined ? null : { Role: v.role }),
...(v.writer === undefined ? null : { Writer: v.writer }),
...(v.skipCount === undefined ? null : { skipCount: v.skipCount }),
...(v.chapterSource === undefined ? null : { chapterSource: v.chapterSource }),
};
return remap$(v, {
media: "Media",
genre: "Genre",
country: "Country",
director: "Director",
role: "Role",
writer: "Writer",
});
});
}
@@ -786,20 +556,9 @@ export namespace GetLibraryHubsHub$ {
random: z.boolean().optional(),
})
.transform((v) => {
return {
...(v.key === undefined ? null : { key: v.key }),
...(v.title === undefined ? null : { title: v.title }),
...(v.type === undefined ? null : { type: v.type }),
...(v.hubIdentifier === undefined ? null : { hubIdentifier: v.hubIdentifier }),
...(v.context === undefined ? null : { context: v.context }),
...(v.size === undefined ? null : { size: v.size }),
...(v.more === undefined ? null : { more: v.more }),
...(v.style === undefined ? null : { style: v.style }),
...(v.hubKey === undefined ? null : { hubKey: v.hubKey }),
...(v.Metadata === undefined ? null : { metadata: v.Metadata }),
...(v.promoted === undefined ? null : { promoted: v.promoted }),
...(v.random === undefined ? null : { random: v.random }),
};
return remap$(v, {
Metadata: "metadata",
});
});
export type Outbound = {
@@ -833,20 +592,9 @@ export namespace GetLibraryHubsHub$ {
random: z.boolean().optional(),
})
.transform((v) => {
return {
...(v.key === undefined ? null : { key: v.key }),
...(v.title === undefined ? null : { title: v.title }),
...(v.type === undefined ? null : { type: v.type }),
...(v.hubIdentifier === undefined ? null : { hubIdentifier: v.hubIdentifier }),
...(v.context === undefined ? null : { context: v.context }),
...(v.size === undefined ? null : { size: v.size }),
...(v.more === undefined ? null : { more: v.more }),
...(v.style === undefined ? null : { style: v.style }),
...(v.hubKey === undefined ? null : { hubKey: v.hubKey }),
...(v.metadata === undefined ? null : { Metadata: v.metadata }),
...(v.promoted === undefined ? null : { promoted: v.promoted }),
...(v.random === undefined ? null : { random: v.random }),
};
return remap$(v, {
metadata: "Metadata",
});
});
}
@@ -863,21 +611,9 @@ export namespace GetLibraryHubsMediaContainer$ {
Hub: z.array(z.lazy(() => GetLibraryHubsHub$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.size === undefined ? null : { size: v.size }),
...(v.allowSync === undefined ? null : { allowSync: v.allowSync }),
...(v.identifier === undefined ? null : { identifier: v.identifier }),
...(v.librarySectionID === undefined
? null
: { librarySectionID: v.librarySectionID }),
...(v.librarySectionTitle === undefined
? null
: { librarySectionTitle: v.librarySectionTitle }),
...(v.librarySectionUUID === undefined
? null
: { librarySectionUUID: v.librarySectionUUID }),
...(v.Hub === undefined ? null : { hub: v.Hub }),
};
return remap$(v, {
Hub: "hub",
});
});
export type Outbound = {
@@ -901,21 +637,9 @@ export namespace GetLibraryHubsMediaContainer$ {
hub: z.array(z.lazy(() => GetLibraryHubsHub$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.size === undefined ? null : { size: v.size }),
...(v.allowSync === undefined ? null : { allowSync: v.allowSync }),
...(v.identifier === undefined ? null : { identifier: v.identifier }),
...(v.librarySectionID === undefined
? null
: { librarySectionID: v.librarySectionID }),
...(v.librarySectionTitle === undefined
? null
: { librarySectionTitle: v.librarySectionTitle }),
...(v.librarySectionUUID === undefined
? null
: { librarySectionUUID: v.librarySectionUUID }),
...(v.hub === undefined ? null : { Hub: v.hub }),
};
return remap$(v, {
hub: "Hub",
});
});
}
@@ -926,9 +650,9 @@ export namespace GetLibraryHubsResponseBody$ {
MediaContainer: z.lazy(() => GetLibraryHubsMediaContainer$.inboundSchema).optional(),
})
.transform((v) => {
return {
...(v.MediaContainer === undefined ? null : { mediaContainer: v.MediaContainer }),
};
return remap$(v, {
MediaContainer: "mediaContainer",
});
});
export type Outbound = {
@@ -940,9 +664,9 @@ export namespace GetLibraryHubsResponseBody$ {
mediaContainer: z.lazy(() => GetLibraryHubsMediaContainer$.outboundSchema).optional(),
})
.transform((v) => {
return {
...(v.mediaContainer === undefined ? null : { MediaContainer: v.mediaContainer }),
};
return remap$(v, {
mediaContainer: "MediaContainer",
});
});
}
@@ -956,12 +680,11 @@ export namespace GetLibraryHubsResponse$ {
object: z.lazy(() => GetLibraryHubsResponseBody$.inboundSchema).optional(),
})
.transform((v) => {
return {
contentType: v.ContentType,
statusCode: v.StatusCode,
rawResponse: v.RawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
@@ -981,11 +704,10 @@ export namespace GetLibraryHubsResponse$ {
object: z.lazy(() => GetLibraryHubsResponseBody$.outboundSchema).optional(),
})
.transform((v) => {
return {
ContentType: v.contentType,
StatusCode: v.statusCode,
RawResponse: v.rawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import { RFCDate } from "../../types";
import * as z from "zod";
@@ -201,59 +202,36 @@ export namespace Tag$ {
/** @internal */
export namespace GetLibraryItemsRequest$ {
export const inboundSchema: z.ZodType<GetLibraryItemsRequest, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<GetLibraryItemsRequest, z.ZodTypeDef, unknown> = z.object(
{
sectionId: z.number().int(),
tag: Tag$.inboundSchema,
})
.transform((v) => {
return {
sectionId: v.sectionId,
tag: v.tag,
};
});
}
);
export type Outbound = {
sectionId: number;
tag: string;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryItemsRequest> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryItemsRequest> =
z.object({
sectionId: z.number().int(),
tag: Tag$.outboundSchema,
})
.transform((v) => {
return {
sectionId: v.sectionId,
tag: v.tag,
};
});
}
/** @internal */
export namespace GetLibraryItemsPart$ {
export const inboundSchema: z.ZodType<GetLibraryItemsPart, z.ZodTypeDef, unknown> = z
.object({
id: z.number().int().optional(),
key: z.string().optional(),
duration: z.number().int().optional(),
file: z.string().optional(),
size: z.number().int().optional(),
container: z.string().optional(),
videoProfile: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.key === undefined ? null : { key: v.key }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.file === undefined ? null : { file: v.file }),
...(v.size === undefined ? null : { size: v.size }),
...(v.container === undefined ? null : { container: v.container }),
...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }),
};
});
export const inboundSchema: z.ZodType<GetLibraryItemsPart, z.ZodTypeDef, unknown> = z.object({
id: z.number().int().optional(),
key: z.string().optional(),
duration: z.number().int().optional(),
file: z.string().optional(),
size: z.number().int().optional(),
container: z.string().optional(),
videoProfile: z.string().optional(),
});
export type Outbound = {
id?: number | undefined;
@@ -265,27 +243,15 @@ export namespace GetLibraryItemsPart$ {
videoProfile?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryItemsPart> = z
.object({
id: z.number().int().optional(),
key: z.string().optional(),
duration: z.number().int().optional(),
file: z.string().optional(),
size: z.number().int().optional(),
container: z.string().optional(),
videoProfile: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.key === undefined ? null : { key: v.key }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.file === undefined ? null : { file: v.file }),
...(v.size === undefined ? null : { size: v.size }),
...(v.container === undefined ? null : { container: v.container }),
...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryItemsPart> = z.object({
id: z.number().int().optional(),
key: z.string().optional(),
duration: z.number().int().optional(),
file: z.string().optional(),
size: z.number().int().optional(),
container: z.string().optional(),
videoProfile: z.string().optional(),
});
}
/** @internal */
@@ -308,24 +274,9 @@ export namespace GetLibraryItemsMedia$ {
Part: z.array(z.lazy(() => GetLibraryItemsPart$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.bitrate === undefined ? null : { bitrate: v.bitrate }),
...(v.width === undefined ? null : { width: v.width }),
...(v.height === undefined ? null : { height: v.height }),
...(v.aspectRatio === undefined ? null : { aspectRatio: v.aspectRatio }),
...(v.audioChannels === undefined ? null : { audioChannels: v.audioChannels }),
...(v.audioCodec === undefined ? null : { audioCodec: v.audioCodec }),
...(v.videoCodec === undefined ? null : { videoCodec: v.videoCodec }),
...(v.videoResolution === undefined
? null
: { videoResolution: v.videoResolution }),
...(v.container === undefined ? null : { container: v.container }),
...(v.videoFrameRate === undefined ? null : { videoFrameRate: v.videoFrameRate }),
...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }),
...(v.Part === undefined ? null : { part: v.Part }),
};
return remap$(v, {
Part: "part",
});
});
export type Outbound = {
@@ -363,160 +314,93 @@ export namespace GetLibraryItemsMedia$ {
part: z.array(z.lazy(() => GetLibraryItemsPart$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.bitrate === undefined ? null : { bitrate: v.bitrate }),
...(v.width === undefined ? null : { width: v.width }),
...(v.height === undefined ? null : { height: v.height }),
...(v.aspectRatio === undefined ? null : { aspectRatio: v.aspectRatio }),
...(v.audioChannels === undefined ? null : { audioChannels: v.audioChannels }),
...(v.audioCodec === undefined ? null : { audioCodec: v.audioCodec }),
...(v.videoCodec === undefined ? null : { videoCodec: v.videoCodec }),
...(v.videoResolution === undefined
? null
: { videoResolution: v.videoResolution }),
...(v.container === undefined ? null : { container: v.container }),
...(v.videoFrameRate === undefined ? null : { videoFrameRate: v.videoFrameRate }),
...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }),
...(v.part === undefined ? null : { Part: v.part }),
};
return remap$(v, {
part: "Part",
});
});
}
/** @internal */
export namespace GetLibraryItemsGenre$ {
export const inboundSchema: z.ZodType<GetLibraryItemsGenre, z.ZodTypeDef, unknown> = z
.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
export const inboundSchema: z.ZodType<GetLibraryItemsGenre, z.ZodTypeDef, unknown> = z.object({
tag: z.string().optional(),
});
export type Outbound = {
tag?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryItemsGenre> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryItemsGenre> = z.object(
{
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
}
);
}
/** @internal */
export namespace GetLibraryItemsCountry$ {
export const inboundSchema: z.ZodType<GetLibraryItemsCountry, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<GetLibraryItemsCountry, z.ZodTypeDef, unknown> = z.object(
{
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
}
);
export type Outbound = {
tag?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryItemsCountry> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryItemsCountry> =
z.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
}
/** @internal */
export namespace GetLibraryItemsDirector$ {
export const inboundSchema: z.ZodType<GetLibraryItemsDirector, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<GetLibraryItemsDirector, z.ZodTypeDef, unknown> =
z.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
export type Outbound = {
tag?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryItemsDirector> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryItemsDirector> =
z.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
}
/** @internal */
export namespace GetLibraryItemsWriter$ {
export const inboundSchema: z.ZodType<GetLibraryItemsWriter, z.ZodTypeDef, unknown> = z
.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
export const inboundSchema: z.ZodType<GetLibraryItemsWriter, z.ZodTypeDef, unknown> = z.object({
tag: z.string().optional(),
});
export type Outbound = {
tag?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryItemsWriter> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryItemsWriter> =
z.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
}
/** @internal */
export namespace GetLibraryItemsRole$ {
export const inboundSchema: z.ZodType<GetLibraryItemsRole, z.ZodTypeDef, unknown> = z
.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
export const inboundSchema: z.ZodType<GetLibraryItemsRole, z.ZodTypeDef, unknown> = z.object({
tag: z.string().optional(),
});
export type Outbound = {
tag?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryItemsRole> = z
.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryItemsRole> = z.object({
tag: z.string().optional(),
});
}
/** @internal */
@@ -585,89 +469,14 @@ export namespace GetLibraryItemsMetadata$ {
parentTheme: z.string().optional(),
})
.transform((v) => {
return {
...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }),
...(v.key === undefined ? null : { key: v.key }),
...(v.guid === undefined ? null : { guid: v.guid }),
...(v.studio === undefined ? null : { studio: v.studio }),
...(v.type === undefined ? null : { type: v.type }),
...(v.title === undefined ? null : { title: v.title }),
...(v.contentRating === undefined ? null : { contentRating: v.contentRating }),
...(v.summary === undefined ? null : { summary: v.summary }),
...(v.rating === undefined ? null : { rating: v.rating }),
...(v.audienceRating === undefined ? null : { audienceRating: v.audienceRating }),
...(v.year === undefined ? null : { year: v.year }),
...(v.tagline === undefined ? null : { tagline: v.tagline }),
...(v.thumb === undefined ? null : { thumb: v.thumb }),
...(v.art === undefined ? null : { art: v.art }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.originallyAvailableAt === undefined
? null
: { originallyAvailableAt: v.originallyAvailableAt }),
...(v.addedAt === undefined ? null : { addedAt: v.addedAt }),
...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }),
...(v.audienceRatingImage === undefined
? null
: { audienceRatingImage: v.audienceRatingImage }),
...(v.chapterSource === undefined ? null : { chapterSource: v.chapterSource }),
...(v.primaryExtraKey === undefined
? null
: { primaryExtraKey: v.primaryExtraKey }),
...(v.ratingImage === undefined ? null : { ratingImage: v.ratingImage }),
...(v.grandparentRatingKey === undefined
? null
: { grandparentRatingKey: v.grandparentRatingKey }),
...(v.grandparentGuid === undefined
? null
: { grandparentGuid: v.grandparentGuid }),
...(v.grandparentKey === undefined ? null : { grandparentKey: v.grandparentKey }),
...(v.grandparentTitle === undefined
? null
: { grandparentTitle: v.grandparentTitle }),
...(v.grandparentThumb === undefined
? null
: { grandparentThumb: v.grandparentThumb }),
...(v.grandparentArt === undefined ? null : { grandparentArt: v.grandparentArt }),
...(v.grandparentTheme === undefined
? null
: { grandparentTheme: v.grandparentTheme }),
...(v.Media === undefined ? null : { media: v.Media }),
...(v.Genre === undefined ? null : { genre: v.Genre }),
...(v.Country === undefined ? null : { country: v.Country }),
...(v.Director === undefined ? null : { director: v.Director }),
...(v.Writer === undefined ? null : { writer: v.Writer }),
...(v.Role === undefined ? null : { role: v.Role }),
...(v.titleSort === undefined ? null : { titleSort: v.titleSort }),
...(v.viewCount === undefined ? null : { viewCount: v.viewCount }),
...(v.lastViewedAt === undefined ? null : { lastViewedAt: v.lastViewedAt }),
...(v.originalTitle === undefined ? null : { originalTitle: v.originalTitle }),
...(v.viewOffset === undefined ? null : { viewOffset: v.viewOffset }),
...(v.skipCount === undefined ? null : { skipCount: v.skipCount }),
...(v.index === undefined ? null : { index: v.index }),
...(v.theme === undefined ? null : { theme: v.theme }),
...(v.leafCount === undefined ? null : { leafCount: v.leafCount }),
...(v.viewedLeafCount === undefined
? null
: { viewedLeafCount: v.viewedLeafCount }),
...(v.childCount === undefined ? null : { childCount: v.childCount }),
...(v.hasPremiumExtras === undefined
? null
: { hasPremiumExtras: v.hasPremiumExtras }),
...(v.hasPremiumPrimaryExtra === undefined
? null
: { hasPremiumPrimaryExtra: v.hasPremiumPrimaryExtra }),
...(v.parentRatingKey === undefined
? null
: { parentRatingKey: v.parentRatingKey }),
...(v.parentGuid === undefined ? null : { parentGuid: v.parentGuid }),
...(v.parentStudio === undefined ? null : { parentStudio: v.parentStudio }),
...(v.parentKey === undefined ? null : { parentKey: v.parentKey }),
...(v.parentTitle === undefined ? null : { parentTitle: v.parentTitle }),
...(v.parentIndex === undefined ? null : { parentIndex: v.parentIndex }),
...(v.parentYear === undefined ? null : { parentYear: v.parentYear }),
...(v.parentThumb === undefined ? null : { parentThumb: v.parentThumb }),
...(v.parentTheme === undefined ? null : { parentTheme: v.parentTheme }),
};
return remap$(v, {
Media: "media",
Genre: "genre",
Country: "country",
Director: "director",
Writer: "writer",
Role: "role",
});
});
export type Outbound = {
@@ -794,89 +603,14 @@ export namespace GetLibraryItemsMetadata$ {
parentTheme: z.string().optional(),
})
.transform((v) => {
return {
...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }),
...(v.key === undefined ? null : { key: v.key }),
...(v.guid === undefined ? null : { guid: v.guid }),
...(v.studio === undefined ? null : { studio: v.studio }),
...(v.type === undefined ? null : { type: v.type }),
...(v.title === undefined ? null : { title: v.title }),
...(v.contentRating === undefined ? null : { contentRating: v.contentRating }),
...(v.summary === undefined ? null : { summary: v.summary }),
...(v.rating === undefined ? null : { rating: v.rating }),
...(v.audienceRating === undefined ? null : { audienceRating: v.audienceRating }),
...(v.year === undefined ? null : { year: v.year }),
...(v.tagline === undefined ? null : { tagline: v.tagline }),
...(v.thumb === undefined ? null : { thumb: v.thumb }),
...(v.art === undefined ? null : { art: v.art }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.originallyAvailableAt === undefined
? null
: { originallyAvailableAt: v.originallyAvailableAt }),
...(v.addedAt === undefined ? null : { addedAt: v.addedAt }),
...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }),
...(v.audienceRatingImage === undefined
? null
: { audienceRatingImage: v.audienceRatingImage }),
...(v.chapterSource === undefined ? null : { chapterSource: v.chapterSource }),
...(v.primaryExtraKey === undefined
? null
: { primaryExtraKey: v.primaryExtraKey }),
...(v.ratingImage === undefined ? null : { ratingImage: v.ratingImage }),
...(v.grandparentRatingKey === undefined
? null
: { grandparentRatingKey: v.grandparentRatingKey }),
...(v.grandparentGuid === undefined
? null
: { grandparentGuid: v.grandparentGuid }),
...(v.grandparentKey === undefined ? null : { grandparentKey: v.grandparentKey }),
...(v.grandparentTitle === undefined
? null
: { grandparentTitle: v.grandparentTitle }),
...(v.grandparentThumb === undefined
? null
: { grandparentThumb: v.grandparentThumb }),
...(v.grandparentArt === undefined ? null : { grandparentArt: v.grandparentArt }),
...(v.grandparentTheme === undefined
? null
: { grandparentTheme: v.grandparentTheme }),
...(v.media === undefined ? null : { Media: v.media }),
...(v.genre === undefined ? null : { Genre: v.genre }),
...(v.country === undefined ? null : { Country: v.country }),
...(v.director === undefined ? null : { Director: v.director }),
...(v.writer === undefined ? null : { Writer: v.writer }),
...(v.role === undefined ? null : { Role: v.role }),
...(v.titleSort === undefined ? null : { titleSort: v.titleSort }),
...(v.viewCount === undefined ? null : { viewCount: v.viewCount }),
...(v.lastViewedAt === undefined ? null : { lastViewedAt: v.lastViewedAt }),
...(v.originalTitle === undefined ? null : { originalTitle: v.originalTitle }),
...(v.viewOffset === undefined ? null : { viewOffset: v.viewOffset }),
...(v.skipCount === undefined ? null : { skipCount: v.skipCount }),
...(v.index === undefined ? null : { index: v.index }),
...(v.theme === undefined ? null : { theme: v.theme }),
...(v.leafCount === undefined ? null : { leafCount: v.leafCount }),
...(v.viewedLeafCount === undefined
? null
: { viewedLeafCount: v.viewedLeafCount }),
...(v.childCount === undefined ? null : { childCount: v.childCount }),
...(v.hasPremiumExtras === undefined
? null
: { hasPremiumExtras: v.hasPremiumExtras }),
...(v.hasPremiumPrimaryExtra === undefined
? null
: { hasPremiumPrimaryExtra: v.hasPremiumPrimaryExtra }),
...(v.parentRatingKey === undefined
? null
: { parentRatingKey: v.parentRatingKey }),
...(v.parentGuid === undefined ? null : { parentGuid: v.parentGuid }),
...(v.parentStudio === undefined ? null : { parentStudio: v.parentStudio }),
...(v.parentKey === undefined ? null : { parentKey: v.parentKey }),
...(v.parentTitle === undefined ? null : { parentTitle: v.parentTitle }),
...(v.parentIndex === undefined ? null : { parentIndex: v.parentIndex }),
...(v.parentYear === undefined ? null : { parentYear: v.parentYear }),
...(v.parentThumb === undefined ? null : { parentThumb: v.parentThumb }),
...(v.parentTheme === undefined ? null : { parentTheme: v.parentTheme }),
};
return remap$(v, {
media: "Media",
genre: "Genre",
country: "Country",
director: "Director",
writer: "Writer",
role: "Role",
});
});
}
@@ -902,32 +636,9 @@ export namespace GetLibraryItemsMediaContainer$ {
Metadata: z.array(z.lazy(() => GetLibraryItemsMetadata$.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.identifier === undefined ? null : { identifier: v.identifier }),
...(v.librarySectionID === undefined
? null
: { librarySectionID: v.librarySectionID }),
...(v.librarySectionTitle === undefined
? null
: { librarySectionTitle: v.librarySectionTitle }),
...(v.librarySectionUUID === undefined
? null
: { librarySectionUUID: v.librarySectionUUID }),
...(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.title2 === undefined ? null : { title2: v.title2 }),
...(v.viewGroup === undefined ? null : { viewGroup: v.viewGroup }),
...(v.viewMode === undefined ? null : { viewMode: v.viewMode }),
...(v.mixedParents === undefined ? null : { mixedParents: v.mixedParents }),
...(v.Metadata === undefined ? null : { metadata: v.Metadata }),
};
return remap$(v, {
Metadata: "metadata",
});
});
export type Outbound = {
@@ -970,34 +681,9 @@ export namespace GetLibraryItemsMediaContainer$ {
metadata: z.array(z.lazy(() => GetLibraryItemsMetadata$.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.identifier === undefined ? null : { identifier: v.identifier }),
...(v.librarySectionID === undefined
? null
: { librarySectionID: v.librarySectionID }),
...(v.librarySectionTitle === undefined
? null
: { librarySectionTitle: v.librarySectionTitle }),
...(v.librarySectionUUID === undefined
? null
: { librarySectionUUID: v.librarySectionUUID }),
...(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.title2 === undefined ? null : { title2: v.title2 }),
...(v.viewGroup === undefined ? null : { viewGroup: v.viewGroup }),
...(v.viewMode === undefined ? null : { viewMode: v.viewMode }),
...(v.mixedParents === undefined ? null : { mixedParents: v.mixedParents }),
...(v.metadata === undefined ? null : { Metadata: v.metadata }),
};
return remap$(v, {
metadata: "Metadata",
});
});
}
@@ -1008,9 +694,9 @@ export namespace GetLibraryItemsResponseBody$ {
MediaContainer: z.lazy(() => GetLibraryItemsMediaContainer$.inboundSchema).optional(),
})
.transform((v) => {
return {
...(v.MediaContainer === undefined ? null : { mediaContainer: v.MediaContainer }),
};
return remap$(v, {
MediaContainer: "mediaContainer",
});
});
export type Outbound = {
@@ -1022,9 +708,9 @@ export namespace GetLibraryItemsResponseBody$ {
mediaContainer: z.lazy(() => GetLibraryItemsMediaContainer$.outboundSchema).optional(),
})
.transform((v) => {
return {
...(v.mediaContainer === undefined ? null : { MediaContainer: v.mediaContainer }),
};
return remap$(v, {
mediaContainer: "MediaContainer",
});
});
}
@@ -1038,12 +724,11 @@ export namespace GetLibraryItemsResponse$ {
object: z.lazy(() => GetLibraryItemsResponseBody$.inboundSchema).optional(),
})
.transform((v) => {
return {
contentType: v.ContentType,
statusCode: v.StatusCode,
rawResponse: v.RawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
@@ -1063,11 +748,10 @@ export namespace GetLibraryItemsResponse$ {
object: z.lazy(() => GetLibraryItemsResponseBody$.outboundSchema).optional(),
})
.transform((v) => {
return {
ContentType: v.contentType,
StatusCode: v.statusCode,
RawResponse: v.rawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}

File diff suppressed because it is too large Load Diff

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetMetadataChildrenRequest = {
@@ -103,51 +104,30 @@ export type GetMetadataChildrenResponse = {
/** @internal */
export namespace GetMetadataChildrenRequest$ {
export const inboundSchema: z.ZodType<GetMetadataChildrenRequest, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<GetMetadataChildrenRequest, z.ZodTypeDef, unknown> =
z.object({
ratingKey: z.number(),
})
.transform((v) => {
return {
ratingKey: v.ratingKey,
};
});
export type Outbound = {
ratingKey: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMetadataChildrenRequest> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMetadataChildrenRequest> =
z.object({
ratingKey: z.number(),
})
.transform((v) => {
return {
ratingKey: v.ratingKey,
};
});
}
/** @internal */
export namespace GetMetadataChildrenDirectory$ {
export const inboundSchema: z.ZodType<GetMetadataChildrenDirectory, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<GetMetadataChildrenDirectory, z.ZodTypeDef, unknown> =
z.object({
leafCount: z.number().int().optional(),
thumb: z.string().optional(),
viewedLeafCount: z.number().int().optional(),
key: z.string().optional(),
title: z.string().optional(),
})
.transform((v) => {
return {
...(v.leafCount === undefined ? null : { leafCount: v.leafCount }),
...(v.thumb === undefined ? null : { thumb: v.thumb }),
...(v.viewedLeafCount === undefined
? null
: { viewedLeafCount: v.viewedLeafCount }),
...(v.key === undefined ? null : { key: v.key }),
...(v.title === undefined ? null : { title: v.title }),
};
});
export type Outbound = {
@@ -158,31 +138,20 @@ export namespace GetMetadataChildrenDirectory$ {
title?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMetadataChildrenDirectory> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMetadataChildrenDirectory> =
z.object({
leafCount: z.number().int().optional(),
thumb: z.string().optional(),
viewedLeafCount: z.number().int().optional(),
key: z.string().optional(),
title: z.string().optional(),
})
.transform((v) => {
return {
...(v.leafCount === undefined ? null : { leafCount: v.leafCount }),
...(v.thumb === undefined ? null : { thumb: v.thumb }),
...(v.viewedLeafCount === undefined
? null
: { viewedLeafCount: v.viewedLeafCount }),
...(v.key === undefined ? null : { key: v.key }),
...(v.title === undefined ? null : { title: v.title }),
};
});
}
/** @internal */
export namespace GetMetadataChildrenMetadata$ {
export const inboundSchema: z.ZodType<GetMetadataChildrenMetadata, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<GetMetadataChildrenMetadata, z.ZodTypeDef, unknown> =
z.object({
ratingKey: z.string().optional(),
key: z.string().optional(),
parentRatingKey: z.string().optional(),
@@ -210,41 +179,6 @@ export namespace GetMetadataChildrenMetadata$ {
userRating: z.number().int().optional(),
skipCount: z.number().int().optional(),
lastRatedAt: z.number().int().optional(),
})
.transform((v) => {
return {
...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }),
...(v.key === undefined ? null : { key: v.key }),
...(v.parentRatingKey === undefined
? null
: { parentRatingKey: v.parentRatingKey }),
...(v.guid === undefined ? null : { guid: v.guid }),
...(v.parentGuid === undefined ? null : { parentGuid: v.parentGuid }),
...(v.parentStudio === undefined ? null : { parentStudio: v.parentStudio }),
...(v.type === undefined ? null : { type: v.type }),
...(v.title === undefined ? null : { title: v.title }),
...(v.parentKey === undefined ? null : { parentKey: v.parentKey }),
...(v.parentTitle === undefined ? null : { parentTitle: v.parentTitle }),
...(v.summary === undefined ? null : { summary: v.summary }),
...(v.index === undefined ? null : { index: v.index }),
...(v.parentIndex === undefined ? null : { parentIndex: v.parentIndex }),
...(v.viewCount === undefined ? null : { viewCount: v.viewCount }),
...(v.lastViewedAt === undefined ? null : { lastViewedAt: v.lastViewedAt }),
...(v.parentYear === undefined ? null : { parentYear: v.parentYear }),
...(v.thumb === undefined ? null : { thumb: v.thumb }),
...(v.art === undefined ? null : { art: v.art }),
...(v.parentThumb === undefined ? null : { parentThumb: v.parentThumb }),
...(v.parentTheme === undefined ? null : { parentTheme: v.parentTheme }),
...(v.leafCount === undefined ? null : { leafCount: v.leafCount }),
...(v.viewedLeafCount === undefined
? null
: { viewedLeafCount: v.viewedLeafCount }),
...(v.addedAt === undefined ? null : { addedAt: v.addedAt }),
...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }),
...(v.userRating === undefined ? null : { userRating: v.userRating }),
...(v.skipCount === undefined ? null : { skipCount: v.skipCount }),
...(v.lastRatedAt === undefined ? null : { lastRatedAt: v.lastRatedAt }),
};
});
export type Outbound = {
@@ -277,8 +211,8 @@ export namespace GetMetadataChildrenMetadata$ {
lastRatedAt?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMetadataChildrenMetadata> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMetadataChildrenMetadata> =
z.object({
ratingKey: z.string().optional(),
key: z.string().optional(),
parentRatingKey: z.string().optional(),
@@ -306,41 +240,6 @@ export namespace GetMetadataChildrenMetadata$ {
userRating: z.number().int().optional(),
skipCount: z.number().int().optional(),
lastRatedAt: z.number().int().optional(),
})
.transform((v) => {
return {
...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }),
...(v.key === undefined ? null : { key: v.key }),
...(v.parentRatingKey === undefined
? null
: { parentRatingKey: v.parentRatingKey }),
...(v.guid === undefined ? null : { guid: v.guid }),
...(v.parentGuid === undefined ? null : { parentGuid: v.parentGuid }),
...(v.parentStudio === undefined ? null : { parentStudio: v.parentStudio }),
...(v.type === undefined ? null : { type: v.type }),
...(v.title === undefined ? null : { title: v.title }),
...(v.parentKey === undefined ? null : { parentKey: v.parentKey }),
...(v.parentTitle === undefined ? null : { parentTitle: v.parentTitle }),
...(v.summary === undefined ? null : { summary: v.summary }),
...(v.index === undefined ? null : { index: v.index }),
...(v.parentIndex === undefined ? null : { parentIndex: v.parentIndex }),
...(v.viewCount === undefined ? null : { viewCount: v.viewCount }),
...(v.lastViewedAt === undefined ? null : { lastViewedAt: v.lastViewedAt }),
...(v.parentYear === undefined ? null : { parentYear: v.parentYear }),
...(v.thumb === undefined ? null : { thumb: v.thumb }),
...(v.art === undefined ? null : { art: v.art }),
...(v.parentThumb === undefined ? null : { parentThumb: v.parentThumb }),
...(v.parentTheme === undefined ? null : { parentTheme: v.parentTheme }),
...(v.leafCount === undefined ? null : { leafCount: v.leafCount }),
...(v.viewedLeafCount === undefined
? null
: { viewedLeafCount: v.viewedLeafCount }),
...(v.addedAt === undefined ? null : { addedAt: v.addedAt }),
...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }),
...(v.userRating === undefined ? null : { userRating: v.userRating }),
...(v.skipCount === undefined ? null : { skipCount: v.skipCount }),
...(v.lastRatedAt === undefined ? null : { lastRatedAt: v.lastRatedAt }),
};
});
}
@@ -379,39 +278,10 @@ export namespace GetMetadataChildrenMediaContainer$ {
Metadata: z.array(z.lazy(() => GetMetadataChildrenMetadata$.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.identifier === undefined ? null : { identifier: v.identifier }),
...(v.key === undefined ? null : { key: v.key }),
...(v.librarySectionID === undefined
? null
: { librarySectionID: v.librarySectionID }),
...(v.librarySectionTitle === undefined
? null
: { librarySectionTitle: v.librarySectionTitle }),
...(v.librarySectionUUID === undefined
? null
: { librarySectionUUID: v.librarySectionUUID }),
...(v.mediaTagPrefix === undefined ? null : { mediaTagPrefix: v.mediaTagPrefix }),
...(v.mediaTagVersion === undefined
? null
: { mediaTagVersion: v.mediaTagVersion }),
...(v.nocache === undefined ? null : { nocache: v.nocache }),
...(v.parentIndex === undefined ? null : { parentIndex: v.parentIndex }),
...(v.parentTitle === undefined ? null : { parentTitle: v.parentTitle }),
...(v.parentYear === undefined ? null : { parentYear: v.parentYear }),
...(v.summary === undefined ? null : { summary: v.summary }),
...(v.theme === undefined ? null : { theme: v.theme }),
...(v.thumb === undefined ? null : { thumb: v.thumb }),
...(v.title1 === undefined ? null : { title1: v.title1 }),
...(v.title2 === undefined ? null : { title2: v.title2 }),
...(v.viewGroup === undefined ? null : { viewGroup: v.viewGroup }),
...(v.viewMode === undefined ? null : { viewMode: v.viewMode }),
...(v.Directory === undefined ? null : { directory: v.Directory }),
...(v.Metadata === undefined ? null : { metadata: v.Metadata }),
};
return remap$(v, {
Directory: "directory",
Metadata: "metadata",
});
});
export type Outbound = {
@@ -473,39 +343,10 @@ export namespace GetMetadataChildrenMediaContainer$ {
metadata: z.array(z.lazy(() => GetMetadataChildrenMetadata$.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.identifier === undefined ? null : { identifier: v.identifier }),
...(v.key === undefined ? null : { key: v.key }),
...(v.librarySectionID === undefined
? null
: { librarySectionID: v.librarySectionID }),
...(v.librarySectionTitle === undefined
? null
: { librarySectionTitle: v.librarySectionTitle }),
...(v.librarySectionUUID === undefined
? null
: { librarySectionUUID: v.librarySectionUUID }),
...(v.mediaTagPrefix === undefined ? null : { mediaTagPrefix: v.mediaTagPrefix }),
...(v.mediaTagVersion === undefined
? null
: { mediaTagVersion: v.mediaTagVersion }),
...(v.nocache === undefined ? null : { nocache: v.nocache }),
...(v.parentIndex === undefined ? null : { parentIndex: v.parentIndex }),
...(v.parentTitle === undefined ? null : { parentTitle: v.parentTitle }),
...(v.parentYear === undefined ? null : { parentYear: v.parentYear }),
...(v.summary === undefined ? null : { summary: v.summary }),
...(v.theme === undefined ? null : { theme: v.theme }),
...(v.thumb === undefined ? null : { thumb: v.thumb }),
...(v.title1 === undefined ? null : { title1: v.title1 }),
...(v.title2 === undefined ? null : { title2: v.title2 }),
...(v.viewGroup === undefined ? null : { viewGroup: v.viewGroup }),
...(v.viewMode === undefined ? null : { viewMode: v.viewMode }),
...(v.directory === undefined ? null : { Directory: v.directory }),
...(v.metadata === undefined ? null : { Metadata: v.metadata }),
};
return remap$(v, {
directory: "Directory",
metadata: "Metadata",
});
});
}
@@ -519,11 +360,9 @@ export namespace GetMetadataChildrenResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.MediaContainer === undefined
? null
: { mediaContainer: v.MediaContainer }),
};
return remap$(v, {
MediaContainer: "mediaContainer",
});
});
export type Outbound = {
@@ -541,9 +380,9 @@ export namespace GetMetadataChildrenResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.mediaContainer === undefined ? null : { MediaContainer: v.mediaContainer }),
};
return remap$(v, {
mediaContainer: "MediaContainer",
});
});
}
@@ -557,12 +396,11 @@ export namespace GetMetadataChildrenResponse$ {
object: z.lazy(() => GetMetadataChildrenResponseBody$.inboundSchema).optional(),
})
.transform((v) => {
return {
contentType: v.ContentType,
statusCode: v.StatusCode,
rawResponse: v.RawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
@@ -582,11 +420,10 @@ export namespace GetMetadataChildrenResponse$ {
object: z.lazy(() => GetMetadataChildrenResponseBody$.outboundSchema).optional(),
})
.transform((v) => {
return {
ContentType: v.contentType,
StatusCode: v.statusCode,
RawResponse: v.rawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type MyPlex = {
@@ -47,43 +48,20 @@ export type GetMyPlexAccountResponse = {
/** @internal */
export namespace MyPlex$ {
export const inboundSchema: z.ZodType<MyPlex, z.ZodTypeDef, unknown> = z
.object({
authToken: z.string().optional(),
username: z.string().optional(),
mappingState: z.string().optional(),
mappingError: z.string().optional(),
signInState: z.string().optional(),
publicAddress: z.string().optional(),
publicPort: z.number().optional(),
privateAddress: z.string().optional(),
privatePort: z.number().optional(),
subscriptionFeatures: z.string().optional(),
subscriptionActive: z.boolean().optional(),
subscriptionState: z.string().optional(),
})
.transform((v) => {
return {
...(v.authToken === undefined ? null : { authToken: v.authToken }),
...(v.username === undefined ? null : { username: v.username }),
...(v.mappingState === undefined ? null : { mappingState: v.mappingState }),
...(v.mappingError === undefined ? null : { mappingError: v.mappingError }),
...(v.signInState === undefined ? null : { signInState: v.signInState }),
...(v.publicAddress === undefined ? null : { publicAddress: v.publicAddress }),
...(v.publicPort === undefined ? null : { publicPort: v.publicPort }),
...(v.privateAddress === undefined ? null : { privateAddress: v.privateAddress }),
...(v.privatePort === undefined ? null : { privatePort: v.privatePort }),
...(v.subscriptionFeatures === undefined
? null
: { subscriptionFeatures: v.subscriptionFeatures }),
...(v.subscriptionActive === undefined
? null
: { subscriptionActive: v.subscriptionActive }),
...(v.subscriptionState === undefined
? null
: { subscriptionState: v.subscriptionState }),
};
});
export const inboundSchema: z.ZodType<MyPlex, z.ZodTypeDef, unknown> = z.object({
authToken: z.string().optional(),
username: z.string().optional(),
mappingState: z.string().optional(),
mappingError: z.string().optional(),
signInState: z.string().optional(),
publicAddress: z.string().optional(),
publicPort: z.number().optional(),
privateAddress: z.string().optional(),
privatePort: z.number().optional(),
subscriptionFeatures: z.string().optional(),
subscriptionActive: z.boolean().optional(),
subscriptionState: z.string().optional(),
});
export type Outbound = {
authToken?: string | undefined;
@@ -100,43 +78,20 @@ export namespace MyPlex$ {
subscriptionState?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, MyPlex> = z
.object({
authToken: z.string().optional(),
username: z.string().optional(),
mappingState: z.string().optional(),
mappingError: z.string().optional(),
signInState: z.string().optional(),
publicAddress: z.string().optional(),
publicPort: z.number().optional(),
privateAddress: z.string().optional(),
privatePort: z.number().optional(),
subscriptionFeatures: z.string().optional(),
subscriptionActive: z.boolean().optional(),
subscriptionState: z.string().optional(),
})
.transform((v) => {
return {
...(v.authToken === undefined ? null : { authToken: v.authToken }),
...(v.username === undefined ? null : { username: v.username }),
...(v.mappingState === undefined ? null : { mappingState: v.mappingState }),
...(v.mappingError === undefined ? null : { mappingError: v.mappingError }),
...(v.signInState === undefined ? null : { signInState: v.signInState }),
...(v.publicAddress === undefined ? null : { publicAddress: v.publicAddress }),
...(v.publicPort === undefined ? null : { publicPort: v.publicPort }),
...(v.privateAddress === undefined ? null : { privateAddress: v.privateAddress }),
...(v.privatePort === undefined ? null : { privatePort: v.privatePort }),
...(v.subscriptionFeatures === undefined
? null
: { subscriptionFeatures: v.subscriptionFeatures }),
...(v.subscriptionActive === undefined
? null
: { subscriptionActive: v.subscriptionActive }),
...(v.subscriptionState === undefined
? null
: { subscriptionState: v.subscriptionState }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, MyPlex> = z.object({
authToken: z.string().optional(),
username: z.string().optional(),
mappingState: z.string().optional(),
mappingError: z.string().optional(),
signInState: z.string().optional(),
publicAddress: z.string().optional(),
publicPort: z.number().optional(),
privateAddress: z.string().optional(),
privatePort: z.number().optional(),
subscriptionFeatures: z.string().optional(),
subscriptionActive: z.boolean().optional(),
subscriptionState: z.string().optional(),
});
}
/** @internal */
@@ -146,9 +101,9 @@ export namespace GetMyPlexAccountResponseBody$ {
MyPlex: z.lazy(() => MyPlex$.inboundSchema).optional(),
})
.transform((v) => {
return {
...(v.MyPlex === undefined ? null : { myPlex: v.MyPlex }),
};
return remap$(v, {
MyPlex: "myPlex",
});
});
export type Outbound = {
@@ -160,9 +115,9 @@ export namespace GetMyPlexAccountResponseBody$ {
myPlex: z.lazy(() => MyPlex$.outboundSchema).optional(),
})
.transform((v) => {
return {
...(v.myPlex === undefined ? null : { MyPlex: v.myPlex }),
};
return remap$(v, {
myPlex: "MyPlex",
});
});
}
@@ -176,12 +131,11 @@ export namespace GetMyPlexAccountResponse$ {
object: z.lazy(() => GetMyPlexAccountResponseBody$.inboundSchema).optional(),
})
.transform((v) => {
return {
contentType: v.ContentType,
statusCode: v.StatusCode,
rawResponse: v.RawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
@@ -201,11 +155,10 @@ export namespace GetMyPlexAccountResponse$ {
object: z.lazy(() => GetMyPlexAccountResponseBody$.outboundSchema).optional(),
})
.transform((v) => {
return {
ContentType: v.contentType,
StatusCode: v.statusCode,
RawResponse: v.rawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetOnDeckStream = {
@@ -141,63 +142,31 @@ export type GetOnDeckResponse = {
/** @internal */
export namespace GetOnDeckStream$ {
export const inboundSchema: z.ZodType<GetOnDeckStream, z.ZodTypeDef, unknown> = z
.object({
id: z.number().optional(),
streamType: z.number().optional(),
default: z.boolean().optional(),
codec: z.string().optional(),
index: z.number().optional(),
bitrate: z.number().optional(),
language: z.string().optional(),
languageTag: z.string().optional(),
languageCode: z.string().optional(),
bitDepth: z.number().optional(),
chromaLocation: z.string().optional(),
chromaSubsampling: z.string().optional(),
codedHeight: z.number().optional(),
codedWidth: z.number().optional(),
colorRange: z.string().optional(),
frameRate: z.number().optional(),
height: z.number().optional(),
level: z.number().optional(),
profile: z.string().optional(),
refFrames: z.number().optional(),
width: z.number().optional(),
displayTitle: z.string().optional(),
extendedDisplayTitle: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.streamType === undefined ? null : { streamType: v.streamType }),
...(v.default === undefined ? null : { default: v.default }),
...(v.codec === undefined ? null : { codec: v.codec }),
...(v.index === undefined ? null : { index: v.index }),
...(v.bitrate === undefined ? null : { bitrate: v.bitrate }),
...(v.language === undefined ? null : { language: v.language }),
...(v.languageTag === undefined ? null : { languageTag: v.languageTag }),
...(v.languageCode === undefined ? null : { languageCode: v.languageCode }),
...(v.bitDepth === undefined ? null : { bitDepth: v.bitDepth }),
...(v.chromaLocation === undefined ? null : { chromaLocation: v.chromaLocation }),
...(v.chromaSubsampling === undefined
? null
: { chromaSubsampling: v.chromaSubsampling }),
...(v.codedHeight === undefined ? null : { codedHeight: v.codedHeight }),
...(v.codedWidth === undefined ? null : { codedWidth: v.codedWidth }),
...(v.colorRange === undefined ? null : { colorRange: v.colorRange }),
...(v.frameRate === undefined ? null : { frameRate: v.frameRate }),
...(v.height === undefined ? null : { height: v.height }),
...(v.level === undefined ? null : { level: v.level }),
...(v.profile === undefined ? null : { profile: v.profile }),
...(v.refFrames === undefined ? null : { refFrames: v.refFrames }),
...(v.width === undefined ? null : { width: v.width }),
...(v.displayTitle === undefined ? null : { displayTitle: v.displayTitle }),
...(v.extendedDisplayTitle === undefined
? null
: { extendedDisplayTitle: v.extendedDisplayTitle }),
};
});
export const inboundSchema: z.ZodType<GetOnDeckStream, z.ZodTypeDef, unknown> = z.object({
id: z.number().optional(),
streamType: z.number().optional(),
default: z.boolean().optional(),
codec: z.string().optional(),
index: z.number().optional(),
bitrate: z.number().optional(),
language: z.string().optional(),
languageTag: z.string().optional(),
languageCode: z.string().optional(),
bitDepth: z.number().optional(),
chromaLocation: z.string().optional(),
chromaSubsampling: z.string().optional(),
codedHeight: z.number().optional(),
codedWidth: z.number().optional(),
colorRange: z.string().optional(),
frameRate: z.number().optional(),
height: z.number().optional(),
level: z.number().optional(),
profile: z.string().optional(),
refFrames: z.number().optional(),
width: z.number().optional(),
displayTitle: z.string().optional(),
extendedDisplayTitle: z.string().optional(),
});
export type Outbound = {
id?: number | undefined;
@@ -225,63 +194,31 @@ export namespace GetOnDeckStream$ {
extendedDisplayTitle?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetOnDeckStream> = z
.object({
id: z.number().optional(),
streamType: z.number().optional(),
default: z.boolean().optional(),
codec: z.string().optional(),
index: z.number().optional(),
bitrate: z.number().optional(),
language: z.string().optional(),
languageTag: z.string().optional(),
languageCode: z.string().optional(),
bitDepth: z.number().optional(),
chromaLocation: z.string().optional(),
chromaSubsampling: z.string().optional(),
codedHeight: z.number().optional(),
codedWidth: z.number().optional(),
colorRange: z.string().optional(),
frameRate: z.number().optional(),
height: z.number().optional(),
level: z.number().optional(),
profile: z.string().optional(),
refFrames: z.number().optional(),
width: z.number().optional(),
displayTitle: z.string().optional(),
extendedDisplayTitle: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.streamType === undefined ? null : { streamType: v.streamType }),
...(v.default === undefined ? null : { default: v.default }),
...(v.codec === undefined ? null : { codec: v.codec }),
...(v.index === undefined ? null : { index: v.index }),
...(v.bitrate === undefined ? null : { bitrate: v.bitrate }),
...(v.language === undefined ? null : { language: v.language }),
...(v.languageTag === undefined ? null : { languageTag: v.languageTag }),
...(v.languageCode === undefined ? null : { languageCode: v.languageCode }),
...(v.bitDepth === undefined ? null : { bitDepth: v.bitDepth }),
...(v.chromaLocation === undefined ? null : { chromaLocation: v.chromaLocation }),
...(v.chromaSubsampling === undefined
? null
: { chromaSubsampling: v.chromaSubsampling }),
...(v.codedHeight === undefined ? null : { codedHeight: v.codedHeight }),
...(v.codedWidth === undefined ? null : { codedWidth: v.codedWidth }),
...(v.colorRange === undefined ? null : { colorRange: v.colorRange }),
...(v.frameRate === undefined ? null : { frameRate: v.frameRate }),
...(v.height === undefined ? null : { height: v.height }),
...(v.level === undefined ? null : { level: v.level }),
...(v.profile === undefined ? null : { profile: v.profile }),
...(v.refFrames === undefined ? null : { refFrames: v.refFrames }),
...(v.width === undefined ? null : { width: v.width }),
...(v.displayTitle === undefined ? null : { displayTitle: v.displayTitle }),
...(v.extendedDisplayTitle === undefined
? null
: { extendedDisplayTitle: v.extendedDisplayTitle }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetOnDeckStream> = z.object({
id: z.number().optional(),
streamType: z.number().optional(),
default: z.boolean().optional(),
codec: z.string().optional(),
index: z.number().optional(),
bitrate: z.number().optional(),
language: z.string().optional(),
languageTag: z.string().optional(),
languageCode: z.string().optional(),
bitDepth: z.number().optional(),
chromaLocation: z.string().optional(),
chromaSubsampling: z.string().optional(),
codedHeight: z.number().optional(),
codedWidth: z.number().optional(),
colorRange: z.string().optional(),
frameRate: z.number().optional(),
height: z.number().optional(),
level: z.number().optional(),
profile: z.string().optional(),
refFrames: z.number().optional(),
width: z.number().optional(),
displayTitle: z.string().optional(),
extendedDisplayTitle: z.string().optional(),
});
}
/** @internal */
@@ -299,17 +236,9 @@ export namespace GetOnDeckPart$ {
Stream: z.array(z.lazy(() => GetOnDeckStream$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.key === undefined ? null : { key: v.key }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.file === undefined ? null : { file: v.file }),
...(v.size === undefined ? null : { size: v.size }),
...(v.audioProfile === undefined ? null : { audioProfile: v.audioProfile }),
...(v.container === undefined ? null : { container: v.container }),
...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }),
...(v.Stream === undefined ? null : { stream: v.Stream }),
};
return remap$(v, {
Stream: "stream",
});
});
export type Outbound = {
@@ -337,17 +266,9 @@ export namespace GetOnDeckPart$ {
stream: z.array(z.lazy(() => GetOnDeckStream$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.key === undefined ? null : { key: v.key }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.file === undefined ? null : { file: v.file }),
...(v.size === undefined ? null : { size: v.size }),
...(v.audioProfile === undefined ? null : { audioProfile: v.audioProfile }),
...(v.container === undefined ? null : { container: v.container }),
...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }),
...(v.stream === undefined ? null : { Stream: v.stream }),
};
return remap$(v, {
stream: "Stream",
});
});
}
@@ -372,25 +293,9 @@ export namespace GetOnDeckMedia$ {
Part: z.array(z.lazy(() => GetOnDeckPart$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.bitrate === undefined ? null : { bitrate: v.bitrate }),
...(v.width === undefined ? null : { width: v.width }),
...(v.height === undefined ? null : { height: v.height }),
...(v.aspectRatio === undefined ? null : { aspectRatio: v.aspectRatio }),
...(v.audioChannels === undefined ? null : { audioChannels: v.audioChannels }),
...(v.audioCodec === undefined ? null : { audioCodec: v.audioCodec }),
...(v.videoCodec === undefined ? null : { videoCodec: v.videoCodec }),
...(v.videoResolution === undefined
? null
: { videoResolution: v.videoResolution }),
...(v.container === undefined ? null : { container: v.container }),
...(v.videoFrameRate === undefined ? null : { videoFrameRate: v.videoFrameRate }),
...(v.audioProfile === undefined ? null : { audioProfile: v.audioProfile }),
...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }),
...(v.Part === undefined ? null : { part: v.Part }),
};
return remap$(v, {
Part: "part",
});
});
export type Outbound = {
@@ -430,53 +335,25 @@ export namespace GetOnDeckMedia$ {
part: z.array(z.lazy(() => GetOnDeckPart$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.bitrate === undefined ? null : { bitrate: v.bitrate }),
...(v.width === undefined ? null : { width: v.width }),
...(v.height === undefined ? null : { height: v.height }),
...(v.aspectRatio === undefined ? null : { aspectRatio: v.aspectRatio }),
...(v.audioChannels === undefined ? null : { audioChannels: v.audioChannels }),
...(v.audioCodec === undefined ? null : { audioCodec: v.audioCodec }),
...(v.videoCodec === undefined ? null : { videoCodec: v.videoCodec }),
...(v.videoResolution === undefined
? null
: { videoResolution: v.videoResolution }),
...(v.container === undefined ? null : { container: v.container }),
...(v.videoFrameRate === undefined ? null : { videoFrameRate: v.videoFrameRate }),
...(v.audioProfile === undefined ? null : { audioProfile: v.audioProfile }),
...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }),
...(v.part === undefined ? null : { Part: v.part }),
};
return remap$(v, {
part: "Part",
});
});
}
/** @internal */
export namespace GetOnDeckGuids$ {
export const inboundSchema: z.ZodType<GetOnDeckGuids, z.ZodTypeDef, unknown> = z
.object({
id: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
};
});
export const inboundSchema: z.ZodType<GetOnDeckGuids, z.ZodTypeDef, unknown> = z.object({
id: z.string().optional(),
});
export type Outbound = {
id?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetOnDeckGuids> = z
.object({
id: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetOnDeckGuids> = z.object({
id: z.string().optional(),
});
}
/** @internal */
@@ -525,66 +402,9 @@ export namespace GetOnDeckMetadata$ {
guids: z.array(z.lazy(() => GetOnDeckGuids$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.allowSync === undefined ? null : { allowSync: v.allowSync }),
...(v.librarySectionID === undefined
? null
: { librarySectionID: v.librarySectionID }),
...(v.librarySectionTitle === undefined
? null
: { librarySectionTitle: v.librarySectionTitle }),
...(v.librarySectionUUID === undefined
? null
: { librarySectionUUID: v.librarySectionUUID }),
...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }),
...(v.key === undefined ? null : { key: v.key }),
...(v.parentRatingKey === undefined
? null
: { parentRatingKey: v.parentRatingKey }),
...(v.grandparentRatingKey === undefined
? null
: { grandparentRatingKey: v.grandparentRatingKey }),
...(v.guid === undefined ? null : { guid: v.guid }),
...(v.parentGuid === undefined ? null : { parentGuid: v.parentGuid }),
...(v.grandparentGuid === undefined
? null
: { grandparentGuid: v.grandparentGuid }),
...(v.type === undefined ? null : { type: v.type }),
...(v.title === undefined ? null : { title: v.title }),
...(v.grandparentKey === undefined ? null : { grandparentKey: v.grandparentKey }),
...(v.parentKey === undefined ? null : { parentKey: v.parentKey }),
...(v.librarySectionKey === undefined
? null
: { librarySectionKey: v.librarySectionKey }),
...(v.grandparentTitle === undefined
? null
: { grandparentTitle: v.grandparentTitle }),
...(v.parentTitle === undefined ? null : { parentTitle: v.parentTitle }),
...(v.contentRating === undefined ? null : { contentRating: v.contentRating }),
...(v.summary === undefined ? null : { summary: v.summary }),
...(v.index === undefined ? null : { index: v.index }),
...(v.parentIndex === undefined ? null : { parentIndex: v.parentIndex }),
...(v.lastViewedAt === undefined ? null : { lastViewedAt: v.lastViewedAt }),
...(v.year === undefined ? null : { year: v.year }),
...(v.thumb === undefined ? null : { thumb: v.thumb }),
...(v.art === undefined ? null : { art: v.art }),
...(v.parentThumb === undefined ? null : { parentThumb: v.parentThumb }),
...(v.grandparentThumb === undefined
? null
: { grandparentThumb: v.grandparentThumb }),
...(v.grandparentArt === undefined ? null : { grandparentArt: v.grandparentArt }),
...(v.grandparentTheme === undefined
? null
: { grandparentTheme: v.grandparentTheme }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.originallyAvailableAt === undefined
? null
: { originallyAvailableAt: v.originallyAvailableAt }),
...(v.addedAt === undefined ? null : { addedAt: v.addedAt }),
...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }),
...(v.Media === undefined ? null : { media: v.Media }),
...(v.guids === undefined ? null : { guids: v.guids }),
};
return remap$(v, {
Media: "media",
});
});
export type Outbound = {
@@ -669,66 +489,9 @@ export namespace GetOnDeckMetadata$ {
guids: z.array(z.lazy(() => GetOnDeckGuids$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.allowSync === undefined ? null : { allowSync: v.allowSync }),
...(v.librarySectionID === undefined
? null
: { librarySectionID: v.librarySectionID }),
...(v.librarySectionTitle === undefined
? null
: { librarySectionTitle: v.librarySectionTitle }),
...(v.librarySectionUUID === undefined
? null
: { librarySectionUUID: v.librarySectionUUID }),
...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }),
...(v.key === undefined ? null : { key: v.key }),
...(v.parentRatingKey === undefined
? null
: { parentRatingKey: v.parentRatingKey }),
...(v.grandparentRatingKey === undefined
? null
: { grandparentRatingKey: v.grandparentRatingKey }),
...(v.guid === undefined ? null : { guid: v.guid }),
...(v.parentGuid === undefined ? null : { parentGuid: v.parentGuid }),
...(v.grandparentGuid === undefined
? null
: { grandparentGuid: v.grandparentGuid }),
...(v.type === undefined ? null : { type: v.type }),
...(v.title === undefined ? null : { title: v.title }),
...(v.grandparentKey === undefined ? null : { grandparentKey: v.grandparentKey }),
...(v.parentKey === undefined ? null : { parentKey: v.parentKey }),
...(v.librarySectionKey === undefined
? null
: { librarySectionKey: v.librarySectionKey }),
...(v.grandparentTitle === undefined
? null
: { grandparentTitle: v.grandparentTitle }),
...(v.parentTitle === undefined ? null : { parentTitle: v.parentTitle }),
...(v.contentRating === undefined ? null : { contentRating: v.contentRating }),
...(v.summary === undefined ? null : { summary: v.summary }),
...(v.index === undefined ? null : { index: v.index }),
...(v.parentIndex === undefined ? null : { parentIndex: v.parentIndex }),
...(v.lastViewedAt === undefined ? null : { lastViewedAt: v.lastViewedAt }),
...(v.year === undefined ? null : { year: v.year }),
...(v.thumb === undefined ? null : { thumb: v.thumb }),
...(v.art === undefined ? null : { art: v.art }),
...(v.parentThumb === undefined ? null : { parentThumb: v.parentThumb }),
...(v.grandparentThumb === undefined
? null
: { grandparentThumb: v.grandparentThumb }),
...(v.grandparentArt === undefined ? null : { grandparentArt: v.grandparentArt }),
...(v.grandparentTheme === undefined
? null
: { grandparentTheme: v.grandparentTheme }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.originallyAvailableAt === undefined
? null
: { originallyAvailableAt: v.originallyAvailableAt }),
...(v.addedAt === undefined ? null : { addedAt: v.addedAt }),
...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }),
...(v.media === undefined ? null : { Media: v.media }),
...(v.guids === undefined ? null : { guids: v.guids }),
};
return remap$(v, {
media: "Media",
});
});
}
@@ -745,17 +508,9 @@ export namespace GetOnDeckMediaContainer$ {
Metadata: z.array(z.lazy(() => GetOnDeckMetadata$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.size === undefined ? null : { size: v.size }),
...(v.allowSync === undefined ? null : { allowSync: v.allowSync }),
...(v.identifier === undefined ? null : { identifier: v.identifier }),
...(v.mediaTagPrefix === undefined ? null : { mediaTagPrefix: v.mediaTagPrefix }),
...(v.mediaTagVersion === undefined
? null
: { mediaTagVersion: v.mediaTagVersion }),
...(v.mixedParents === undefined ? null : { mixedParents: v.mixedParents }),
...(v.Metadata === undefined ? null : { metadata: v.Metadata }),
};
return remap$(v, {
Metadata: "metadata",
});
});
export type Outbound = {
@@ -779,17 +534,9 @@ export namespace GetOnDeckMediaContainer$ {
metadata: z.array(z.lazy(() => GetOnDeckMetadata$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.size === undefined ? null : { size: v.size }),
...(v.allowSync === undefined ? null : { allowSync: v.allowSync }),
...(v.identifier === undefined ? null : { identifier: v.identifier }),
...(v.mediaTagPrefix === undefined ? null : { mediaTagPrefix: v.mediaTagPrefix }),
...(v.mediaTagVersion === undefined
? null
: { mediaTagVersion: v.mediaTagVersion }),
...(v.mixedParents === undefined ? null : { mixedParents: v.mixedParents }),
...(v.metadata === undefined ? null : { Metadata: v.metadata }),
};
return remap$(v, {
metadata: "Metadata",
});
});
}
@@ -800,9 +547,9 @@ export namespace GetOnDeckResponseBody$ {
MediaContainer: z.lazy(() => GetOnDeckMediaContainer$.inboundSchema).optional(),
})
.transform((v) => {
return {
...(v.MediaContainer === undefined ? null : { mediaContainer: v.MediaContainer }),
};
return remap$(v, {
MediaContainer: "mediaContainer",
});
});
export type Outbound = {
@@ -814,9 +561,9 @@ export namespace GetOnDeckResponseBody$ {
mediaContainer: z.lazy(() => GetOnDeckMediaContainer$.outboundSchema).optional(),
})
.transform((v) => {
return {
...(v.mediaContainer === undefined ? null : { MediaContainer: v.mediaContainer }),
};
return remap$(v, {
mediaContainer: "MediaContainer",
});
});
}
@@ -830,12 +577,11 @@ export namespace GetOnDeckResponse$ {
object: z.lazy(() => GetOnDeckResponseBody$.inboundSchema).optional(),
})
.transform((v) => {
return {
contentType: v.ContentType,
statusCode: v.StatusCode,
rawResponse: v.RawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
@@ -855,11 +601,10 @@ export namespace GetOnDeckResponse$ {
object: z.lazy(() => GetOnDeckResponseBody$.outboundSchema).optional(),
})
.transform((v) => {
return {
ContentType: v.contentType,
StatusCode: v.statusCode,
RawResponse: v.rawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export const GetPinServerList = ["https://plex.tv/api/v2"] as const;
@@ -107,9 +108,9 @@ export namespace GetPinGlobals$ {
"X-Plex-Client-Identifier": z.string(),
})
.transform((v) => {
return {
xPlexClientIdentifier: v["X-Plex-Client-Identifier"],
};
return remap$(v, {
"X-Plex-Client-Identifier": "xPlexClientIdentifier",
});
});
export type Outbound = {
@@ -121,9 +122,9 @@ export namespace GetPinGlobals$ {
xPlexClientIdentifier: z.string(),
})
.transform((v) => {
return {
"X-Plex-Client-Identifier": v.xPlexClientIdentifier,
};
return remap$(v, {
xPlexClientIdentifier: "X-Plex-Client-Identifier",
});
});
}
@@ -135,12 +136,9 @@ export namespace GetPinRequest$ {
"X-Plex-Client-Identifier": z.string().optional(),
})
.transform((v) => {
return {
strong: v.strong,
...(v["X-Plex-Client-Identifier"] === undefined
? null
: { xPlexClientIdentifier: v["X-Plex-Client-Identifier"] }),
};
return remap$(v, {
"X-Plex-Client-Identifier": "xPlexClientIdentifier",
});
});
export type Outbound = {
@@ -154,12 +152,9 @@ export namespace GetPinRequest$ {
xPlexClientIdentifier: z.string().optional(),
})
.transform((v) => {
return {
strong: v.strong,
...(v.xPlexClientIdentifier === undefined
? null
: { "X-Plex-Client-Identifier": v.xPlexClientIdentifier }),
};
return remap$(v, {
xPlexClientIdentifier: "X-Plex-Client-Identifier",
});
});
}
@@ -179,22 +174,13 @@ export namespace Location$ {
coordinates: z.string().optional(),
})
.transform((v) => {
return {
...(v.code === undefined ? null : { code: v.code }),
...(v.european_union_member === undefined
? null
: { europeanUnionMember: v.european_union_member }),
...(v.continent_code === undefined ? null : { continentCode: v.continent_code }),
...(v.country === undefined ? null : { country: v.country }),
...(v.city === undefined ? null : { city: v.city }),
...(v.time_zone === undefined ? null : { timeZone: v.time_zone }),
...(v.postal_code === undefined ? null : { postalCode: v.postal_code }),
...(v.in_privacy_restricted_country === undefined
? null
: { inPrivacyRestrictedCountry: v.in_privacy_restricted_country }),
...(v.subdivisions === undefined ? null : { subdivisions: v.subdivisions }),
...(v.coordinates === undefined ? null : { coordinates: v.coordinates }),
};
return remap$(v, {
european_union_member: "europeanUnionMember",
continent_code: "continentCode",
time_zone: "timeZone",
postal_code: "postalCode",
in_privacy_restricted_country: "inPrivacyRestrictedCountry",
});
});
export type Outbound = {
@@ -224,70 +210,40 @@ export namespace Location$ {
coordinates: z.string().optional(),
})
.transform((v) => {
return {
...(v.code === undefined ? null : { code: v.code }),
...(v.europeanUnionMember === undefined
? null
: { european_union_member: v.europeanUnionMember }),
...(v.continentCode === undefined ? null : { continent_code: v.continentCode }),
...(v.country === undefined ? null : { country: v.country }),
...(v.city === undefined ? null : { city: v.city }),
...(v.timeZone === undefined ? null : { time_zone: v.timeZone }),
...(v.postalCode === undefined ? null : { postal_code: v.postalCode }),
...(v.inPrivacyRestrictedCountry === undefined
? null
: { in_privacy_restricted_country: v.inPrivacyRestrictedCountry }),
...(v.subdivisions === undefined ? null : { subdivisions: v.subdivisions }),
...(v.coordinates === undefined ? null : { coordinates: v.coordinates }),
};
return remap$(v, {
europeanUnionMember: "european_union_member",
continentCode: "continent_code",
timeZone: "time_zone",
postalCode: "postal_code",
inPrivacyRestrictedCountry: "in_privacy_restricted_country",
});
});
}
/** @internal */
export namespace GetPinResponseBody$ {
export const inboundSchema: z.ZodType<GetPinResponseBody, z.ZodTypeDef, unknown> = z
.object({
id: z.number().optional(),
code: z.string().optional(),
product: z.string().optional(),
trusted: z.boolean().optional(),
qr: z.string().optional(),
clientIdentifier: z.string().optional(),
location: z.lazy(() => Location$.inboundSchema).optional(),
expiresIn: z.number().optional(),
createdAt: z
.string()
.datetime({ offset: true })
.transform((v) => new Date(v))
.optional(),
expiresAt: z
.string()
.datetime({ offset: true })
.transform((v) => new Date(v))
.optional(),
authToken: z.string().optional(),
newRegistration: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.code === undefined ? null : { code: v.code }),
...(v.product === undefined ? null : { product: v.product }),
...(v.trusted === undefined ? null : { trusted: v.trusted }),
...(v.qr === undefined ? null : { qr: v.qr }),
...(v.clientIdentifier === undefined
? null
: { clientIdentifier: v.clientIdentifier }),
...(v.location === undefined ? null : { location: v.location }),
...(v.expiresIn === undefined ? null : { expiresIn: v.expiresIn }),
...(v.createdAt === undefined ? null : { createdAt: v.createdAt }),
...(v.expiresAt === undefined ? null : { expiresAt: v.expiresAt }),
...(v.authToken === undefined ? null : { authToken: v.authToken }),
...(v.newRegistration === undefined
? null
: { newRegistration: v.newRegistration }),
};
});
export const inboundSchema: z.ZodType<GetPinResponseBody, z.ZodTypeDef, unknown> = z.object({
id: z.number().optional(),
code: z.string().optional(),
product: z.string().optional(),
trusted: z.boolean().optional(),
qr: z.string().optional(),
clientIdentifier: z.string().optional(),
location: z.lazy(() => Location$.inboundSchema).optional(),
expiresIn: z.number().optional(),
createdAt: z
.string()
.datetime({ offset: true })
.transform((v) => new Date(v))
.optional(),
expiresAt: z
.string()
.datetime({ offset: true })
.transform((v) => new Date(v))
.optional(),
authToken: z.string().optional(),
newRegistration: z.string().optional(),
});
export type Outbound = {
id?: number | undefined;
@@ -304,47 +260,26 @@ export namespace GetPinResponseBody$ {
newRegistration?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPinResponseBody> = z
.object({
id: z.number().optional(),
code: z.string().optional(),
product: z.string().optional(),
trusted: z.boolean().optional(),
qr: z.string().optional(),
clientIdentifier: z.string().optional(),
location: z.lazy(() => Location$.outboundSchema).optional(),
expiresIn: z.number().optional(),
createdAt: z
.date()
.transform((v) => v.toISOString())
.optional(),
expiresAt: z
.date()
.transform((v) => v.toISOString())
.optional(),
authToken: z.string().optional(),
newRegistration: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.code === undefined ? null : { code: v.code }),
...(v.product === undefined ? null : { product: v.product }),
...(v.trusted === undefined ? null : { trusted: v.trusted }),
...(v.qr === undefined ? null : { qr: v.qr }),
...(v.clientIdentifier === undefined
? null
: { clientIdentifier: v.clientIdentifier }),
...(v.location === undefined ? null : { location: v.location }),
...(v.expiresIn === undefined ? null : { expiresIn: v.expiresIn }),
...(v.createdAt === undefined ? null : { createdAt: v.createdAt }),
...(v.expiresAt === undefined ? null : { expiresAt: v.expiresAt }),
...(v.authToken === undefined ? null : { authToken: v.authToken }),
...(v.newRegistration === undefined
? null
: { newRegistration: v.newRegistration }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPinResponseBody> = z.object({
id: z.number().optional(),
code: z.string().optional(),
product: z.string().optional(),
trusted: z.boolean().optional(),
qr: z.string().optional(),
clientIdentifier: z.string().optional(),
location: z.lazy(() => Location$.outboundSchema).optional(),
expiresIn: z.number().optional(),
createdAt: z
.date()
.transform((v) => v.toISOString())
.optional(),
expiresAt: z
.date()
.transform((v) => v.toISOString())
.optional(),
authToken: z.string().optional(),
newRegistration: z.string().optional(),
});
}
/** @internal */
@@ -357,12 +292,11 @@ export namespace GetPinResponse$ {
object: z.lazy(() => GetPinResponseBody$.inboundSchema).optional(),
})
.transform((v) => {
return {
contentType: v.ContentType,
statusCode: v.StatusCode,
rawResponse: v.RawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
@@ -382,11 +316,10 @@ export namespace GetPinResponse$ {
object: z.lazy(() => GetPinResponseBody$.outboundSchema).optional(),
})
.transform((v) => {
return {
ContentType: v.contentType,
StatusCode: v.statusCode,
RawResponse: v.rawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type GetPlaylistRequest = {
@@ -62,70 +63,38 @@ export type GetPlaylistResponse = {
/** @internal */
export namespace GetPlaylistRequest$ {
export const inboundSchema: z.ZodType<GetPlaylistRequest, z.ZodTypeDef, unknown> = z
.object({
playlistID: z.number(),
})
.transform((v) => {
return {
playlistID: v.playlistID,
};
});
export const inboundSchema: z.ZodType<GetPlaylistRequest, z.ZodTypeDef, unknown> = z.object({
playlistID: z.number(),
});
export type Outbound = {
playlistID: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPlaylistRequest> = z
.object({
playlistID: z.number(),
})
.transform((v) => {
return {
playlistID: v.playlistID,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPlaylistRequest> = z.object({
playlistID: z.number(),
});
}
/** @internal */
export namespace GetPlaylistMetadata$ {
export const inboundSchema: z.ZodType<GetPlaylistMetadata, z.ZodTypeDef, unknown> = z
.object({
content: z.string().optional(),
ratingKey: z.string().optional(),
key: z.string().optional(),
guid: z.string().optional(),
type: z.string().optional(),
title: z.string().optional(),
summary: z.string().optional(),
smart: z.boolean().optional(),
playlistType: z.string().optional(),
composite: z.string().optional(),
icon: z.string().optional(),
duration: z.number().int().optional(),
leafCount: z.number().int().optional(),
addedAt: z.number().int().optional(),
updatedAt: z.number().int().optional(),
})
.transform((v) => {
return {
...(v.content === undefined ? null : { content: v.content }),
...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }),
...(v.key === undefined ? null : { key: v.key }),
...(v.guid === undefined ? null : { guid: v.guid }),
...(v.type === undefined ? null : { type: v.type }),
...(v.title === undefined ? null : { title: v.title }),
...(v.summary === undefined ? null : { summary: v.summary }),
...(v.smart === undefined ? null : { smart: v.smart }),
...(v.playlistType === undefined ? null : { playlistType: v.playlistType }),
...(v.composite === undefined ? null : { composite: v.composite }),
...(v.icon === undefined ? null : { icon: v.icon }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.leafCount === undefined ? null : { leafCount: v.leafCount }),
...(v.addedAt === undefined ? null : { addedAt: v.addedAt }),
...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }),
};
});
export const inboundSchema: z.ZodType<GetPlaylistMetadata, z.ZodTypeDef, unknown> = z.object({
content: z.string().optional(),
ratingKey: z.string().optional(),
key: z.string().optional(),
guid: z.string().optional(),
type: z.string().optional(),
title: z.string().optional(),
summary: z.string().optional(),
smart: z.boolean().optional(),
playlistType: z.string().optional(),
composite: z.string().optional(),
icon: z.string().optional(),
duration: z.number().int().optional(),
leafCount: z.number().int().optional(),
addedAt: z.number().int().optional(),
updatedAt: z.number().int().optional(),
});
export type Outbound = {
content?: string | undefined;
@@ -145,43 +114,23 @@ export namespace GetPlaylistMetadata$ {
updatedAt?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPlaylistMetadata> = z
.object({
content: z.string().optional(),
ratingKey: z.string().optional(),
key: z.string().optional(),
guid: z.string().optional(),
type: z.string().optional(),
title: z.string().optional(),
summary: z.string().optional(),
smart: z.boolean().optional(),
playlistType: z.string().optional(),
composite: z.string().optional(),
icon: z.string().optional(),
duration: z.number().int().optional(),
leafCount: z.number().int().optional(),
addedAt: z.number().int().optional(),
updatedAt: z.number().int().optional(),
})
.transform((v) => {
return {
...(v.content === undefined ? null : { content: v.content }),
...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }),
...(v.key === undefined ? null : { key: v.key }),
...(v.guid === undefined ? null : { guid: v.guid }),
...(v.type === undefined ? null : { type: v.type }),
...(v.title === undefined ? null : { title: v.title }),
...(v.summary === undefined ? null : { summary: v.summary }),
...(v.smart === undefined ? null : { smart: v.smart }),
...(v.playlistType === undefined ? null : { playlistType: v.playlistType }),
...(v.composite === undefined ? null : { composite: v.composite }),
...(v.icon === undefined ? null : { icon: v.icon }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.leafCount === undefined ? null : { leafCount: v.leafCount }),
...(v.addedAt === undefined ? null : { addedAt: v.addedAt }),
...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPlaylistMetadata> = z.object({
content: z.string().optional(),
ratingKey: z.string().optional(),
key: z.string().optional(),
guid: z.string().optional(),
type: z.string().optional(),
title: z.string().optional(),
summary: z.string().optional(),
smart: z.boolean().optional(),
playlistType: z.string().optional(),
composite: z.string().optional(),
icon: z.string().optional(),
duration: z.number().int().optional(),
leafCount: z.number().int().optional(),
addedAt: z.number().int().optional(),
updatedAt: z.number().int().optional(),
});
}
/** @internal */
@@ -192,10 +141,9 @@ export namespace GetPlaylistMediaContainer$ {
Metadata: z.array(z.lazy(() => GetPlaylistMetadata$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.size === undefined ? null : { size: v.size }),
...(v.Metadata === undefined ? null : { metadata: v.Metadata }),
};
return remap$(v, {
Metadata: "metadata",
});
});
export type Outbound = {
@@ -209,10 +157,9 @@ export namespace GetPlaylistMediaContainer$ {
metadata: z.array(z.lazy(() => GetPlaylistMetadata$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.size === undefined ? null : { size: v.size }),
...(v.metadata === undefined ? null : { Metadata: v.metadata }),
};
return remap$(v, {
metadata: "Metadata",
});
});
}
@@ -223,9 +170,9 @@ export namespace GetPlaylistResponseBody$ {
MediaContainer: z.lazy(() => GetPlaylistMediaContainer$.inboundSchema).optional(),
})
.transform((v) => {
return {
...(v.MediaContainer === undefined ? null : { mediaContainer: v.MediaContainer }),
};
return remap$(v, {
MediaContainer: "mediaContainer",
});
});
export type Outbound = {
@@ -237,9 +184,9 @@ export namespace GetPlaylistResponseBody$ {
mediaContainer: z.lazy(() => GetPlaylistMediaContainer$.outboundSchema).optional(),
})
.transform((v) => {
return {
...(v.mediaContainer === undefined ? null : { MediaContainer: v.mediaContainer }),
};
return remap$(v, {
mediaContainer: "MediaContainer",
});
});
}
@@ -253,12 +200,11 @@ export namespace GetPlaylistResponse$ {
object: z.lazy(() => GetPlaylistResponseBody$.inboundSchema).optional(),
})
.transform((v) => {
return {
contentType: v.ContentType,
statusCode: v.StatusCode,
rawResponse: v.RawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
@@ -278,11 +224,10 @@ export namespace GetPlaylistResponse$ {
object: z.lazy(() => GetPlaylistResponseBody$.outboundSchema).optional(),
})
.transform((v) => {
return {
ContentType: v.contentType,
StatusCode: v.statusCode,
RawResponse: v.rawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import { RFCDate } from "../../types";
import * as z from "zod";
@@ -144,16 +145,10 @@ export type GetPlaylistContentsResponse = {
/** @internal */
export namespace GetPlaylistContentsRequest$ {
export const inboundSchema: z.ZodType<GetPlaylistContentsRequest, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<GetPlaylistContentsRequest, z.ZodTypeDef, unknown> =
z.object({
playlistID: z.number(),
type: z.number(),
})
.transform((v) => {
return {
playlistID: v.playlistID,
type: v.type,
};
});
export type Outbound = {
@@ -161,23 +156,17 @@ export namespace GetPlaylistContentsRequest$ {
type: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPlaylistContentsRequest> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPlaylistContentsRequest> =
z.object({
playlistID: z.number(),
type: z.number(),
})
.transform((v) => {
return {
playlistID: v.playlistID,
type: v.type,
};
});
}
/** @internal */
export namespace GetPlaylistContentsPart$ {
export const inboundSchema: z.ZodType<GetPlaylistContentsPart, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<GetPlaylistContentsPart, z.ZodTypeDef, unknown> =
z.object({
id: z.number().int().optional(),
key: z.string().optional(),
duration: z.number().int().optional(),
@@ -188,24 +177,6 @@ export namespace GetPlaylistContentsPart$ {
has64bitOffsets: z.boolean().optional(),
optimizedForStreaming: z.boolean().optional(),
videoProfile: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.key === undefined ? null : { key: v.key }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.file === undefined ? null : { file: v.file }),
...(v.size === undefined ? null : { size: v.size }),
...(v.audioProfile === undefined ? null : { audioProfile: v.audioProfile }),
...(v.container === undefined ? null : { container: v.container }),
...(v.has64bitOffsets === undefined
? null
: { has64bitOffsets: v.has64bitOffsets }),
...(v.optimizedForStreaming === undefined
? null
: { optimizedForStreaming: v.optimizedForStreaming }),
...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }),
};
});
export type Outbound = {
@@ -221,8 +192,8 @@ export namespace GetPlaylistContentsPart$ {
videoProfile?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPlaylistContentsPart> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPlaylistContentsPart> =
z.object({
id: z.number().int().optional(),
key: z.string().optional(),
duration: z.number().int().optional(),
@@ -233,24 +204,6 @@ export namespace GetPlaylistContentsPart$ {
has64bitOffsets: z.boolean().optional(),
optimizedForStreaming: z.boolean().optional(),
videoProfile: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.key === undefined ? null : { key: v.key }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.file === undefined ? null : { file: v.file }),
...(v.size === undefined ? null : { size: v.size }),
...(v.audioProfile === undefined ? null : { audioProfile: v.audioProfile }),
...(v.container === undefined ? null : { container: v.container }),
...(v.has64bitOffsets === undefined
? null
: { has64bitOffsets: v.has64bitOffsets }),
...(v.optimizedForStreaming === undefined
? null
: { optimizedForStreaming: v.optimizedForStreaming }),
...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }),
};
});
}
@@ -277,31 +230,9 @@ export namespace GetPlaylistContentsMedia$ {
Part: z.array(z.lazy(() => GetPlaylistContentsPart$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.bitrate === undefined ? null : { bitrate: v.bitrate }),
...(v.width === undefined ? null : { width: v.width }),
...(v.height === undefined ? null : { height: v.height }),
...(v.aspectRatio === undefined ? null : { aspectRatio: v.aspectRatio }),
...(v.audioChannels === undefined ? null : { audioChannels: v.audioChannels }),
...(v.audioCodec === undefined ? null : { audioCodec: v.audioCodec }),
...(v.videoCodec === undefined ? null : { videoCodec: v.videoCodec }),
...(v.videoResolution === undefined
? null
: { videoResolution: v.videoResolution }),
...(v.container === undefined ? null : { container: v.container }),
...(v.videoFrameRate === undefined ? null : { videoFrameRate: v.videoFrameRate }),
...(v.optimizedForStreaming === undefined
? null
: { optimizedForStreaming: v.optimizedForStreaming }),
...(v.audioProfile === undefined ? null : { audioProfile: v.audioProfile }),
...(v.has64bitOffsets === undefined
? null
: { has64bitOffsets: v.has64bitOffsets }),
...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }),
...(v.Part === undefined ? null : { part: v.Part }),
};
return remap$(v, {
Part: "part",
});
});
export type Outbound = {
@@ -345,166 +276,94 @@ export namespace GetPlaylistContentsMedia$ {
part: z.array(z.lazy(() => GetPlaylistContentsPart$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.bitrate === undefined ? null : { bitrate: v.bitrate }),
...(v.width === undefined ? null : { width: v.width }),
...(v.height === undefined ? null : { height: v.height }),
...(v.aspectRatio === undefined ? null : { aspectRatio: v.aspectRatio }),
...(v.audioChannels === undefined ? null : { audioChannels: v.audioChannels }),
...(v.audioCodec === undefined ? null : { audioCodec: v.audioCodec }),
...(v.videoCodec === undefined ? null : { videoCodec: v.videoCodec }),
...(v.videoResolution === undefined
? null
: { videoResolution: v.videoResolution }),
...(v.container === undefined ? null : { container: v.container }),
...(v.videoFrameRate === undefined ? null : { videoFrameRate: v.videoFrameRate }),
...(v.optimizedForStreaming === undefined
? null
: { optimizedForStreaming: v.optimizedForStreaming }),
...(v.audioProfile === undefined ? null : { audioProfile: v.audioProfile }),
...(v.has64bitOffsets === undefined
? null
: { has64bitOffsets: v.has64bitOffsets }),
...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }),
...(v.part === undefined ? null : { Part: v.part }),
};
return remap$(v, {
part: "Part",
});
});
}
/** @internal */
export namespace GetPlaylistContentsGenre$ {
export const inboundSchema: z.ZodType<GetPlaylistContentsGenre, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<GetPlaylistContentsGenre, z.ZodTypeDef, unknown> =
z.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
export type Outbound = {
tag?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPlaylistContentsGenre> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPlaylistContentsGenre> =
z.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
}
/** @internal */
export namespace GetPlaylistContentsCountry$ {
export const inboundSchema: z.ZodType<GetPlaylistContentsCountry, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<GetPlaylistContentsCountry, z.ZodTypeDef, unknown> =
z.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
export type Outbound = {
tag?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPlaylistContentsCountry> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPlaylistContentsCountry> =
z.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
}
/** @internal */
export namespace GetPlaylistContentsDirector$ {
export const inboundSchema: z.ZodType<GetPlaylistContentsDirector, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<GetPlaylistContentsDirector, z.ZodTypeDef, unknown> =
z.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
export type Outbound = {
tag?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPlaylistContentsDirector> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPlaylistContentsDirector> =
z.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
}
/** @internal */
export namespace GetPlaylistContentsWriter$ {
export const inboundSchema: z.ZodType<GetPlaylistContentsWriter, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<GetPlaylistContentsWriter, z.ZodTypeDef, unknown> =
z.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
export type Outbound = {
tag?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPlaylistContentsWriter> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPlaylistContentsWriter> =
z.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
}
/** @internal */
export namespace GetPlaylistContentsRole$ {
export const inboundSchema: z.ZodType<GetPlaylistContentsRole, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<GetPlaylistContentsRole, z.ZodTypeDef, unknown> =
z.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
export type Outbound = {
tag?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPlaylistContentsRole> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPlaylistContentsRole> =
z.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
}
@@ -549,54 +408,14 @@ export namespace GetPlaylistContentsMetadata$ {
Role: z.array(z.lazy(() => GetPlaylistContentsRole$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }),
...(v.key === undefined ? null : { key: v.key }),
...(v.guid === undefined ? null : { guid: v.guid }),
...(v.studio === undefined ? null : { studio: v.studio }),
...(v.type === undefined ? null : { type: v.type }),
...(v.title === undefined ? null : { title: v.title }),
...(v.titleSort === undefined ? null : { titleSort: v.titleSort }),
...(v.librarySectionTitle === undefined
? null
: { librarySectionTitle: v.librarySectionTitle }),
...(v.librarySectionID === undefined
? null
: { librarySectionID: v.librarySectionID }),
...(v.librarySectionKey === undefined
? null
: { librarySectionKey: v.librarySectionKey }),
...(v.contentRating === undefined ? null : { contentRating: v.contentRating }),
...(v.summary === undefined ? null : { summary: v.summary }),
...(v.rating === undefined ? null : { rating: v.rating }),
...(v.audienceRating === undefined ? null : { audienceRating: v.audienceRating }),
...(v.year === undefined ? null : { year: v.year }),
...(v.tagline === undefined ? null : { tagline: v.tagline }),
...(v.thumb === undefined ? null : { thumb: v.thumb }),
...(v.art === undefined ? null : { art: v.art }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.originallyAvailableAt === undefined
? null
: { originallyAvailableAt: v.originallyAvailableAt }),
...(v.addedAt === undefined ? null : { addedAt: v.addedAt }),
...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }),
...(v.audienceRatingImage === undefined
? null
: { audienceRatingImage: v.audienceRatingImage }),
...(v.hasPremiumExtras === undefined
? null
: { hasPremiumExtras: v.hasPremiumExtras }),
...(v.hasPremiumPrimaryExtra === undefined
? null
: { hasPremiumPrimaryExtra: v.hasPremiumPrimaryExtra }),
...(v.ratingImage === undefined ? null : { ratingImage: v.ratingImage }),
...(v.Media === undefined ? null : { media: v.Media }),
...(v.Genre === undefined ? null : { genre: v.Genre }),
...(v.Country === undefined ? null : { country: v.Country }),
...(v.Director === undefined ? null : { director: v.Director }),
...(v.Writer === undefined ? null : { writer: v.Writer }),
...(v.Role === undefined ? null : { role: v.Role }),
};
return remap$(v, {
Media: "media",
Genre: "genre",
Country: "country",
Director: "director",
Writer: "writer",
Role: "role",
});
});
export type Outbound = {
@@ -673,54 +492,14 @@ export namespace GetPlaylistContentsMetadata$ {
role: z.array(z.lazy(() => GetPlaylistContentsRole$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }),
...(v.key === undefined ? null : { key: v.key }),
...(v.guid === undefined ? null : { guid: v.guid }),
...(v.studio === undefined ? null : { studio: v.studio }),
...(v.type === undefined ? null : { type: v.type }),
...(v.title === undefined ? null : { title: v.title }),
...(v.titleSort === undefined ? null : { titleSort: v.titleSort }),
...(v.librarySectionTitle === undefined
? null
: { librarySectionTitle: v.librarySectionTitle }),
...(v.librarySectionID === undefined
? null
: { librarySectionID: v.librarySectionID }),
...(v.librarySectionKey === undefined
? null
: { librarySectionKey: v.librarySectionKey }),
...(v.contentRating === undefined ? null : { contentRating: v.contentRating }),
...(v.summary === undefined ? null : { summary: v.summary }),
...(v.rating === undefined ? null : { rating: v.rating }),
...(v.audienceRating === undefined ? null : { audienceRating: v.audienceRating }),
...(v.year === undefined ? null : { year: v.year }),
...(v.tagline === undefined ? null : { tagline: v.tagline }),
...(v.thumb === undefined ? null : { thumb: v.thumb }),
...(v.art === undefined ? null : { art: v.art }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.originallyAvailableAt === undefined
? null
: { originallyAvailableAt: v.originallyAvailableAt }),
...(v.addedAt === undefined ? null : { addedAt: v.addedAt }),
...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }),
...(v.audienceRatingImage === undefined
? null
: { audienceRatingImage: v.audienceRatingImage }),
...(v.hasPremiumExtras === undefined
? null
: { hasPremiumExtras: v.hasPremiumExtras }),
...(v.hasPremiumPrimaryExtra === undefined
? null
: { hasPremiumPrimaryExtra: v.hasPremiumPrimaryExtra }),
...(v.ratingImage === undefined ? null : { ratingImage: v.ratingImage }),
...(v.media === undefined ? null : { Media: v.media }),
...(v.genre === undefined ? null : { Genre: v.genre }),
...(v.country === undefined ? null : { Country: v.country }),
...(v.director === undefined ? null : { Director: v.director }),
...(v.writer === undefined ? null : { Writer: v.writer }),
...(v.role === undefined ? null : { Role: v.role }),
};
return remap$(v, {
media: "Media",
genre: "Genre",
country: "Country",
director: "Director",
writer: "Writer",
role: "Role",
});
});
}
@@ -743,17 +522,9 @@ export namespace GetPlaylistContentsMediaContainer$ {
Metadata: z.array(z.lazy(() => GetPlaylistContentsMetadata$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.size === undefined ? null : { size: v.size }),
...(v.composite === undefined ? null : { composite: v.composite }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.leafCount === undefined ? null : { leafCount: v.leafCount }),
...(v.playlistType === undefined ? null : { playlistType: v.playlistType }),
...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }),
...(v.smart === undefined ? null : { smart: v.smart }),
...(v.title === undefined ? null : { title: v.title }),
...(v.Metadata === undefined ? null : { metadata: v.Metadata }),
};
return remap$(v, {
Metadata: "metadata",
});
});
export type Outbound = {
@@ -785,17 +556,9 @@ export namespace GetPlaylistContentsMediaContainer$ {
metadata: z.array(z.lazy(() => GetPlaylistContentsMetadata$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.size === undefined ? null : { size: v.size }),
...(v.composite === undefined ? null : { composite: v.composite }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.leafCount === undefined ? null : { leafCount: v.leafCount }),
...(v.playlistType === undefined ? null : { playlistType: v.playlistType }),
...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }),
...(v.smart === undefined ? null : { smart: v.smart }),
...(v.title === undefined ? null : { title: v.title }),
...(v.metadata === undefined ? null : { Metadata: v.metadata }),
};
return remap$(v, {
metadata: "Metadata",
});
});
}
@@ -809,11 +572,9 @@ export namespace GetPlaylistContentsResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.MediaContainer === undefined
? null
: { mediaContainer: v.MediaContainer }),
};
return remap$(v, {
MediaContainer: "mediaContainer",
});
});
export type Outbound = {
@@ -831,9 +592,9 @@ export namespace GetPlaylistContentsResponseBody$ {
.optional(),
})
.transform((v) => {
return {
...(v.mediaContainer === undefined ? null : { MediaContainer: v.mediaContainer }),
};
return remap$(v, {
mediaContainer: "MediaContainer",
});
});
}
@@ -847,12 +608,11 @@ export namespace GetPlaylistContentsResponse$ {
object: z.lazy(() => GetPlaylistContentsResponseBody$.inboundSchema).optional(),
})
.transform((v) => {
return {
contentType: v.ContentType,
statusCode: v.StatusCode,
rawResponse: v.RawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
@@ -872,11 +632,10 @@ export namespace GetPlaylistContentsResponse$ {
object: z.lazy(() => GetPlaylistContentsResponseBody$.outboundSchema).optional(),
})
.transform((v) => {
return {
ContentType: v.contentType,
StatusCode: v.statusCode,
RawResponse: v.rawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
/**
@@ -96,77 +97,42 @@ export namespace QueryParamSmart$ {
/** @internal */
export namespace GetPlaylistsRequest$ {
export const inboundSchema: z.ZodType<GetPlaylistsRequest, z.ZodTypeDef, unknown> = z
.object({
playlistType: PlaylistType$.inboundSchema.optional(),
smart: QueryParamSmart$.inboundSchema.optional(),
})
.transform((v) => {
return {
...(v.playlistType === undefined ? null : { playlistType: v.playlistType }),
...(v.smart === undefined ? null : { smart: v.smart }),
};
});
export const inboundSchema: z.ZodType<GetPlaylistsRequest, z.ZodTypeDef, unknown> = z.object({
playlistType: PlaylistType$.inboundSchema.optional(),
smart: QueryParamSmart$.inboundSchema.optional(),
});
export type Outbound = {
playlistType?: string | undefined;
smart?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPlaylistsRequest> = z
.object({
playlistType: PlaylistType$.outboundSchema.optional(),
smart: QueryParamSmart$.outboundSchema.optional(),
})
.transform((v) => {
return {
...(v.playlistType === undefined ? null : { playlistType: v.playlistType }),
...(v.smart === undefined ? null : { smart: v.smart }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPlaylistsRequest> = z.object({
playlistType: PlaylistType$.outboundSchema.optional(),
smart: QueryParamSmart$.outboundSchema.optional(),
});
}
/** @internal */
export namespace GetPlaylistsMetadata$ {
export const inboundSchema: z.ZodType<GetPlaylistsMetadata, z.ZodTypeDef, unknown> = z
.object({
ratingKey: z.string().optional(),
key: z.string().optional(),
guid: z.string().optional(),
type: z.string().optional(),
title: z.string().optional(),
summary: z.string().optional(),
smart: z.boolean().optional(),
playlistType: z.string().optional(),
composite: z.string().optional(),
icon: z.string().optional(),
viewCount: z.number().int().optional(),
lastViewedAt: z.number().int().optional(),
duration: z.number().int().optional(),
leafCount: z.number().int().optional(),
addedAt: z.number().int().optional(),
updatedAt: z.number().int().optional(),
})
.transform((v) => {
return {
...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }),
...(v.key === undefined ? null : { key: v.key }),
...(v.guid === undefined ? null : { guid: v.guid }),
...(v.type === undefined ? null : { type: v.type }),
...(v.title === undefined ? null : { title: v.title }),
...(v.summary === undefined ? null : { summary: v.summary }),
...(v.smart === undefined ? null : { smart: v.smart }),
...(v.playlistType === undefined ? null : { playlistType: v.playlistType }),
...(v.composite === undefined ? null : { composite: v.composite }),
...(v.icon === undefined ? null : { icon: v.icon }),
...(v.viewCount === undefined ? null : { viewCount: v.viewCount }),
...(v.lastViewedAt === undefined ? null : { lastViewedAt: v.lastViewedAt }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.leafCount === undefined ? null : { leafCount: v.leafCount }),
...(v.addedAt === undefined ? null : { addedAt: v.addedAt }),
...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }),
};
});
export const inboundSchema: z.ZodType<GetPlaylistsMetadata, z.ZodTypeDef, unknown> = z.object({
ratingKey: z.string().optional(),
key: z.string().optional(),
guid: z.string().optional(),
type: z.string().optional(),
title: z.string().optional(),
summary: z.string().optional(),
smart: z.boolean().optional(),
playlistType: z.string().optional(),
composite: z.string().optional(),
icon: z.string().optional(),
viewCount: z.number().int().optional(),
lastViewedAt: z.number().int().optional(),
duration: z.number().int().optional(),
leafCount: z.number().int().optional(),
addedAt: z.number().int().optional(),
updatedAt: z.number().int().optional(),
});
export type Outbound = {
ratingKey?: string | undefined;
@@ -187,8 +153,8 @@ export namespace GetPlaylistsMetadata$ {
updatedAt?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPlaylistsMetadata> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetPlaylistsMetadata> = z.object(
{
ratingKey: z.string().optional(),
key: z.string().optional(),
guid: z.string().optional(),
@@ -205,27 +171,8 @@ export namespace GetPlaylistsMetadata$ {
leafCount: z.number().int().optional(),
addedAt: z.number().int().optional(),
updatedAt: z.number().int().optional(),
})
.transform((v) => {
return {
...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }),
...(v.key === undefined ? null : { key: v.key }),
...(v.guid === undefined ? null : { guid: v.guid }),
...(v.type === undefined ? null : { type: v.type }),
...(v.title === undefined ? null : { title: v.title }),
...(v.summary === undefined ? null : { summary: v.summary }),
...(v.smart === undefined ? null : { smart: v.smart }),
...(v.playlistType === undefined ? null : { playlistType: v.playlistType }),
...(v.composite === undefined ? null : { composite: v.composite }),
...(v.icon === undefined ? null : { icon: v.icon }),
...(v.viewCount === undefined ? null : { viewCount: v.viewCount }),
...(v.lastViewedAt === undefined ? null : { lastViewedAt: v.lastViewedAt }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.leafCount === undefined ? null : { leafCount: v.leafCount }),
...(v.addedAt === undefined ? null : { addedAt: v.addedAt }),
...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }),
};
});
}
);
}
/** @internal */
@@ -236,10 +183,9 @@ export namespace GetPlaylistsMediaContainer$ {
Metadata: z.array(z.lazy(() => GetPlaylistsMetadata$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.size === undefined ? null : { size: v.size }),
...(v.Metadata === undefined ? null : { metadata: v.Metadata }),
};
return remap$(v, {
Metadata: "metadata",
});
});
export type Outbound = {
@@ -253,10 +199,9 @@ export namespace GetPlaylistsMediaContainer$ {
metadata: z.array(z.lazy(() => GetPlaylistsMetadata$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.size === undefined ? null : { size: v.size }),
...(v.metadata === undefined ? null : { Metadata: v.metadata }),
};
return remap$(v, {
metadata: "Metadata",
});
});
}
@@ -267,9 +212,9 @@ export namespace GetPlaylistsResponseBody$ {
MediaContainer: z.lazy(() => GetPlaylistsMediaContainer$.inboundSchema).optional(),
})
.transform((v) => {
return {
...(v.MediaContainer === undefined ? null : { mediaContainer: v.MediaContainer }),
};
return remap$(v, {
MediaContainer: "mediaContainer",
});
});
export type Outbound = {
@@ -281,9 +226,9 @@ export namespace GetPlaylistsResponseBody$ {
mediaContainer: z.lazy(() => GetPlaylistsMediaContainer$.outboundSchema).optional(),
})
.transform((v) => {
return {
...(v.mediaContainer === undefined ? null : { MediaContainer: v.mediaContainer }),
};
return remap$(v, {
mediaContainer: "MediaContainer",
});
});
}
@@ -297,12 +242,11 @@ export namespace GetPlaylistsResponse$ {
object: z.lazy(() => GetPlaylistsResponseBody$.inboundSchema).optional(),
})
.transform((v) => {
return {
contentType: v.ContentType,
statusCode: v.StatusCode,
rawResponse: v.RawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
@@ -322,11 +266,10 @@ export namespace GetPlaylistsResponse$ {
object: z.lazy(() => GetPlaylistsResponseBody$.outboundSchema).optional(),
})
.transform((v) => {
return {
ContentType: v.contentType,
StatusCode: v.statusCode,
RawResponse: v.rawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type Part = {
@@ -129,37 +130,18 @@ export type GetRecentlyAddedResponse = {
/** @internal */
export namespace Part$ {
export const inboundSchema: z.ZodType<Part, z.ZodTypeDef, unknown> = z
.object({
id: z.number().optional(),
key: z.string().optional(),
duration: z.number().optional(),
file: z.string().optional(),
size: z.number().optional(),
container: z.string().optional(),
has64bitOffsets: z.boolean().optional(),
hasThumbnail: z.number().optional(),
optimizedForStreaming: z.boolean().optional(),
videoProfile: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.key === undefined ? null : { key: v.key }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.file === undefined ? null : { file: v.file }),
...(v.size === undefined ? null : { size: v.size }),
...(v.container === undefined ? null : { container: v.container }),
...(v.has64bitOffsets === undefined
? null
: { has64bitOffsets: v.has64bitOffsets }),
...(v.hasThumbnail === undefined ? null : { hasThumbnail: v.hasThumbnail }),
...(v.optimizedForStreaming === undefined
? null
: { optimizedForStreaming: v.optimizedForStreaming }),
...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }),
};
});
export const inboundSchema: z.ZodType<Part, z.ZodTypeDef, unknown> = z.object({
id: z.number().optional(),
key: z.string().optional(),
duration: z.number().optional(),
file: z.string().optional(),
size: z.number().optional(),
container: z.string().optional(),
has64bitOffsets: z.boolean().optional(),
hasThumbnail: z.number().optional(),
optimizedForStreaming: z.boolean().optional(),
videoProfile: z.string().optional(),
});
export type Outbound = {
id?: number | undefined;
@@ -174,37 +156,18 @@ export namespace Part$ {
videoProfile?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Part> = z
.object({
id: z.number().optional(),
key: z.string().optional(),
duration: z.number().optional(),
file: z.string().optional(),
size: z.number().optional(),
container: z.string().optional(),
has64bitOffsets: z.boolean().optional(),
hasThumbnail: z.number().optional(),
optimizedForStreaming: z.boolean().optional(),
videoProfile: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.key === undefined ? null : { key: v.key }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.file === undefined ? null : { file: v.file }),
...(v.size === undefined ? null : { size: v.size }),
...(v.container === undefined ? null : { container: v.container }),
...(v.has64bitOffsets === undefined
? null
: { has64bitOffsets: v.has64bitOffsets }),
...(v.hasThumbnail === undefined ? null : { hasThumbnail: v.hasThumbnail }),
...(v.optimizedForStreaming === undefined
? null
: { optimizedForStreaming: v.optimizedForStreaming }),
...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Part> = z.object({
id: z.number().optional(),
key: z.string().optional(),
duration: z.number().optional(),
file: z.string().optional(),
size: z.number().optional(),
container: z.string().optional(),
has64bitOffsets: z.boolean().optional(),
hasThumbnail: z.number().optional(),
optimizedForStreaming: z.boolean().optional(),
videoProfile: z.string().optional(),
});
}
/** @internal */
@@ -229,30 +192,9 @@ export namespace Media$ {
Part: z.array(z.lazy(() => Part$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.bitrate === undefined ? null : { bitrate: v.bitrate }),
...(v.width === undefined ? null : { width: v.width }),
...(v.height === undefined ? null : { height: v.height }),
...(v.aspectRatio === undefined ? null : { aspectRatio: v.aspectRatio }),
...(v.audioChannels === undefined ? null : { audioChannels: v.audioChannels }),
...(v.audioCodec === undefined ? null : { audioCodec: v.audioCodec }),
...(v.videoCodec === undefined ? null : { videoCodec: v.videoCodec }),
...(v.videoResolution === undefined
? null
: { videoResolution: v.videoResolution }),
...(v.container === undefined ? null : { container: v.container }),
...(v.videoFrameRate === undefined ? null : { videoFrameRate: v.videoFrameRate }),
...(v.optimizedForStreaming === undefined
? null
: { optimizedForStreaming: v.optimizedForStreaming }),
...(v.has64bitOffsets === undefined
? null
: { has64bitOffsets: v.has64bitOffsets }),
...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }),
...(v.Part === undefined ? null : { part: v.Part }),
};
return remap$(v, {
Part: "part",
});
});
export type Outbound = {
@@ -294,166 +236,85 @@ export namespace Media$ {
part: z.array(z.lazy(() => Part$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.bitrate === undefined ? null : { bitrate: v.bitrate }),
...(v.width === undefined ? null : { width: v.width }),
...(v.height === undefined ? null : { height: v.height }),
...(v.aspectRatio === undefined ? null : { aspectRatio: v.aspectRatio }),
...(v.audioChannels === undefined ? null : { audioChannels: v.audioChannels }),
...(v.audioCodec === undefined ? null : { audioCodec: v.audioCodec }),
...(v.videoCodec === undefined ? null : { videoCodec: v.videoCodec }),
...(v.videoResolution === undefined
? null
: { videoResolution: v.videoResolution }),
...(v.container === undefined ? null : { container: v.container }),
...(v.videoFrameRate === undefined ? null : { videoFrameRate: v.videoFrameRate }),
...(v.optimizedForStreaming === undefined
? null
: { optimizedForStreaming: v.optimizedForStreaming }),
...(v.has64bitOffsets === undefined
? null
: { has64bitOffsets: v.has64bitOffsets }),
...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }),
...(v.part === undefined ? null : { Part: v.part }),
};
return remap$(v, {
part: "Part",
});
});
}
/** @internal */
export namespace Genre$ {
export const inboundSchema: z.ZodType<Genre, z.ZodTypeDef, unknown> = z
.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
export const inboundSchema: z.ZodType<Genre, z.ZodTypeDef, unknown> = z.object({
tag: z.string().optional(),
});
export type Outbound = {
tag?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Genre> = z
.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Genre> = z.object({
tag: z.string().optional(),
});
}
/** @internal */
export namespace Director$ {
export const inboundSchema: z.ZodType<Director, z.ZodTypeDef, unknown> = z
.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
export const inboundSchema: z.ZodType<Director, z.ZodTypeDef, unknown> = z.object({
tag: z.string().optional(),
});
export type Outbound = {
tag?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Director> = z
.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Director> = z.object({
tag: z.string().optional(),
});
}
/** @internal */
export namespace Writer$ {
export const inboundSchema: z.ZodType<Writer, z.ZodTypeDef, unknown> = z
.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
export const inboundSchema: z.ZodType<Writer, z.ZodTypeDef, unknown> = z.object({
tag: z.string().optional(),
});
export type Outbound = {
tag?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Writer> = z
.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Writer> = z.object({
tag: z.string().optional(),
});
}
/** @internal */
export namespace Country$ {
export const inboundSchema: z.ZodType<Country, z.ZodTypeDef, unknown> = z
.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
export const inboundSchema: z.ZodType<Country, z.ZodTypeDef, unknown> = z.object({
tag: z.string().optional(),
});
export type Outbound = {
tag?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Country> = z
.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Country> = z.object({
tag: z.string().optional(),
});
}
/** @internal */
export namespace Role$ {
export const inboundSchema: z.ZodType<Role, z.ZodTypeDef, unknown> = z
.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
export const inboundSchema: z.ZodType<Role, z.ZodTypeDef, unknown> = z.object({
tag: z.string().optional(),
});
export type Outbound = {
tag?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Role> = z
.object({
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Role> = z.object({
tag: z.string().optional(),
});
}
/** @internal */
@@ -498,52 +359,14 @@ export namespace Metadata$ {
Role: z.array(z.lazy(() => Role$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.allowSync === undefined ? null : { allowSync: v.allowSync }),
...(v.librarySectionID === undefined
? null
: { librarySectionID: v.librarySectionID }),
...(v.librarySectionTitle === undefined
? null
: { librarySectionTitle: v.librarySectionTitle }),
...(v.librarySectionUUID === undefined
? null
: { librarySectionUUID: v.librarySectionUUID }),
...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }),
...(v.key === undefined ? null : { key: v.key }),
...(v.guid === undefined ? null : { guid: v.guid }),
...(v.studio === undefined ? null : { studio: v.studio }),
...(v.type === undefined ? null : { type: v.type }),
...(v.title === undefined ? null : { title: v.title }),
...(v.contentRating === undefined ? null : { contentRating: v.contentRating }),
...(v.summary === undefined ? null : { summary: v.summary }),
...(v.rating === undefined ? null : { rating: v.rating }),
...(v.audienceRating === undefined ? null : { audienceRating: v.audienceRating }),
...(v.year === undefined ? null : { year: v.year }),
...(v.tagline === undefined ? null : { tagline: v.tagline }),
...(v.thumb === undefined ? null : { thumb: v.thumb }),
...(v.art === undefined ? null : { art: v.art }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.originallyAvailableAt === undefined
? null
: { originallyAvailableAt: v.originallyAvailableAt }),
...(v.addedAt === undefined ? null : { addedAt: v.addedAt }),
...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }),
...(v.audienceRatingImage === undefined
? null
: { audienceRatingImage: v.audienceRatingImage }),
...(v.chapterSource === undefined ? null : { chapterSource: v.chapterSource }),
...(v.primaryExtraKey === undefined
? null
: { primaryExtraKey: v.primaryExtraKey }),
...(v.ratingImage === undefined ? null : { ratingImage: v.ratingImage }),
...(v.Media === undefined ? null : { media: v.Media }),
...(v.Genre === undefined ? null : { genre: v.Genre }),
...(v.Director === undefined ? null : { director: v.Director }),
...(v.Writer === undefined ? null : { writer: v.Writer }),
...(v.Country === undefined ? null : { country: v.Country }),
...(v.Role === undefined ? null : { role: v.Role }),
};
return remap$(v, {
Media: "media",
Genre: "genre",
Director: "director",
Writer: "writer",
Country: "country",
Role: "role",
});
});
export type Outbound = {
@@ -620,52 +443,14 @@ export namespace Metadata$ {
role: z.array(z.lazy(() => Role$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.allowSync === undefined ? null : { allowSync: v.allowSync }),
...(v.librarySectionID === undefined
? null
: { librarySectionID: v.librarySectionID }),
...(v.librarySectionTitle === undefined
? null
: { librarySectionTitle: v.librarySectionTitle }),
...(v.librarySectionUUID === undefined
? null
: { librarySectionUUID: v.librarySectionUUID }),
...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }),
...(v.key === undefined ? null : { key: v.key }),
...(v.guid === undefined ? null : { guid: v.guid }),
...(v.studio === undefined ? null : { studio: v.studio }),
...(v.type === undefined ? null : { type: v.type }),
...(v.title === undefined ? null : { title: v.title }),
...(v.contentRating === undefined ? null : { contentRating: v.contentRating }),
...(v.summary === undefined ? null : { summary: v.summary }),
...(v.rating === undefined ? null : { rating: v.rating }),
...(v.audienceRating === undefined ? null : { audienceRating: v.audienceRating }),
...(v.year === undefined ? null : { year: v.year }),
...(v.tagline === undefined ? null : { tagline: v.tagline }),
...(v.thumb === undefined ? null : { thumb: v.thumb }),
...(v.art === undefined ? null : { art: v.art }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.originallyAvailableAt === undefined
? null
: { originallyAvailableAt: v.originallyAvailableAt }),
...(v.addedAt === undefined ? null : { addedAt: v.addedAt }),
...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }),
...(v.audienceRatingImage === undefined
? null
: { audienceRatingImage: v.audienceRatingImage }),
...(v.chapterSource === undefined ? null : { chapterSource: v.chapterSource }),
...(v.primaryExtraKey === undefined
? null
: { primaryExtraKey: v.primaryExtraKey }),
...(v.ratingImage === undefined ? null : { ratingImage: v.ratingImage }),
...(v.media === undefined ? null : { Media: v.media }),
...(v.genre === undefined ? null : { Genre: v.genre }),
...(v.director === undefined ? null : { Director: v.director }),
...(v.writer === undefined ? null : { Writer: v.writer }),
...(v.country === undefined ? null : { Country: v.country }),
...(v.role === undefined ? null : { Role: v.role }),
};
return remap$(v, {
media: "Media",
genre: "Genre",
director: "Director",
writer: "Writer",
country: "Country",
role: "Role",
});
});
}
@@ -682,17 +467,9 @@ export namespace GetRecentlyAddedMediaContainer$ {
Metadata: z.array(z.lazy(() => Metadata$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.size === undefined ? null : { size: v.size }),
...(v.allowSync === undefined ? null : { allowSync: v.allowSync }),
...(v.identifier === undefined ? null : { identifier: v.identifier }),
...(v.mediaTagPrefix === undefined ? null : { mediaTagPrefix: v.mediaTagPrefix }),
...(v.mediaTagVersion === undefined
? null
: { mediaTagVersion: v.mediaTagVersion }),
...(v.mixedParents === undefined ? null : { mixedParents: v.mixedParents }),
...(v.Metadata === undefined ? null : { metadata: v.Metadata }),
};
return remap$(v, {
Metadata: "metadata",
});
});
export type Outbound = {
@@ -717,19 +494,9 @@ export namespace GetRecentlyAddedMediaContainer$ {
metadata: z.array(z.lazy(() => Metadata$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.size === undefined ? null : { size: v.size }),
...(v.allowSync === undefined ? null : { allowSync: v.allowSync }),
...(v.identifier === undefined ? null : { identifier: v.identifier }),
...(v.mediaTagPrefix === undefined
? null
: { mediaTagPrefix: v.mediaTagPrefix }),
...(v.mediaTagVersion === undefined
? null
: { mediaTagVersion: v.mediaTagVersion }),
...(v.mixedParents === undefined ? null : { mixedParents: v.mixedParents }),
...(v.metadata === undefined ? null : { Metadata: v.metadata }),
};
return remap$(v, {
metadata: "Metadata",
});
});
}
@@ -740,9 +507,9 @@ export namespace GetRecentlyAddedResponseBody$ {
MediaContainer: z.lazy(() => GetRecentlyAddedMediaContainer$.inboundSchema).optional(),
})
.transform((v) => {
return {
...(v.MediaContainer === undefined ? null : { mediaContainer: v.MediaContainer }),
};
return remap$(v, {
MediaContainer: "mediaContainer",
});
});
export type Outbound = {
@@ -754,9 +521,9 @@ export namespace GetRecentlyAddedResponseBody$ {
mediaContainer: z.lazy(() => GetRecentlyAddedMediaContainer$.outboundSchema).optional(),
})
.transform((v) => {
return {
...(v.mediaContainer === undefined ? null : { MediaContainer: v.mediaContainer }),
};
return remap$(v, {
mediaContainer: "MediaContainer",
});
});
}
@@ -770,12 +537,11 @@ export namespace GetRecentlyAddedResponse$ {
object: z.lazy(() => GetRecentlyAddedResponseBody$.inboundSchema).optional(),
})
.transform((v) => {
return {
contentType: v.ContentType,
statusCode: v.StatusCode,
rawResponse: v.RawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
@@ -795,11 +561,10 @@ export namespace GetRecentlyAddedResponse$ {
object: z.lazy(() => GetRecentlyAddedResponseBody$.outboundSchema).optional(),
})
.transform((v) => {
return {
ContentType: v.contentType,
StatusCode: v.statusCode,
RawResponse: v.rawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
/**
@@ -80,8 +81,8 @@ export namespace Upscale$ {
/** @internal */
export namespace GetResizedPhotoRequest$ {
export const inboundSchema: z.ZodType<GetResizedPhotoRequest, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<GetResizedPhotoRequest, z.ZodTypeDef, unknown> = z.object(
{
width: z.number(),
height: z.number(),
opacity: z.number().int().default(100),
@@ -89,18 +90,8 @@ export namespace GetResizedPhotoRequest$ {
minSize: MinSize$.inboundSchema,
upscale: Upscale$.inboundSchema,
url: z.string(),
})
.transform((v) => {
return {
width: v.width,
height: v.height,
opacity: v.opacity,
blur: v.blur,
minSize: v.minSize,
upscale: v.upscale,
url: v.url,
};
});
}
);
export type Outbound = {
width: number;
@@ -112,8 +103,8 @@ export namespace GetResizedPhotoRequest$ {
url: string;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetResizedPhotoRequest> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetResizedPhotoRequest> =
z.object({
width: z.number(),
height: z.number(),
opacity: z.number().int().default(100),
@@ -121,17 +112,6 @@ export namespace GetResizedPhotoRequest$ {
minSize: MinSize$.outboundSchema,
upscale: Upscale$.outboundSchema,
url: z.string(),
})
.transform((v) => {
return {
width: v.width,
height: v.height,
opacity: v.opacity,
blur: v.blur,
minSize: v.minSize,
upscale: v.upscale,
url: v.url,
};
});
}
@@ -144,11 +124,11 @@ export namespace GetResizedPhotoResponse$ {
RawResponse: z.instanceof(Response),
})
.transform((v) => {
return {
contentType: v.ContentType,
statusCode: v.StatusCode,
rawResponse: v.RawResponse,
};
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
@@ -166,10 +146,10 @@ export namespace GetResizedPhotoResponse$ {
}),
})
.transform((v) => {
return {
ContentType: v.contentType,
StatusCode: v.statusCode,
RawResponse: v.rawResponse,
};
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}

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