@gabliam/web-core
Version:
Gabliam plugin for add web-core
46 lines (45 loc) • 1.11 kB
TypeScript
import { inversifyInterfaces } from '@gabliam/core';
import { InterceptorInfo } from './interceptors';
import { extractArgsFn } from './interface';
export interface WebPluginConfig {
/**
* Root path
*/
rootPath: string;
/**
* Port
*/
port: number;
/**
* Hostname
*/
hostname: string;
/**
* Verbose start server
* default: true
*/
verbose: boolean;
}
export interface RestMetadata<T = string> extends WebPluginConfig {
controllerInfo: Map<inversifyInterfaces.ServiceIdentifier<any>, ControllerInfo<T>>;
}
export interface ControllerInfo<T = string> {
controllerPath: string;
methods: MethodInfo<T>[];
}
export interface MethodInfo<T = string> {
controllerId: inversifyInterfaces.ServiceIdentifier<any>;
methodName: string;
json: boolean;
extractArgs: extractArgsFn;
methodPath: string;
method: T;
interceptors: InterceptorInfo[];
}
export declare class WebPluginBaseConfig {
rootPath: string;
port: number;
hostname: string;
verbose: boolean;
restConfig(): WebPluginConfig;
}