/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { ExpressionElseBranchV2, ExpressionElseBranchV2$inboundSchema, ExpressionElseBranchV2$Outbound, ExpressionElseBranchV2$outboundSchema, } from "./expressionelsebranchv2.js"; import { ExpressionOperationV2, ExpressionOperationV2$inboundSchema, ExpressionOperationV2$Outbound, ExpressionOperationV2$outboundSchema, } from "./expressionoperationv2.js"; import { ReturnsMetaV2, ReturnsMetaV2$inboundSchema, ReturnsMetaV2$Outbound, ReturnsMetaV2$outboundSchema, } from "./returnsmetav2.js"; export type ExpressionV2 = { elseBranch?: ExpressionElseBranchV2 | undefined; /** * The human readable label of the expression */ label: string; operations: Array; /** * A short ID that can be used to reference the expression */ reference: string; returns: ReturnsMetaV2; /** * The root reference for this expression (i.e. where the expression starts) */ rootReference: string; }; /** @internal */ export const ExpressionV2$inboundSchema: z.ZodType< ExpressionV2, z.ZodTypeDef, unknown > = z.object({ else_branch: ExpressionElseBranchV2$inboundSchema.optional(), label: z.string(), operations: z.array(ExpressionOperationV2$inboundSchema), reference: z.string(), returns: ReturnsMetaV2$inboundSchema, root_reference: z.string(), }).transform((v) => { return remap$(v, { "else_branch": "elseBranch", "root_reference": "rootReference", }); }); /** @internal */ export type ExpressionV2$Outbound = { else_branch?: ExpressionElseBranchV2$Outbound | undefined; label: string; operations: Array; reference: string; returns: ReturnsMetaV2$Outbound; root_reference: string; }; /** @internal */ export const ExpressionV2$outboundSchema: z.ZodType< ExpressionV2$Outbound, z.ZodTypeDef, ExpressionV2 > = z.object({ elseBranch: ExpressionElseBranchV2$outboundSchema.optional(), label: z.string(), operations: z.array(ExpressionOperationV2$outboundSchema), reference: z.string(), returns: ReturnsMetaV2$outboundSchema, rootReference: z.string(), }).transform((v) => { return remap$(v, { elseBranch: "else_branch", rootReference: "root_reference", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExpressionV2$ { /** @deprecated use `ExpressionV2$inboundSchema` instead. */ export const inboundSchema = ExpressionV2$inboundSchema; /** @deprecated use `ExpressionV2$outboundSchema` instead. */ export const outboundSchema = ExpressionV2$outboundSchema; /** @deprecated use `ExpressionV2$Outbound` instead. */ export type Outbound = ExpressionV2$Outbound; }