Skip to main content

@idpass/data-collect-core / PurgeOutOfScopeCallback

Type Alias: PurgeOutOfScopeCallback

PurgeOutOfScopeCallback = (keepGuids) => Promise<void>

Defined in: components/internalSync/types.ts:67

Optional callback to purge local entities that fell out of the server-advertised sync scope. Invoked by the sync machine after a scope-rotation re-pull completes; receives the set of entity GUIDs the server delivered during the re-pull session and is expected to drop the complement.

Implementations typically delegate to EntityDataManager.purgeEntitiesNotIn.

When omitted, scope rotation is detected (and the new hash persisted) but no purge runs — useful in tests or in environments that intentionally want to retain previously-scoped data.

Parameters

keepGuids

readonly string[]

Returns

Promise<void>