How to use the electron-rpc-api.ActionType.Observable function in electron-rpc-api

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
dbSearchRootConversationNodes:
        ActionType.Promise }
            & ({ 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(),
github vladimiry / ElectronMail / src / shared / api / main.ts View on Github external
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>(),
};

export interface InitResponse {
    electronLocations: ElectronContextLocations;
    hasSavedPassword?: boolean;
    snapPasswordManagerServiceHint?: boolean;
github vladimiry / ElectronMail / src / shared / api / main.ts View on Github external
& { metadata: Skip["metadata"], "type"> },
        DbModel.FsDbAccount["metadata"]>(),

    dbGetAccountMetadata: ActionType.Promise(),

    dbGetAccountDataView: ActionType.Promise(),

    dbGetAccountMail: ActionType.Promise(),

    dbExport: ActionType.Observable },
        { count: number; } | { progress: number; file: string; }>(),

    dbSearchRootConversationNodes:
        ActionType.Promise }
            & ({ 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>(),
github vladimiry / ElectronMail / src / shared / api / main.ts View on Github external
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`,
    apiDefinition: ENDPOINTS_DEFINITION,
});

export const IPC_MAIN_API_DB_INDEXER_ON_ACTIONS = unionize({

electron-rpc-api

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

MIT
Latest version published 4 months ago

Package Health Score

62 / 100
Full package analysis