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

23 lines (22 loc) 758 B
import { Pool } from 'pg'; export interface IPostgresPermission { id?: string; name: string; description: string; created_at?: Date; updated_at?: Date; } export declare class PostgresPermission { private pool; constructor(pool: Pool); create(permissionData: IPostgresPermission): Promise<IPostgresPermission>; findByName(name: string): Promise<IPostgresPermission | null>; findById(id: string): Promise<IPostgresPermission | null>; update(id: string, updates: Partial<IPostgresPermission>): Promise<void>; delete(id: string): Promise<void>; getAll(limit?: number, offset?: number): Promise<{ permissions: IPostgresPermission[]; total: number; }>; createStandard(): Promise<void>; }