UNPKG

puppeteer-extra-plugin-session

Version:

A puppeteer plugin to dump and inject session data.

147 lines (146 loc) 4.67 kB
import { z } from 'zod'; /** * @see https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB/#method-requestDatabaseNames */ export declare const CDPIndexedDBDatabaseNames: z.ZodObject<{ databaseNames: z.ZodArray<z.ZodString, "many">; }, "strip", z.ZodTypeAny, { databaseNames: string[]; }, { databaseNames: string[]; }>; /** * IndexedDB schemas */ export declare const IndexedDBSchema: z.ZodString; export declare const IndexedDBDatabaseSchema: z.ZodObject<{ name: z.ZodString; data: z.ZodString; securityOrigin: z.ZodString; }, "strip", z.ZodTypeAny, { data: string; name: string; securityOrigin: string; }, { data: string; name: string; securityOrigin: string; }>; export declare type IndexedDBDatabase = z.infer<typeof IndexedDBDatabaseSchema>; /** * CDP Network.Cookie schema * @see https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-Cookie */ export declare const CDPCookieSchema: z.ZodObject<{ name: z.ZodString; value: z.ZodString; domain: z.ZodString; path: z.ZodString; expires: z.ZodNumber; size: z.ZodNumber; httpOnly: z.ZodBoolean; secure: z.ZodBoolean; session: z.ZodBoolean; sameSite: z.ZodOptional<z.ZodEnum<["Strict", "Lax", "None"]>>; priority: z.ZodEnum<["Low", "Medium", "High"]>; sameParty: z.ZodBoolean; sourceScheme: z.ZodEnum<["Unset", "NonSecure", "Secure"]>; sourcePort: z.ZodNumber; }, "strip", z.ZodTypeAny, { sameSite?: "None" | "Strict" | "Lax" | undefined; priority: "Low" | "Medium" | "High"; name: string; value: string; path: string; size: number; expires: number; session: boolean; secure: boolean; domain: string; httpOnly: boolean; sameParty: boolean; sourceScheme: "Unset" | "NonSecure" | "Secure"; sourcePort: number; }, { sameSite?: "None" | "Strict" | "Lax" | undefined; priority: "Low" | "Medium" | "High"; name: string; value: string; path: string; size: number; expires: number; session: boolean; secure: boolean; domain: string; httpOnly: boolean; sameParty: boolean; sourceScheme: "Unset" | "NonSecure" | "Secure"; sourcePort: number; }>; export declare type CDPCookie = z.infer<typeof CDPCookieSchema>; /** * CDP Network.CookieParam schema * @see https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-CookieParam */ export declare const CDPCookieParam: z.ZodObject<{ name: z.ZodString; value: z.ZodString; url: z.ZodOptional<z.ZodString>; domain: z.ZodOptional<z.ZodString>; path: z.ZodOptional<z.ZodString>; secure: z.ZodOptional<z.ZodBoolean>; httpOnly: z.ZodOptional<z.ZodBoolean>; sameSite: z.ZodOptional<z.ZodEnum<["Strict", "Lax", "None"]>>; /** * Time since Epoch */ expires: z.ZodOptional<z.ZodNumber>; priority: z.ZodOptional<z.ZodEnum<["Low", "Medium", "High"]>>; sameParty: z.ZodOptional<z.ZodBoolean>; sourceScheme: z.ZodOptional<z.ZodEnum<["Unset", "NonSecure", "Secure"]>>; sourcePort: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { url?: string | undefined; priority?: "Low" | "Medium" | "High" | undefined; path?: string | undefined; expires?: number | undefined; secure?: boolean | undefined; domain?: string | undefined; httpOnly?: boolean | undefined; sameSite?: "None" | "Strict" | "Lax" | undefined; sameParty?: boolean | undefined; sourceScheme?: "Unset" | "NonSecure" | "Secure" | undefined; sourcePort?: number | undefined; name: string; value: string; }, { url?: string | undefined; priority?: "Low" | "Medium" | "High" | undefined; path?: string | undefined; expires?: number | undefined; secure?: boolean | undefined; domain?: string | undefined; httpOnly?: boolean | undefined; sameSite?: "None" | "Strict" | "Lax" | undefined; sameParty?: boolean | undefined; sourceScheme?: "Unset" | "NonSecure" | "Secure" | undefined; sourcePort?: number | undefined; name: string; value: string; }>; export declare const SessionDataSchema: z.ZodObject<{ localStorage: z.ZodOptional<z.ZodString>; sessionStorage: z.ZodOptional<z.ZodString>; indexedDB: z.ZodOptional<z.ZodString>; cookie: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { localStorage?: string | undefined; indexedDB?: string | undefined; sessionStorage?: string | undefined; cookie?: string | undefined; }, { localStorage?: string | undefined; indexedDB?: string | undefined; sessionStorage?: string | undefined; cookie?: string | undefined; }>;