Co-authored-by: Jason Woltje <jason@diversecanvas.com> Co-committed-by: Jason Woltje <jason@diversecanvas.com>
54 lines
1.0 KiB
TypeScript
54 lines
1.0 KiB
TypeScript
/**
|
|
* Dashboard Summary DTO
|
|
* Defines the response shape for the dashboard summary endpoint.
|
|
*/
|
|
|
|
export class DashboardMetricsDto {
|
|
activeAgents!: number;
|
|
tasksCompleted!: number;
|
|
totalTasks!: number;
|
|
tasksInProgress!: number;
|
|
activeProjects!: number;
|
|
errorRate!: number;
|
|
}
|
|
|
|
export class RecentActivityDto {
|
|
id!: string;
|
|
action!: string;
|
|
entityType!: string;
|
|
entityId!: string;
|
|
details!: Record<string, unknown> | null;
|
|
userId!: string;
|
|
createdAt!: string;
|
|
}
|
|
|
|
export class ActiveJobStepDto {
|
|
id!: string;
|
|
name!: string;
|
|
status!: string;
|
|
phase!: string;
|
|
}
|
|
|
|
export class ActiveJobDto {
|
|
id!: string;
|
|
type!: string;
|
|
status!: string;
|
|
progressPercent!: number;
|
|
createdAt!: string;
|
|
updatedAt!: string;
|
|
steps!: ActiveJobStepDto[];
|
|
}
|
|
|
|
export class TokenBudgetEntryDto {
|
|
model!: string;
|
|
used!: number;
|
|
limit!: number;
|
|
}
|
|
|
|
export class DashboardSummaryDto {
|
|
metrics!: DashboardMetricsDto;
|
|
recentActivity!: RecentActivityDto[];
|
|
activeJobs!: ActiveJobDto[];
|
|
tokenBudget!: TokenBudgetEntryDto[];
|
|
}
|