Skip to main content

@idpass/data-collect-core / InMemoryConflictStore

Class: InMemoryConflictStore

Defined in: testing/InMemoryConflictStore.ts:25

In-memory implementation of ConflictStore for testing and lightweight use.

Implements

Constructors

Constructor

new InMemoryConflictStore(): InMemoryConflictStore

Returns

InMemoryConflictStore

Methods

saveConflict()

saveConflict(conflict): Promise<void>

Defined in: testing/InMemoryConflictStore.ts:28

Save a conflict record

Parameters

conflict

ConflictRecord

Returns

Promise<void>

Implementation of

ConflictStore.saveConflict


getConflict()

getConflict(guid): Promise<ConflictRecord | null>

Defined in: testing/InMemoryConflictStore.ts:32

Get a conflict by GUID

Parameters

guid

string

Returns

Promise<ConflictRecord | null>

Implementation of

ConflictStore.getConflict


getUnresolvedConflicts()

getUnresolvedConflicts(tenantId): Promise<ConflictRecord[]>

Defined in: testing/InMemoryConflictStore.ts:37

Get all unresolved conflicts for a tenant

Parameters

tenantId

string

Returns

Promise<ConflictRecord[]>

Implementation of

ConflictStore.getUnresolvedConflicts


updateConflict()

updateConflict(guid, updates): Promise<void>

Defined in: testing/InMemoryConflictStore.ts:47

Update a conflict record with partial data

Parameters

guid

string

updates

Partial<ConflictRecord>

Returns

Promise<void>

Implementation of

ConflictStore.updateConflict


getConflictCount()

getConflictCount(tenantId): Promise<number>

Defined in: testing/InMemoryConflictStore.ts:58

Get the number of unresolved conflicts for a tenant

Parameters

tenantId

string

Returns

Promise<number>

Implementation of

ConflictStore.getConflictCount