import { Operation } from "../types/change-tracker.js"; /** * Represents the changes filtered for a specific entity. * * @example * ```typescript * const changes = user.getChanges(); * const postChanges = changes.of('Post'); * * if (postChanges.hasCreates()) { * console.log('Created posts:', postChanges.creates); * } * * if (postChanges.hasUpdates()) { * postChanges.updates.forEach(({ entity, changed }) => { * console.log(`Post ${entity.id} has changed:`, changed); * }); * } * ``` */ export declare class EntityChanges { private readonly operations; constructor(operations: Operation[]); /** * Returns all created entities */ get creates(): T[]; /** * Returns all updated entities with their changed fields */ get updates(): Array<{ entity: T; changed: Record; }>; /** * Returns all deleted entities */ get deletes(): T[]; /** * Returns the IDs of the created entities */ get createIds(): string[]; /** * Returns the IDs of the updated entities */ get updateIds(): string[]; /** * Returns the IDs of the deleted entities */ get deleteIds(): string[]; /** * Checks if there are any creates */ hasCreates(): boolean; /** * Checks if there are any updates */ hasUpdates(): boolean; /** * Checks if there are any deletes */ hasDeletes(): boolean; /** * Checks if there is any change */ hasChanges(): boolean; /** * Checks if it is empty (no changes) */ isEmpty(): boolean; /** * Returns the total number of operations */ get count(): number; /** * Returns the raw operations (for advanced use cases) */ get rawOperations(): Operation[]; /** * Extracts the ID from an entity */ private extractId; } //# sourceMappingURL=entity-changes.d.ts.map