@elsikora/nestjs-crud-automator
Version:
A library for automating the creation of CRUD operations in NestJS.
15 lines (14 loc) • 1.21 kB
TypeScript
import { IApiBaseEntity } from '../../../../interface/api-base-entity.interface';
import { IApiAuthorizationDecision } from '../../../../interface/class/api/authorization';
import { TApiAuthorizationScopeWhere } from '../../../../type/class/api/authorization/scope-where.type';
/**
* Owns the generated-route authorization decision used after guard execution.
* Subscriber-facing decisions are detached views and can never mutate this snapshot.
*/
export declare class ApiControllerGeneratedSecuritySnapshot {
static create<E extends IApiBaseEntity, R>(decision: IApiAuthorizationDecision<E, R> | undefined): IApiAuthorizationDecision<E, R> | undefined;
static createMutableScopeWhere<E extends IApiBaseEntity, R>(snapshot: IApiAuthorizationDecision<E, R> | undefined): TApiAuthorizationScopeWhere<E>;
static createSubscriberView<E extends IApiBaseEntity, R>(snapshot: IApiAuthorizationDecision<E, R> | undefined, resource?: E): IApiAuthorizationDecision<E, R> | undefined;
static detach<T>(value: T): T;
static withResource<E extends IApiBaseEntity, R>(snapshot: IApiAuthorizationDecision<E, R> | undefined, resource: E | undefined): IApiAuthorizationDecision<E, R> | undefined;
}