/* * 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 PushFieldValidation = { /** * Field name that resulted in the validation issue. */ field?: string | undefined; /** * Details on the validation issue. */ details: string; /** * Unique reference identifier for the validation issue. */ ref?: string | null | undefined; }; /** @internal */ export const PushFieldValidation$inboundSchema: z.ZodType< PushFieldValidation, z.ZodTypeDef, unknown > = z.object({ field: z.string().optional(), details: z.string(), ref: z.nullable(z.string()).optional(), }); export function pushFieldValidationFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PushFieldValidation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PushFieldValidation' from JSON`, ); }