/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { AIAction, AIAction$inboundSchema, AIAction$Outbound, AIAction$outboundSchema, } from "./aiaction.js"; import { AIActionDynamic, AIActionDynamic$inboundSchema, AIActionDynamic$Outbound, AIActionDynamic$outboundSchema, } from "./aiactiondynamic.js"; import { PresetAction, PresetAction$inboundSchema, PresetAction$Outbound, PresetAction$outboundSchema, } from "./presetaction.js"; export type Steps = | (PresetAction & { type: "PRESET_ACTION" }) | (AIActionDynamic & { type: "AI_ACTION_DYNAMIC" }) | (AIAction & { type: "AI_ACTION" }); /** @internal */ export const Steps$inboundSchema: z.ZodType = z .union([ PresetAction$inboundSchema.and( z.object({ type: z.literal("PRESET_ACTION") }).transform((v) => ({ type: v.type, })), ), AIActionDynamic$inboundSchema.and( z.object({ type: z.literal("AI_ACTION_DYNAMIC") }).transform((v) => ({ type: v.type, })), ), AIAction$inboundSchema.and( z.object({ type: z.literal("AI_ACTION") }).transform((v) => ({ type: v.type, })), ), ]); /** @internal */ export type Steps$Outbound = | (PresetAction$Outbound & { type: "PRESET_ACTION" }) | (AIActionDynamic$Outbound & { type: "AI_ACTION_DYNAMIC" }) | (AIAction$Outbound & { type: "AI_ACTION" }); /** @internal */ export const Steps$outboundSchema: z.ZodType< Steps$Outbound, z.ZodTypeDef, Steps > = z.union([ PresetAction$outboundSchema.and( z.object({ type: z.literal("PRESET_ACTION") }).transform((v) => ({ type: v.type, })), ), AIActionDynamic$outboundSchema.and( z.object({ type: z.literal("AI_ACTION_DYNAMIC") }).transform((v) => ({ type: v.type, })), ), AIAction$outboundSchema.and( z.object({ type: z.literal("AI_ACTION") }).transform((v) => ({ type: v.type, })), ), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Steps$ { /** @deprecated use `Steps$inboundSchema` instead. */ export const inboundSchema = Steps$inboundSchema; /** @deprecated use `Steps$outboundSchema` instead. */ export const outboundSchema = Steps$outboundSchema; /** @deprecated use `Steps$Outbound` instead. */ export type Outbound = Steps$Outbound; }