/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { Customer, Customer$inboundSchema } from "./customer.js"; import { DebugTrackerStatus, DebugTrackerStatus$inboundSchema, } from "./debug-tracker-status.js"; import { ErrorResponse, ErrorResponse$inboundSchema, } from "./error-response.js"; import { SDKValidationError } from "./sdk-validation-error.js"; export type CustomerLookupResult = { customer?: Customer | undefined; error?: ErrorResponse | undefined; status?: DebugTrackerStatus | undefined; }; /** @internal */ export const CustomerLookupResult$inboundSchema: z.ZodMiniType< CustomerLookupResult, unknown > = z.object({ customer: types.optional(Customer$inboundSchema), error: types.optional(ErrorResponse$inboundSchema), status: types.optional(DebugTrackerStatus$inboundSchema), }); export function customerLookupResultFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CustomerLookupResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CustomerLookupResult' from JSON`, ); }