import { IHandle } from '@feidao-factory/core/on'; export interface IParam { '$or'?: string[]; '$nor'?: string[]; [key: string]: string | number | boolean | unknown; } export interface IPaging { size: number; index: number; } export interface ISort { [field: string]: 0 | 1; } export interface ICondition { param?: IParam; paging?: IPaging; sort?: ISort; } export interface IDesktopSendMsg { reply: string; spaceid: string; type: string; msg: unknown; timeout: number; } export interface IFeidaoAi { readonly data: { readonly [attr: string]: unknown; }; fire(action: string, ...args: Array): Promise; emit(event: string, ...args: Array): Promise; } export interface IFeidaoAiDesktopApp extends IFeidaoAi { readonly data: { readonly spaceid: string; }; } export interface IHandle { destroy(this: IHandle): void; } export interface IFeidaoAiBrowserComponent { readonly data: { readonly [attr: string]: unknown; readonly no: string; readonly node: HTMLElement; readonly params: { [key: string]: unknown; }; readonly url: string; }; parse_event(node: HTMLElement | DocumentFragment): IHandle[]; fire(action: string, ...args: Array): Promise; emit(event: string, ...args: Array): Promise; } export interface IFeidaoAiBrowserPage { readonly data: { readonly [attr: string]: unknown; readonly params: { [key: string]: unknown; }; readonly url: string; }; fire(action: string, ...args: Array): Promise; emit(event: string, ...args: Array): Promise; } export interface IEvents { [event: string]: string; } export interface IActions { [atom: string]: (...args: Array) => Promise | unknown; } export interface IFeidaoAiDesktopComponent extends IFeidaoAi { readonly data: { readonly [attr: string]: unknown; readonly no: string; readonly node: HTMLElement; readonly params: { [key: string]: unknown; }; readonly url: string; }; parse_event(node: HTMLElement | DocumentFragment): IHandle[]; } export interface IFeidaoAiDesktopPage extends IFeidaoAi { readonly data: { readonly [attr: string]: unknown; readonly params: { [key: string]: unknown; }; readonly url: string; }; } export interface IFeidaoAiDesktopApp extends IFeidaoAi { readonly data: { readonly spaceid: string; }; }