/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; export const DomainRouteDtoType = { Agent: "agent", Webhook: "webhook", } as const; export type DomainRouteDtoType = ClosedEnum; export type DomainRouteDto = { /** * Inbox address local part (e.g. "support", "*") */ address: string; /** * Agent identifier; required when type is agent, unused for webhook */ agentId?: string | undefined; type: DomainRouteDtoType; /** * Optional string key-value metadata (max 10 keys, 500 characters total for keys+values). */ data?: { [k: string]: string } | undefined; }; /** @internal */ export const DomainRouteDtoType$outboundSchema: z.ZodNativeEnum< typeof DomainRouteDtoType > = z.nativeEnum(DomainRouteDtoType); /** @internal */ export type DomainRouteDto$Outbound = { address: string; agentId?: string | undefined; type: string; data?: { [k: string]: string } | undefined; }; /** @internal */ export const DomainRouteDto$outboundSchema: z.ZodType< DomainRouteDto$Outbound, z.ZodTypeDef, DomainRouteDto > = z.object({ address: z.string(), agentId: z.string().optional(), type: DomainRouteDtoType$outboundSchema, data: z.record(z.string()).optional(), }); export function domainRouteDtoToJSON(domainRouteDto: DomainRouteDto): string { return JSON.stringify(DomainRouteDto$outboundSchema.parse(domainRouteDto)); }