import { JSONObject } from '@alilc/lowcode-datasource-types/src/value-type';
import { InterpretDataSourceConfig } from '@alilc/lowcode-types';
import { DataSourceCustomExtra, ExtraInterpretDataSource } from '../types';
export declare const PREFIX_API_CACHE = "page_cache_";
export declare const PREFIX_PAGE_NUM = "_nowPage";
export declare const PREFIX_IS_LAST_PAGE = "_isLastPage";
export declare const PREFIX_API_PARAM_NAME = "Params";
export declare const SUFFIX_API_SCRIPT = "Request";
export declare const SUFFIX_DATA_SOURCE_MAP = "dataSourceMap";
export declare const SUFFIX_API_METHOD = "Method";
export declare const GLOBE_API_PARAM = "globeParam";
export type TypeDataSourceType = 'dynamicForm' | 'dataDictionary' | 'dynamicFormCache' | 'dynamicFormDetail' | 'dataLoginUserInfo';
/**
 * 请求头处理
 * @param headers 请求头
 */
export declare function requestHeaderHandler(headers: JSONObject): string;
/**
 * 请求体处理
 * @param params 请求体
 */
export declare function requestParamsHandler(params: JSONObject): string;
/**
 * 请求结果处理
 */
export declare function requestAfterDataHandler(dataSourceItems: InterpretDataSourceConfig, extra: Record<string, DataSourceCustomExtra>): any[];
/**
 * 是否是js表达式
 * @param value
 */
export declare function isJsExpression(value: any): value is {
    type: 'JSExpression';
    value: string;
};
/**
 * 将线上地址转为出码后的请求地址
 * @param dataSourceConfig
 * @param extra 额外参数
 */
export declare function handleUrl(dataSourceConfig: InterpretDataSourceConfig, extra: any): string;
/**
 * 处理分页请求参数
 * 将分页参数转换为ref（pageNum和isLastPage）
 */
export declare function handlePageParamToRef(data: ExtraInterpretDataSource): string[];
/**
 * 将请求参数itemList里面的this.state.xxx 都包裹进reactive里面
 * @param data
 */
export declare function handleParamToRef(data: ExtraInterpretDataSource): string[];
/**
 * 将API转换为ref变量
 * @param data
 */
export declare function handleApiToRef(data: ExtraInterpretDataSource): string[];
/**
 * 获取数据源的id
 * @param id
 * @param extra
 */
export declare function getApiId(id: string, extra: Record<string, DataSourceCustomExtra>): string;
/**
 * 获取请求参数名字
 * @param id
 */
export declare function getApiParamName(id: string): string;
/**
 * 获取请求后置处理方法名
 * @param id
 */
export declare function getApiHandleFunctionName(id: string): string;
/**
 * 获取script 里引入的api名称
 */
export declare function getApiName(apiId: string): string;
/**
 * 获取api请求方法名
 * @param id
 */
export declare function getApiRequestMethodName(id: string): string;
