UNPKG

nestjs-prisma-base

Version:

A reusable NestJS module for Prisma ORM with base classes for controller, service and DTOs

18 lines (17 loc) 1.07 kB
import 'reflect-metadata'; export declare enum EndpointType { FIND_ALL = "findAll", FIND_ONE = "findOne", CREATE = "create", UPDATE = "update", REMOVE = "remove" } export declare const ENABLED_ENDPOINTS_KEY = "endpoints:enabled"; export declare const DISABLED_ENDPOINTS_KEY = "endpoints:disabled"; export declare const ENDPOINT_ENABLED_KEY = "endpoint:enabled"; export declare const ENDPOINT_DISABLED_KEY = "endpoint:disabled"; export declare function EnableEndpoint(endpointName: EndpointType | string): (target: any, propertyKey?: string, descriptor?: PropertyDescriptor) => any; export declare function DisableEndpoint(endpointName: EndpointType | string): (target: any, propertyKey?: string, descriptor?: PropertyDescriptor) => any; export declare function EnableAllEndpoints(): (target: any, propertyKey?: string, descriptor?: PropertyDescriptor) => any; export declare function isEndpointEnabled(target: any, endpointName: string): boolean; export declare function ApiExcludeDisabledEndpoint(endpointName: EndpointType | string): MethodDecorator;