/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { ElementTarget, ElementTarget$inboundSchema, ElementTarget$Outbound, ElementTarget$outboundSchema, } from "./elementtarget.js"; import { ManualElementAssertion, ManualElementAssertion$inboundSchema, ManualElementAssertion$Outbound, ManualElementAssertion$outboundSchema, } from "./manualelementassertion.js"; import { SingleTargetCache, SingleTargetCache$inboundSchema, SingleTargetCache$Outbound, SingleTargetCache$outboundSchema, } from "./singletargetcache.js"; export type ElementAssertionCommand = { thoughts?: string | undefined; /** * unique identifier to this step, used for step cache */ id: string; useSelector?: boolean | undefined; force?: boolean | undefined; /** * disable element caching for this step */ disableCache?: boolean | undefined; /** * url or url regex for the iframe */ iframeUrl?: string | undefined; type?: "ELEMENT_CHECK" | undefined; target: ElementTarget; assertion: ManualElementAssertion; cache?: SingleTargetCache | undefined; /** * max seconds to wait for the assertion to be true */ timeout?: number | undefined; }; /** @internal */ export const ElementAssertionCommand$inboundSchema: z.ZodType< ElementAssertionCommand, z.ZodTypeDef, unknown > = z.object({ thoughts: z.string().optional(), id: z.string(), useSelector: z.boolean().optional(), force: z.boolean().optional(), disableCache: z.boolean().optional(), iframeUrl: z.string().optional(), type: z.literal("ELEMENT_CHECK").optional(), target: ElementTarget$inboundSchema, assertion: ManualElementAssertion$inboundSchema, cache: SingleTargetCache$inboundSchema.optional(), timeout: z.number().int().optional(), }); /** @internal */ export type ElementAssertionCommand$Outbound = { thoughts?: string | undefined; id: string; useSelector?: boolean | undefined; force?: boolean | undefined; disableCache?: boolean | undefined; iframeUrl?: string | undefined; type: "ELEMENT_CHECK"; target: ElementTarget$Outbound; assertion: ManualElementAssertion$Outbound; cache?: SingleTargetCache$Outbound | undefined; timeout?: number | undefined; }; /** @internal */ export const ElementAssertionCommand$outboundSchema: z.ZodType< ElementAssertionCommand$Outbound, z.ZodTypeDef, ElementAssertionCommand > = z.object({ thoughts: z.string().optional(), id: z.string(), useSelector: z.boolean().optional(), force: z.boolean().optional(), disableCache: z.boolean().optional(), iframeUrl: z.string().optional(), type: z.literal("ELEMENT_CHECK").default("ELEMENT_CHECK" as const), target: ElementTarget$outboundSchema, assertion: ManualElementAssertion$outboundSchema, cache: SingleTargetCache$outboundSchema.optional(), timeout: z.number().int().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ElementAssertionCommand$ { /** @deprecated use `ElementAssertionCommand$inboundSchema` instead. */ export const inboundSchema = ElementAssertionCommand$inboundSchema; /** @deprecated use `ElementAssertionCommand$outboundSchema` instead. */ export const outboundSchema = ElementAssertionCommand$outboundSchema; /** @deprecated use `ElementAssertionCommand$Outbound` instead. */ export type Outbound = ElementAssertionCommand$Outbound; }