/**
 * Server 类型定义
 */
export type CacheType = 'memory' | 'storage' | 'indexDB';
export interface CacheProps {
    key?: string;
    type?: CacheType;
    updateCache?: boolean;
    cacheUpdateChange?: (data: any) => void;
}
export interface RequestSetting {
    abort?: boolean;
    headers?: any;
    cache?: CacheProps;
    signal?: any;
    token?: string;
    osServer?: boolean;
    [key: string]: any;
}
/**
 * 路由处理函数类型
 */
export type RouteHandler = (params: {
    url: string;
    method: 'get' | 'post' | 'remove' | 'put';
    data?: any;
    config?: RequestSetting;
    /** 路由路径（前缀匹配时由 handleRoute 注入，便于 handler 解析动态段） */
    path?: string;
}) => Promise<any> | any;
/**
 * HTTP 方法类型
 */
export type HttpMethod = 'get' | 'post' | 'remove' | 'put';
/**
 * 路由定义类型
 */
export type RouteDefinition = {
    method: HttpMethod;
    path: string;
    handler: RouteHandler;
};
/**
 * Router 对象类型
 */
export interface Router {
    get: Record<string, RouteHandler>;
    post: Record<string, RouteHandler>;
    put: Record<string, RouteHandler>;
    remove: Record<string, RouteHandler>;
}
/**
 * 模块注册配置（内部使用）
 */
export interface ModuleRegistryConfig {
    /** 模块名称 */
    name: string;
    /** 模块类 */
    moduleClass: any;
    /** 模块完整名称（用于注册到 Core） */
    moduleName: string;
    /** 模块版本 */
    version: string;
    /** 默认 store 结构 */
    defaultStore: Record<string, any>;
}
