/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { CoordinatesTarget, CoordinatesTarget$inboundSchema, CoordinatesTarget$Outbound, CoordinatesTarget$outboundSchema, } from "./coordinatestarget.js"; import { DescriptionTarget, DescriptionTarget$inboundSchema, DescriptionTarget$Outbound, DescriptionTarget$outboundSchema, } from "./descriptiontarget.js"; export type ElementTarget = | (CoordinatesTarget & { type: "coordinates" }) | (DescriptionTarget & { type: "description" }); /** @internal */ export const ElementTarget$inboundSchema: z.ZodType< ElementTarget, z.ZodTypeDef, unknown > = z.union([ CoordinatesTarget$inboundSchema.and( z.object({ type: z.literal("coordinates") }).transform((v) => ({ type: v.type, })), ), DescriptionTarget$inboundSchema.and( z.object({ type: z.literal("description") }).transform((v) => ({ type: v.type, })), ), ]); /** @internal */ export type ElementTarget$Outbound = | (CoordinatesTarget$Outbound & { type: "coordinates" }) | (DescriptionTarget$Outbound & { type: "description" }); /** @internal */ export const ElementTarget$outboundSchema: z.ZodType< ElementTarget$Outbound, z.ZodTypeDef, ElementTarget > = z.union([ CoordinatesTarget$outboundSchema.and( z.object({ type: z.literal("coordinates") }).transform((v) => ({ type: v.type, })), ), DescriptionTarget$outboundSchema.and( z.object({ type: z.literal("description") }).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 ElementTarget$ { /** @deprecated use `ElementTarget$inboundSchema` instead. */ export const inboundSchema = ElementTarget$inboundSchema; /** @deprecated use `ElementTarget$outboundSchema` instead. */ export const outboundSchema = ElementTarget$outboundSchema; /** @deprecated use `ElementTarget$Outbound` instead. */ export type Outbound = ElementTarget$Outbound; }