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