refactor(electron): nestjsfy

This commit is contained in:
Peng Xiao
2025-04-24 14:54:30 +08:00
parent 899ffd1ad3
commit 68ab87f5c5
178 changed files with 7139 additions and 5617 deletions
+4 -5
View File
@@ -5,13 +5,12 @@
"private": true,
"main": "./src/index.ts",
"exports": {
".": "./src/index.ts",
"./web-worker": "./src/web-worker.ts"
},
"dependencies": {
"async-call-rpc": "^6.4.2"
".": "./src/index.ts"
},
"devDependencies": {
"@affine/electron": "workspace:*"
},
"dependencies": {
"zod": "^3.24.4"
}
}
+33 -39
View File
@@ -1,53 +1,47 @@
import type {
events as helperEvents,
handlers as helperHandlers,
} from '@affine/electron/helper/exposed';
import type {
events as mainEvents,
handlers as mainHandlers,
} from '@affine/electron/main/exposed';
import type { AppInfo } from '@affine/electron/preload/electron-api';
import type { SharedStorage } from '@affine/electron/preload/shared-storage';
import type { AppInfo } from '@affine/electron/entries/preload/api-info';
import type { SharedStorage } from '@affine/electron/entries/preload/shared-storage';
type MainHandlers = typeof mainHandlers;
type HelperHandlers = typeof helperHandlers;
type HelperEvents = typeof helperEvents;
type MainEvents = typeof mainEvents;
export type ClientHandler = {
[namespace in keyof MainHandlers]: {
[method in keyof MainHandlers[namespace]]: MainHandlers[namespace][method] extends (
arg0: any,
...rest: infer A
) => any
? (
...args: A
) => ReturnType<MainHandlers[namespace][method]> extends Promise<any>
? ReturnType<MainHandlers[namespace][method]>
: Promise<ReturnType<MainHandlers[namespace][method]>>
: never;
import type { ElectronApis } from './ipc-api-types.gen';
import type { ElectronEvents } from './ipc-event-types.gen';
declare global {
// oxlint-disable-next-line no-var
var __appInfo: {
electron: boolean;
scheme: string;
windowName: string;
};
} & HelperHandlers;
export type ClientEvents = MainEvents & HelperEvents;
// oxlint-disable-next-line no-var
var __apis: ClientHandler | undefined;
// oxlint-disable-next-line no-var
var __events: ClientEvents | undefined;
}
export const appInfo = (globalThis as any).__appInfo as AppInfo | null;
export const apis = (globalThis as any).__apis as ClientHandler | undefined;
export const events = (globalThis as any).__events as ClientEvents | undefined;
export type ClientEvents = ElectronEvents;
export type ClientHandler = ElectronApis;
export const appInfo = globalThis.__appInfo as AppInfo | null;
export const apis = globalThis.__apis as ClientHandler | undefined;
export const events = globalThis.__events as ClientEvents | undefined;
export const sharedStorage = (globalThis as any).__sharedStorage as
| SharedStorage
| undefined;
export type { AppInfo, SharedStorage };
export * from './ipc-api-types.gen';
export * from './ipc-event-types.gen';
export type { UpdateMeta } from '@affine/electron/entries/main/updater/updater-manager.service';
export {
type MeetingSettingsKey,
type MeetingSettingsSchema,
type MenubarStateKey,
type MenubarStateSchema,
type SpellCheckStateKey,
type SpellCheckStateSchema,
type TabViewsMetaKey,
type TabViewsMetaSchema,
type WorkbenchMeta,
type WorkbenchViewMeta,
type WorkbenchViewModule,
} from '@affine/electron/main/shared-state-schema';
export type { UpdateMeta } from '@affine/electron/main/updater/event';
export type {
AddTabOption,
TabAction,
} from '@affine/electron/main/windows-manager';
} from '@affine/electron/shared/shared-state-schema';
export type { AppInfo, SharedStorage };
@@ -0,0 +1,178 @@
// AUTO-GENERATED FILE. DO NOT EDIT MANUALLY.
// Generated by: packages/frontend/apps/electron/scripts/generate-types.ts
/* eslint-disable @typescript-eslint/no-explicit-any */
// Utility type: remove trailing IpcMainInvokeEvent param and ensure Promise return
type EnsurePromise<T> = T extends Promise<any> ? T : Promise<T>;
export type ApiMethod<T> = T extends (...args: infer P) => infer R ? (...args: P) => EnsurePromise<R> : never;
export interface ElectronApis {
dialog: {
/**
* Sets a fake dialog result that will be used by subsequent dialog-showing methods.
* This is primarily used for testing purposes (e.g., with Playwright) to simulate
* user interaction with file dialogs without actually displaying them.
* The fake result is consumed after one use.
*/
setFakeDialogResult: ApiMethod<import('@affine/electron/entries/helper/dialog/dialog-handler.service').DialogHandlerService['setFakeDialogResult']>;
/**
* This function is called when the user clicks the "Save" button in the "Save Workspace" dialog.
*
* It will just copy the file to the given path
*/
saveDBFileAs: ApiMethod<import('@affine/electron/entries/helper/dialog/dialog-handler.service').DialogHandlerService['saveDBFileAs']>;
/**
* Show an open dialog
*/
loadDBFile: ApiMethod<import('@affine/electron/entries/helper/dialog/dialog-handler.service').DialogHandlerService['loadDBFile']>;
selectDBFileLocation: ApiMethod<import('@affine/electron/entries/helper/dialog/dialog-handler.service').DialogHandlerService['selectDBFileLocation']>;
};
nbstore: {
connect: ApiMethod<import('@affine/electron/entries/helper/nbstore/nbstore.service').NBStoreService['connect']>;
disconnect: ApiMethod<import('@affine/electron/entries/helper/nbstore/nbstore.service').NBStoreService['disconnect']>;
pushUpdate: ApiMethod<import('@affine/electron/entries/helper/nbstore/nbstore.service').NBStoreService['pushUpdate']>;
getDocSnapshot: ApiMethod<import('@affine/electron/entries/helper/nbstore/nbstore.service').NBStoreService['getDocSnapshot']>;
setDocSnapshot: ApiMethod<import('@affine/electron/entries/helper/nbstore/nbstore.service').NBStoreService['setDocSnapshot']>;
getDocUpdates: ApiMethod<import('@affine/electron/entries/helper/nbstore/nbstore.service').NBStoreService['getDocUpdates']>;
markUpdatesMerged: ApiMethod<import('@affine/electron/entries/helper/nbstore/nbstore.service').NBStoreService['markUpdatesMerged']>;
deleteDoc: ApiMethod<import('@affine/electron/entries/helper/nbstore/nbstore.service').NBStoreService['deleteDoc']>;
getDocClocks: ApiMethod<import('@affine/electron/entries/helper/nbstore/nbstore.service').NBStoreService['getDocClocks']>;
getDocClock: ApiMethod<import('@affine/electron/entries/helper/nbstore/nbstore.service').NBStoreService['getDocClock']>;
getBlob: ApiMethod<import('@affine/electron/entries/helper/nbstore/nbstore.service').NBStoreService['getBlob']>;
setBlob: ApiMethod<import('@affine/electron/entries/helper/nbstore/nbstore.service').NBStoreService['setBlob']>;
deleteBlob: ApiMethod<import('@affine/electron/entries/helper/nbstore/nbstore.service').NBStoreService['deleteBlob']>;
releaseBlobs: ApiMethod<import('@affine/electron/entries/helper/nbstore/nbstore.service').NBStoreService['releaseBlobs']>;
listBlobs: ApiMethod<import('@affine/electron/entries/helper/nbstore/nbstore.service').NBStoreService['listBlobs']>;
getPeerRemoteClocks: ApiMethod<import('@affine/electron/entries/helper/nbstore/nbstore.service').NBStoreService['getPeerRemoteClocks']>;
getPeerRemoteClock: ApiMethod<import('@affine/electron/entries/helper/nbstore/nbstore.service').NBStoreService['getPeerRemoteClock']>;
setPeerRemoteClock: ApiMethod<import('@affine/electron/entries/helper/nbstore/nbstore.service').NBStoreService['setPeerRemoteClock']>;
getPeerPulledRemoteClocks: ApiMethod<import('@affine/electron/entries/helper/nbstore/nbstore.service').NBStoreService['getPeerPulledRemoteClocks']>;
getPeerPulledRemoteClock: ApiMethod<import('@affine/electron/entries/helper/nbstore/nbstore.service').NBStoreService['getPeerPulledRemoteClock']>;
setPeerPulledRemoteClock: ApiMethod<import('@affine/electron/entries/helper/nbstore/nbstore.service').NBStoreService['setPeerPulledRemoteClock']>;
getPeerPushedClocks: ApiMethod<import('@affine/electron/entries/helper/nbstore/nbstore.service').NBStoreService['getPeerPushedClocks']>;
getPeerPushedClock: ApiMethod<import('@affine/electron/entries/helper/nbstore/nbstore.service').NBStoreService['getPeerPushedClock']>;
setPeerPushedClock: ApiMethod<import('@affine/electron/entries/helper/nbstore/nbstore.service').NBStoreService['setPeerPushedClock']>;
clearClocks: ApiMethod<import('@affine/electron/entries/helper/nbstore/nbstore.service').NBStoreService['clearClocks']>;
setBlobUploadedAt: ApiMethod<import('@affine/electron/entries/helper/nbstore/nbstore.service').NBStoreService['setBlobUploadedAt']>;
getBlobUploadedAt: ApiMethod<import('@affine/electron/entries/helper/nbstore/nbstore.service').NBStoreService['getBlobUploadedAt']>;
};
workspace: {
/**
* Permanently delete the workspace data
*/
deleteWorkspace: ApiMethod<import('@affine/electron/entries/helper/nbstore/workspace-handlers.service').WorkspaceHandlersService['deleteWorkspace']>;
/**
* Move the workspace folder to `deleted-workspaces`
* At the same time, permanently delete the v1 workspace folder if it's id exists in nbstore,
* because trashing always happens after full sync from v1 to nbstore.
*/
moveToTrash: ApiMethod<import('@affine/electron/entries/helper/nbstore/workspace-handlers.service').WorkspaceHandlersService['moveToTrash']>;
getBackupWorkspaces: ApiMethod<import('@affine/electron/entries/helper/nbstore/workspace-handlers.service').WorkspaceHandlersService['getBackupWorkspaces']>;
deleteBackupWorkspace: ApiMethod<import('@affine/electron/entries/helper/nbstore/workspace-handlers.service').WorkspaceHandlersService['deleteBackupWorkspace']>;
};
findInPage: {
/**
* Initiates a find-in-page operation for the current WebContents.
*/
find: ApiMethod<import('@affine/electron/entries/main/misc/find-in-page.service').FindInPageService['find']>;
/**
* Stops the current find-in-page operation for the current WebContents.
*/
clear: ApiMethod<import('@affine/electron/entries/main/misc/find-in-page.service').FindInPageService['clear']>;
};
ui: {
handleCloseApp: ApiMethod<import('@affine/electron/entries/main/misc/utils-handle.service').UtilsHandleService['handleCloseApp']>;
restartApp: ApiMethod<import('@affine/electron/entries/main/misc/utils-handle.service').UtilsHandleService['restartApp']>;
onLanguageChange: ApiMethod<import('@affine/electron/entries/main/misc/utils-handle.service').UtilsHandleService['onLanguageChange']>;
captureArea: ApiMethod<import('@affine/electron/entries/main/misc/utils-handle.service').UtilsHandleService['captureArea']>;
writeImageToClipboard: ApiMethod<import('@affine/electron/entries/main/misc/utils-handle.service').UtilsHandleService['writeImageToClipboard']>;
getChallengeResponse: ApiMethod<import('@affine/electron/entries/main/misc/utils-handle.service').UtilsHandleService['getChallengeResponse']>;
openExternal: ApiMethod<import('@affine/electron/entries/main/misc/utils-handle.service').UtilsHandleService['openExternal']>;
openThemeEditor: ApiMethod<import('@affine/electron/entries/main/windows/custom-theme-window.service').CustomThemeWindowManager['openThemeEditor']>;
showMainWindow: ApiMethod<import('@affine/electron/entries/main/windows/main-window.service').MainWindowManager['show']>;
handleThemeChange: ApiMethod<import('@affine/electron/entries/main/windows/main-window.service').MainWindowManager['handleThemeChange']>;
isFullScreen: ApiMethod<import('@affine/electron/entries/main/windows/main-window.service').MainWindowManager['isFullScreen']>;
isMaximized: ApiMethod<import('@affine/electron/entries/main/windows/main-window.service').MainWindowManager['isMaximized']>;
handleMinimizeApp: ApiMethod<import('@affine/electron/entries/main/windows/main-window.service').MainWindowManager['handleMinimizeApp']>;
handleHideApp: ApiMethod<import('@affine/electron/entries/main/windows/main-window.service').MainWindowManager['handleHideApp']>;
handleMaximizeApp: ApiMethod<import('@affine/electron/entries/main/windows/main-window.service').MainWindowManager['handleMaximizeApp']>;
handleWindowResize: ApiMethod<import('@affine/electron/entries/main/windows/tab-views.service').TabViewsManager['handleWindowResize']>;
isActiveTab: ApiMethod<import('@affine/electron/entries/main/windows/tab-views.service').TabViewsIpcRegistry['isActiveTab']>;
getWorkbenchMeta: ApiMethod<import('@affine/electron/entries/main/windows/tab-views.service').TabViewsIpcRegistry['getWorkbenchMeta']>;
updateWorkbenchMeta: ApiMethod<import('@affine/electron/entries/main/windows/tab-views.service').TabViewsIpcRegistry['updateWorkbenchMeta']>;
getTabViewsMeta: ApiMethod<import('@affine/electron/entries/main/windows/tab-views.service').TabViewsIpcRegistry['getTabViewsMeta']>;
getTabsStatus: ApiMethod<import('@affine/electron/entries/main/windows/tab-views.service').TabViewsIpcRegistry['getTabsStatus']>;
addTab: ApiMethod<import('@affine/electron/entries/main/windows/tab-views.service').TabViewsIpcRegistry['addTab']>;
showTab: ApiMethod<import('@affine/electron/entries/main/windows/tab-views.service').TabViewsIpcRegistry['showTab']>;
tabGoTo: ApiMethod<import('@affine/electron/entries/main/windows/tab-views.service').TabViewsIpcRegistry['tabGoTo']>;
closeTab: ApiMethod<import('@affine/electron/entries/main/windows/tab-views.service').TabViewsIpcRegistry['closeTab']>;
activateView: ApiMethod<import('@affine/electron/entries/main/windows/tab-views.service').TabViewsIpcRegistry['activateView']>;
moveTab: ApiMethod<import('@affine/electron/entries/main/windows/tab-views.service').TabViewsIpcRegistry['moveTab']>;
/**
* Toggle right sidebar visibility for a given tab.
*/
toggleRightSidebar: ApiMethod<import('@affine/electron/entries/main/windows/tab-views.service').TabViewsIpcRegistry['toggleRightSidebar']>;
/**
* Inform main process that the renderer layout has become (un)ready so
* the view ordering / resizing can be updated.
*/
pingAppLayoutReady: ApiMethod<import('@affine/electron/entries/main/windows/tab-views.service').TabViewsIpcRegistry['pingAppLayoutReady']>;
showTabContextMenu: ApiMethod<import('@affine/electron/entries/main/windows/tab-views.service').TabViewsIpcRegistry['showTabContextMenu']>;
updateActiveViewMeta: ApiMethod<import('@affine/electron/entries/main/windows/tab-views.service').TabViewsIpcRegistry['updateActiveViewMeta']>;
};
recording: {
setupRecordingFeature: ApiMethod<import('@affine/electron/entries/main/recording/recording.service').RecordingManager['setupRecordingFeature']>;
askForScreenRecordingPermission: ApiMethod<import('@affine/electron/entries/main/recording/recording.service').RecordingManager['askForScreenRecordingPermission']>;
getRecording: ApiMethod<import('@affine/electron/entries/main/recording/recording.service').RecordingManager['getRecording']>;
getCurrentRecording: ApiMethod<import('@affine/electron/entries/main/recording/recording.service').RecordingManager['getCurrentRecording']>;
startRecording: ApiMethod<import('@affine/electron/entries/main/recording/recording.service').RecordingManager['startRecording']>;
stopRecording: ApiMethod<import('@affine/electron/entries/main/recording/recording.service').RecordingManager['stopRecording']>;
pauseRecording: ApiMethod<import('@affine/electron/entries/main/recording/recording.service').RecordingManager['pauseRecording']>;
resumeRecording: ApiMethod<import('@affine/electron/entries/main/recording/recording.service').RecordingManager['resumeRecording']>;
removeRecording: ApiMethod<import('@affine/electron/entries/main/recording/recording.service').RecordingManager['removeRecording']>;
readyRecording: ApiMethod<import('@affine/electron/entries/main/recording/recording.service').RecordingManager['readyRecording']>;
handleBlockCreationSuccess: ApiMethod<import('@affine/electron/entries/main/recording/recording.service').RecordingManager['handleBlockCreationSuccess']>;
handleBlockCreationFailed: ApiMethod<import('@affine/electron/entries/main/recording/recording.service').RecordingManager['handleBlockCreationFailed']>;
disableRecordingFeature: ApiMethod<import('@affine/electron/entries/main/recording/recording.service').RecordingManager['disableRecordingFeature']>;
getRawAudioBuffers: ApiMethod<import('@affine/electron/entries/main/recording/recording.service').RecordingManager['getRawAudioBuffers']>;
checkRecordingAvailable: ApiMethod<import('@affine/electron/entries/main/recording/recording.service').RecordingManager['checkRecordingAvailable']>;
checkMeetingPermissions: ApiMethod<import('@affine/electron/entries/main/recording/recording.service').RecordingManager['checkMeetingPermissions']>;
checkCanRecordMeeting: ApiMethod<import('@affine/electron/entries/main/recording/recording.service').RecordingManager['checkCanRecordMeeting']>;
askForMeetingPermission: ApiMethod<import('@affine/electron/entries/main/recording/recording.service').RecordingManager['askForMeetingPermission']>;
showRecordingPermissionSetting: ApiMethod<import('@affine/electron/entries/main/recording/recording.service').RecordingManager['showRecordingPermissionSetting']>;
showSavedRecordings: ApiMethod<import('@affine/electron/entries/main/recording/recording.service').RecordingManager['showSavedRecordings']>;
};
sharedStorage: {
getAllGlobalState: ApiMethod<import('@affine/electron/entries/main/storage/storage.service').GlobalStateStorage['getAllGlobalState']>;
setGlobalState: ApiMethod<import('@affine/electron/entries/main/storage/storage.service').GlobalStateStorage['setGlobalState']>;
delGlobalState: ApiMethod<import('@affine/electron/entries/main/storage/storage.service').GlobalStateStorage['delGlobalState']>;
clearGlobalState: ApiMethod<import('@affine/electron/entries/main/storage/storage.service').GlobalStateStorage['clearGlobalState']>;
getAllGlobalCache: ApiMethod<import('@affine/electron/entries/main/storage/storage.service').GlobalCacheStorage['getAllGlobalCache']>;
setGlobalCache: ApiMethod<import('@affine/electron/entries/main/storage/storage.service').GlobalCacheStorage['setGlobalCache']>;
delGlobalCache: ApiMethod<import('@affine/electron/entries/main/storage/storage.service').GlobalCacheStorage['delGlobalCache']>;
clearGlobalCache: ApiMethod<import('@affine/electron/entries/main/storage/storage.service').GlobalCacheStorage['clearGlobalCache']>;
};
updater: {
currentVersion: ApiMethod<import('@affine/electron/entries/main/updater/updater-manager.service').UpdaterManagerService['currentVersion']>;
quitAndInstall: ApiMethod<import('@affine/electron/entries/main/updater/updater-manager.service').UpdaterManagerService['quitAndInstall']>;
getConfig: ApiMethod<import('@affine/electron/entries/main/updater/updater-manager.service').UpdaterManagerService['getConfig']>;
setConfig: ApiMethod<import('@affine/electron/entries/main/updater/updater-manager.service').UpdaterManagerService['setConfig']>;
checkForUpdates: ApiMethod<import('@affine/electron/entries/main/updater/updater-manager.service').UpdaterManagerService['checkForUpdates']>;
downloadUpdate: ApiMethod<import('@affine/electron/entries/main/updater/updater-manager.service').UpdaterManagerService['downloadUpdate']>;
};
popup: {
getCurrentNotification: ApiMethod<import('@affine/electron/entries/main/windows/popup.service').PopupManager['getCurrentNotification']>;
dismissCurrentNotification: ApiMethod<import('@affine/electron/entries/main/windows/popup.service').PopupManager['dismissCurrentNotification']>;
dismissCurrentRecording: ApiMethod<import('@affine/electron/entries/main/windows/popup.service').PopupManager['dismissCurrentRecording']>;
};
worker: {
connectWorker: ApiMethod<import('@affine/electron/entries/main/windows/worker-manager.service').WorkerManager['connectWorkerIpc']>;
disconnectWorker: ApiMethod<import('@affine/electron/entries/main/windows/worker-manager.service').WorkerManager['disconnectWorkerIpc']>;
};
db: {
getDocAsUpdates: ApiMethod<import('@affine/electron/entries/helper/nbstore/v1/index').LegacyDBHandlers['getDocAsUpdates']>;
getDocTimestamps: ApiMethod<import('@affine/electron/entries/helper/nbstore/v1/index').LegacyDBHandlers['getDocTimestamps']>;
getBlob: ApiMethod<import('@affine/electron/entries/helper/nbstore/v1/index').LegacyDBHandlers['getBlob']>;
getBlobKeys: ApiMethod<import('@affine/electron/entries/helper/nbstore/v1/index').LegacyDBHandlers['getBlobKeys']>;
};
}
@@ -0,0 +1,46 @@
// AUTO-GENERATED FILE. DO NOT EDIT MANUALLY.
// Generated by: packages/frontend/apps/electron/scripts/generate-types.ts
/* eslint-disable @typescript-eslint/no-explicit-any */
import type { Observable } from 'rxjs';
type ToSubscribe<T extends Observable<unknown>> = T extends Observable<infer P> ? (callback: (payload: P) => void) => () => void : never;
export interface ElectronEvents {
ui: {
/**
* Emits when an authentication request is received via deep link.
*/
onAuthenticationRequest: ToSubscribe<import('@affine/electron/entries/main/misc/deep-link.service').DeepLinkService['authenticationRequest$']>;
onMaximized: ToSubscribe<import('@affine/electron/entries/main/windows/main-window.service').MainWindowManager['maximized$']>;
onFullScreen: ToSubscribe<import('@affine/electron/entries/main/windows/main-window.service').MainWindowManager['fullScreen$']>;
onTabViewsMetaChange: ToSubscribe<import('@affine/electron/entries/main/windows/tab-views.service').TabViewsManager['tabViewsMeta$']>;
onTabsStatusChange: ToSubscribe<import('@affine/electron/entries/main/windows/tab-views.service').TabViewsManager['tabsStatus$']>;
onCloseView: ToSubscribe<import('@affine/electron/entries/main/windows/tab-views.service').TabViewsManager['closeView$']>;
/**
* Emits whenever a tab action is triggered.
*/
onTabAction: ToSubscribe<import('@affine/electron/entries/main/windows/tab-views.service').TabViewsManager['tabAction$']>;
onActiveTabChanged: ToSubscribe<import('@affine/electron/entries/main/windows/tab-views.service').TabViewsManager['activeWorkbenchId$']>;
onToggleRightSidebar: ToSubscribe<import('@affine/electron/entries/main/windows/tab-views.service').TabViewsIpcRegistry['toggleRightSidebar$']>;
onTabShellViewActiveChange: ToSubscribe<import('@affine/electron/entries/main/windows/tab-views.service').TabViewsIpcRegistry['tabShellViewActiveChange$']>;
onTabGoToRequest: ToSubscribe<import('@affine/electron/entries/main/windows/tab-views.service').TabViewsIpcRegistry['tabGoToRequest$']>;
};
recording: {
onRecordingStatusChanged: ToSubscribe<import('@affine/electron/entries/main/recording/recording.service').RecordingManager['recordingStatusChanged$']>;
};
sharedStorage: {
onGlobalStateChanged: ToSubscribe<import('@affine/electron/entries/main/storage/storage.service').GlobalStateStorage['globalStateChanged$']>;
onGlobalCacheChanged: ToSubscribe<import('@affine/electron/entries/main/storage/storage.service').GlobalCacheStorage['globalCacheChanged$']>;
};
updater: {
onUpdateAvailable: ToSubscribe<import('@affine/electron/entries/main/updater/updater-manager.service').UpdaterManagerService['updateAvailable$']>;
onUpdateReady: ToSubscribe<import('@affine/electron/entries/main/updater/updater-manager.service').UpdaterManagerService['updateReady$']>;
onDownloadProgress: ToSubscribe<import('@affine/electron/entries/main/updater/updater-manager.service').UpdaterManagerService['downloadProgress$']>;
};
menu: {
onOpenInSettingModal: ToSubscribe<import('@affine/electron/entries/main/windows/application-menu.service').ApplicationMenuManager['openInSettingModal$']>;
onNewPageAction: ToSubscribe<import('@affine/electron/entries/main/windows/application-menu.service').ApplicationMenuManager['newPageAction$']>;
onOpenJournal: ToSubscribe<import('@affine/electron/entries/main/windows/application-menu.service').ApplicationMenuManager['openJournal$']>;
};
}