/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; /** * css pixel bounding box */ export type BoundingBox = { x?: number | undefined; y?: number | undefined; width: number; height: number; }; export const TargetSource = { Ai: "AI", AiHealed: "AI_HEALED", ClickToFind: "CLICK_TO_FIND", XyPercent: "XY_PERCENT", Recording: "RECORDING", UserCssSelector: "USER_CSS_SELECTOR", HeuristicHealed: "HEURISTIC_HEALED", } as const; export type TargetSource = ClosedEnum; /** * DEPRECATED: new a11y cache is stored in DB and resolved into the 'cache' field */ export type A11yTargetWithCache = { id: number; dataMomenticId?: number | undefined; selector?: string | undefined; generatedSelectors?: Array | undefined; role?: string | undefined; name?: string | undefined; numChildren?: number | undefined; content?: string | undefined; pathFromRoot?: string | undefined; serializedForm?: string | undefined; nodeOnlySerializedForm?: string | undefined; /** * pruned html including 1 neighbor and 1 layer of children. value for text inputs pruned. */ serializedHtml?: string | undefined; /** * outerHtml of the element without any children. value for text inputs pruned. */ nodeOnlySerializedHtml?: string | undefined; screenshotUrl?: string | undefined; /** * css pixel bounding box */ boundingBox?: BoundingBox | undefined; /** * the description that generated this cache */ inputDescription?: string | undefined; targetSource?: TargetSource | undefined; targetUpdateTime?: string | undefined; }; /** @internal */ export const BoundingBox$inboundSchema: z.ZodType< BoundingBox, z.ZodTypeDef, unknown > = z.object({ x: z.number().optional(), y: z.number().optional(), width: z.number(), height: z.number(), }); /** @internal */ export type BoundingBox$Outbound = { x?: number | undefined; y?: number | undefined; width: number; height: number; }; /** @internal */ export const BoundingBox$outboundSchema: z.ZodType< BoundingBox$Outbound, z.ZodTypeDef, BoundingBox > = z.object({ x: z.number().optional(), y: z.number().optional(), width: z.number(), height: z.number(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace BoundingBox$ { /** @deprecated use `BoundingBox$inboundSchema` instead. */ export const inboundSchema = BoundingBox$inboundSchema; /** @deprecated use `BoundingBox$outboundSchema` instead. */ export const outboundSchema = BoundingBox$outboundSchema; /** @deprecated use `BoundingBox$Outbound` instead. */ export type Outbound = BoundingBox$Outbound; } /** @internal */ export const TargetSource$inboundSchema: z.ZodNativeEnum = z.nativeEnum(TargetSource); /** @internal */ export const TargetSource$outboundSchema: z.ZodNativeEnum = TargetSource$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TargetSource$ { /** @deprecated use `TargetSource$inboundSchema` instead. */ export const inboundSchema = TargetSource$inboundSchema; /** @deprecated use `TargetSource$outboundSchema` instead. */ export const outboundSchema = TargetSource$outboundSchema; } /** @internal */ export const A11yTargetWithCache$inboundSchema: z.ZodType< A11yTargetWithCache, z.ZodTypeDef, unknown > = z.object({ id: z.number().int(), dataMomenticId: z.number().int().optional(), selector: z.string().optional(), generatedSelectors: z.array(z.string()).optional(), role: z.string().optional(), name: z.string().optional(), numChildren: z.number().optional(), content: z.string().optional(), pathFromRoot: z.string().optional(), serializedForm: z.string().optional(), nodeOnlySerializedForm: z.string().optional(), serializedHtml: z.string().optional(), nodeOnlySerializedHtml: z.string().optional(), screenshotUrl: z.string().optional(), boundingBox: z.lazy(() => BoundingBox$inboundSchema).optional(), inputDescription: z.string().optional(), targetSource: TargetSource$inboundSchema.optional(), targetUpdateTime: z.string().optional(), }); /** @internal */ export type A11yTargetWithCache$Outbound = { id: number; dataMomenticId?: number | undefined; selector?: string | undefined; generatedSelectors?: Array | undefined; role?: string | undefined; name?: string | undefined; numChildren?: number | undefined; content?: string | undefined; pathFromRoot?: string | undefined; serializedForm?: string | undefined; nodeOnlySerializedForm?: string | undefined; serializedHtml?: string | undefined; nodeOnlySerializedHtml?: string | undefined; screenshotUrl?: string | undefined; boundingBox?: BoundingBox$Outbound | undefined; inputDescription?: string | undefined; targetSource?: string | undefined; targetUpdateTime?: string | undefined; }; /** @internal */ export const A11yTargetWithCache$outboundSchema: z.ZodType< A11yTargetWithCache$Outbound, z.ZodTypeDef, A11yTargetWithCache > = z.object({ id: z.number().int(), dataMomenticId: z.number().int().optional(), selector: z.string().optional(), generatedSelectors: z.array(z.string()).optional(), role: z.string().optional(), name: z.string().optional(), numChildren: z.number().optional(), content: z.string().optional(), pathFromRoot: z.string().optional(), serializedForm: z.string().optional(), nodeOnlySerializedForm: z.string().optional(), serializedHtml: z.string().optional(), nodeOnlySerializedHtml: z.string().optional(), screenshotUrl: z.string().optional(), boundingBox: z.lazy(() => BoundingBox$outboundSchema).optional(), inputDescription: z.string().optional(), targetSource: TargetSource$outboundSchema.optional(), targetUpdateTime: z.string().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace A11yTargetWithCache$ { /** @deprecated use `A11yTargetWithCache$inboundSchema` instead. */ export const inboundSchema = A11yTargetWithCache$inboundSchema; /** @deprecated use `A11yTargetWithCache$outboundSchema` instead. */ export const outboundSchema = A11yTargetWithCache$outboundSchema; /** @deprecated use `A11yTargetWithCache$Outbound` instead. */ export type Outbound = A11yTargetWithCache$Outbound; }