/* * 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 ChatControlDto = { /** * JSONLogic filter conditions for conditionally skipping the step execution. Supports complex logical operations with AND, OR, and comparison operators. See https://jsonlogic.com/ for full typing reference. */ skip?: { [k: string]: any } | undefined; /** * Content of the chat message. */ body?: string | undefined; }; /** @internal */ export const ChatControlDto$inboundSchema: z.ZodType< ChatControlDto, z.ZodTypeDef, unknown > = z.object({ skip: z.record(z.any()).optional(), body: z.string().optional(), }); /** @internal */ export type ChatControlDto$Outbound = { skip?: { [k: string]: any } | undefined; body?: string | undefined; }; /** @internal */ export const ChatControlDto$outboundSchema: z.ZodType< ChatControlDto$Outbound, z.ZodTypeDef, ChatControlDto > = z.object({ skip: z.record(z.any()).optional(), body: z.string().optional(), }); export function chatControlDtoToJSON(chatControlDto: ChatControlDto): string { return JSON.stringify(ChatControlDto$outboundSchema.parse(chatControlDto)); } export function chatControlDtoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ChatControlDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChatControlDto' from JSON`, ); }