@kitstack/nest-powertools
Version:
A comprehensive collection of NestJS powertools, decorators, and utilities to supercharge your backend development
16 lines (15 loc) • 707 B
TypeScript
import type { CustomAuthGuard } from '../types';
export declare class GuardHelper {
private static registry;
static registerGuard(name: string, guard: CustomAuthGuard): void;
static createRoleGuard(roles: string[]): CustomAuthGuard;
static createPermissionGuard(permissions: string[]): CustomAuthGuard;
static createOwnershipGuard(resourceIdParam?: string): CustomAuthGuard;
static createTimeBasedGuard(allowedHours: {
start: number;
end: number;
}): CustomAuthGuard;
static createCompositeGuard(guards: CustomAuthGuard[], operator?: 'AND' | 'OR'): CustomAuthGuard;
static getRegisteredGuards(): string[];
static removeGuard(name: string): boolean;
}