UNPKG

@mamoorali295/rbac

Version:

Complete RBAC (Role-Based Access Control) system for Node.js with Express middleware, NestJS integration, GraphQL support, MongoDB & PostgreSQL support, modern admin dashboard, TypeScript support, and dynamic permission management

22 lines (21 loc) 691 B
import { Pool } from 'pg'; export interface IPostgresFeature { id?: string; name: string; description: string; created_at?: Date; updated_at?: Date; } export declare class PostgresFeature { private pool; constructor(pool: Pool); create(featureData: IPostgresFeature): Promise<IPostgresFeature>; findByName(name: string): Promise<IPostgresFeature | null>; findById(id: string): Promise<IPostgresFeature | null>; update(id: string, updates: Partial<IPostgresFeature>): Promise<void>; delete(id: string): Promise<void>; getAll(limit?: number, offset?: number): Promise<{ features: IPostgresFeature[]; total: number; }>; }