Skip to main content

@idpass/data-collect-core / EntityPair

Interface: EntityPair

Defined in: interfaces/types.ts:91

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:93

Global unique identifier for the entity


initial

initial: EntityDoc

Defined in: interfaces/types.ts:95

Entity state when first loaded or last synced


modified

modified: EntityDoc

Defined in: interfaces/types.ts:97

Current entity state with any local modifications