@elsikora/nestjs-crud-automator
Version:
A library for automating the creation of CRUD operations in NestJS.
12 lines (11 loc) • 797 B
TypeScript
import type { IApiBaseEntity } from '../../../interface/api-base-entity.interface';
import type { IApiAuthorizationDecision } from '../../../interface/class/api/authorization/decision.interface';
/**
* Mutates authorization decision to include the resolved entity resource.
* @template E - Entity type
* @template R - Result payload type
* @param {IApiAuthorizationDecision<E, R> | undefined} decision - Decision to enrich.
* @param {E | undefined} resource - Entity instance to attach.
* @returns {IApiAuthorizationDecision<E, R> | undefined} Updated decision reference.
*/
export declare function AuthorizationDecisionAttachResource<E extends IApiBaseEntity, R>(decision: IApiAuthorizationDecision<E, R> | undefined, resource: E | undefined): IApiAuthorizationDecision<E, R> | undefined;