import type { EntityData, EntityMetadata, EntityDictionary, Primary } from '../typings.js';
/** Represents a pending change (create, update, or delete) for a single entity. */
export declare class ChangeSet<T extends object> {
  entity: T;
  type: ChangeSetType;
  payload: EntityDictionary<T>;
  meta: EntityMetadata<T>;
  private primaryKey?;
  private serializedPrimaryKey?;
  constructor(entity: T, type: ChangeSetType, payload: EntityDictionary<T>, meta: EntityMetadata<T>);
  /** Returns the primary key of the entity, optionally as an object for composite keys. */
  getPrimaryKey(object?: boolean): Primary<T> | null;
  /** Returns the serialized (string) form of the primary key. */
  getSerializedPrimaryKey(): string | null;
}
export interface ChangeSet<T> {
  meta: EntityMetadata<T>;
  rootMeta: EntityMetadata<T>;
  schema?: string;
  type: ChangeSetType;
  entity: T;
  payload: EntityDictionary<T>;
  persisted: boolean;
  originalEntity?: EntityData<T>;
  /** For TPT: changesets for parent tables, ordered from immediate parent to root */
  tptChangeSets?: ChangeSet<T>[];
}
/** Enumeration of change set operation types. */
export declare enum ChangeSetType {
  CREATE = 'create',
  UPDATE = 'update',
  DELETE = 'delete',
  UPDATE_EARLY = 'update_early',
  DELETE_EARLY = 'delete_early',
}
