import { OsEventEmitter } from '../utils/Event'; interface IAppMenu { children?: IAppMenu[]; [t: symbol]: string; } interface IPageRouter { path: string; children?: IPageRouter[]; [t: symbol]: string; } interface IAppRouter { redirectRouter: string; noAuthority: { path: string; [t: string]: any; }; pageRouter: IPageRouter[]; } interface IMenuAuthority { address: string; appId: string; code: string; id: string; name: string; isAuthority: number; isSelect: string; childList: IMenuAuthority[]; } interface IAppAuthority { token: string; areaId: string; accountId: string; accountName: string; durationOnline: number; appIdList: string[]; resourceList: { appId: string; authApp: any; menuList: IMenuAuthority[]; buttonList: []; }[]; } interface OsSocketEmitter extends OsEventEmitter { status: boolean; send: () => {}; } interface DownloadParam { href: string; filename?: string; dialog?: boolean; } interface IOsOpenApi { appAuthority: IAppAuthority; socket: OsSocketEmitter; eventBus: OsEventEmitter; osOpenPopTool: (arg: any) => Promise; osClosePopTool: (id: string) => void; osFindPop: (id: string) => any; getScreenCapture: () => string[]; download: (option: DownloadParam) => void; } interface TCommon { title: string; name: string; top?: number; left?: number; width?: number; height?: number; [t: string]: any; } type IPopParams = TCommon & ({ action: string; } | { src: string; }); export type { IOsOpenApi, IAppRouter, IPopParams, IAppMenu, IMenuAuthority, OsSocketEmitter, DownloadParam, };