/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { lazySchema as lazySchema$, safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type Owner = { /** * ID of the owner */ id?: string | undefined; /** * Email of the owner */ email?: string | null | undefined; /** * Name of the owner */ name?: string | null | undefined; }; /** @internal */ export const Owner$inboundSchema: z.ZodType = /* @__PURE__ */ lazySchema$(() => z.object({ id: types.optional(types.string()), email: z.nullable(types.string()).optional(), name: z.nullable(types.string()).optional(), }) ); export function ownerFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Owner$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Owner' from JSON`, ); }