/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; export type CreateSubscriberRequestDto = { /** * First name of the subscriber */ firstName?: string | null | undefined; /** * Last name of the subscriber */ lastName?: string | null | undefined; /** * Email address of the subscriber */ email?: string | null | undefined; /** * Phone number of the subscriber */ phone?: string | null | undefined; /** * Avatar URL or identifier */ avatar?: string | null | undefined; /** * Locale of the subscriber */ locale?: string | null | undefined; /** * Timezone of the subscriber */ timezone?: string | null | undefined; /** * Additional custom data associated with the subscriber */ data?: { [k: string]: any } | null | undefined; /** * Unique identifier of the subscriber */ subscriberId: string; }; /** @internal */ export type CreateSubscriberRequestDto$Outbound = { firstName?: string | null | undefined; lastName?: string | null | undefined; email?: string | null | undefined; phone?: string | null | undefined; avatar?: string | null | undefined; locale?: string | null | undefined; timezone?: string | null | undefined; data?: { [k: string]: any } | null | undefined; subscriberId: string; }; /** @internal */ export const CreateSubscriberRequestDto$outboundSchema: z.ZodType< CreateSubscriberRequestDto$Outbound, z.ZodTypeDef, CreateSubscriberRequestDto > = z.object({ firstName: z.nullable(z.string()).optional(), lastName: z.nullable(z.string()).optional(), email: z.nullable(z.string()).optional(), phone: z.nullable(z.string()).optional(), avatar: z.nullable(z.string()).optional(), locale: z.nullable(z.string()).optional(), timezone: z.nullable(z.string()).optional(), data: z.nullable(z.record(z.any())).optional(), subscriberId: z.string(), }); export function createSubscriberRequestDtoToJSON( createSubscriberRequestDto: CreateSubscriberRequestDto, ): string { return JSON.stringify( CreateSubscriberRequestDto$outboundSchema.parse(createSubscriberRequestDto), ); }