/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { AIAssertionCommand, AIAssertionCommand$inboundSchema, AIAssertionCommand$Outbound, AIAssertionCommand$outboundSchema, } from "./aiassertioncommand.js"; import { AIExtractCommand, AIExtractCommand$inboundSchema, AIExtractCommand$Outbound, AIExtractCommand$outboundSchema, } from "./aiextractcommand.js"; import { AIWaitCommand, AIWaitCommand$inboundSchema, AIWaitCommand$Outbound, AIWaitCommand$outboundSchema, } from "./aiwaitcommand.js"; import { AuthLoadCommand, AuthLoadCommand$inboundSchema, AuthLoadCommand$Outbound, AuthLoadCommand$outboundSchema, } from "./authloadcommand.js"; import { AuthSaveCommand, AuthSaveCommand$inboundSchema, AuthSaveCommand$Outbound, AuthSaveCommand$outboundSchema, } from "./authsavecommand.js"; import { BlurCommand, BlurCommand$inboundSchema, BlurCommand$Outbound, BlurCommand$outboundSchema, } from "./blurcommand.js"; import { CaptchaCommand, CaptchaCommand$inboundSchema, CaptchaCommand$Outbound, CaptchaCommand$outboundSchema, } from "./captchacommand.js"; import { ClickCommand, ClickCommand$inboundSchema, ClickCommand$Outbound, ClickCommand$outboundSchema, } from "./clickcommand.js"; import { CookieCommand, CookieCommand$inboundSchema, CookieCommand$Outbound, CookieCommand$outboundSchema, } from "./cookiecommand.js"; import { DialogCommand, DialogCommand$inboundSchema, DialogCommand$Outbound, DialogCommand$outboundSchema, } from "./dialogcommand.js"; import { DragCommand, DragCommand$inboundSchema, DragCommand$Outbound, DragCommand$outboundSchema, } from "./dragcommand.js"; import { ElementAssertionCommand, ElementAssertionCommand$inboundSchema, ElementAssertionCommand$Outbound, ElementAssertionCommand$outboundSchema, } from "./elementassertioncommand.js"; import { FileUploadCommand, FileUploadCommand$inboundSchema, FileUploadCommand$Outbound, FileUploadCommand$outboundSchema, } from "./fileuploadcommand.js"; import { FocusCommand, FocusCommand$inboundSchema, FocusCommand$Outbound, FocusCommand$outboundSchema, } from "./focuscommand.js"; import { GoBackCommand, GoBackCommand$inboundSchema, GoBackCommand$Outbound, GoBackCommand$outboundSchema, } from "./gobackcommand.js"; import { GoForwardCommand, GoForwardCommand$inboundSchema, GoForwardCommand$Outbound, GoForwardCommand$outboundSchema, } from "./goforwardcommand.js"; import { GraphQLRequestCommand, GraphQLRequestCommand$inboundSchema, GraphQLRequestCommand$Outbound, GraphQLRequestCommand$outboundSchema, } from "./graphqlrequestcommand.js"; import { HoverCommand, HoverCommand$inboundSchema, HoverCommand$Outbound, HoverCommand$outboundSchema, } from "./hovercommand.js"; import { JavaScriptCommand, JavaScriptCommand$inboundSchema, JavaScriptCommand$Outbound, JavaScriptCommand$outboundSchema, } from "./javascriptcommand.js"; import { LocalStorageCommand, LocalStorageCommand$inboundSchema, LocalStorageCommand$Outbound, LocalStorageCommand$outboundSchema, } from "./localstoragecommand.js"; import { MouseDragCommand, MouseDragCommand$inboundSchema, MouseDragCommand$Outbound, MouseDragCommand$outboundSchema, } from "./mousedragcommand.js"; import { NavigateCommand, NavigateCommand$inboundSchema, NavigateCommand$Outbound, NavigateCommand$outboundSchema, } from "./navigatecommand.js"; import { NewTabCommand, NewTabCommand$inboundSchema, NewTabCommand$Outbound, NewTabCommand$outboundSchema, } from "./newtabcommand.js"; import { PageAssertionCommand, PageAssertionCommand$inboundSchema, PageAssertionCommand$Outbound, PageAssertionCommand$outboundSchema, } from "./pageassertioncommand.js"; import { PressCommand, PressCommand$inboundSchema, PressCommand$Outbound, PressCommand$outboundSchema, } from "./presscommand.js"; import { RefreshCommand, RefreshCommand$inboundSchema, RefreshCommand$Outbound, RefreshCommand$outboundSchema, } from "./refreshcommand.js"; import { RequestCommand, RequestCommand$inboundSchema, RequestCommand$Outbound, RequestCommand$outboundSchema, } from "./requestcommand.js"; import { ScrollDownCommand, ScrollDownCommand$inboundSchema, ScrollDownCommand$Outbound, ScrollDownCommand$outboundSchema, } from "./scrolldowncommand.js"; import { ScrollLeftCommand, ScrollLeftCommand$inboundSchema, ScrollLeftCommand$Outbound, ScrollLeftCommand$outboundSchema, } from "./scrollleftcommand.js"; import { ScrollRightCommand, ScrollRightCommand$inboundSchema, ScrollRightCommand$Outbound, ScrollRightCommand$outboundSchema, } from "./scrollrightcommand.js"; import { ScrollUpCommand, ScrollUpCommand$inboundSchema, ScrollUpCommand$Outbound, ScrollUpCommand$outboundSchema, } from "./scrollupcommand.js"; import { SelectOptionCommand, SelectOptionCommand$inboundSchema, SelectOptionCommand$Outbound, SelectOptionCommand$outboundSchema, } from "./selectoptioncommand.js"; import { SuccessCommand, SuccessCommand$inboundSchema, SuccessCommand$Outbound, SuccessCommand$outboundSchema, } from "./successcommand.js"; import { TabCommand, TabCommand$inboundSchema, TabCommand$Outbound, TabCommand$outboundSchema, } from "./tabcommand.js"; import { TypeCommand, TypeCommand$inboundSchema, TypeCommand$Outbound, TypeCommand$outboundSchema, } from "./typecommand.js"; import { VisualDiffCommand, VisualDiffCommand$inboundSchema, VisualDiffCommand$Outbound, VisualDiffCommand$outboundSchema, } from "./visualdiffcommand.js"; import { WaitCommand, WaitCommand$inboundSchema, WaitCommand$Outbound, WaitCommand$outboundSchema, } from "./waitcommand.js"; import { WaitUrlCommand, WaitUrlCommand$inboundSchema, WaitUrlCommand$Outbound, WaitUrlCommand$outboundSchema, } from "./waiturlcommand.js"; export type Command = | (AuthSaveCommand & { type: "AUTH_SAVE" }) | (GoBackCommand & { type: "GO_BACK" }) | (GoForwardCommand & { type: "GO_FORWARD" }) | (PressCommand & { type: "PRESS" }) | (WaitCommand & { type: "WAIT" }) | (SuccessCommand & { type: "SUCCESS" }) | (AuthLoadCommand & { type: "AUTH_LOAD" }) | (CookieCommand & { type: "COOKIE" }) | (DialogCommand & { type: "DIALOG" }) | (RefreshCommand & { type: "REFRESH" }) | (NavigateCommand & { type: "NAVIGATE" }) | (FileUploadCommand & { type: "FILE_UPLOAD" }) | (LocalStorageCommand & { type: "LOCAL_STORAGE" }) | (NewTabCommand & { type: "NEW_TAB" }) | (PageAssertionCommand & { type: "PAGE_CHECK" }) | (TabCommand & { type: "TAB" }) | (CaptchaCommand & { type: "CAPTCHA" }) | (WaitUrlCommand & { type: "WAIT_FOR_URL" }) | (AIAssertionCommand & { type: "AI_ASSERTION" }) | (AIWaitCommand & { type: "AI_WAIT" }) | (AIExtractCommand & { type: "AI_EXTRACT" }) | (JavaScriptCommand & { type: "JAVASCRIPT" }) | (GraphQLRequestCommand & { type: "GRAPHQL_REQUEST" }) | (HoverCommand & { type: "HOVER" }) | (RequestCommand & { type: "REQUEST" }) | (FocusCommand & { type: "FOCUS" }) | (BlurCommand & { type: "BLUR" }) | (ScrollDownCommand & { type: "SCROLL_DOWN" }) | (ScrollUpCommand & { type: "SCROLL_UP" }) | (ScrollLeftCommand & { type: "SCROLL_LEFT" }) | (ScrollRightCommand & { type: "SCROLL_RIGHT" }) | (SelectOptionCommand & { type: "SELECT_OPTION" }) | (DragCommand & { type: "DRAG" }) | (ElementAssertionCommand & { type: "ELEMENT_CHECK" }) | (VisualDiffCommand & { type: "VISUAL_DIFF" }) | (MouseDragCommand & { type: "MOUSE_DRAG" }) | (ClickCommand & { type: "CLICK" }) | (TypeCommand & { type: "TYPE" }); /** @internal */ export const Command$inboundSchema: z.ZodType = z.union([ AuthSaveCommand$inboundSchema.and( z.object({ type: z.literal("AUTH_SAVE") }).transform((v) => ({ type: v.type, })), ), GoBackCommand$inboundSchema.and( z.object({ type: z.literal("GO_BACK") }).transform((v) => ({ type: v.type, })), ), GoForwardCommand$inboundSchema.and( z.object({ type: z.literal("GO_FORWARD") }).transform((v) => ({ type: v.type, })), ), PressCommand$inboundSchema.and( z.object({ type: z.literal("PRESS") }).transform((v) => ({ type: v.type, })), ), WaitCommand$inboundSchema.and( z.object({ type: z.literal("WAIT") }).transform((v) => ({ type: v.type, })), ), SuccessCommand$inboundSchema.and( z.object({ type: z.literal("SUCCESS") }).transform((v) => ({ type: v.type, })), ), AuthLoadCommand$inboundSchema.and( z.object({ type: z.literal("AUTH_LOAD") }).transform((v) => ({ type: v.type, })), ), CookieCommand$inboundSchema.and( z.object({ type: z.literal("COOKIE") }).transform((v) => ({ type: v.type, })), ), DialogCommand$inboundSchema.and( z.object({ type: z.literal("DIALOG") }).transform((v) => ({ type: v.type, })), ), RefreshCommand$inboundSchema.and( z.object({ type: z.literal("REFRESH") }).transform((v) => ({ type: v.type, })), ), NavigateCommand$inboundSchema.and( z.object({ type: z.literal("NAVIGATE") }).transform((v) => ({ type: v.type, })), ), FileUploadCommand$inboundSchema.and( z.object({ type: z.literal("FILE_UPLOAD") }).transform((v) => ({ type: v.type, })), ), LocalStorageCommand$inboundSchema.and( z.object({ type: z.literal("LOCAL_STORAGE") }).transform((v) => ({ type: v.type, })), ), NewTabCommand$inboundSchema.and( z.object({ type: z.literal("NEW_TAB") }).transform((v) => ({ type: v.type, })), ), PageAssertionCommand$inboundSchema.and( z.object({ type: z.literal("PAGE_CHECK") }).transform((v) => ({ type: v.type, })), ), TabCommand$inboundSchema.and( z.object({ type: z.literal("TAB") }).transform((v) => ({ type: v.type })), ), CaptchaCommand$inboundSchema.and( z.object({ type: z.literal("CAPTCHA") }).transform((v) => ({ type: v.type, })), ), WaitUrlCommand$inboundSchema.and( z.object({ type: z.literal("WAIT_FOR_URL") }).transform((v) => ({ type: v.type, })), ), AIAssertionCommand$inboundSchema.and( z.object({ type: z.literal("AI_ASSERTION") }).transform((v) => ({ type: v.type, })), ), AIWaitCommand$inboundSchema.and( z.object({ type: z.literal("AI_WAIT") }).transform((v) => ({ type: v.type, })), ), AIExtractCommand$inboundSchema.and( z.object({ type: z.literal("AI_EXTRACT") }).transform((v) => ({ type: v.type, })), ), JavaScriptCommand$inboundSchema.and( z.object({ type: z.literal("JAVASCRIPT") }).transform((v) => ({ type: v.type, })), ), GraphQLRequestCommand$inboundSchema.and( z.object({ type: z.literal("GRAPHQL_REQUEST") }).transform((v) => ({ type: v.type, })), ), HoverCommand$inboundSchema.and( z.object({ type: z.literal("HOVER") }).transform((v) => ({ type: v.type, })), ), RequestCommand$inboundSchema.and( z.object({ type: z.literal("REQUEST") }).transform((v) => ({ type: v.type, })), ), FocusCommand$inboundSchema.and( z.object({ type: z.literal("FOCUS") }).transform((v) => ({ type: v.type, })), ), BlurCommand$inboundSchema.and( z.object({ type: z.literal("BLUR") }).transform((v) => ({ type: v.type, })), ), ScrollDownCommand$inboundSchema.and( z.object({ type: z.literal("SCROLL_DOWN") }).transform((v) => ({ type: v.type, })), ), ScrollUpCommand$inboundSchema.and( z.object({ type: z.literal("SCROLL_UP") }).transform((v) => ({ type: v.type, })), ), ScrollLeftCommand$inboundSchema.and( z.object({ type: z.literal("SCROLL_LEFT") }).transform((v) => ({ type: v.type, })), ), ScrollRightCommand$inboundSchema.and( z.object({ type: z.literal("SCROLL_RIGHT") }).transform((v) => ({ type: v.type, })), ), SelectOptionCommand$inboundSchema.and( z.object({ type: z.literal("SELECT_OPTION") }).transform((v) => ({ type: v.type, })), ), DragCommand$inboundSchema.and( z.object({ type: z.literal("DRAG") }).transform((v) => ({ type: v.type, })), ), ElementAssertionCommand$inboundSchema.and( z.object({ type: z.literal("ELEMENT_CHECK") }).transform((v) => ({ type: v.type, })), ), VisualDiffCommand$inboundSchema.and( z.object({ type: z.literal("VISUAL_DIFF") }).transform((v) => ({ type: v.type, })), ), MouseDragCommand$inboundSchema.and( z.object({ type: z.literal("MOUSE_DRAG") }).transform((v) => ({ type: v.type, })), ), ClickCommand$inboundSchema.and( z.object({ type: z.literal("CLICK") }).transform((v) => ({ type: v.type, })), ), TypeCommand$inboundSchema.and( z.object({ type: z.literal("TYPE") }).transform((v) => ({ type: v.type, })), ), ]); /** @internal */ export type Command$Outbound = | (AuthSaveCommand$Outbound & { type: "AUTH_SAVE" }) | (GoBackCommand$Outbound & { type: "GO_BACK" }) | (GoForwardCommand$Outbound & { type: "GO_FORWARD" }) | (PressCommand$Outbound & { type: "PRESS" }) | (WaitCommand$Outbound & { type: "WAIT" }) | (SuccessCommand$Outbound & { type: "SUCCESS" }) | (AuthLoadCommand$Outbound & { type: "AUTH_LOAD" }) | (CookieCommand$Outbound & { type: "COOKIE" }) | (DialogCommand$Outbound & { type: "DIALOG" }) | (RefreshCommand$Outbound & { type: "REFRESH" }) | (NavigateCommand$Outbound & { type: "NAVIGATE" }) | (FileUploadCommand$Outbound & { type: "FILE_UPLOAD" }) | (LocalStorageCommand$Outbound & { type: "LOCAL_STORAGE" }) | (NewTabCommand$Outbound & { type: "NEW_TAB" }) | (PageAssertionCommand$Outbound & { type: "PAGE_CHECK" }) | (TabCommand$Outbound & { type: "TAB" }) | (CaptchaCommand$Outbound & { type: "CAPTCHA" }) | (WaitUrlCommand$Outbound & { type: "WAIT_FOR_URL" }) | (AIAssertionCommand$Outbound & { type: "AI_ASSERTION" }) | (AIWaitCommand$Outbound & { type: "AI_WAIT" }) | (AIExtractCommand$Outbound & { type: "AI_EXTRACT" }) | (JavaScriptCommand$Outbound & { type: "JAVASCRIPT" }) | (GraphQLRequestCommand$Outbound & { type: "GRAPHQL_REQUEST" }) | (HoverCommand$Outbound & { type: "HOVER" }) | (RequestCommand$Outbound & { type: "REQUEST" }) | (FocusCommand$Outbound & { type: "FOCUS" }) | (BlurCommand$Outbound & { type: "BLUR" }) | (ScrollDownCommand$Outbound & { type: "SCROLL_DOWN" }) | (ScrollUpCommand$Outbound & { type: "SCROLL_UP" }) | (ScrollLeftCommand$Outbound & { type: "SCROLL_LEFT" }) | (ScrollRightCommand$Outbound & { type: "SCROLL_RIGHT" }) | (SelectOptionCommand$Outbound & { type: "SELECT_OPTION" }) | (DragCommand$Outbound & { type: "DRAG" }) | (ElementAssertionCommand$Outbound & { type: "ELEMENT_CHECK" }) | (VisualDiffCommand$Outbound & { type: "VISUAL_DIFF" }) | (MouseDragCommand$Outbound & { type: "MOUSE_DRAG" }) | (ClickCommand$Outbound & { type: "CLICK" }) | (TypeCommand$Outbound & { type: "TYPE" }); /** @internal */ export const Command$outboundSchema: z.ZodType< Command$Outbound, z.ZodTypeDef, Command > = z.union([ AuthSaveCommand$outboundSchema.and( z.object({ type: z.literal("AUTH_SAVE") }).transform((v) => ({ type: v.type, })), ), GoBackCommand$outboundSchema.and( z.object({ type: z.literal("GO_BACK") }).transform((v) => ({ type: v.type, })), ), GoForwardCommand$outboundSchema.and( z.object({ type: z.literal("GO_FORWARD") }).transform((v) => ({ type: v.type, })), ), PressCommand$outboundSchema.and( z.object({ type: z.literal("PRESS") }).transform((v) => ({ type: v.type })), ), WaitCommand$outboundSchema.and( z.object({ type: z.literal("WAIT") }).transform((v) => ({ type: v.type })), ), SuccessCommand$outboundSchema.and( z.object({ type: z.literal("SUCCESS") }).transform((v) => ({ type: v.type, })), ), AuthLoadCommand$outboundSchema.and( z.object({ type: z.literal("AUTH_LOAD") }).transform((v) => ({ type: v.type, })), ), CookieCommand$outboundSchema.and( z.object({ type: z.literal("COOKIE") }).transform((v) => ({ type: v.type, })), ), DialogCommand$outboundSchema.and( z.object({ type: z.literal("DIALOG") }).transform((v) => ({ type: v.type, })), ), RefreshCommand$outboundSchema.and( z.object({ type: z.literal("REFRESH") }).transform((v) => ({ type: v.type, })), ), NavigateCommand$outboundSchema.and( z.object({ type: z.literal("NAVIGATE") }).transform((v) => ({ type: v.type, })), ), FileUploadCommand$outboundSchema.and( z.object({ type: z.literal("FILE_UPLOAD") }).transform((v) => ({ type: v.type, })), ), LocalStorageCommand$outboundSchema.and( z.object({ type: z.literal("LOCAL_STORAGE") }).transform((v) => ({ type: v.type, })), ), NewTabCommand$outboundSchema.and( z.object({ type: z.literal("NEW_TAB") }).transform((v) => ({ type: v.type, })), ), PageAssertionCommand$outboundSchema.and( z.object({ type: z.literal("PAGE_CHECK") }).transform((v) => ({ type: v.type, })), ), TabCommand$outboundSchema.and( z.object({ type: z.literal("TAB") }).transform((v) => ({ type: v.type })), ), CaptchaCommand$outboundSchema.and( z.object({ type: z.literal("CAPTCHA") }).transform((v) => ({ type: v.type, })), ), WaitUrlCommand$outboundSchema.and( z.object({ type: z.literal("WAIT_FOR_URL") }).transform((v) => ({ type: v.type, })), ), AIAssertionCommand$outboundSchema.and( z.object({ type: z.literal("AI_ASSERTION") }).transform((v) => ({ type: v.type, })), ), AIWaitCommand$outboundSchema.and( z.object({ type: z.literal("AI_WAIT") }).transform((v) => ({ type: v.type, })), ), AIExtractCommand$outboundSchema.and( z.object({ type: z.literal("AI_EXTRACT") }).transform((v) => ({ type: v.type, })), ), JavaScriptCommand$outboundSchema.and( z.object({ type: z.literal("JAVASCRIPT") }).transform((v) => ({ type: v.type, })), ), GraphQLRequestCommand$outboundSchema.and( z.object({ type: z.literal("GRAPHQL_REQUEST") }).transform((v) => ({ type: v.type, })), ), HoverCommand$outboundSchema.and( z.object({ type: z.literal("HOVER") }).transform((v) => ({ type: v.type })), ), RequestCommand$outboundSchema.and( z.object({ type: z.literal("REQUEST") }).transform((v) => ({ type: v.type, })), ), FocusCommand$outboundSchema.and( z.object({ type: z.literal("FOCUS") }).transform((v) => ({ type: v.type })), ), BlurCommand$outboundSchema.and( z.object({ type: z.literal("BLUR") }).transform((v) => ({ type: v.type })), ), ScrollDownCommand$outboundSchema.and( z.object({ type: z.literal("SCROLL_DOWN") }).transform((v) => ({ type: v.type, })), ), ScrollUpCommand$outboundSchema.and( z.object({ type: z.literal("SCROLL_UP") }).transform((v) => ({ type: v.type, })), ), ScrollLeftCommand$outboundSchema.and( z.object({ type: z.literal("SCROLL_LEFT") }).transform((v) => ({ type: v.type, })), ), ScrollRightCommand$outboundSchema.and( z.object({ type: z.literal("SCROLL_RIGHT") }).transform((v) => ({ type: v.type, })), ), SelectOptionCommand$outboundSchema.and( z.object({ type: z.literal("SELECT_OPTION") }).transform((v) => ({ type: v.type, })), ), DragCommand$outboundSchema.and( z.object({ type: z.literal("DRAG") }).transform((v) => ({ type: v.type })), ), ElementAssertionCommand$outboundSchema.and( z.object({ type: z.literal("ELEMENT_CHECK") }).transform((v) => ({ type: v.type, })), ), VisualDiffCommand$outboundSchema.and( z.object({ type: z.literal("VISUAL_DIFF") }).transform((v) => ({ type: v.type, })), ), MouseDragCommand$outboundSchema.and( z.object({ type: z.literal("MOUSE_DRAG") }).transform((v) => ({ type: v.type, })), ), ClickCommand$outboundSchema.and( z.object({ type: z.literal("CLICK") }).transform((v) => ({ type: v.type })), ), TypeCommand$outboundSchema.and( z.object({ type: z.literal("TYPE") }).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 Command$ { /** @deprecated use `Command$inboundSchema` instead. */ export const inboundSchema = Command$inboundSchema; /** @deprecated use `Command$outboundSchema` instead. */ export const outboundSchema = Command$outboundSchema; /** @deprecated use `Command$Outbound` instead. */ export type Outbound = Command$Outbound; }