Skip to content

AIDK API Reference / aidk-server / MetricsRepository

Interface: MetricsRepository ​

Defined in: packages/server/src/types.ts:116

Methods ​

aggregate() ​

ts
aggregate(params?: {
  tenant_id?: string;
  thread_id?: string;
  user_id?: string;
}): Promise<Partial<MetricsEntity>>;

Defined in: packages/server/src/types.ts:120

Parameters ​

ParameterType
params?{ tenant_id?: string; thread_id?: string; user_id?: string; }
params.tenant_id?string
params.thread_id?string
params.user_id?string

Returns ​

Promise<Partial<MetricsEntity>>


create() ​

ts
create(data: MetricsEntity): Promise<MetricsEntity>;

Defined in: packages/server/src/types.ts:117

Parameters ​

ParameterType
dataMetricsEntity

Returns ​

Promise<MetricsEntity>


findByExecutionId() ​

ts
findByExecutionId(executionId: string): Promise<MetricsEntity | null>;

Defined in: packages/server/src/types.ts:119

Parameters ​

ParameterType
executionIdstring

Returns ​

Promise<MetricsEntity | null>


update() ​

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

Defined in: packages/server/src/types.ts:118

Parameters ​

ParameterType
idstring
updatesPartial<MetricsEntity>

Returns ​

Promise<MetricsEntity | null>

Released under the MIT License.