UNPKG

ncrudify

Version:

Configurable CRUD module for NestJS and Mongoose.

19 lines (18 loc) 653 B
import { OnModuleInit } from "@nestjs/common"; import { Model } from "mongoose"; import { Config } from "./config.entity"; export declare class ConfigService implements OnModuleInit { private configModel; private configCache; constructor(configModel: Model<Config>); onModuleInit(): Promise<void>; load(): Promise<void>; isRouteEnabled(model: string, route: string): boolean; getAll(): Record<string, any>; updateConfig(model: string, updates: Partial<Config>): Promise<void>; notEnabledResponse(modelName: string, route: string): { success: boolean; status: number; message: string; }; }