Files
plexjs/src/sdk/models/operations/checkforupdates.ts
2024-09-08 03:06:14 +00:00

150 lines
4.3 KiB
TypeScript

/*
* 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;
}