import { USER_IDENTITY, UserInfo } from '../auth/interface'; export interface BallonInfo { type?: 'none' | 'info' | 'warning' | 'error'; title?: string; content: string; } export interface AccountInfo { ucKey?: string; currentRole?: USER_IDENTITY; allUserRole: USER_IDENTITY[]; userInfo?: UserInfo; } export type WindowOpenStyle = 'external' | 'popup' | 'navigate'; export interface WorkTableTabInfo { title: string; key: string; icon: string; url: string; reload?: boolean; } export interface PopupInfo { controller?: boolean; title?: string; width?: string; url: string; } export interface TrayMessageInfo { key: number; name: string; icon: string; number: number; } export interface SubView { setUnreadMessageCount: (count: number) => Promise; blinkTray: (info: BallonInfo) => Promise; stopBlinkTray: () => Promise; getWebContentOffset: () => Promise<[x: number, y: number]>; triggerLogout: (message?: string) => Promise; getAccountInfo: () => Promise; onAccountChange: (handler: (accountInfo: AccountInfo) => void) => Promise; offAccountChange: (handler: (accountInfo: AccountInfo) => void) => Promise; openInWorkTable: (workTableTabInfo: WorkTableTabInfo) => Promise; openInPopup: (popupInfo: PopupInfo) => Promise; closePopup: () => Promise; setDefaultWindowOpen: (string: WindowOpenStyle) => Promise; addTrayMessage: (info: TrayMessageInfo) => Promise; deleteTrayMessage: (info: TrayMessageInfo) => Promise; onTrayMessageClick: (handler: (info: TrayMessageInfo) => Promise) => Promise; offTrayMessageClick: (handler: (info: TrayMessageInfo) => Promise) => Promise; } export interface AppBridge { addListener: (name: string, handler: (data: any) => void) => Promise | null; removeListener: (name: string, callback: ReturnType) => Promise; trigger: (name: string, data: any) => Promise; } export interface EventBusListener { name: string; handler: (data: any) => void; receipt: ReturnType; }