/* * 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 { SingleTargetCache, SingleTargetCache$inboundSchema, SingleTargetCache$Outbound, SingleTargetCache$outboundSchema, } from "./singletargetcache.js"; export type ClickCommand = { 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?: "CLICK" | undefined; target: ElementTarget; doubleClick?: boolean | undefined; rightClick?: boolean | undefined; /** * Deprecated: wait for the click to trigger a page load or new tab that matches the provided URL or URL glob (e.g. https://google.com/** /*). */ waitForUrl?: string | undefined; /** * Wait for the click to trigger a file download and for the file download to complete. */ waitForDownload?: boolean | undefined; cache?: SingleTargetCache | undefined; }; /** @internal */ export const ClickCommand$inboundSchema: z.ZodType< ClickCommand, 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("CLICK").optional(), target: ElementTarget$inboundSchema, doubleClick: z.boolean().optional(), rightClick: z.boolean().optional(), waitForUrl: z.string().optional(), waitForDownload: z.boolean().optional(), cache: SingleTargetCache$inboundSchema.optional(), }); /** @internal */ export type ClickCommand$Outbound = { thoughts?: string | undefined; id: string; useSelector?: boolean | undefined; force?: boolean | undefined; disableCache?: boolean | undefined; iframeUrl?: string | undefined; type: "CLICK"; target: ElementTarget$Outbound; doubleClick?: boolean | undefined; rightClick?: boolean | undefined; waitForUrl?: string | undefined; waitForDownload?: boolean | undefined; cache?: SingleTargetCache$Outbound | undefined; }; /** @internal */ export const ClickCommand$outboundSchema: z.ZodType< ClickCommand$Outbound, z.ZodTypeDef, ClickCommand > = 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("CLICK").default("CLICK" as const), target: ElementTarget$outboundSchema, doubleClick: z.boolean().optional(), rightClick: z.boolean().optional(), waitForUrl: z.string().optional(), waitForDownload: z.boolean().optional(), cache: SingleTargetCache$outboundSchema.optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ClickCommand$ { /** @deprecated use `ClickCommand$inboundSchema` instead. */ export const inboundSchema = ClickCommand$inboundSchema; /** @deprecated use `ClickCommand$outboundSchema` instead. */ export const outboundSchema = ClickCommand$outboundSchema; /** @deprecated use `ClickCommand$Outbound` instead. */ export type Outbound = ClickCommand$Outbound; }