fix(frontend): load persisted case records
This commit is contained in:
@@ -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'
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user