import { RequestConfig, UploadConfig, DictOption } from '../../config'; /** * 通用 API 服务 Hook */ export declare function useApiService(): { request: (urlOrConfig: string | RequestConfig, options?: Omit) => Promise; get: (url: string, params?: Record, options?: Omit) => Promise; post: (url: string, data?: any, options?: Omit) => Promise; getDictOptions: (dictCode: string) => Promise; upload: (file: File, uploadConfig?: UploadConfig) => Promise; getAccessToken: () => string | null; isConfigured: () => boolean; baseURL: string | undefined; }; /** * 字典数据 Hook * 自动加载并缓存字典数据 */ export declare function useDictOptions(dictCode: string | undefined): { options: DictOption[]; loading: boolean; error: Error | null; }; /** * 远程数据 Hook * 加载远程选项数据 */ export declare function useRemoteOptions(url: string | undefined, config?: { labelKey?: string; valueKey?: string; immediate?: boolean; /** 请求时的查询参数,如 { pageSize: 100, status: 0 } */ params?: Record; /** * 响应中选项数组所在字段名。不传时:根为数组则直接用,否则取 list 或 records。 * 指定后从根对象的该字段取数组,如 "children" 表示从 data.children 取选项列表。 */ field?: string; }): { options: DictOption[]; loading: boolean; error: Error | null; reload: () => Promise; }; export default useApiService; //# sourceMappingURL=useApiService.d.ts.map