示例工程 45-sandbox-and-permissions

45-sandbox-and-permissions/app/.tsc/shared/ipc.d.ts

typescript · 1.4 KB

export declare const CH: {
    readonly snapshot: "sandbox:snapshot";
    readonly setNotifications: "sandbox:set-notifications";
    readonly simulate: "sandbox:simulate-permission";
    readonly download: "sandbox:download";
    readonly probe: "sandbox:probe";
    readonly refresh: "sandbox:refresh";
};
export type EventRow = {
    at: number;
    kind: string;
    detail: string;
};
export type Check = {
    id: string;
    label: string;
    pass: boolean;
    detail: string;
};
export type PermissionEntry = {
    permission: string;
    allowed: boolean;
    source: "request" | "simulated";
    at: number;
};
export type DownloadInfo = {
    filename: string;
    url: string;
    bytes: number;
    blocked: boolean;
    at: number;
};
export type Probe = {
    requireType: string;
    processType: string;
    bufferType: string;
    apiKeys: string[];
    csp: string;
    probedAt: number;
};
export type Snapshot = {
    platform: string;
    electronVersion: string;
    nodeVersion: string;
    checks: Check[];
    score: number;
    probe: Probe;
    permissions: {
        notificationsAllowed: boolean;
        entries: PermissionEntry[];
    };
    download: DownloadInfo | null;
    events: EventRow[];
};
export declare function assertNotificationReq(value: unknown): asserts value is {
    enabled: boolean;
};
export declare function assertPermissionReq(value: unknown): asserts value is {
    permission: string;
};
//# sourceMappingURL=ipc.d.ts.map