UNPKG

@huolala-tech/page-spy-browser

Version:

A developer tool for debugging remote web page.

300 lines (299 loc) 23.1 kB
import { ConfigBase, SchemaUnwrap } from '@huolala-tech/page-spy-base'; export declare const nodeId = "__pageSpy"; declare const schema: import("zod").ZodObject<import("zod").objectUtil.extendShape<{ api: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string, string>>; project: import("zod").ZodOptional<import("zod").ZodString>; title: import("zod").ZodOptional<import("zod").ZodString>; enableSSL: import("zod").ZodOptional<import("zod").ZodBoolean>; messageCapacity: import("zod").ZodOptional<import("zod").ZodNumber>; useSecret: import("zod").ZodOptional<import("zod").ZodBoolean>; secret: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string, string>>; offline: import("zod").ZodOptional<import("zod").ZodBoolean>; serializeData: import("zod").ZodOptional<import("zod").ZodBoolean>; disabledPlugins: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>; dataProcessor: import("zod").ZodOptional<import("zod").ZodObject<{ console: import("zod").ZodOptional<import("zod").ZodFunction<import("zod").ZodTuple<[import("zod").ZodType<import("@huolala-tech/page-spy-types/lib/console").DataItem, import("zod").ZodTypeDef, import("@huolala-tech/page-spy-types/lib/console").DataItem>], import("zod").ZodUnknown>, import("zod").ZodOptional<import("zod").ZodBoolean>>>; network: import("zod").ZodOptional<import("zod").ZodFunction<import("zod").ZodTuple<[import("zod").ZodType<import("@huolala-tech/page-spy-types/lib/network").RequestInfo, import("zod").ZodTypeDef, import("@huolala-tech/page-spy-types/lib/network").RequestInfo>], import("zod").ZodUnknown>, import("zod").ZodOptional<import("zod").ZodBoolean>>>; storage: import("zod").ZodOptional<import("zod").ZodFunction<import("zod").ZodTuple<[import("zod").ZodType<import("@huolala-tech/page-spy-types/lib/storage").DataItem, import("zod").ZodTypeDef, import("@huolala-tech/page-spy-types/lib/storage").DataItem>], import("zod").ZodUnknown>, import("zod").ZodOptional<import("zod").ZodBoolean>>>; database: import("zod").ZodOptional<import("zod").ZodFunction<import("zod").ZodTuple<[import("zod").ZodType<import("@huolala-tech/page-spy-types/lib/database").DataItem, import("zod").ZodTypeDef, import("@huolala-tech/page-spy-types/lib/database").DataItem>], import("zod").ZodUnknown>, import("zod").ZodOptional<import("zod").ZodBoolean>>>; page: import("zod").ZodOptional<import("zod").ZodFunction<import("zod").ZodTuple<[import("zod").ZodType<import("@huolala-tech/page-spy-types/lib/page").DataItem, import("zod").ZodTypeDef, import("@huolala-tech/page-spy-types/lib/page").DataItem>], import("zod").ZodUnknown>, import("zod").ZodOptional<import("zod").ZodBoolean>>>; system: import("zod").ZodOptional<import("zod").ZodFunction<import("zod").ZodTuple<[import("zod").ZodType<import("@huolala-tech/page-spy-types/lib/system").DataItem, import("zod").ZodTypeDef, import("@huolala-tech/page-spy-types/lib/system").DataItem>], import("zod").ZodUnknown>, import("zod").ZodOptional<import("zod").ZodBoolean>>>; }, "strict", import("zod").ZodTypeAny, { console?: ((args_0: import("@huolala-tech/page-spy-types/lib/console").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; network?: ((args_0: import("@huolala-tech/page-spy-types/lib/network").RequestInfo, ...args_1: unknown[]) => boolean | undefined) | undefined; storage?: ((args_0: import("@huolala-tech/page-spy-types/lib/storage").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; database?: ((args_0: import("@huolala-tech/page-spy-types/lib/database").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; page?: ((args_0: import("@huolala-tech/page-spy-types/lib/page").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; system?: ((args_0: import("@huolala-tech/page-spy-types/lib/system").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; }, { console?: ((args_0: import("@huolala-tech/page-spy-types/lib/console").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; network?: ((args_0: import("@huolala-tech/page-spy-types/lib/network").RequestInfo, ...args_1: unknown[]) => boolean | undefined) | undefined; storage?: ((args_0: import("@huolala-tech/page-spy-types/lib/storage").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; database?: ((args_0: import("@huolala-tech/page-spy-types/lib/database").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; page?: ((args_0: import("@huolala-tech/page-spy-types/lib/page").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; system?: ((args_0: import("@huolala-tech/page-spy-types/lib/system").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; }>>; }, { clientOrigin: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string, string>>; autoRender: import("zod").ZodOptional<import("zod").ZodBoolean>; logo: import("zod").ZodOptional<import("zod").ZodString>; primaryColor: import("zod").ZodOptional<import("zod").ZodString>; modal: import("zod").ZodOptional<import("zod").ZodObject<{ logo: import("zod").ZodOptional<import("zod").ZodString>; title: import("zod").ZodOptional<import("zod").ZodString>; }, "strict", import("zod").ZodTypeAny, { logo?: string | undefined; title?: string | undefined; }, { logo?: string | undefined; title?: string | undefined; }>>; gesture: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodLiteral<"U">, import("zod").ZodLiteral<"D">, import("zod").ZodLiteral<"L">, import("zod").ZodLiteral<"R">]>, "many">>>; lang: import("zod").ZodOptional<import("zod").ZodEnum<["zh", "en"]>>; }>, "strict", import("zod").ZodTypeAny, { clientOrigin?: string | undefined; autoRender?: boolean | undefined; logo?: string | undefined; primaryColor?: string | undefined; title?: string | undefined; modal?: { logo?: string | undefined; title?: string | undefined; } | undefined; gesture?: ("U" | "D" | "L" | "R")[] | null | undefined; lang?: "zh" | "en" | undefined; api?: string | undefined; project?: string | undefined; enableSSL?: boolean | undefined; messageCapacity?: number | undefined; useSecret?: boolean | undefined; secret?: string | undefined; offline?: boolean | undefined; serializeData?: boolean | undefined; disabledPlugins?: string[] | undefined; dataProcessor?: { console?: ((args_0: import("@huolala-tech/page-spy-types/lib/console").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; network?: ((args_0: import("@huolala-tech/page-spy-types/lib/network").RequestInfo, ...args_1: unknown[]) => boolean | undefined) | undefined; storage?: ((args_0: import("@huolala-tech/page-spy-types/lib/storage").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; database?: ((args_0: import("@huolala-tech/page-spy-types/lib/database").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; page?: ((args_0: import("@huolala-tech/page-spy-types/lib/page").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; system?: ((args_0: import("@huolala-tech/page-spy-types/lib/system").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; } | undefined; }, { clientOrigin?: string | undefined; autoRender?: boolean | undefined; logo?: string | undefined; primaryColor?: string | undefined; title?: string | undefined; modal?: { logo?: string | undefined; title?: string | undefined; } | undefined; gesture?: ("U" | "D" | "L" | "R")[] | null | undefined; lang?: "zh" | "en" | undefined; api?: string | undefined; project?: string | undefined; enableSSL?: boolean | undefined; messageCapacity?: number | undefined; useSecret?: boolean | undefined; secret?: string | undefined; offline?: boolean | undefined; serializeData?: boolean | undefined; disabledPlugins?: string[] | undefined; dataProcessor?: { console?: ((args_0: import("@huolala-tech/page-spy-types/lib/console").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; network?: ((args_0: import("@huolala-tech/page-spy-types/lib/network").RequestInfo, ...args_1: unknown[]) => boolean | undefined) | undefined; storage?: ((args_0: import("@huolala-tech/page-spy-types/lib/storage").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; database?: ((args_0: import("@huolala-tech/page-spy-types/lib/database").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; page?: ((args_0: import("@huolala-tech/page-spy-types/lib/page").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; system?: ((args_0: import("@huolala-tech/page-spy-types/lib/system").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; } | undefined; }>; export type InitConfig = SchemaUnwrap<typeof schema>; export declare class Config extends ConfigBase<InitConfig> { /** * NOTE: the 'scriptLink' must be mark static, for * "document.currentScript.src" only valid after <script> load done. */ static scriptLink: string; protected schema: import("zod").ZodEffects<import("zod").ZodObject<import("zod").objectUtil.extendShape<{ api: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string, string>>; project: import("zod").ZodOptional<import("zod").ZodString>; title: import("zod").ZodOptional<import("zod").ZodString>; enableSSL: import("zod").ZodOptional<import("zod").ZodBoolean>; messageCapacity: import("zod").ZodOptional<import("zod").ZodNumber>; useSecret: import("zod").ZodOptional<import("zod").ZodBoolean>; secret: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string, string>>; offline: import("zod").ZodOptional<import("zod").ZodBoolean>; serializeData: import("zod").ZodOptional<import("zod").ZodBoolean>; disabledPlugins: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>; dataProcessor: import("zod").ZodOptional<import("zod").ZodObject<{ console: import("zod").ZodOptional<import("zod").ZodFunction<import("zod").ZodTuple<[import("zod").ZodType<import("@huolala-tech/page-spy-types/lib/console").DataItem, import("zod").ZodTypeDef, import("@huolala-tech/page-spy-types/lib/console").DataItem>], import("zod").ZodUnknown>, import("zod").ZodOptional<import("zod").ZodBoolean>>>; network: import("zod").ZodOptional<import("zod").ZodFunction<import("zod").ZodTuple<[import("zod").ZodType<import("@huolala-tech/page-spy-types/lib/network").RequestInfo, import("zod").ZodTypeDef, import("@huolala-tech/page-spy-types/lib/network").RequestInfo>], import("zod").ZodUnknown>, import("zod").ZodOptional<import("zod").ZodBoolean>>>; storage: import("zod").ZodOptional<import("zod").ZodFunction<import("zod").ZodTuple<[import("zod").ZodType<import("@huolala-tech/page-spy-types/lib/storage").DataItem, import("zod").ZodTypeDef, import("@huolala-tech/page-spy-types/lib/storage").DataItem>], import("zod").ZodUnknown>, import("zod").ZodOptional<import("zod").ZodBoolean>>>; database: import("zod").ZodOptional<import("zod").ZodFunction<import("zod").ZodTuple<[import("zod").ZodType<import("@huolala-tech/page-spy-types/lib/database").DataItem, import("zod").ZodTypeDef, import("@huolala-tech/page-spy-types/lib/database").DataItem>], import("zod").ZodUnknown>, import("zod").ZodOptional<import("zod").ZodBoolean>>>; page: import("zod").ZodOptional<import("zod").ZodFunction<import("zod").ZodTuple<[import("zod").ZodType<import("@huolala-tech/page-spy-types/lib/page").DataItem, import("zod").ZodTypeDef, import("@huolala-tech/page-spy-types/lib/page").DataItem>], import("zod").ZodUnknown>, import("zod").ZodOptional<import("zod").ZodBoolean>>>; system: import("zod").ZodOptional<import("zod").ZodFunction<import("zod").ZodTuple<[import("zod").ZodType<import("@huolala-tech/page-spy-types/lib/system").DataItem, import("zod").ZodTypeDef, import("@huolala-tech/page-spy-types/lib/system").DataItem>], import("zod").ZodUnknown>, import("zod").ZodOptional<import("zod").ZodBoolean>>>; }, "strict", import("zod").ZodTypeAny, { console?: ((args_0: import("@huolala-tech/page-spy-types/lib/console").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; network?: ((args_0: import("@huolala-tech/page-spy-types/lib/network").RequestInfo, ...args_1: unknown[]) => boolean | undefined) | undefined; storage?: ((args_0: import("@huolala-tech/page-spy-types/lib/storage").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; database?: ((args_0: import("@huolala-tech/page-spy-types/lib/database").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; page?: ((args_0: import("@huolala-tech/page-spy-types/lib/page").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; system?: ((args_0: import("@huolala-tech/page-spy-types/lib/system").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; }, { console?: ((args_0: import("@huolala-tech/page-spy-types/lib/console").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; network?: ((args_0: import("@huolala-tech/page-spy-types/lib/network").RequestInfo, ...args_1: unknown[]) => boolean | undefined) | undefined; storage?: ((args_0: import("@huolala-tech/page-spy-types/lib/storage").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; database?: ((args_0: import("@huolala-tech/page-spy-types/lib/database").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; page?: ((args_0: import("@huolala-tech/page-spy-types/lib/page").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; system?: ((args_0: import("@huolala-tech/page-spy-types/lib/system").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; }>>; }, { clientOrigin: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string, string>>; autoRender: import("zod").ZodOptional<import("zod").ZodBoolean>; logo: import("zod").ZodOptional<import("zod").ZodString>; primaryColor: import("zod").ZodOptional<import("zod").ZodString>; modal: import("zod").ZodOptional<import("zod").ZodObject<{ logo: import("zod").ZodOptional<import("zod").ZodString>; title: import("zod").ZodOptional<import("zod").ZodString>; }, "strict", import("zod").ZodTypeAny, { logo?: string | undefined; title?: string | undefined; }, { logo?: string | undefined; title?: string | undefined; }>>; gesture: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodLiteral<"U">, import("zod").ZodLiteral<"D">, import("zod").ZodLiteral<"L">, import("zod").ZodLiteral<"R">]>, "many">>>; lang: import("zod").ZodOptional<import("zod").ZodEnum<["zh", "en"]>>; }>, "strict", import("zod").ZodTypeAny, { clientOrigin?: string | undefined; autoRender?: boolean | undefined; logo?: string | undefined; primaryColor?: string | undefined; title?: string | undefined; modal?: { logo?: string | undefined; title?: string | undefined; } | undefined; gesture?: ("U" | "D" | "L" | "R")[] | null | undefined; lang?: "zh" | "en" | undefined; api?: string | undefined; project?: string | undefined; enableSSL?: boolean | undefined; messageCapacity?: number | undefined; useSecret?: boolean | undefined; secret?: string | undefined; offline?: boolean | undefined; serializeData?: boolean | undefined; disabledPlugins?: string[] | undefined; dataProcessor?: { console?: ((args_0: import("@huolala-tech/page-spy-types/lib/console").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; network?: ((args_0: import("@huolala-tech/page-spy-types/lib/network").RequestInfo, ...args_1: unknown[]) => boolean | undefined) | undefined; storage?: ((args_0: import("@huolala-tech/page-spy-types/lib/storage").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; database?: ((args_0: import("@huolala-tech/page-spy-types/lib/database").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; page?: ((args_0: import("@huolala-tech/page-spy-types/lib/page").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; system?: ((args_0: import("@huolala-tech/page-spy-types/lib/system").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; } | undefined; }, { clientOrigin?: string | undefined; autoRender?: boolean | undefined; logo?: string | undefined; primaryColor?: string | undefined; title?: string | undefined; modal?: { logo?: string | undefined; title?: string | undefined; } | undefined; gesture?: ("U" | "D" | "L" | "R")[] | null | undefined; lang?: "zh" | "en" | undefined; api?: string | undefined; project?: string | undefined; enableSSL?: boolean | undefined; messageCapacity?: number | undefined; useSecret?: boolean | undefined; secret?: string | undefined; offline?: boolean | undefined; serializeData?: boolean | undefined; disabledPlugins?: string[] | undefined; dataProcessor?: { console?: ((args_0: import("@huolala-tech/page-spy-types/lib/console").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; network?: ((args_0: import("@huolala-tech/page-spy-types/lib/network").RequestInfo, ...args_1: unknown[]) => boolean | undefined) | undefined; storage?: ((args_0: import("@huolala-tech/page-spy-types/lib/storage").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; database?: ((args_0: import("@huolala-tech/page-spy-types/lib/database").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; page?: ((args_0: import("@huolala-tech/page-spy-types/lib/page").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; system?: ((args_0: import("@huolala-tech/page-spy-types/lib/system").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; } | undefined; }>, { clientOrigin?: string | undefined; autoRender?: boolean | undefined; logo?: string | undefined; primaryColor?: string | undefined; title?: string | undefined; modal?: { logo?: string | undefined; title?: string | undefined; } | undefined; gesture?: ("U" | "D" | "L" | "R")[] | null | undefined; lang?: "zh" | "en" | undefined; api?: string | undefined; project?: string | undefined; enableSSL?: boolean | undefined; messageCapacity?: number | undefined; useSecret?: boolean | undefined; secret?: string | undefined; offline?: boolean | undefined; serializeData?: boolean | undefined; disabledPlugins?: string[] | undefined; dataProcessor?: { console?: ((args_0: import("@huolala-tech/page-spy-types/lib/console").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; network?: ((args_0: import("@huolala-tech/page-spy-types/lib/network").RequestInfo, ...args_1: unknown[]) => boolean | undefined) | undefined; storage?: ((args_0: import("@huolala-tech/page-spy-types/lib/storage").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; database?: ((args_0: import("@huolala-tech/page-spy-types/lib/database").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; page?: ((args_0: import("@huolala-tech/page-spy-types/lib/page").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; system?: ((args_0: import("@huolala-tech/page-spy-types/lib/system").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; } | undefined; }, { clientOrigin?: string | undefined; autoRender?: boolean | undefined; logo?: string | undefined; primaryColor?: string | undefined; title?: string | undefined; modal?: { logo?: string | undefined; title?: string | undefined; } | undefined; gesture?: ("U" | "D" | "L" | "R")[] | null | undefined; lang?: "zh" | "en" | undefined; api?: string | undefined; project?: string | undefined; enableSSL?: boolean | undefined; messageCapacity?: number | undefined; useSecret?: boolean | undefined; secret?: string | undefined; offline?: boolean | undefined; serializeData?: boolean | undefined; disabledPlugins?: string[] | undefined; dataProcessor?: { console?: ((args_0: import("@huolala-tech/page-spy-types/lib/console").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; network?: ((args_0: import("@huolala-tech/page-spy-types/lib/network").RequestInfo, ...args_1: unknown[]) => boolean | undefined) | undefined; storage?: ((args_0: import("@huolala-tech/page-spy-types/lib/storage").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; database?: ((args_0: import("@huolala-tech/page-spy-types/lib/database").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; page?: ((args_0: import("@huolala-tech/page-spy-types/lib/page").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; system?: ((args_0: import("@huolala-tech/page-spy-types/lib/system").DataItem, ...args_1: unknown[]) => boolean | undefined) | undefined; } | undefined; }>; protected get platform(): { clientOrigin: string; autoRender: boolean; logo: string; primaryColor: string; modal: { logo: string; title: string; }; gesture: null; lang: "zh"; }; } export {};