1 import type { Maybe, MaybeNull } from '@proton/pass/types/utils';
3 export type ContextBridgeApi = {
4 writeToClipboard: (text: string) => Promise<void>;
5 navigate: (href: string) => Promise<void>;
6 canCheckPresence: () => Promise<boolean>;
7 checkPresence: (reason?: string) => Promise<boolean>;
8 getDecryptionKey: (challenge: string) => Promise<MaybeNull<Buffer>>;
9 getSecret: (key: string, version: number) => Promise<MaybeNull<string>>;
10 setSecret: (key: string, data: Uint8Array) => Promise<void>;
11 deleteSecret: (key: string) => Promise<void>;
12 getInstallInfo: () => Promise<{ installSource: MaybeNull<string> }>;
13 setInstallSourceReported: () => Promise<void>;
14 setClipboardConfig: (config: ClipboardStoreProperties) => Promise<void>;
15 getClipboardConfig: () => Promise<Maybe<ClipboardStoreProperties>>;
16 getTheme: () => Promise<Maybe<DesktopTheme>>;
17 setTheme: (theme: DesktopTheme) => Promise<void>;
20 export type DesktopTheme = 'dark' | 'light' | 'system';
22 export type ClipboardStoreProperties = {