/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type Thumbnail = { url?: string | undefined; width?: number | undefined; height?: number | undefined; }; /** @internal */ export const Thumbnail$inboundSchema: z.ZodType< Thumbnail, z.ZodTypeDef, unknown > = z.object({ url: z.string().optional(), width: z.number().int().optional(), height: z.number().int().optional(), }); export function thumbnailFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Thumbnail$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Thumbnail' from JSON`, ); }