Skip to main content

Interface: IUserMemoryRepository

Defined in: internal/user-memory-store/types.ts:272

Persistence seam of the user facts: one record per tenant + user, implemented by the host's adapter.

Methods​

deleteByUser()​

deleteByUser(args): Promise<number>

Defined in: internal/user-memory-store/types.ts:321

deleteByUser -- removes the record of a user

About​

GDPR erasure: nothing is left, not even an empty record.

Returns the number of facts removed.

Who needs it​

UserMemoryStore.deleteByUser, for the gateway's deleteUserData.

Parameters​

args​
tenantId​

string

userId​

string

Returns​

Promise<number>


load()​

load(args): Promise<IUserMemoryFact[]>

Defined in: internal/user-memory-store/types.ts:286

load -- the facts of one user

About​

As last saved; [] for a user without a record.

The user's facts whole, in the order they were saved.

Who needs it​

UserMemoryStore.getFacts.

Parameters​

args​
tenantId​

string

userId​

string

Returns​

Promise<IUserMemoryFact[]>


saveAll()​

saveAll(args): Promise<void>

Defined in: internal/user-memory-store/types.ts:303

saveAll -- replaces the user's facts

About​

The whole list at once; an empty list keeps the record.

clear saves an empty list; deleteByUser removes the record itself.

Who needs it​

UserMemoryStore.save, after an extraction or an edit.

Parameters​

args​
facts​

IUserMemoryFact[]

tenantId​

string

userId​

string

Returns​

Promise<void>