chart bar
Gitea Actions Demo / Deploy (push) Successful in 25s

This commit is contained in:
vadim committed 2026-10-08 14:06:15 +03:00
1 parent 6674a6fa2a
commit 4caaf74b9f
5 files changed
+213 -6

No files matched your search

+26
View File
@@ -47,6 +47,27 @@ export interface IssueStat {
byStatus: IssueStatByStatus[]
}
/** Count per issue status; statuses without issues are 0 */
export type IssueStatusCounts = Record<Issue['status'], number>
export interface DailyIssueStat {
/** YYYY-MM-DD in the requested time zone */
date: string
/** Issues created during the day */
created: number
/** Transitions into each status during the day (creation into OPEN is not included) */
transitions: IssueStatusCounts
/** Issues in each status at the end of the day */
byStatus: IssueStatusCounts
}
export interface DailyIssueStats {
from: string
to: string
timeZone: string
days: DailyIssueStat[]
}
// CLIENT REQUEST
export async function itemsList(params: {
@@ -89,3 +110,8 @@ export async function itemStat(projectId?: string) {
const query = toQuery({ projectId: projectId })
return apiClient.get<IssueStat>(`/api/issues/stats${query}`)
}
export async function itemDailyStat(params: { projectId?: string; from?: string; to?: string; timeZone?: string }) {
const query = toQuery(params)
return apiClient.get<DailyIssueStats>(`/api/issues/stats/daily${query}`)
}