/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { A11yTargetWithCache, A11yTargetWithCache$inboundSchema, A11yTargetWithCache$Outbound, A11yTargetWithCache$outboundSchema, } from "./a11ytargetwithcache.js"; import { ElementTarget, ElementTarget$inboundSchema, ElementTarget$Outbound, ElementTarget$outboundSchema, } from "./elementtarget.js"; export type Cache = { fromTarget?: A11yTargetWithCache | undefined; toTarget?: A11yTargetWithCache | undefined; }; export type DragCommand = { 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?: "DRAG" | undefined; fromTarget: ElementTarget; toTarget: ElementTarget; /** * Seconds to hover the object before dropping */ hoverSeconds?: number | undefined; cache?: Cache | undefined; }; /** @internal */ export const Cache$inboundSchema: z.ZodType = z .object({ fromTarget: A11yTargetWithCache$inboundSchema.optional(), toTarget: A11yTargetWithCache$inboundSchema.optional(), }); /** @internal */ export type Cache$Outbound = { fromTarget?: A11yTargetWithCache$Outbound | undefined; toTarget?: A11yTargetWithCache$Outbound | undefined; }; /** @internal */ export const Cache$outboundSchema: z.ZodType< Cache$Outbound, z.ZodTypeDef, Cache > = z.object({ fromTarget: A11yTargetWithCache$outboundSchema.optional(), toTarget: A11yTargetWithCache$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 Cache$ { /** @deprecated use `Cache$inboundSchema` instead. */ export const inboundSchema = Cache$inboundSchema; /** @deprecated use `Cache$outboundSchema` instead. */ export const outboundSchema = Cache$outboundSchema; /** @deprecated use `Cache$Outbound` instead. */ export type Outbound = Cache$Outbound; } /** @internal */ export const DragCommand$inboundSchema: z.ZodType< DragCommand, 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("DRAG").optional(), fromTarget: ElementTarget$inboundSchema, toTarget: ElementTarget$inboundSchema, hoverSeconds: z.number().optional(), cache: z.lazy(() => Cache$inboundSchema).optional(), }); /** @internal */ export type DragCommand$Outbound = { thoughts?: string | undefined; id: string; useSelector?: boolean | undefined; force?: boolean | undefined; disableCache?: boolean | undefined; iframeUrl?: string | undefined; type: "DRAG"; fromTarget: ElementTarget$Outbound; toTarget: ElementTarget$Outbound; hoverSeconds?: number | undefined; cache?: Cache$Outbound | undefined; }; /** @internal */ export const DragCommand$outboundSchema: z.ZodType< DragCommand$Outbound, z.ZodTypeDef, DragCommand > = 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("DRAG").default("DRAG" as const), fromTarget: ElementTarget$outboundSchema, toTarget: ElementTarget$outboundSchema, hoverSeconds: z.number().optional(), cache: z.lazy(() => Cache$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 DragCommand$ { /** @deprecated use `DragCommand$inboundSchema` instead. */ export const inboundSchema = DragCommand$inboundSchema; /** @deprecated use `DragCommand$outboundSchema` instead. */ export const outboundSchema = DragCommand$outboundSchema; /** @deprecated use `DragCommand$Outbound` instead. */ export type Outbound = DragCommand$Outbound; }