mirror of
https://github.com/LukeHagar/plexjs.git
synced 2025-12-09 20:47:47 +00:00
115 lines
3.0 KiB
TypeScript
115 lines
3.0 KiB
TypeScript
/*
|
|
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
*/
|
|
|
|
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$: z.ZodNativeEnum<typeof Download> = z.nativeEnum(Download);
|
|
|
|
/** @internal */
|
|
export namespace CheckForUpdatesRequest$ {
|
|
export type Inbound = {
|
|
download?: Download | undefined;
|
|
};
|
|
|
|
export const inboundSchema: z.ZodType<CheckForUpdatesRequest, z.ZodTypeDef, Inbound> = z
|
|
.object({
|
|
download: Download$.optional(),
|
|
})
|
|
.transform((v) => {
|
|
return {
|
|
...(v.download === undefined ? null : { download: v.download }),
|
|
};
|
|
});
|
|
|
|
export type Outbound = {
|
|
download?: Download | undefined;
|
|
};
|
|
|
|
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CheckForUpdatesRequest> = z
|
|
.object({
|
|
download: Download$.optional(),
|
|
})
|
|
.transform((v) => {
|
|
return {
|
|
...(v.download === undefined ? null : { download: v.download }),
|
|
};
|
|
});
|
|
}
|
|
|
|
/** @internal */
|
|
export namespace CheckForUpdatesResponse$ {
|
|
export type Inbound = {
|
|
ContentType: string;
|
|
StatusCode: number;
|
|
RawResponse: Response;
|
|
};
|
|
|
|
export const inboundSchema: z.ZodType<CheckForUpdatesResponse, z.ZodTypeDef, Inbound> = z
|
|
.object({
|
|
ContentType: z.string(),
|
|
StatusCode: z.number().int(),
|
|
RawResponse: z.instanceof(Response),
|
|
})
|
|
.transform((v) => {
|
|
return {
|
|
contentType: v.ContentType,
|
|
statusCode: v.StatusCode,
|
|
rawResponse: v.RawResponse,
|
|
};
|
|
});
|
|
|
|
export type Outbound = {
|
|
ContentType: string;
|
|
StatusCode: number;
|
|
RawResponse: never;
|
|
};
|
|
|
|
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, 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 {
|
|
ContentType: v.contentType,
|
|
StatusCode: v.statusCode,
|
|
RawResponse: v.rawResponse,
|
|
};
|
|
});
|
|
}
|