/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { ElementAttributeValueAssertion, ElementAttributeValueAssertion$inboundSchema, ElementAttributeValueAssertion$Outbound, ElementAttributeValueAssertion$outboundSchema, } from "./elementattributevalueassertion.js"; import { ElementContentAssertion, ElementContentAssertion$inboundSchema, ElementContentAssertion$Outbound, ElementContentAssertion$outboundSchema, } from "./elementcontentassertion.js"; import { ElementExistenceAssertion, ElementExistenceAssertion$inboundSchema, ElementExistenceAssertion$Outbound, ElementExistenceAssertion$outboundSchema, } from "./elementexistenceassertion.js"; export type ManualElementAssertion = | (ElementExistenceAssertion & { type: "ELEMENT_EXISTENCE" }) | (ElementContentAssertion & { type: "ELEMENT_CONTENT" }) | (ElementAttributeValueAssertion & { type: "ELEMENT_ATTRIBUTE" }); /** @internal */ export const ManualElementAssertion$inboundSchema: z.ZodType< ManualElementAssertion, z.ZodTypeDef, unknown > = z.union([ ElementExistenceAssertion$inboundSchema.and( z.object({ type: z.literal("ELEMENT_EXISTENCE") }).transform((v) => ({ type: v.type, })), ), ElementContentAssertion$inboundSchema.and( z.object({ type: z.literal("ELEMENT_CONTENT") }).transform((v) => ({ type: v.type, })), ), ElementAttributeValueAssertion$inboundSchema.and( z.object({ type: z.literal("ELEMENT_ATTRIBUTE") }).transform((v) => ({ type: v.type, })), ), ]); /** @internal */ export type ManualElementAssertion$Outbound = | (ElementExistenceAssertion$Outbound & { type: "ELEMENT_EXISTENCE" }) | (ElementContentAssertion$Outbound & { type: "ELEMENT_CONTENT" }) | (ElementAttributeValueAssertion$Outbound & { type: "ELEMENT_ATTRIBUTE" }); /** @internal */ export const ManualElementAssertion$outboundSchema: z.ZodType< ManualElementAssertion$Outbound, z.ZodTypeDef, ManualElementAssertion > = z.union([ ElementExistenceAssertion$outboundSchema.and( z.object({ type: z.literal("ELEMENT_EXISTENCE") }).transform((v) => ({ type: v.type, })), ), ElementContentAssertion$outboundSchema.and( z.object({ type: z.literal("ELEMENT_CONTENT") }).transform((v) => ({ type: v.type, })), ), ElementAttributeValueAssertion$outboundSchema.and( z.object({ type: z.literal("ELEMENT_ATTRIBUTE") }).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 ManualElementAssertion$ { /** @deprecated use `ManualElementAssertion$inboundSchema` instead. */ export const inboundSchema = ManualElementAssertion$inboundSchema; /** @deprecated use `ManualElementAssertion$outboundSchema` instead. */ export const outboundSchema = ManualElementAssertion$outboundSchema; /** @deprecated use `ManualElementAssertion$Outbound` instead. */ export type Outbound = ManualElementAssertion$Outbound; }