/* * 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 DisplayOptionsError = { title?: string | undefined; description?: string | undefined; callToAction?: string | undefined; }; /** @internal */ export const DisplayOptionsError$inboundSchema: z.ZodType< DisplayOptionsError, z.ZodTypeDef, unknown > = z.object({ title: z.string().optional(), description: z.string().optional(), callToAction: z.string().optional(), }); /** @internal */ export type DisplayOptionsError$Outbound = { title?: string | undefined; description?: string | undefined; callToAction?: string | undefined; }; /** @internal */ export const DisplayOptionsError$outboundSchema: z.ZodType< DisplayOptionsError$Outbound, z.ZodTypeDef, DisplayOptionsError > = z.object({ title: z.string().optional(), description: z.string().optional(), callToAction: z.string().optional(), }); export function displayOptionsErrorToJSON( displayOptionsError: DisplayOptionsError, ): string { return JSON.stringify( DisplayOptionsError$outboundSchema.parse(displayOptionsError), ); } export function displayOptionsErrorFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DisplayOptionsError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DisplayOptionsError' from JSON`, ); }