fix(frontend): load persisted case records

This commit is contained in:
2026-07-14 05:05:49 +08:00
parent 153382cb57
commit 307f524499
2 changed files with 119 additions and 2 deletions
+27
View File
@@ -17,6 +17,7 @@ export type CaseSummaryItem = {
};
export type CaseRecord = {
caseId: string;
title: string;
type: string;
status: string;
@@ -25,6 +26,18 @@ export type CaseRecord = {
summary: string;
};
export type CaseDetailResponse = {
caseId: string;
fileName: string;
title: string;
type: string;
status: string;
time: string;
owner: string;
transcript: string;
summary: string;
};
export type CaseUploadResponse = {
caseId: string;
fileName: string;
@@ -73,3 +86,17 @@ export function curateKnowledgeCase(data: { caseId: string; criteria: string; li
headers: { repeatSubmit: false }
});
}
export function getCaseRecords(limit = 20): Promise<ApiResult<CaseRecord[]>> {
return request({
url: `/api/knowledge/case/records?limit=${limit}`,
method: 'get'
});
}
export function getCaseDetail(caseId: string): Promise<ApiResult<CaseDetailResponse>> {
return request({
url: `/api/knowledge/case/records/${encodeURIComponent(caseId)}`,
method: 'get'
});
}