rap2itf
Version:
rapper接口转换为typescirpt interface
32 lines (31 loc) • 965 B
TypeScript
import { Interface, Intf } from '../types';
export declare function interfaceToObj(interfaces: Intf[]): Record<string, Intf[]>;
/** 从rap查询所有接口数据 */
export declare function getInterfaces(rapApiUrl: string): Promise<{
name: string;
id: number;
url: string;
method: string;
description: string;
priority: number;
status: number;
creatorId: number;
lockerId?: any;
moduleId: number;
repositoryId: number;
createdAt: Date;
updatedAt: Date;
deletedAt?: any;
locker?: any;
properties: Interface.IProperty[];
modelName: string;
}[]>;
/** 生成提示文案 */
export declare function creatHeadHelpStr(rapperVersion: string): string;
/**
* 生成接口提示文案
* @param rapUrl Rap平台地址
* @param itf 接口信息
* @param extra 额外信息
*/
export declare function creatInterfaceHelpStr(rapUrl: string, itf: Intf, extra?: string): string;