/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type Smtp = { /** * The server's response to the EHLO command. */ ehlo?: string | undefined; /** * The server's response to the STARTTLS command. */ startTls?: string | undefined; }; /** @internal */ export const Smtp$inboundSchema: z.ZodType = z .object({ ehlo: z.string().optional(), start_tls: z.string().optional(), }).transform((v) => { return remap$(v, { "start_tls": "startTls", }); }); export function smtpFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Smtp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Smtp' from JSON`, ); }