How to use electron-rpc-api - 10 common examples

To help you get started, we’ve selected a few electron-rpc-api examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vladimiry / ElectronMail / src / shared / api / main.ts View on Github external
toggleBrowserWindow: ActionType.Promise<{ forcedState: boolean } | void>(),

    toggleCompactLayout: ActionType.Promise(),

    updateOverlayIcon: ActionType.Promise<{
        hasLoggedOut: boolean;
        unread: number;
        trayIconColor?: string;
        unreadBgColor?: string;
        unreadTextColor?: string;
    }>(),

    hotkey: ActionType.Promise<{ type: "copy" | "paste" | "selectAll" }>(),

    findInPageDisplay: ActionType.Promise<{ visible: boolean; }>(),

    findInPage: ActionType.Promise<{ query: string; options?: Electron.FindInPageOptions; },
        Pick | null>(),

    findInPageStop: ActionType.Promise(),

    findInPageNotification: ActionType.Observable(),

    selectAccount: ActionType.Promise<{ databaseView?: boolean; reset?: boolean }>(),

    updateCheck: ActionType.Promise>(),

    toggleControls: ActionType.Promise, "hideControls"> | void, void>(),

    toggleLocalDbMailsListViewMode: ActionType.Promise(),
github vladimiry / ElectronMail / src / shared / api / main.ts View on Github external
export type IpcMainServiceScan = ScanService;

export type IpcMainApiEndpoints = IpcMainServiceScan["ApiClient"];

export const ENDPOINTS_DEFINITION = {
    getSpellCheckMetadata: ActionType.Promise }>(),

    changeSpellCheckLocale: ActionType.Promise<{ locale: FuzzyLocale }>(),

    spellCheck: ActionType.Promise<{ words: string[] }, { misspelledWords: string[] }>(),

    addAccount: ActionType.Promise(),

    updateAccount: ActionType.Promise(),

    changeAccountOrder: ActionType.Promise(),

    removeAccount: ActionType.Promise(),

    changeMasterPassword: ActionType.Promise(),

    dbPatch: ActionType.Promise["metadata"], "type"> },
        DbModel.FsDbAccount["metadata"]>(),

    dbGetAccountMetadata: ActionType.Promise(),

    dbGetAccountDataView: ActionType.Promise
github vladimiry / ElectronMail / src / shared / api / main.ts View on Github external
toggleCompactLayout: ActionType.Promise(),

    updateOverlayIcon: ActionType.Promise<{
        hasLoggedOut: boolean;
        unread: number;
        trayIconColor?: string;
        unreadBgColor?: string;
        unreadTextColor?: string;
    }>(),

    hotkey: ActionType.Promise<{ type: "copy" | "paste" | "selectAll" }>(),

    findInPageDisplay: ActionType.Promise<{ visible: boolean; }>(),

    findInPage: ActionType.Promise<{ query: string; options?: Electron.FindInPageOptions; },
        Pick | null>(),

    findInPageStop: ActionType.Promise(),

    findInPageNotification: ActionType.Observable(),

    selectAccount: ActionType.Promise<{ databaseView?: boolean; reset?: boolean }>(),

    updateCheck: ActionType.Promise>(),

    toggleControls: ActionType.Promise, "hideControls"> | void, void>(),

    toggleLocalDbMailsListViewMode: ActionType.Promise(),

    notification: ActionType.Observable>(),
};
github vladimiry / ElectronMail / src / shared / api / main.ts View on Github external
hotkey: ActionType.Promise<{ type: "copy" | "paste" | "selectAll" }>(),

    findInPageDisplay: ActionType.Promise<{ visible: boolean; }>(),

    findInPage: ActionType.Promise<{ query: string; options?: Electron.FindInPageOptions; },
        Pick | null>(),

    findInPageStop: ActionType.Promise(),

    findInPageNotification: ActionType.Observable(),

    selectAccount: ActionType.Promise<{ databaseView?: boolean; reset?: boolean }>(),

    updateCheck: ActionType.Promise>(),

    toggleControls: ActionType.Promise, "hideControls"> | void, void>(),

    toggleLocalDbMailsListViewMode: ActionType.Promise(),

    notification: ActionType.Observable>(),
};

export interface InitResponse {
    electronLocations: ElectronContextLocations;
    hasSavedPassword?: boolean;
    snapPasswordManagerServiceHint?: boolean;
    keytarSupport: boolean;
    checkUpdateAndNotify: boolean;
}

