import type { AuthorizationResultBasedEntityLoader } from './AuthorizationResultBasedEntityLoader.ts'; import { EnforcingEntityLoader } from './EnforcingEntityLoader.ts'; import type { IEntityClass } from './Entity.ts'; import type { EntityPrivacyPolicy } from './EntityPrivacyPolicy.ts'; import type { EntityQueryContext } from './EntityQueryContext.ts'; import type { ReadonlyEntity } from './ReadonlyEntity.ts'; import type { ViewerContext } from './ViewerContext.ts'; /** * The primary interface for loading entities. All normal loads are batched, * cached, and authorized against the entity's EntityPrivacyPolicy. */ export declare class EntityLoader, TIDField extends keyof NonNullable>, TViewerContext extends ViewerContext, TViewerContext2 extends TViewerContext, TEntity extends ReadonlyEntity, TPrivacyPolicy extends EntityPrivacyPolicy, TSelectedFields extends keyof TFields> { private readonly viewerContext; private readonly queryContext; private readonly entityClass; constructor(viewerContext: TViewerContext2, queryContext: EntityQueryContext, entityClass: IEntityClass); /** * Enforcing entity loader. All loads through this loader are * guaranteed to be the values of successful results (or null for some loader methods), * and will throw otherwise. */ enforcing(): EnforcingEntityLoader; /** * Authorization-result-based entity loader. All loads through this * loader are results (or null for some loader methods), where an unsuccessful result * means an authorization error or entity construction error occurred. Other errors are thrown. */ withAuthorizationResults(): AuthorizationResultBasedEntityLoader; }