/* * 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 InboxSubscriberResponseDto = { /** * Unique identifier of the subscriber */ id: string; /** * First name of the subscriber */ firstName?: string | undefined; /** * Last name of the subscriber */ lastName?: string | undefined; /** * Avatar URL of the subscriber */ avatar?: string | undefined; /** * External subscriber identifier */ subscriberId: string; }; /** @internal */ export const InboxSubscriberResponseDto$inboundSchema: z.ZodType< InboxSubscriberResponseDto, z.ZodTypeDef, unknown > = z.object({ id: z.string(), firstName: z.string().optional(), lastName: z.string().optional(), avatar: z.string().optional(), subscriberId: z.string(), }); export function inboxSubscriberResponseDtoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => InboxSubscriberResponseDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InboxSubscriberResponseDto' from JSON`, ); }