/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { ClosedEnum } from "../../types/enums.js"; import { ExpressionBranchesOptsPayloadV2, ExpressionBranchesOptsPayloadV2$inboundSchema, ExpressionBranchesOptsPayloadV2$Outbound, ExpressionBranchesOptsPayloadV2$outboundSchema, } from "./expressionbranchesoptspayloadv2.js"; import { ExpressionFilterOptsPayloadV2, ExpressionFilterOptsPayloadV2$inboundSchema, ExpressionFilterOptsPayloadV2$Outbound, ExpressionFilterOptsPayloadV2$outboundSchema, } from "./expressionfilteroptspayloadv2.js"; import { ExpressionNavigateOptsPayloadV2, ExpressionNavigateOptsPayloadV2$inboundSchema, ExpressionNavigateOptsPayloadV2$Outbound, ExpressionNavigateOptsPayloadV2$outboundSchema, } from "./expressionnavigateoptspayloadv2.js"; import { ExpressionParseOptsPayloadV2, ExpressionParseOptsPayloadV2$inboundSchema, ExpressionParseOptsPayloadV2$Outbound, ExpressionParseOptsPayloadV2$outboundSchema, } from "./expressionparseoptspayloadv2.js"; /** * The type of the operation */ export const OperationType = { Navigate: "navigate", Filter: "filter", Count: "count", Min: "min", Max: "max", Random: "random", First: "first", Parse: "parse", Branches: "branches", } as const; /** * The type of the operation */ export type OperationType = ClosedEnum; export type ExpressionOperationPayloadV2 = { branches?: ExpressionBranchesOptsPayloadV2 | undefined; filter?: ExpressionFilterOptsPayloadV2 | undefined; navigate?: ExpressionNavigateOptsPayloadV2 | undefined; /** * The type of the operation */ operationType: OperationType; parse?: ExpressionParseOptsPayloadV2 | undefined; }; /** @internal */ export const OperationType$inboundSchema: z.ZodNativeEnum< typeof OperationType > = z.nativeEnum(OperationType); /** @internal */ export const OperationType$outboundSchema: z.ZodNativeEnum< typeof OperationType > = OperationType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace OperationType$ { /** @deprecated use `OperationType$inboundSchema` instead. */ export const inboundSchema = OperationType$inboundSchema; /** @deprecated use `OperationType$outboundSchema` instead. */ export const outboundSchema = OperationType$outboundSchema; } /** @internal */ export const ExpressionOperationPayloadV2$inboundSchema: z.ZodType< ExpressionOperationPayloadV2, z.ZodTypeDef, unknown > = z.object({ branches: ExpressionBranchesOptsPayloadV2$inboundSchema.optional(), filter: ExpressionFilterOptsPayloadV2$inboundSchema.optional(), navigate: ExpressionNavigateOptsPayloadV2$inboundSchema.optional(), operation_type: OperationType$inboundSchema, parse: ExpressionParseOptsPayloadV2$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "operation_type": "operationType", }); }); /** @internal */ export type ExpressionOperationPayloadV2$Outbound = { branches?: ExpressionBranchesOptsPayloadV2$Outbound | undefined; filter?: ExpressionFilterOptsPayloadV2$Outbound | undefined; navigate?: ExpressionNavigateOptsPayloadV2$Outbound | undefined; operation_type: string; parse?: ExpressionParseOptsPayloadV2$Outbound | undefined; }; /** @internal */ export const ExpressionOperationPayloadV2$outboundSchema: z.ZodType< ExpressionOperationPayloadV2$Outbound, z.ZodTypeDef, ExpressionOperationPayloadV2 > = z.object({ branches: ExpressionBranchesOptsPayloadV2$outboundSchema.optional(), filter: ExpressionFilterOptsPayloadV2$outboundSchema.optional(), navigate: ExpressionNavigateOptsPayloadV2$outboundSchema.optional(), operationType: OperationType$outboundSchema, parse: ExpressionParseOptsPayloadV2$outboundSchema.optional(), }).transform((v) => { return remap$(v, { operationType: "operation_type", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExpressionOperationPayloadV2$ { /** @deprecated use `ExpressionOperationPayloadV2$inboundSchema` instead. */ export const inboundSchema = ExpressionOperationPayloadV2$inboundSchema; /** @deprecated use `ExpressionOperationPayloadV2$outboundSchema` instead. */ export const outboundSchema = ExpressionOperationPayloadV2$outboundSchema; /** @deprecated use `ExpressionOperationPayloadV2$Outbound` instead. */ export type Outbound = ExpressionOperationPayloadV2$Outbound; }