Normalized imports, regenerated

This commit is contained in:
Luke Hagar
2024-09-08 03:06:14 +00:00
parent 4d8ee6c199
commit 244adab882
1008 changed files with 21410 additions and 19981 deletions

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type AddPlaylistContentsErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type AddPlaylistContentsResponseBodyData = {
errors?: Array<AddPlaylistContentsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class AddPlaylistContentsResponseBody extends Error {
errors?: Array<AddPlaylistContentsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: AddPlaylistContentsResponseBodyData;
constructor(err: AddPlaylistContentsResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "AddPlaylistContentsResponseBody";
}
}
/** @internal */
export const AddPlaylistContentsErrors$inboundSchema: z.ZodType<
AddPlaylistContentsErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type AddPlaylistContentsErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const AddPlaylistContentsErrors$outboundSchema: z.ZodType<
AddPlaylistContentsErrors$Outbound,
z.ZodTypeDef,
AddPlaylistContentsErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace AddPlaylistContentsErrors$ {
/** @deprecated use `AddPlaylistContentsErrors$inboundSchema` instead. */
export const inboundSchema = AddPlaylistContentsErrors$inboundSchema;
/** @deprecated use `AddPlaylistContentsErrors$outboundSchema` instead. */
export const outboundSchema = AddPlaylistContentsErrors$outboundSchema;
/** @deprecated use `AddPlaylistContentsErrors$Outbound` instead. */
export type Outbound = AddPlaylistContentsErrors$Outbound;
}
/** @internal */
export const AddPlaylistContentsResponseBody$inboundSchema: z.ZodType<
AddPlaylistContentsResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => AddPlaylistContentsErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new AddPlaylistContentsResponseBody(remapped);
});
/** @internal */
export type AddPlaylistContentsResponseBody$Outbound = {
errors?: Array<AddPlaylistContentsErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const AddPlaylistContentsResponseBody$outboundSchema: z.ZodType<
AddPlaylistContentsResponseBody$Outbound,
z.ZodTypeDef,
AddPlaylistContentsResponseBody
> = z
.instanceof(AddPlaylistContentsResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => AddPlaylistContentsErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace AddPlaylistContentsResponseBody$ {
/** @deprecated use `AddPlaylistContentsResponseBody$inboundSchema` instead. */
export const inboundSchema = AddPlaylistContentsResponseBody$inboundSchema;
/** @deprecated use `AddPlaylistContentsResponseBody$outboundSchema` instead. */
export const outboundSchema = AddPlaylistContentsResponseBody$outboundSchema;
/** @deprecated use `AddPlaylistContentsResponseBody$Outbound` instead. */
export type Outbound = AddPlaylistContentsResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type ApplyUpdatesErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type ApplyUpdatesResponseBodyData = {
errors?: Array<ApplyUpdatesErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class ApplyUpdatesResponseBody extends Error {
errors?: Array<ApplyUpdatesErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: ApplyUpdatesResponseBodyData;
constructor(err: ApplyUpdatesResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "ApplyUpdatesResponseBody";
}
}
/** @internal */
export const ApplyUpdatesErrors$inboundSchema: z.ZodType<
ApplyUpdatesErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type ApplyUpdatesErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const ApplyUpdatesErrors$outboundSchema: z.ZodType<
ApplyUpdatesErrors$Outbound,
z.ZodTypeDef,
ApplyUpdatesErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace ApplyUpdatesErrors$ {
/** @deprecated use `ApplyUpdatesErrors$inboundSchema` instead. */
export const inboundSchema = ApplyUpdatesErrors$inboundSchema;
/** @deprecated use `ApplyUpdatesErrors$outboundSchema` instead. */
export const outboundSchema = ApplyUpdatesErrors$outboundSchema;
/** @deprecated use `ApplyUpdatesErrors$Outbound` instead. */
export type Outbound = ApplyUpdatesErrors$Outbound;
}
/** @internal */
export const ApplyUpdatesResponseBody$inboundSchema: z.ZodType<
ApplyUpdatesResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => ApplyUpdatesErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new ApplyUpdatesResponseBody(remapped);
});
/** @internal */
export type ApplyUpdatesResponseBody$Outbound = {
errors?: Array<ApplyUpdatesErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const ApplyUpdatesResponseBody$outboundSchema: z.ZodType<
ApplyUpdatesResponseBody$Outbound,
z.ZodTypeDef,
ApplyUpdatesResponseBody
> = z
.instanceof(ApplyUpdatesResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => ApplyUpdatesErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace ApplyUpdatesResponseBody$ {
/** @deprecated use `ApplyUpdatesResponseBody$inboundSchema` instead. */
export const inboundSchema = ApplyUpdatesResponseBody$inboundSchema;
/** @deprecated use `ApplyUpdatesResponseBody$outboundSchema` instead. */
export const outboundSchema = ApplyUpdatesResponseBody$outboundSchema;
/** @deprecated use `ApplyUpdatesResponseBody$Outbound` instead. */
export type Outbound = ApplyUpdatesResponseBody$Outbound;
}

View File

@@ -0,0 +1,162 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type CancelServerActivitiesErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type CancelServerActivitiesResponseBodyData = {
errors?: Array<CancelServerActivitiesErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class CancelServerActivitiesResponseBody extends Error {
errors?: Array<CancelServerActivitiesErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: CancelServerActivitiesResponseBodyData;
constructor(err: CancelServerActivitiesResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "CancelServerActivitiesResponseBody";
}
}
/** @internal */
export const CancelServerActivitiesErrors$inboundSchema: z.ZodType<
CancelServerActivitiesErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type CancelServerActivitiesErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const CancelServerActivitiesErrors$outboundSchema: z.ZodType<
CancelServerActivitiesErrors$Outbound,
z.ZodTypeDef,
CancelServerActivitiesErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace CancelServerActivitiesErrors$ {
/** @deprecated use `CancelServerActivitiesErrors$inboundSchema` instead. */
export const inboundSchema = CancelServerActivitiesErrors$inboundSchema;
/** @deprecated use `CancelServerActivitiesErrors$outboundSchema` instead. */
export const outboundSchema = CancelServerActivitiesErrors$outboundSchema;
/** @deprecated use `CancelServerActivitiesErrors$Outbound` instead. */
export type Outbound = CancelServerActivitiesErrors$Outbound;
}
/** @internal */
export const CancelServerActivitiesResponseBody$inboundSchema: z.ZodType<
CancelServerActivitiesResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => CancelServerActivitiesErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new CancelServerActivitiesResponseBody(remapped);
});
/** @internal */
export type CancelServerActivitiesResponseBody$Outbound = {
errors?: Array<CancelServerActivitiesErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const CancelServerActivitiesResponseBody$outboundSchema: z.ZodType<
CancelServerActivitiesResponseBody$Outbound,
z.ZodTypeDef,
CancelServerActivitiesResponseBody
> = z
.instanceof(CancelServerActivitiesResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z
.array(z.lazy(() => CancelServerActivitiesErrors$outboundSchema))
.optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace CancelServerActivitiesResponseBody$ {
/** @deprecated use `CancelServerActivitiesResponseBody$inboundSchema` instead. */
export const inboundSchema = CancelServerActivitiesResponseBody$inboundSchema;
/** @deprecated use `CancelServerActivitiesResponseBody$outboundSchema` instead. */
export const outboundSchema = CancelServerActivitiesResponseBody$outboundSchema;
/** @deprecated use `CancelServerActivitiesResponseBody$Outbound` instead. */
export type Outbound = CancelServerActivitiesResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type CheckForUpdatesErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type CheckForUpdatesResponseBodyData = {
errors?: Array<CheckForUpdatesErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class CheckForUpdatesResponseBody extends Error {
errors?: Array<CheckForUpdatesErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: CheckForUpdatesResponseBodyData;
constructor(err: CheckForUpdatesResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "CheckForUpdatesResponseBody";
}
}
/** @internal */
export const CheckForUpdatesErrors$inboundSchema: z.ZodType<
CheckForUpdatesErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type CheckForUpdatesErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const CheckForUpdatesErrors$outboundSchema: z.ZodType<
CheckForUpdatesErrors$Outbound,
z.ZodTypeDef,
CheckForUpdatesErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace CheckForUpdatesErrors$ {
/** @deprecated use `CheckForUpdatesErrors$inboundSchema` instead. */
export const inboundSchema = CheckForUpdatesErrors$inboundSchema;
/** @deprecated use `CheckForUpdatesErrors$outboundSchema` instead. */
export const outboundSchema = CheckForUpdatesErrors$outboundSchema;
/** @deprecated use `CheckForUpdatesErrors$Outbound` instead. */
export type Outbound = CheckForUpdatesErrors$Outbound;
}
/** @internal */
export const CheckForUpdatesResponseBody$inboundSchema: z.ZodType<
CheckForUpdatesResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => CheckForUpdatesErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new CheckForUpdatesResponseBody(remapped);
});
/** @internal */
export type CheckForUpdatesResponseBody$Outbound = {
errors?: Array<CheckForUpdatesErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const CheckForUpdatesResponseBody$outboundSchema: z.ZodType<
CheckForUpdatesResponseBody$Outbound,
z.ZodTypeDef,
CheckForUpdatesResponseBody
> = z
.instanceof(CheckForUpdatesResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => CheckForUpdatesErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace CheckForUpdatesResponseBody$ {
/** @deprecated use `CheckForUpdatesResponseBody$inboundSchema` instead. */
export const inboundSchema = CheckForUpdatesResponseBody$inboundSchema;
/** @deprecated use `CheckForUpdatesResponseBody$outboundSchema` instead. */
export const outboundSchema = CheckForUpdatesResponseBody$outboundSchema;
/** @deprecated use `CheckForUpdatesResponseBody$Outbound` instead. */
export type Outbound = CheckForUpdatesResponseBody$Outbound;
}

View File

@@ -0,0 +1,162 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type ClearPlaylistContentsErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type ClearPlaylistContentsResponseBodyData = {
errors?: Array<ClearPlaylistContentsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class ClearPlaylistContentsResponseBody extends Error {
errors?: Array<ClearPlaylistContentsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: ClearPlaylistContentsResponseBodyData;
constructor(err: ClearPlaylistContentsResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "ClearPlaylistContentsResponseBody";
}
}
/** @internal */
export const ClearPlaylistContentsErrors$inboundSchema: z.ZodType<
ClearPlaylistContentsErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type ClearPlaylistContentsErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const ClearPlaylistContentsErrors$outboundSchema: z.ZodType<
ClearPlaylistContentsErrors$Outbound,
z.ZodTypeDef,
ClearPlaylistContentsErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace ClearPlaylistContentsErrors$ {
/** @deprecated use `ClearPlaylistContentsErrors$inboundSchema` instead. */
export const inboundSchema = ClearPlaylistContentsErrors$inboundSchema;
/** @deprecated use `ClearPlaylistContentsErrors$outboundSchema` instead. */
export const outboundSchema = ClearPlaylistContentsErrors$outboundSchema;
/** @deprecated use `ClearPlaylistContentsErrors$Outbound` instead. */
export type Outbound = ClearPlaylistContentsErrors$Outbound;
}
/** @internal */
export const ClearPlaylistContentsResponseBody$inboundSchema: z.ZodType<
ClearPlaylistContentsResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => ClearPlaylistContentsErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new ClearPlaylistContentsResponseBody(remapped);
});
/** @internal */
export type ClearPlaylistContentsResponseBody$Outbound = {
errors?: Array<ClearPlaylistContentsErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const ClearPlaylistContentsResponseBody$outboundSchema: z.ZodType<
ClearPlaylistContentsResponseBody$Outbound,
z.ZodTypeDef,
ClearPlaylistContentsResponseBody
> = z
.instanceof(ClearPlaylistContentsResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z
.array(z.lazy(() => ClearPlaylistContentsErrors$outboundSchema))
.optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace ClearPlaylistContentsResponseBody$ {
/** @deprecated use `ClearPlaylistContentsResponseBody$inboundSchema` instead. */
export const inboundSchema = ClearPlaylistContentsResponseBody$inboundSchema;
/** @deprecated use `ClearPlaylistContentsResponseBody$outboundSchema` instead. */
export const outboundSchema = ClearPlaylistContentsResponseBody$outboundSchema;
/** @deprecated use `ClearPlaylistContentsResponseBody$Outbound` instead. */
export type Outbound = ClearPlaylistContentsResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type CreatePlaylistErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type CreatePlaylistResponseBodyData = {
errors?: Array<CreatePlaylistErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class CreatePlaylistResponseBody extends Error {
errors?: Array<CreatePlaylistErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: CreatePlaylistResponseBodyData;
constructor(err: CreatePlaylistResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "CreatePlaylistResponseBody";
}
}
/** @internal */
export const CreatePlaylistErrors$inboundSchema: z.ZodType<
CreatePlaylistErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type CreatePlaylistErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const CreatePlaylistErrors$outboundSchema: z.ZodType<
CreatePlaylistErrors$Outbound,
z.ZodTypeDef,
CreatePlaylistErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace CreatePlaylistErrors$ {
/** @deprecated use `CreatePlaylistErrors$inboundSchema` instead. */
export const inboundSchema = CreatePlaylistErrors$inboundSchema;
/** @deprecated use `CreatePlaylistErrors$outboundSchema` instead. */
export const outboundSchema = CreatePlaylistErrors$outboundSchema;
/** @deprecated use `CreatePlaylistErrors$Outbound` instead. */
export type Outbound = CreatePlaylistErrors$Outbound;
}
/** @internal */
export const CreatePlaylistResponseBody$inboundSchema: z.ZodType<
CreatePlaylistResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => CreatePlaylistErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new CreatePlaylistResponseBody(remapped);
});
/** @internal */
export type CreatePlaylistResponseBody$Outbound = {
errors?: Array<CreatePlaylistErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const CreatePlaylistResponseBody$outboundSchema: z.ZodType<
CreatePlaylistResponseBody$Outbound,
z.ZodTypeDef,
CreatePlaylistResponseBody
> = z
.instanceof(CreatePlaylistResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => CreatePlaylistErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace CreatePlaylistResponseBody$ {
/** @deprecated use `CreatePlaylistResponseBody$inboundSchema` instead. */
export const inboundSchema = CreatePlaylistResponseBody$inboundSchema;
/** @deprecated use `CreatePlaylistResponseBody$outboundSchema` instead. */
export const outboundSchema = CreatePlaylistResponseBody$outboundSchema;
/** @deprecated use `CreatePlaylistResponseBody$Outbound` instead. */
export type Outbound = CreatePlaylistResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type DeleteLibraryErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type DeleteLibraryResponseBodyData = {
errors?: Array<DeleteLibraryErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class DeleteLibraryResponseBody extends Error {
errors?: Array<DeleteLibraryErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: DeleteLibraryResponseBodyData;
constructor(err: DeleteLibraryResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "DeleteLibraryResponseBody";
}
}
/** @internal */
export const DeleteLibraryErrors$inboundSchema: z.ZodType<
DeleteLibraryErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type DeleteLibraryErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const DeleteLibraryErrors$outboundSchema: z.ZodType<
DeleteLibraryErrors$Outbound,
z.ZodTypeDef,
DeleteLibraryErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace DeleteLibraryErrors$ {
/** @deprecated use `DeleteLibraryErrors$inboundSchema` instead. */
export const inboundSchema = DeleteLibraryErrors$inboundSchema;
/** @deprecated use `DeleteLibraryErrors$outboundSchema` instead. */
export const outboundSchema = DeleteLibraryErrors$outboundSchema;
/** @deprecated use `DeleteLibraryErrors$Outbound` instead. */
export type Outbound = DeleteLibraryErrors$Outbound;
}
/** @internal */
export const DeleteLibraryResponseBody$inboundSchema: z.ZodType<
DeleteLibraryResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => DeleteLibraryErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new DeleteLibraryResponseBody(remapped);
});
/** @internal */
export type DeleteLibraryResponseBody$Outbound = {
errors?: Array<DeleteLibraryErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const DeleteLibraryResponseBody$outboundSchema: z.ZodType<
DeleteLibraryResponseBody$Outbound,
z.ZodTypeDef,
DeleteLibraryResponseBody
> = z
.instanceof(DeleteLibraryResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => DeleteLibraryErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace DeleteLibraryResponseBody$ {
/** @deprecated use `DeleteLibraryResponseBody$inboundSchema` instead. */
export const inboundSchema = DeleteLibraryResponseBody$inboundSchema;
/** @deprecated use `DeleteLibraryResponseBody$outboundSchema` instead. */
export const outboundSchema = DeleteLibraryResponseBody$outboundSchema;
/** @deprecated use `DeleteLibraryResponseBody$Outbound` instead. */
export type Outbound = DeleteLibraryResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type DeletePlaylistErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type DeletePlaylistResponseBodyData = {
errors?: Array<DeletePlaylistErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class DeletePlaylistResponseBody extends Error {
errors?: Array<DeletePlaylistErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: DeletePlaylistResponseBodyData;
constructor(err: DeletePlaylistResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "DeletePlaylistResponseBody";
}
}
/** @internal */
export const DeletePlaylistErrors$inboundSchema: z.ZodType<
DeletePlaylistErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type DeletePlaylistErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const DeletePlaylistErrors$outboundSchema: z.ZodType<
DeletePlaylistErrors$Outbound,
z.ZodTypeDef,
DeletePlaylistErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace DeletePlaylistErrors$ {
/** @deprecated use `DeletePlaylistErrors$inboundSchema` instead. */
export const inboundSchema = DeletePlaylistErrors$inboundSchema;
/** @deprecated use `DeletePlaylistErrors$outboundSchema` instead. */
export const outboundSchema = DeletePlaylistErrors$outboundSchema;
/** @deprecated use `DeletePlaylistErrors$Outbound` instead. */
export type Outbound = DeletePlaylistErrors$Outbound;
}
/** @internal */
export const DeletePlaylistResponseBody$inboundSchema: z.ZodType<
DeletePlaylistResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => DeletePlaylistErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new DeletePlaylistResponseBody(remapped);
});
/** @internal */
export type DeletePlaylistResponseBody$Outbound = {
errors?: Array<DeletePlaylistErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const DeletePlaylistResponseBody$outboundSchema: z.ZodType<
DeletePlaylistResponseBody$Outbound,
z.ZodTypeDef,
DeletePlaylistResponseBody
> = z
.instanceof(DeletePlaylistResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => DeletePlaylistErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace DeletePlaylistResponseBody$ {
/** @deprecated use `DeletePlaylistResponseBody$inboundSchema` instead. */
export const inboundSchema = DeletePlaylistResponseBody$inboundSchema;
/** @deprecated use `DeletePlaylistResponseBody$outboundSchema` instead. */
export const outboundSchema = DeletePlaylistResponseBody$outboundSchema;
/** @deprecated use `DeletePlaylistResponseBody$Outbound` instead. */
export type Outbound = DeletePlaylistResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type EnablePaperTrailErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type EnablePaperTrailResponseBodyData = {
errors?: Array<EnablePaperTrailErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class EnablePaperTrailResponseBody extends Error {
errors?: Array<EnablePaperTrailErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: EnablePaperTrailResponseBodyData;
constructor(err: EnablePaperTrailResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "EnablePaperTrailResponseBody";
}
}
/** @internal */
export const EnablePaperTrailErrors$inboundSchema: z.ZodType<
EnablePaperTrailErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type EnablePaperTrailErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const EnablePaperTrailErrors$outboundSchema: z.ZodType<
EnablePaperTrailErrors$Outbound,
z.ZodTypeDef,
EnablePaperTrailErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace EnablePaperTrailErrors$ {
/** @deprecated use `EnablePaperTrailErrors$inboundSchema` instead. */
export const inboundSchema = EnablePaperTrailErrors$inboundSchema;
/** @deprecated use `EnablePaperTrailErrors$outboundSchema` instead. */
export const outboundSchema = EnablePaperTrailErrors$outboundSchema;
/** @deprecated use `EnablePaperTrailErrors$Outbound` instead. */
export type Outbound = EnablePaperTrailErrors$Outbound;
}
/** @internal */
export const EnablePaperTrailResponseBody$inboundSchema: z.ZodType<
EnablePaperTrailResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => EnablePaperTrailErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new EnablePaperTrailResponseBody(remapped);
});
/** @internal */
export type EnablePaperTrailResponseBody$Outbound = {
errors?: Array<EnablePaperTrailErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const EnablePaperTrailResponseBody$outboundSchema: z.ZodType<
EnablePaperTrailResponseBody$Outbound,
z.ZodTypeDef,
EnablePaperTrailResponseBody
> = z
.instanceof(EnablePaperTrailResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => EnablePaperTrailErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace EnablePaperTrailResponseBody$ {
/** @deprecated use `EnablePaperTrailResponseBody$inboundSchema` instead. */
export const inboundSchema = EnablePaperTrailResponseBody$inboundSchema;
/** @deprecated use `EnablePaperTrailResponseBody$outboundSchema` instead. */
export const outboundSchema = EnablePaperTrailResponseBody$outboundSchema;
/** @deprecated use `EnablePaperTrailResponseBody$Outbound` instead. */
export type Outbound = EnablePaperTrailResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetAllLibrariesErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetAllLibrariesResponseBodyData = {
errors?: Array<GetAllLibrariesErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetAllLibrariesResponseBody extends Error {
errors?: Array<GetAllLibrariesErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetAllLibrariesResponseBodyData;
constructor(err: GetAllLibrariesResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetAllLibrariesResponseBody";
}
}
/** @internal */
export const GetAllLibrariesErrors$inboundSchema: z.ZodType<
GetAllLibrariesErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetAllLibrariesErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetAllLibrariesErrors$outboundSchema: z.ZodType<
GetAllLibrariesErrors$Outbound,
z.ZodTypeDef,
GetAllLibrariesErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetAllLibrariesErrors$ {
/** @deprecated use `GetAllLibrariesErrors$inboundSchema` instead. */
export const inboundSchema = GetAllLibrariesErrors$inboundSchema;
/** @deprecated use `GetAllLibrariesErrors$outboundSchema` instead. */
export const outboundSchema = GetAllLibrariesErrors$outboundSchema;
/** @deprecated use `GetAllLibrariesErrors$Outbound` instead. */
export type Outbound = GetAllLibrariesErrors$Outbound;
}
/** @internal */
export const GetAllLibrariesResponseBody$inboundSchema: z.ZodType<
GetAllLibrariesResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetAllLibrariesErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetAllLibrariesResponseBody(remapped);
});
/** @internal */
export type GetAllLibrariesResponseBody$Outbound = {
errors?: Array<GetAllLibrariesErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetAllLibrariesResponseBody$outboundSchema: z.ZodType<
GetAllLibrariesResponseBody$Outbound,
z.ZodTypeDef,
GetAllLibrariesResponseBody
> = z
.instanceof(GetAllLibrariesResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetAllLibrariesErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetAllLibrariesResponseBody$ {
/** @deprecated use `GetAllLibrariesResponseBody$inboundSchema` instead. */
export const inboundSchema = GetAllLibrariesResponseBody$inboundSchema;
/** @deprecated use `GetAllLibrariesResponseBody$outboundSchema` instead. */
export const outboundSchema = GetAllLibrariesResponseBody$outboundSchema;
/** @deprecated use `GetAllLibrariesResponseBody$Outbound` instead. */
export type Outbound = GetAllLibrariesResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetAvailableClientsErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetAvailableClientsResponseBodyData = {
errors?: Array<GetAvailableClientsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetAvailableClientsResponseBody extends Error {
errors?: Array<GetAvailableClientsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetAvailableClientsResponseBodyData;
constructor(err: GetAvailableClientsResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetAvailableClientsResponseBody";
}
}
/** @internal */
export const GetAvailableClientsErrors$inboundSchema: z.ZodType<
GetAvailableClientsErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetAvailableClientsErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetAvailableClientsErrors$outboundSchema: z.ZodType<
GetAvailableClientsErrors$Outbound,
z.ZodTypeDef,
GetAvailableClientsErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetAvailableClientsErrors$ {
/** @deprecated use `GetAvailableClientsErrors$inboundSchema` instead. */
export const inboundSchema = GetAvailableClientsErrors$inboundSchema;
/** @deprecated use `GetAvailableClientsErrors$outboundSchema` instead. */
export const outboundSchema = GetAvailableClientsErrors$outboundSchema;
/** @deprecated use `GetAvailableClientsErrors$Outbound` instead. */
export type Outbound = GetAvailableClientsErrors$Outbound;
}
/** @internal */
export const GetAvailableClientsResponseBody$inboundSchema: z.ZodType<
GetAvailableClientsResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetAvailableClientsErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetAvailableClientsResponseBody(remapped);
});
/** @internal */
export type GetAvailableClientsResponseBody$Outbound = {
errors?: Array<GetAvailableClientsErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetAvailableClientsResponseBody$outboundSchema: z.ZodType<
GetAvailableClientsResponseBody$Outbound,
z.ZodTypeDef,
GetAvailableClientsResponseBody
> = z
.instanceof(GetAvailableClientsResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetAvailableClientsErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetAvailableClientsResponseBody$ {
/** @deprecated use `GetAvailableClientsResponseBody$inboundSchema` instead. */
export const inboundSchema = GetAvailableClientsResponseBody$inboundSchema;
/** @deprecated use `GetAvailableClientsResponseBody$outboundSchema` instead. */
export const outboundSchema = GetAvailableClientsResponseBody$outboundSchema;
/** @deprecated use `GetAvailableClientsResponseBody$Outbound` instead. */
export type Outbound = GetAvailableClientsResponseBody$Outbound;
}

View File

@@ -0,0 +1,162 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetBandwidthStatisticsErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetBandwidthStatisticsResponseBodyData = {
errors?: Array<GetBandwidthStatisticsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetBandwidthStatisticsResponseBody extends Error {
errors?: Array<GetBandwidthStatisticsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetBandwidthStatisticsResponseBodyData;
constructor(err: GetBandwidthStatisticsResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetBandwidthStatisticsResponseBody";
}
}
/** @internal */
export const GetBandwidthStatisticsErrors$inboundSchema: z.ZodType<
GetBandwidthStatisticsErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetBandwidthStatisticsErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetBandwidthStatisticsErrors$outboundSchema: z.ZodType<
GetBandwidthStatisticsErrors$Outbound,
z.ZodTypeDef,
GetBandwidthStatisticsErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetBandwidthStatisticsErrors$ {
/** @deprecated use `GetBandwidthStatisticsErrors$inboundSchema` instead. */
export const inboundSchema = GetBandwidthStatisticsErrors$inboundSchema;
/** @deprecated use `GetBandwidthStatisticsErrors$outboundSchema` instead. */
export const outboundSchema = GetBandwidthStatisticsErrors$outboundSchema;
/** @deprecated use `GetBandwidthStatisticsErrors$Outbound` instead. */
export type Outbound = GetBandwidthStatisticsErrors$Outbound;
}
/** @internal */
export const GetBandwidthStatisticsResponseBody$inboundSchema: z.ZodType<
GetBandwidthStatisticsResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetBandwidthStatisticsErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetBandwidthStatisticsResponseBody(remapped);
});
/** @internal */
export type GetBandwidthStatisticsResponseBody$Outbound = {
errors?: Array<GetBandwidthStatisticsErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetBandwidthStatisticsResponseBody$outboundSchema: z.ZodType<
GetBandwidthStatisticsResponseBody$Outbound,
z.ZodTypeDef,
GetBandwidthStatisticsResponseBody
> = z
.instanceof(GetBandwidthStatisticsResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z
.array(z.lazy(() => GetBandwidthStatisticsErrors$outboundSchema))
.optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetBandwidthStatisticsResponseBody$ {
/** @deprecated use `GetBandwidthStatisticsResponseBody$inboundSchema` instead. */
export const inboundSchema = GetBandwidthStatisticsResponseBody$inboundSchema;
/** @deprecated use `GetBandwidthStatisticsResponseBody$outboundSchema` instead. */
export const outboundSchema = GetBandwidthStatisticsResponseBody$outboundSchema;
/** @deprecated use `GetBandwidthStatisticsResponseBody$Outbound` instead. */
export type Outbound = GetBandwidthStatisticsResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetBannerImageErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetBannerImageResponseBodyData = {
errors?: Array<GetBannerImageErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetBannerImageResponseBody extends Error {
errors?: Array<GetBannerImageErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetBannerImageResponseBodyData;
constructor(err: GetBannerImageResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetBannerImageResponseBody";
}
}
/** @internal */
export const GetBannerImageErrors$inboundSchema: z.ZodType<
GetBannerImageErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetBannerImageErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetBannerImageErrors$outboundSchema: z.ZodType<
GetBannerImageErrors$Outbound,
z.ZodTypeDef,
GetBannerImageErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetBannerImageErrors$ {
/** @deprecated use `GetBannerImageErrors$inboundSchema` instead. */
export const inboundSchema = GetBannerImageErrors$inboundSchema;
/** @deprecated use `GetBannerImageErrors$outboundSchema` instead. */
export const outboundSchema = GetBannerImageErrors$outboundSchema;
/** @deprecated use `GetBannerImageErrors$Outbound` instead. */
export type Outbound = GetBannerImageErrors$Outbound;
}
/** @internal */
export const GetBannerImageResponseBody$inboundSchema: z.ZodType<
GetBannerImageResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetBannerImageErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetBannerImageResponseBody(remapped);
});
/** @internal */
export type GetBannerImageResponseBody$Outbound = {
errors?: Array<GetBannerImageErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetBannerImageResponseBody$outboundSchema: z.ZodType<
GetBannerImageResponseBody$Outbound,
z.ZodTypeDef,
GetBannerImageResponseBody
> = z
.instanceof(GetBannerImageResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetBannerImageErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetBannerImageResponseBody$ {
/** @deprecated use `GetBannerImageResponseBody$inboundSchema` instead. */
export const inboundSchema = GetBannerImageResponseBody$inboundSchema;
/** @deprecated use `GetBannerImageResponseBody$outboundSchema` instead. */
export const outboundSchema = GetBannerImageResponseBody$outboundSchema;
/** @deprecated use `GetBannerImageResponseBody$Outbound` instead. */
export type Outbound = GetBannerImageResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetButlerTasksErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetButlerTasksResponseBodyData = {
errors?: Array<GetButlerTasksErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetButlerTasksResponseBody extends Error {
errors?: Array<GetButlerTasksErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetButlerTasksResponseBodyData;
constructor(err: GetButlerTasksResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetButlerTasksResponseBody";
}
}
/** @internal */
export const GetButlerTasksErrors$inboundSchema: z.ZodType<
GetButlerTasksErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetButlerTasksErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetButlerTasksErrors$outboundSchema: z.ZodType<
GetButlerTasksErrors$Outbound,
z.ZodTypeDef,
GetButlerTasksErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetButlerTasksErrors$ {
/** @deprecated use `GetButlerTasksErrors$inboundSchema` instead. */
export const inboundSchema = GetButlerTasksErrors$inboundSchema;
/** @deprecated use `GetButlerTasksErrors$outboundSchema` instead. */
export const outboundSchema = GetButlerTasksErrors$outboundSchema;
/** @deprecated use `GetButlerTasksErrors$Outbound` instead. */
export type Outbound = GetButlerTasksErrors$Outbound;
}
/** @internal */
export const GetButlerTasksResponseBody$inboundSchema: z.ZodType<
GetButlerTasksResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetButlerTasksErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetButlerTasksResponseBody(remapped);
});
/** @internal */
export type GetButlerTasksResponseBody$Outbound = {
errors?: Array<GetButlerTasksErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetButlerTasksResponseBody$outboundSchema: z.ZodType<
GetButlerTasksResponseBody$Outbound,
z.ZodTypeDef,
GetButlerTasksResponseBody
> = z
.instanceof(GetButlerTasksResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetButlerTasksErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetButlerTasksResponseBody$ {
/** @deprecated use `GetButlerTasksResponseBody$inboundSchema` instead. */
export const inboundSchema = GetButlerTasksResponseBody$inboundSchema;
/** @deprecated use `GetButlerTasksResponseBody$outboundSchema` instead. */
export const outboundSchema = GetButlerTasksResponseBody$outboundSchema;
/** @deprecated use `GetButlerTasksResponseBody$Outbound` instead. */
export type Outbound = GetButlerTasksResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetCompanionsDataErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetCompanionsDataResponseBodyData = {
errors?: Array<GetCompanionsDataErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetCompanionsDataResponseBody extends Error {
errors?: Array<GetCompanionsDataErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetCompanionsDataResponseBodyData;
constructor(err: GetCompanionsDataResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetCompanionsDataResponseBody";
}
}
/** @internal */
export const GetCompanionsDataErrors$inboundSchema: z.ZodType<
GetCompanionsDataErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetCompanionsDataErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetCompanionsDataErrors$outboundSchema: z.ZodType<
GetCompanionsDataErrors$Outbound,
z.ZodTypeDef,
GetCompanionsDataErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetCompanionsDataErrors$ {
/** @deprecated use `GetCompanionsDataErrors$inboundSchema` instead. */
export const inboundSchema = GetCompanionsDataErrors$inboundSchema;
/** @deprecated use `GetCompanionsDataErrors$outboundSchema` instead. */
export const outboundSchema = GetCompanionsDataErrors$outboundSchema;
/** @deprecated use `GetCompanionsDataErrors$Outbound` instead. */
export type Outbound = GetCompanionsDataErrors$Outbound;
}
/** @internal */
export const GetCompanionsDataResponseBody$inboundSchema: z.ZodType<
GetCompanionsDataResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetCompanionsDataErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetCompanionsDataResponseBody(remapped);
});
/** @internal */
export type GetCompanionsDataResponseBody$Outbound = {
errors?: Array<GetCompanionsDataErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetCompanionsDataResponseBody$outboundSchema: z.ZodType<
GetCompanionsDataResponseBody$Outbound,
z.ZodTypeDef,
GetCompanionsDataResponseBody
> = z
.instanceof(GetCompanionsDataResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetCompanionsDataErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetCompanionsDataResponseBody$ {
/** @deprecated use `GetCompanionsDataResponseBody$inboundSchema` instead. */
export const inboundSchema = GetCompanionsDataResponseBody$inboundSchema;
/** @deprecated use `GetCompanionsDataResponseBody$outboundSchema` instead. */
export const outboundSchema = GetCompanionsDataResponseBody$outboundSchema;
/** @deprecated use `GetCompanionsDataResponseBody$Outbound` instead. */
export type Outbound = GetCompanionsDataResponseBody$Outbound;
}

View File

@@ -0,0 +1,157 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetDevicesErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetDevicesResponseBodyData = {
errors?: Array<GetDevicesErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetDevicesResponseBody extends Error {
errors?: Array<GetDevicesErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetDevicesResponseBodyData;
constructor(err: GetDevicesResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetDevicesResponseBody";
}
}
/** @internal */
export const GetDevicesErrors$inboundSchema: z.ZodType<GetDevicesErrors, z.ZodTypeDef, unknown> =
z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetDevicesErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetDevicesErrors$outboundSchema: z.ZodType<
GetDevicesErrors$Outbound,
z.ZodTypeDef,
GetDevicesErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetDevicesErrors$ {
/** @deprecated use `GetDevicesErrors$inboundSchema` instead. */
export const inboundSchema = GetDevicesErrors$inboundSchema;
/** @deprecated use `GetDevicesErrors$outboundSchema` instead. */
export const outboundSchema = GetDevicesErrors$outboundSchema;
/** @deprecated use `GetDevicesErrors$Outbound` instead. */
export type Outbound = GetDevicesErrors$Outbound;
}
/** @internal */
export const GetDevicesResponseBody$inboundSchema: z.ZodType<
GetDevicesResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetDevicesErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetDevicesResponseBody(remapped);
});
/** @internal */
export type GetDevicesResponseBody$Outbound = {
errors?: Array<GetDevicesErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetDevicesResponseBody$outboundSchema: z.ZodType<
GetDevicesResponseBody$Outbound,
z.ZodTypeDef,
GetDevicesResponseBody
> = z
.instanceof(GetDevicesResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetDevicesErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetDevicesResponseBody$ {
/** @deprecated use `GetDevicesResponseBody$inboundSchema` instead. */
export const inboundSchema = GetDevicesResponseBody$inboundSchema;
/** @deprecated use `GetDevicesResponseBody$outboundSchema` instead. */
export const outboundSchema = GetDevicesResponseBody$outboundSchema;
/** @deprecated use `GetDevicesResponseBody$Outbound` instead. */
export type Outbound = GetDevicesResponseBody$Outbound;
}

View File

@@ -0,0 +1,157 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetFileHashErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetFileHashResponseBodyData = {
errors?: Array<GetFileHashErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetFileHashResponseBody extends Error {
errors?: Array<GetFileHashErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetFileHashResponseBodyData;
constructor(err: GetFileHashResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetFileHashResponseBody";
}
}
/** @internal */
export const GetFileHashErrors$inboundSchema: z.ZodType<GetFileHashErrors, z.ZodTypeDef, unknown> =
z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetFileHashErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetFileHashErrors$outboundSchema: z.ZodType<
GetFileHashErrors$Outbound,
z.ZodTypeDef,
GetFileHashErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetFileHashErrors$ {
/** @deprecated use `GetFileHashErrors$inboundSchema` instead. */
export const inboundSchema = GetFileHashErrors$inboundSchema;
/** @deprecated use `GetFileHashErrors$outboundSchema` instead. */
export const outboundSchema = GetFileHashErrors$outboundSchema;
/** @deprecated use `GetFileHashErrors$Outbound` instead. */
export type Outbound = GetFileHashErrors$Outbound;
}
/** @internal */
export const GetFileHashResponseBody$inboundSchema: z.ZodType<
GetFileHashResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetFileHashErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetFileHashResponseBody(remapped);
});
/** @internal */
export type GetFileHashResponseBody$Outbound = {
errors?: Array<GetFileHashErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetFileHashResponseBody$outboundSchema: z.ZodType<
GetFileHashResponseBody$Outbound,
z.ZodTypeDef,
GetFileHashResponseBody
> = z
.instanceof(GetFileHashResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetFileHashErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetFileHashResponseBody$ {
/** @deprecated use `GetFileHashResponseBody$inboundSchema` instead. */
export const inboundSchema = GetFileHashResponseBody$inboundSchema;
/** @deprecated use `GetFileHashResponseBody$outboundSchema` instead. */
export const outboundSchema = GetFileHashResponseBody$outboundSchema;
/** @deprecated use `GetFileHashResponseBody$Outbound` instead. */
export type Outbound = GetFileHashResponseBody$Outbound;
}

View File

@@ -0,0 +1,157 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetGeoDataErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetGeoDataResponseBodyData = {
errors?: Array<GetGeoDataErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetGeoDataResponseBody extends Error {
errors?: Array<GetGeoDataErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetGeoDataResponseBodyData;
constructor(err: GetGeoDataResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetGeoDataResponseBody";
}
}
/** @internal */
export const GetGeoDataErrors$inboundSchema: z.ZodType<GetGeoDataErrors, z.ZodTypeDef, unknown> =
z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetGeoDataErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetGeoDataErrors$outboundSchema: z.ZodType<
GetGeoDataErrors$Outbound,
z.ZodTypeDef,
GetGeoDataErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetGeoDataErrors$ {
/** @deprecated use `GetGeoDataErrors$inboundSchema` instead. */
export const inboundSchema = GetGeoDataErrors$inboundSchema;
/** @deprecated use `GetGeoDataErrors$outboundSchema` instead. */
export const outboundSchema = GetGeoDataErrors$outboundSchema;
/** @deprecated use `GetGeoDataErrors$Outbound` instead. */
export type Outbound = GetGeoDataErrors$Outbound;
}
/** @internal */
export const GetGeoDataResponseBody$inboundSchema: z.ZodType<
GetGeoDataResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetGeoDataErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetGeoDataResponseBody(remapped);
});
/** @internal */
export type GetGeoDataResponseBody$Outbound = {
errors?: Array<GetGeoDataErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetGeoDataResponseBody$outboundSchema: z.ZodType<
GetGeoDataResponseBody$Outbound,
z.ZodTypeDef,
GetGeoDataResponseBody
> = z
.instanceof(GetGeoDataResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetGeoDataErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetGeoDataResponseBody$ {
/** @deprecated use `GetGeoDataResponseBody$inboundSchema` instead. */
export const inboundSchema = GetGeoDataResponseBody$inboundSchema;
/** @deprecated use `GetGeoDataResponseBody$outboundSchema` instead. */
export const outboundSchema = GetGeoDataResponseBody$outboundSchema;
/** @deprecated use `GetGeoDataResponseBody$Outbound` instead. */
export type Outbound = GetGeoDataResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetGlobalHubsErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetGlobalHubsResponseBodyData = {
errors?: Array<GetGlobalHubsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetGlobalHubsResponseBody extends Error {
errors?: Array<GetGlobalHubsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetGlobalHubsResponseBodyData;
constructor(err: GetGlobalHubsResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetGlobalHubsResponseBody";
}
}
/** @internal */
export const GetGlobalHubsErrors$inboundSchema: z.ZodType<
GetGlobalHubsErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetGlobalHubsErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetGlobalHubsErrors$outboundSchema: z.ZodType<
GetGlobalHubsErrors$Outbound,
z.ZodTypeDef,
GetGlobalHubsErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetGlobalHubsErrors$ {
/** @deprecated use `GetGlobalHubsErrors$inboundSchema` instead. */
export const inboundSchema = GetGlobalHubsErrors$inboundSchema;
/** @deprecated use `GetGlobalHubsErrors$outboundSchema` instead. */
export const outboundSchema = GetGlobalHubsErrors$outboundSchema;
/** @deprecated use `GetGlobalHubsErrors$Outbound` instead. */
export type Outbound = GetGlobalHubsErrors$Outbound;
}
/** @internal */
export const GetGlobalHubsResponseBody$inboundSchema: z.ZodType<
GetGlobalHubsResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetGlobalHubsErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetGlobalHubsResponseBody(remapped);
});
/** @internal */
export type GetGlobalHubsResponseBody$Outbound = {
errors?: Array<GetGlobalHubsErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetGlobalHubsResponseBody$outboundSchema: z.ZodType<
GetGlobalHubsResponseBody$Outbound,
z.ZodTypeDef,
GetGlobalHubsResponseBody
> = z
.instanceof(GetGlobalHubsResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetGlobalHubsErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetGlobalHubsResponseBody$ {
/** @deprecated use `GetGlobalHubsResponseBody$inboundSchema` instead. */
export const inboundSchema = GetGlobalHubsResponseBody$inboundSchema;
/** @deprecated use `GetGlobalHubsResponseBody$outboundSchema` instead. */
export const outboundSchema = GetGlobalHubsResponseBody$outboundSchema;
/** @deprecated use `GetGlobalHubsResponseBody$Outbound` instead. */
export type Outbound = GetGlobalHubsResponseBody$Outbound;
}

View File

@@ -0,0 +1,157 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetHomeDataErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetHomeDataResponseBodyData = {
errors?: Array<GetHomeDataErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetHomeDataResponseBody extends Error {
errors?: Array<GetHomeDataErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetHomeDataResponseBodyData;
constructor(err: GetHomeDataResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetHomeDataResponseBody";
}
}
/** @internal */
export const GetHomeDataErrors$inboundSchema: z.ZodType<GetHomeDataErrors, z.ZodTypeDef, unknown> =
z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetHomeDataErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetHomeDataErrors$outboundSchema: z.ZodType<
GetHomeDataErrors$Outbound,
z.ZodTypeDef,
GetHomeDataErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetHomeDataErrors$ {
/** @deprecated use `GetHomeDataErrors$inboundSchema` instead. */
export const inboundSchema = GetHomeDataErrors$inboundSchema;
/** @deprecated use `GetHomeDataErrors$outboundSchema` instead. */
export const outboundSchema = GetHomeDataErrors$outboundSchema;
/** @deprecated use `GetHomeDataErrors$Outbound` instead. */
export type Outbound = GetHomeDataErrors$Outbound;
}
/** @internal */
export const GetHomeDataResponseBody$inboundSchema: z.ZodType<
GetHomeDataResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetHomeDataErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetHomeDataResponseBody(remapped);
});
/** @internal */
export type GetHomeDataResponseBody$Outbound = {
errors?: Array<GetHomeDataErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetHomeDataResponseBody$outboundSchema: z.ZodType<
GetHomeDataResponseBody$Outbound,
z.ZodTypeDef,
GetHomeDataResponseBody
> = z
.instanceof(GetHomeDataResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetHomeDataErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetHomeDataResponseBody$ {
/** @deprecated use `GetHomeDataResponseBody$inboundSchema` instead. */
export const inboundSchema = GetHomeDataResponseBody$inboundSchema;
/** @deprecated use `GetHomeDataResponseBody$outboundSchema` instead. */
export const outboundSchema = GetHomeDataResponseBody$outboundSchema;
/** @deprecated use `GetHomeDataResponseBody$Outbound` instead. */
export type Outbound = GetHomeDataResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetLibraryDetailsErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetLibraryDetailsResponseBodyData = {
errors?: Array<GetLibraryDetailsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetLibraryDetailsResponseBody extends Error {
errors?: Array<GetLibraryDetailsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetLibraryDetailsResponseBodyData;
constructor(err: GetLibraryDetailsResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetLibraryDetailsResponseBody";
}
}
/** @internal */
export const GetLibraryDetailsErrors$inboundSchema: z.ZodType<
GetLibraryDetailsErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetLibraryDetailsErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetLibraryDetailsErrors$outboundSchema: z.ZodType<
GetLibraryDetailsErrors$Outbound,
z.ZodTypeDef,
GetLibraryDetailsErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetLibraryDetailsErrors$ {
/** @deprecated use `GetLibraryDetailsErrors$inboundSchema` instead. */
export const inboundSchema = GetLibraryDetailsErrors$inboundSchema;
/** @deprecated use `GetLibraryDetailsErrors$outboundSchema` instead. */
export const outboundSchema = GetLibraryDetailsErrors$outboundSchema;
/** @deprecated use `GetLibraryDetailsErrors$Outbound` instead. */
export type Outbound = GetLibraryDetailsErrors$Outbound;
}
/** @internal */
export const GetLibraryDetailsResponseBody$inboundSchema: z.ZodType<
GetLibraryDetailsResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetLibraryDetailsErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetLibraryDetailsResponseBody(remapped);
});
/** @internal */
export type GetLibraryDetailsResponseBody$Outbound = {
errors?: Array<GetLibraryDetailsErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetLibraryDetailsResponseBody$outboundSchema: z.ZodType<
GetLibraryDetailsResponseBody$Outbound,
z.ZodTypeDef,
GetLibraryDetailsResponseBody
> = z
.instanceof(GetLibraryDetailsResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetLibraryDetailsErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetLibraryDetailsResponseBody$ {
/** @deprecated use `GetLibraryDetailsResponseBody$inboundSchema` instead. */
export const inboundSchema = GetLibraryDetailsResponseBody$inboundSchema;
/** @deprecated use `GetLibraryDetailsResponseBody$outboundSchema` instead. */
export const outboundSchema = GetLibraryDetailsResponseBody$outboundSchema;
/** @deprecated use `GetLibraryDetailsResponseBody$Outbound` instead. */
export type Outbound = GetLibraryDetailsResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetLibraryHubsErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetLibraryHubsResponseBodyData = {
errors?: Array<GetLibraryHubsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetLibraryHubsResponseBody extends Error {
errors?: Array<GetLibraryHubsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetLibraryHubsResponseBodyData;
constructor(err: GetLibraryHubsResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetLibraryHubsResponseBody";
}
}
/** @internal */
export const GetLibraryHubsErrors$inboundSchema: z.ZodType<
GetLibraryHubsErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetLibraryHubsErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetLibraryHubsErrors$outboundSchema: z.ZodType<
GetLibraryHubsErrors$Outbound,
z.ZodTypeDef,
GetLibraryHubsErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetLibraryHubsErrors$ {
/** @deprecated use `GetLibraryHubsErrors$inboundSchema` instead. */
export const inboundSchema = GetLibraryHubsErrors$inboundSchema;
/** @deprecated use `GetLibraryHubsErrors$outboundSchema` instead. */
export const outboundSchema = GetLibraryHubsErrors$outboundSchema;
/** @deprecated use `GetLibraryHubsErrors$Outbound` instead. */
export type Outbound = GetLibraryHubsErrors$Outbound;
}
/** @internal */
export const GetLibraryHubsResponseBody$inboundSchema: z.ZodType<
GetLibraryHubsResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetLibraryHubsErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetLibraryHubsResponseBody(remapped);
});
/** @internal */
export type GetLibraryHubsResponseBody$Outbound = {
errors?: Array<GetLibraryHubsErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetLibraryHubsResponseBody$outboundSchema: z.ZodType<
GetLibraryHubsResponseBody$Outbound,
z.ZodTypeDef,
GetLibraryHubsResponseBody
> = z
.instanceof(GetLibraryHubsResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetLibraryHubsErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetLibraryHubsResponseBody$ {
/** @deprecated use `GetLibraryHubsResponseBody$inboundSchema` instead. */
export const inboundSchema = GetLibraryHubsResponseBody$inboundSchema;
/** @deprecated use `GetLibraryHubsResponseBody$outboundSchema` instead. */
export const outboundSchema = GetLibraryHubsResponseBody$outboundSchema;
/** @deprecated use `GetLibraryHubsResponseBody$Outbound` instead. */
export type Outbound = GetLibraryHubsResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetLibraryItemsErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetLibraryItemsResponseBodyData = {
errors?: Array<GetLibraryItemsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetLibraryItemsResponseBody extends Error {
errors?: Array<GetLibraryItemsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetLibraryItemsResponseBodyData;
constructor(err: GetLibraryItemsResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetLibraryItemsResponseBody";
}
}
/** @internal */
export const GetLibraryItemsErrors$inboundSchema: z.ZodType<
GetLibraryItemsErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetLibraryItemsErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetLibraryItemsErrors$outboundSchema: z.ZodType<
GetLibraryItemsErrors$Outbound,
z.ZodTypeDef,
GetLibraryItemsErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetLibraryItemsErrors$ {
/** @deprecated use `GetLibraryItemsErrors$inboundSchema` instead. */
export const inboundSchema = GetLibraryItemsErrors$inboundSchema;
/** @deprecated use `GetLibraryItemsErrors$outboundSchema` instead. */
export const outboundSchema = GetLibraryItemsErrors$outboundSchema;
/** @deprecated use `GetLibraryItemsErrors$Outbound` instead. */
export type Outbound = GetLibraryItemsErrors$Outbound;
}
/** @internal */
export const GetLibraryItemsResponseBody$inboundSchema: z.ZodType<
GetLibraryItemsResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetLibraryItemsErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetLibraryItemsResponseBody(remapped);
});
/** @internal */
export type GetLibraryItemsResponseBody$Outbound = {
errors?: Array<GetLibraryItemsErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetLibraryItemsResponseBody$outboundSchema: z.ZodType<
GetLibraryItemsResponseBody$Outbound,
z.ZodTypeDef,
GetLibraryItemsResponseBody
> = z
.instanceof(GetLibraryItemsResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetLibraryItemsErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetLibraryItemsResponseBody$ {
/** @deprecated use `GetLibraryItemsResponseBody$inboundSchema` instead. */
export const inboundSchema = GetLibraryItemsResponseBody$inboundSchema;
/** @deprecated use `GetLibraryItemsResponseBody$outboundSchema` instead. */
export const outboundSchema = GetLibraryItemsResponseBody$outboundSchema;
/** @deprecated use `GetLibraryItemsResponseBody$Outbound` instead. */
export type Outbound = GetLibraryItemsResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetMediaProvidersErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetMediaProvidersResponseBodyData = {
errors?: Array<GetMediaProvidersErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetMediaProvidersResponseBody extends Error {
errors?: Array<GetMediaProvidersErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetMediaProvidersResponseBodyData;
constructor(err: GetMediaProvidersResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetMediaProvidersResponseBody";
}
}
/** @internal */
export const GetMediaProvidersErrors$inboundSchema: z.ZodType<
GetMediaProvidersErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetMediaProvidersErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetMediaProvidersErrors$outboundSchema: z.ZodType<
GetMediaProvidersErrors$Outbound,
z.ZodTypeDef,
GetMediaProvidersErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetMediaProvidersErrors$ {
/** @deprecated use `GetMediaProvidersErrors$inboundSchema` instead. */
export const inboundSchema = GetMediaProvidersErrors$inboundSchema;
/** @deprecated use `GetMediaProvidersErrors$outboundSchema` instead. */
export const outboundSchema = GetMediaProvidersErrors$outboundSchema;
/** @deprecated use `GetMediaProvidersErrors$Outbound` instead. */
export type Outbound = GetMediaProvidersErrors$Outbound;
}
/** @internal */
export const GetMediaProvidersResponseBody$inboundSchema: z.ZodType<
GetMediaProvidersResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetMediaProvidersErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetMediaProvidersResponseBody(remapped);
});
/** @internal */
export type GetMediaProvidersResponseBody$Outbound = {
errors?: Array<GetMediaProvidersErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetMediaProvidersResponseBody$outboundSchema: z.ZodType<
GetMediaProvidersResponseBody$Outbound,
z.ZodTypeDef,
GetMediaProvidersResponseBody
> = z
.instanceof(GetMediaProvidersResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetMediaProvidersErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetMediaProvidersResponseBody$ {
/** @deprecated use `GetMediaProvidersResponseBody$inboundSchema` instead. */
export const inboundSchema = GetMediaProvidersResponseBody$inboundSchema;
/** @deprecated use `GetMediaProvidersResponseBody$outboundSchema` instead. */
export const outboundSchema = GetMediaProvidersResponseBody$outboundSchema;
/** @deprecated use `GetMediaProvidersResponseBody$Outbound` instead. */
export type Outbound = GetMediaProvidersResponseBody$Outbound;
}

View File

@@ -0,0 +1,162 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetMetaDataByRatingKeyErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetMetaDataByRatingKeyResponseBodyData = {
errors?: Array<GetMetaDataByRatingKeyErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetMetaDataByRatingKeyResponseBody extends Error {
errors?: Array<GetMetaDataByRatingKeyErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetMetaDataByRatingKeyResponseBodyData;
constructor(err: GetMetaDataByRatingKeyResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetMetaDataByRatingKeyResponseBody";
}
}
/** @internal */
export const GetMetaDataByRatingKeyErrors$inboundSchema: z.ZodType<
GetMetaDataByRatingKeyErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetMetaDataByRatingKeyErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetMetaDataByRatingKeyErrors$outboundSchema: z.ZodType<
GetMetaDataByRatingKeyErrors$Outbound,
z.ZodTypeDef,
GetMetaDataByRatingKeyErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetMetaDataByRatingKeyErrors$ {
/** @deprecated use `GetMetaDataByRatingKeyErrors$inboundSchema` instead. */
export const inboundSchema = GetMetaDataByRatingKeyErrors$inboundSchema;
/** @deprecated use `GetMetaDataByRatingKeyErrors$outboundSchema` instead. */
export const outboundSchema = GetMetaDataByRatingKeyErrors$outboundSchema;
/** @deprecated use `GetMetaDataByRatingKeyErrors$Outbound` instead. */
export type Outbound = GetMetaDataByRatingKeyErrors$Outbound;
}
/** @internal */
export const GetMetaDataByRatingKeyResponseBody$inboundSchema: z.ZodType<
GetMetaDataByRatingKeyResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetMetaDataByRatingKeyErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetMetaDataByRatingKeyResponseBody(remapped);
});
/** @internal */
export type GetMetaDataByRatingKeyResponseBody$Outbound = {
errors?: Array<GetMetaDataByRatingKeyErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetMetaDataByRatingKeyResponseBody$outboundSchema: z.ZodType<
GetMetaDataByRatingKeyResponseBody$Outbound,
z.ZodTypeDef,
GetMetaDataByRatingKeyResponseBody
> = z
.instanceof(GetMetaDataByRatingKeyResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z
.array(z.lazy(() => GetMetaDataByRatingKeyErrors$outboundSchema))
.optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetMetaDataByRatingKeyResponseBody$ {
/** @deprecated use `GetMetaDataByRatingKeyResponseBody$inboundSchema` instead. */
export const inboundSchema = GetMetaDataByRatingKeyResponseBody$inboundSchema;
/** @deprecated use `GetMetaDataByRatingKeyResponseBody$outboundSchema` instead. */
export const outboundSchema = GetMetaDataByRatingKeyResponseBody$outboundSchema;
/** @deprecated use `GetMetaDataByRatingKeyResponseBody$Outbound` instead. */
export type Outbound = GetMetaDataByRatingKeyResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetMetadataChildrenErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetMetadataChildrenResponseBodyData = {
errors?: Array<GetMetadataChildrenErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetMetadataChildrenResponseBody extends Error {
errors?: Array<GetMetadataChildrenErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetMetadataChildrenResponseBodyData;
constructor(err: GetMetadataChildrenResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetMetadataChildrenResponseBody";
}
}
/** @internal */
export const GetMetadataChildrenErrors$inboundSchema: z.ZodType<
GetMetadataChildrenErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetMetadataChildrenErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetMetadataChildrenErrors$outboundSchema: z.ZodType<
GetMetadataChildrenErrors$Outbound,
z.ZodTypeDef,
GetMetadataChildrenErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetMetadataChildrenErrors$ {
/** @deprecated use `GetMetadataChildrenErrors$inboundSchema` instead. */
export const inboundSchema = GetMetadataChildrenErrors$inboundSchema;
/** @deprecated use `GetMetadataChildrenErrors$outboundSchema` instead. */
export const outboundSchema = GetMetadataChildrenErrors$outboundSchema;
/** @deprecated use `GetMetadataChildrenErrors$Outbound` instead. */
export type Outbound = GetMetadataChildrenErrors$Outbound;
}
/** @internal */
export const GetMetadataChildrenResponseBody$inboundSchema: z.ZodType<
GetMetadataChildrenResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetMetadataChildrenErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetMetadataChildrenResponseBody(remapped);
});
/** @internal */
export type GetMetadataChildrenResponseBody$Outbound = {
errors?: Array<GetMetadataChildrenErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetMetadataChildrenResponseBody$outboundSchema: z.ZodType<
GetMetadataChildrenResponseBody$Outbound,
z.ZodTypeDef,
GetMetadataChildrenResponseBody
> = z
.instanceof(GetMetadataChildrenResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetMetadataChildrenErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetMetadataChildrenResponseBody$ {
/** @deprecated use `GetMetadataChildrenResponseBody$inboundSchema` instead. */
export const inboundSchema = GetMetadataChildrenResponseBody$inboundSchema;
/** @deprecated use `GetMetadataChildrenResponseBody$outboundSchema` instead. */
export const outboundSchema = GetMetadataChildrenResponseBody$outboundSchema;
/** @deprecated use `GetMetadataChildrenResponseBody$Outbound` instead. */
export type Outbound = GetMetadataChildrenResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetMyPlexAccountErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetMyPlexAccountResponseBodyData = {
errors?: Array<GetMyPlexAccountErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetMyPlexAccountResponseBody extends Error {
errors?: Array<GetMyPlexAccountErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetMyPlexAccountResponseBodyData;
constructor(err: GetMyPlexAccountResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetMyPlexAccountResponseBody";
}
}
/** @internal */
export const GetMyPlexAccountErrors$inboundSchema: z.ZodType<
GetMyPlexAccountErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetMyPlexAccountErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetMyPlexAccountErrors$outboundSchema: z.ZodType<
GetMyPlexAccountErrors$Outbound,
z.ZodTypeDef,
GetMyPlexAccountErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetMyPlexAccountErrors$ {
/** @deprecated use `GetMyPlexAccountErrors$inboundSchema` instead. */
export const inboundSchema = GetMyPlexAccountErrors$inboundSchema;
/** @deprecated use `GetMyPlexAccountErrors$outboundSchema` instead. */
export const outboundSchema = GetMyPlexAccountErrors$outboundSchema;
/** @deprecated use `GetMyPlexAccountErrors$Outbound` instead. */
export type Outbound = GetMyPlexAccountErrors$Outbound;
}
/** @internal */
export const GetMyPlexAccountResponseBody$inboundSchema: z.ZodType<
GetMyPlexAccountResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetMyPlexAccountErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetMyPlexAccountResponseBody(remapped);
});
/** @internal */
export type GetMyPlexAccountResponseBody$Outbound = {
errors?: Array<GetMyPlexAccountErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetMyPlexAccountResponseBody$outboundSchema: z.ZodType<
GetMyPlexAccountResponseBody$Outbound,
z.ZodTypeDef,
GetMyPlexAccountResponseBody
> = z
.instanceof(GetMyPlexAccountResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetMyPlexAccountErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetMyPlexAccountResponseBody$ {
/** @deprecated use `GetMyPlexAccountResponseBody$inboundSchema` instead. */
export const inboundSchema = GetMyPlexAccountResponseBody$inboundSchema;
/** @deprecated use `GetMyPlexAccountResponseBody$outboundSchema` instead. */
export const outboundSchema = GetMyPlexAccountResponseBody$outboundSchema;
/** @deprecated use `GetMyPlexAccountResponseBody$Outbound` instead. */
export type Outbound = GetMyPlexAccountResponseBody$Outbound;
}

View File

@@ -0,0 +1,157 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetOnDeckErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetOnDeckResponseBodyData = {
errors?: Array<GetOnDeckErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetOnDeckResponseBody extends Error {
errors?: Array<GetOnDeckErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetOnDeckResponseBodyData;
constructor(err: GetOnDeckResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetOnDeckResponseBody";
}
}
/** @internal */
export const GetOnDeckErrors$inboundSchema: z.ZodType<GetOnDeckErrors, z.ZodTypeDef, unknown> =
z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetOnDeckErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetOnDeckErrors$outboundSchema: z.ZodType<
GetOnDeckErrors$Outbound,
z.ZodTypeDef,
GetOnDeckErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetOnDeckErrors$ {
/** @deprecated use `GetOnDeckErrors$inboundSchema` instead. */
export const inboundSchema = GetOnDeckErrors$inboundSchema;
/** @deprecated use `GetOnDeckErrors$outboundSchema` instead. */
export const outboundSchema = GetOnDeckErrors$outboundSchema;
/** @deprecated use `GetOnDeckErrors$Outbound` instead. */
export type Outbound = GetOnDeckErrors$Outbound;
}
/** @internal */
export const GetOnDeckResponseBody$inboundSchema: z.ZodType<
GetOnDeckResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetOnDeckErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetOnDeckResponseBody(remapped);
});
/** @internal */
export type GetOnDeckResponseBody$Outbound = {
errors?: Array<GetOnDeckErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetOnDeckResponseBody$outboundSchema: z.ZodType<
GetOnDeckResponseBody$Outbound,
z.ZodTypeDef,
GetOnDeckResponseBody
> = z
.instanceof(GetOnDeckResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetOnDeckErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetOnDeckResponseBody$ {
/** @deprecated use `GetOnDeckResponseBody$inboundSchema` instead. */
export const inboundSchema = GetOnDeckResponseBody$inboundSchema;
/** @deprecated use `GetOnDeckResponseBody$outboundSchema` instead. */
export const outboundSchema = GetOnDeckResponseBody$outboundSchema;
/** @deprecated use `GetOnDeckResponseBody$Outbound` instead. */
export type Outbound = GetOnDeckResponseBody$Outbound;
}

View File

@@ -0,0 +1,156 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetPinErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Bad Request response when the X-Plex-Client-Identifier is missing
*/
export type GetPinResponseBodyData = {
errors?: Array<GetPinErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Bad Request response when the X-Plex-Client-Identifier is missing
*/
export class GetPinResponseBody extends Error {
errors?: Array<GetPinErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetPinResponseBodyData;
constructor(err: GetPinResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetPinResponseBody";
}
}
/** @internal */
export const GetPinErrors$inboundSchema: z.ZodType<GetPinErrors, z.ZodTypeDef, unknown> = z.object({
code: z.number().int().optional(),
message: z.string().optional(),
status: z.number().int().optional(),
});
/** @internal */
export type GetPinErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetPinErrors$outboundSchema: z.ZodType<
GetPinErrors$Outbound,
z.ZodTypeDef,
GetPinErrors
> = z.object({
code: z.number().int().optional(),
message: z.string().optional(),
status: z.number().int().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetPinErrors$ {
/** @deprecated use `GetPinErrors$inboundSchema` instead. */
export const inboundSchema = GetPinErrors$inboundSchema;
/** @deprecated use `GetPinErrors$outboundSchema` instead. */
export const outboundSchema = GetPinErrors$outboundSchema;
/** @deprecated use `GetPinErrors$Outbound` instead. */
export type Outbound = GetPinErrors$Outbound;
}
/** @internal */
export const GetPinResponseBody$inboundSchema: z.ZodType<
GetPinResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetPinErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetPinResponseBody(remapped);
});
/** @internal */
export type GetPinResponseBody$Outbound = {
errors?: Array<GetPinErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetPinResponseBody$outboundSchema: z.ZodType<
GetPinResponseBody$Outbound,
z.ZodTypeDef,
GetPinResponseBody
> = z
.instanceof(GetPinResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetPinErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetPinResponseBody$ {
/** @deprecated use `GetPinResponseBody$inboundSchema` instead. */
export const inboundSchema = GetPinResponseBody$inboundSchema;
/** @deprecated use `GetPinResponseBody$outboundSchema` instead. */
export const outboundSchema = GetPinResponseBody$outboundSchema;
/** @deprecated use `GetPinResponseBody$Outbound` instead. */
export type Outbound = GetPinResponseBody$Outbound;
}

View File

@@ -0,0 +1,157 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetPlaylistErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetPlaylistResponseBodyData = {
errors?: Array<GetPlaylistErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetPlaylistResponseBody extends Error {
errors?: Array<GetPlaylistErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetPlaylistResponseBodyData;
constructor(err: GetPlaylistResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetPlaylistResponseBody";
}
}
/** @internal */
export const GetPlaylistErrors$inboundSchema: z.ZodType<GetPlaylistErrors, z.ZodTypeDef, unknown> =
z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetPlaylistErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetPlaylistErrors$outboundSchema: z.ZodType<
GetPlaylistErrors$Outbound,
z.ZodTypeDef,
GetPlaylistErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetPlaylistErrors$ {
/** @deprecated use `GetPlaylistErrors$inboundSchema` instead. */
export const inboundSchema = GetPlaylistErrors$inboundSchema;
/** @deprecated use `GetPlaylistErrors$outboundSchema` instead. */
export const outboundSchema = GetPlaylistErrors$outboundSchema;
/** @deprecated use `GetPlaylistErrors$Outbound` instead. */
export type Outbound = GetPlaylistErrors$Outbound;
}
/** @internal */
export const GetPlaylistResponseBody$inboundSchema: z.ZodType<
GetPlaylistResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetPlaylistErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetPlaylistResponseBody(remapped);
});
/** @internal */
export type GetPlaylistResponseBody$Outbound = {
errors?: Array<GetPlaylistErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetPlaylistResponseBody$outboundSchema: z.ZodType<
GetPlaylistResponseBody$Outbound,
z.ZodTypeDef,
GetPlaylistResponseBody
> = z
.instanceof(GetPlaylistResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetPlaylistErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetPlaylistResponseBody$ {
/** @deprecated use `GetPlaylistResponseBody$inboundSchema` instead. */
export const inboundSchema = GetPlaylistResponseBody$inboundSchema;
/** @deprecated use `GetPlaylistResponseBody$outboundSchema` instead. */
export const outboundSchema = GetPlaylistResponseBody$outboundSchema;
/** @deprecated use `GetPlaylistResponseBody$Outbound` instead. */
export type Outbound = GetPlaylistResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetPlaylistContentsErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetPlaylistContentsResponseBodyData = {
errors?: Array<GetPlaylistContentsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetPlaylistContentsResponseBody extends Error {
errors?: Array<GetPlaylistContentsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetPlaylistContentsResponseBodyData;
constructor(err: GetPlaylistContentsResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetPlaylistContentsResponseBody";
}
}
/** @internal */
export const GetPlaylistContentsErrors$inboundSchema: z.ZodType<
GetPlaylistContentsErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetPlaylistContentsErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetPlaylistContentsErrors$outboundSchema: z.ZodType<
GetPlaylistContentsErrors$Outbound,
z.ZodTypeDef,
GetPlaylistContentsErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetPlaylistContentsErrors$ {
/** @deprecated use `GetPlaylistContentsErrors$inboundSchema` instead. */
export const inboundSchema = GetPlaylistContentsErrors$inboundSchema;
/** @deprecated use `GetPlaylistContentsErrors$outboundSchema` instead. */
export const outboundSchema = GetPlaylistContentsErrors$outboundSchema;
/** @deprecated use `GetPlaylistContentsErrors$Outbound` instead. */
export type Outbound = GetPlaylistContentsErrors$Outbound;
}
/** @internal */
export const GetPlaylistContentsResponseBody$inboundSchema: z.ZodType<
GetPlaylistContentsResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetPlaylistContentsErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetPlaylistContentsResponseBody(remapped);
});
/** @internal */
export type GetPlaylistContentsResponseBody$Outbound = {
errors?: Array<GetPlaylistContentsErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetPlaylistContentsResponseBody$outboundSchema: z.ZodType<
GetPlaylistContentsResponseBody$Outbound,
z.ZodTypeDef,
GetPlaylistContentsResponseBody
> = z
.instanceof(GetPlaylistContentsResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetPlaylistContentsErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetPlaylistContentsResponseBody$ {
/** @deprecated use `GetPlaylistContentsResponseBody$inboundSchema` instead. */
export const inboundSchema = GetPlaylistContentsResponseBody$inboundSchema;
/** @deprecated use `GetPlaylistContentsResponseBody$outboundSchema` instead. */
export const outboundSchema = GetPlaylistContentsResponseBody$outboundSchema;
/** @deprecated use `GetPlaylistContentsResponseBody$Outbound` instead. */
export type Outbound = GetPlaylistContentsResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetPlaylistsErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetPlaylistsResponseBodyData = {
errors?: Array<GetPlaylistsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetPlaylistsResponseBody extends Error {
errors?: Array<GetPlaylistsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetPlaylistsResponseBodyData;
constructor(err: GetPlaylistsResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetPlaylistsResponseBody";
}
}
/** @internal */
export const GetPlaylistsErrors$inboundSchema: z.ZodType<
GetPlaylistsErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetPlaylistsErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetPlaylistsErrors$outboundSchema: z.ZodType<
GetPlaylistsErrors$Outbound,
z.ZodTypeDef,
GetPlaylistsErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetPlaylistsErrors$ {
/** @deprecated use `GetPlaylistsErrors$inboundSchema` instead. */
export const inboundSchema = GetPlaylistsErrors$inboundSchema;
/** @deprecated use `GetPlaylistsErrors$outboundSchema` instead. */
export const outboundSchema = GetPlaylistsErrors$outboundSchema;
/** @deprecated use `GetPlaylistsErrors$Outbound` instead. */
export type Outbound = GetPlaylistsErrors$Outbound;
}
/** @internal */
export const GetPlaylistsResponseBody$inboundSchema: z.ZodType<
GetPlaylistsResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetPlaylistsErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetPlaylistsResponseBody(remapped);
});
/** @internal */
export type GetPlaylistsResponseBody$Outbound = {
errors?: Array<GetPlaylistsErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetPlaylistsResponseBody$outboundSchema: z.ZodType<
GetPlaylistsResponseBody$Outbound,
z.ZodTypeDef,
GetPlaylistsResponseBody
> = z
.instanceof(GetPlaylistsResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetPlaylistsErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetPlaylistsResponseBody$ {
/** @deprecated use `GetPlaylistsResponseBody$inboundSchema` instead. */
export const inboundSchema = GetPlaylistsResponseBody$inboundSchema;
/** @deprecated use `GetPlaylistsResponseBody$outboundSchema` instead. */
export const outboundSchema = GetPlaylistsResponseBody$outboundSchema;
/** @deprecated use `GetPlaylistsResponseBody$Outbound` instead. */
export type Outbound = GetPlaylistsResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetRecentlyAddedErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetRecentlyAddedResponseBodyData = {
errors?: Array<GetRecentlyAddedErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetRecentlyAddedResponseBody extends Error {
errors?: Array<GetRecentlyAddedErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetRecentlyAddedResponseBodyData;
constructor(err: GetRecentlyAddedResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetRecentlyAddedResponseBody";
}
}
/** @internal */
export const GetRecentlyAddedErrors$inboundSchema: z.ZodType<
GetRecentlyAddedErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetRecentlyAddedErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetRecentlyAddedErrors$outboundSchema: z.ZodType<
GetRecentlyAddedErrors$Outbound,
z.ZodTypeDef,
GetRecentlyAddedErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetRecentlyAddedErrors$ {
/** @deprecated use `GetRecentlyAddedErrors$inboundSchema` instead. */
export const inboundSchema = GetRecentlyAddedErrors$inboundSchema;
/** @deprecated use `GetRecentlyAddedErrors$outboundSchema` instead. */
export const outboundSchema = GetRecentlyAddedErrors$outboundSchema;
/** @deprecated use `GetRecentlyAddedErrors$Outbound` instead. */
export type Outbound = GetRecentlyAddedErrors$Outbound;
}
/** @internal */
export const GetRecentlyAddedResponseBody$inboundSchema: z.ZodType<
GetRecentlyAddedResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetRecentlyAddedErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetRecentlyAddedResponseBody(remapped);
});
/** @internal */
export type GetRecentlyAddedResponseBody$Outbound = {
errors?: Array<GetRecentlyAddedErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetRecentlyAddedResponseBody$outboundSchema: z.ZodType<
GetRecentlyAddedResponseBody$Outbound,
z.ZodTypeDef,
GetRecentlyAddedResponseBody
> = z
.instanceof(GetRecentlyAddedResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetRecentlyAddedErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetRecentlyAddedResponseBody$ {
/** @deprecated use `GetRecentlyAddedResponseBody$inboundSchema` instead. */
export const inboundSchema = GetRecentlyAddedResponseBody$inboundSchema;
/** @deprecated use `GetRecentlyAddedResponseBody$outboundSchema` instead. */
export const outboundSchema = GetRecentlyAddedResponseBody$outboundSchema;
/** @deprecated use `GetRecentlyAddedResponseBody$Outbound` instead. */
export type Outbound = GetRecentlyAddedResponseBody$Outbound;
}

View File

@@ -0,0 +1,162 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetRefreshLibraryMetadataErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetRefreshLibraryMetadataResponseBodyData = {
errors?: Array<GetRefreshLibraryMetadataErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetRefreshLibraryMetadataResponseBody extends Error {
errors?: Array<GetRefreshLibraryMetadataErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetRefreshLibraryMetadataResponseBodyData;
constructor(err: GetRefreshLibraryMetadataResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetRefreshLibraryMetadataResponseBody";
}
}
/** @internal */
export const GetRefreshLibraryMetadataErrors$inboundSchema: z.ZodType<
GetRefreshLibraryMetadataErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetRefreshLibraryMetadataErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetRefreshLibraryMetadataErrors$outboundSchema: z.ZodType<
GetRefreshLibraryMetadataErrors$Outbound,
z.ZodTypeDef,
GetRefreshLibraryMetadataErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetRefreshLibraryMetadataErrors$ {
/** @deprecated use `GetRefreshLibraryMetadataErrors$inboundSchema` instead. */
export const inboundSchema = GetRefreshLibraryMetadataErrors$inboundSchema;
/** @deprecated use `GetRefreshLibraryMetadataErrors$outboundSchema` instead. */
export const outboundSchema = GetRefreshLibraryMetadataErrors$outboundSchema;
/** @deprecated use `GetRefreshLibraryMetadataErrors$Outbound` instead. */
export type Outbound = GetRefreshLibraryMetadataErrors$Outbound;
}
/** @internal */
export const GetRefreshLibraryMetadataResponseBody$inboundSchema: z.ZodType<
GetRefreshLibraryMetadataResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetRefreshLibraryMetadataErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetRefreshLibraryMetadataResponseBody(remapped);
});
/** @internal */
export type GetRefreshLibraryMetadataResponseBody$Outbound = {
errors?: Array<GetRefreshLibraryMetadataErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetRefreshLibraryMetadataResponseBody$outboundSchema: z.ZodType<
GetRefreshLibraryMetadataResponseBody$Outbound,
z.ZodTypeDef,
GetRefreshLibraryMetadataResponseBody
> = z
.instanceof(GetRefreshLibraryMetadataResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z
.array(z.lazy(() => GetRefreshLibraryMetadataErrors$outboundSchema))
.optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetRefreshLibraryMetadataResponseBody$ {
/** @deprecated use `GetRefreshLibraryMetadataResponseBody$inboundSchema` instead. */
export const inboundSchema = GetRefreshLibraryMetadataResponseBody$inboundSchema;
/** @deprecated use `GetRefreshLibraryMetadataResponseBody$outboundSchema` instead. */
export const outboundSchema = GetRefreshLibraryMetadataResponseBody$outboundSchema;
/** @deprecated use `GetRefreshLibraryMetadataResponseBody$Outbound` instead. */
export type Outbound = GetRefreshLibraryMetadataResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetResizedPhotoErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetResizedPhotoResponseBodyData = {
errors?: Array<GetResizedPhotoErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetResizedPhotoResponseBody extends Error {
errors?: Array<GetResizedPhotoErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetResizedPhotoResponseBodyData;
constructor(err: GetResizedPhotoResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetResizedPhotoResponseBody";
}
}
/** @internal */
export const GetResizedPhotoErrors$inboundSchema: z.ZodType<
GetResizedPhotoErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetResizedPhotoErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetResizedPhotoErrors$outboundSchema: z.ZodType<
GetResizedPhotoErrors$Outbound,
z.ZodTypeDef,
GetResizedPhotoErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetResizedPhotoErrors$ {
/** @deprecated use `GetResizedPhotoErrors$inboundSchema` instead. */
export const inboundSchema = GetResizedPhotoErrors$inboundSchema;
/** @deprecated use `GetResizedPhotoErrors$outboundSchema` instead. */
export const outboundSchema = GetResizedPhotoErrors$outboundSchema;
/** @deprecated use `GetResizedPhotoErrors$Outbound` instead. */
export type Outbound = GetResizedPhotoErrors$Outbound;
}
/** @internal */
export const GetResizedPhotoResponseBody$inboundSchema: z.ZodType<
GetResizedPhotoResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetResizedPhotoErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetResizedPhotoResponseBody(remapped);
});
/** @internal */
export type GetResizedPhotoResponseBody$Outbound = {
errors?: Array<GetResizedPhotoErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetResizedPhotoResponseBody$outboundSchema: z.ZodType<
GetResizedPhotoResponseBody$Outbound,
z.ZodTypeDef,
GetResizedPhotoResponseBody
> = z
.instanceof(GetResizedPhotoResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetResizedPhotoErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetResizedPhotoResponseBody$ {
/** @deprecated use `GetResizedPhotoResponseBody$inboundSchema` instead. */
export const inboundSchema = GetResizedPhotoResponseBody$inboundSchema;
/** @deprecated use `GetResizedPhotoResponseBody$outboundSchema` instead. */
export const outboundSchema = GetResizedPhotoResponseBody$outboundSchema;
/** @deprecated use `GetResizedPhotoResponseBody$Outbound` instead. */
export type Outbound = GetResizedPhotoResponseBody$Outbound;
}

View File

@@ -0,0 +1,162 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetResourcesStatisticsErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetResourcesStatisticsResponseBodyData = {
errors?: Array<GetResourcesStatisticsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetResourcesStatisticsResponseBody extends Error {
errors?: Array<GetResourcesStatisticsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetResourcesStatisticsResponseBodyData;
constructor(err: GetResourcesStatisticsResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetResourcesStatisticsResponseBody";
}
}
/** @internal */
export const GetResourcesStatisticsErrors$inboundSchema: z.ZodType<
GetResourcesStatisticsErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetResourcesStatisticsErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetResourcesStatisticsErrors$outboundSchema: z.ZodType<
GetResourcesStatisticsErrors$Outbound,
z.ZodTypeDef,
GetResourcesStatisticsErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetResourcesStatisticsErrors$ {
/** @deprecated use `GetResourcesStatisticsErrors$inboundSchema` instead. */
export const inboundSchema = GetResourcesStatisticsErrors$inboundSchema;
/** @deprecated use `GetResourcesStatisticsErrors$outboundSchema` instead. */
export const outboundSchema = GetResourcesStatisticsErrors$outboundSchema;
/** @deprecated use `GetResourcesStatisticsErrors$Outbound` instead. */
export type Outbound = GetResourcesStatisticsErrors$Outbound;
}
/** @internal */
export const GetResourcesStatisticsResponseBody$inboundSchema: z.ZodType<
GetResourcesStatisticsResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetResourcesStatisticsErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetResourcesStatisticsResponseBody(remapped);
});
/** @internal */
export type GetResourcesStatisticsResponseBody$Outbound = {
errors?: Array<GetResourcesStatisticsErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetResourcesStatisticsResponseBody$outboundSchema: z.ZodType<
GetResourcesStatisticsResponseBody$Outbound,
z.ZodTypeDef,
GetResourcesStatisticsResponseBody
> = z
.instanceof(GetResourcesStatisticsResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z
.array(z.lazy(() => GetResourcesStatisticsErrors$outboundSchema))
.optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetResourcesStatisticsResponseBody$ {
/** @deprecated use `GetResourcesStatisticsResponseBody$inboundSchema` instead. */
export const inboundSchema = GetResourcesStatisticsResponseBody$inboundSchema;
/** @deprecated use `GetResourcesStatisticsResponseBody$outboundSchema` instead. */
export const outboundSchema = GetResourcesStatisticsResponseBody$outboundSchema;
/** @deprecated use `GetResourcesStatisticsResponseBody$Outbound` instead. */
export type Outbound = GetResourcesStatisticsResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetSearchLibraryErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetSearchLibraryResponseBodyData = {
errors?: Array<GetSearchLibraryErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetSearchLibraryResponseBody extends Error {
errors?: Array<GetSearchLibraryErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetSearchLibraryResponseBodyData;
constructor(err: GetSearchLibraryResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetSearchLibraryResponseBody";
}
}
/** @internal */
export const GetSearchLibraryErrors$inboundSchema: z.ZodType<
GetSearchLibraryErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetSearchLibraryErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetSearchLibraryErrors$outboundSchema: z.ZodType<
GetSearchLibraryErrors$Outbound,
z.ZodTypeDef,
GetSearchLibraryErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetSearchLibraryErrors$ {
/** @deprecated use `GetSearchLibraryErrors$inboundSchema` instead. */
export const inboundSchema = GetSearchLibraryErrors$inboundSchema;
/** @deprecated use `GetSearchLibraryErrors$outboundSchema` instead. */
export const outboundSchema = GetSearchLibraryErrors$outboundSchema;
/** @deprecated use `GetSearchLibraryErrors$Outbound` instead. */
export type Outbound = GetSearchLibraryErrors$Outbound;
}
/** @internal */
export const GetSearchLibraryResponseBody$inboundSchema: z.ZodType<
GetSearchLibraryResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetSearchLibraryErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetSearchLibraryResponseBody(remapped);
});
/** @internal */
export type GetSearchLibraryResponseBody$Outbound = {
errors?: Array<GetSearchLibraryErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetSearchLibraryResponseBody$outboundSchema: z.ZodType<
GetSearchLibraryResponseBody$Outbound,
z.ZodTypeDef,
GetSearchLibraryResponseBody
> = z
.instanceof(GetSearchLibraryResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetSearchLibraryErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetSearchLibraryResponseBody$ {
/** @deprecated use `GetSearchLibraryResponseBody$inboundSchema` instead. */
export const inboundSchema = GetSearchLibraryResponseBody$inboundSchema;
/** @deprecated use `GetSearchLibraryResponseBody$outboundSchema` instead. */
export const outboundSchema = GetSearchLibraryResponseBody$outboundSchema;
/** @deprecated use `GetSearchLibraryResponseBody$Outbound` instead. */
export type Outbound = GetSearchLibraryResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetSearchResultsErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetSearchResultsResponseBodyData = {
errors?: Array<GetSearchResultsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetSearchResultsResponseBody extends Error {
errors?: Array<GetSearchResultsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetSearchResultsResponseBodyData;
constructor(err: GetSearchResultsResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetSearchResultsResponseBody";
}
}
/** @internal */
export const GetSearchResultsErrors$inboundSchema: z.ZodType<
GetSearchResultsErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetSearchResultsErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetSearchResultsErrors$outboundSchema: z.ZodType<
GetSearchResultsErrors$Outbound,
z.ZodTypeDef,
GetSearchResultsErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetSearchResultsErrors$ {
/** @deprecated use `GetSearchResultsErrors$inboundSchema` instead. */
export const inboundSchema = GetSearchResultsErrors$inboundSchema;
/** @deprecated use `GetSearchResultsErrors$outboundSchema` instead. */
export const outboundSchema = GetSearchResultsErrors$outboundSchema;
/** @deprecated use `GetSearchResultsErrors$Outbound` instead. */
export type Outbound = GetSearchResultsErrors$Outbound;
}
/** @internal */
export const GetSearchResultsResponseBody$inboundSchema: z.ZodType<
GetSearchResultsResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetSearchResultsErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetSearchResultsResponseBody(remapped);
});
/** @internal */
export type GetSearchResultsResponseBody$Outbound = {
errors?: Array<GetSearchResultsErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetSearchResultsResponseBody$outboundSchema: z.ZodType<
GetSearchResultsResponseBody$Outbound,
z.ZodTypeDef,
GetSearchResultsResponseBody
> = z
.instanceof(GetSearchResultsResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetSearchResultsErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetSearchResultsResponseBody$ {
/** @deprecated use `GetSearchResultsResponseBody$inboundSchema` instead. */
export const inboundSchema = GetSearchResultsResponseBody$inboundSchema;
/** @deprecated use `GetSearchResultsResponseBody$outboundSchema` instead. */
export const outboundSchema = GetSearchResultsResponseBody$outboundSchema;
/** @deprecated use `GetSearchResultsResponseBody$Outbound` instead. */
export type Outbound = GetSearchResultsResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetServerActivitiesErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetServerActivitiesResponseBodyData = {
errors?: Array<GetServerActivitiesErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetServerActivitiesResponseBody extends Error {
errors?: Array<GetServerActivitiesErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetServerActivitiesResponseBodyData;
constructor(err: GetServerActivitiesResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetServerActivitiesResponseBody";
}
}
/** @internal */
export const GetServerActivitiesErrors$inboundSchema: z.ZodType<
GetServerActivitiesErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetServerActivitiesErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetServerActivitiesErrors$outboundSchema: z.ZodType<
GetServerActivitiesErrors$Outbound,
z.ZodTypeDef,
GetServerActivitiesErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetServerActivitiesErrors$ {
/** @deprecated use `GetServerActivitiesErrors$inboundSchema` instead. */
export const inboundSchema = GetServerActivitiesErrors$inboundSchema;
/** @deprecated use `GetServerActivitiesErrors$outboundSchema` instead. */
export const outboundSchema = GetServerActivitiesErrors$outboundSchema;
/** @deprecated use `GetServerActivitiesErrors$Outbound` instead. */
export type Outbound = GetServerActivitiesErrors$Outbound;
}
/** @internal */
export const GetServerActivitiesResponseBody$inboundSchema: z.ZodType<
GetServerActivitiesResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetServerActivitiesErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetServerActivitiesResponseBody(remapped);
});
/** @internal */
export type GetServerActivitiesResponseBody$Outbound = {
errors?: Array<GetServerActivitiesErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetServerActivitiesResponseBody$outboundSchema: z.ZodType<
GetServerActivitiesResponseBody$Outbound,
z.ZodTypeDef,
GetServerActivitiesResponseBody
> = z
.instanceof(GetServerActivitiesResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetServerActivitiesErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetServerActivitiesResponseBody$ {
/** @deprecated use `GetServerActivitiesResponseBody$inboundSchema` instead. */
export const inboundSchema = GetServerActivitiesResponseBody$inboundSchema;
/** @deprecated use `GetServerActivitiesResponseBody$outboundSchema` instead. */
export const outboundSchema = GetServerActivitiesResponseBody$outboundSchema;
/** @deprecated use `GetServerActivitiesResponseBody$Outbound` instead. */
export type Outbound = GetServerActivitiesResponseBody$Outbound;
}

View File

@@ -0,0 +1,152 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type Errors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetServerCapabilitiesResponseBodyData = {
errors?: Array<Errors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetServerCapabilitiesResponseBody extends Error {
errors?: Array<Errors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetServerCapabilitiesResponseBodyData;
constructor(err: GetServerCapabilitiesResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetServerCapabilitiesResponseBody";
}
}
/** @internal */
export const Errors$inboundSchema: z.ZodType<Errors, z.ZodTypeDef, unknown> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type Errors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const Errors$outboundSchema: z.ZodType<Errors$Outbound, z.ZodTypeDef, Errors> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace Errors$ {
/** @deprecated use `Errors$inboundSchema` instead. */
export const inboundSchema = Errors$inboundSchema;
/** @deprecated use `Errors$outboundSchema` instead. */
export const outboundSchema = Errors$outboundSchema;
/** @deprecated use `Errors$Outbound` instead. */
export type Outbound = Errors$Outbound;
}
/** @internal */
export const GetServerCapabilitiesResponseBody$inboundSchema: z.ZodType<
GetServerCapabilitiesResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => Errors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetServerCapabilitiesResponseBody(remapped);
});
/** @internal */
export type GetServerCapabilitiesResponseBody$Outbound = {
errors?: Array<Errors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetServerCapabilitiesResponseBody$outboundSchema: z.ZodType<
GetServerCapabilitiesResponseBody$Outbound,
z.ZodTypeDef,
GetServerCapabilitiesResponseBody
> = z
.instanceof(GetServerCapabilitiesResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => Errors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetServerCapabilitiesResponseBody$ {
/** @deprecated use `GetServerCapabilitiesResponseBody$inboundSchema` instead. */
export const inboundSchema = GetServerCapabilitiesResponseBody$inboundSchema;
/** @deprecated use `GetServerCapabilitiesResponseBody$outboundSchema` instead. */
export const outboundSchema = GetServerCapabilitiesResponseBody$outboundSchema;
/** @deprecated use `GetServerCapabilitiesResponseBody$Outbound` instead. */
export type Outbound = GetServerCapabilitiesResponseBody$Outbound;
}

View File

@@ -0,0 +1,116 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
/**
* Request Timeout
*/
export type GetServerIdentityResponseBodyData = {
code?: number | undefined;
message?: string | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Request Timeout
*/
export class GetServerIdentityResponseBody extends Error {
code?: number | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetServerIdentityResponseBodyData;
constructor(err: GetServerIdentityResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.code != null) {
this.code = err.code;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetServerIdentityResponseBody";
}
}
/** @internal */
export const GetServerIdentityResponseBody$inboundSchema: z.ZodType<
GetServerIdentityResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
code: z.number().int().optional(),
message: z.string().optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetServerIdentityResponseBody(remapped);
});
/** @internal */
export type GetServerIdentityResponseBody$Outbound = {
code?: number | undefined;
message?: string | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetServerIdentityResponseBody$outboundSchema: z.ZodType<
GetServerIdentityResponseBody$Outbound,
z.ZodTypeDef,
GetServerIdentityResponseBody
> = z
.instanceof(GetServerIdentityResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
code: z.number().int().optional(),
message: z.string().optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetServerIdentityResponseBody$ {
/** @deprecated use `GetServerIdentityResponseBody$inboundSchema` instead. */
export const inboundSchema = GetServerIdentityResponseBody$inboundSchema;
/** @deprecated use `GetServerIdentityResponseBody$outboundSchema` instead. */
export const outboundSchema = GetServerIdentityResponseBody$outboundSchema;
/** @deprecated use `GetServerIdentityResponseBody$Outbound` instead. */
export type Outbound = GetServerIdentityResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetServerListErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetServerListResponseBodyData = {
errors?: Array<GetServerListErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetServerListResponseBody extends Error {
errors?: Array<GetServerListErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetServerListResponseBodyData;
constructor(err: GetServerListResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetServerListResponseBody";
}
}
/** @internal */
export const GetServerListErrors$inboundSchema: z.ZodType<
GetServerListErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetServerListErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetServerListErrors$outboundSchema: z.ZodType<
GetServerListErrors$Outbound,
z.ZodTypeDef,
GetServerListErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetServerListErrors$ {
/** @deprecated use `GetServerListErrors$inboundSchema` instead. */
export const inboundSchema = GetServerListErrors$inboundSchema;
/** @deprecated use `GetServerListErrors$outboundSchema` instead. */
export const outboundSchema = GetServerListErrors$outboundSchema;
/** @deprecated use `GetServerListErrors$Outbound` instead. */
export type Outbound = GetServerListErrors$Outbound;
}
/** @internal */
export const GetServerListResponseBody$inboundSchema: z.ZodType<
GetServerListResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetServerListErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetServerListResponseBody(remapped);
});
/** @internal */
export type GetServerListResponseBody$Outbound = {
errors?: Array<GetServerListErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetServerListResponseBody$outboundSchema: z.ZodType<
GetServerListResponseBody$Outbound,
z.ZodTypeDef,
GetServerListResponseBody
> = z
.instanceof(GetServerListResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetServerListErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetServerListResponseBody$ {
/** @deprecated use `GetServerListResponseBody$inboundSchema` instead. */
export const inboundSchema = GetServerListResponseBody$inboundSchema;
/** @deprecated use `GetServerListResponseBody$outboundSchema` instead. */
export const outboundSchema = GetServerListResponseBody$outboundSchema;
/** @deprecated use `GetServerListResponseBody$Outbound` instead. */
export type Outbound = GetServerListResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetServerPreferencesErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetServerPreferencesResponseBodyData = {
errors?: Array<GetServerPreferencesErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetServerPreferencesResponseBody extends Error {
errors?: Array<GetServerPreferencesErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetServerPreferencesResponseBodyData;
constructor(err: GetServerPreferencesResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetServerPreferencesResponseBody";
}
}
/** @internal */
export const GetServerPreferencesErrors$inboundSchema: z.ZodType<
GetServerPreferencesErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetServerPreferencesErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetServerPreferencesErrors$outboundSchema: z.ZodType<
GetServerPreferencesErrors$Outbound,
z.ZodTypeDef,
GetServerPreferencesErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetServerPreferencesErrors$ {
/** @deprecated use `GetServerPreferencesErrors$inboundSchema` instead. */
export const inboundSchema = GetServerPreferencesErrors$inboundSchema;
/** @deprecated use `GetServerPreferencesErrors$outboundSchema` instead. */
export const outboundSchema = GetServerPreferencesErrors$outboundSchema;
/** @deprecated use `GetServerPreferencesErrors$Outbound` instead. */
export type Outbound = GetServerPreferencesErrors$Outbound;
}
/** @internal */
export const GetServerPreferencesResponseBody$inboundSchema: z.ZodType<
GetServerPreferencesResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetServerPreferencesErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetServerPreferencesResponseBody(remapped);
});
/** @internal */
export type GetServerPreferencesResponseBody$Outbound = {
errors?: Array<GetServerPreferencesErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetServerPreferencesResponseBody$outboundSchema: z.ZodType<
GetServerPreferencesResponseBody$Outbound,
z.ZodTypeDef,
GetServerPreferencesResponseBody
> = z
.instanceof(GetServerPreferencesResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetServerPreferencesErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetServerPreferencesResponseBody$ {
/** @deprecated use `GetServerPreferencesResponseBody$inboundSchema` instead. */
export const inboundSchema = GetServerPreferencesResponseBody$inboundSchema;
/** @deprecated use `GetServerPreferencesResponseBody$outboundSchema` instead. */
export const outboundSchema = GetServerPreferencesResponseBody$outboundSchema;
/** @deprecated use `GetServerPreferencesResponseBody$Outbound` instead. */
export type Outbound = GetServerPreferencesResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetServerResourcesErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetServerResourcesResponseBodyData = {
errors?: Array<GetServerResourcesErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetServerResourcesResponseBody extends Error {
errors?: Array<GetServerResourcesErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetServerResourcesResponseBodyData;
constructor(err: GetServerResourcesResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetServerResourcesResponseBody";
}
}
/** @internal */
export const GetServerResourcesErrors$inboundSchema: z.ZodType<
GetServerResourcesErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetServerResourcesErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetServerResourcesErrors$outboundSchema: z.ZodType<
GetServerResourcesErrors$Outbound,
z.ZodTypeDef,
GetServerResourcesErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetServerResourcesErrors$ {
/** @deprecated use `GetServerResourcesErrors$inboundSchema` instead. */
export const inboundSchema = GetServerResourcesErrors$inboundSchema;
/** @deprecated use `GetServerResourcesErrors$outboundSchema` instead. */
export const outboundSchema = GetServerResourcesErrors$outboundSchema;
/** @deprecated use `GetServerResourcesErrors$Outbound` instead. */
export type Outbound = GetServerResourcesErrors$Outbound;
}
/** @internal */
export const GetServerResourcesResponseBody$inboundSchema: z.ZodType<
GetServerResourcesResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetServerResourcesErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetServerResourcesResponseBody(remapped);
});
/** @internal */
export type GetServerResourcesResponseBody$Outbound = {
errors?: Array<GetServerResourcesErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetServerResourcesResponseBody$outboundSchema: z.ZodType<
GetServerResourcesResponseBody$Outbound,
z.ZodTypeDef,
GetServerResourcesResponseBody
> = z
.instanceof(GetServerResourcesResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetServerResourcesErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetServerResourcesResponseBody$ {
/** @deprecated use `GetServerResourcesResponseBody$inboundSchema` instead. */
export const inboundSchema = GetServerResourcesResponseBody$inboundSchema;
/** @deprecated use `GetServerResourcesResponseBody$outboundSchema` instead. */
export const outboundSchema = GetServerResourcesResponseBody$outboundSchema;
/** @deprecated use `GetServerResourcesResponseBody$Outbound` instead. */
export type Outbound = GetServerResourcesResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetSessionHistoryErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetSessionHistoryResponseBodyData = {
errors?: Array<GetSessionHistoryErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetSessionHistoryResponseBody extends Error {
errors?: Array<GetSessionHistoryErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetSessionHistoryResponseBodyData;
constructor(err: GetSessionHistoryResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetSessionHistoryResponseBody";
}
}
/** @internal */
export const GetSessionHistoryErrors$inboundSchema: z.ZodType<
GetSessionHistoryErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetSessionHistoryErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetSessionHistoryErrors$outboundSchema: z.ZodType<
GetSessionHistoryErrors$Outbound,
z.ZodTypeDef,
GetSessionHistoryErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetSessionHistoryErrors$ {
/** @deprecated use `GetSessionHistoryErrors$inboundSchema` instead. */
export const inboundSchema = GetSessionHistoryErrors$inboundSchema;
/** @deprecated use `GetSessionHistoryErrors$outboundSchema` instead. */
export const outboundSchema = GetSessionHistoryErrors$outboundSchema;
/** @deprecated use `GetSessionHistoryErrors$Outbound` instead. */
export type Outbound = GetSessionHistoryErrors$Outbound;
}
/** @internal */
export const GetSessionHistoryResponseBody$inboundSchema: z.ZodType<
GetSessionHistoryResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetSessionHistoryErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetSessionHistoryResponseBody(remapped);
});
/** @internal */
export type GetSessionHistoryResponseBody$Outbound = {
errors?: Array<GetSessionHistoryErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetSessionHistoryResponseBody$outboundSchema: z.ZodType<
GetSessionHistoryResponseBody$Outbound,
z.ZodTypeDef,
GetSessionHistoryResponseBody
> = z
.instanceof(GetSessionHistoryResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetSessionHistoryErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetSessionHistoryResponseBody$ {
/** @deprecated use `GetSessionHistoryResponseBody$inboundSchema` instead. */
export const inboundSchema = GetSessionHistoryResponseBody$inboundSchema;
/** @deprecated use `GetSessionHistoryResponseBody$outboundSchema` instead. */
export const outboundSchema = GetSessionHistoryResponseBody$outboundSchema;
/** @deprecated use `GetSessionHistoryResponseBody$Outbound` instead. */
export type Outbound = GetSessionHistoryResponseBody$Outbound;
}

View File

@@ -0,0 +1,157 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetSessionsErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetSessionsResponseBodyData = {
errors?: Array<GetSessionsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetSessionsResponseBody extends Error {
errors?: Array<GetSessionsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetSessionsResponseBodyData;
constructor(err: GetSessionsResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetSessionsResponseBody";
}
}
/** @internal */
export const GetSessionsErrors$inboundSchema: z.ZodType<GetSessionsErrors, z.ZodTypeDef, unknown> =
z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetSessionsErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetSessionsErrors$outboundSchema: z.ZodType<
GetSessionsErrors$Outbound,
z.ZodTypeDef,
GetSessionsErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetSessionsErrors$ {
/** @deprecated use `GetSessionsErrors$inboundSchema` instead. */
export const inboundSchema = GetSessionsErrors$inboundSchema;
/** @deprecated use `GetSessionsErrors$outboundSchema` instead. */
export const outboundSchema = GetSessionsErrors$outboundSchema;
/** @deprecated use `GetSessionsErrors$Outbound` instead. */
export type Outbound = GetSessionsErrors$Outbound;
}
/** @internal */
export const GetSessionsResponseBody$inboundSchema: z.ZodType<
GetSessionsResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetSessionsErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetSessionsResponseBody(remapped);
});
/** @internal */
export type GetSessionsResponseBody$Outbound = {
errors?: Array<GetSessionsErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetSessionsResponseBody$outboundSchema: z.ZodType<
GetSessionsResponseBody$Outbound,
z.ZodTypeDef,
GetSessionsResponseBody
> = z
.instanceof(GetSessionsResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetSessionsErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetSessionsResponseBody$ {
/** @deprecated use `GetSessionsResponseBody$inboundSchema` instead. */
export const inboundSchema = GetSessionsResponseBody$inboundSchema;
/** @deprecated use `GetSessionsResponseBody$outboundSchema` instead. */
export const outboundSchema = GetSessionsResponseBody$outboundSchema;
/** @deprecated use `GetSessionsResponseBody$Outbound` instead. */
export type Outbound = GetSessionsResponseBody$Outbound;
}

View File

@@ -0,0 +1,164 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetSourceConnectionInformationErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetSourceConnectionInformationResponseBodyData = {
errors?: Array<GetSourceConnectionInformationErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetSourceConnectionInformationResponseBody extends Error {
errors?: Array<GetSourceConnectionInformationErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetSourceConnectionInformationResponseBodyData;
constructor(err: GetSourceConnectionInformationResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetSourceConnectionInformationResponseBody";
}
}
/** @internal */
export const GetSourceConnectionInformationErrors$inboundSchema: z.ZodType<
GetSourceConnectionInformationErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetSourceConnectionInformationErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetSourceConnectionInformationErrors$outboundSchema: z.ZodType<
GetSourceConnectionInformationErrors$Outbound,
z.ZodTypeDef,
GetSourceConnectionInformationErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetSourceConnectionInformationErrors$ {
/** @deprecated use `GetSourceConnectionInformationErrors$inboundSchema` instead. */
export const inboundSchema = GetSourceConnectionInformationErrors$inboundSchema;
/** @deprecated use `GetSourceConnectionInformationErrors$outboundSchema` instead. */
export const outboundSchema = GetSourceConnectionInformationErrors$outboundSchema;
/** @deprecated use `GetSourceConnectionInformationErrors$Outbound` instead. */
export type Outbound = GetSourceConnectionInformationErrors$Outbound;
}
/** @internal */
export const GetSourceConnectionInformationResponseBody$inboundSchema: z.ZodType<
GetSourceConnectionInformationResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z
.array(z.lazy(() => GetSourceConnectionInformationErrors$inboundSchema))
.optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetSourceConnectionInformationResponseBody(remapped);
});
/** @internal */
export type GetSourceConnectionInformationResponseBody$Outbound = {
errors?: Array<GetSourceConnectionInformationErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetSourceConnectionInformationResponseBody$outboundSchema: z.ZodType<
GetSourceConnectionInformationResponseBody$Outbound,
z.ZodTypeDef,
GetSourceConnectionInformationResponseBody
> = z
.instanceof(GetSourceConnectionInformationResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z
.array(z.lazy(() => GetSourceConnectionInformationErrors$outboundSchema))
.optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetSourceConnectionInformationResponseBody$ {
/** @deprecated use `GetSourceConnectionInformationResponseBody$inboundSchema` instead. */
export const inboundSchema = GetSourceConnectionInformationResponseBody$inboundSchema;
/** @deprecated use `GetSourceConnectionInformationResponseBody$outboundSchema` instead. */
export const outboundSchema = GetSourceConnectionInformationResponseBody$outboundSchema;
/** @deprecated use `GetSourceConnectionInformationResponseBody$Outbound` instead. */
export type Outbound = GetSourceConnectionInformationResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetStatisticsErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetStatisticsResponseBodyData = {
errors?: Array<GetStatisticsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetStatisticsResponseBody extends Error {
errors?: Array<GetStatisticsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetStatisticsResponseBodyData;
constructor(err: GetStatisticsResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetStatisticsResponseBody";
}
}
/** @internal */
export const GetStatisticsErrors$inboundSchema: z.ZodType<
GetStatisticsErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetStatisticsErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetStatisticsErrors$outboundSchema: z.ZodType<
GetStatisticsErrors$Outbound,
z.ZodTypeDef,
GetStatisticsErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetStatisticsErrors$ {
/** @deprecated use `GetStatisticsErrors$inboundSchema` instead. */
export const inboundSchema = GetStatisticsErrors$inboundSchema;
/** @deprecated use `GetStatisticsErrors$outboundSchema` instead. */
export const outboundSchema = GetStatisticsErrors$outboundSchema;
/** @deprecated use `GetStatisticsErrors$Outbound` instead. */
export type Outbound = GetStatisticsErrors$Outbound;
}
/** @internal */
export const GetStatisticsResponseBody$inboundSchema: z.ZodType<
GetStatisticsResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetStatisticsErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetStatisticsResponseBody(remapped);
});
/** @internal */
export type GetStatisticsResponseBody$Outbound = {
errors?: Array<GetStatisticsErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetStatisticsResponseBody$outboundSchema: z.ZodType<
GetStatisticsResponseBody$Outbound,
z.ZodTypeDef,
GetStatisticsResponseBody
> = z
.instanceof(GetStatisticsResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetStatisticsErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetStatisticsResponseBody$ {
/** @deprecated use `GetStatisticsResponseBody$inboundSchema` instead. */
export const inboundSchema = GetStatisticsResponseBody$inboundSchema;
/** @deprecated use `GetStatisticsResponseBody$outboundSchema` instead. */
export const outboundSchema = GetStatisticsResponseBody$outboundSchema;
/** @deprecated use `GetStatisticsResponseBody$Outbound` instead. */
export type Outbound = GetStatisticsResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetThumbImageErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetThumbImageResponseBodyData = {
errors?: Array<GetThumbImageErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetThumbImageResponseBody extends Error {
errors?: Array<GetThumbImageErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetThumbImageResponseBodyData;
constructor(err: GetThumbImageResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetThumbImageResponseBody";
}
}
/** @internal */
export const GetThumbImageErrors$inboundSchema: z.ZodType<
GetThumbImageErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetThumbImageErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetThumbImageErrors$outboundSchema: z.ZodType<
GetThumbImageErrors$Outbound,
z.ZodTypeDef,
GetThumbImageErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetThumbImageErrors$ {
/** @deprecated use `GetThumbImageErrors$inboundSchema` instead. */
export const inboundSchema = GetThumbImageErrors$inboundSchema;
/** @deprecated use `GetThumbImageErrors$outboundSchema` instead. */
export const outboundSchema = GetThumbImageErrors$outboundSchema;
/** @deprecated use `GetThumbImageErrors$Outbound` instead. */
export type Outbound = GetThumbImageErrors$Outbound;
}
/** @internal */
export const GetThumbImageResponseBody$inboundSchema: z.ZodType<
GetThumbImageResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetThumbImageErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetThumbImageResponseBody(remapped);
});
/** @internal */
export type GetThumbImageResponseBody$Outbound = {
errors?: Array<GetThumbImageErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetThumbImageResponseBody$outboundSchema: z.ZodType<
GetThumbImageResponseBody$Outbound,
z.ZodTypeDef,
GetThumbImageResponseBody
> = z
.instanceof(GetThumbImageResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetThumbImageErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetThumbImageResponseBody$ {
/** @deprecated use `GetThumbImageResponseBody$inboundSchema` instead. */
export const inboundSchema = GetThumbImageResponseBody$inboundSchema;
/** @deprecated use `GetThumbImageResponseBody$outboundSchema` instead. */
export const outboundSchema = GetThumbImageResponseBody$outboundSchema;
/** @deprecated use `GetThumbImageResponseBody$Outbound` instead. */
export type Outbound = GetThumbImageResponseBody$Outbound;
}

View File

@@ -0,0 +1,157 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetTimelineErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetTimelineResponseBodyData = {
errors?: Array<GetTimelineErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetTimelineResponseBody extends Error {
errors?: Array<GetTimelineErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetTimelineResponseBodyData;
constructor(err: GetTimelineResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetTimelineResponseBody";
}
}
/** @internal */
export const GetTimelineErrors$inboundSchema: z.ZodType<GetTimelineErrors, z.ZodTypeDef, unknown> =
z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetTimelineErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetTimelineErrors$outboundSchema: z.ZodType<
GetTimelineErrors$Outbound,
z.ZodTypeDef,
GetTimelineErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetTimelineErrors$ {
/** @deprecated use `GetTimelineErrors$inboundSchema` instead. */
export const inboundSchema = GetTimelineErrors$inboundSchema;
/** @deprecated use `GetTimelineErrors$outboundSchema` instead. */
export const outboundSchema = GetTimelineErrors$outboundSchema;
/** @deprecated use `GetTimelineErrors$Outbound` instead. */
export type Outbound = GetTimelineErrors$Outbound;
}
/** @internal */
export const GetTimelineResponseBody$inboundSchema: z.ZodType<
GetTimelineResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetTimelineErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetTimelineResponseBody(remapped);
});
/** @internal */
export type GetTimelineResponseBody$Outbound = {
errors?: Array<GetTimelineErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetTimelineResponseBody$outboundSchema: z.ZodType<
GetTimelineResponseBody$Outbound,
z.ZodTypeDef,
GetTimelineResponseBody
> = z
.instanceof(GetTimelineResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetTimelineErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetTimelineResponseBody$ {
/** @deprecated use `GetTimelineResponseBody$inboundSchema` instead. */
export const inboundSchema = GetTimelineResponseBody$inboundSchema;
/** @deprecated use `GetTimelineResponseBody$outboundSchema` instead. */
export const outboundSchema = GetTimelineResponseBody$outboundSchema;
/** @deprecated use `GetTimelineResponseBody$Outbound` instead. */
export type Outbound = GetTimelineResponseBody$Outbound;
}

View File

@@ -0,0 +1,310 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetTokenByPinIdPlexErrors = {
code?: number | undefined;
message?: string | undefined;
};
/**
* Not Found or Expired
*/
export type GetTokenByPinIdPlexResponseBodyData = {
errors?: Array<GetTokenByPinIdPlexErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Not Found or Expired
*/
export class GetTokenByPinIdPlexResponseBody extends Error {
errors?: Array<GetTokenByPinIdPlexErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetTokenByPinIdPlexResponseBodyData;
constructor(err: GetTokenByPinIdPlexResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetTokenByPinIdPlexResponseBody";
}
}
export type GetTokenByPinIdErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Bad Request response when the X-Plex-Client-Identifier is missing
*/
export type GetTokenByPinIdResponseBodyData = {
errors?: Array<GetTokenByPinIdErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Bad Request response when the X-Plex-Client-Identifier is missing
*/
export class GetTokenByPinIdResponseBody extends Error {
errors?: Array<GetTokenByPinIdErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetTokenByPinIdResponseBodyData;
constructor(err: GetTokenByPinIdResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetTokenByPinIdResponseBody";
}
}
/** @internal */
export const GetTokenByPinIdPlexErrors$inboundSchema: z.ZodType<
GetTokenByPinIdPlexErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().int().optional(),
message: z.string().optional(),
});
/** @internal */
export type GetTokenByPinIdPlexErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
};
/** @internal */
export const GetTokenByPinIdPlexErrors$outboundSchema: z.ZodType<
GetTokenByPinIdPlexErrors$Outbound,
z.ZodTypeDef,
GetTokenByPinIdPlexErrors
> = z.object({
code: z.number().int().optional(),
message: z.string().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetTokenByPinIdPlexErrors$ {
/** @deprecated use `GetTokenByPinIdPlexErrors$inboundSchema` instead. */
export const inboundSchema = GetTokenByPinIdPlexErrors$inboundSchema;
/** @deprecated use `GetTokenByPinIdPlexErrors$outboundSchema` instead. */
export const outboundSchema = GetTokenByPinIdPlexErrors$outboundSchema;
/** @deprecated use `GetTokenByPinIdPlexErrors$Outbound` instead. */
export type Outbound = GetTokenByPinIdPlexErrors$Outbound;
}
/** @internal */
export const GetTokenByPinIdPlexResponseBody$inboundSchema: z.ZodType<
GetTokenByPinIdPlexResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetTokenByPinIdPlexErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetTokenByPinIdPlexResponseBody(remapped);
});
/** @internal */
export type GetTokenByPinIdPlexResponseBody$Outbound = {
errors?: Array<GetTokenByPinIdPlexErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetTokenByPinIdPlexResponseBody$outboundSchema: z.ZodType<
GetTokenByPinIdPlexResponseBody$Outbound,
z.ZodTypeDef,
GetTokenByPinIdPlexResponseBody
> = z
.instanceof(GetTokenByPinIdPlexResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetTokenByPinIdPlexErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetTokenByPinIdPlexResponseBody$ {
/** @deprecated use `GetTokenByPinIdPlexResponseBody$inboundSchema` instead. */
export const inboundSchema = GetTokenByPinIdPlexResponseBody$inboundSchema;
/** @deprecated use `GetTokenByPinIdPlexResponseBody$outboundSchema` instead. */
export const outboundSchema = GetTokenByPinIdPlexResponseBody$outboundSchema;
/** @deprecated use `GetTokenByPinIdPlexResponseBody$Outbound` instead. */
export type Outbound = GetTokenByPinIdPlexResponseBody$Outbound;
}
/** @internal */
export const GetTokenByPinIdErrors$inboundSchema: z.ZodType<
GetTokenByPinIdErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().int().optional(),
message: z.string().optional(),
status: z.number().int().optional(),
});
/** @internal */
export type GetTokenByPinIdErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetTokenByPinIdErrors$outboundSchema: z.ZodType<
GetTokenByPinIdErrors$Outbound,
z.ZodTypeDef,
GetTokenByPinIdErrors
> = z.object({
code: z.number().int().optional(),
message: z.string().optional(),
status: z.number().int().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetTokenByPinIdErrors$ {
/** @deprecated use `GetTokenByPinIdErrors$inboundSchema` instead. */
export const inboundSchema = GetTokenByPinIdErrors$inboundSchema;
/** @deprecated use `GetTokenByPinIdErrors$outboundSchema` instead. */
export const outboundSchema = GetTokenByPinIdErrors$outboundSchema;
/** @deprecated use `GetTokenByPinIdErrors$Outbound` instead. */
export type Outbound = GetTokenByPinIdErrors$Outbound;
}
/** @internal */
export const GetTokenByPinIdResponseBody$inboundSchema: z.ZodType<
GetTokenByPinIdResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetTokenByPinIdErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetTokenByPinIdResponseBody(remapped);
});
/** @internal */
export type GetTokenByPinIdResponseBody$Outbound = {
errors?: Array<GetTokenByPinIdErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetTokenByPinIdResponseBody$outboundSchema: z.ZodType<
GetTokenByPinIdResponseBody$Outbound,
z.ZodTypeDef,
GetTokenByPinIdResponseBody
> = z
.instanceof(GetTokenByPinIdResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetTokenByPinIdErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetTokenByPinIdResponseBody$ {
/** @deprecated use `GetTokenByPinIdResponseBody$inboundSchema` instead. */
export const inboundSchema = GetTokenByPinIdResponseBody$inboundSchema;
/** @deprecated use `GetTokenByPinIdResponseBody$outboundSchema` instead. */
export const outboundSchema = GetTokenByPinIdResponseBody$outboundSchema;
/** @deprecated use `GetTokenByPinIdResponseBody$Outbound` instead. */
export type Outbound = GetTokenByPinIdResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetTopWatchedContentErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetTopWatchedContentResponseBodyData = {
errors?: Array<GetTopWatchedContentErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetTopWatchedContentResponseBody extends Error {
errors?: Array<GetTopWatchedContentErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetTopWatchedContentResponseBodyData;
constructor(err: GetTopWatchedContentResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetTopWatchedContentResponseBody";
}
}
/** @internal */
export const GetTopWatchedContentErrors$inboundSchema: z.ZodType<
GetTopWatchedContentErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetTopWatchedContentErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetTopWatchedContentErrors$outboundSchema: z.ZodType<
GetTopWatchedContentErrors$Outbound,
z.ZodTypeDef,
GetTopWatchedContentErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetTopWatchedContentErrors$ {
/** @deprecated use `GetTopWatchedContentErrors$inboundSchema` instead. */
export const inboundSchema = GetTopWatchedContentErrors$inboundSchema;
/** @deprecated use `GetTopWatchedContentErrors$outboundSchema` instead. */
export const outboundSchema = GetTopWatchedContentErrors$outboundSchema;
/** @deprecated use `GetTopWatchedContentErrors$Outbound` instead. */
export type Outbound = GetTopWatchedContentErrors$Outbound;
}
/** @internal */
export const GetTopWatchedContentResponseBody$inboundSchema: z.ZodType<
GetTopWatchedContentResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetTopWatchedContentErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetTopWatchedContentResponseBody(remapped);
});
/** @internal */
export type GetTopWatchedContentResponseBody$Outbound = {
errors?: Array<GetTopWatchedContentErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetTopWatchedContentResponseBody$outboundSchema: z.ZodType<
GetTopWatchedContentResponseBody$Outbound,
z.ZodTypeDef,
GetTopWatchedContentResponseBody
> = z
.instanceof(GetTopWatchedContentResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetTopWatchedContentErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetTopWatchedContentResponseBody$ {
/** @deprecated use `GetTopWatchedContentResponseBody$inboundSchema` instead. */
export const inboundSchema = GetTopWatchedContentResponseBody$inboundSchema;
/** @deprecated use `GetTopWatchedContentResponseBody$outboundSchema` instead. */
export const outboundSchema = GetTopWatchedContentResponseBody$outboundSchema;
/** @deprecated use `GetTopWatchedContentResponseBody$Outbound` instead. */
export type Outbound = GetTopWatchedContentResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetTranscodeSessionsErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetTranscodeSessionsResponseBodyData = {
errors?: Array<GetTranscodeSessionsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetTranscodeSessionsResponseBody extends Error {
errors?: Array<GetTranscodeSessionsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetTranscodeSessionsResponseBodyData;
constructor(err: GetTranscodeSessionsResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetTranscodeSessionsResponseBody";
}
}
/** @internal */
export const GetTranscodeSessionsErrors$inboundSchema: z.ZodType<
GetTranscodeSessionsErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetTranscodeSessionsErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetTranscodeSessionsErrors$outboundSchema: z.ZodType<
GetTranscodeSessionsErrors$Outbound,
z.ZodTypeDef,
GetTranscodeSessionsErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetTranscodeSessionsErrors$ {
/** @deprecated use `GetTranscodeSessionsErrors$inboundSchema` instead. */
export const inboundSchema = GetTranscodeSessionsErrors$inboundSchema;
/** @deprecated use `GetTranscodeSessionsErrors$outboundSchema` instead. */
export const outboundSchema = GetTranscodeSessionsErrors$outboundSchema;
/** @deprecated use `GetTranscodeSessionsErrors$Outbound` instead. */
export type Outbound = GetTranscodeSessionsErrors$Outbound;
}
/** @internal */
export const GetTranscodeSessionsResponseBody$inboundSchema: z.ZodType<
GetTranscodeSessionsResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetTranscodeSessionsErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetTranscodeSessionsResponseBody(remapped);
});
/** @internal */
export type GetTranscodeSessionsResponseBody$Outbound = {
errors?: Array<GetTranscodeSessionsErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetTranscodeSessionsResponseBody$outboundSchema: z.ZodType<
GetTranscodeSessionsResponseBody$Outbound,
z.ZodTypeDef,
GetTranscodeSessionsResponseBody
> = z
.instanceof(GetTranscodeSessionsResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetTranscodeSessionsErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetTranscodeSessionsResponseBody$ {
/** @deprecated use `GetTranscodeSessionsResponseBody$inboundSchema` instead. */
export const inboundSchema = GetTranscodeSessionsResponseBody$inboundSchema;
/** @deprecated use `GetTranscodeSessionsResponseBody$outboundSchema` instead. */
export const outboundSchema = GetTranscodeSessionsResponseBody$outboundSchema;
/** @deprecated use `GetTranscodeSessionsResponseBody$Outbound` instead. */
export type Outbound = GetTranscodeSessionsResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetTransientTokenErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetTransientTokenResponseBodyData = {
errors?: Array<GetTransientTokenErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetTransientTokenResponseBody extends Error {
errors?: Array<GetTransientTokenErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetTransientTokenResponseBodyData;
constructor(err: GetTransientTokenResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetTransientTokenResponseBody";
}
}
/** @internal */
export const GetTransientTokenErrors$inboundSchema: z.ZodType<
GetTransientTokenErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetTransientTokenErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetTransientTokenErrors$outboundSchema: z.ZodType<
GetTransientTokenErrors$Outbound,
z.ZodTypeDef,
GetTransientTokenErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetTransientTokenErrors$ {
/** @deprecated use `GetTransientTokenErrors$inboundSchema` instead. */
export const inboundSchema = GetTransientTokenErrors$inboundSchema;
/** @deprecated use `GetTransientTokenErrors$outboundSchema` instead. */
export const outboundSchema = GetTransientTokenErrors$outboundSchema;
/** @deprecated use `GetTransientTokenErrors$Outbound` instead. */
export type Outbound = GetTransientTokenErrors$Outbound;
}
/** @internal */
export const GetTransientTokenResponseBody$inboundSchema: z.ZodType<
GetTransientTokenResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetTransientTokenErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetTransientTokenResponseBody(remapped);
});
/** @internal */
export type GetTransientTokenResponseBody$Outbound = {
errors?: Array<GetTransientTokenErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetTransientTokenResponseBody$outboundSchema: z.ZodType<
GetTransientTokenResponseBody$Outbound,
z.ZodTypeDef,
GetTransientTokenResponseBody
> = z
.instanceof(GetTransientTokenResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetTransientTokenErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetTransientTokenResponseBody$ {
/** @deprecated use `GetTransientTokenResponseBody$inboundSchema` instead. */
export const inboundSchema = GetTransientTokenResponseBody$inboundSchema;
/** @deprecated use `GetTransientTokenResponseBody$outboundSchema` instead. */
export const outboundSchema = GetTransientTokenResponseBody$outboundSchema;
/** @deprecated use `GetTransientTokenResponseBody$Outbound` instead. */
export type Outbound = GetTransientTokenResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetUpdateStatusErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetUpdateStatusResponseBodyData = {
errors?: Array<GetUpdateStatusErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetUpdateStatusResponseBody extends Error {
errors?: Array<GetUpdateStatusErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetUpdateStatusResponseBodyData;
constructor(err: GetUpdateStatusResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetUpdateStatusResponseBody";
}
}
/** @internal */
export const GetUpdateStatusErrors$inboundSchema: z.ZodType<
GetUpdateStatusErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetUpdateStatusErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetUpdateStatusErrors$outboundSchema: z.ZodType<
GetUpdateStatusErrors$Outbound,
z.ZodTypeDef,
GetUpdateStatusErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetUpdateStatusErrors$ {
/** @deprecated use `GetUpdateStatusErrors$inboundSchema` instead. */
export const inboundSchema = GetUpdateStatusErrors$inboundSchema;
/** @deprecated use `GetUpdateStatusErrors$outboundSchema` instead. */
export const outboundSchema = GetUpdateStatusErrors$outboundSchema;
/** @deprecated use `GetUpdateStatusErrors$Outbound` instead. */
export type Outbound = GetUpdateStatusErrors$Outbound;
}
/** @internal */
export const GetUpdateStatusResponseBody$inboundSchema: z.ZodType<
GetUpdateStatusResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetUpdateStatusErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetUpdateStatusResponseBody(remapped);
});
/** @internal */
export type GetUpdateStatusResponseBody$Outbound = {
errors?: Array<GetUpdateStatusErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetUpdateStatusResponseBody$outboundSchema: z.ZodType<
GetUpdateStatusResponseBody$Outbound,
z.ZodTypeDef,
GetUpdateStatusResponseBody
> = z
.instanceof(GetUpdateStatusResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetUpdateStatusErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetUpdateStatusResponseBody$ {
/** @deprecated use `GetUpdateStatusResponseBody$inboundSchema` instead. */
export const inboundSchema = GetUpdateStatusResponseBody$inboundSchema;
/** @deprecated use `GetUpdateStatusResponseBody$outboundSchema` instead. */
export const outboundSchema = GetUpdateStatusResponseBody$outboundSchema;
/** @deprecated use `GetUpdateStatusResponseBody$Outbound` instead. */
export type Outbound = GetUpdateStatusResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetUserDetailsErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetUserDetailsResponseBodyData = {
errors?: Array<GetUserDetailsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetUserDetailsResponseBody extends Error {
errors?: Array<GetUserDetailsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetUserDetailsResponseBodyData;
constructor(err: GetUserDetailsResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetUserDetailsResponseBody";
}
}
/** @internal */
export const GetUserDetailsErrors$inboundSchema: z.ZodType<
GetUserDetailsErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetUserDetailsErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetUserDetailsErrors$outboundSchema: z.ZodType<
GetUserDetailsErrors$Outbound,
z.ZodTypeDef,
GetUserDetailsErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetUserDetailsErrors$ {
/** @deprecated use `GetUserDetailsErrors$inboundSchema` instead. */
export const inboundSchema = GetUserDetailsErrors$inboundSchema;
/** @deprecated use `GetUserDetailsErrors$outboundSchema` instead. */
export const outboundSchema = GetUserDetailsErrors$outboundSchema;
/** @deprecated use `GetUserDetailsErrors$Outbound` instead. */
export type Outbound = GetUserDetailsErrors$Outbound;
}
/** @internal */
export const GetUserDetailsResponseBody$inboundSchema: z.ZodType<
GetUserDetailsResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetUserDetailsErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetUserDetailsResponseBody(remapped);
});
/** @internal */
export type GetUserDetailsResponseBody$Outbound = {
errors?: Array<GetUserDetailsErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetUserDetailsResponseBody$outboundSchema: z.ZodType<
GetUserDetailsResponseBody$Outbound,
z.ZodTypeDef,
GetUserDetailsResponseBody
> = z
.instanceof(GetUserDetailsResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetUserDetailsErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetUserDetailsResponseBody$ {
/** @deprecated use `GetUserDetailsResponseBody$inboundSchema` instead. */
export const inboundSchema = GetUserDetailsResponseBody$inboundSchema;
/** @deprecated use `GetUserDetailsResponseBody$outboundSchema` instead. */
export const outboundSchema = GetUserDetailsResponseBody$outboundSchema;
/** @deprecated use `GetUserDetailsResponseBody$Outbound` instead. */
export type Outbound = GetUserDetailsResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetUserFriendsErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetUserFriendsResponseBodyData = {
errors?: Array<GetUserFriendsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetUserFriendsResponseBody extends Error {
errors?: Array<GetUserFriendsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetUserFriendsResponseBodyData;
constructor(err: GetUserFriendsResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetUserFriendsResponseBody";
}
}
/** @internal */
export const GetUserFriendsErrors$inboundSchema: z.ZodType<
GetUserFriendsErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetUserFriendsErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetUserFriendsErrors$outboundSchema: z.ZodType<
GetUserFriendsErrors$Outbound,
z.ZodTypeDef,
GetUserFriendsErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetUserFriendsErrors$ {
/** @deprecated use `GetUserFriendsErrors$inboundSchema` instead. */
export const inboundSchema = GetUserFriendsErrors$inboundSchema;
/** @deprecated use `GetUserFriendsErrors$outboundSchema` instead. */
export const outboundSchema = GetUserFriendsErrors$outboundSchema;
/** @deprecated use `GetUserFriendsErrors$Outbound` instead. */
export type Outbound = GetUserFriendsErrors$Outbound;
}
/** @internal */
export const GetUserFriendsResponseBody$inboundSchema: z.ZodType<
GetUserFriendsResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetUserFriendsErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetUserFriendsResponseBody(remapped);
});
/** @internal */
export type GetUserFriendsResponseBody$Outbound = {
errors?: Array<GetUserFriendsErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetUserFriendsResponseBody$outboundSchema: z.ZodType<
GetUserFriendsResponseBody$Outbound,
z.ZodTypeDef,
GetUserFriendsResponseBody
> = z
.instanceof(GetUserFriendsResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetUserFriendsErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetUserFriendsResponseBody$ {
/** @deprecated use `GetUserFriendsResponseBody$inboundSchema` instead. */
export const inboundSchema = GetUserFriendsResponseBody$inboundSchema;
/** @deprecated use `GetUserFriendsResponseBody$outboundSchema` instead. */
export const outboundSchema = GetUserFriendsResponseBody$outboundSchema;
/** @deprecated use `GetUserFriendsResponseBody$Outbound` instead. */
export type Outbound = GetUserFriendsResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetWatchListErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type GetWatchListResponseBodyData = {
errors?: Array<GetWatchListErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetWatchListResponseBody extends Error {
errors?: Array<GetWatchListErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetWatchListResponseBodyData;
constructor(err: GetWatchListResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "GetWatchListResponseBody";
}
}
/** @internal */
export const GetWatchListErrors$inboundSchema: z.ZodType<
GetWatchListErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type GetWatchListErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const GetWatchListErrors$outboundSchema: z.ZodType<
GetWatchListErrors$Outbound,
z.ZodTypeDef,
GetWatchListErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetWatchListErrors$ {
/** @deprecated use `GetWatchListErrors$inboundSchema` instead. */
export const inboundSchema = GetWatchListErrors$inboundSchema;
/** @deprecated use `GetWatchListErrors$outboundSchema` instead. */
export const outboundSchema = GetWatchListErrors$outboundSchema;
/** @deprecated use `GetWatchListErrors$Outbound` instead. */
export type Outbound = GetWatchListErrors$Outbound;
}
/** @internal */
export const GetWatchListResponseBody$inboundSchema: z.ZodType<
GetWatchListResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => GetWatchListErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new GetWatchListResponseBody(remapped);
});
/** @internal */
export type GetWatchListResponseBody$Outbound = {
errors?: Array<GetWatchListErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const GetWatchListResponseBody$outboundSchema: z.ZodType<
GetWatchListResponseBody$Outbound,
z.ZodTypeDef,
GetWatchListResponseBody
> = z
.instanceof(GetWatchListResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => GetWatchListErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetWatchListResponseBody$ {
/** @deprecated use `GetWatchListResponseBody$inboundSchema` instead. */
export const inboundSchema = GetWatchListResponseBody$inboundSchema;
/** @deprecated use `GetWatchListResponseBody$outboundSchema` instead. */
export const outboundSchema = GetWatchListResponseBody$outboundSchema;
/** @deprecated use `GetWatchListResponseBody$Outbound` instead. */
export type Outbound = GetWatchListResponseBody$Outbound;
}

View File

@@ -0,0 +1,62 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
/**
* Base class for all HTTP errors.
*/
export class HTTPClientError extends Error {
/** The underlying cause of the error. */
override readonly cause: unknown;
override name = "HTTPClientError";
constructor(message: string, opts?: { cause?: unknown }) {
let msg = message;
if (opts?.cause) {
msg += `: ${opts.cause}`;
}
super(msg, opts);
// In older runtimes, the cause field would not have been assigned through
// the super() call.
if (typeof this.cause === "undefined") {
this.cause = opts?.cause;
}
}
}
/**
* An error to capture unrecognised or unexpected errors when making HTTP calls.
*/
export class UnexpectedClientError extends HTTPClientError {
override name = "UnexpectedClientError";
}
/**
* An error that is raised when any inputs used to create a request are invalid.
*/
export class InvalidRequestError extends HTTPClientError {
override name = "InvalidRequestError";
}
/**
* An error that is raised when a HTTP request was aborted by the client error.
*/
export class RequestAbortedError extends HTTPClientError {
override readonly name = "RequestAbortedError";
}
/**
* An error that is raised when a HTTP request timed out due to an AbortSignal
* signal timeout.
*/
export class RequestTimeoutError extends HTTPClientError {
override readonly name = "RequestTimeoutError";
}
/**
* An error that is raised when a HTTP client is unable to make a request to
* a server.
*/
export class ConnectionError extends HTTPClientError {
override readonly name = "ConnectionError";
}

View File

@@ -0,0 +1,81 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
export * from "./addplaylistcontents.js";
export * from "./applyupdates.js";
export * from "./cancelserveractivities.js";
export * from "./checkforupdates.js";
export * from "./clearplaylistcontents.js";
export * from "./createplaylist.js";
export * from "./deletelibrary.js";
export * from "./deleteplaylist.js";
export * from "./enablepapertrail.js";
export * from "./getalllibraries.js";
export * from "./getavailableclients.js";
export * from "./getbandwidthstatistics.js";
export * from "./getbannerimage.js";
export * from "./getbutlertasks.js";
export * from "./getcompanionsdata.js";
export * from "./getdevices.js";
export * from "./getfilehash.js";
export * from "./getgeodata.js";
export * from "./getglobalhubs.js";
export * from "./gethomedata.js";
export * from "./getlibrarydetails.js";
export * from "./getlibraryhubs.js";
export * from "./getlibraryitems.js";
export * from "./getmediaproviders.js";
export * from "./getmetadatabyratingkey.js";
export * from "./getmetadatachildren.js";
export * from "./getmyplexaccount.js";
export * from "./getondeck.js";
export * from "./getpin.js";
export * from "./getplaylist.js";
export * from "./getplaylistcontents.js";
export * from "./getplaylists.js";
export * from "./getrecentlyadded.js";
export * from "./getrefreshlibrarymetadata.js";
export * from "./getresizedphoto.js";
export * from "./getresourcesstatistics.js";
export * from "./getsearchlibrary.js";
export * from "./getsearchresults.js";
export * from "./getserveractivities.js";
export * from "./getservercapabilities.js";
export * from "./getserveridentity.js";
export * from "./getserverlist.js";
export * from "./getserverpreferences.js";
export * from "./getserverresources.js";
export * from "./getsessionhistory.js";
export * from "./getsessions.js";
export * from "./getsourceconnectioninformation.js";
export * from "./getstatistics.js";
export * from "./getthumbimage.js";
export * from "./gettimeline.js";
export * from "./gettokenbypinid.js";
export * from "./gettopwatchedcontent.js";
export * from "./gettranscodesessions.js";
export * from "./gettransienttoken.js";
export * from "./getupdatestatus.js";
export * from "./getuserdetails.js";
export * from "./getuserfriends.js";
export * from "./getwatchlist.js";
export * from "./httpclienterrors.js";
export * from "./logline.js";
export * from "./logmultiline.js";
export * from "./markplayed.js";
export * from "./markunplayed.js";
export * from "./performsearch.js";
export * from "./performvoicesearch.js";
export * from "./postuserssignindata.js";
export * from "./sdkerror.js";
export * from "./sdkvalidationerror.js";
export * from "./startalltasks.js";
export * from "./starttask.js";
export * from "./startuniversaltranscode.js";
export * from "./stopalltasks.js";
export * from "./stoptask.js";
export * from "./stoptranscodesession.js";
export * from "./updateplaylist.js";
export * from "./updateplayprogress.js";
export * from "./uploadplaylist.js";

View File

@@ -0,0 +1,157 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type LogLineErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type LogLineResponseBodyData = {
errors?: Array<LogLineErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class LogLineResponseBody extends Error {
errors?: Array<LogLineErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: LogLineResponseBodyData;
constructor(err: LogLineResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "LogLineResponseBody";
}
}
/** @internal */
export const LogLineErrors$inboundSchema: z.ZodType<LogLineErrors, z.ZodTypeDef, unknown> =
z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type LogLineErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const LogLineErrors$outboundSchema: z.ZodType<
LogLineErrors$Outbound,
z.ZodTypeDef,
LogLineErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace LogLineErrors$ {
/** @deprecated use `LogLineErrors$inboundSchema` instead. */
export const inboundSchema = LogLineErrors$inboundSchema;
/** @deprecated use `LogLineErrors$outboundSchema` instead. */
export const outboundSchema = LogLineErrors$outboundSchema;
/** @deprecated use `LogLineErrors$Outbound` instead. */
export type Outbound = LogLineErrors$Outbound;
}
/** @internal */
export const LogLineResponseBody$inboundSchema: z.ZodType<
LogLineResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => LogLineErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new LogLineResponseBody(remapped);
});
/** @internal */
export type LogLineResponseBody$Outbound = {
errors?: Array<LogLineErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const LogLineResponseBody$outboundSchema: z.ZodType<
LogLineResponseBody$Outbound,
z.ZodTypeDef,
LogLineResponseBody
> = z
.instanceof(LogLineResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => LogLineErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace LogLineResponseBody$ {
/** @deprecated use `LogLineResponseBody$inboundSchema` instead. */
export const inboundSchema = LogLineResponseBody$inboundSchema;
/** @deprecated use `LogLineResponseBody$outboundSchema` instead. */
export const outboundSchema = LogLineResponseBody$outboundSchema;
/** @deprecated use `LogLineResponseBody$Outbound` instead. */
export type Outbound = LogLineResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type LogMultiLineErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type LogMultiLineResponseBodyData = {
errors?: Array<LogMultiLineErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class LogMultiLineResponseBody extends Error {
errors?: Array<LogMultiLineErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: LogMultiLineResponseBodyData;
constructor(err: LogMultiLineResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "LogMultiLineResponseBody";
}
}
/** @internal */
export const LogMultiLineErrors$inboundSchema: z.ZodType<
LogMultiLineErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type LogMultiLineErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const LogMultiLineErrors$outboundSchema: z.ZodType<
LogMultiLineErrors$Outbound,
z.ZodTypeDef,
LogMultiLineErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace LogMultiLineErrors$ {
/** @deprecated use `LogMultiLineErrors$inboundSchema` instead. */
export const inboundSchema = LogMultiLineErrors$inboundSchema;
/** @deprecated use `LogMultiLineErrors$outboundSchema` instead. */
export const outboundSchema = LogMultiLineErrors$outboundSchema;
/** @deprecated use `LogMultiLineErrors$Outbound` instead. */
export type Outbound = LogMultiLineErrors$Outbound;
}
/** @internal */
export const LogMultiLineResponseBody$inboundSchema: z.ZodType<
LogMultiLineResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => LogMultiLineErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new LogMultiLineResponseBody(remapped);
});
/** @internal */
export type LogMultiLineResponseBody$Outbound = {
errors?: Array<LogMultiLineErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const LogMultiLineResponseBody$outboundSchema: z.ZodType<
LogMultiLineResponseBody$Outbound,
z.ZodTypeDef,
LogMultiLineResponseBody
> = z
.instanceof(LogMultiLineResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => LogMultiLineErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace LogMultiLineResponseBody$ {
/** @deprecated use `LogMultiLineResponseBody$inboundSchema` instead. */
export const inboundSchema = LogMultiLineResponseBody$inboundSchema;
/** @deprecated use `LogMultiLineResponseBody$outboundSchema` instead. */
export const outboundSchema = LogMultiLineResponseBody$outboundSchema;
/** @deprecated use `LogMultiLineResponseBody$Outbound` instead. */
export type Outbound = LogMultiLineResponseBody$Outbound;
}

View File

@@ -0,0 +1,157 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type MarkPlayedErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type MarkPlayedResponseBodyData = {
errors?: Array<MarkPlayedErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class MarkPlayedResponseBody extends Error {
errors?: Array<MarkPlayedErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: MarkPlayedResponseBodyData;
constructor(err: MarkPlayedResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "MarkPlayedResponseBody";
}
}
/** @internal */
export const MarkPlayedErrors$inboundSchema: z.ZodType<MarkPlayedErrors, z.ZodTypeDef, unknown> =
z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type MarkPlayedErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const MarkPlayedErrors$outboundSchema: z.ZodType<
MarkPlayedErrors$Outbound,
z.ZodTypeDef,
MarkPlayedErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace MarkPlayedErrors$ {
/** @deprecated use `MarkPlayedErrors$inboundSchema` instead. */
export const inboundSchema = MarkPlayedErrors$inboundSchema;
/** @deprecated use `MarkPlayedErrors$outboundSchema` instead. */
export const outboundSchema = MarkPlayedErrors$outboundSchema;
/** @deprecated use `MarkPlayedErrors$Outbound` instead. */
export type Outbound = MarkPlayedErrors$Outbound;
}
/** @internal */
export const MarkPlayedResponseBody$inboundSchema: z.ZodType<
MarkPlayedResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => MarkPlayedErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new MarkPlayedResponseBody(remapped);
});
/** @internal */
export type MarkPlayedResponseBody$Outbound = {
errors?: Array<MarkPlayedErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const MarkPlayedResponseBody$outboundSchema: z.ZodType<
MarkPlayedResponseBody$Outbound,
z.ZodTypeDef,
MarkPlayedResponseBody
> = z
.instanceof(MarkPlayedResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => MarkPlayedErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace MarkPlayedResponseBody$ {
/** @deprecated use `MarkPlayedResponseBody$inboundSchema` instead. */
export const inboundSchema = MarkPlayedResponseBody$inboundSchema;
/** @deprecated use `MarkPlayedResponseBody$outboundSchema` instead. */
export const outboundSchema = MarkPlayedResponseBody$outboundSchema;
/** @deprecated use `MarkPlayedResponseBody$Outbound` instead. */
export type Outbound = MarkPlayedResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type MarkUnplayedErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type MarkUnplayedResponseBodyData = {
errors?: Array<MarkUnplayedErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class MarkUnplayedResponseBody extends Error {
errors?: Array<MarkUnplayedErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: MarkUnplayedResponseBodyData;
constructor(err: MarkUnplayedResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "MarkUnplayedResponseBody";
}
}
/** @internal */
export const MarkUnplayedErrors$inboundSchema: z.ZodType<
MarkUnplayedErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type MarkUnplayedErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const MarkUnplayedErrors$outboundSchema: z.ZodType<
MarkUnplayedErrors$Outbound,
z.ZodTypeDef,
MarkUnplayedErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace MarkUnplayedErrors$ {
/** @deprecated use `MarkUnplayedErrors$inboundSchema` instead. */
export const inboundSchema = MarkUnplayedErrors$inboundSchema;
/** @deprecated use `MarkUnplayedErrors$outboundSchema` instead. */
export const outboundSchema = MarkUnplayedErrors$outboundSchema;
/** @deprecated use `MarkUnplayedErrors$Outbound` instead. */
export type Outbound = MarkUnplayedErrors$Outbound;
}
/** @internal */
export const MarkUnplayedResponseBody$inboundSchema: z.ZodType<
MarkUnplayedResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => MarkUnplayedErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new MarkUnplayedResponseBody(remapped);
});
/** @internal */
export type MarkUnplayedResponseBody$Outbound = {
errors?: Array<MarkUnplayedErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const MarkUnplayedResponseBody$outboundSchema: z.ZodType<
MarkUnplayedResponseBody$Outbound,
z.ZodTypeDef,
MarkUnplayedResponseBody
> = z
.instanceof(MarkUnplayedResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => MarkUnplayedErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace MarkUnplayedResponseBody$ {
/** @deprecated use `MarkUnplayedResponseBody$inboundSchema` instead. */
export const inboundSchema = MarkUnplayedResponseBody$inboundSchema;
/** @deprecated use `MarkUnplayedResponseBody$outboundSchema` instead. */
export const outboundSchema = MarkUnplayedResponseBody$outboundSchema;
/** @deprecated use `MarkUnplayedResponseBody$Outbound` instead. */
export type Outbound = MarkUnplayedResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type PerformSearchErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type PerformSearchResponseBodyData = {
errors?: Array<PerformSearchErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class PerformSearchResponseBody extends Error {
errors?: Array<PerformSearchErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: PerformSearchResponseBodyData;
constructor(err: PerformSearchResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "PerformSearchResponseBody";
}
}
/** @internal */
export const PerformSearchErrors$inboundSchema: z.ZodType<
PerformSearchErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type PerformSearchErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const PerformSearchErrors$outboundSchema: z.ZodType<
PerformSearchErrors$Outbound,
z.ZodTypeDef,
PerformSearchErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace PerformSearchErrors$ {
/** @deprecated use `PerformSearchErrors$inboundSchema` instead. */
export const inboundSchema = PerformSearchErrors$inboundSchema;
/** @deprecated use `PerformSearchErrors$outboundSchema` instead. */
export const outboundSchema = PerformSearchErrors$outboundSchema;
/** @deprecated use `PerformSearchErrors$Outbound` instead. */
export type Outbound = PerformSearchErrors$Outbound;
}
/** @internal */
export const PerformSearchResponseBody$inboundSchema: z.ZodType<
PerformSearchResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => PerformSearchErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new PerformSearchResponseBody(remapped);
});
/** @internal */
export type PerformSearchResponseBody$Outbound = {
errors?: Array<PerformSearchErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const PerformSearchResponseBody$outboundSchema: z.ZodType<
PerformSearchResponseBody$Outbound,
z.ZodTypeDef,
PerformSearchResponseBody
> = z
.instanceof(PerformSearchResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => PerformSearchErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace PerformSearchResponseBody$ {
/** @deprecated use `PerformSearchResponseBody$inboundSchema` instead. */
export const inboundSchema = PerformSearchResponseBody$inboundSchema;
/** @deprecated use `PerformSearchResponseBody$outboundSchema` instead. */
export const outboundSchema = PerformSearchResponseBody$outboundSchema;
/** @deprecated use `PerformSearchResponseBody$Outbound` instead. */
export type Outbound = PerformSearchResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type PerformVoiceSearchErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type PerformVoiceSearchResponseBodyData = {
errors?: Array<PerformVoiceSearchErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class PerformVoiceSearchResponseBody extends Error {
errors?: Array<PerformVoiceSearchErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: PerformVoiceSearchResponseBodyData;
constructor(err: PerformVoiceSearchResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "PerformVoiceSearchResponseBody";
}
}
/** @internal */
export const PerformVoiceSearchErrors$inboundSchema: z.ZodType<
PerformVoiceSearchErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type PerformVoiceSearchErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const PerformVoiceSearchErrors$outboundSchema: z.ZodType<
PerformVoiceSearchErrors$Outbound,
z.ZodTypeDef,
PerformVoiceSearchErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace PerformVoiceSearchErrors$ {
/** @deprecated use `PerformVoiceSearchErrors$inboundSchema` instead. */
export const inboundSchema = PerformVoiceSearchErrors$inboundSchema;
/** @deprecated use `PerformVoiceSearchErrors$outboundSchema` instead. */
export const outboundSchema = PerformVoiceSearchErrors$outboundSchema;
/** @deprecated use `PerformVoiceSearchErrors$Outbound` instead. */
export type Outbound = PerformVoiceSearchErrors$Outbound;
}
/** @internal */
export const PerformVoiceSearchResponseBody$inboundSchema: z.ZodType<
PerformVoiceSearchResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => PerformVoiceSearchErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new PerformVoiceSearchResponseBody(remapped);
});
/** @internal */
export type PerformVoiceSearchResponseBody$Outbound = {
errors?: Array<PerformVoiceSearchErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const PerformVoiceSearchResponseBody$outboundSchema: z.ZodType<
PerformVoiceSearchResponseBody$Outbound,
z.ZodTypeDef,
PerformVoiceSearchResponseBody
> = z
.instanceof(PerformVoiceSearchResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => PerformVoiceSearchErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace PerformVoiceSearchResponseBody$ {
/** @deprecated use `PerformVoiceSearchResponseBody$inboundSchema` instead. */
export const inboundSchema = PerformVoiceSearchResponseBody$inboundSchema;
/** @deprecated use `PerformVoiceSearchResponseBody$outboundSchema` instead. */
export const outboundSchema = PerformVoiceSearchResponseBody$outboundSchema;
/** @deprecated use `PerformVoiceSearchResponseBody$Outbound` instead. */
export type Outbound = PerformVoiceSearchResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type PostUsersSignInDataErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type PostUsersSignInDataResponseBodyData = {
errors?: Array<PostUsersSignInDataErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class PostUsersSignInDataResponseBody extends Error {
errors?: Array<PostUsersSignInDataErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: PostUsersSignInDataResponseBodyData;
constructor(err: PostUsersSignInDataResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "PostUsersSignInDataResponseBody";
}
}
/** @internal */
export const PostUsersSignInDataErrors$inboundSchema: z.ZodType<
PostUsersSignInDataErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type PostUsersSignInDataErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const PostUsersSignInDataErrors$outboundSchema: z.ZodType<
PostUsersSignInDataErrors$Outbound,
z.ZodTypeDef,
PostUsersSignInDataErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace PostUsersSignInDataErrors$ {
/** @deprecated use `PostUsersSignInDataErrors$inboundSchema` instead. */
export const inboundSchema = PostUsersSignInDataErrors$inboundSchema;
/** @deprecated use `PostUsersSignInDataErrors$outboundSchema` instead. */
export const outboundSchema = PostUsersSignInDataErrors$outboundSchema;
/** @deprecated use `PostUsersSignInDataErrors$Outbound` instead. */
export type Outbound = PostUsersSignInDataErrors$Outbound;
}
/** @internal */
export const PostUsersSignInDataResponseBody$inboundSchema: z.ZodType<
PostUsersSignInDataResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => PostUsersSignInDataErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new PostUsersSignInDataResponseBody(remapped);
});
/** @internal */
export type PostUsersSignInDataResponseBody$Outbound = {
errors?: Array<PostUsersSignInDataErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const PostUsersSignInDataResponseBody$outboundSchema: z.ZodType<
PostUsersSignInDataResponseBody$Outbound,
z.ZodTypeDef,
PostUsersSignInDataResponseBody
> = z
.instanceof(PostUsersSignInDataResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => PostUsersSignInDataErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace PostUsersSignInDataResponseBody$ {
/** @deprecated use `PostUsersSignInDataResponseBody$inboundSchema` instead. */
export const inboundSchema = PostUsersSignInDataResponseBody$inboundSchema;
/** @deprecated use `PostUsersSignInDataResponseBody$outboundSchema` instead. */
export const outboundSchema = PostUsersSignInDataResponseBody$outboundSchema;
/** @deprecated use `PostUsersSignInDataResponseBody$Outbound` instead. */
export type Outbound = PostUsersSignInDataResponseBody$Outbound;
}

View File

@@ -0,0 +1,25 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
export class SDKError extends Error {
public readonly statusCode: number;
public readonly contentType: string;
constructor(
message: string,
public readonly rawResponse: Response,
public readonly body: string = ""
) {
const statusCode = rawResponse.status;
const contentType = rawResponse.headers.get("content-type") || "";
const bodyString = body.length > 0 ? `\n${body}` : "";
super(`${message}: Status ${statusCode} Content-Type ${contentType} Body ${bodyString}`);
this.statusCode = statusCode;
this.contentType = contentType;
this.name = "SDKError";
}
}

View File

@@ -0,0 +1,97 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod";
export class SDKValidationError extends Error {
/**
* The raw value that failed validation.
*/
public readonly rawValue: unknown;
/**
* The raw message that failed validation.
*/
public readonly rawMessage: unknown;
constructor(message: string, cause: unknown, rawValue: unknown) {
super(`${message}: ${cause}`);
this.name = "SDKValidationError";
this.cause = cause;
this.rawValue = rawValue;
this.rawMessage = message;
}
/**
* Return a pretty-formatted error message if the underlying validation error
* is a ZodError or some other recognized error type, otherwise return the
* default error message.
*/
public pretty(): string {
if (this.cause instanceof z.ZodError) {
return `${this.rawMessage}\n${formatZodError(this.cause)}`;
} else {
return this.toString();
}
}
}
export function formatZodError(err: z.ZodError, level = 0): string {
let pre = " ".repeat(level);
pre = level > 0 ? `${pre}` : pre;
pre += " ".repeat(level);
let message = "";
const append = (str: string) => (message += `\n${pre}${str}`);
const len = err.issues.length;
const headline = len === 1 ? `${len} issue found` : `${len} issues found`;
if (len) {
append(`${headline}:`);
}
for (const issue of err.issues) {
let path = issue.path.join(".");
path = path ? `<root>.${path}` : "<root>";
append(`│ • [${path}]: ${issue.message} (${issue.code})`);
switch (issue.code) {
case "invalid_literal":
case "invalid_type": {
append(`│ Want: ${issue.expected}`);
append(`│ Got: ${issue.received}`);
break;
}
case "unrecognized_keys": {
append(`│ Keys: ${issue.keys.join(", ")}`);
break;
}
case "invalid_enum_value": {
append(`│ Allowed: ${issue.options.join(", ")}`);
append(`│ Got: ${issue.received}`);
break;
}
case "invalid_union_discriminator": {
append(`│ Allowed: ${issue.options.join(", ")}`);
break;
}
case "invalid_union": {
const len = issue.unionErrors.length;
append(
`│ ✖︎ Attemped to deserialize into one of ${len} union members:`,
);
issue.unionErrors.forEach((err, i) => {
append(`│ ✖︎ Member ${i + 1} of ${len}`);
append(`${formatZodError(err, level + 1)}`);
});
}
}
}
if (err.issues.length) {
append(`└─*`);
}
return message.slice(1);
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type StartAllTasksErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type StartAllTasksResponseBodyData = {
errors?: Array<StartAllTasksErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class StartAllTasksResponseBody extends Error {
errors?: Array<StartAllTasksErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: StartAllTasksResponseBodyData;
constructor(err: StartAllTasksResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "StartAllTasksResponseBody";
}
}
/** @internal */
export const StartAllTasksErrors$inboundSchema: z.ZodType<
StartAllTasksErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type StartAllTasksErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const StartAllTasksErrors$outboundSchema: z.ZodType<
StartAllTasksErrors$Outbound,
z.ZodTypeDef,
StartAllTasksErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace StartAllTasksErrors$ {
/** @deprecated use `StartAllTasksErrors$inboundSchema` instead. */
export const inboundSchema = StartAllTasksErrors$inboundSchema;
/** @deprecated use `StartAllTasksErrors$outboundSchema` instead. */
export const outboundSchema = StartAllTasksErrors$outboundSchema;
/** @deprecated use `StartAllTasksErrors$Outbound` instead. */
export type Outbound = StartAllTasksErrors$Outbound;
}
/** @internal */
export const StartAllTasksResponseBody$inboundSchema: z.ZodType<
StartAllTasksResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => StartAllTasksErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new StartAllTasksResponseBody(remapped);
});
/** @internal */
export type StartAllTasksResponseBody$Outbound = {
errors?: Array<StartAllTasksErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const StartAllTasksResponseBody$outboundSchema: z.ZodType<
StartAllTasksResponseBody$Outbound,
z.ZodTypeDef,
StartAllTasksResponseBody
> = z
.instanceof(StartAllTasksResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => StartAllTasksErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace StartAllTasksResponseBody$ {
/** @deprecated use `StartAllTasksResponseBody$inboundSchema` instead. */
export const inboundSchema = StartAllTasksResponseBody$inboundSchema;
/** @deprecated use `StartAllTasksResponseBody$outboundSchema` instead. */
export const outboundSchema = StartAllTasksResponseBody$outboundSchema;
/** @deprecated use `StartAllTasksResponseBody$Outbound` instead. */
export type Outbound = StartAllTasksResponseBody$Outbound;
}

View File

@@ -0,0 +1,157 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type StartTaskErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type StartTaskResponseBodyData = {
errors?: Array<StartTaskErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class StartTaskResponseBody extends Error {
errors?: Array<StartTaskErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: StartTaskResponseBodyData;
constructor(err: StartTaskResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "StartTaskResponseBody";
}
}
/** @internal */
export const StartTaskErrors$inboundSchema: z.ZodType<StartTaskErrors, z.ZodTypeDef, unknown> =
z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type StartTaskErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const StartTaskErrors$outboundSchema: z.ZodType<
StartTaskErrors$Outbound,
z.ZodTypeDef,
StartTaskErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace StartTaskErrors$ {
/** @deprecated use `StartTaskErrors$inboundSchema` instead. */
export const inboundSchema = StartTaskErrors$inboundSchema;
/** @deprecated use `StartTaskErrors$outboundSchema` instead. */
export const outboundSchema = StartTaskErrors$outboundSchema;
/** @deprecated use `StartTaskErrors$Outbound` instead. */
export type Outbound = StartTaskErrors$Outbound;
}
/** @internal */
export const StartTaskResponseBody$inboundSchema: z.ZodType<
StartTaskResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => StartTaskErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new StartTaskResponseBody(remapped);
});
/** @internal */
export type StartTaskResponseBody$Outbound = {
errors?: Array<StartTaskErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const StartTaskResponseBody$outboundSchema: z.ZodType<
StartTaskResponseBody$Outbound,
z.ZodTypeDef,
StartTaskResponseBody
> = z
.instanceof(StartTaskResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => StartTaskErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace StartTaskResponseBody$ {
/** @deprecated use `StartTaskResponseBody$inboundSchema` instead. */
export const inboundSchema = StartTaskResponseBody$inboundSchema;
/** @deprecated use `StartTaskResponseBody$outboundSchema` instead. */
export const outboundSchema = StartTaskResponseBody$outboundSchema;
/** @deprecated use `StartTaskResponseBody$Outbound` instead. */
export type Outbound = StartTaskResponseBody$Outbound;
}

View File

@@ -0,0 +1,162 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type StartUniversalTranscodeErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type StartUniversalTranscodeResponseBodyData = {
errors?: Array<StartUniversalTranscodeErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class StartUniversalTranscodeResponseBody extends Error {
errors?: Array<StartUniversalTranscodeErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: StartUniversalTranscodeResponseBodyData;
constructor(err: StartUniversalTranscodeResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "StartUniversalTranscodeResponseBody";
}
}
/** @internal */
export const StartUniversalTranscodeErrors$inboundSchema: z.ZodType<
StartUniversalTranscodeErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type StartUniversalTranscodeErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const StartUniversalTranscodeErrors$outboundSchema: z.ZodType<
StartUniversalTranscodeErrors$Outbound,
z.ZodTypeDef,
StartUniversalTranscodeErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace StartUniversalTranscodeErrors$ {
/** @deprecated use `StartUniversalTranscodeErrors$inboundSchema` instead. */
export const inboundSchema = StartUniversalTranscodeErrors$inboundSchema;
/** @deprecated use `StartUniversalTranscodeErrors$outboundSchema` instead. */
export const outboundSchema = StartUniversalTranscodeErrors$outboundSchema;
/** @deprecated use `StartUniversalTranscodeErrors$Outbound` instead. */
export type Outbound = StartUniversalTranscodeErrors$Outbound;
}
/** @internal */
export const StartUniversalTranscodeResponseBody$inboundSchema: z.ZodType<
StartUniversalTranscodeResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => StartUniversalTranscodeErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new StartUniversalTranscodeResponseBody(remapped);
});
/** @internal */
export type StartUniversalTranscodeResponseBody$Outbound = {
errors?: Array<StartUniversalTranscodeErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const StartUniversalTranscodeResponseBody$outboundSchema: z.ZodType<
StartUniversalTranscodeResponseBody$Outbound,
z.ZodTypeDef,
StartUniversalTranscodeResponseBody
> = z
.instanceof(StartUniversalTranscodeResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z
.array(z.lazy(() => StartUniversalTranscodeErrors$outboundSchema))
.optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace StartUniversalTranscodeResponseBody$ {
/** @deprecated use `StartUniversalTranscodeResponseBody$inboundSchema` instead. */
export const inboundSchema = StartUniversalTranscodeResponseBody$inboundSchema;
/** @deprecated use `StartUniversalTranscodeResponseBody$outboundSchema` instead. */
export const outboundSchema = StartUniversalTranscodeResponseBody$outboundSchema;
/** @deprecated use `StartUniversalTranscodeResponseBody$Outbound` instead. */
export type Outbound = StartUniversalTranscodeResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type StopAllTasksErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type StopAllTasksResponseBodyData = {
errors?: Array<StopAllTasksErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class StopAllTasksResponseBody extends Error {
errors?: Array<StopAllTasksErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: StopAllTasksResponseBodyData;
constructor(err: StopAllTasksResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "StopAllTasksResponseBody";
}
}
/** @internal */
export const StopAllTasksErrors$inboundSchema: z.ZodType<
StopAllTasksErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type StopAllTasksErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const StopAllTasksErrors$outboundSchema: z.ZodType<
StopAllTasksErrors$Outbound,
z.ZodTypeDef,
StopAllTasksErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace StopAllTasksErrors$ {
/** @deprecated use `StopAllTasksErrors$inboundSchema` instead. */
export const inboundSchema = StopAllTasksErrors$inboundSchema;
/** @deprecated use `StopAllTasksErrors$outboundSchema` instead. */
export const outboundSchema = StopAllTasksErrors$outboundSchema;
/** @deprecated use `StopAllTasksErrors$Outbound` instead. */
export type Outbound = StopAllTasksErrors$Outbound;
}
/** @internal */
export const StopAllTasksResponseBody$inboundSchema: z.ZodType<
StopAllTasksResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => StopAllTasksErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new StopAllTasksResponseBody(remapped);
});
/** @internal */
export type StopAllTasksResponseBody$Outbound = {
errors?: Array<StopAllTasksErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const StopAllTasksResponseBody$outboundSchema: z.ZodType<
StopAllTasksResponseBody$Outbound,
z.ZodTypeDef,
StopAllTasksResponseBody
> = z
.instanceof(StopAllTasksResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => StopAllTasksErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace StopAllTasksResponseBody$ {
/** @deprecated use `StopAllTasksResponseBody$inboundSchema` instead. */
export const inboundSchema = StopAllTasksResponseBody$inboundSchema;
/** @deprecated use `StopAllTasksResponseBody$outboundSchema` instead. */
export const outboundSchema = StopAllTasksResponseBody$outboundSchema;
/** @deprecated use `StopAllTasksResponseBody$Outbound` instead. */
export type Outbound = StopAllTasksResponseBody$Outbound;
}

View File

@@ -0,0 +1,157 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type StopTaskErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type StopTaskResponseBodyData = {
errors?: Array<StopTaskErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class StopTaskResponseBody extends Error {
errors?: Array<StopTaskErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: StopTaskResponseBodyData;
constructor(err: StopTaskResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "StopTaskResponseBody";
}
}
/** @internal */
export const StopTaskErrors$inboundSchema: z.ZodType<StopTaskErrors, z.ZodTypeDef, unknown> =
z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type StopTaskErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const StopTaskErrors$outboundSchema: z.ZodType<
StopTaskErrors$Outbound,
z.ZodTypeDef,
StopTaskErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace StopTaskErrors$ {
/** @deprecated use `StopTaskErrors$inboundSchema` instead. */
export const inboundSchema = StopTaskErrors$inboundSchema;
/** @deprecated use `StopTaskErrors$outboundSchema` instead. */
export const outboundSchema = StopTaskErrors$outboundSchema;
/** @deprecated use `StopTaskErrors$Outbound` instead. */
export type Outbound = StopTaskErrors$Outbound;
}
/** @internal */
export const StopTaskResponseBody$inboundSchema: z.ZodType<
StopTaskResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => StopTaskErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new StopTaskResponseBody(remapped);
});
/** @internal */
export type StopTaskResponseBody$Outbound = {
errors?: Array<StopTaskErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const StopTaskResponseBody$outboundSchema: z.ZodType<
StopTaskResponseBody$Outbound,
z.ZodTypeDef,
StopTaskResponseBody
> = z
.instanceof(StopTaskResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => StopTaskErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace StopTaskResponseBody$ {
/** @deprecated use `StopTaskResponseBody$inboundSchema` instead. */
export const inboundSchema = StopTaskResponseBody$inboundSchema;
/** @deprecated use `StopTaskResponseBody$outboundSchema` instead. */
export const outboundSchema = StopTaskResponseBody$outboundSchema;
/** @deprecated use `StopTaskResponseBody$Outbound` instead. */
export type Outbound = StopTaskResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type StopTranscodeSessionErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type StopTranscodeSessionResponseBodyData = {
errors?: Array<StopTranscodeSessionErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class StopTranscodeSessionResponseBody extends Error {
errors?: Array<StopTranscodeSessionErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: StopTranscodeSessionResponseBodyData;
constructor(err: StopTranscodeSessionResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "StopTranscodeSessionResponseBody";
}
}
/** @internal */
export const StopTranscodeSessionErrors$inboundSchema: z.ZodType<
StopTranscodeSessionErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type StopTranscodeSessionErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const StopTranscodeSessionErrors$outboundSchema: z.ZodType<
StopTranscodeSessionErrors$Outbound,
z.ZodTypeDef,
StopTranscodeSessionErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace StopTranscodeSessionErrors$ {
/** @deprecated use `StopTranscodeSessionErrors$inboundSchema` instead. */
export const inboundSchema = StopTranscodeSessionErrors$inboundSchema;
/** @deprecated use `StopTranscodeSessionErrors$outboundSchema` instead. */
export const outboundSchema = StopTranscodeSessionErrors$outboundSchema;
/** @deprecated use `StopTranscodeSessionErrors$Outbound` instead. */
export type Outbound = StopTranscodeSessionErrors$Outbound;
}
/** @internal */
export const StopTranscodeSessionResponseBody$inboundSchema: z.ZodType<
StopTranscodeSessionResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => StopTranscodeSessionErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new StopTranscodeSessionResponseBody(remapped);
});
/** @internal */
export type StopTranscodeSessionResponseBody$Outbound = {
errors?: Array<StopTranscodeSessionErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const StopTranscodeSessionResponseBody$outboundSchema: z.ZodType<
StopTranscodeSessionResponseBody$Outbound,
z.ZodTypeDef,
StopTranscodeSessionResponseBody
> = z
.instanceof(StopTranscodeSessionResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => StopTranscodeSessionErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace StopTranscodeSessionResponseBody$ {
/** @deprecated use `StopTranscodeSessionResponseBody$inboundSchema` instead. */
export const inboundSchema = StopTranscodeSessionResponseBody$inboundSchema;
/** @deprecated use `StopTranscodeSessionResponseBody$outboundSchema` instead. */
export const outboundSchema = StopTranscodeSessionResponseBody$outboundSchema;
/** @deprecated use `StopTranscodeSessionResponseBody$Outbound` instead. */
export type Outbound = StopTranscodeSessionResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type UpdatePlaylistErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type UpdatePlaylistResponseBodyData = {
errors?: Array<UpdatePlaylistErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class UpdatePlaylistResponseBody extends Error {
errors?: Array<UpdatePlaylistErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: UpdatePlaylistResponseBodyData;
constructor(err: UpdatePlaylistResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "UpdatePlaylistResponseBody";
}
}
/** @internal */
export const UpdatePlaylistErrors$inboundSchema: z.ZodType<
UpdatePlaylistErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type UpdatePlaylistErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const UpdatePlaylistErrors$outboundSchema: z.ZodType<
UpdatePlaylistErrors$Outbound,
z.ZodTypeDef,
UpdatePlaylistErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace UpdatePlaylistErrors$ {
/** @deprecated use `UpdatePlaylistErrors$inboundSchema` instead. */
export const inboundSchema = UpdatePlaylistErrors$inboundSchema;
/** @deprecated use `UpdatePlaylistErrors$outboundSchema` instead. */
export const outboundSchema = UpdatePlaylistErrors$outboundSchema;
/** @deprecated use `UpdatePlaylistErrors$Outbound` instead. */
export type Outbound = UpdatePlaylistErrors$Outbound;
}
/** @internal */
export const UpdatePlaylistResponseBody$inboundSchema: z.ZodType<
UpdatePlaylistResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => UpdatePlaylistErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new UpdatePlaylistResponseBody(remapped);
});
/** @internal */
export type UpdatePlaylistResponseBody$Outbound = {
errors?: Array<UpdatePlaylistErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const UpdatePlaylistResponseBody$outboundSchema: z.ZodType<
UpdatePlaylistResponseBody$Outbound,
z.ZodTypeDef,
UpdatePlaylistResponseBody
> = z
.instanceof(UpdatePlaylistResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => UpdatePlaylistErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace UpdatePlaylistResponseBody$ {
/** @deprecated use `UpdatePlaylistResponseBody$inboundSchema` instead. */
export const inboundSchema = UpdatePlaylistResponseBody$inboundSchema;
/** @deprecated use `UpdatePlaylistResponseBody$outboundSchema` instead. */
export const outboundSchema = UpdatePlaylistResponseBody$outboundSchema;
/** @deprecated use `UpdatePlaylistResponseBody$Outbound` instead. */
export type Outbound = UpdatePlaylistResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type UpdatePlayProgressErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type UpdatePlayProgressResponseBodyData = {
errors?: Array<UpdatePlayProgressErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class UpdatePlayProgressResponseBody extends Error {
errors?: Array<UpdatePlayProgressErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: UpdatePlayProgressResponseBodyData;
constructor(err: UpdatePlayProgressResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "UpdatePlayProgressResponseBody";
}
}
/** @internal */
export const UpdatePlayProgressErrors$inboundSchema: z.ZodType<
UpdatePlayProgressErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type UpdatePlayProgressErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const UpdatePlayProgressErrors$outboundSchema: z.ZodType<
UpdatePlayProgressErrors$Outbound,
z.ZodTypeDef,
UpdatePlayProgressErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace UpdatePlayProgressErrors$ {
/** @deprecated use `UpdatePlayProgressErrors$inboundSchema` instead. */
export const inboundSchema = UpdatePlayProgressErrors$inboundSchema;
/** @deprecated use `UpdatePlayProgressErrors$outboundSchema` instead. */
export const outboundSchema = UpdatePlayProgressErrors$outboundSchema;
/** @deprecated use `UpdatePlayProgressErrors$Outbound` instead. */
export type Outbound = UpdatePlayProgressErrors$Outbound;
}
/** @internal */
export const UpdatePlayProgressResponseBody$inboundSchema: z.ZodType<
UpdatePlayProgressResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => UpdatePlayProgressErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new UpdatePlayProgressResponseBody(remapped);
});
/** @internal */
export type UpdatePlayProgressResponseBody$Outbound = {
errors?: Array<UpdatePlayProgressErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const UpdatePlayProgressResponseBody$outboundSchema: z.ZodType<
UpdatePlayProgressResponseBody$Outbound,
z.ZodTypeDef,
UpdatePlayProgressResponseBody
> = z
.instanceof(UpdatePlayProgressResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => UpdatePlayProgressErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace UpdatePlayProgressResponseBody$ {
/** @deprecated use `UpdatePlayProgressResponseBody$inboundSchema` instead. */
export const inboundSchema = UpdatePlayProgressResponseBody$inboundSchema;
/** @deprecated use `UpdatePlayProgressResponseBody$outboundSchema` instead. */
export const outboundSchema = UpdatePlayProgressResponseBody$outboundSchema;
/** @deprecated use `UpdatePlayProgressResponseBody$Outbound` instead. */
export type Outbound = UpdatePlayProgressResponseBody$Outbound;
}

View File

@@ -0,0 +1,160 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type UploadPlaylistErrors = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export type UploadPlaylistResponseBodyData = {
errors?: Array<UploadPlaylistErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
};
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class UploadPlaylistResponseBody extends Error {
errors?: Array<UploadPlaylistErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: UploadPlaylistResponseBodyData;
constructor(err: UploadPlaylistResponseBodyData) {
const message =
"message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
this.data$ = err;
if (err.errors != null) {
this.errors = err.errors;
}
if (err.rawResponse != null) {
this.rawResponse = err.rawResponse;
}
this.name = "UploadPlaylistResponseBody";
}
}
/** @internal */
export const UploadPlaylistErrors$inboundSchema: z.ZodType<
UploadPlaylistErrors,
z.ZodTypeDef,
unknown
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/** @internal */
export type UploadPlaylistErrors$Outbound = {
code?: number | undefined;
message?: string | undefined;
status?: number | undefined;
};
/** @internal */
export const UploadPlaylistErrors$outboundSchema: z.ZodType<
UploadPlaylistErrors$Outbound,
z.ZodTypeDef,
UploadPlaylistErrors
> = z.object({
code: z.number().optional(),
message: z.string().optional(),
status: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace UploadPlaylistErrors$ {
/** @deprecated use `UploadPlaylistErrors$inboundSchema` instead. */
export const inboundSchema = UploadPlaylistErrors$inboundSchema;
/** @deprecated use `UploadPlaylistErrors$outboundSchema` instead. */
export const outboundSchema = UploadPlaylistErrors$outboundSchema;
/** @deprecated use `UploadPlaylistErrors$Outbound` instead. */
export type Outbound = UploadPlaylistErrors$Outbound;
}
/** @internal */
export const UploadPlaylistResponseBody$inboundSchema: z.ZodType<
UploadPlaylistResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
errors: z.array(z.lazy(() => UploadPlaylistErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
})
.transform((v) => {
const remapped = remap$(v, {
RawResponse: "rawResponse",
});
return new UploadPlaylistResponseBody(remapped);
});
/** @internal */
export type UploadPlaylistResponseBody$Outbound = {
errors?: Array<UploadPlaylistErrors$Outbound> | undefined;
RawResponse?: never | undefined;
};
/** @internal */
export const UploadPlaylistResponseBody$outboundSchema: z.ZodType<
UploadPlaylistResponseBody$Outbound,
z.ZodTypeDef,
UploadPlaylistResponseBody
> = z
.instanceof(UploadPlaylistResponseBody)
.transform((v) => v.data$)
.pipe(
z
.object({
errors: z.array(z.lazy(() => UploadPlaylistErrors$outboundSchema)).optional(),
rawResponse: z
.instanceof(Response)
.transform(() => {
throw new Error("Response cannot be serialized");
})
.optional(),
})
.transform((v) => {
return remap$(v, {
rawResponse: "RawResponse",
});
})
);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace UploadPlaylistResponseBody$ {
/** @deprecated use `UploadPlaylistResponseBody$inboundSchema` instead. */
export const inboundSchema = UploadPlaylistResponseBody$inboundSchema;
/** @deprecated use `UploadPlaylistResponseBody$outboundSchema` instead. */
export const outboundSchema = UploadPlaylistResponseBody$outboundSchema;
/** @deprecated use `UploadPlaylistResponseBody$Outbound` instead. */
export type Outbound = UploadPlaylistResponseBody$Outbound;
}

View File

@@ -0,0 +1,352 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type AddPlaylistContentsRequest = {
/**
* the ID of the playlist
*/
playlistID: number;
/**
* the content URI for the playlist
*/
uri: string;
/**
* the play queue to add to a playlist
*/
playQueueID?: number | undefined;
};
export type AddPlaylistContentsMetadata = {
ratingKey?: string | undefined;
key?: string | undefined;
guid?: string | undefined;
type?: string | undefined;
title?: string | undefined;
summary?: string | undefined;
smart?: boolean | undefined;
playlistType?: string | undefined;
composite?: string | undefined;
duration?: number | undefined;
leafCount?: number | undefined;
addedAt?: number | undefined;
updatedAt?: number | undefined;
};
export type AddPlaylistContentsMediaContainer = {
size?: number | undefined;
leafCountAdded?: number | undefined;
leafCountRequested?: number | undefined;
metadata?: Array<AddPlaylistContentsMetadata> | undefined;
};
/**
* Playlist Updated
*/
export type AddPlaylistContentsResponseBody = {
mediaContainer?: AddPlaylistContentsMediaContainer | undefined;
};
export type AddPlaylistContentsResponse = {
/**
* HTTP response content type for this operation
*/
contentType: string;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse: Response;
/**
* Playlist Updated
*/
object?: AddPlaylistContentsResponseBody | undefined;
};
/** @internal */
export const AddPlaylistContentsRequest$inboundSchema: z.ZodType<
AddPlaylistContentsRequest,
z.ZodTypeDef,
unknown
> = z.object({
playlistID: z.number(),
uri: z.string(),
playQueueID: z.number().optional(),
});
/** @internal */
export type AddPlaylistContentsRequest$Outbound = {
playlistID: number;
uri: string;
playQueueID?: number | undefined;
};
/** @internal */
export const AddPlaylistContentsRequest$outboundSchema: z.ZodType<
AddPlaylistContentsRequest$Outbound,
z.ZodTypeDef,
AddPlaylistContentsRequest
> = z.object({
playlistID: z.number(),
uri: z.string(),
playQueueID: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace AddPlaylistContentsRequest$ {
/** @deprecated use `AddPlaylistContentsRequest$inboundSchema` instead. */
export const inboundSchema = AddPlaylistContentsRequest$inboundSchema;
/** @deprecated use `AddPlaylistContentsRequest$outboundSchema` instead. */
export const outboundSchema = AddPlaylistContentsRequest$outboundSchema;
/** @deprecated use `AddPlaylistContentsRequest$Outbound` instead. */
export type Outbound = AddPlaylistContentsRequest$Outbound;
}
/** @internal */
export const AddPlaylistContentsMetadata$inboundSchema: z.ZodType<
AddPlaylistContentsMetadata,
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(),
duration: z.number().int().optional(),
leafCount: z.number().int().optional(),
addedAt: z.number().int().optional(),
updatedAt: z.number().int().optional(),
});
/** @internal */
export type AddPlaylistContentsMetadata$Outbound = {
ratingKey?: string | undefined;
key?: string | undefined;
guid?: string | undefined;
type?: string | undefined;
title?: string | undefined;
summary?: string | undefined;
smart?: boolean | undefined;
playlistType?: string | undefined;
composite?: string | undefined;
duration?: number | undefined;
leafCount?: number | undefined;
addedAt?: number | undefined;
updatedAt?: number | undefined;
};
/** @internal */
export const AddPlaylistContentsMetadata$outboundSchema: z.ZodType<
AddPlaylistContentsMetadata$Outbound,
z.ZodTypeDef,
AddPlaylistContentsMetadata
> = 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(),
duration: z.number().int().optional(),
leafCount: z.number().int().optional(),
addedAt: z.number().int().optional(),
updatedAt: z.number().int().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace AddPlaylistContentsMetadata$ {
/** @deprecated use `AddPlaylistContentsMetadata$inboundSchema` instead. */
export const inboundSchema = AddPlaylistContentsMetadata$inboundSchema;
/** @deprecated use `AddPlaylistContentsMetadata$outboundSchema` instead. */
export const outboundSchema = AddPlaylistContentsMetadata$outboundSchema;
/** @deprecated use `AddPlaylistContentsMetadata$Outbound` instead. */
export type Outbound = AddPlaylistContentsMetadata$Outbound;
}
/** @internal */
export const AddPlaylistContentsMediaContainer$inboundSchema: z.ZodType<
AddPlaylistContentsMediaContainer,
z.ZodTypeDef,
unknown
> = z
.object({
size: z.number().int().optional(),
leafCountAdded: z.number().int().optional(),
leafCountRequested: z.number().int().optional(),
Metadata: z.array(z.lazy(() => AddPlaylistContentsMetadata$inboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
Metadata: "metadata",
});
});
/** @internal */
export type AddPlaylistContentsMediaContainer$Outbound = {
size?: number | undefined;
leafCountAdded?: number | undefined;
leafCountRequested?: number | undefined;
Metadata?: Array<AddPlaylistContentsMetadata$Outbound> | undefined;
};
/** @internal */
export const AddPlaylistContentsMediaContainer$outboundSchema: z.ZodType<
AddPlaylistContentsMediaContainer$Outbound,
z.ZodTypeDef,
AddPlaylistContentsMediaContainer
> = z
.object({
size: z.number().int().optional(),
leafCountAdded: z.number().int().optional(),
leafCountRequested: z.number().int().optional(),
metadata: z.array(z.lazy(() => AddPlaylistContentsMetadata$outboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
metadata: "Metadata",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace AddPlaylistContentsMediaContainer$ {
/** @deprecated use `AddPlaylistContentsMediaContainer$inboundSchema` instead. */
export const inboundSchema = AddPlaylistContentsMediaContainer$inboundSchema;
/** @deprecated use `AddPlaylistContentsMediaContainer$outboundSchema` instead. */
export const outboundSchema = AddPlaylistContentsMediaContainer$outboundSchema;
/** @deprecated use `AddPlaylistContentsMediaContainer$Outbound` instead. */
export type Outbound = AddPlaylistContentsMediaContainer$Outbound;
}
/** @internal */
export const AddPlaylistContentsResponseBody$inboundSchema: z.ZodType<
AddPlaylistContentsResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
MediaContainer: z.lazy(() => AddPlaylistContentsMediaContainer$inboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
MediaContainer: "mediaContainer",
});
});
/** @internal */
export type AddPlaylistContentsResponseBody$Outbound = {
MediaContainer?: AddPlaylistContentsMediaContainer$Outbound | undefined;
};
/** @internal */
export const AddPlaylistContentsResponseBody$outboundSchema: z.ZodType<
AddPlaylistContentsResponseBody$Outbound,
z.ZodTypeDef,
AddPlaylistContentsResponseBody
> = z
.object({
mediaContainer: z.lazy(() => AddPlaylistContentsMediaContainer$outboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
mediaContainer: "MediaContainer",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace AddPlaylistContentsResponseBody$ {
/** @deprecated use `AddPlaylistContentsResponseBody$inboundSchema` instead. */
export const inboundSchema = AddPlaylistContentsResponseBody$inboundSchema;
/** @deprecated use `AddPlaylistContentsResponseBody$outboundSchema` instead. */
export const outboundSchema = AddPlaylistContentsResponseBody$outboundSchema;
/** @deprecated use `AddPlaylistContentsResponseBody$Outbound` instead. */
export type Outbound = AddPlaylistContentsResponseBody$Outbound;
}
/** @internal */
export const AddPlaylistContentsResponse$inboundSchema: z.ZodType<
AddPlaylistContentsResponse,
z.ZodTypeDef,
unknown
> = z
.object({
ContentType: z.string(),
StatusCode: z.number().int(),
RawResponse: z.instanceof(Response),
object: z.lazy(() => AddPlaylistContentsResponseBody$inboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
/** @internal */
export type AddPlaylistContentsResponse$Outbound = {
ContentType: string;
StatusCode: number;
RawResponse: never;
object?: AddPlaylistContentsResponseBody$Outbound | undefined;
};
/** @internal */
export const AddPlaylistContentsResponse$outboundSchema: z.ZodType<
AddPlaylistContentsResponse$Outbound,
z.ZodTypeDef,
AddPlaylistContentsResponse
> = z
.object({
contentType: z.string(),
statusCode: z.number().int(),
rawResponse: z.instanceof(Response).transform(() => {
throw new Error("Response cannot be serialized");
}),
object: z.lazy(() => AddPlaylistContentsResponseBody$outboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace AddPlaylistContentsResponse$ {
/** @deprecated use `AddPlaylistContentsResponse$inboundSchema` instead. */
export const inboundSchema = AddPlaylistContentsResponse$inboundSchema;
/** @deprecated use `AddPlaylistContentsResponse$outboundSchema` instead. */
export const outboundSchema = AddPlaylistContentsResponse$outboundSchema;
/** @deprecated use `AddPlaylistContentsResponse$Outbound` instead. */
export type Outbound = AddPlaylistContentsResponse$Outbound;
}

View File

@@ -0,0 +1,181 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
/**
* Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install
*/
export enum Tonight {
Zero = 0,
One = 1,
}
/**
* Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`.
*/
export enum Skip {
Zero = 0,
One = 1,
}
export type ApplyUpdatesRequest = {
/**
* Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install
*/
tonight?: Tonight | undefined;
/**
* Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`.
*/
skip?: Skip | undefined;
};
export type ApplyUpdatesResponse = {
/**
* HTTP response content type for this operation
*/
contentType: string;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse: Response;
};
/** @internal */
export const Tonight$inboundSchema: z.ZodNativeEnum<typeof Tonight> = z.nativeEnum(Tonight);
/** @internal */
export const Tonight$outboundSchema: z.ZodNativeEnum<typeof Tonight> = Tonight$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace Tonight$ {
/** @deprecated use `Tonight$inboundSchema` instead. */
export const inboundSchema = Tonight$inboundSchema;
/** @deprecated use `Tonight$outboundSchema` instead. */
export const outboundSchema = Tonight$outboundSchema;
}
/** @internal */
export const Skip$inboundSchema: z.ZodNativeEnum<typeof Skip> = z.nativeEnum(Skip);
/** @internal */
export const Skip$outboundSchema: z.ZodNativeEnum<typeof Skip> = Skip$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace Skip$ {
/** @deprecated use `Skip$inboundSchema` instead. */
export const inboundSchema = Skip$inboundSchema;
/** @deprecated use `Skip$outboundSchema` instead. */
export const outboundSchema = Skip$outboundSchema;
}
/** @internal */
export const ApplyUpdatesRequest$inboundSchema: z.ZodType<
ApplyUpdatesRequest,
z.ZodTypeDef,
unknown
> = z.object({
tonight: Tonight$inboundSchema.optional(),
skip: Skip$inboundSchema.optional(),
});
/** @internal */
export type ApplyUpdatesRequest$Outbound = {
tonight?: number | undefined;
skip?: number | undefined;
};
/** @internal */
export const ApplyUpdatesRequest$outboundSchema: z.ZodType<
ApplyUpdatesRequest$Outbound,
z.ZodTypeDef,
ApplyUpdatesRequest
> = z.object({
tonight: Tonight$outboundSchema.optional(),
skip: Skip$outboundSchema.optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace ApplyUpdatesRequest$ {
/** @deprecated use `ApplyUpdatesRequest$inboundSchema` instead. */
export const inboundSchema = ApplyUpdatesRequest$inboundSchema;
/** @deprecated use `ApplyUpdatesRequest$outboundSchema` instead. */
export const outboundSchema = ApplyUpdatesRequest$outboundSchema;
/** @deprecated use `ApplyUpdatesRequest$Outbound` instead. */
export type Outbound = ApplyUpdatesRequest$Outbound;
}
/** @internal */
export const ApplyUpdatesResponse$inboundSchema: z.ZodType<
ApplyUpdatesResponse,
z.ZodTypeDef,
unknown
> = z
.object({
ContentType: z.string(),
StatusCode: z.number().int(),
RawResponse: z.instanceof(Response),
})
.transform((v) => {
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
/** @internal */
export type ApplyUpdatesResponse$Outbound = {
ContentType: string;
StatusCode: number;
RawResponse: never;
};
/** @internal */
export const ApplyUpdatesResponse$outboundSchema: z.ZodType<
ApplyUpdatesResponse$Outbound,
z.ZodTypeDef,
ApplyUpdatesResponse
> = z
.object({
contentType: z.string(),
statusCode: z.number().int(),
rawResponse: z.instanceof(Response).transform(() => {
throw new Error("Response cannot be serialized");
}),
})
.transform((v) => {
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace ApplyUpdatesResponse$ {
/** @deprecated use `ApplyUpdatesResponse$inboundSchema` instead. */
export const inboundSchema = ApplyUpdatesResponse$inboundSchema;
/** @deprecated use `ApplyUpdatesResponse$outboundSchema` instead. */
export const outboundSchema = ApplyUpdatesResponse$outboundSchema;
/** @deprecated use `ApplyUpdatesResponse$Outbound` instead. */
export type Outbound = ApplyUpdatesResponse$Outbound;
}

View File

@@ -0,0 +1,124 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type CancelServerActivitiesRequest = {
/**
* The UUID of the activity to cancel.
*/
activityUUID: string;
};
export type CancelServerActivitiesResponse = {
/**
* HTTP response content type for this operation
*/
contentType: string;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse: Response;
};
/** @internal */
export const CancelServerActivitiesRequest$inboundSchema: z.ZodType<
CancelServerActivitiesRequest,
z.ZodTypeDef,
unknown
> = z.object({
activityUUID: z.string(),
});
/** @internal */
export type CancelServerActivitiesRequest$Outbound = {
activityUUID: string;
};
/** @internal */
export const CancelServerActivitiesRequest$outboundSchema: z.ZodType<
CancelServerActivitiesRequest$Outbound,
z.ZodTypeDef,
CancelServerActivitiesRequest
> = z.object({
activityUUID: z.string(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace CancelServerActivitiesRequest$ {
/** @deprecated use `CancelServerActivitiesRequest$inboundSchema` instead. */
export const inboundSchema = CancelServerActivitiesRequest$inboundSchema;
/** @deprecated use `CancelServerActivitiesRequest$outboundSchema` instead. */
export const outboundSchema = CancelServerActivitiesRequest$outboundSchema;
/** @deprecated use `CancelServerActivitiesRequest$Outbound` instead. */
export type Outbound = CancelServerActivitiesRequest$Outbound;
}
/** @internal */
export const CancelServerActivitiesResponse$inboundSchema: z.ZodType<
CancelServerActivitiesResponse,
z.ZodTypeDef,
unknown
> = z
.object({
ContentType: z.string(),
StatusCode: z.number().int(),
RawResponse: z.instanceof(Response),
})
.transform((v) => {
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
/** @internal */
export type CancelServerActivitiesResponse$Outbound = {
ContentType: string;
StatusCode: number;
RawResponse: never;
};
/** @internal */
export const CancelServerActivitiesResponse$outboundSchema: z.ZodType<
CancelServerActivitiesResponse$Outbound,
z.ZodTypeDef,
CancelServerActivitiesResponse
> = z
.object({
contentType: z.string(),
statusCode: z.number().int(),
rawResponse: z.instanceof(Response).transform(() => {
throw new Error("Response cannot be serialized");
}),
})
.transform((v) => {
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace CancelServerActivitiesResponse$ {
/** @deprecated use `CancelServerActivitiesResponse$inboundSchema` instead. */
export const inboundSchema = CancelServerActivitiesResponse$inboundSchema;
/** @deprecated use `CancelServerActivitiesResponse$outboundSchema` instead. */
export const outboundSchema = CancelServerActivitiesResponse$outboundSchema;
/** @deprecated use `CancelServerActivitiesResponse$Outbound` instead. */
export type Outbound = CancelServerActivitiesResponse$Outbound;
}

View File

@@ -0,0 +1,149 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
/**
* Indicate that you want to start download any updates found.
*/
export enum Download {
Zero = 0,
One = 1,
}
export type CheckForUpdatesRequest = {
/**
* Indicate that you want to start download any updates found.
*/
download?: Download | undefined;
};
export type CheckForUpdatesResponse = {
/**
* HTTP response content type for this operation
*/
contentType: string;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse: Response;
};
/** @internal */
export const Download$inboundSchema: z.ZodNativeEnum<typeof Download> = z.nativeEnum(Download);
/** @internal */
export const Download$outboundSchema: z.ZodNativeEnum<typeof Download> = Download$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace Download$ {
/** @deprecated use `Download$inboundSchema` instead. */
export const inboundSchema = Download$inboundSchema;
/** @deprecated use `Download$outboundSchema` instead. */
export const outboundSchema = Download$outboundSchema;
}
/** @internal */
export const CheckForUpdatesRequest$inboundSchema: z.ZodType<
CheckForUpdatesRequest,
z.ZodTypeDef,
unknown
> = z.object({
download: Download$inboundSchema.optional(),
});
/** @internal */
export type CheckForUpdatesRequest$Outbound = {
download?: number | undefined;
};
/** @internal */
export const CheckForUpdatesRequest$outboundSchema: z.ZodType<
CheckForUpdatesRequest$Outbound,
z.ZodTypeDef,
CheckForUpdatesRequest
> = z.object({
download: Download$outboundSchema.optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace CheckForUpdatesRequest$ {
/** @deprecated use `CheckForUpdatesRequest$inboundSchema` instead. */
export const inboundSchema = CheckForUpdatesRequest$inboundSchema;
/** @deprecated use `CheckForUpdatesRequest$outboundSchema` instead. */
export const outboundSchema = CheckForUpdatesRequest$outboundSchema;
/** @deprecated use `CheckForUpdatesRequest$Outbound` instead. */
export type Outbound = CheckForUpdatesRequest$Outbound;
}
/** @internal */
export const CheckForUpdatesResponse$inboundSchema: z.ZodType<
CheckForUpdatesResponse,
z.ZodTypeDef,
unknown
> = z
.object({
ContentType: z.string(),
StatusCode: z.number().int(),
RawResponse: z.instanceof(Response),
})
.transform((v) => {
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
/** @internal */
export type CheckForUpdatesResponse$Outbound = {
ContentType: string;
StatusCode: number;
RawResponse: never;
};
/** @internal */
export const CheckForUpdatesResponse$outboundSchema: z.ZodType<
CheckForUpdatesResponse$Outbound,
z.ZodTypeDef,
CheckForUpdatesResponse
> = z
.object({
contentType: z.string(),
statusCode: z.number().int(),
rawResponse: z.instanceof(Response).transform(() => {
throw new Error("Response cannot be serialized");
}),
})
.transform((v) => {
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace CheckForUpdatesResponse$ {
/** @deprecated use `CheckForUpdatesResponse$inboundSchema` instead. */
export const inboundSchema = CheckForUpdatesResponse$inboundSchema;
/** @deprecated use `CheckForUpdatesResponse$outboundSchema` instead. */
export const outboundSchema = CheckForUpdatesResponse$outboundSchema;
/** @deprecated use `CheckForUpdatesResponse$Outbound` instead. */
export type Outbound = CheckForUpdatesResponse$Outbound;
}

View File

@@ -0,0 +1,124 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type ClearPlaylistContentsRequest = {
/**
* the ID of the playlist
*/
playlistID: number;
};
export type ClearPlaylistContentsResponse = {
/**
* HTTP response content type for this operation
*/
contentType: string;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse: Response;
};
/** @internal */
export const ClearPlaylistContentsRequest$inboundSchema: z.ZodType<
ClearPlaylistContentsRequest,
z.ZodTypeDef,
unknown
> = z.object({
playlistID: z.number(),
});
/** @internal */
export type ClearPlaylistContentsRequest$Outbound = {
playlistID: number;
};
/** @internal */
export const ClearPlaylistContentsRequest$outboundSchema: z.ZodType<
ClearPlaylistContentsRequest$Outbound,
z.ZodTypeDef,
ClearPlaylistContentsRequest
> = z.object({
playlistID: z.number(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace ClearPlaylistContentsRequest$ {
/** @deprecated use `ClearPlaylistContentsRequest$inboundSchema` instead. */
export const inboundSchema = ClearPlaylistContentsRequest$inboundSchema;
/** @deprecated use `ClearPlaylistContentsRequest$outboundSchema` instead. */
export const outboundSchema = ClearPlaylistContentsRequest$outboundSchema;
/** @deprecated use `ClearPlaylistContentsRequest$Outbound` instead. */
export type Outbound = ClearPlaylistContentsRequest$Outbound;
}
/** @internal */
export const ClearPlaylistContentsResponse$inboundSchema: z.ZodType<
ClearPlaylistContentsResponse,
z.ZodTypeDef,
unknown
> = z
.object({
ContentType: z.string(),
StatusCode: z.number().int(),
RawResponse: z.instanceof(Response),
})
.transform((v) => {
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
/** @internal */
export type ClearPlaylistContentsResponse$Outbound = {
ContentType: string;
StatusCode: number;
RawResponse: never;
};
/** @internal */
export const ClearPlaylistContentsResponse$outboundSchema: z.ZodType<
ClearPlaylistContentsResponse$Outbound,
z.ZodTypeDef,
ClearPlaylistContentsResponse
> = z
.object({
contentType: z.string(),
statusCode: z.number().int(),
rawResponse: z.instanceof(Response).transform(() => {
throw new Error("Response cannot be serialized");
}),
})
.transform((v) => {
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace ClearPlaylistContentsResponse$ {
/** @deprecated use `ClearPlaylistContentsResponse$inboundSchema` instead. */
export const inboundSchema = ClearPlaylistContentsResponse$inboundSchema;
/** @deprecated use `ClearPlaylistContentsResponse$outboundSchema` instead. */
export const outboundSchema = ClearPlaylistContentsResponse$outboundSchema;
/** @deprecated use `ClearPlaylistContentsResponse$Outbound` instead. */
export type Outbound = ClearPlaylistContentsResponse$Outbound;
}

View File

@@ -0,0 +1,425 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
/**
* type of playlist to create
*/
export enum CreatePlaylistQueryParamType {
Audio = "audio",
Video = "video",
Photo = "photo",
}
/**
* whether the playlist is smart or not
*/
export enum Smart {
Zero = 0,
One = 1,
}
export type CreatePlaylistRequest = {
/**
* name of the playlist
*/
title: string;
/**
* type of playlist to create
*/
type: CreatePlaylistQueryParamType;
/**
* whether the playlist is smart or not
*/
smart: Smart;
/**
* the content URI for the playlist
*/
uri: string;
/**
* the play queue to copy to a playlist
*/
playQueueID?: number | undefined;
};
export type CreatePlaylistMetadata = {
ratingKey?: string | undefined;
key?: string | undefined;
guid?: string | undefined;
type?: string | undefined;
title?: string | undefined;
summary?: string | undefined;
smart?: boolean | undefined;
playlistType?: string | undefined;
icon?: string | undefined;
viewCount?: number | undefined;
lastViewedAt?: number | undefined;
leafCount?: number | undefined;
addedAt?: number | undefined;
updatedAt?: number | undefined;
composite?: string | undefined;
duration?: number | undefined;
};
export type CreatePlaylistMediaContainer = {
size?: number | undefined;
metadata?: Array<CreatePlaylistMetadata> | undefined;
};
/**
* returns all playlists
*/
export type CreatePlaylistResponseBody = {
mediaContainer?: CreatePlaylistMediaContainer | undefined;
};
export type CreatePlaylistResponse = {
/**
* HTTP response content type for this operation
*/
contentType: string;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse: Response;
/**
* returns all playlists
*/
object?: CreatePlaylistResponseBody | undefined;
};
/** @internal */
export const CreatePlaylistQueryParamType$inboundSchema: z.ZodNativeEnum<
typeof CreatePlaylistQueryParamType
> = z.nativeEnum(CreatePlaylistQueryParamType);
/** @internal */
export const CreatePlaylistQueryParamType$outboundSchema: z.ZodNativeEnum<
typeof CreatePlaylistQueryParamType
> = CreatePlaylistQueryParamType$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace CreatePlaylistQueryParamType$ {
/** @deprecated use `CreatePlaylistQueryParamType$inboundSchema` instead. */
export const inboundSchema = CreatePlaylistQueryParamType$inboundSchema;
/** @deprecated use `CreatePlaylistQueryParamType$outboundSchema` instead. */
export const outboundSchema = CreatePlaylistQueryParamType$outboundSchema;
}
/** @internal */
export const Smart$inboundSchema: z.ZodNativeEnum<typeof Smart> = z.nativeEnum(Smart);
/** @internal */
export const Smart$outboundSchema: z.ZodNativeEnum<typeof Smart> = Smart$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace Smart$ {
/** @deprecated use `Smart$inboundSchema` instead. */
export const inboundSchema = Smart$inboundSchema;
/** @deprecated use `Smart$outboundSchema` instead. */
export const outboundSchema = Smart$outboundSchema;
}
/** @internal */
export const CreatePlaylistRequest$inboundSchema: z.ZodType<
CreatePlaylistRequest,
z.ZodTypeDef,
unknown
> = z.object({
title: z.string(),
type: CreatePlaylistQueryParamType$inboundSchema,
smart: Smart$inboundSchema,
uri: z.string(),
playQueueID: z.number().optional(),
});
/** @internal */
export type CreatePlaylistRequest$Outbound = {
title: string;
type: string;
smart: number;
uri: string;
playQueueID?: number | undefined;
};
/** @internal */
export const CreatePlaylistRequest$outboundSchema: z.ZodType<
CreatePlaylistRequest$Outbound,
z.ZodTypeDef,
CreatePlaylistRequest
> = z.object({
title: z.string(),
type: CreatePlaylistQueryParamType$outboundSchema,
smart: Smart$outboundSchema,
uri: z.string(),
playQueueID: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace CreatePlaylistRequest$ {
/** @deprecated use `CreatePlaylistRequest$inboundSchema` instead. */
export const inboundSchema = CreatePlaylistRequest$inboundSchema;
/** @deprecated use `CreatePlaylistRequest$outboundSchema` instead. */
export const outboundSchema = CreatePlaylistRequest$outboundSchema;
/** @deprecated use `CreatePlaylistRequest$Outbound` instead. */
export type Outbound = CreatePlaylistRequest$Outbound;
}
/** @internal */
export const CreatePlaylistMetadata$inboundSchema: z.ZodType<
CreatePlaylistMetadata,
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(),
icon: z.string().optional(),
viewCount: z.number().int().optional(),
lastViewedAt: z.number().int().optional(),
leafCount: z.number().int().optional(),
addedAt: z.number().int().optional(),
updatedAt: z.number().int().optional(),
composite: z.string().optional(),
duration: z.number().int().optional(),
});
/** @internal */
export type CreatePlaylistMetadata$Outbound = {
ratingKey?: string | undefined;
key?: string | undefined;
guid?: string | undefined;
type?: string | undefined;
title?: string | undefined;
summary?: string | undefined;
smart?: boolean | undefined;
playlistType?: string | undefined;
icon?: string | undefined;
viewCount?: number | undefined;
lastViewedAt?: number | undefined;
leafCount?: number | undefined;
addedAt?: number | undefined;
updatedAt?: number | undefined;
composite?: string | undefined;
duration?: number | undefined;
};
/** @internal */
export const CreatePlaylistMetadata$outboundSchema: z.ZodType<
CreatePlaylistMetadata$Outbound,
z.ZodTypeDef,
CreatePlaylistMetadata
> = 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(),
icon: z.string().optional(),
viewCount: z.number().int().optional(),
lastViewedAt: z.number().int().optional(),
leafCount: z.number().int().optional(),
addedAt: z.number().int().optional(),
updatedAt: z.number().int().optional(),
composite: z.string().optional(),
duration: z.number().int().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace CreatePlaylistMetadata$ {
/** @deprecated use `CreatePlaylistMetadata$inboundSchema` instead. */
export const inboundSchema = CreatePlaylistMetadata$inboundSchema;
/** @deprecated use `CreatePlaylistMetadata$outboundSchema` instead. */
export const outboundSchema = CreatePlaylistMetadata$outboundSchema;
/** @deprecated use `CreatePlaylistMetadata$Outbound` instead. */
export type Outbound = CreatePlaylistMetadata$Outbound;
}
/** @internal */
export const CreatePlaylistMediaContainer$inboundSchema: z.ZodType<
CreatePlaylistMediaContainer,
z.ZodTypeDef,
unknown
> = z
.object({
size: z.number().int().optional(),
Metadata: z.array(z.lazy(() => CreatePlaylistMetadata$inboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
Metadata: "metadata",
});
});
/** @internal */
export type CreatePlaylistMediaContainer$Outbound = {
size?: number | undefined;
Metadata?: Array<CreatePlaylistMetadata$Outbound> | undefined;
};
/** @internal */
export const CreatePlaylistMediaContainer$outboundSchema: z.ZodType<
CreatePlaylistMediaContainer$Outbound,
z.ZodTypeDef,
CreatePlaylistMediaContainer
> = z
.object({
size: z.number().int().optional(),
metadata: z.array(z.lazy(() => CreatePlaylistMetadata$outboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
metadata: "Metadata",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace CreatePlaylistMediaContainer$ {
/** @deprecated use `CreatePlaylistMediaContainer$inboundSchema` instead. */
export const inboundSchema = CreatePlaylistMediaContainer$inboundSchema;
/** @deprecated use `CreatePlaylistMediaContainer$outboundSchema` instead. */
export const outboundSchema = CreatePlaylistMediaContainer$outboundSchema;
/** @deprecated use `CreatePlaylistMediaContainer$Outbound` instead. */
export type Outbound = CreatePlaylistMediaContainer$Outbound;
}
/** @internal */
export const CreatePlaylistResponseBody$inboundSchema: z.ZodType<
CreatePlaylistResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
MediaContainer: z.lazy(() => CreatePlaylistMediaContainer$inboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
MediaContainer: "mediaContainer",
});
});
/** @internal */
export type CreatePlaylistResponseBody$Outbound = {
MediaContainer?: CreatePlaylistMediaContainer$Outbound | undefined;
};
/** @internal */
export const CreatePlaylistResponseBody$outboundSchema: z.ZodType<
CreatePlaylistResponseBody$Outbound,
z.ZodTypeDef,
CreatePlaylistResponseBody
> = z
.object({
mediaContainer: z.lazy(() => CreatePlaylistMediaContainer$outboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
mediaContainer: "MediaContainer",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace CreatePlaylistResponseBody$ {
/** @deprecated use `CreatePlaylistResponseBody$inboundSchema` instead. */
export const inboundSchema = CreatePlaylistResponseBody$inboundSchema;
/** @deprecated use `CreatePlaylistResponseBody$outboundSchema` instead. */
export const outboundSchema = CreatePlaylistResponseBody$outboundSchema;
/** @deprecated use `CreatePlaylistResponseBody$Outbound` instead. */
export type Outbound = CreatePlaylistResponseBody$Outbound;
}
/** @internal */
export const CreatePlaylistResponse$inboundSchema: z.ZodType<
CreatePlaylistResponse,
z.ZodTypeDef,
unknown
> = z
.object({
ContentType: z.string(),
StatusCode: z.number().int(),
RawResponse: z.instanceof(Response),
object: z.lazy(() => CreatePlaylistResponseBody$inboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
/** @internal */
export type CreatePlaylistResponse$Outbound = {
ContentType: string;
StatusCode: number;
RawResponse: never;
object?: CreatePlaylistResponseBody$Outbound | undefined;
};
/** @internal */
export const CreatePlaylistResponse$outboundSchema: z.ZodType<
CreatePlaylistResponse$Outbound,
z.ZodTypeDef,
CreatePlaylistResponse
> = z
.object({
contentType: z.string(),
statusCode: z.number().int(),
rawResponse: z.instanceof(Response).transform(() => {
throw new Error("Response cannot be serialized");
}),
object: z.lazy(() => CreatePlaylistResponseBody$outboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace CreatePlaylistResponse$ {
/** @deprecated use `CreatePlaylistResponse$inboundSchema` instead. */
export const inboundSchema = CreatePlaylistResponse$inboundSchema;
/** @deprecated use `CreatePlaylistResponse$outboundSchema` instead. */
export const outboundSchema = CreatePlaylistResponse$outboundSchema;
/** @deprecated use `CreatePlaylistResponse$Outbound` instead. */
export type Outbound = CreatePlaylistResponse$Outbound;
}

View File

@@ -0,0 +1,128 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type DeleteLibraryRequest = {
/**
* The unique key of the Plex library.
*
* @remarks
* Note: This is unique in the context of the Plex server.
*
*/
sectionKey: number;
};
export type DeleteLibraryResponse = {
/**
* HTTP response content type for this operation
*/
contentType: string;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse: Response;
};
/** @internal */
export const DeleteLibraryRequest$inboundSchema: z.ZodType<
DeleteLibraryRequest,
z.ZodTypeDef,
unknown
> = z.object({
sectionKey: z.number().int(),
});
/** @internal */
export type DeleteLibraryRequest$Outbound = {
sectionKey: number;
};
/** @internal */
export const DeleteLibraryRequest$outboundSchema: z.ZodType<
DeleteLibraryRequest$Outbound,
z.ZodTypeDef,
DeleteLibraryRequest
> = z.object({
sectionKey: z.number().int(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace DeleteLibraryRequest$ {
/** @deprecated use `DeleteLibraryRequest$inboundSchema` instead. */
export const inboundSchema = DeleteLibraryRequest$inboundSchema;
/** @deprecated use `DeleteLibraryRequest$outboundSchema` instead. */
export const outboundSchema = DeleteLibraryRequest$outboundSchema;
/** @deprecated use `DeleteLibraryRequest$Outbound` instead. */
export type Outbound = DeleteLibraryRequest$Outbound;
}
/** @internal */
export const DeleteLibraryResponse$inboundSchema: z.ZodType<
DeleteLibraryResponse,
z.ZodTypeDef,
unknown
> = z
.object({
ContentType: z.string(),
StatusCode: z.number().int(),
RawResponse: z.instanceof(Response),
})
.transform((v) => {
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
/** @internal */
export type DeleteLibraryResponse$Outbound = {
ContentType: string;
StatusCode: number;
RawResponse: never;
};
/** @internal */
export const DeleteLibraryResponse$outboundSchema: z.ZodType<
DeleteLibraryResponse$Outbound,
z.ZodTypeDef,
DeleteLibraryResponse
> = z
.object({
contentType: z.string(),
statusCode: z.number().int(),
rawResponse: z.instanceof(Response).transform(() => {
throw new Error("Response cannot be serialized");
}),
})
.transform((v) => {
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace DeleteLibraryResponse$ {
/** @deprecated use `DeleteLibraryResponse$inboundSchema` instead. */
export const inboundSchema = DeleteLibraryResponse$inboundSchema;
/** @deprecated use `DeleteLibraryResponse$outboundSchema` instead. */
export const outboundSchema = DeleteLibraryResponse$outboundSchema;
/** @deprecated use `DeleteLibraryResponse$Outbound` instead. */
export type Outbound = DeleteLibraryResponse$Outbound;
}

View File

@@ -0,0 +1,124 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type DeletePlaylistRequest = {
/**
* the ID of the playlist
*/
playlistID: number;
};
export type DeletePlaylistResponse = {
/**
* HTTP response content type for this operation
*/
contentType: string;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse: Response;
};
/** @internal */
export const DeletePlaylistRequest$inboundSchema: z.ZodType<
DeletePlaylistRequest,
z.ZodTypeDef,
unknown
> = z.object({
playlistID: z.number(),
});
/** @internal */
export type DeletePlaylistRequest$Outbound = {
playlistID: number;
};
/** @internal */
export const DeletePlaylistRequest$outboundSchema: z.ZodType<
DeletePlaylistRequest$Outbound,
z.ZodTypeDef,
DeletePlaylistRequest
> = z.object({
playlistID: z.number(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace DeletePlaylistRequest$ {
/** @deprecated use `DeletePlaylistRequest$inboundSchema` instead. */
export const inboundSchema = DeletePlaylistRequest$inboundSchema;
/** @deprecated use `DeletePlaylistRequest$outboundSchema` instead. */
export const outboundSchema = DeletePlaylistRequest$outboundSchema;
/** @deprecated use `DeletePlaylistRequest$Outbound` instead. */
export type Outbound = DeletePlaylistRequest$Outbound;
}
/** @internal */
export const DeletePlaylistResponse$inboundSchema: z.ZodType<
DeletePlaylistResponse,
z.ZodTypeDef,
unknown
> = z
.object({
ContentType: z.string(),
StatusCode: z.number().int(),
RawResponse: z.instanceof(Response),
})
.transform((v) => {
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
/** @internal */
export type DeletePlaylistResponse$Outbound = {
ContentType: string;
StatusCode: number;
RawResponse: never;
};
/** @internal */
export const DeletePlaylistResponse$outboundSchema: z.ZodType<
DeletePlaylistResponse$Outbound,
z.ZodTypeDef,
DeletePlaylistResponse
> = z
.object({
contentType: z.string(),
statusCode: z.number().int(),
rawResponse: z.instanceof(Response).transform(() => {
throw new Error("Response cannot be serialized");
}),
})
.transform((v) => {
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace DeletePlaylistResponse$ {
/** @deprecated use `DeletePlaylistResponse$inboundSchema` instead. */
export const inboundSchema = DeletePlaylistResponse$inboundSchema;
/** @deprecated use `DeletePlaylistResponse$outboundSchema` instead. */
export const outboundSchema = DeletePlaylistResponse$outboundSchema;
/** @deprecated use `DeletePlaylistResponse$Outbound` instead. */
export type Outbound = DeletePlaylistResponse$Outbound;
}

View File

@@ -0,0 +1,81 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type EnablePaperTrailResponse = {
/**
* HTTP response content type for this operation
*/
contentType: string;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse: Response;
};
/** @internal */
export const EnablePaperTrailResponse$inboundSchema: z.ZodType<
EnablePaperTrailResponse,
z.ZodTypeDef,
unknown
> = z
.object({
ContentType: z.string(),
StatusCode: z.number().int(),
RawResponse: z.instanceof(Response),
})
.transform((v) => {
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
/** @internal */
export type EnablePaperTrailResponse$Outbound = {
ContentType: string;
StatusCode: number;
RawResponse: never;
};
/** @internal */
export const EnablePaperTrailResponse$outboundSchema: z.ZodType<
EnablePaperTrailResponse$Outbound,
z.ZodTypeDef,
EnablePaperTrailResponse
> = z
.object({
contentType: z.string(),
statusCode: z.number().int(),
rawResponse: z.instanceof(Response).transform(() => {
throw new Error("Response cannot be serialized");
}),
})
.transform((v) => {
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace EnablePaperTrailResponse$ {
/** @deprecated use `EnablePaperTrailResponse$inboundSchema` instead. */
export const inboundSchema = EnablePaperTrailResponse$inboundSchema;
/** @deprecated use `EnablePaperTrailResponse$outboundSchema` instead. */
export const outboundSchema = EnablePaperTrailResponse$outboundSchema;
/** @deprecated use `EnablePaperTrailResponse$Outbound` instead. */
export type Outbound = EnablePaperTrailResponse$Outbound;
}

View File

@@ -0,0 +1,385 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type Location = {
id?: number | undefined;
path?: string | undefined;
};
export type GetAllLibrariesDirectory = {
allowSync?: boolean | undefined;
art?: string | undefined;
composite?: string | undefined;
filters?: boolean | undefined;
refreshing?: boolean | undefined;
thumb?: string | undefined;
key?: string | undefined;
type?: string | undefined;
title?: string | undefined;
agent?: string | undefined;
scanner?: string | undefined;
language?: string | undefined;
uuid?: string | undefined;
/**
* Unix epoch datetime
*/
updatedAt?: number | undefined;
/**
* Unix epoch datetime
*/
createdAt?: number | undefined;
/**
* Unix epoch datetime
*/
scannedAt?: number | undefined;
content?: boolean | undefined;
directory?: boolean | undefined;
contentChangedAt?: number | undefined;
hidden?: number | undefined;
location?: Array<Location> | undefined;
};
export type GetAllLibrariesMediaContainer = {
size: number;
allowSync: boolean;
title1: string;
directory?: Array<GetAllLibrariesDirectory> | undefined;
};
/**
* The libraries available on the Server
*/
export type GetAllLibrariesResponseBody = {
mediaContainer?: GetAllLibrariesMediaContainer | undefined;
};
export type GetAllLibrariesResponse = {
/**
* HTTP response content type for this operation
*/
contentType: string;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse: Response;
/**
* The libraries available on the Server
*/
object?: GetAllLibrariesResponseBody | undefined;
};
/** @internal */
export const Location$inboundSchema: z.ZodType<Location, z.ZodTypeDef, unknown> = z.object({
id: z.number().int().optional(),
path: z.string().optional(),
});
/** @internal */
export type Location$Outbound = {
id?: number | undefined;
path?: string | undefined;
};
/** @internal */
export const Location$outboundSchema: z.ZodType<Location$Outbound, z.ZodTypeDef, Location> =
z.object({
id: z.number().int().optional(),
path: z.string().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace Location$ {
/** @deprecated use `Location$inboundSchema` instead. */
export const inboundSchema = Location$inboundSchema;
/** @deprecated use `Location$outboundSchema` instead. */
export const outboundSchema = Location$outboundSchema;
/** @deprecated use `Location$Outbound` instead. */
export type Outbound = Location$Outbound;
}
/** @internal */
export const GetAllLibrariesDirectory$inboundSchema: z.ZodType<
GetAllLibrariesDirectory,
z.ZodTypeDef,
unknown
> = z
.object({
allowSync: z.boolean().optional(),
art: z.string().optional(),
composite: z.string().optional(),
filters: z.boolean().optional(),
refreshing: z.boolean().optional(),
thumb: z.string().optional(),
key: z.string().optional(),
type: z.string().optional(),
title: z.string().optional(),
agent: z.string().optional(),
scanner: z.string().optional(),
language: z.string().optional(),
uuid: z.string().optional(),
updatedAt: z.number().int().optional(),
createdAt: z.number().int().optional(),
scannedAt: z.number().int().optional(),
content: z.boolean().optional(),
directory: z.boolean().optional(),
contentChangedAt: z.number().int().optional(),
hidden: z.number().int().optional(),
Location: z.array(z.lazy(() => Location$inboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
Location: "location",
});
});
/** @internal */
export type GetAllLibrariesDirectory$Outbound = {
allowSync?: boolean | undefined;
art?: string | undefined;
composite?: string | undefined;
filters?: boolean | undefined;
refreshing?: boolean | undefined;
thumb?: string | undefined;
key?: string | undefined;
type?: string | undefined;
title?: string | undefined;
agent?: string | undefined;
scanner?: string | undefined;
language?: string | undefined;
uuid?: string | undefined;
updatedAt?: number | undefined;
createdAt?: number | undefined;
scannedAt?: number | undefined;
content?: boolean | undefined;
directory?: boolean | undefined;
contentChangedAt?: number | undefined;
hidden?: number | undefined;
Location?: Array<Location$Outbound> | undefined;
};
/** @internal */
export const GetAllLibrariesDirectory$outboundSchema: z.ZodType<
GetAllLibrariesDirectory$Outbound,
z.ZodTypeDef,
GetAllLibrariesDirectory
> = z
.object({
allowSync: z.boolean().optional(),
art: z.string().optional(),
composite: z.string().optional(),
filters: z.boolean().optional(),
refreshing: z.boolean().optional(),
thumb: z.string().optional(),
key: z.string().optional(),
type: z.string().optional(),
title: z.string().optional(),
agent: z.string().optional(),
scanner: z.string().optional(),
language: z.string().optional(),
uuid: z.string().optional(),
updatedAt: z.number().int().optional(),
createdAt: z.number().int().optional(),
scannedAt: z.number().int().optional(),
content: z.boolean().optional(),
directory: z.boolean().optional(),
contentChangedAt: z.number().int().optional(),
hidden: z.number().int().optional(),
location: z.array(z.lazy(() => Location$outboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
location: "Location",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetAllLibrariesDirectory$ {
/** @deprecated use `GetAllLibrariesDirectory$inboundSchema` instead. */
export const inboundSchema = GetAllLibrariesDirectory$inboundSchema;
/** @deprecated use `GetAllLibrariesDirectory$outboundSchema` instead. */
export const outboundSchema = GetAllLibrariesDirectory$outboundSchema;
/** @deprecated use `GetAllLibrariesDirectory$Outbound` instead. */
export type Outbound = GetAllLibrariesDirectory$Outbound;
}
/** @internal */
export const GetAllLibrariesMediaContainer$inboundSchema: z.ZodType<
GetAllLibrariesMediaContainer,
z.ZodTypeDef,
unknown
> = z
.object({
size: z.number().int(),
allowSync: z.boolean(),
title1: z.string(),
Directory: z.array(z.lazy(() => GetAllLibrariesDirectory$inboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
Directory: "directory",
});
});
/** @internal */
export type GetAllLibrariesMediaContainer$Outbound = {
size: number;
allowSync: boolean;
title1: string;
Directory?: Array<GetAllLibrariesDirectory$Outbound> | undefined;
};
/** @internal */
export const GetAllLibrariesMediaContainer$outboundSchema: z.ZodType<
GetAllLibrariesMediaContainer$Outbound,
z.ZodTypeDef,
GetAllLibrariesMediaContainer
> = z
.object({
size: z.number().int(),
allowSync: z.boolean(),
title1: z.string(),
directory: z.array(z.lazy(() => GetAllLibrariesDirectory$outboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
directory: "Directory",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetAllLibrariesMediaContainer$ {
/** @deprecated use `GetAllLibrariesMediaContainer$inboundSchema` instead. */
export const inboundSchema = GetAllLibrariesMediaContainer$inboundSchema;
/** @deprecated use `GetAllLibrariesMediaContainer$outboundSchema` instead. */
export const outboundSchema = GetAllLibrariesMediaContainer$outboundSchema;
/** @deprecated use `GetAllLibrariesMediaContainer$Outbound` instead. */
export type Outbound = GetAllLibrariesMediaContainer$Outbound;
}
/** @internal */
export const GetAllLibrariesResponseBody$inboundSchema: z.ZodType<
GetAllLibrariesResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
MediaContainer: z.lazy(() => GetAllLibrariesMediaContainer$inboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
MediaContainer: "mediaContainer",
});
});
/** @internal */
export type GetAllLibrariesResponseBody$Outbound = {
MediaContainer?: GetAllLibrariesMediaContainer$Outbound | undefined;
};
/** @internal */
export const GetAllLibrariesResponseBody$outboundSchema: z.ZodType<
GetAllLibrariesResponseBody$Outbound,
z.ZodTypeDef,
GetAllLibrariesResponseBody
> = z
.object({
mediaContainer: z.lazy(() => GetAllLibrariesMediaContainer$outboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
mediaContainer: "MediaContainer",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetAllLibrariesResponseBody$ {
/** @deprecated use `GetAllLibrariesResponseBody$inboundSchema` instead. */
export const inboundSchema = GetAllLibrariesResponseBody$inboundSchema;
/** @deprecated use `GetAllLibrariesResponseBody$outboundSchema` instead. */
export const outboundSchema = GetAllLibrariesResponseBody$outboundSchema;
/** @deprecated use `GetAllLibrariesResponseBody$Outbound` instead. */
export type Outbound = GetAllLibrariesResponseBody$Outbound;
}
/** @internal */
export const GetAllLibrariesResponse$inboundSchema: z.ZodType<
GetAllLibrariesResponse,
z.ZodTypeDef,
unknown
> = z
.object({
ContentType: z.string(),
StatusCode: z.number().int(),
RawResponse: z.instanceof(Response),
object: z.lazy(() => GetAllLibrariesResponseBody$inboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
/** @internal */
export type GetAllLibrariesResponse$Outbound = {
ContentType: string;
StatusCode: number;
RawResponse: never;
object?: GetAllLibrariesResponseBody$Outbound | undefined;
};
/** @internal */
export const GetAllLibrariesResponse$outboundSchema: z.ZodType<
GetAllLibrariesResponse$Outbound,
z.ZodTypeDef,
GetAllLibrariesResponse
> = z
.object({
contentType: z.string(),
statusCode: z.number().int(),
rawResponse: z.instanceof(Response).transform(() => {
throw new Error("Response cannot be serialized");
}),
object: z.lazy(() => GetAllLibrariesResponseBody$outboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetAllLibrariesResponse$ {
/** @deprecated use `GetAllLibrariesResponse$inboundSchema` instead. */
export const inboundSchema = GetAllLibrariesResponse$inboundSchema;
/** @deprecated use `GetAllLibrariesResponse$outboundSchema` instead. */
export const outboundSchema = GetAllLibrariesResponse$outboundSchema;
/** @deprecated use `GetAllLibrariesResponse$Outbound` instead. */
export type Outbound = GetAllLibrariesResponse$Outbound;
}

View File

@@ -0,0 +1,271 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type Server = {
name?: string | undefined;
host?: string | undefined;
address?: string | undefined;
port?: number | undefined;
machineIdentifier?: string | undefined;
version?: string | undefined;
protocol?: string | undefined;
product?: string | undefined;
deviceClass?: string | undefined;
protocolVersion?: number | undefined;
protocolCapabilities?: string | undefined;
};
export type GetAvailableClientsMediaContainer = {
size?: number | undefined;
server?: Array<Server> | undefined;
};
/**
* Available Clients
*/
export type GetAvailableClientsResponseBody = {
mediaContainer?: GetAvailableClientsMediaContainer | undefined;
};
export type GetAvailableClientsResponse = {
/**
* HTTP response content type for this operation
*/
contentType: string;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse: Response;
/**
* Available Clients
*/
object?: GetAvailableClientsResponseBody | undefined;
};
/** @internal */
export const Server$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(),
});
/** @internal */
export type Server$Outbound = {
name?: string | undefined;
host?: string | undefined;
address?: string | undefined;
port?: number | undefined;
machineIdentifier?: string | undefined;
version?: string | undefined;
protocol?: string | undefined;
product?: string | undefined;
deviceClass?: string | undefined;
protocolVersion?: number | undefined;
protocolCapabilities?: string | undefined;
};
/** @internal */
export const Server$outboundSchema: z.ZodType<Server$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
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace Server$ {
/** @deprecated use `Server$inboundSchema` instead. */
export const inboundSchema = Server$inboundSchema;
/** @deprecated use `Server$outboundSchema` instead. */
export const outboundSchema = Server$outboundSchema;
/** @deprecated use `Server$Outbound` instead. */
export type Outbound = Server$Outbound;
}
/** @internal */
export const GetAvailableClientsMediaContainer$inboundSchema: z.ZodType<
GetAvailableClientsMediaContainer,
z.ZodTypeDef,
unknown
> = z
.object({
size: z.number().optional(),
Server: z.array(z.lazy(() => Server$inboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
Server: "server",
});
});
/** @internal */
export type GetAvailableClientsMediaContainer$Outbound = {
size?: number | undefined;
Server?: Array<Server$Outbound> | undefined;
};
/** @internal */
export const GetAvailableClientsMediaContainer$outboundSchema: z.ZodType<
GetAvailableClientsMediaContainer$Outbound,
z.ZodTypeDef,
GetAvailableClientsMediaContainer
> = z
.object({
size: z.number().optional(),
server: z.array(z.lazy(() => Server$outboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
server: "Server",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetAvailableClientsMediaContainer$ {
/** @deprecated use `GetAvailableClientsMediaContainer$inboundSchema` instead. */
export const inboundSchema = GetAvailableClientsMediaContainer$inboundSchema;
/** @deprecated use `GetAvailableClientsMediaContainer$outboundSchema` instead. */
export const outboundSchema = GetAvailableClientsMediaContainer$outboundSchema;
/** @deprecated use `GetAvailableClientsMediaContainer$Outbound` instead. */
export type Outbound = GetAvailableClientsMediaContainer$Outbound;
}
/** @internal */
export const GetAvailableClientsResponseBody$inboundSchema: z.ZodType<
GetAvailableClientsResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
MediaContainer: z.lazy(() => GetAvailableClientsMediaContainer$inboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
MediaContainer: "mediaContainer",
});
});
/** @internal */
export type GetAvailableClientsResponseBody$Outbound = {
MediaContainer?: GetAvailableClientsMediaContainer$Outbound | undefined;
};
/** @internal */
export const GetAvailableClientsResponseBody$outboundSchema: z.ZodType<
GetAvailableClientsResponseBody$Outbound,
z.ZodTypeDef,
GetAvailableClientsResponseBody
> = z
.object({
mediaContainer: z.lazy(() => GetAvailableClientsMediaContainer$outboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
mediaContainer: "MediaContainer",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetAvailableClientsResponseBody$ {
/** @deprecated use `GetAvailableClientsResponseBody$inboundSchema` instead. */
export const inboundSchema = GetAvailableClientsResponseBody$inboundSchema;
/** @deprecated use `GetAvailableClientsResponseBody$outboundSchema` instead. */
export const outboundSchema = GetAvailableClientsResponseBody$outboundSchema;
/** @deprecated use `GetAvailableClientsResponseBody$Outbound` instead. */
export type Outbound = GetAvailableClientsResponseBody$Outbound;
}
/** @internal */
export const GetAvailableClientsResponse$inboundSchema: z.ZodType<
GetAvailableClientsResponse,
z.ZodTypeDef,
unknown
> = z
.object({
ContentType: z.string(),
StatusCode: z.number().int(),
RawResponse: z.instanceof(Response),
object: z.lazy(() => GetAvailableClientsResponseBody$inboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
/** @internal */
export type GetAvailableClientsResponse$Outbound = {
ContentType: string;
StatusCode: number;
RawResponse: never;
object?: GetAvailableClientsResponseBody$Outbound | undefined;
};
/** @internal */
export const GetAvailableClientsResponse$outboundSchema: z.ZodType<
GetAvailableClientsResponse$Outbound,
z.ZodTypeDef,
GetAvailableClientsResponse
> = z
.object({
contentType: z.string(),
statusCode: z.number().int(),
rawResponse: z.instanceof(Response).transform(() => {
throw new Error("Response cannot be serialized");
}),
object: z.lazy(() => GetAvailableClientsResponseBody$outboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetAvailableClientsResponse$ {
/** @deprecated use `GetAvailableClientsResponse$inboundSchema` instead. */
export const inboundSchema = GetAvailableClientsResponse$inboundSchema;
/** @deprecated use `GetAvailableClientsResponse$outboundSchema` instead. */
export const outboundSchema = GetAvailableClientsResponse$outboundSchema;
/** @deprecated use `GetAvailableClientsResponse$Outbound` instead. */
export type Outbound = GetAvailableClientsResponse$Outbound;
}

View File

@@ -0,0 +1,456 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetBandwidthStatisticsRequest = {
/**
* The timespan to retrieve statistics for
*
* @remarks
* the exact meaning of this parameter is not known
*
*/
timespan?: number | undefined;
};
export type GetBandwidthStatisticsDevice = {
id?: number | undefined;
name?: string | undefined;
platform?: string | undefined;
clientIdentifier?: string | undefined;
createdAt?: number | undefined;
};
export type GetBandwidthStatisticsAccount = {
id?: number | undefined;
key?: string | undefined;
name?: string | undefined;
defaultAudioLanguage?: string | undefined;
autoSelectAudio?: boolean | undefined;
defaultSubtitleLanguage?: string | undefined;
subtitleMode?: number | undefined;
thumb?: string | undefined;
};
export type StatisticsBandwidth = {
accountID?: number | undefined;
deviceID?: number | undefined;
timespan?: number | undefined;
at?: number | undefined;
lan?: boolean | undefined;
bytes?: number | undefined;
};
export type GetBandwidthStatisticsMediaContainer = {
size?: number | undefined;
device?: Array<GetBandwidthStatisticsDevice> | undefined;
account?: Array<GetBandwidthStatisticsAccount> | undefined;
statisticsBandwidth?: Array<StatisticsBandwidth> | undefined;
};
/**
* Bandwidth Statistics
*/
export type GetBandwidthStatisticsResponseBody = {
mediaContainer?: GetBandwidthStatisticsMediaContainer | undefined;
};
export type GetBandwidthStatisticsResponse = {
/**
* HTTP response content type for this operation
*/
contentType: string;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse: Response;
/**
* Bandwidth Statistics
*/
object?: GetBandwidthStatisticsResponseBody | undefined;
};
/** @internal */
export const GetBandwidthStatisticsRequest$inboundSchema: z.ZodType<
GetBandwidthStatisticsRequest,
z.ZodTypeDef,
unknown
> = z
.object({
Timespan: z.number().int().optional(),
})
.transform((v) => {
return remap$(v, {
Timespan: "timespan",
});
});
/** @internal */
export type GetBandwidthStatisticsRequest$Outbound = {
Timespan?: number | undefined;
};
/** @internal */
export const GetBandwidthStatisticsRequest$outboundSchema: z.ZodType<
GetBandwidthStatisticsRequest$Outbound,
z.ZodTypeDef,
GetBandwidthStatisticsRequest
> = z
.object({
timespan: z.number().int().optional(),
})
.transform((v) => {
return remap$(v, {
timespan: "Timespan",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetBandwidthStatisticsRequest$ {
/** @deprecated use `GetBandwidthStatisticsRequest$inboundSchema` instead. */
export const inboundSchema = GetBandwidthStatisticsRequest$inboundSchema;
/** @deprecated use `GetBandwidthStatisticsRequest$outboundSchema` instead. */
export const outboundSchema = GetBandwidthStatisticsRequest$outboundSchema;
/** @deprecated use `GetBandwidthStatisticsRequest$Outbound` instead. */
export type Outbound = GetBandwidthStatisticsRequest$Outbound;
}
/** @internal */
export const GetBandwidthStatisticsDevice$inboundSchema: z.ZodType<
GetBandwidthStatisticsDevice,
z.ZodTypeDef,
unknown
> = z.object({
id: z.number().int().optional(),
name: z.string().optional(),
platform: z.string().optional(),
clientIdentifier: z.string().optional(),
createdAt: z.number().int().optional(),
});
/** @internal */
export type GetBandwidthStatisticsDevice$Outbound = {
id?: number | undefined;
name?: string | undefined;
platform?: string | undefined;
clientIdentifier?: string | undefined;
createdAt?: number | undefined;
};
/** @internal */
export const GetBandwidthStatisticsDevice$outboundSchema: z.ZodType<
GetBandwidthStatisticsDevice$Outbound,
z.ZodTypeDef,
GetBandwidthStatisticsDevice
> = z.object({
id: z.number().int().optional(),
name: z.string().optional(),
platform: z.string().optional(),
clientIdentifier: z.string().optional(),
createdAt: z.number().int().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetBandwidthStatisticsDevice$ {
/** @deprecated use `GetBandwidthStatisticsDevice$inboundSchema` instead. */
export const inboundSchema = GetBandwidthStatisticsDevice$inboundSchema;
/** @deprecated use `GetBandwidthStatisticsDevice$outboundSchema` instead. */
export const outboundSchema = GetBandwidthStatisticsDevice$outboundSchema;
/** @deprecated use `GetBandwidthStatisticsDevice$Outbound` instead. */
export type Outbound = GetBandwidthStatisticsDevice$Outbound;
}
/** @internal */
export const GetBandwidthStatisticsAccount$inboundSchema: z.ZodType<
GetBandwidthStatisticsAccount,
z.ZodTypeDef,
unknown
> = z.object({
id: z.number().int().optional(),
key: z.string().optional(),
name: z.string().optional(),
defaultAudioLanguage: z.string().optional(),
autoSelectAudio: z.boolean().optional(),
defaultSubtitleLanguage: z.string().optional(),
subtitleMode: z.number().int().optional(),
thumb: z.string().optional(),
});
/** @internal */
export type GetBandwidthStatisticsAccount$Outbound = {
id?: number | undefined;
key?: string | undefined;
name?: string | undefined;
defaultAudioLanguage?: string | undefined;
autoSelectAudio?: boolean | undefined;
defaultSubtitleLanguage?: string | undefined;
subtitleMode?: number | undefined;
thumb?: string | undefined;
};
/** @internal */
export const GetBandwidthStatisticsAccount$outboundSchema: z.ZodType<
GetBandwidthStatisticsAccount$Outbound,
z.ZodTypeDef,
GetBandwidthStatisticsAccount
> = z.object({
id: z.number().int().optional(),
key: z.string().optional(),
name: z.string().optional(),
defaultAudioLanguage: z.string().optional(),
autoSelectAudio: z.boolean().optional(),
defaultSubtitleLanguage: z.string().optional(),
subtitleMode: z.number().int().optional(),
thumb: z.string().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetBandwidthStatisticsAccount$ {
/** @deprecated use `GetBandwidthStatisticsAccount$inboundSchema` instead. */
export const inboundSchema = GetBandwidthStatisticsAccount$inboundSchema;
/** @deprecated use `GetBandwidthStatisticsAccount$outboundSchema` instead. */
export const outboundSchema = GetBandwidthStatisticsAccount$outboundSchema;
/** @deprecated use `GetBandwidthStatisticsAccount$Outbound` instead. */
export type Outbound = GetBandwidthStatisticsAccount$Outbound;
}
/** @internal */
export const StatisticsBandwidth$inboundSchema: z.ZodType<
StatisticsBandwidth,
z.ZodTypeDef,
unknown
> = z.object({
accountID: z.number().int().optional(),
deviceID: z.number().int().optional(),
timespan: z.number().int().optional(),
at: z.number().int().optional(),
lan: z.boolean().optional(),
bytes: z.number().int().optional(),
});
/** @internal */
export type StatisticsBandwidth$Outbound = {
accountID?: number | undefined;
deviceID?: number | undefined;
timespan?: number | undefined;
at?: number | undefined;
lan?: boolean | undefined;
bytes?: number | undefined;
};
/** @internal */
export const StatisticsBandwidth$outboundSchema: z.ZodType<
StatisticsBandwidth$Outbound,
z.ZodTypeDef,
StatisticsBandwidth
> = z.object({
accountID: z.number().int().optional(),
deviceID: z.number().int().optional(),
timespan: z.number().int().optional(),
at: z.number().int().optional(),
lan: z.boolean().optional(),
bytes: z.number().int().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace StatisticsBandwidth$ {
/** @deprecated use `StatisticsBandwidth$inboundSchema` instead. */
export const inboundSchema = StatisticsBandwidth$inboundSchema;
/** @deprecated use `StatisticsBandwidth$outboundSchema` instead. */
export const outboundSchema = StatisticsBandwidth$outboundSchema;
/** @deprecated use `StatisticsBandwidth$Outbound` instead. */
export type Outbound = StatisticsBandwidth$Outbound;
}
/** @internal */
export const GetBandwidthStatisticsMediaContainer$inboundSchema: z.ZodType<
GetBandwidthStatisticsMediaContainer,
z.ZodTypeDef,
unknown
> = z
.object({
size: z.number().int().optional(),
Device: z.array(z.lazy(() => GetBandwidthStatisticsDevice$inboundSchema)).optional(),
Account: z.array(z.lazy(() => GetBandwidthStatisticsAccount$inboundSchema)).optional(),
StatisticsBandwidth: z.array(z.lazy(() => StatisticsBandwidth$inboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
Device: "device",
Account: "account",
StatisticsBandwidth: "statisticsBandwidth",
});
});
/** @internal */
export type GetBandwidthStatisticsMediaContainer$Outbound = {
size?: number | undefined;
Device?: Array<GetBandwidthStatisticsDevice$Outbound> | undefined;
Account?: Array<GetBandwidthStatisticsAccount$Outbound> | undefined;
StatisticsBandwidth?: Array<StatisticsBandwidth$Outbound> | undefined;
};
/** @internal */
export const GetBandwidthStatisticsMediaContainer$outboundSchema: z.ZodType<
GetBandwidthStatisticsMediaContainer$Outbound,
z.ZodTypeDef,
GetBandwidthStatisticsMediaContainer
> = z
.object({
size: z.number().int().optional(),
device: z.array(z.lazy(() => GetBandwidthStatisticsDevice$outboundSchema)).optional(),
account: z.array(z.lazy(() => GetBandwidthStatisticsAccount$outboundSchema)).optional(),
statisticsBandwidth: z.array(z.lazy(() => StatisticsBandwidth$outboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
device: "Device",
account: "Account",
statisticsBandwidth: "StatisticsBandwidth",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetBandwidthStatisticsMediaContainer$ {
/** @deprecated use `GetBandwidthStatisticsMediaContainer$inboundSchema` instead. */
export const inboundSchema = GetBandwidthStatisticsMediaContainer$inboundSchema;
/** @deprecated use `GetBandwidthStatisticsMediaContainer$outboundSchema` instead. */
export const outboundSchema = GetBandwidthStatisticsMediaContainer$outboundSchema;
/** @deprecated use `GetBandwidthStatisticsMediaContainer$Outbound` instead. */
export type Outbound = GetBandwidthStatisticsMediaContainer$Outbound;
}
/** @internal */
export const GetBandwidthStatisticsResponseBody$inboundSchema: z.ZodType<
GetBandwidthStatisticsResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
MediaContainer: z.lazy(() => GetBandwidthStatisticsMediaContainer$inboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
MediaContainer: "mediaContainer",
});
});
/** @internal */
export type GetBandwidthStatisticsResponseBody$Outbound = {
MediaContainer?: GetBandwidthStatisticsMediaContainer$Outbound | undefined;
};
/** @internal */
export const GetBandwidthStatisticsResponseBody$outboundSchema: z.ZodType<
GetBandwidthStatisticsResponseBody$Outbound,
z.ZodTypeDef,
GetBandwidthStatisticsResponseBody
> = z
.object({
mediaContainer: z
.lazy(() => GetBandwidthStatisticsMediaContainer$outboundSchema)
.optional(),
})
.transform((v) => {
return remap$(v, {
mediaContainer: "MediaContainer",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetBandwidthStatisticsResponseBody$ {
/** @deprecated use `GetBandwidthStatisticsResponseBody$inboundSchema` instead. */
export const inboundSchema = GetBandwidthStatisticsResponseBody$inboundSchema;
/** @deprecated use `GetBandwidthStatisticsResponseBody$outboundSchema` instead. */
export const outboundSchema = GetBandwidthStatisticsResponseBody$outboundSchema;
/** @deprecated use `GetBandwidthStatisticsResponseBody$Outbound` instead. */
export type Outbound = GetBandwidthStatisticsResponseBody$Outbound;
}
/** @internal */
export const GetBandwidthStatisticsResponse$inboundSchema: z.ZodType<
GetBandwidthStatisticsResponse,
z.ZodTypeDef,
unknown
> = z
.object({
ContentType: z.string(),
StatusCode: z.number().int(),
RawResponse: z.instanceof(Response),
object: z.lazy(() => GetBandwidthStatisticsResponseBody$inboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
/** @internal */
export type GetBandwidthStatisticsResponse$Outbound = {
ContentType: string;
StatusCode: number;
RawResponse: never;
object?: GetBandwidthStatisticsResponseBody$Outbound | undefined;
};
/** @internal */
export const GetBandwidthStatisticsResponse$outboundSchema: z.ZodType<
GetBandwidthStatisticsResponse$Outbound,
z.ZodTypeDef,
GetBandwidthStatisticsResponse
> = z
.object({
contentType: z.string(),
statusCode: z.number().int(),
rawResponse: z.instanceof(Response).transform(() => {
throw new Error("Response cannot be serialized");
}),
object: z.lazy(() => GetBandwidthStatisticsResponseBody$outboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetBandwidthStatisticsResponse$ {
/** @deprecated use `GetBandwidthStatisticsResponse$inboundSchema` instead. */
export const inboundSchema = GetBandwidthStatisticsResponse$inboundSchema;
/** @deprecated use `GetBandwidthStatisticsResponse$outboundSchema` instead. */
export const outboundSchema = GetBandwidthStatisticsResponse$outboundSchema;
/** @deprecated use `GetBandwidthStatisticsResponse$Outbound` instead. */
export type Outbound = GetBandwidthStatisticsResponse$Outbound;
}

View File

@@ -0,0 +1,174 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetBannerImageRequest = {
/**
* the id of the library item to return the children of.
*/
ratingKey: number;
width: number;
height: number;
minSize: number;
upscale: number;
/**
* Plex Authentication Token
*/
xPlexToken: string;
};
export type GetBannerImageResponse = {
/**
* HTTP response content type for this operation
*/
contentType: string;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse: Response;
/**
* Successful response returning an image
*/
responseStream?: ReadableStream<Uint8Array> | undefined;
headers: { [k: string]: Array<string> };
};
/** @internal */
export const GetBannerImageRequest$inboundSchema: z.ZodType<
GetBannerImageRequest,
z.ZodTypeDef,
unknown
> = z
.object({
ratingKey: z.number().int(),
width: z.number().int(),
height: z.number().int(),
minSize: z.number().int(),
upscale: z.number().int(),
"X-Plex-Token": z.string(),
})
.transform((v) => {
return remap$(v, {
"X-Plex-Token": "xPlexToken",
});
});
/** @internal */
export type GetBannerImageRequest$Outbound = {
ratingKey: number;
width: number;
height: number;
minSize: number;
upscale: number;
"X-Plex-Token": string;
};
/** @internal */
export const GetBannerImageRequest$outboundSchema: z.ZodType<
GetBannerImageRequest$Outbound,
z.ZodTypeDef,
GetBannerImageRequest
> = z
.object({
ratingKey: z.number().int(),
width: z.number().int(),
height: z.number().int(),
minSize: z.number().int(),
upscale: z.number().int(),
xPlexToken: z.string(),
})
.transform((v) => {
return remap$(v, {
xPlexToken: "X-Plex-Token",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetBannerImageRequest$ {
/** @deprecated use `GetBannerImageRequest$inboundSchema` instead. */
export const inboundSchema = GetBannerImageRequest$inboundSchema;
/** @deprecated use `GetBannerImageRequest$outboundSchema` instead. */
export const outboundSchema = GetBannerImageRequest$outboundSchema;
/** @deprecated use `GetBannerImageRequest$Outbound` instead. */
export type Outbound = GetBannerImageRequest$Outbound;
}
/** @internal */
export const GetBannerImageResponse$inboundSchema: z.ZodType<
GetBannerImageResponse,
z.ZodTypeDef,
unknown
> = z
.object({
ContentType: z.string(),
StatusCode: z.number().int(),
RawResponse: z.instanceof(Response),
"response-stream": z.instanceof(ReadableStream<Uint8Array>).optional(),
Headers: z.record(z.array(z.string())),
})
.transform((v) => {
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
"response-stream": "responseStream",
Headers: "headers",
});
});
/** @internal */
export type GetBannerImageResponse$Outbound = {
ContentType: string;
StatusCode: number;
RawResponse: never;
"response-stream"?: ReadableStream<Uint8Array> | undefined;
Headers: { [k: string]: Array<string> };
};
/** @internal */
export const GetBannerImageResponse$outboundSchema: z.ZodType<
GetBannerImageResponse$Outbound,
z.ZodTypeDef,
GetBannerImageResponse
> = z
.object({
contentType: z.string(),
statusCode: z.number().int(),
rawResponse: z.instanceof(Response).transform(() => {
throw new Error("Response cannot be serialized");
}),
responseStream: z.instanceof(ReadableStream<Uint8Array>).optional(),
headers: z.record(z.array(z.string())),
})
.transform((v) => {
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
responseStream: "response-stream",
headers: "Headers",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetBannerImageResponse$ {
/** @deprecated use `GetBannerImageResponse$inboundSchema` instead. */
export const inboundSchema = GetBannerImageResponse$inboundSchema;
/** @deprecated use `GetBannerImageResponse$outboundSchema` instead. */
export const outboundSchema = GetBannerImageResponse$outboundSchema;
/** @deprecated use `GetBannerImageResponse$Outbound` instead. */
export type Outbound = GetBannerImageResponse$Outbound;
}

View File

@@ -0,0 +1,244 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type ButlerTask = {
name?: string | undefined;
interval?: number | undefined;
scheduleRandomized?: boolean | undefined;
enabled?: boolean | undefined;
title?: string | undefined;
description?: string | undefined;
};
export type ButlerTasks = {
butlerTask?: Array<ButlerTask> | undefined;
};
/**
* All butler tasks
*/
export type GetButlerTasksResponseBody = {
butlerTasks?: ButlerTasks | undefined;
};
export type GetButlerTasksResponse = {
/**
* HTTP response content type for this operation
*/
contentType: string;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse: Response;
/**
* All butler tasks
*/
object?: GetButlerTasksResponseBody | undefined;
};
/** @internal */
export const ButlerTask$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(),
});
/** @internal */
export type ButlerTask$Outbound = {
name?: string | undefined;
interval?: number | undefined;
scheduleRandomized?: boolean | undefined;
enabled?: boolean | undefined;
title?: string | undefined;
description?: string | undefined;
};
/** @internal */
export const ButlerTask$outboundSchema: z.ZodType<ButlerTask$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
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace ButlerTask$ {
/** @deprecated use `ButlerTask$inboundSchema` instead. */
export const inboundSchema = ButlerTask$inboundSchema;
/** @deprecated use `ButlerTask$outboundSchema` instead. */
export const outboundSchema = ButlerTask$outboundSchema;
/** @deprecated use `ButlerTask$Outbound` instead. */
export type Outbound = ButlerTask$Outbound;
}
/** @internal */
export const ButlerTasks$inboundSchema: z.ZodType<ButlerTasks, z.ZodTypeDef, unknown> = z
.object({
ButlerTask: z.array(z.lazy(() => ButlerTask$inboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
ButlerTask: "butlerTask",
});
});
/** @internal */
export type ButlerTasks$Outbound = {
ButlerTask?: Array<ButlerTask$Outbound> | undefined;
};
/** @internal */
export const ButlerTasks$outboundSchema: z.ZodType<
ButlerTasks$Outbound,
z.ZodTypeDef,
ButlerTasks
> = z
.object({
butlerTask: z.array(z.lazy(() => ButlerTask$outboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
butlerTask: "ButlerTask",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace ButlerTasks$ {
/** @deprecated use `ButlerTasks$inboundSchema` instead. */
export const inboundSchema = ButlerTasks$inboundSchema;
/** @deprecated use `ButlerTasks$outboundSchema` instead. */
export const outboundSchema = ButlerTasks$outboundSchema;
/** @deprecated use `ButlerTasks$Outbound` instead. */
export type Outbound = ButlerTasks$Outbound;
}
/** @internal */
export const GetButlerTasksResponseBody$inboundSchema: z.ZodType<
GetButlerTasksResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
ButlerTasks: z.lazy(() => ButlerTasks$inboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
ButlerTasks: "butlerTasks",
});
});
/** @internal */
export type GetButlerTasksResponseBody$Outbound = {
ButlerTasks?: ButlerTasks$Outbound | undefined;
};
/** @internal */
export const GetButlerTasksResponseBody$outboundSchema: z.ZodType<
GetButlerTasksResponseBody$Outbound,
z.ZodTypeDef,
GetButlerTasksResponseBody
> = z
.object({
butlerTasks: z.lazy(() => ButlerTasks$outboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
butlerTasks: "ButlerTasks",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetButlerTasksResponseBody$ {
/** @deprecated use `GetButlerTasksResponseBody$inboundSchema` instead. */
export const inboundSchema = GetButlerTasksResponseBody$inboundSchema;
/** @deprecated use `GetButlerTasksResponseBody$outboundSchema` instead. */
export const outboundSchema = GetButlerTasksResponseBody$outboundSchema;
/** @deprecated use `GetButlerTasksResponseBody$Outbound` instead. */
export type Outbound = GetButlerTasksResponseBody$Outbound;
}
/** @internal */
export const GetButlerTasksResponse$inboundSchema: z.ZodType<
GetButlerTasksResponse,
z.ZodTypeDef,
unknown
> = z
.object({
ContentType: z.string(),
StatusCode: z.number().int(),
RawResponse: z.instanceof(Response),
object: z.lazy(() => GetButlerTasksResponseBody$inboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
/** @internal */
export type GetButlerTasksResponse$Outbound = {
ContentType: string;
StatusCode: number;
RawResponse: never;
object?: GetButlerTasksResponseBody$Outbound | undefined;
};
/** @internal */
export const GetButlerTasksResponse$outboundSchema: z.ZodType<
GetButlerTasksResponse$Outbound,
z.ZodTypeDef,
GetButlerTasksResponse
> = z
.object({
contentType: z.string(),
statusCode: z.number().int(),
rawResponse: z.instanceof(Response).transform(() => {
throw new Error("Response cannot be serialized");
}),
object: z.lazy(() => GetButlerTasksResponseBody$outboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetButlerTasksResponse$ {
/** @deprecated use `GetButlerTasksResponse$inboundSchema` instead. */
export const inboundSchema = GetButlerTasksResponse$inboundSchema;
/** @deprecated use `GetButlerTasksResponse$outboundSchema` instead. */
export const outboundSchema = GetButlerTasksResponse$outboundSchema;
/** @deprecated use `GetButlerTasksResponse$Outbound` instead. */
export type Outbound = GetButlerTasksResponse$Outbound;
}

View File

@@ -0,0 +1,149 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export const GetCompanionsDataServerList = ["https://plex.tv/api/v2"] as const;
export type ResponseBody = {
identifier: string;
baseURL: string;
title: string;
linkURL: string;
provides: string;
/**
* The plex authtoken used to identify with
*/
token: string;
};
export type GetCompanionsDataResponse = {
/**
* HTTP response content type for this operation
*/
contentType: string;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse: Response;
/**
* Companions Data
*/
responseBodies?: Array<ResponseBody> | undefined;
};
/** @internal */
export const ResponseBody$inboundSchema: z.ZodType<ResponseBody, z.ZodTypeDef, unknown> = z.object({
identifier: z.string(),
baseURL: z.string(),
title: z.string(),
linkURL: z.string(),
provides: z.string(),
token: z.string(),
});
/** @internal */
export type ResponseBody$Outbound = {
identifier: string;
baseURL: string;
title: string;
linkURL: string;
provides: string;
token: string;
};
/** @internal */
export const ResponseBody$outboundSchema: z.ZodType<
ResponseBody$Outbound,
z.ZodTypeDef,
ResponseBody
> = z.object({
identifier: z.string(),
baseURL: z.string(),
title: z.string(),
linkURL: z.string(),
provides: z.string(),
token: z.string(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace ResponseBody$ {
/** @deprecated use `ResponseBody$inboundSchema` instead. */
export const inboundSchema = ResponseBody$inboundSchema;
/** @deprecated use `ResponseBody$outboundSchema` instead. */
export const outboundSchema = ResponseBody$outboundSchema;
/** @deprecated use `ResponseBody$Outbound` instead. */
export type Outbound = ResponseBody$Outbound;
}
/** @internal */
export const GetCompanionsDataResponse$inboundSchema: z.ZodType<
GetCompanionsDataResponse,
z.ZodTypeDef,
unknown
> = z
.object({
ContentType: z.string(),
StatusCode: z.number().int(),
RawResponse: z.instanceof(Response),
responseBodies: z.array(z.lazy(() => ResponseBody$inboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
/** @internal */
export type GetCompanionsDataResponse$Outbound = {
ContentType: string;
StatusCode: number;
RawResponse: never;
responseBodies?: Array<ResponseBody$Outbound> | undefined;
};
/** @internal */
export const GetCompanionsDataResponse$outboundSchema: z.ZodType<
GetCompanionsDataResponse$Outbound,
z.ZodTypeDef,
GetCompanionsDataResponse
> = z
.object({
contentType: z.string(),
statusCode: z.number().int(),
rawResponse: z.instanceof(Response).transform(() => {
throw new Error("Response cannot be serialized");
}),
responseBodies: z.array(z.lazy(() => ResponseBody$outboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetCompanionsDataResponse$ {
/** @deprecated use `GetCompanionsDataResponse$inboundSchema` instead. */
export const inboundSchema = GetCompanionsDataResponse$inboundSchema;
/** @deprecated use `GetCompanionsDataResponse$outboundSchema` instead. */
export const outboundSchema = GetCompanionsDataResponse$outboundSchema;
/** @deprecated use `GetCompanionsDataResponse$Outbound` instead. */
export type Outbound = GetCompanionsDataResponse$Outbound;
}

View File

@@ -0,0 +1,251 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type Device = {
id?: number | undefined;
name?: string | undefined;
platform?: string | undefined;
clientIdentifier?: string | undefined;
createdAt?: number | undefined;
};
export type GetDevicesMediaContainer = {
size?: number | undefined;
identifier?: string | undefined;
device?: Array<Device> | undefined;
};
/**
* Devices
*/
export type GetDevicesResponseBody = {
mediaContainer?: GetDevicesMediaContainer | undefined;
};
export type GetDevicesResponse = {
/**
* HTTP response content type for this operation
*/
contentType: string;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse: Response;
/**
* Devices
*/
object?: GetDevicesResponseBody | undefined;
};
/** @internal */
export const Device$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(),
});
/** @internal */
export type Device$Outbound = {
id?: number | undefined;
name?: string | undefined;
platform?: string | undefined;
clientIdentifier?: string | undefined;
createdAt?: number | undefined;
};
/** @internal */
export const Device$outboundSchema: z.ZodType<Device$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
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace Device$ {
/** @deprecated use `Device$inboundSchema` instead. */
export const inboundSchema = Device$inboundSchema;
/** @deprecated use `Device$outboundSchema` instead. */
export const outboundSchema = Device$outboundSchema;
/** @deprecated use `Device$Outbound` instead. */
export type Outbound = Device$Outbound;
}
/** @internal */
export const GetDevicesMediaContainer$inboundSchema: z.ZodType<
GetDevicesMediaContainer,
z.ZodTypeDef,
unknown
> = z
.object({
size: z.number().optional(),
identifier: z.string().optional(),
Device: z.array(z.lazy(() => Device$inboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
Device: "device",
});
});
/** @internal */
export type GetDevicesMediaContainer$Outbound = {
size?: number | undefined;
identifier?: string | undefined;
Device?: Array<Device$Outbound> | undefined;
};
/** @internal */
export const GetDevicesMediaContainer$outboundSchema: z.ZodType<
GetDevicesMediaContainer$Outbound,
z.ZodTypeDef,
GetDevicesMediaContainer
> = z
.object({
size: z.number().optional(),
identifier: z.string().optional(),
device: z.array(z.lazy(() => Device$outboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
device: "Device",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetDevicesMediaContainer$ {
/** @deprecated use `GetDevicesMediaContainer$inboundSchema` instead. */
export const inboundSchema = GetDevicesMediaContainer$inboundSchema;
/** @deprecated use `GetDevicesMediaContainer$outboundSchema` instead. */
export const outboundSchema = GetDevicesMediaContainer$outboundSchema;
/** @deprecated use `GetDevicesMediaContainer$Outbound` instead. */
export type Outbound = GetDevicesMediaContainer$Outbound;
}
/** @internal */
export const GetDevicesResponseBody$inboundSchema: z.ZodType<
GetDevicesResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
MediaContainer: z.lazy(() => GetDevicesMediaContainer$inboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
MediaContainer: "mediaContainer",
});
});
/** @internal */
export type GetDevicesResponseBody$Outbound = {
MediaContainer?: GetDevicesMediaContainer$Outbound | undefined;
};
/** @internal */
export const GetDevicesResponseBody$outboundSchema: z.ZodType<
GetDevicesResponseBody$Outbound,
z.ZodTypeDef,
GetDevicesResponseBody
> = z
.object({
mediaContainer: z.lazy(() => GetDevicesMediaContainer$outboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
mediaContainer: "MediaContainer",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetDevicesResponseBody$ {
/** @deprecated use `GetDevicesResponseBody$inboundSchema` instead. */
export const inboundSchema = GetDevicesResponseBody$inboundSchema;
/** @deprecated use `GetDevicesResponseBody$outboundSchema` instead. */
export const outboundSchema = GetDevicesResponseBody$outboundSchema;
/** @deprecated use `GetDevicesResponseBody$Outbound` instead. */
export type Outbound = GetDevicesResponseBody$Outbound;
}
/** @internal */
export const GetDevicesResponse$inboundSchema: z.ZodType<
GetDevicesResponse,
z.ZodTypeDef,
unknown
> = z
.object({
ContentType: z.string(),
StatusCode: z.number().int(),
RawResponse: z.instanceof(Response),
object: z.lazy(() => GetDevicesResponseBody$inboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
/** @internal */
export type GetDevicesResponse$Outbound = {
ContentType: string;
StatusCode: number;
RawResponse: never;
object?: GetDevicesResponseBody$Outbound | undefined;
};
/** @internal */
export const GetDevicesResponse$outboundSchema: z.ZodType<
GetDevicesResponse$Outbound,
z.ZodTypeDef,
GetDevicesResponse
> = z
.object({
contentType: z.string(),
statusCode: z.number().int(),
rawResponse: z.instanceof(Response).transform(() => {
throw new Error("Response cannot be serialized");
}),
object: z.lazy(() => GetDevicesResponseBody$outboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetDevicesResponse$ {
/** @deprecated use `GetDevicesResponse$inboundSchema` instead. */
export const inboundSchema = GetDevicesResponse$inboundSchema;
/** @deprecated use `GetDevicesResponse$outboundSchema` instead. */
export const outboundSchema = GetDevicesResponse$outboundSchema;
/** @deprecated use `GetDevicesResponse$Outbound` instead. */
export type Outbound = GetDevicesResponse$Outbound;
}

View File

@@ -0,0 +1,131 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type GetFileHashRequest = {
/**
* This is the path to the local file, must be prefixed by `file://`
*/
url: string;
/**
* Item type
*/
type?: number | undefined;
};
export type GetFileHashResponse = {
/**
* HTTP response content type for this operation
*/
contentType: string;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse: Response;
};
/** @internal */
export const GetFileHashRequest$inboundSchema: z.ZodType<
GetFileHashRequest,
z.ZodTypeDef,
unknown
> = z.object({
url: z.string(),
type: z.number().optional(),
});
/** @internal */
export type GetFileHashRequest$Outbound = {
url: string;
type?: number | undefined;
};
/** @internal */
export const GetFileHashRequest$outboundSchema: z.ZodType<
GetFileHashRequest$Outbound,
z.ZodTypeDef,
GetFileHashRequest
> = z.object({
url: z.string(),
type: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetFileHashRequest$ {
/** @deprecated use `GetFileHashRequest$inboundSchema` instead. */
export const inboundSchema = GetFileHashRequest$inboundSchema;
/** @deprecated use `GetFileHashRequest$outboundSchema` instead. */
export const outboundSchema = GetFileHashRequest$outboundSchema;
/** @deprecated use `GetFileHashRequest$Outbound` instead. */
export type Outbound = GetFileHashRequest$Outbound;
}
/** @internal */
export const GetFileHashResponse$inboundSchema: z.ZodType<
GetFileHashResponse,
z.ZodTypeDef,
unknown
> = z
.object({
ContentType: z.string(),
StatusCode: z.number().int(),
RawResponse: z.instanceof(Response),
})
.transform((v) => {
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
/** @internal */
export type GetFileHashResponse$Outbound = {
ContentType: string;
StatusCode: number;
RawResponse: never;
};
/** @internal */
export const GetFileHashResponse$outboundSchema: z.ZodType<
GetFileHashResponse$Outbound,
z.ZodTypeDef,
GetFileHashResponse
> = z
.object({
contentType: z.string(),
statusCode: z.number().int(),
rawResponse: z.instanceof(Response).transform(() => {
throw new Error("Response cannot be serialized");
}),
})
.transform((v) => {
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetFileHashResponse$ {
/** @deprecated use `GetFileHashResponse$inboundSchema` instead. */
export const inboundSchema = GetFileHashResponse$inboundSchema;
/** @deprecated use `GetFileHashResponse$outboundSchema` instead. */
export const outboundSchema = GetFileHashResponse$outboundSchema;
/** @deprecated use `GetFileHashResponse$Outbound` instead. */
export type Outbound = GetFileHashResponse$Outbound;
}

View File

@@ -0,0 +1,227 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export const GetGeoDataServerList = ["https://plex.tv/api/v2"] as const;
/**
* Geo location data
*/
export type GetGeoDataGeoData = {
/**
* The ISO 3166-1 alpha-2 code of the country.
*/
code: string;
/**
* The continent code where the country is located.
*/
continentCode: string;
/**
* The official name of the country.
*/
country: string;
/**
* The name of the city.
*/
city: string;
/**
* Indicates if the country is a member of the European Union.
*/
europeanUnionMember?: boolean | undefined;
/**
* The time zone of the country.
*/
timeZone: string;
/**
* The postal code of the location.
*/
postalCode: number;
/**
* Indicates if the country has privacy restrictions.
*/
inPrivacyRestrictedCountry?: boolean | undefined;
/**
* Indicates if the region has privacy restrictions.
*/
inPrivacyRestrictedRegion?: boolean | undefined;
/**
* The name of the primary administrative subdivision.
*/
subdivisions: string;
/**
* The geographical coordinates (latitude, longitude) of the location.
*/
coordinates: string;
};
export type GetGeoDataResponse = {
/**
* HTTP response content type for this operation
*/
contentType: string;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse: Response;
/**
* Gets the geo location data of the user
*/
geoData?: GetGeoDataGeoData | undefined;
};
/** @internal */
export const GetGeoDataGeoData$inboundSchema: z.ZodType<GetGeoDataGeoData, z.ZodTypeDef, unknown> =
z
.object({
code: z.string(),
continent_code: z.string(),
country: z.string(),
city: z.string(),
european_union_member: z.boolean().default(false),
time_zone: z.string(),
postal_code: z.number().int(),
in_privacy_restricted_country: z.boolean().default(false),
in_privacy_restricted_region: z.boolean().default(false),
subdivisions: z.string(),
coordinates: z.string(),
})
.transform((v) => {
return remap$(v, {
continent_code: "continentCode",
european_union_member: "europeanUnionMember",
time_zone: "timeZone",
postal_code: "postalCode",
in_privacy_restricted_country: "inPrivacyRestrictedCountry",
in_privacy_restricted_region: "inPrivacyRestrictedRegion",
});
});
/** @internal */
export type GetGeoDataGeoData$Outbound = {
code: string;
continent_code: string;
country: string;
city: string;
european_union_member: boolean;
time_zone: string;
postal_code: number;
in_privacy_restricted_country: boolean;
in_privacy_restricted_region: boolean;
subdivisions: string;
coordinates: string;
};
/** @internal */
export const GetGeoDataGeoData$outboundSchema: z.ZodType<
GetGeoDataGeoData$Outbound,
z.ZodTypeDef,
GetGeoDataGeoData
> = z
.object({
code: z.string(),
continentCode: z.string(),
country: z.string(),
city: z.string(),
europeanUnionMember: z.boolean().default(false),
timeZone: z.string(),
postalCode: z.number().int(),
inPrivacyRestrictedCountry: z.boolean().default(false),
inPrivacyRestrictedRegion: z.boolean().default(false),
subdivisions: z.string(),
coordinates: z.string(),
})
.transform((v) => {
return remap$(v, {
continentCode: "continent_code",
europeanUnionMember: "european_union_member",
timeZone: "time_zone",
postalCode: "postal_code",
inPrivacyRestrictedCountry: "in_privacy_restricted_country",
inPrivacyRestrictedRegion: "in_privacy_restricted_region",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetGeoDataGeoData$ {
/** @deprecated use `GetGeoDataGeoData$inboundSchema` instead. */
export const inboundSchema = GetGeoDataGeoData$inboundSchema;
/** @deprecated use `GetGeoDataGeoData$outboundSchema` instead. */
export const outboundSchema = GetGeoDataGeoData$outboundSchema;
/** @deprecated use `GetGeoDataGeoData$Outbound` instead. */
export type Outbound = GetGeoDataGeoData$Outbound;
}
/** @internal */
export const GetGeoDataResponse$inboundSchema: z.ZodType<
GetGeoDataResponse,
z.ZodTypeDef,
unknown
> = z
.object({
ContentType: z.string(),
StatusCode: z.number().int(),
RawResponse: z.instanceof(Response),
GeoData: z.lazy(() => GetGeoDataGeoData$inboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
GeoData: "geoData",
});
});
/** @internal */
export type GetGeoDataResponse$Outbound = {
ContentType: string;
StatusCode: number;
RawResponse: never;
GeoData?: GetGeoDataGeoData$Outbound | undefined;
};
/** @internal */
export const GetGeoDataResponse$outboundSchema: z.ZodType<
GetGeoDataResponse$Outbound,
z.ZodTypeDef,
GetGeoDataResponse
> = z
.object({
contentType: z.string(),
statusCode: z.number().int(),
rawResponse: z.instanceof(Response).transform(() => {
throw new Error("Response cannot be serialized");
}),
geoData: z.lazy(() => GetGeoDataGeoData$outboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
geoData: "GeoData",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetGeoDataResponse$ {
/** @deprecated use `GetGeoDataResponse$inboundSchema` instead. */
export const inboundSchema = GetGeoDataResponse$inboundSchema;
/** @deprecated use `GetGeoDataResponse$outboundSchema` instead. */
export const outboundSchema = GetGeoDataResponse$outboundSchema;
/** @deprecated use `GetGeoDataResponse$Outbound` instead. */
export type Outbound = GetGeoDataResponse$Outbound;
}

View File

@@ -0,0 +1,472 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
/**
* Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).
*/
export enum OnlyTransient {
Zero = 0,
One = 1,
}
export type GetGlobalHubsRequest = {
/**
* The number of items to return with each hub.
*/
count?: number | undefined;
/**
* Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).
*/
onlyTransient?: OnlyTransient | undefined;
};
export type GetGlobalHubsMetadata = {
ratingKey?: string | undefined;
key?: string | undefined;
guid?: string | undefined;
type?: string | undefined;
title?: string | undefined;
titleSort?: string | undefined;
summary?: string | undefined;
smart?: boolean | undefined;
playlistType?: string | undefined;
composite?: string | undefined;
icon?: string | undefined;
viewCount?: number | undefined;
lastViewedAt?: number | undefined;
duration?: number | undefined;
leafCount?: number | undefined;
addedAt?: number | undefined;
updatedAt?: number | undefined;
};
export type Hub = {
hubKey?: string | undefined;
key?: string | undefined;
title?: string | undefined;
type?: string | undefined;
hubIdentifier?: string | undefined;
context?: string | undefined;
size?: number | undefined;
more?: boolean | undefined;
style?: string | undefined;
promoted?: boolean | undefined;
metadata?: Array<GetGlobalHubsMetadata> | undefined;
};
export type GetGlobalHubsMediaContainer = {
size?: number | undefined;
allowSync?: boolean | undefined;
identifier?: string | undefined;
hub?: Array<Hub> | undefined;
};
/**
* returns global hubs
*/
export type GetGlobalHubsResponseBody = {
mediaContainer?: GetGlobalHubsMediaContainer | undefined;
};
export type GetGlobalHubsResponse = {
/**
* HTTP response content type for this operation
*/
contentType: string;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse: Response;
/**
* returns global hubs
*/
object?: GetGlobalHubsResponseBody | undefined;
};
/** @internal */
export const OnlyTransient$inboundSchema: z.ZodNativeEnum<typeof OnlyTransient> =
z.nativeEnum(OnlyTransient);
/** @internal */
export const OnlyTransient$outboundSchema: z.ZodNativeEnum<typeof OnlyTransient> =
OnlyTransient$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace OnlyTransient$ {
/** @deprecated use `OnlyTransient$inboundSchema` instead. */
export const inboundSchema = OnlyTransient$inboundSchema;
/** @deprecated use `OnlyTransient$outboundSchema` instead. */
export const outboundSchema = OnlyTransient$outboundSchema;
}
/** @internal */
export const GetGlobalHubsRequest$inboundSchema: z.ZodType<
GetGlobalHubsRequest,
z.ZodTypeDef,
unknown
> = z.object({
count: z.number().optional(),
onlyTransient: OnlyTransient$inboundSchema.optional(),
});
/** @internal */
export type GetGlobalHubsRequest$Outbound = {
count?: number | undefined;
onlyTransient?: number | undefined;
};
/** @internal */
export const GetGlobalHubsRequest$outboundSchema: z.ZodType<
GetGlobalHubsRequest$Outbound,
z.ZodTypeDef,
GetGlobalHubsRequest
> = z.object({
count: z.number().optional(),
onlyTransient: OnlyTransient$outboundSchema.optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetGlobalHubsRequest$ {
/** @deprecated use `GetGlobalHubsRequest$inboundSchema` instead. */
export const inboundSchema = GetGlobalHubsRequest$inboundSchema;
/** @deprecated use `GetGlobalHubsRequest$outboundSchema` instead. */
export const outboundSchema = GetGlobalHubsRequest$outboundSchema;
/** @deprecated use `GetGlobalHubsRequest$Outbound` instead. */
export type Outbound = GetGlobalHubsRequest$Outbound;
}
/** @internal */
export const GetGlobalHubsMetadata$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(),
});
/** @internal */
export type GetGlobalHubsMetadata$Outbound = {
ratingKey?: string | undefined;
key?: string | undefined;
guid?: string | undefined;
type?: string | undefined;
title?: string | undefined;
titleSort?: string | undefined;
summary?: string | undefined;
smart?: boolean | undefined;
playlistType?: string | undefined;
composite?: string | undefined;
icon?: string | undefined;
viewCount?: number | undefined;
lastViewedAt?: number | undefined;
duration?: number | undefined;
leafCount?: number | undefined;
addedAt?: number | undefined;
updatedAt?: number | undefined;
};
/** @internal */
export const GetGlobalHubsMetadata$outboundSchema: z.ZodType<
GetGlobalHubsMetadata$Outbound,
z.ZodTypeDef,
GetGlobalHubsMetadata
> = 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(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetGlobalHubsMetadata$ {
/** @deprecated use `GetGlobalHubsMetadata$inboundSchema` instead. */
export const inboundSchema = GetGlobalHubsMetadata$inboundSchema;
/** @deprecated use `GetGlobalHubsMetadata$outboundSchema` instead. */
export const outboundSchema = GetGlobalHubsMetadata$outboundSchema;
/** @deprecated use `GetGlobalHubsMetadata$Outbound` instead. */
export type Outbound = GetGlobalHubsMetadata$Outbound;
}
/** @internal */
export const Hub$inboundSchema: z.ZodType<Hub, z.ZodTypeDef, unknown> = z
.object({
hubKey: z.string().optional(),
key: z.string().optional(),
title: z.string().optional(),
type: z.string().optional(),
hubIdentifier: z.string().optional(),
context: z.string().optional(),
size: z.number().int().optional(),
more: z.boolean().optional(),
style: z.string().optional(),
promoted: z.boolean().optional(),
Metadata: z.array(z.lazy(() => GetGlobalHubsMetadata$inboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
Metadata: "metadata",
});
});
/** @internal */
export type Hub$Outbound = {
hubKey?: string | undefined;
key?: string | undefined;
title?: string | undefined;
type?: string | undefined;
hubIdentifier?: string | undefined;
context?: string | undefined;
size?: number | undefined;
more?: boolean | undefined;
style?: string | undefined;
promoted?: boolean | undefined;
Metadata?: Array<GetGlobalHubsMetadata$Outbound> | undefined;
};
/** @internal */
export const Hub$outboundSchema: z.ZodType<Hub$Outbound, z.ZodTypeDef, Hub> = z
.object({
hubKey: z.string().optional(),
key: z.string().optional(),
title: z.string().optional(),
type: z.string().optional(),
hubIdentifier: z.string().optional(),
context: z.string().optional(),
size: z.number().int().optional(),
more: z.boolean().optional(),
style: z.string().optional(),
promoted: z.boolean().optional(),
metadata: z.array(z.lazy(() => GetGlobalHubsMetadata$outboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
metadata: "Metadata",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace Hub$ {
/** @deprecated use `Hub$inboundSchema` instead. */
export const inboundSchema = Hub$inboundSchema;
/** @deprecated use `Hub$outboundSchema` instead. */
export const outboundSchema = Hub$outboundSchema;
/** @deprecated use `Hub$Outbound` instead. */
export type Outbound = Hub$Outbound;
}
/** @internal */
export const GetGlobalHubsMediaContainer$inboundSchema: z.ZodType<
GetGlobalHubsMediaContainer,
z.ZodTypeDef,
unknown
> = z
.object({
size: z.number().int().optional(),
allowSync: z.boolean().optional(),
identifier: z.string().optional(),
Hub: z.array(z.lazy(() => Hub$inboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
Hub: "hub",
});
});
/** @internal */
export type GetGlobalHubsMediaContainer$Outbound = {
size?: number | undefined;
allowSync?: boolean | undefined;
identifier?: string | undefined;
Hub?: Array<Hub$Outbound> | undefined;
};
/** @internal */
export const GetGlobalHubsMediaContainer$outboundSchema: z.ZodType<
GetGlobalHubsMediaContainer$Outbound,
z.ZodTypeDef,
GetGlobalHubsMediaContainer
> = z
.object({
size: z.number().int().optional(),
allowSync: z.boolean().optional(),
identifier: z.string().optional(),
hub: z.array(z.lazy(() => Hub$outboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
hub: "Hub",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetGlobalHubsMediaContainer$ {
/** @deprecated use `GetGlobalHubsMediaContainer$inboundSchema` instead. */
export const inboundSchema = GetGlobalHubsMediaContainer$inboundSchema;
/** @deprecated use `GetGlobalHubsMediaContainer$outboundSchema` instead. */
export const outboundSchema = GetGlobalHubsMediaContainer$outboundSchema;
/** @deprecated use `GetGlobalHubsMediaContainer$Outbound` instead. */
export type Outbound = GetGlobalHubsMediaContainer$Outbound;
}
/** @internal */
export const GetGlobalHubsResponseBody$inboundSchema: z.ZodType<
GetGlobalHubsResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
MediaContainer: z.lazy(() => GetGlobalHubsMediaContainer$inboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
MediaContainer: "mediaContainer",
});
});
/** @internal */
export type GetGlobalHubsResponseBody$Outbound = {
MediaContainer?: GetGlobalHubsMediaContainer$Outbound | undefined;
};
/** @internal */
export const GetGlobalHubsResponseBody$outboundSchema: z.ZodType<
GetGlobalHubsResponseBody$Outbound,
z.ZodTypeDef,
GetGlobalHubsResponseBody
> = z
.object({
mediaContainer: z.lazy(() => GetGlobalHubsMediaContainer$outboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
mediaContainer: "MediaContainer",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetGlobalHubsResponseBody$ {
/** @deprecated use `GetGlobalHubsResponseBody$inboundSchema` instead. */
export const inboundSchema = GetGlobalHubsResponseBody$inboundSchema;
/** @deprecated use `GetGlobalHubsResponseBody$outboundSchema` instead. */
export const outboundSchema = GetGlobalHubsResponseBody$outboundSchema;
/** @deprecated use `GetGlobalHubsResponseBody$Outbound` instead. */
export type Outbound = GetGlobalHubsResponseBody$Outbound;
}
/** @internal */
export const GetGlobalHubsResponse$inboundSchema: z.ZodType<
GetGlobalHubsResponse,
z.ZodTypeDef,
unknown
> = z
.object({
ContentType: z.string(),
StatusCode: z.number().int(),
RawResponse: z.instanceof(Response),
object: z.lazy(() => GetGlobalHubsResponseBody$inboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
/** @internal */
export type GetGlobalHubsResponse$Outbound = {
ContentType: string;
StatusCode: number;
RawResponse: never;
object?: GetGlobalHubsResponseBody$Outbound | undefined;
};
/** @internal */
export const GetGlobalHubsResponse$outboundSchema: z.ZodType<
GetGlobalHubsResponse$Outbound,
z.ZodTypeDef,
GetGlobalHubsResponse
> = z
.object({
contentType: z.string(),
statusCode: z.number().int(),
rawResponse: z.instanceof(Response).transform(() => {
throw new Error("Response cannot be serialized");
}),
object: z.lazy(() => GetGlobalHubsResponseBody$outboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetGlobalHubsResponse$ {
/** @deprecated use `GetGlobalHubsResponse$inboundSchema` instead. */
export const inboundSchema = GetGlobalHubsResponse$inboundSchema;
/** @deprecated use `GetGlobalHubsResponse$outboundSchema` instead. */
export const outboundSchema = GetGlobalHubsResponse$outboundSchema;
/** @deprecated use `GetGlobalHubsResponse$Outbound` instead. */
export type Outbound = GetGlobalHubsResponse$Outbound;
}

View File

@@ -0,0 +1,151 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
/**
* Home Data
*/
export type GetHomeDataResponseBody = {
id?: number | undefined;
name?: string | undefined;
guestUserID?: number | undefined;
guestUserUUID?: string | undefined;
guestEnabled?: boolean | undefined;
subscription?: boolean | undefined;
};
export type GetHomeDataResponse = {
/**
* HTTP response content type for this operation
*/
contentType: string;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse: Response;
/**
* Home Data
*/
object?: GetHomeDataResponseBody | undefined;
};
/** @internal */
export const GetHomeDataResponseBody$inboundSchema: z.ZodType<
GetHomeDataResponseBody,
z.ZodTypeDef,
unknown
> = z.object({
id: z.number().optional(),
name: z.string().optional(),
guestUserID: z.number().optional(),
guestUserUUID: z.string().optional(),
guestEnabled: z.boolean().optional(),
subscription: z.boolean().optional(),
});
/** @internal */
export type GetHomeDataResponseBody$Outbound = {
id?: number | undefined;
name?: string | undefined;
guestUserID?: number | undefined;
guestUserUUID?: string | undefined;
guestEnabled?: boolean | undefined;
subscription?: boolean | undefined;
};
/** @internal */
export const GetHomeDataResponseBody$outboundSchema: z.ZodType<
GetHomeDataResponseBody$Outbound,
z.ZodTypeDef,
GetHomeDataResponseBody
> = z.object({
id: z.number().optional(),
name: z.string().optional(),
guestUserID: z.number().optional(),
guestUserUUID: z.string().optional(),
guestEnabled: z.boolean().optional(),
subscription: z.boolean().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetHomeDataResponseBody$ {
/** @deprecated use `GetHomeDataResponseBody$inboundSchema` instead. */
export const inboundSchema = GetHomeDataResponseBody$inboundSchema;
/** @deprecated use `GetHomeDataResponseBody$outboundSchema` instead. */
export const outboundSchema = GetHomeDataResponseBody$outboundSchema;
/** @deprecated use `GetHomeDataResponseBody$Outbound` instead. */
export type Outbound = GetHomeDataResponseBody$Outbound;
}
/** @internal */
export const GetHomeDataResponse$inboundSchema: z.ZodType<
GetHomeDataResponse,
z.ZodTypeDef,
unknown
> = z
.object({
ContentType: z.string(),
StatusCode: z.number().int(),
RawResponse: z.instanceof(Response),
object: z.lazy(() => GetHomeDataResponseBody$inboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
/** @internal */
export type GetHomeDataResponse$Outbound = {
ContentType: string;
StatusCode: number;
RawResponse: never;
object?: GetHomeDataResponseBody$Outbound | undefined;
};
/** @internal */
export const GetHomeDataResponse$outboundSchema: z.ZodType<
GetHomeDataResponse$Outbound,
z.ZodTypeDef,
GetHomeDataResponse
> = z
.object({
contentType: z.string(),
statusCode: z.number().int(),
rawResponse: z.instanceof(Response).transform(() => {
throw new Error("Response cannot be serialized");
}),
object: z.lazy(() => GetHomeDataResponseBody$outboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetHomeDataResponse$ {
/** @deprecated use `GetHomeDataResponse$inboundSchema` instead. */
export const inboundSchema = GetHomeDataResponse$inboundSchema;
/** @deprecated use `GetHomeDataResponse$outboundSchema` instead. */
export const outboundSchema = GetHomeDataResponse$outboundSchema;
/** @deprecated use `GetHomeDataResponse$Outbound` instead. */
export type Outbound = GetHomeDataResponse$Outbound;
}

View File

@@ -0,0 +1,717 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
/**
* Whether or not to include details for a section (types, filters, and sorts).
*
* @remarks
* Only exists for backwards compatibility, media providers other than the server libraries have it on always.
*
*/
export enum IncludeDetails {
Zero = 0,
One = 1,
}
export type GetLibraryDetailsRequest = {
/**
* The unique key of the Plex library.
*
* @remarks
* Note: This is unique in the context of the Plex server.
*
*/
sectionKey: number;
/**
* Whether or not to include details for a section (types, filters, and sorts).
*
* @remarks
* Only exists for backwards compatibility, media providers other than the server libraries have it on always.
*
*/
includeDetails?: IncludeDetails | undefined;
};
export type GetLibraryDetailsDirectory = {
key?: string | undefined;
title?: string | undefined;
secondary?: boolean | undefined;
prompt?: string | undefined;
search?: boolean | undefined;
};
export type GetLibraryDetailsFilter = {
filter?: string | undefined;
filterType?: string | undefined;
key?: string | undefined;
title?: string | undefined;
type?: string | undefined;
};
export type Sort = {
default?: string | undefined;
defaultDirection?: string | undefined;
descKey?: string | undefined;
firstCharacterKey?: string | undefined;
key?: string | undefined;
title?: string | undefined;
};
export type Field = {
key?: string | undefined;
title?: string | undefined;
type?: string | undefined;
subType?: string | undefined;
};
export type GetLibraryDetailsType = {
key?: string | undefined;
type?: string | undefined;
title?: string | undefined;
active?: boolean | undefined;
filter?: Array<GetLibraryDetailsFilter> | undefined;
sort?: Array<Sort> | undefined;
field?: Array<Field> | undefined;
};
export type Operator = {
key?: string | undefined;
title?: string | undefined;
};
export type FieldType = {
type?: string | undefined;
operator?: Array<Operator> | undefined;
};
export type GetLibraryDetailsMediaContainer = {
size?: number | undefined;
allowSync?: boolean | undefined;
art?: string | undefined;
content?: string | undefined;
identifier?: string | undefined;
librarySectionID?: number | undefined;
mediaTagPrefix?: string | undefined;
mediaTagVersion?: number | undefined;
thumb?: string | undefined;
title1?: string | undefined;
viewGroup?: string | undefined;
viewMode?: number | undefined;
directory?: Array<GetLibraryDetailsDirectory> | undefined;
type?: Array<GetLibraryDetailsType> | undefined;
fieldType?: Array<FieldType> | undefined;
};
/**
* The details of the library
*/
export type GetLibraryDetailsResponseBody = {
mediaContainer?: GetLibraryDetailsMediaContainer | undefined;
};
export type GetLibraryDetailsResponse = {
/**
* HTTP response content type for this operation
*/
contentType: string;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse: Response;
/**
* The details of the library
*/
object?: GetLibraryDetailsResponseBody | undefined;
};
/** @internal */
export const IncludeDetails$inboundSchema: z.ZodNativeEnum<typeof IncludeDetails> =
z.nativeEnum(IncludeDetails);
/** @internal */
export const IncludeDetails$outboundSchema: z.ZodNativeEnum<typeof IncludeDetails> =
IncludeDetails$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace IncludeDetails$ {
/** @deprecated use `IncludeDetails$inboundSchema` instead. */
export const inboundSchema = IncludeDetails$inboundSchema;
/** @deprecated use `IncludeDetails$outboundSchema` instead. */
export const outboundSchema = IncludeDetails$outboundSchema;
}
/** @internal */
export const GetLibraryDetailsRequest$inboundSchema: z.ZodType<
GetLibraryDetailsRequest,
z.ZodTypeDef,
unknown
> = z.object({
sectionKey: z.number().int(),
includeDetails: IncludeDetails$inboundSchema,
});
/** @internal */
export type GetLibraryDetailsRequest$Outbound = {
sectionKey: number;
includeDetails: number;
};
/** @internal */
export const GetLibraryDetailsRequest$outboundSchema: z.ZodType<
GetLibraryDetailsRequest$Outbound,
z.ZodTypeDef,
GetLibraryDetailsRequest
> = z.object({
sectionKey: z.number().int(),
includeDetails: IncludeDetails$outboundSchema.default(IncludeDetails.Zero),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetLibraryDetailsRequest$ {
/** @deprecated use `GetLibraryDetailsRequest$inboundSchema` instead. */
export const inboundSchema = GetLibraryDetailsRequest$inboundSchema;
/** @deprecated use `GetLibraryDetailsRequest$outboundSchema` instead. */
export const outboundSchema = GetLibraryDetailsRequest$outboundSchema;
/** @deprecated use `GetLibraryDetailsRequest$Outbound` instead. */
export type Outbound = GetLibraryDetailsRequest$Outbound;
}
/** @internal */
export const GetLibraryDetailsDirectory$inboundSchema: z.ZodType<
GetLibraryDetailsDirectory,
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(),
});
/** @internal */
export type GetLibraryDetailsDirectory$Outbound = {
key?: string | undefined;
title?: string | undefined;
secondary?: boolean | undefined;
prompt?: string | undefined;
search?: boolean | undefined;
};
/** @internal */
export const GetLibraryDetailsDirectory$outboundSchema: z.ZodType<
GetLibraryDetailsDirectory$Outbound,
z.ZodTypeDef,
GetLibraryDetailsDirectory
> = z.object({
key: z.string().optional(),
title: z.string().optional(),
secondary: z.boolean().optional(),
prompt: z.string().optional(),
search: z.boolean().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetLibraryDetailsDirectory$ {
/** @deprecated use `GetLibraryDetailsDirectory$inboundSchema` instead. */
export const inboundSchema = GetLibraryDetailsDirectory$inboundSchema;
/** @deprecated use `GetLibraryDetailsDirectory$outboundSchema` instead. */
export const outboundSchema = GetLibraryDetailsDirectory$outboundSchema;
/** @deprecated use `GetLibraryDetailsDirectory$Outbound` instead. */
export type Outbound = GetLibraryDetailsDirectory$Outbound;
}
/** @internal */
export const GetLibraryDetailsFilter$inboundSchema: z.ZodType<
GetLibraryDetailsFilter,
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(),
});
/** @internal */
export type GetLibraryDetailsFilter$Outbound = {
filter?: string | undefined;
filterType?: string | undefined;
key?: string | undefined;
title?: string | undefined;
type?: string | undefined;
};
/** @internal */
export const GetLibraryDetailsFilter$outboundSchema: z.ZodType<
GetLibraryDetailsFilter$Outbound,
z.ZodTypeDef,
GetLibraryDetailsFilter
> = z.object({
filter: z.string().optional(),
filterType: z.string().optional(),
key: z.string().optional(),
title: z.string().optional(),
type: z.string().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetLibraryDetailsFilter$ {
/** @deprecated use `GetLibraryDetailsFilter$inboundSchema` instead. */
export const inboundSchema = GetLibraryDetailsFilter$inboundSchema;
/** @deprecated use `GetLibraryDetailsFilter$outboundSchema` instead. */
export const outboundSchema = GetLibraryDetailsFilter$outboundSchema;
/** @deprecated use `GetLibraryDetailsFilter$Outbound` instead. */
export type Outbound = GetLibraryDetailsFilter$Outbound;
}
/** @internal */
export const Sort$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(),
});
/** @internal */
export type Sort$Outbound = {
default?: string | undefined;
defaultDirection?: string | undefined;
descKey?: string | undefined;
firstCharacterKey?: string | undefined;
key?: string | undefined;
title?: string | undefined;
};
/** @internal */
export const Sort$outboundSchema: z.ZodType<Sort$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
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace Sort$ {
/** @deprecated use `Sort$inboundSchema` instead. */
export const inboundSchema = Sort$inboundSchema;
/** @deprecated use `Sort$outboundSchema` instead. */
export const outboundSchema = Sort$outboundSchema;
/** @deprecated use `Sort$Outbound` instead. */
export type Outbound = Sort$Outbound;
}
/** @internal */
export const Field$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(),
});
/** @internal */
export type Field$Outbound = {
key?: string | undefined;
title?: string | undefined;
type?: string | undefined;
subType?: string | undefined;
};
/** @internal */
export const Field$outboundSchema: z.ZodType<Field$Outbound, z.ZodTypeDef, Field> = z.object({
key: z.string().optional(),
title: z.string().optional(),
type: z.string().optional(),
subType: z.string().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace Field$ {
/** @deprecated use `Field$inboundSchema` instead. */
export const inboundSchema = Field$inboundSchema;
/** @deprecated use `Field$outboundSchema` instead. */
export const outboundSchema = Field$outboundSchema;
/** @deprecated use `Field$Outbound` instead. */
export type Outbound = Field$Outbound;
}
/** @internal */
export const GetLibraryDetailsType$inboundSchema: z.ZodType<
GetLibraryDetailsType,
z.ZodTypeDef,
unknown
> = z
.object({
key: z.string().optional(),
type: z.string().optional(),
title: z.string().optional(),
active: z.boolean().optional(),
Filter: z.array(z.lazy(() => GetLibraryDetailsFilter$inboundSchema)).optional(),
Sort: z.array(z.lazy(() => Sort$inboundSchema)).optional(),
Field: z.array(z.lazy(() => Field$inboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
Filter: "filter",
Sort: "sort",
Field: "field",
});
});
/** @internal */
export type GetLibraryDetailsType$Outbound = {
key?: string | undefined;
type?: string | undefined;
title?: string | undefined;
active?: boolean | undefined;
Filter?: Array<GetLibraryDetailsFilter$Outbound> | undefined;
Sort?: Array<Sort$Outbound> | undefined;
Field?: Array<Field$Outbound> | undefined;
};
/** @internal */
export const GetLibraryDetailsType$outboundSchema: z.ZodType<
GetLibraryDetailsType$Outbound,
z.ZodTypeDef,
GetLibraryDetailsType
> = z
.object({
key: z.string().optional(),
type: z.string().optional(),
title: z.string().optional(),
active: z.boolean().optional(),
filter: z.array(z.lazy(() => GetLibraryDetailsFilter$outboundSchema)).optional(),
sort: z.array(z.lazy(() => Sort$outboundSchema)).optional(),
field: z.array(z.lazy(() => Field$outboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
filter: "Filter",
sort: "Sort",
field: "Field",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetLibraryDetailsType$ {
/** @deprecated use `GetLibraryDetailsType$inboundSchema` instead. */
export const inboundSchema = GetLibraryDetailsType$inboundSchema;
/** @deprecated use `GetLibraryDetailsType$outboundSchema` instead. */
export const outboundSchema = GetLibraryDetailsType$outboundSchema;
/** @deprecated use `GetLibraryDetailsType$Outbound` instead. */
export type Outbound = GetLibraryDetailsType$Outbound;
}
/** @internal */
export const Operator$inboundSchema: z.ZodType<Operator, z.ZodTypeDef, unknown> = z.object({
key: z.string().optional(),
title: z.string().optional(),
});
/** @internal */
export type Operator$Outbound = {
key?: string | undefined;
title?: string | undefined;
};
/** @internal */
export const Operator$outboundSchema: z.ZodType<Operator$Outbound, z.ZodTypeDef, Operator> =
z.object({
key: z.string().optional(),
title: z.string().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace Operator$ {
/** @deprecated use `Operator$inboundSchema` instead. */
export const inboundSchema = Operator$inboundSchema;
/** @deprecated use `Operator$outboundSchema` instead. */
export const outboundSchema = Operator$outboundSchema;
/** @deprecated use `Operator$Outbound` instead. */
export type Outbound = Operator$Outbound;
}
/** @internal */
export const FieldType$inboundSchema: z.ZodType<FieldType, z.ZodTypeDef, unknown> = z
.object({
type: z.string().optional(),
Operator: z.array(z.lazy(() => Operator$inboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
Operator: "operator",
});
});
/** @internal */
export type FieldType$Outbound = {
type?: string | undefined;
Operator?: Array<Operator$Outbound> | undefined;
};
/** @internal */
export const FieldType$outboundSchema: z.ZodType<FieldType$Outbound, z.ZodTypeDef, FieldType> = z
.object({
type: z.string().optional(),
operator: z.array(z.lazy(() => Operator$outboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
operator: "Operator",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace FieldType$ {
/** @deprecated use `FieldType$inboundSchema` instead. */
export const inboundSchema = FieldType$inboundSchema;
/** @deprecated use `FieldType$outboundSchema` instead. */
export const outboundSchema = FieldType$outboundSchema;
/** @deprecated use `FieldType$Outbound` instead. */
export type Outbound = FieldType$Outbound;
}
/** @internal */
export const GetLibraryDetailsMediaContainer$inboundSchema: z.ZodType<
GetLibraryDetailsMediaContainer,
z.ZodTypeDef,
unknown
> = z
.object({
size: z.number().int().optional(),
allowSync: z.boolean().optional(),
art: z.string().optional(),
content: z.string().optional(),
identifier: z.string().optional(),
librarySectionID: z.number().int().optional(),
mediaTagPrefix: z.string().optional(),
mediaTagVersion: z.number().int().optional(),
thumb: z.string().optional(),
title1: z.string().optional(),
viewGroup: z.string().optional(),
viewMode: z.number().int().optional(),
Directory: z.array(z.lazy(() => GetLibraryDetailsDirectory$inboundSchema)).optional(),
Type: z.array(z.lazy(() => GetLibraryDetailsType$inboundSchema)).optional(),
FieldType: z.array(z.lazy(() => FieldType$inboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
Directory: "directory",
Type: "type",
FieldType: "fieldType",
});
});
/** @internal */
export type GetLibraryDetailsMediaContainer$Outbound = {
size?: number | undefined;
allowSync?: boolean | undefined;
art?: string | undefined;
content?: string | undefined;
identifier?: string | undefined;
librarySectionID?: number | undefined;
mediaTagPrefix?: string | undefined;
mediaTagVersion?: number | undefined;
thumb?: string | undefined;
title1?: string | undefined;
viewGroup?: string | undefined;
viewMode?: number | undefined;
Directory?: Array<GetLibraryDetailsDirectory$Outbound> | undefined;
Type?: Array<GetLibraryDetailsType$Outbound> | undefined;
FieldType?: Array<FieldType$Outbound> | undefined;
};
/** @internal */
export const GetLibraryDetailsMediaContainer$outboundSchema: z.ZodType<
GetLibraryDetailsMediaContainer$Outbound,
z.ZodTypeDef,
GetLibraryDetailsMediaContainer
> = z
.object({
size: z.number().int().optional(),
allowSync: z.boolean().optional(),
art: z.string().optional(),
content: z.string().optional(),
identifier: z.string().optional(),
librarySectionID: z.number().int().optional(),
mediaTagPrefix: z.string().optional(),
mediaTagVersion: z.number().int().optional(),
thumb: z.string().optional(),
title1: z.string().optional(),
viewGroup: z.string().optional(),
viewMode: z.number().int().optional(),
directory: z.array(z.lazy(() => GetLibraryDetailsDirectory$outboundSchema)).optional(),
type: z.array(z.lazy(() => GetLibraryDetailsType$outboundSchema)).optional(),
fieldType: z.array(z.lazy(() => FieldType$outboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
directory: "Directory",
type: "Type",
fieldType: "FieldType",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetLibraryDetailsMediaContainer$ {
/** @deprecated use `GetLibraryDetailsMediaContainer$inboundSchema` instead. */
export const inboundSchema = GetLibraryDetailsMediaContainer$inboundSchema;
/** @deprecated use `GetLibraryDetailsMediaContainer$outboundSchema` instead. */
export const outboundSchema = GetLibraryDetailsMediaContainer$outboundSchema;
/** @deprecated use `GetLibraryDetailsMediaContainer$Outbound` instead. */
export type Outbound = GetLibraryDetailsMediaContainer$Outbound;
}
/** @internal */
export const GetLibraryDetailsResponseBody$inboundSchema: z.ZodType<
GetLibraryDetailsResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
MediaContainer: z.lazy(() => GetLibraryDetailsMediaContainer$inboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
MediaContainer: "mediaContainer",
});
});
/** @internal */
export type GetLibraryDetailsResponseBody$Outbound = {
MediaContainer?: GetLibraryDetailsMediaContainer$Outbound | undefined;
};
/** @internal */
export const GetLibraryDetailsResponseBody$outboundSchema: z.ZodType<
GetLibraryDetailsResponseBody$Outbound,
z.ZodTypeDef,
GetLibraryDetailsResponseBody
> = z
.object({
mediaContainer: z.lazy(() => GetLibraryDetailsMediaContainer$outboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
mediaContainer: "MediaContainer",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetLibraryDetailsResponseBody$ {
/** @deprecated use `GetLibraryDetailsResponseBody$inboundSchema` instead. */
export const inboundSchema = GetLibraryDetailsResponseBody$inboundSchema;
/** @deprecated use `GetLibraryDetailsResponseBody$outboundSchema` instead. */
export const outboundSchema = GetLibraryDetailsResponseBody$outboundSchema;
/** @deprecated use `GetLibraryDetailsResponseBody$Outbound` instead. */
export type Outbound = GetLibraryDetailsResponseBody$Outbound;
}
/** @internal */
export const GetLibraryDetailsResponse$inboundSchema: z.ZodType<
GetLibraryDetailsResponse,
z.ZodTypeDef,
unknown
> = z
.object({
ContentType: z.string(),
StatusCode: z.number().int(),
RawResponse: z.instanceof(Response),
object: z.lazy(() => GetLibraryDetailsResponseBody$inboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
/** @internal */
export type GetLibraryDetailsResponse$Outbound = {
ContentType: string;
StatusCode: number;
RawResponse: never;
object?: GetLibraryDetailsResponseBody$Outbound | undefined;
};
/** @internal */
export const GetLibraryDetailsResponse$outboundSchema: z.ZodType<
GetLibraryDetailsResponse$Outbound,
z.ZodTypeDef,
GetLibraryDetailsResponse
> = z
.object({
contentType: z.string(),
statusCode: z.number().int(),
rawResponse: z.instanceof(Response).transform(() => {
throw new Error("Response cannot be serialized");
}),
object: z.lazy(() => GetLibraryDetailsResponseBody$outboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetLibraryDetailsResponse$ {
/** @deprecated use `GetLibraryDetailsResponse$inboundSchema` instead. */
export const inboundSchema = GetLibraryDetailsResponse$inboundSchema;
/** @deprecated use `GetLibraryDetailsResponse$outboundSchema` instead. */
export const outboundSchema = GetLibraryDetailsResponse$outboundSchema;
/** @deprecated use `GetLibraryDetailsResponse$Outbound` instead. */
export type Outbound = GetLibraryDetailsResponse$Outbound;
}

View File

@@ -0,0 +1,991 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import { RFCDate } from "../../types/rfcdate.js";
import * as z from "zod";
/**
* Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).
*/
export enum QueryParamOnlyTransient {
Zero = 0,
One = 1,
}
export type GetLibraryHubsRequest = {
/**
* the Id of the library to query
*/
sectionId: number;
/**
* The number of items to return with each hub.
*/
count?: number | undefined;
/**
* Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).
*/
onlyTransient?: QueryParamOnlyTransient | undefined;
};
export type GetLibraryHubsPart = {
id?: number | undefined;
key?: string | undefined;
duration?: number | undefined;
file?: string | undefined;
size?: number | undefined;
audioProfile?: string | undefined;
container?: string | undefined;
has64bitOffsets?: boolean | undefined;
optimizedForStreaming?: boolean | undefined;
videoProfile?: string | undefined;
};
export type GetLibraryHubsMedia = {
id?: number | undefined;
duration?: number | undefined;
bitrate?: number | undefined;
width?: number | undefined;
height?: number | undefined;
aspectRatio?: number | undefined;
audioChannels?: number | undefined;
audioCodec?: string | undefined;
videoCodec?: string | undefined;
videoResolution?: string | undefined;
container?: string | undefined;
videoFrameRate?: string | undefined;
optimizedForStreaming?: number | undefined;
audioProfile?: string | undefined;
has64bitOffsets?: boolean | undefined;
videoProfile?: string | undefined;
part?: Array<GetLibraryHubsPart> | undefined;
};
export type GetLibraryHubsGenre = {
tag?: string | undefined;
};
export type GetLibraryHubsCountry = {
tag?: string | undefined;
};
export type GetLibraryHubsDirector = {
tag?: string | undefined;
};
export type GetLibraryHubsRole = {
tag?: string | undefined;
};
export type GetLibraryHubsWriter = {
tag?: string | undefined;
};
export type GetLibraryHubsMetadata = {
ratingKey?: string | undefined;
key?: string | undefined;
guid?: string | undefined;
studio?: string | undefined;
type?: string | undefined;
title?: string | undefined;
librarySectionTitle?: string | undefined;
librarySectionID?: number | undefined;
librarySectionKey?: string | undefined;
contentRating?: string | undefined;
summary?: string | undefined;
rating?: number | undefined;
audienceRating?: number | undefined;
viewCount?: number | undefined;
lastViewedAt?: number | undefined;
year?: number | undefined;
tagline?: string | undefined;
thumb?: string | undefined;
art?: string | undefined;
duration?: number | undefined;
originallyAvailableAt?: RFCDate | undefined;
addedAt?: number | undefined;
updatedAt?: number | undefined;
audienceRatingImage?: string | undefined;
primaryExtraKey?: string | undefined;
ratingImage?: string | undefined;
media?: Array<GetLibraryHubsMedia> | undefined;
genre?: Array<GetLibraryHubsGenre> | undefined;
country?: Array<GetLibraryHubsCountry> | undefined;
director?: Array<GetLibraryHubsDirector> | undefined;
role?: Array<GetLibraryHubsRole> | undefined;
writer?: Array<GetLibraryHubsWriter> | undefined;
skipCount?: number | undefined;
chapterSource?: string | undefined;
};
export type GetLibraryHubsHub = {
key?: string | undefined;
title?: string | undefined;
type?: string | undefined;
hubIdentifier?: string | undefined;
context?: string | undefined;
size?: number | undefined;
more?: boolean | undefined;
style?: string | undefined;
hubKey?: string | undefined;
metadata?: Array<GetLibraryHubsMetadata> | undefined;
promoted?: boolean | undefined;
random?: boolean | undefined;
};
export type GetLibraryHubsMediaContainer = {
size?: number | undefined;
allowSync?: boolean | undefined;
identifier?: string | undefined;
librarySectionID?: number | undefined;
librarySectionTitle?: string | undefined;
librarySectionUUID?: string | undefined;
hub?: Array<GetLibraryHubsHub> | undefined;
};
/**
* The hubs specific to the library
*/
export type GetLibraryHubsResponseBody = {
mediaContainer?: GetLibraryHubsMediaContainer | undefined;
};
export type GetLibraryHubsResponse = {
/**
* HTTP response content type for this operation
*/
contentType: string;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse: Response;
/**
* The hubs specific to the library
*/
object?: GetLibraryHubsResponseBody | undefined;
};
/** @internal */
export const QueryParamOnlyTransient$inboundSchema: z.ZodNativeEnum<
typeof QueryParamOnlyTransient
> = z.nativeEnum(QueryParamOnlyTransient);
/** @internal */
export const QueryParamOnlyTransient$outboundSchema: z.ZodNativeEnum<
typeof QueryParamOnlyTransient
> = QueryParamOnlyTransient$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace QueryParamOnlyTransient$ {
/** @deprecated use `QueryParamOnlyTransient$inboundSchema` instead. */
export const inboundSchema = QueryParamOnlyTransient$inboundSchema;
/** @deprecated use `QueryParamOnlyTransient$outboundSchema` instead. */
export const outboundSchema = QueryParamOnlyTransient$outboundSchema;
}
/** @internal */
export const GetLibraryHubsRequest$inboundSchema: z.ZodType<
GetLibraryHubsRequest,
z.ZodTypeDef,
unknown
> = z.object({
sectionId: z.number(),
count: z.number().optional(),
onlyTransient: QueryParamOnlyTransient$inboundSchema.optional(),
});
/** @internal */
export type GetLibraryHubsRequest$Outbound = {
sectionId: number;
count?: number | undefined;
onlyTransient?: number | undefined;
};
/** @internal */
export const GetLibraryHubsRequest$outboundSchema: z.ZodType<
GetLibraryHubsRequest$Outbound,
z.ZodTypeDef,
GetLibraryHubsRequest
> = z.object({
sectionId: z.number(),
count: z.number().optional(),
onlyTransient: QueryParamOnlyTransient$outboundSchema.optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetLibraryHubsRequest$ {
/** @deprecated use `GetLibraryHubsRequest$inboundSchema` instead. */
export const inboundSchema = GetLibraryHubsRequest$inboundSchema;
/** @deprecated use `GetLibraryHubsRequest$outboundSchema` instead. */
export const outboundSchema = GetLibraryHubsRequest$outboundSchema;
/** @deprecated use `GetLibraryHubsRequest$Outbound` instead. */
export type Outbound = GetLibraryHubsRequest$Outbound;
}
/** @internal */
export const GetLibraryHubsPart$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(),
});
/** @internal */
export type GetLibraryHubsPart$Outbound = {
id?: number | undefined;
key?: string | undefined;
duration?: number | undefined;
file?: string | undefined;
size?: number | undefined;
audioProfile?: string | undefined;
container?: string | undefined;
has64bitOffsets?: boolean | undefined;
optimizedForStreaming?: boolean | undefined;
videoProfile?: string | undefined;
};
/** @internal */
export const GetLibraryHubsPart$outboundSchema: z.ZodType<
GetLibraryHubsPart$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
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetLibraryHubsPart$ {
/** @deprecated use `GetLibraryHubsPart$inboundSchema` instead. */
export const inboundSchema = GetLibraryHubsPart$inboundSchema;
/** @deprecated use `GetLibraryHubsPart$outboundSchema` instead. */
export const outboundSchema = GetLibraryHubsPart$outboundSchema;
/** @deprecated use `GetLibraryHubsPart$Outbound` instead. */
export type Outbound = GetLibraryHubsPart$Outbound;
}
/** @internal */
export const GetLibraryHubsMedia$inboundSchema: z.ZodType<
GetLibraryHubsMedia,
z.ZodTypeDef,
unknown
> = z
.object({
id: z.number().int().optional(),
duration: z.number().int().optional(),
bitrate: z.number().int().optional(),
width: z.number().int().optional(),
height: z.number().int().optional(),
aspectRatio: z.number().optional(),
audioChannels: z.number().int().optional(),
audioCodec: z.string().optional(),
videoCodec: z.string().optional(),
videoResolution: z.string().optional(),
container: z.string().optional(),
videoFrameRate: z.string().optional(),
optimizedForStreaming: z.number().int().optional(),
audioProfile: z.string().optional(),
has64bitOffsets: z.boolean().optional(),
videoProfile: z.string().optional(),
Part: z.array(z.lazy(() => GetLibraryHubsPart$inboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
Part: "part",
});
});
/** @internal */
export type GetLibraryHubsMedia$Outbound = {
id?: number | undefined;
duration?: number | undefined;
bitrate?: number | undefined;
width?: number | undefined;
height?: number | undefined;
aspectRatio?: number | undefined;
audioChannels?: number | undefined;
audioCodec?: string | undefined;
videoCodec?: string | undefined;
videoResolution?: string | undefined;
container?: string | undefined;
videoFrameRate?: string | undefined;
optimizedForStreaming?: number | undefined;
audioProfile?: string | undefined;
has64bitOffsets?: boolean | undefined;
videoProfile?: string | undefined;
Part?: Array<GetLibraryHubsPart$Outbound> | undefined;
};
/** @internal */
export const GetLibraryHubsMedia$outboundSchema: z.ZodType<
GetLibraryHubsMedia$Outbound,
z.ZodTypeDef,
GetLibraryHubsMedia
> = z
.object({
id: z.number().int().optional(),
duration: z.number().int().optional(),
bitrate: z.number().int().optional(),
width: z.number().int().optional(),
height: z.number().int().optional(),
aspectRatio: z.number().optional(),
audioChannels: z.number().int().optional(),
audioCodec: z.string().optional(),
videoCodec: z.string().optional(),
videoResolution: z.string().optional(),
container: z.string().optional(),
videoFrameRate: z.string().optional(),
optimizedForStreaming: z.number().int().optional(),
audioProfile: z.string().optional(),
has64bitOffsets: z.boolean().optional(),
videoProfile: z.string().optional(),
part: z.array(z.lazy(() => GetLibraryHubsPart$outboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
part: "Part",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetLibraryHubsMedia$ {
/** @deprecated use `GetLibraryHubsMedia$inboundSchema` instead. */
export const inboundSchema = GetLibraryHubsMedia$inboundSchema;
/** @deprecated use `GetLibraryHubsMedia$outboundSchema` instead. */
export const outboundSchema = GetLibraryHubsMedia$outboundSchema;
/** @deprecated use `GetLibraryHubsMedia$Outbound` instead. */
export type Outbound = GetLibraryHubsMedia$Outbound;
}
/** @internal */
export const GetLibraryHubsGenre$inboundSchema: z.ZodType<
GetLibraryHubsGenre,
z.ZodTypeDef,
unknown
> = z.object({
tag: z.string().optional(),
});
/** @internal */
export type GetLibraryHubsGenre$Outbound = {
tag?: string | undefined;
};
/** @internal */
export const GetLibraryHubsGenre$outboundSchema: z.ZodType<
GetLibraryHubsGenre$Outbound,
z.ZodTypeDef,
GetLibraryHubsGenre
> = z.object({
tag: z.string().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetLibraryHubsGenre$ {
/** @deprecated use `GetLibraryHubsGenre$inboundSchema` instead. */
export const inboundSchema = GetLibraryHubsGenre$inboundSchema;
/** @deprecated use `GetLibraryHubsGenre$outboundSchema` instead. */
export const outboundSchema = GetLibraryHubsGenre$outboundSchema;
/** @deprecated use `GetLibraryHubsGenre$Outbound` instead. */
export type Outbound = GetLibraryHubsGenre$Outbound;
}
/** @internal */
export const GetLibraryHubsCountry$inboundSchema: z.ZodType<
GetLibraryHubsCountry,
z.ZodTypeDef,
unknown
> = z.object({
tag: z.string().optional(),
});
/** @internal */
export type GetLibraryHubsCountry$Outbound = {
tag?: string | undefined;
};
/** @internal */
export const GetLibraryHubsCountry$outboundSchema: z.ZodType<
GetLibraryHubsCountry$Outbound,
z.ZodTypeDef,
GetLibraryHubsCountry
> = z.object({
tag: z.string().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetLibraryHubsCountry$ {
/** @deprecated use `GetLibraryHubsCountry$inboundSchema` instead. */
export const inboundSchema = GetLibraryHubsCountry$inboundSchema;
/** @deprecated use `GetLibraryHubsCountry$outboundSchema` instead. */
export const outboundSchema = GetLibraryHubsCountry$outboundSchema;
/** @deprecated use `GetLibraryHubsCountry$Outbound` instead. */
export type Outbound = GetLibraryHubsCountry$Outbound;
}
/** @internal */
export const GetLibraryHubsDirector$inboundSchema: z.ZodType<
GetLibraryHubsDirector,
z.ZodTypeDef,
unknown
> = z.object({
tag: z.string().optional(),
});
/** @internal */
export type GetLibraryHubsDirector$Outbound = {
tag?: string | undefined;
};
/** @internal */
export const GetLibraryHubsDirector$outboundSchema: z.ZodType<
GetLibraryHubsDirector$Outbound,
z.ZodTypeDef,
GetLibraryHubsDirector
> = z.object({
tag: z.string().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetLibraryHubsDirector$ {
/** @deprecated use `GetLibraryHubsDirector$inboundSchema` instead. */
export const inboundSchema = GetLibraryHubsDirector$inboundSchema;
/** @deprecated use `GetLibraryHubsDirector$outboundSchema` instead. */
export const outboundSchema = GetLibraryHubsDirector$outboundSchema;
/** @deprecated use `GetLibraryHubsDirector$Outbound` instead. */
export type Outbound = GetLibraryHubsDirector$Outbound;
}
/** @internal */
export const GetLibraryHubsRole$inboundSchema: z.ZodType<
GetLibraryHubsRole,
z.ZodTypeDef,
unknown
> = z.object({
tag: z.string().optional(),
});
/** @internal */
export type GetLibraryHubsRole$Outbound = {
tag?: string | undefined;
};
/** @internal */
export const GetLibraryHubsRole$outboundSchema: z.ZodType<
GetLibraryHubsRole$Outbound,
z.ZodTypeDef,
GetLibraryHubsRole
> = z.object({
tag: z.string().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetLibraryHubsRole$ {
/** @deprecated use `GetLibraryHubsRole$inboundSchema` instead. */
export const inboundSchema = GetLibraryHubsRole$inboundSchema;
/** @deprecated use `GetLibraryHubsRole$outboundSchema` instead. */
export const outboundSchema = GetLibraryHubsRole$outboundSchema;
/** @deprecated use `GetLibraryHubsRole$Outbound` instead. */
export type Outbound = GetLibraryHubsRole$Outbound;
}
/** @internal */
export const GetLibraryHubsWriter$inboundSchema: z.ZodType<
GetLibraryHubsWriter,
z.ZodTypeDef,
unknown
> = z.object({
tag: z.string().optional(),
});
/** @internal */
export type GetLibraryHubsWriter$Outbound = {
tag?: string | undefined;
};
/** @internal */
export const GetLibraryHubsWriter$outboundSchema: z.ZodType<
GetLibraryHubsWriter$Outbound,
z.ZodTypeDef,
GetLibraryHubsWriter
> = z.object({
tag: z.string().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetLibraryHubsWriter$ {
/** @deprecated use `GetLibraryHubsWriter$inboundSchema` instead. */
export const inboundSchema = GetLibraryHubsWriter$inboundSchema;
/** @deprecated use `GetLibraryHubsWriter$outboundSchema` instead. */
export const outboundSchema = GetLibraryHubsWriter$outboundSchema;
/** @deprecated use `GetLibraryHubsWriter$Outbound` instead. */
export type Outbound = GetLibraryHubsWriter$Outbound;
}
/** @internal */
export const GetLibraryHubsMetadata$inboundSchema: z.ZodType<
GetLibraryHubsMetadata,
z.ZodTypeDef,
unknown
> = z
.object({
ratingKey: z.string().optional(),
key: z.string().optional(),
guid: z.string().optional(),
studio: z.string().optional(),
type: z.string().optional(),
title: z.string().optional(),
librarySectionTitle: z.string().optional(),
librarySectionID: z.number().int().optional(),
librarySectionKey: z.string().optional(),
contentRating: z.string().optional(),
summary: z.string().optional(),
rating: z.number().optional(),
audienceRating: z.number().optional(),
viewCount: z.number().int().optional(),
lastViewedAt: z.number().int().optional(),
year: z.number().int().optional(),
tagline: z.string().optional(),
thumb: z.string().optional(),
art: z.string().optional(),
duration: z.number().int().optional(),
originallyAvailableAt: z
.string()
.transform((v) => new RFCDate(v))
.optional(),
addedAt: z.number().int().optional(),
updatedAt: z.number().int().optional(),
audienceRatingImage: z.string().optional(),
primaryExtraKey: z.string().optional(),
ratingImage: z.string().optional(),
Media: z.array(z.lazy(() => GetLibraryHubsMedia$inboundSchema)).optional(),
Genre: z.array(z.lazy(() => GetLibraryHubsGenre$inboundSchema)).optional(),
Country: z.array(z.lazy(() => GetLibraryHubsCountry$inboundSchema)).optional(),
Director: z.array(z.lazy(() => GetLibraryHubsDirector$inboundSchema)).optional(),
Role: z.array(z.lazy(() => GetLibraryHubsRole$inboundSchema)).optional(),
Writer: z.array(z.lazy(() => GetLibraryHubsWriter$inboundSchema)).optional(),
skipCount: z.number().int().optional(),
chapterSource: z.string().optional(),
})
.transform((v) => {
return remap$(v, {
Media: "media",
Genre: "genre",
Country: "country",
Director: "director",
Role: "role",
Writer: "writer",
});
});
/** @internal */
export type GetLibraryHubsMetadata$Outbound = {
ratingKey?: string | undefined;
key?: string | undefined;
guid?: string | undefined;
studio?: string | undefined;
type?: string | undefined;
title?: string | undefined;
librarySectionTitle?: string | undefined;
librarySectionID?: number | undefined;
librarySectionKey?: string | undefined;
contentRating?: string | undefined;
summary?: string | undefined;
rating?: number | undefined;
audienceRating?: number | undefined;
viewCount?: number | undefined;
lastViewedAt?: number | undefined;
year?: number | undefined;
tagline?: string | undefined;
thumb?: string | undefined;
art?: string | undefined;
duration?: number | undefined;
originallyAvailableAt?: string | undefined;
addedAt?: number | undefined;
updatedAt?: number | undefined;
audienceRatingImage?: string | undefined;
primaryExtraKey?: string | undefined;
ratingImage?: string | undefined;
Media?: Array<GetLibraryHubsMedia$Outbound> | undefined;
Genre?: Array<GetLibraryHubsGenre$Outbound> | undefined;
Country?: Array<GetLibraryHubsCountry$Outbound> | undefined;
Director?: Array<GetLibraryHubsDirector$Outbound> | undefined;
Role?: Array<GetLibraryHubsRole$Outbound> | undefined;
Writer?: Array<GetLibraryHubsWriter$Outbound> | undefined;
skipCount?: number | undefined;
chapterSource?: string | undefined;
};
/** @internal */
export const GetLibraryHubsMetadata$outboundSchema: z.ZodType<
GetLibraryHubsMetadata$Outbound,
z.ZodTypeDef,
GetLibraryHubsMetadata
> = z
.object({
ratingKey: z.string().optional(),
key: z.string().optional(),
guid: z.string().optional(),
studio: z.string().optional(),
type: z.string().optional(),
title: z.string().optional(),
librarySectionTitle: z.string().optional(),
librarySectionID: z.number().int().optional(),
librarySectionKey: z.string().optional(),
contentRating: z.string().optional(),
summary: z.string().optional(),
rating: z.number().optional(),
audienceRating: z.number().optional(),
viewCount: z.number().int().optional(),
lastViewedAt: z.number().int().optional(),
year: z.number().int().optional(),
tagline: z.string().optional(),
thumb: z.string().optional(),
art: z.string().optional(),
duration: z.number().int().optional(),
originallyAvailableAt: z
.instanceof(RFCDate)
.transform((v) => v.toString())
.optional(),
addedAt: z.number().int().optional(),
updatedAt: z.number().int().optional(),
audienceRatingImage: z.string().optional(),
primaryExtraKey: z.string().optional(),
ratingImage: z.string().optional(),
media: z.array(z.lazy(() => GetLibraryHubsMedia$outboundSchema)).optional(),
genre: z.array(z.lazy(() => GetLibraryHubsGenre$outboundSchema)).optional(),
country: z.array(z.lazy(() => GetLibraryHubsCountry$outboundSchema)).optional(),
director: z.array(z.lazy(() => GetLibraryHubsDirector$outboundSchema)).optional(),
role: z.array(z.lazy(() => GetLibraryHubsRole$outboundSchema)).optional(),
writer: z.array(z.lazy(() => GetLibraryHubsWriter$outboundSchema)).optional(),
skipCount: z.number().int().optional(),
chapterSource: z.string().optional(),
})
.transform((v) => {
return remap$(v, {
media: "Media",
genre: "Genre",
country: "Country",
director: "Director",
role: "Role",
writer: "Writer",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetLibraryHubsMetadata$ {
/** @deprecated use `GetLibraryHubsMetadata$inboundSchema` instead. */
export const inboundSchema = GetLibraryHubsMetadata$inboundSchema;
/** @deprecated use `GetLibraryHubsMetadata$outboundSchema` instead. */
export const outboundSchema = GetLibraryHubsMetadata$outboundSchema;
/** @deprecated use `GetLibraryHubsMetadata$Outbound` instead. */
export type Outbound = GetLibraryHubsMetadata$Outbound;
}
/** @internal */
export const GetLibraryHubsHub$inboundSchema: z.ZodType<GetLibraryHubsHub, z.ZodTypeDef, unknown> =
z
.object({
key: z.string().optional(),
title: z.string().optional(),
type: z.string().optional(),
hubIdentifier: z.string().optional(),
context: z.string().optional(),
size: z.number().int().optional(),
more: z.boolean().optional(),
style: z.string().optional(),
hubKey: z.string().optional(),
Metadata: z.array(z.lazy(() => GetLibraryHubsMetadata$inboundSchema)).optional(),
promoted: z.boolean().optional(),
random: z.boolean().optional(),
})
.transform((v) => {
return remap$(v, {
Metadata: "metadata",
});
});
/** @internal */
export type GetLibraryHubsHub$Outbound = {
key?: string | undefined;
title?: string | undefined;
type?: string | undefined;
hubIdentifier?: string | undefined;
context?: string | undefined;
size?: number | undefined;
more?: boolean | undefined;
style?: string | undefined;
hubKey?: string | undefined;
Metadata?: Array<GetLibraryHubsMetadata$Outbound> | undefined;
promoted?: boolean | undefined;
random?: boolean | undefined;
};
/** @internal */
export const GetLibraryHubsHub$outboundSchema: z.ZodType<
GetLibraryHubsHub$Outbound,
z.ZodTypeDef,
GetLibraryHubsHub
> = z
.object({
key: z.string().optional(),
title: z.string().optional(),
type: z.string().optional(),
hubIdentifier: z.string().optional(),
context: z.string().optional(),
size: z.number().int().optional(),
more: z.boolean().optional(),
style: z.string().optional(),
hubKey: z.string().optional(),
metadata: z.array(z.lazy(() => GetLibraryHubsMetadata$outboundSchema)).optional(),
promoted: z.boolean().optional(),
random: z.boolean().optional(),
})
.transform((v) => {
return remap$(v, {
metadata: "Metadata",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetLibraryHubsHub$ {
/** @deprecated use `GetLibraryHubsHub$inboundSchema` instead. */
export const inboundSchema = GetLibraryHubsHub$inboundSchema;
/** @deprecated use `GetLibraryHubsHub$outboundSchema` instead. */
export const outboundSchema = GetLibraryHubsHub$outboundSchema;
/** @deprecated use `GetLibraryHubsHub$Outbound` instead. */
export type Outbound = GetLibraryHubsHub$Outbound;
}
/** @internal */
export const GetLibraryHubsMediaContainer$inboundSchema: z.ZodType<
GetLibraryHubsMediaContainer,
z.ZodTypeDef,
unknown
> = z
.object({
size: z.number().int().optional(),
allowSync: z.boolean().optional(),
identifier: z.string().optional(),
librarySectionID: z.number().int().optional(),
librarySectionTitle: z.string().optional(),
librarySectionUUID: z.string().optional(),
Hub: z.array(z.lazy(() => GetLibraryHubsHub$inboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
Hub: "hub",
});
});
/** @internal */
export type GetLibraryHubsMediaContainer$Outbound = {
size?: number | undefined;
allowSync?: boolean | undefined;
identifier?: string | undefined;
librarySectionID?: number | undefined;
librarySectionTitle?: string | undefined;
librarySectionUUID?: string | undefined;
Hub?: Array<GetLibraryHubsHub$Outbound> | undefined;
};
/** @internal */
export const GetLibraryHubsMediaContainer$outboundSchema: z.ZodType<
GetLibraryHubsMediaContainer$Outbound,
z.ZodTypeDef,
GetLibraryHubsMediaContainer
> = z
.object({
size: z.number().int().optional(),
allowSync: z.boolean().optional(),
identifier: z.string().optional(),
librarySectionID: z.number().int().optional(),
librarySectionTitle: z.string().optional(),
librarySectionUUID: z.string().optional(),
hub: z.array(z.lazy(() => GetLibraryHubsHub$outboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
hub: "Hub",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetLibraryHubsMediaContainer$ {
/** @deprecated use `GetLibraryHubsMediaContainer$inboundSchema` instead. */
export const inboundSchema = GetLibraryHubsMediaContainer$inboundSchema;
/** @deprecated use `GetLibraryHubsMediaContainer$outboundSchema` instead. */
export const outboundSchema = GetLibraryHubsMediaContainer$outboundSchema;
/** @deprecated use `GetLibraryHubsMediaContainer$Outbound` instead. */
export type Outbound = GetLibraryHubsMediaContainer$Outbound;
}
/** @internal */
export const GetLibraryHubsResponseBody$inboundSchema: z.ZodType<
GetLibraryHubsResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
MediaContainer: z.lazy(() => GetLibraryHubsMediaContainer$inboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
MediaContainer: "mediaContainer",
});
});
/** @internal */
export type GetLibraryHubsResponseBody$Outbound = {
MediaContainer?: GetLibraryHubsMediaContainer$Outbound | undefined;
};
/** @internal */
export const GetLibraryHubsResponseBody$outboundSchema: z.ZodType<
GetLibraryHubsResponseBody$Outbound,
z.ZodTypeDef,
GetLibraryHubsResponseBody
> = z
.object({
mediaContainer: z.lazy(() => GetLibraryHubsMediaContainer$outboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
mediaContainer: "MediaContainer",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetLibraryHubsResponseBody$ {
/** @deprecated use `GetLibraryHubsResponseBody$inboundSchema` instead. */
export const inboundSchema = GetLibraryHubsResponseBody$inboundSchema;
/** @deprecated use `GetLibraryHubsResponseBody$outboundSchema` instead. */
export const outboundSchema = GetLibraryHubsResponseBody$outboundSchema;
/** @deprecated use `GetLibraryHubsResponseBody$Outbound` instead. */
export type Outbound = GetLibraryHubsResponseBody$Outbound;
}
/** @internal */
export const GetLibraryHubsResponse$inboundSchema: z.ZodType<
GetLibraryHubsResponse,
z.ZodTypeDef,
unknown
> = z
.object({
ContentType: z.string(),
StatusCode: z.number().int(),
RawResponse: z.instanceof(Response),
object: z.lazy(() => GetLibraryHubsResponseBody$inboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
/** @internal */
export type GetLibraryHubsResponse$Outbound = {
ContentType: string;
StatusCode: number;
RawResponse: never;
object?: GetLibraryHubsResponseBody$Outbound | undefined;
};
/** @internal */
export const GetLibraryHubsResponse$outboundSchema: z.ZodType<
GetLibraryHubsResponse$Outbound,
z.ZodTypeDef,
GetLibraryHubsResponse
> = z
.object({
contentType: z.string(),
statusCode: z.number().int(),
rawResponse: z.instanceof(Response).transform(() => {
throw new Error("Response cannot be serialized");
}),
object: z.lazy(() => GetLibraryHubsResponseBody$outboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetLibraryHubsResponse$ {
/** @deprecated use `GetLibraryHubsResponse$inboundSchema` instead. */
export const inboundSchema = GetLibraryHubsResponse$inboundSchema;
/** @deprecated use `GetLibraryHubsResponse$outboundSchema` instead. */
export const outboundSchema = GetLibraryHubsResponse$outboundSchema;
/** @deprecated use `GetLibraryHubsResponse$Outbound` instead. */
export type Outbound = GetLibraryHubsResponse$Outbound;
}

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