/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { ConsoleLog, ConsoleLog$inboundSchema, ConsoleLog$Outbound, ConsoleLog$outboundSchema, } from "./consolelog.js"; export type Cookies = { name: string; value: string; path?: string | undefined; domain?: string | undefined; expires?: string | undefined; httpOnly?: boolean | undefined; secure?: boolean | undefined; comment?: string | undefined; }; export type Headers = { name: string; value: string; comment?: string | undefined; }; export type QueryString = { name: string; value: string; comment?: string | undefined; }; export type Params = { name: string; value?: string | undefined; fileName?: string | undefined; contentType?: string | undefined; comment?: string | undefined; }; export type PostData = { mimeType: string; params: Array; text: string; comment?: string | undefined; }; export type Request = { method: string; url: string; httpVersion?: string | undefined; cookies: Array; headers: Array; queryString: Array; postData?: PostData | undefined; headersSize?: number | undefined; bodySize?: number | undefined; comment?: string | undefined; }; export type DebugDataCookies = { name: string; value: string; path?: string | undefined; domain?: string | undefined; expires?: string | undefined; httpOnly?: boolean | undefined; secure?: boolean | undefined; comment?: string | undefined; }; export type DebugDataHeaders = { name: string; value: string; comment?: string | undefined; }; export type Content = { size?: number | undefined; compression?: number | undefined; mimeType?: string | undefined; text?: string | undefined; encoding?: string | undefined; comment?: string | undefined; }; export type Response = { status: number; statusText: string; httpVersion?: string | undefined; cookies: Array; headers: Array; content: Content; redirectURL?: string | undefined; headersSize?: number | undefined; bodySize?: number | undefined; comment?: string | undefined; }; export type BeforeRequest = { expires?: string | undefined; lastAccess: string; eTag: string; hitCount: number; comment?: string | undefined; }; export type AfterRequest = { expires?: string | undefined; lastAccess: string; eTag: string; hitCount: number; comment?: string | undefined; }; export type DebugDataCache = { beforeRequest?: BeforeRequest | undefined; afterRequest?: AfterRequest | undefined; comment?: string | undefined; }; export type Timings = { blocked?: number | undefined; dns?: number | undefined; connect?: number | undefined; send: number; wait: number; receive: number; ssl?: number | undefined; comment?: string | undefined; }; export type NetworkEntriesPerPage = { pageref?: string | undefined; startedDateTime: string; time?: number | undefined; request: Request; response?: Response | undefined; cache?: DebugDataCache | undefined; timings: Timings; serverIPAddress?: string | undefined; connection?: string | undefined; comment?: string | undefined; }; export type DebugData = { logsPerPage: Array>; networkEntriesPerPage?: | Array<{ [k: string]: NetworkEntriesPerPage }> | undefined; }; /** @internal */ export const Cookies$inboundSchema: z.ZodType = z.object({ name: z.string(), value: z.string(), path: z.string().optional(), domain: z.string().optional(), expires: z.string().optional(), httpOnly: z.boolean().optional(), secure: z.boolean().optional(), comment: z.string().optional(), }); /** @internal */ export type Cookies$Outbound = { name: string; value: string; path?: string | undefined; domain?: string | undefined; expires?: string | undefined; httpOnly?: boolean | undefined; secure?: boolean | undefined; comment?: string | undefined; }; /** @internal */ export const Cookies$outboundSchema: z.ZodType< Cookies$Outbound, z.ZodTypeDef, Cookies > = z.object({ name: z.string(), value: z.string(), path: z.string().optional(), domain: z.string().optional(), expires: z.string().optional(), httpOnly: z.boolean().optional(), secure: z.boolean().optional(), comment: 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 Cookies$ { /** @deprecated use `Cookies$inboundSchema` instead. */ export const inboundSchema = Cookies$inboundSchema; /** @deprecated use `Cookies$outboundSchema` instead. */ export const outboundSchema = Cookies$outboundSchema; /** @deprecated use `Cookies$Outbound` instead. */ export type Outbound = Cookies$Outbound; } /** @internal */ export const Headers$inboundSchema: z.ZodType = z.object({ name: z.string(), value: z.string(), comment: z.string().optional(), }); /** @internal */ export type Headers$Outbound = { name: string; value: string; comment?: string | undefined; }; /** @internal */ export const Headers$outboundSchema: z.ZodType< Headers$Outbound, z.ZodTypeDef, Headers > = z.object({ name: z.string(), value: z.string(), comment: 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 Headers$ { /** @deprecated use `Headers$inboundSchema` instead. */ export const inboundSchema = Headers$inboundSchema; /** @deprecated use `Headers$outboundSchema` instead. */ export const outboundSchema = Headers$outboundSchema; /** @deprecated use `Headers$Outbound` instead. */ export type Outbound = Headers$Outbound; } /** @internal */ export const QueryString$inboundSchema: z.ZodType< QueryString, z.ZodTypeDef, unknown > = z.object({ name: z.string(), value: z.string(), comment: z.string().optional(), }); /** @internal */ export type QueryString$Outbound = { name: string; value: string; comment?: string | undefined; }; /** @internal */ export const QueryString$outboundSchema: z.ZodType< QueryString$Outbound, z.ZodTypeDef, QueryString > = z.object({ name: z.string(), value: z.string(), comment: 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 QueryString$ { /** @deprecated use `QueryString$inboundSchema` instead. */ export const inboundSchema = QueryString$inboundSchema; /** @deprecated use `QueryString$outboundSchema` instead. */ export const outboundSchema = QueryString$outboundSchema; /** @deprecated use `QueryString$Outbound` instead. */ export type Outbound = QueryString$Outbound; } /** @internal */ export const Params$inboundSchema: z.ZodType = z .object({ name: z.string(), value: z.string().optional(), fileName: z.string().optional(), contentType: z.string().optional(), comment: z.string().optional(), }); /** @internal */ export type Params$Outbound = { name: string; value?: string | undefined; fileName?: string | undefined; contentType?: string | undefined; comment?: string | undefined; }; /** @internal */ export const Params$outboundSchema: z.ZodType< Params$Outbound, z.ZodTypeDef, Params > = z.object({ name: z.string(), value: z.string().optional(), fileName: z.string().optional(), contentType: z.string().optional(), comment: 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 Params$ { /** @deprecated use `Params$inboundSchema` instead. */ export const inboundSchema = Params$inboundSchema; /** @deprecated use `Params$outboundSchema` instead. */ export const outboundSchema = Params$outboundSchema; /** @deprecated use `Params$Outbound` instead. */ export type Outbound = Params$Outbound; } /** @internal */ export const PostData$inboundSchema: z.ZodType< PostData, z.ZodTypeDef, unknown > = z.object({ mimeType: z.string(), params: z.array(z.lazy(() => Params$inboundSchema)), text: z.string(), comment: z.string().optional(), }); /** @internal */ export type PostData$Outbound = { mimeType: string; params: Array; text: string; comment?: string | undefined; }; /** @internal */ export const PostData$outboundSchema: z.ZodType< PostData$Outbound, z.ZodTypeDef, PostData > = z.object({ mimeType: z.string(), params: z.array(z.lazy(() => Params$outboundSchema)), text: z.string(), comment: 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 PostData$ { /** @deprecated use `PostData$inboundSchema` instead. */ export const inboundSchema = PostData$inboundSchema; /** @deprecated use `PostData$outboundSchema` instead. */ export const outboundSchema = PostData$outboundSchema; /** @deprecated use `PostData$Outbound` instead. */ export type Outbound = PostData$Outbound; } /** @internal */ export const Request$inboundSchema: z.ZodType = z.object({ method: z.string(), url: z.string(), httpVersion: z.string().optional(), cookies: z.array(z.lazy(() => Cookies$inboundSchema)), headers: z.array(z.lazy(() => Headers$inboundSchema)), queryString: z.array(z.lazy(() => QueryString$inboundSchema)), postData: z.lazy(() => PostData$inboundSchema).optional(), headersSize: z.number().optional(), bodySize: z.number().optional(), comment: z.string().optional(), }); /** @internal */ export type Request$Outbound = { method: string; url: string; httpVersion?: string | undefined; cookies: Array; headers: Array; queryString: Array; postData?: PostData$Outbound | undefined; headersSize?: number | undefined; bodySize?: number | undefined; comment?: string | undefined; }; /** @internal */ export const Request$outboundSchema: z.ZodType< Request$Outbound, z.ZodTypeDef, Request > = z.object({ method: z.string(), url: z.string(), httpVersion: z.string().optional(), cookies: z.array(z.lazy(() => Cookies$outboundSchema)), headers: z.array(z.lazy(() => Headers$outboundSchema)), queryString: z.array(z.lazy(() => QueryString$outboundSchema)), postData: z.lazy(() => PostData$outboundSchema).optional(), headersSize: z.number().optional(), bodySize: z.number().optional(), comment: 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 Request$ { /** @deprecated use `Request$inboundSchema` instead. */ export const inboundSchema = Request$inboundSchema; /** @deprecated use `Request$outboundSchema` instead. */ export const outboundSchema = Request$outboundSchema; /** @deprecated use `Request$Outbound` instead. */ export type Outbound = Request$Outbound; } /** @internal */ export const DebugDataCookies$inboundSchema: z.ZodType< DebugDataCookies, z.ZodTypeDef, unknown > = z.object({ name: z.string(), value: z.string(), path: z.string().optional(), domain: z.string().optional(), expires: z.string().optional(), httpOnly: z.boolean().optional(), secure: z.boolean().optional(), comment: z.string().optional(), }); /** @internal */ export type DebugDataCookies$Outbound = { name: string; value: string; path?: string | undefined; domain?: string | undefined; expires?: string | undefined; httpOnly?: boolean | undefined; secure?: boolean | undefined; comment?: string | undefined; }; /** @internal */ export const DebugDataCookies$outboundSchema: z.ZodType< DebugDataCookies$Outbound, z.ZodTypeDef, DebugDataCookies > = z.object({ name: z.string(), value: z.string(), path: z.string().optional(), domain: z.string().optional(), expires: z.string().optional(), httpOnly: z.boolean().optional(), secure: z.boolean().optional(), comment: 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 DebugDataCookies$ { /** @deprecated use `DebugDataCookies$inboundSchema` instead. */ export const inboundSchema = DebugDataCookies$inboundSchema; /** @deprecated use `DebugDataCookies$outboundSchema` instead. */ export const outboundSchema = DebugDataCookies$outboundSchema; /** @deprecated use `DebugDataCookies$Outbound` instead. */ export type Outbound = DebugDataCookies$Outbound; } /** @internal */ export const DebugDataHeaders$inboundSchema: z.ZodType< DebugDataHeaders, z.ZodTypeDef, unknown > = z.object({ name: z.string(), value: z.string(), comment: z.string().optional(), }); /** @internal */ export type DebugDataHeaders$Outbound = { name: string; value: string; comment?: string | undefined; }; /** @internal */ export const DebugDataHeaders$outboundSchema: z.ZodType< DebugDataHeaders$Outbound, z.ZodTypeDef, DebugDataHeaders > = z.object({ name: z.string(), value: z.string(), comment: 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 DebugDataHeaders$ { /** @deprecated use `DebugDataHeaders$inboundSchema` instead. */ export const inboundSchema = DebugDataHeaders$inboundSchema; /** @deprecated use `DebugDataHeaders$outboundSchema` instead. */ export const outboundSchema = DebugDataHeaders$outboundSchema; /** @deprecated use `DebugDataHeaders$Outbound` instead. */ export type Outbound = DebugDataHeaders$Outbound; } /** @internal */ export const Content$inboundSchema: z.ZodType = z.object({ size: z.number().optional(), compression: z.number().optional(), mimeType: z.string().optional(), text: z.string().optional(), encoding: z.string().optional(), comment: z.string().optional(), }); /** @internal */ export type Content$Outbound = { size?: number | undefined; compression?: number | undefined; mimeType?: string | undefined; text?: string | undefined; encoding?: string | undefined; comment?: string | undefined; }; /** @internal */ export const Content$outboundSchema: z.ZodType< Content$Outbound, z.ZodTypeDef, Content > = z.object({ size: z.number().optional(), compression: z.number().optional(), mimeType: z.string().optional(), text: z.string().optional(), encoding: z.string().optional(), comment: 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 Content$ { /** @deprecated use `Content$inboundSchema` instead. */ export const inboundSchema = Content$inboundSchema; /** @deprecated use `Content$outboundSchema` instead. */ export const outboundSchema = Content$outboundSchema; /** @deprecated use `Content$Outbound` instead. */ export type Outbound = Content$Outbound; } /** @internal */ export const Response$inboundSchema: z.ZodType< Response, z.ZodTypeDef, unknown > = z.object({ status: z.number(), statusText: z.string(), httpVersion: z.string().optional(), cookies: z.array(z.lazy(() => DebugDataCookies$inboundSchema)), headers: z.array(z.lazy(() => DebugDataHeaders$inboundSchema)), content: z.lazy(() => Content$inboundSchema), redirectURL: z.string().optional(), headersSize: z.number().optional(), bodySize: z.number().optional(), comment: z.string().optional(), }); /** @internal */ export type Response$Outbound = { status: number; statusText: string; httpVersion?: string | undefined; cookies: Array; headers: Array; content: Content$Outbound; redirectURL?: string | undefined; headersSize?: number | undefined; bodySize?: number | undefined; comment?: string | undefined; }; /** @internal */ export const Response$outboundSchema: z.ZodType< Response$Outbound, z.ZodTypeDef, Response > = z.object({ status: z.number(), statusText: z.string(), httpVersion: z.string().optional(), cookies: z.array(z.lazy(() => DebugDataCookies$outboundSchema)), headers: z.array(z.lazy(() => DebugDataHeaders$outboundSchema)), content: z.lazy(() => Content$outboundSchema), redirectURL: z.string().optional(), headersSize: z.number().optional(), bodySize: z.number().optional(), comment: 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 Response$ { /** @deprecated use `Response$inboundSchema` instead. */ export const inboundSchema = Response$inboundSchema; /** @deprecated use `Response$outboundSchema` instead. */ export const outboundSchema = Response$outboundSchema; /** @deprecated use `Response$Outbound` instead. */ export type Outbound = Response$Outbound; } /** @internal */ export const BeforeRequest$inboundSchema: z.ZodType< BeforeRequest, z.ZodTypeDef, unknown > = z.object({ expires: z.string().optional(), lastAccess: z.string(), eTag: z.string(), hitCount: z.number(), comment: z.string().optional(), }); /** @internal */ export type BeforeRequest$Outbound = { expires?: string | undefined; lastAccess: string; eTag: string; hitCount: number; comment?: string | undefined; }; /** @internal */ export const BeforeRequest$outboundSchema: z.ZodType< BeforeRequest$Outbound, z.ZodTypeDef, BeforeRequest > = z.object({ expires: z.string().optional(), lastAccess: z.string(), eTag: z.string(), hitCount: z.number(), comment: 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 BeforeRequest$ { /** @deprecated use `BeforeRequest$inboundSchema` instead. */ export const inboundSchema = BeforeRequest$inboundSchema; /** @deprecated use `BeforeRequest$outboundSchema` instead. */ export const outboundSchema = BeforeRequest$outboundSchema; /** @deprecated use `BeforeRequest$Outbound` instead. */ export type Outbound = BeforeRequest$Outbound; } /** @internal */ export const AfterRequest$inboundSchema: z.ZodType< AfterRequest, z.ZodTypeDef, unknown > = z.object({ expires: z.string().optional(), lastAccess: z.string(), eTag: z.string(), hitCount: z.number(), comment: z.string().optional(), }); /** @internal */ export type AfterRequest$Outbound = { expires?: string | undefined; lastAccess: string; eTag: string; hitCount: number; comment?: string | undefined; }; /** @internal */ export const AfterRequest$outboundSchema: z.ZodType< AfterRequest$Outbound, z.ZodTypeDef, AfterRequest > = z.object({ expires: z.string().optional(), lastAccess: z.string(), eTag: z.string(), hitCount: z.number(), comment: 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 AfterRequest$ { /** @deprecated use `AfterRequest$inboundSchema` instead. */ export const inboundSchema = AfterRequest$inboundSchema; /** @deprecated use `AfterRequest$outboundSchema` instead. */ export const outboundSchema = AfterRequest$outboundSchema; /** @deprecated use `AfterRequest$Outbound` instead. */ export type Outbound = AfterRequest$Outbound; } /** @internal */ export const DebugDataCache$inboundSchema: z.ZodType< DebugDataCache, z.ZodTypeDef, unknown > = z.object({ beforeRequest: z.lazy(() => BeforeRequest$inboundSchema).optional(), afterRequest: z.lazy(() => AfterRequest$inboundSchema).optional(), comment: z.string().optional(), }); /** @internal */ export type DebugDataCache$Outbound = { beforeRequest?: BeforeRequest$Outbound | undefined; afterRequest?: AfterRequest$Outbound | undefined; comment?: string | undefined; }; /** @internal */ export const DebugDataCache$outboundSchema: z.ZodType< DebugDataCache$Outbound, z.ZodTypeDef, DebugDataCache > = z.object({ beforeRequest: z.lazy(() => BeforeRequest$outboundSchema).optional(), afterRequest: z.lazy(() => AfterRequest$outboundSchema).optional(), comment: 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 DebugDataCache$ { /** @deprecated use `DebugDataCache$inboundSchema` instead. */ export const inboundSchema = DebugDataCache$inboundSchema; /** @deprecated use `DebugDataCache$outboundSchema` instead. */ export const outboundSchema = DebugDataCache$outboundSchema; /** @deprecated use `DebugDataCache$Outbound` instead. */ export type Outbound = DebugDataCache$Outbound; } /** @internal */ export const Timings$inboundSchema: z.ZodType = z.object({ blocked: z.number().optional(), dns: z.number().optional(), connect: z.number().optional(), send: z.number(), wait: z.number(), receive: z.number(), ssl: z.number().optional(), comment: z.string().optional(), }); /** @internal */ export type Timings$Outbound = { blocked?: number | undefined; dns?: number | undefined; connect?: number | undefined; send: number; wait: number; receive: number; ssl?: number | undefined; comment?: string | undefined; }; /** @internal */ export const Timings$outboundSchema: z.ZodType< Timings$Outbound, z.ZodTypeDef, Timings > = z.object({ blocked: z.number().optional(), dns: z.number().optional(), connect: z.number().optional(), send: z.number(), wait: z.number(), receive: z.number(), ssl: z.number().optional(), comment: 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 Timings$ { /** @deprecated use `Timings$inboundSchema` instead. */ export const inboundSchema = Timings$inboundSchema; /** @deprecated use `Timings$outboundSchema` instead. */ export const outboundSchema = Timings$outboundSchema; /** @deprecated use `Timings$Outbound` instead. */ export type Outbound = Timings$Outbound; } /** @internal */ export const NetworkEntriesPerPage$inboundSchema: z.ZodType< NetworkEntriesPerPage, z.ZodTypeDef, unknown > = z.object({ pageref: z.string().optional(), startedDateTime: z.string(), time: z.number().optional(), request: z.lazy(() => Request$inboundSchema), response: z.lazy(() => Response$inboundSchema).optional(), cache: z.lazy(() => DebugDataCache$inboundSchema).optional(), timings: z.lazy(() => Timings$inboundSchema), serverIPAddress: z.string().optional(), connection: z.string().optional(), comment: z.string().optional(), }); /** @internal */ export type NetworkEntriesPerPage$Outbound = { pageref?: string | undefined; startedDateTime: string; time?: number | undefined; request: Request$Outbound; response?: Response$Outbound | undefined; cache?: DebugDataCache$Outbound | undefined; timings: Timings$Outbound; serverIPAddress?: string | undefined; connection?: string | undefined; comment?: string | undefined; }; /** @internal */ export const NetworkEntriesPerPage$outboundSchema: z.ZodType< NetworkEntriesPerPage$Outbound, z.ZodTypeDef, NetworkEntriesPerPage > = z.object({ pageref: z.string().optional(), startedDateTime: z.string(), time: z.number().optional(), request: z.lazy(() => Request$outboundSchema), response: z.lazy(() => Response$outboundSchema).optional(), cache: z.lazy(() => DebugDataCache$outboundSchema).optional(), timings: z.lazy(() => Timings$outboundSchema), serverIPAddress: z.string().optional(), connection: z.string().optional(), comment: 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 NetworkEntriesPerPage$ { /** @deprecated use `NetworkEntriesPerPage$inboundSchema` instead. */ export const inboundSchema = NetworkEntriesPerPage$inboundSchema; /** @deprecated use `NetworkEntriesPerPage$outboundSchema` instead. */ export const outboundSchema = NetworkEntriesPerPage$outboundSchema; /** @deprecated use `NetworkEntriesPerPage$Outbound` instead. */ export type Outbound = NetworkEntriesPerPage$Outbound; } /** @internal */ export const DebugData$inboundSchema: z.ZodType< DebugData, z.ZodTypeDef, unknown > = z.object({ logsPerPage: z.array(z.array(ConsoleLog$inboundSchema)), networkEntriesPerPage: z.array( z.record(z.lazy(() => NetworkEntriesPerPage$inboundSchema)), ).optional(), }); /** @internal */ export type DebugData$Outbound = { logsPerPage: Array>; networkEntriesPerPage?: | Array<{ [k: string]: NetworkEntriesPerPage$Outbound }> | undefined; }; /** @internal */ export const DebugData$outboundSchema: z.ZodType< DebugData$Outbound, z.ZodTypeDef, DebugData > = z.object({ logsPerPage: z.array(z.array(ConsoleLog$outboundSchema)), networkEntriesPerPage: z.array( z.record(z.lazy(() => NetworkEntriesPerPage$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 DebugData$ { /** @deprecated use `DebugData$inboundSchema` instead. */ export const inboundSchema = DebugData$inboundSchema; /** @deprecated use `DebugData$outboundSchema` instead. */ export const outboundSchema = DebugData$outboundSchema; /** @deprecated use `DebugData$Outbound` instead. */ export type Outbound = DebugData$Outbound; }