diff --git a/packages/app-common/src/apis/app/apis.ts b/packages/app-common/src/apis/app/apis.ts index cdfb86a5..f4382a29 100644 --- a/packages/app-common/src/apis/app/apis.ts +++ b/packages/app-common/src/apis/app/apis.ts @@ -3,8 +3,8 @@ import type { IpcRendererInvokerAPI } from '../types'; import type { AppDetails, WindowType } from './types'; export enum AppAPIChannel { - CREATE_WINDOW = 'App_CreateWindow', - GET_APP_DETAILS = 'App_GetAppDetails', + CREATE_WINDOW = 'App:CreateWindow', + GET_APP_DETAILS = 'App:GetAppDetails', } type CreateWindowAPI = IpcRendererInvokerAPI<(type: WindowType) => void>; diff --git a/packages/app-common/src/apis/logger/apis.ts b/packages/app-common/src/apis/logger/apis.ts index bfce3013..decd039a 100644 --- a/packages/app-common/src/apis/logger/apis.ts +++ b/packages/app-common/src/apis/logger/apis.ts @@ -1,12 +1,12 @@ import type { IpcRendererInvokerAPI } from '../types'; export enum LoggerAPIChannel { - LOG = 'Logger_Log', - ERROR = 'Logger_Error', - WARN = 'Logger_Warn', - INFO = 'Logger_Info', - VERBOSE = 'Logger_Verbose', - DEBUG = 'Logger_Debug', + LOG = 'Logger:Log', + ERROR = 'Logger:Error', + WARN = 'Logger:Warn', + INFO = 'Logger:Info', + VERBOSE = 'Logger:Verbose', + DEBUG = 'Logger:Debug', } type LogLevel = 'error' | 'warn' | 'info' | 'verbose' | 'debug'; diff --git a/packages/app-common/src/apis/types.ts b/packages/app-common/src/apis/types.ts index 47de7a75..4b1239c5 100644 --- a/packages/app-common/src/apis/types.ts +++ b/packages/app-common/src/apis/types.ts @@ -33,3 +33,8 @@ export interface IpcRendererInvokerAPI { main: IpcMainHandler; renderer: IpcRendererInvoker; } + +export interface IpcMainSenderAPI { + main: (...args: Parameters) => void; + renderer: (listener: IpcRendererListener) => void; +}