diff --git a/packages/desktop-api/src/index.ts b/packages/desktop-api/src/index.ts index 60e88569e7bf4..9d10c1f89d1c5 100644 --- a/packages/desktop-api/src/index.ts +++ b/packages/desktop-api/src/index.ts @@ -14,7 +14,21 @@ export type OutlookEventsResponse = { status: 'success' | 'canceled'; }; +export type CustomNotificationOptions = { + type: 'voice' | 'text'; + id?: string; + payload: { + title: string; + body: string; + avatar?: string; + silent?: boolean; + requireInteraction?: boolean; + }; +}; + export interface IRocketChatDesktop { + dispatchCustomNotification: (options: CustomNotificationOptions) => void; + closeCustomNotification: (id: string) => void; onReady: (cb: (serverInfo: ServerInfo) => void) => void; setServerInfo: (serverInfo: ServerInfo) => void; setUrlResolver: (getAbsoluteUrl: (relativePath?: string) => string) => void;