export const IPC_MAIN_API = createIpcMainApiService({
    channel: `${PACKAGE_NAME}:ipcMain-api`,
github vladimiry / ElectronMail / src / shared / api / main.ts View on Github external
& ({ query: string } | { mailPks: Array }),
            DbModel.View.RootConversationNode[]>(),

    dbFullTextSearch: ActionType.Promise; },
        {
            uid: string;
            mailsBundleItems: Array<{ mail: DbModel.View.Mail & { score: number; }; conversationSize: number; }>;
        } & Pick, "expandedTerms">>(),

    dbIndexerOn: ActionType.Promise>(),

    dbIndexerNotification: ActionType.Observable>(),

    init: ActionType.Promise(),

    logout: ActionType.Promise(),

    openAboutWindow: ActionType.Promise(),

    openExternal: ActionType.Promise<{ url: string }>(),

    openSettingsFolder: ActionType.Promise(),

    patchBaseConfig: ActionType.Promise(),

    quit: ActionType.Promise(),

    readConfig: ActionType.Promise(),

    readSettings: ActionType.Promise & { savePassword?: boolean; }, Settings>(),

    reEncryptSettings: ActionType.Promise(),
github vladimiry / ElectronMail / src / shared / api / main.ts View on Github external
openExternal: ActionType.Promise<{ url: string }>(),

    openSettingsFolder: ActionType.Promise(),

    patchBaseConfig: ActionType.Promise(),

    quit: ActionType.Promise(),

    readConfig: ActionType.Promise(),

    readSettings: ActionType.Promise & { savePassword?: boolean; }, Settings>(),

    reEncryptSettings: ActionType.Promise(),

    settingsExists: ActionType.Promise(),

    loadDatabase: ActionType.Promise>(),

    activateBrowserWindow: ActionType.Promise(),

    toggleBrowserWindow: ActionType.Promise<{ forcedState: boolean } | void>(),

    toggleCompactLayout: ActionType.Promise(),

    updateOverlayIcon: ActionType.Promise<{
        hasLoggedOut: boolean;
        unread: number;
        trayIconColor?: string;
        unreadBgColor?: string;
        unreadTextColor?: string;
    }>(),
github vladimiry / ElectronMail / src / shared / api / main.ts View on Github external
{
            uid: string;
            mailsBundleItems: Array<{ mail: DbModel.View.Mail & { score: number; }; conversationSize: number; }>;
        } & Pick, "expandedTerms">>(),

    dbIndexerOn: ActionType.Promise>(),

    dbIndexerNotification: ActionType.Observable>(),

    init: ActionType.Promise(),

    logout: ActionType.Promise(),

    openAboutWindow: ActionType.Promise(),

    openExternal: ActionType.Promise<{ url: string }>(),

    openSettingsFolder: ActionType.Promise(),

    patchBaseConfig: ActionType.Promise(),

    quit: ActionType.Promise(),

    readConfig: ActionType.Promise(),

    readSettings: ActionType.Promise & { savePassword?: boolean; }, Settings>(),

    reEncryptSettings: ActionType.Promise(),

    settingsExists: ActionType.Promise(),

    loadDatabase: ActionType.Promise>(),
github vladimiry / ElectronMail / src / shared / api / main.ts View on Github external
logout: ActionType.Promise(),

    openAboutWindow: ActionType.Promise(),

    openExternal: ActionType.Promise<{ url: string }>(),

    openSettingsFolder: ActionType.Promise(),

    patchBaseConfig: ActionType.Promise(),

    quit: ActionType.Promise(),

    readConfig: ActionType.Promise(),

    readSettings: ActionType.Promise & { savePassword?: boolean; }, Settings>(),

    reEncryptSettings: ActionType.Promise(),

    settingsExists: ActionType.Promise(),

    loadDatabase: ActionType.Promise>(),

    activateBrowserWindow: ActionType.Promise(),

    toggleBrowserWindow: ActionType.Promise<{ forcedState: boolean } | void>(),

    toggleCompactLayout: ActionType.Promise(),

    updateOverlayIcon: ActionType.Promise<{
        hasLoggedOut: boolean;
        unread: number;
github vladimiry / ElectronMail / src / shared / api / main.ts View on Github external
changeSpellCheckLocale: ActionType.Promise<{ locale: FuzzyLocale }>(),

    spellCheck: ActionType.Promise<{ words: string[] }, { misspelledWords: string[] }>(),

    addAccount: ActionType.Promise(),

    updateAccount: ActionType.Promise(),

    changeAccountOrder: ActionType.Promise(),

    removeAccount: ActionType.Promise(),

    changeMasterPassword: ActionType.Promise(),

    dbPatch: ActionType.Promise["metadata"], "type"> },
        DbModel.FsDbAccount["metadata"]>(),

    dbGetAccountMetadata: ActionType.Promise(),

    dbGetAccountDataView: ActionType.Promise(),

    dbGetAccountMail: ActionType.Promise(),
github vladimiry / ElectronMail / src / shared / api / main.ts View on Github external
openAboutWindow: ActionType.Promise(),

    openExternal: ActionType.Promise<{ url: string }>(),

    openSettingsFolder: ActionType.Promise(),

    patchBaseConfig: ActionType.Promise(),

    quit: ActionType.Promise(),

    readConfig: ActionType.Promise(),

    readSettings: ActionType.Promise & { savePassword?: boolean; }, Settings>(),

    reEncryptSettings: ActionType.Promise(),

    settingsExists: ActionType.Promise(),

    loadDatabase: ActionType.Promise>(),

    activateBrowserWindow: ActionType.Promise(),

    toggleBrowserWindow: ActionType.Promise<{ forcedState: boolean } | void>(),

    toggleCompactLayout: ActionType.Promise(),

    updateOverlayIcon: ActionType.Promise<{
        hasLoggedOut: boolean;
        unread: number;
        trayIconColor?: string;
        unreadBgColor?: string;

electron-rpc-api

Wrapper around the Electron's IPC for building type-safe API based RPC-like and reactive interactions

MIT
Latest version published 10 months ago

Package Health Score

53 / 100
Full package analysis