/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { Media, Media$inboundSchema, Media$Outbound, Media$outboundSchema, } from "./media.js"; /** * Response model for image generation. */ export type VideoResponse = { /** * The generated images. */ images: Array; }; /** @internal */ export const VideoResponse$inboundSchema: z.ZodType< VideoResponse, z.ZodTypeDef, unknown > = z.object({ images: z.array(Media$inboundSchema), }); /** @internal */ export type VideoResponse$Outbound = { images: Array; }; /** @internal */ export const VideoResponse$outboundSchema: z.ZodType< VideoResponse$Outbound, z.ZodTypeDef, VideoResponse > = z.object({ images: z.array(Media$outboundSchema), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace VideoResponse$ { /** @deprecated use `VideoResponse$inboundSchema` instead. */ export const inboundSchema = VideoResponse$inboundSchema; /** @deprecated use `VideoResponse$outboundSchema` instead. */ export const outboundSchema = VideoResponse$outboundSchema; /** @deprecated use `VideoResponse$Outbound` instead. */ export type Outbound = VideoResponse$Outbound; } export function videoResponseToJSON(videoResponse: VideoResponse): string { return JSON.stringify(VideoResponse$outboundSchema.parse(videoResponse)); } export function videoResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => VideoResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VideoResponse' from JSON`, ); }