Skip to content

AIDK API Reference / aidk-server / InMemoryInteractionRepository

Class: InMemoryInteractionRepository ​

Defined in: packages/server/src/persistence/in-memory.ts:275

Implements ​

Constructors ​

Constructor ​

ts
new InMemoryInteractionRepository(store: InMemoryStore): InMemoryInteractionRepository;

Defined in: packages/server/src/persistence/in-memory.ts:276

Parameters ​

ParameterType
storeInMemoryStore

Returns ​

InMemoryInteractionRepository

Methods ​

create() ​

ts
create(data: Omit<InteractionEntity, "created_at"> & {
  created_at?: Date;
}): Promise<InteractionEntity>;

Defined in: packages/server/src/persistence/in-memory.ts:278

Parameters ​

ParameterType
dataOmit<InteractionEntity, "created_at"> & { created_at?: Date; }

Returns ​

Promise<InteractionEntity>

Implementation of ​

InteractionRepository.create


findById() ​

ts
findById(id: string): Promise<InteractionEntity | null>;

Defined in: packages/server/src/persistence/in-memory.ts:297

Parameters ​

ParameterType
idstring

Returns ​

Promise<InteractionEntity | null>

Implementation of ​

InteractionRepository.findById


findByThreadId() ​

ts
findByThreadId(threadId: string): Promise<InteractionEntity[]>;

Defined in: packages/server/src/persistence/in-memory.ts:301

Parameters ​

ParameterType
threadIdstring

Returns ​

Promise<InteractionEntity[]>

Implementation of ​

InteractionRepository.findByThreadId


update() ​

ts
update(id: string, updates: Partial<InteractionEntity>): Promise<InteractionEntity | null>;

Defined in: packages/server/src/persistence/in-memory.ts:289

Parameters ​

ParameterType
idstring
updatesPartial<InteractionEntity>

Returns ​

Promise<InteractionEntity | null>

Implementation of ​

InteractionRepository.update

Released under the MIT License.