auto-request
Version:
通过Yapi JSON Schema生成接口Axios或Taro接口
47 lines (38 loc) • 1.06 kB
TypeScript
/**
* 测试配置类型声明
*/
export interface JsDocConfig {
enabled: boolean;
}
export interface BaseConfig {
filename: string;
isTypeScript: boolean;
loggerPath?: string; // 日志文件完整路径(如 './logs/errors.json')
snapshotsPath?: string;
skipPrompt?: boolean;
ignoreUrls?: string[];
jsdoc?: JsDocConfig;
prefix?: string; // 文件头部代码
endfix?: string; // 文件尾部代码
}
export interface KeplerApiConfig {
url: string;
authorization: string;
projectId: number;
serviceId: number;
branchId: number;
}
export interface AccountConfig {
KEPLER_API: KeplerApiConfig;
baseConfig: BaseConfig;
}
export interface PathsConfig {
loggerPath?: string;
snapshotsPath?: string;
}
export const allApiConfig: BaseConfig;
export const kaeConfig: BaseConfig;
export const openConfig: BaseConfig;
export const usercenterConfig: BaseConfig;
export const accountConfig: AccountConfig;
export function getConfig(baseConfig: BaseConfig, paths: PathsConfig): BaseConfig;