@elsikora/nestjs-crud-automator
Version:
A library for automating the creation of CRUD operations in NestJS.
20 lines (19 loc) • 1.49 kB
TypeScript
import { IApiBaseEntity } from '../../../../interface/api-base-entity.interface';
import { TApiAuthorizationScopeWhere } from '../../../../type/class/api/authorization/scope-where.type';
import { TApiControllerGeneratedScopeFunctionType } from '../../../../type/class/api/controller/generated/scope-function-type.type';
import { EApiFunctionType } from '../../../../enum/decorator/api';
/**
* Carries the final generated-route read predicate to exactly one decorated service call.
* This is intentionally internal: direct service calls retain their ordinary subscriber contract.
*/
export declare class ApiControllerGeneratedReadScopeStorage {
private static readonly STORAGE;
static claim<E extends IApiBaseEntity>(functionType: TApiControllerGeneratedScopeFunctionType, input: object): TApiAuthorizationScopeWhere<E> | undefined;
static isWriteHydration(functionType: EApiFunctionType, input: object): boolean;
static protect<E extends IApiBaseEntity, T extends {
where?: TApiAuthorizationScopeWhere<E>;
}>(properties: T, mandatoryWhere: TApiAuthorizationScopeWhere<E>): T;
static run<E extends IApiBaseEntity, R>(functionType: TApiControllerGeneratedScopeFunctionType, input: object, where: TApiAuthorizationScopeWhere<E>, callback: () => Promise<R>): Promise<R>;
static runWriteHydration<E extends IApiBaseEntity, R>(input: object, where: TApiAuthorizationScopeWhere<E>, callback: () => Promise<R>): Promise<R>;
private static runWithEntry;
}