@nestjsx/crud
Version:
NestJs CRUD for RESTful APIs
31 lines (30 loc) • 1.93 kB
TypeScript
import { RouteParamtypes } from '@nestjs/common/enums/route-paramtypes.enum';
import { ArgumentsHost } from '@nestjs/common';
import { BaseRoute, MergedCrudOptions, AuthOptions } from '../interfaces';
import { BaseRouteName } from '../types';
import { CrudActions } from '../enums';
export declare class R {
static set(metadataKey: any, metadataValue: any, target: Object, propertyKey?: string | symbol): void;
static get<T extends any>(metadataKey: any, target: Object, propertyKey?: string | symbol): T;
static createCustomRouteArg(paramtype: string, index: number, pipes?: any[], data?: any): any;
static createRouteArg(paramtype: RouteParamtypes, index: number, pipes?: any[], data?: any): any;
static setDecorators(decorators: (PropertyDecorator | MethodDecorator)[], target: object, name: string): void;
static setParsedRequestArg(index: number): any;
static setBodyArg(index: number, pipes?: any[]): any;
static setCrudOptions(options: MergedCrudOptions, target: any): void;
static setRoute(route: BaseRoute, func: Function): void;
static setInterceptors(interceptors: any[], func: Function): void;
static setRouteArgs(metadata: any, target: any, name: string): void;
static setRouteArgsTypes(metadata: any, target: any, name: string): void;
static setAction(action: CrudActions, func: Function): void;
static setCrudAuthOptions(metadata: any, target: any): void;
static getCrudAuthOptions(target: any): AuthOptions;
static getCrudOptions(target: any): MergedCrudOptions;
static getAction(func: Function): CrudActions;
static getOverrideRoute(func: Function): BaseRouteName;
static getInterceptors(func: Function): any[];
static getRouteArgs(target: any, name: string): any;
static getRouteArgsTypes(target: any, name: string): any[];
static getParsedBody(func: Function): any;
static getContextRequest(ctx: ArgumentsHost): any;
}