/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; export const UpdateDomainRouteDtoType = { Agent: "agent", Webhook: "webhook", } as const; export type UpdateDomainRouteDtoType = ClosedEnum< typeof UpdateDomainRouteDtoType >; export type UpdateDomainRouteDto = { /** * Agent identifier; required when type is agent, ignored when type is webhook. */ agentId?: string | undefined; type?: UpdateDomainRouteDtoType | undefined; /** * Replaces route metadata when provided (max 10 keys, 500 characters total for keys+values). */ data?: { [k: string]: string } | undefined; }; /** @internal */ export const UpdateDomainRouteDtoType$outboundSchema: z.ZodNativeEnum< typeof UpdateDomainRouteDtoType > = z.nativeEnum(UpdateDomainRouteDtoType); /** @internal */ export type UpdateDomainRouteDto$Outbound = { agentId?: string | undefined; type?: string | undefined; data?: { [k: string]: string } | undefined; }; /** @internal */ export const UpdateDomainRouteDto$outboundSchema: z.ZodType< UpdateDomainRouteDto$Outbound, z.ZodTypeDef, UpdateDomainRouteDto > = z.object({ agentId: z.string().optional(), type: UpdateDomainRouteDtoType$outboundSchema.optional(), data: z.record(z.string()).optional(), }); export function updateDomainRouteDtoToJSON( updateDomainRouteDto: UpdateDomainRouteDto, ): string { return JSON.stringify( UpdateDomainRouteDto$outboundSchema.parse(updateDomainRouteDto), ); }