import type { AuthorizationResultBasedUpdateMutator } from './AuthorizationResultBasedEntityMutator.ts'; import type { EntityPrivacyPolicy } from './EntityPrivacyPolicy.ts'; import type { ReadonlyEntity } from './ReadonlyEntity.ts'; import type { ViewerContext } from './ViewerContext.ts'; /** * Enforcing entity updater. All updates * through this updater will throw if authorization is not successful. */ export declare class EnforcingEntityUpdater, TIDField extends keyof NonNullable>, TViewerContext extends ViewerContext, TEntity extends ReadonlyEntity, TPrivacyPolicy extends EntityPrivacyPolicy, TSelectedFields extends keyof TFields> { private readonly entityUpdater; constructor(entityUpdater: AuthorizationResultBasedUpdateMutator); /** * Set the value for entity field. * @param fieldName - entity field being updated * @param value - value for entity field */ setField>(fieldName: K, value: TFields[K]): this; /** * Commit the changes to the entity after authorizing against update privacy rules. * Invalidates all caches for pre-update entity. * @returns authorized updated entity, throws upon update failure */ updateAsync(): Promise; }