import type { EntityConfiguration } from './EntityConfiguration.ts'; import type { EntityTransactionalQueryContext } from './EntityQueryContext.ts'; import type { ReadonlyEntity } from './ReadonlyEntity.ts'; import type { ViewerContext } from './ViewerContext.ts'; import type { EntityDataManager } from './internal/EntityDataManager.ts'; import type { IEntityMetricsAdapter } from './metrics/IEntityMetricsAdapter.ts'; /** * Entity invalidation utilities. * Methods are exposed publicly since in rare cases they may need to be called manually. */ export declare class EntityInvalidationUtils, TIDField extends keyof NonNullable>, TViewerContext extends ViewerContext, TEntity extends ReadonlyEntity, TSelectedFields extends keyof TFields> { private readonly entityConfiguration; private readonly dataManager; protected readonly metricsAdapter: IEntityMetricsAdapter; constructor(entityConfiguration: EntityConfiguration, dataManager: EntityDataManager, metricsAdapter: IEntityMetricsAdapter); private getKeyValuePairsFromObjectFields; /** * Invalidate all caches and local dataloaders for an entity's fields. Exposed primarily for internal use by EntityMutator. * @param objectFields - entity data object to be invalidated */ invalidateFieldsAsync(objectFields: Readonly): Promise; /** * Invalidate all local dataloaders specific to a transaction for an entity's fields. Exposed primarily for internal use by EntityMutator. * @param objectFields - entity data object to be invalidated */ invalidateFieldsForTransaction(queryContext: EntityTransactionalQueryContext, objectFields: Readonly): void; /** * Invalidate all caches and local dataloaders for an entity. One potential use case would be to keep the entity * framework in sync with changes made to data outside of the framework. * @param entity - entity to be invalidated */ invalidateEntityAsync(entity: TEntity): Promise; /** * Invalidate all local dataloaders specific to a transaction for an entity. One potential use case would be to keep the entity * framework in sync with changes made to data outside of the framework. * @param entity - entity to be invalidated */ invalidateEntityForTransaction(queryContext: EntityTransactionalQueryContext, entity: TEntity): void; }