/* * 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 { ExpressionBranchesOptsV2, ExpressionBranchesOptsV2$inboundSchema, ExpressionBranchesOptsV2$Outbound, ExpressionBranchesOptsV2$outboundSchema, } from "./expressionbranchesoptsv2.js"; import { ExpressionFilterOptsV2, ExpressionFilterOptsV2$inboundSchema, ExpressionFilterOptsV2$Outbound, ExpressionFilterOptsV2$outboundSchema, } from "./expressionfilteroptsv2.js"; import { ExpressionNavigateOptsV2, ExpressionNavigateOptsV2$inboundSchema, ExpressionNavigateOptsV2$Outbound, ExpressionNavigateOptsV2$outboundSchema, } from "./expressionnavigateoptsv2.js"; import { ExpressionParseOptsPayloadV2, ExpressionParseOptsPayloadV2$inboundSchema, ExpressionParseOptsPayloadV2$Outbound, ExpressionParseOptsPayloadV2$outboundSchema, } from "./expressionparseoptspayloadv2.js"; import { ReturnsMetaV2, ReturnsMetaV2$inboundSchema, ReturnsMetaV2$Outbound, ReturnsMetaV2$outboundSchema, } from "./returnsmetav2.js"; /** * The type of the operation */ export const ExpressionOperationV2OperationType = { 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 ExpressionOperationV2OperationType = ClosedEnum< typeof ExpressionOperationV2OperationType >; export type ExpressionOperationV2 = { branches?: ExpressionBranchesOptsV2 | undefined; filter?: ExpressionFilterOptsV2 | undefined; navigate?: ExpressionNavigateOptsV2 | undefined; /** * The type of the operation */ operationType: ExpressionOperationV2OperationType; parse?: ExpressionParseOptsPayloadV2 | undefined; returns: ReturnsMetaV2; }; /** @internal */ export const ExpressionOperationV2OperationType$inboundSchema: z.ZodNativeEnum< typeof ExpressionOperationV2OperationType > = z.nativeEnum(ExpressionOperationV2OperationType); /** @internal */ export const ExpressionOperationV2OperationType$outboundSchema: z.ZodNativeEnum< typeof ExpressionOperationV2OperationType > = ExpressionOperationV2OperationType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExpressionOperationV2OperationType$ { /** @deprecated use `ExpressionOperationV2OperationType$inboundSchema` instead. */ export const inboundSchema = ExpressionOperationV2OperationType$inboundSchema; /** @deprecated use `ExpressionOperationV2OperationType$outboundSchema` instead. */ export const outboundSchema = ExpressionOperationV2OperationType$outboundSchema; } /** @internal */ export const ExpressionOperationV2$inboundSchema: z.ZodType< ExpressionOperationV2, z.ZodTypeDef, unknown > = z.object({ branches: ExpressionBranchesOptsV2$inboundSchema.optional(), filter: ExpressionFilterOptsV2$inboundSchema.optional(), navigate: ExpressionNavigateOptsV2$inboundSchema.optional(), operation_type: ExpressionOperationV2OperationType$inboundSchema, parse: ExpressionParseOptsPayloadV2$inboundSchema.optional(), returns: ReturnsMetaV2$inboundSchema, }).transform((v) => { return remap$(v, { "operation_type": "operationType", }); }); /** @internal */ export type ExpressionOperationV2$Outbound = { branches?: ExpressionBranchesOptsV2$Outbound | undefined; filter?: ExpressionFilterOptsV2$Outbound | undefined; navigate?: ExpressionNavigateOptsV2$Outbound | undefined; operation_type: string; parse?: ExpressionParseOptsPayloadV2$Outbound | undefined; returns: ReturnsMetaV2$Outbound; }; /** @internal */ export const ExpressionOperationV2$outboundSchema: z.ZodType< ExpressionOperationV2$Outbound, z.ZodTypeDef, ExpressionOperationV2 > = z.object({ branches: ExpressionBranchesOptsV2$outboundSchema.optional(), filter: ExpressionFilterOptsV2$outboundSchema.optional(), navigate: ExpressionNavigateOptsV2$outboundSchema.optional(), operationType: ExpressionOperationV2OperationType$outboundSchema, parse: ExpressionParseOptsPayloadV2$outboundSchema.optional(), returns: ReturnsMetaV2$outboundSchema, }).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 ExpressionOperationV2$ { /** @deprecated use `ExpressionOperationV2$inboundSchema` instead. */ export const inboundSchema = ExpressionOperationV2$inboundSchema; /** @deprecated use `ExpressionOperationV2$outboundSchema` instead. */ export const outboundSchema = ExpressionOperationV2$outboundSchema; /** @deprecated use `ExpressionOperationV2$Outbound` instead. */ export type Outbound = ExpressionOperationV2$Outbound; }