/** operate_type for `tool/perm/apply`. */
export declare const PERM_OPERATE_ADD = 1;
export declare const PERM_OPERATE_REMOVE = 2;
/** One OpenAPI / resource a permission scope covers (= AppResourceMeta). */
export interface AppResourceMeta {
    /** resource key */
    key?: string;
    /** human-readable name, e.g. "查询工作项详情" */
    name?: string;
    /** OpenAPI doc URL */
    url?: string;
}
/** A permission scope this plugin has checked / is applying for (= AppPermInfoWithReason). */
export interface AppPermInfoWithReason {
    /** permission (scope) key */
    key?: string;
    /** application reason */
    reason?: string;
    /** audit status; 1 = approved */
    status?: number;
}
/** Metadata for one permission scope this plugin may apply for (= AppPermMeta). */
export interface AppPermMeta {
    /** permission (scope) key */
    key?: string;
    /** permission name */
    name?: string;
    /** permission category */
    type?: string;
    /** permission description */
    description?: string;
    /** visibility bits (bit0=self-built, bit1=isv; 1 = not visible) */
    visible_bit?: number;
    /** audit bits (bit0=self-built, bit1=isv; 1 = needs audit) */
    auditable_bit?: number;
    /** the OpenAPIs / resources this scope covers — the scope↔OpenAPI mapping */
    resource?: AppResourceMeta[];
    /** category sort value */
    type_val?: number;
    /** 1 = this is an app-management permission */
    app_management_bit?: number;
}
/** Response of `tool/perm/list` (= GetAppPermInfoWithMetaListResponse). */
export interface AppPermListResult {
    /** scopes already checked / granted for this plugin */
    perm_info?: AppPermInfoWithReason[];
    /** full catalog of scopes this plugin may apply for (already app_type/point-type filtered) */
    perm_meta?: AppPermMeta[];
}
/** Response of `tool/perm/apply` (= SaveAppPermInfoWithReasonResponse). */
export interface AppPermApplyResult {
    /** the resulting checked scopes after the apply */
    perm_info?: AppPermInfoWithReason[];
}
export declare function getAppPermList(pluginId: string, siteDomain: string, keyword?: string): Promise<AppPermListResult>;
export declare function applyAppPerm(pluginId: string, siteDomain: string, scopeKeys: string[], operateType?: number): Promise<AppPermApplyResult>;
