/* * 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 FulfillmentDetailsError = { shipmentDurationDays?: string | undefined; returnPolicy?: string | undefined; }; /** @internal */ export const FulfillmentDetailsError$inboundSchema: z.ZodType< FulfillmentDetailsError, z.ZodTypeDef, unknown > = z.object({ shipmentDurationDays: z.string().optional(), returnPolicy: z.string().optional(), }); /** @internal */ export type FulfillmentDetailsError$Outbound = { shipmentDurationDays?: string | undefined; returnPolicy?: string | undefined; }; /** @internal */ export const FulfillmentDetailsError$outboundSchema: z.ZodType< FulfillmentDetailsError$Outbound, z.ZodTypeDef, FulfillmentDetailsError > = z.object({ shipmentDurationDays: z.string().optional(), returnPolicy: z.string().optional(), }); export function fulfillmentDetailsErrorToJSON( fulfillmentDetailsError: FulfillmentDetailsError, ): string { return JSON.stringify( FulfillmentDetailsError$outboundSchema.parse(fulfillmentDetailsError), ); } export function fulfillmentDetailsErrorFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => FulfillmentDetailsError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FulfillmentDetailsError' from JSON`, ); }