lakutata
Version:
An IoC-based universal application framework.
131 lines (126 loc) • 6.09 kB
TypeScript
import { Controller, ControllerProperty } from './TypeDef.internal.117.js';
import { MethodDecorator, ActionPattern } from './TypeDef.internal.100.js';
import { DTO } from './TypeDef.internal.96.js';
import { ActionOptions } from './TypeDef.internal.116.js';
import { CLIContext, HTTPContext, ServiceContext } from './TypeDef.internal.115.js';
/**
* Method Decorator
* @param command
* @constructor
*/
declare function CLIAction<ClassPrototype extends Controller, Method, DTOConstructor extends typeof DTO = typeof DTO>(command: string): MethodDecorator<ClassPrototype, Method, ControllerProperty<ClassPrototype>>;
/**
* Method Decorator
* @param command
* @param dtoConstructor
* @constructor
*/
declare function CLIAction<ClassPrototype extends Controller, Method, DTOConstructor extends typeof DTO = typeof DTO>(command: string, dtoConstructor: DTOConstructor): MethodDecorator<ClassPrototype, Method, ControllerProperty<ClassPrototype>>;
/**
* Method Decorator
* @param command
* @param actionOptions
* @constructor
*/
declare function CLIAction<ClassPrototype extends Controller, Method, DTOConstructor extends typeof DTO = typeof DTO>(command: string, actionOptions: ActionOptions<CLIContext>): MethodDecorator<ClassPrototype, Method, ControllerProperty<ClassPrototype>>;
/**
* Method Decorator
* @param command
* @param dtoConstructor
* @param actionOptions
* @constructor
*/
declare function CLIAction<ClassPrototype extends Controller, Method, DTOConstructor extends typeof DTO = typeof DTO>(command: string, dtoConstructor: DTOConstructor, actionOptions: ActionOptions<CLIContext>): MethodDecorator<ClassPrototype, Method, ControllerProperty<ClassPrototype>>;
/**
* Method Decorator
* @param route
* @param method
* @constructor
*/
declare function HTTPAction<ClassPrototype extends Controller, Method, DTOConstructor extends typeof DTO = typeof DTO>(route: string, method: string): MethodDecorator<ClassPrototype, Method, ControllerProperty<ClassPrototype>>;
/**
* Method Decorator
* @param route
* @param method
* @param dtoConstructor
* @constructor
*/
declare function HTTPAction<ClassPrototype extends Controller, Method, DTOConstructor extends typeof DTO = typeof DTO>(route: string, method: string, dtoConstructor: DTOConstructor): MethodDecorator<ClassPrototype, Method, ControllerProperty<ClassPrototype>>;
/**
* Method Decorator
* @param route
* @param method
* @param actionOptions
* @constructor
*/
declare function HTTPAction<ClassPrototype extends Controller, Method, DTOConstructor extends typeof DTO = typeof DTO>(route: string, method: string, actionOptions: ActionOptions<HTTPContext>): MethodDecorator<ClassPrototype, Method, ControllerProperty<ClassPrototype>>;
/**
* Method Decorator
* @param route
* @param method
* @param dtoConstructor
* @param actionOptions
* @constructor
*/
declare function HTTPAction<ClassPrototype extends Controller, Method, DTOConstructor extends typeof DTO = typeof DTO>(route: string, method: string, dtoConstructor: DTOConstructor, actionOptions: ActionOptions<HTTPContext>): MethodDecorator<ClassPrototype, Method, ControllerProperty<ClassPrototype>>;
/**
* Method Decorator
* @param route
* @param methods
* @constructor
*/
declare function HTTPAction<ClassPrototype extends Controller, Method, DTOConstructor extends typeof DTO = typeof DTO>(route: string, methods: string[]): MethodDecorator<ClassPrototype, Method, ControllerProperty<ClassPrototype>>;
/**
* Method Decorator
* @param route
* @param methods
* @param dtoConstructor
* @constructor
*/
declare function HTTPAction<ClassPrototype extends Controller, Method, DTOConstructor extends typeof DTO = typeof DTO>(route: string, methods: string[], dtoConstructor: DTOConstructor): MethodDecorator<ClassPrototype, Method, ControllerProperty<ClassPrototype>>;
/**
* Method Decorator
* @param route
* @param methods
* @param actionOptions
* @constructor
*/
declare function HTTPAction<ClassPrototype extends Controller, Method, DTOConstructor extends typeof DTO = typeof DTO>(route: string, methods: string[], actionOptions: ActionOptions<HTTPContext>): MethodDecorator<ClassPrototype, Method, ControllerProperty<ClassPrototype>>;
/**
* Method Decorator
* @param route
* @param methods
* @param dtoConstructor
* @param actionOptions
* @constructor
*/
declare function HTTPAction<ClassPrototype extends Controller, Method, DTOConstructor extends typeof DTO = typeof DTO>(route: string, methods: string[], dtoConstructor: DTOConstructor, actionOptions: ActionOptions<HTTPContext>): MethodDecorator<ClassPrototype, Method, ControllerProperty<ClassPrototype>>;
/**
* Method Decorator
* @param pattern
* @constructor
*/
declare function ServiceAction<ClassPrototype extends Controller, Method, DTOConstructor extends typeof DTO = typeof DTO>(pattern: ActionPattern): MethodDecorator<ClassPrototype, Method, ControllerProperty<ClassPrototype>>;
/**
* Method Decorator
* @param pattern
* @param dtoConstructor
* @constructor
*/
declare function ServiceAction<ClassPrototype extends Controller, Method, DTOConstructor extends typeof DTO = typeof DTO>(pattern: ActionPattern, dtoConstructor: DTOConstructor): MethodDecorator<ClassPrototype, Method, ControllerProperty<ClassPrototype>>;
/**
* Method Decorator
* @param pattern
* @param actionOptions
* @constructor
*/
declare function ServiceAction<ClassPrototype extends Controller, Method, DTOConstructor extends typeof DTO = typeof DTO>(pattern: ActionPattern, actionOptions: ActionOptions<ServiceContext>): MethodDecorator<ClassPrototype, Method, ControllerProperty<ClassPrototype>>;
/**
* Method Decorator
* @param pattern
* @param dtoConstructor
* @param actionOptions
* @constructor
*/
declare function ServiceAction<ClassPrototype extends Controller, Method, DTOConstructor extends typeof DTO = typeof DTO>(pattern: ActionPattern, dtoConstructor: DTOConstructor, actionOptions: ActionOptions<ServiceContext>): MethodDecorator<ClassPrototype, Method, ControllerProperty<ClassPrototype>>;
export { CLIAction, HTTPAction, ServiceAction };