restoreresponseunion.ts•917 B
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod";
import { Info, Info$zodSchema } from "./info.js";
/**
* The error message if restore failed for a specific asset.
*/
export const ErrorEnum$zodSchema = z.enum([
"no_backup",
"failed",
"unauthorized",
]).describe("The error message if restore failed for a specific asset.");
export type ErrorEnum = z.infer<typeof ErrorEnum$zodSchema>;
export type RestoreResponse = { error?: ErrorEnum | undefined };
export const RestoreResponse$zodSchema: z.ZodType<
RestoreResponse,
z.ZodTypeDef,
unknown
> = z.object({
error: ErrorEnum$zodSchema.optional(),
});
export type RestoreResponseUnion = RestoreResponse | Info;
export const RestoreResponseUnion$zodSchema: z.ZodType<
RestoreResponseUnion,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => RestoreResponse$zodSchema),
Info$zodSchema,
]);