import { Pigeon } from './pigeon.type'; export interface PluginSdkBaseType { [keyName: string]: (params: InputCallbackParams | inputFunc) => void | ((params: inputFunc) => void); } export type MonaPluginEvents = { max: any; pigeon: Pigeon; light: PluginSdkBaseType; removePluginListener: (eventName: string) => void; } & PluginSdkBaseType; export declare const enum ErrorCode { Unknown = -100, TypeError = -101, NoPermission = -102, AppNoRegister = -103 } export type ErrorResponse = { code: ErrorCode | number; message: string; }; export interface InputCallbackParams { data?: T; success?: (data: R) => void; failed?: (error: ErrorResponse) => void; } type inputFunc = (...args: any[]) => void; export type Listener = (data: any) => any; export interface EventOptionsType { isDeepClone?: boolean; once?: boolean; pluginId?: string; appid?: string; } export interface RequestArg { fieldName: string; fieldType: number; children?: RequestArg[]; fieldDesc: string; fieldExample: string; fieldRequired: boolean; subFieldType: number; mapKeyType: number; mapValueType: number; } export interface ResponseArg { fieldName: string; fieldType: number; children?: ResponseArg[]; fieldDesc: string; fieldExample: string; } export interface JsApi { jsApiName: string; hasRelateOpenApi: boolean; jsApiDesc: string; jsApiDetail: string; relateOpenApiPath: string; isRequestRequired: boolean; requestArgJson: RequestArg[]; responseArgJson: ResponseArg[]; isAsync: boolean; } export interface JsApiListResponse { code: number; msg: string; sub_code: number; sub_msg: string; data: { count: number; jsApiList: JsApi[]; }; } export interface JsApiPermissionListResponse { code: number; msg: string; sub_code: number; sub_msg: string; data: { jsNameList: string[]; }; } export interface NativeFetchRes { code: number; raw?: T; } export {};