@deepkit/api-console-api
Version:
79 lines (78 loc) • 2.71 kB
TypeScript
import { Excluded, ReflectionClass, Type, TypeMethod, TypeParameter } from '@deepkit/type';
export declare class ApiRouteParameter {
name: string;
type: 'body' | 'query' | 'url';
schema: any;
}
export declare class ApiRouteResponse {
statusCode: number;
description: string;
serializedType: any;
/** @reflection never */
type?: Type;
constructor(statusCode: number, description: string, serializedType: any);
getType(): Type;
}
export declare class ApiDocument {
markdown?: string;
}
export declare class ApiAction {
controllerClassName: string;
controllerPath: string;
methodName: string;
description: string;
groups: string[];
category: string;
/** @reflection never */
protected deserializedMethodType?: TypeMethod & Excluded;
methodType: any;
parameterSignature: string;
returnSignature: string;
constructor(controllerClassName: string, controllerPath: string, methodName: string, description: string, groups: string[], category: string);
getMethodType(): TypeMethod;
/** @reflection never */
getParametersType(): TypeParameter[];
/** @reflection never */
getResultsType(): Type | undefined;
/** @reflection never */
get id(): string;
}
export declare class ApiRoute {
path: string;
httpMethods: string[];
controller: string;
action: string;
description: string;
groups: string[];
category: string;
bodySchemas?: any | undefined;
deserializedBodyType?: ReflectionClass<any> & Excluded;
deserializedQueryType?: ReflectionClass<any> & Excluded;
deserializedUrlType?: ReflectionClass<any> & Excluded;
/** @reflection never */
protected deserializedResultType?: Type & Excluded;
queryType: any;
resultType: any;
urlType: any;
responses: ApiRouteResponse[];
constructor(path: string, httpMethods: string[], controller: string, action: string, description: string, groups: string[], category: string, bodySchemas?: any | undefined);
/** @reflection never */
getBodyType(): ReflectionClass<any> | undefined;
/** @reflection never */
getResultType(): Type | undefined;
/** @reflection never */
getQueryType(): ReflectionClass<any> | undefined;
/** @reflection never */
getUrlType(): ReflectionClass<any> | undefined;
get id(): string;
}
export declare class ApiEntryPoints {
httpRoutes: ApiRoute[];
rpcActions: ApiAction[];
}
export declare const ApiConsoleApi: import("@deepkit/rpc").ControllerDefinition<ApiConsoleApi>;
export interface ApiConsoleApi {
getEntryPoints(): ApiEntryPoints;
getDocument(): Promise<ApiDocument>;
}
export declare type __ΩApiConsoleApi = any[];