interface.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. export enum IMethod {
  2. "post",
  3. "put",
  4. "get",
  5. "delete"
  6. }
  7. export type IParamsTypeEnum = "String" | "bool" | "num" | "DateTime" | "object" | "list" | "enum" | "int" | "double" | "dynamic" | "number";
  8. export type IParamsTypeEnum1 = "String" | "bool" | "num" | "DateTime" | "int" | "double";
  9. export type IParamsType = {
  10. type: IParamsTypeEnum, jsonKey?: string, required?: boolean, desc?: string, enum?: Record<string, string | number>, child?: Record<string, IParamsType> | "String" | "bool" | "num" | "DateTime" | "double" | "int",
  11. final?: boolean,
  12. url?: boolean
  13. };
  14. export interface IApiDocFuncInterface {
  15. body?: Record<string, IParamsType>;
  16. params?: Record<string, IParamsType>;
  17. response?: Record<string, IParamsType> | IParamsTypeEnum1 | [Record<string, IParamsType> | IParamsTypeEnum1];
  18. }
  19. export interface IApiDocInterface {
  20. [key: string]: {
  21. funcName: string;
  22. desc?: string;
  23. contentType?: "json" | "urlencoded" | "formData",
  24. "post"?: IApiDocFuncInterface;
  25. "put"?: IApiDocFuncInterface;
  26. "delete"?: IApiDocFuncInterface;
  27. "get"?: IApiDocFuncInterface;
  28. };
  29. }