@idpass/data-collect-core / EntityPair
Interface: EntityPair
Defined in: interfaces/types.ts:95
Represents an entity's initial and current state for change tracking.
Used throughout the system to track modifications and handle sync conflicts.
Example
const entityPair: EntityPair = {
guid: "550e8400-e29b-41d4-a716-446655440000",
initial: originalEntity,
modified: updatedEntity
};
// Check if entity has been modified
const hasChanges = entityPair.initial.version !== entityPair.modified.version;
Properties
guid
guid:
string
Defined in: interfaces/types.ts:97
Global unique identifier for the entity
initial
initial:
EntityDoc|null
Defined in: interfaces/types.ts:99
Entity state when first loaded or last synced (null for entities not yet synced)
modified
modified:
EntityDoc
Defined in: interfaces/types.ts:101
Current entity state with any local modifications