/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { Steps, Steps$inboundSchema, Steps$Outbound, Steps$outboundSchema, } from "./steps.js"; export type Viewport = { width: number; height: number; }; export const BrowserType = { Chromium: "Chromium", GoogleChrome: "Google Chrome", } as const; export type BrowserType = ClosedEnum; export type BasicAuthorization = { username: string; password: string; }; export type Advanced = { disableAICaching?: boolean | undefined; viewport?: Viewport | undefined; browserType?: BrowserType | undefined; pageLoadTimeoutMs?: number | undefined; smartWaitingTimeoutMs?: number | undefined; /** * HTTP headers to be sent on every request */ extraHeaders?: { [k: string]: string } | undefined; userAgent?: string | undefined; basicAuthorization?: BasicAuthorization | undefined; localChromeExtensionPaths?: Array | undefined; }; export type QueueStepsRequest = { testName: string; baseUrl: string; advanced: Advanced; environment?: { [k: string]: any } | undefined; steps: Array; schemaVersion?: string | undefined; }; /** @internal */ export const Viewport$inboundSchema: z.ZodType< Viewport, z.ZodTypeDef, unknown > = z.object({ width: z.number(), height: z.number(), }); /** @internal */ export type Viewport$Outbound = { width: number; height: number; }; /** @internal */ export const Viewport$outboundSchema: z.ZodType< Viewport$Outbound, z.ZodTypeDef, Viewport > = z.object({ 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 Viewport$ { /** @deprecated use `Viewport$inboundSchema` instead. */ export const inboundSchema = Viewport$inboundSchema; /** @deprecated use `Viewport$outboundSchema` instead. */ export const outboundSchema = Viewport$outboundSchema; /** @deprecated use `Viewport$Outbound` instead. */ export type Outbound = Viewport$Outbound; } /** @internal */ export const BrowserType$inboundSchema: z.ZodNativeEnum = z .nativeEnum(BrowserType); /** @internal */ export const BrowserType$outboundSchema: z.ZodNativeEnum = BrowserType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace BrowserType$ { /** @deprecated use `BrowserType$inboundSchema` instead. */ export const inboundSchema = BrowserType$inboundSchema; /** @deprecated use `BrowserType$outboundSchema` instead. */ export const outboundSchema = BrowserType$outboundSchema; } /** @internal */ export const BasicAuthorization$inboundSchema: z.ZodType< BasicAuthorization, z.ZodTypeDef, unknown > = z.object({ username: z.string(), password: z.string(), }); /** @internal */ export type BasicAuthorization$Outbound = { username: string; password: string; }; /** @internal */ export const BasicAuthorization$outboundSchema: z.ZodType< BasicAuthorization$Outbound, z.ZodTypeDef, BasicAuthorization > = z.object({ username: z.string(), password: z.string(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace BasicAuthorization$ { /** @deprecated use `BasicAuthorization$inboundSchema` instead. */ export const inboundSchema = BasicAuthorization$inboundSchema; /** @deprecated use `BasicAuthorization$outboundSchema` instead. */ export const outboundSchema = BasicAuthorization$outboundSchema; /** @deprecated use `BasicAuthorization$Outbound` instead. */ export type Outbound = BasicAuthorization$Outbound; } /** @internal */ export const Advanced$inboundSchema: z.ZodType< Advanced, z.ZodTypeDef, unknown > = z.object({ disableAICaching: z.boolean().default(false), viewport: z.lazy(() => Viewport$inboundSchema).optional(), browserType: BrowserType$inboundSchema.default("Chromium"), pageLoadTimeoutMs: z.number().optional(), smartWaitingTimeoutMs: z.number().optional(), extraHeaders: z.record(z.string()).optional(), userAgent: z.string().optional(), basicAuthorization: z.lazy(() => BasicAuthorization$inboundSchema).optional(), localChromeExtensionPaths: z.array(z.string()).optional(), }); /** @internal */ export type Advanced$Outbound = { disableAICaching: boolean; viewport?: Viewport$Outbound | undefined; browserType: string; pageLoadTimeoutMs?: number | undefined; smartWaitingTimeoutMs?: number | undefined; extraHeaders?: { [k: string]: string } | undefined; userAgent?: string | undefined; basicAuthorization?: BasicAuthorization$Outbound | undefined; localChromeExtensionPaths?: Array | undefined; }; /** @internal */ export const Advanced$outboundSchema: z.ZodType< Advanced$Outbound, z.ZodTypeDef, Advanced > = z.object({ disableAICaching: z.boolean().default(false), viewport: z.lazy(() => Viewport$outboundSchema).optional(), browserType: BrowserType$outboundSchema.default("Chromium"), pageLoadTimeoutMs: z.number().optional(), smartWaitingTimeoutMs: z.number().optional(), extraHeaders: z.record(z.string()).optional(), userAgent: z.string().optional(), basicAuthorization: z.lazy(() => BasicAuthorization$outboundSchema) .optional(), localChromeExtensionPaths: z.array(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 Advanced$ { /** @deprecated use `Advanced$inboundSchema` instead. */ export const inboundSchema = Advanced$inboundSchema; /** @deprecated use `Advanced$outboundSchema` instead. */ export const outboundSchema = Advanced$outboundSchema; /** @deprecated use `Advanced$Outbound` instead. */ export type Outbound = Advanced$Outbound; } /** @internal */ export const QueueStepsRequest$inboundSchema: z.ZodType< QueueStepsRequest, z.ZodTypeDef, unknown > = z.object({ testName: z.string(), baseUrl: z.string(), advanced: z.lazy(() => Advanced$inboundSchema), environment: z.record(z.any()).optional(), steps: z.array(Steps$inboundSchema), schemaVersion: z.string().optional(), }); /** @internal */ export type QueueStepsRequest$Outbound = { testName: string; baseUrl: string; advanced: Advanced$Outbound; environment?: { [k: string]: any } | undefined; steps: Array; schemaVersion?: string | undefined; }; /** @internal */ export const QueueStepsRequest$outboundSchema: z.ZodType< QueueStepsRequest$Outbound, z.ZodTypeDef, QueueStepsRequest > = z.object({ testName: z.string(), baseUrl: z.string(), advanced: z.lazy(() => Advanced$outboundSchema), environment: z.record(z.any()).optional(), steps: z.array(Steps$outboundSchema), schemaVersion: 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 QueueStepsRequest$ { /** @deprecated use `QueueStepsRequest$inboundSchema` instead. */ export const inboundSchema = QueueStepsRequest$inboundSchema; /** @deprecated use `QueueStepsRequest$outboundSchema` instead. */ export const outboundSchema = QueueStepsRequest$outboundSchema; /** @deprecated use `QueueStepsRequest$Outbound` instead. */ export type Outbound = QueueStepsRequest$Outbound; }