chore: initialize wygj monorepo
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
type ApiResult<T> = {
|
||||
code: number;
|
||||
msg: string;
|
||||
data: T;
|
||||
};
|
||||
|
||||
export type CaseTag = {
|
||||
text: string;
|
||||
type: string;
|
||||
};
|
||||
|
||||
export type CaseSummaryItem = {
|
||||
label: string;
|
||||
text: string;
|
||||
};
|
||||
|
||||
export type CaseRecord = {
|
||||
title: string;
|
||||
type: string;
|
||||
status: string;
|
||||
time: string;
|
||||
owner: string;
|
||||
summary: string;
|
||||
};
|
||||
|
||||
export type CaseUploadResponse = {
|
||||
caseId: string;
|
||||
fileName: string;
|
||||
transcript: string;
|
||||
tags: CaseTag[];
|
||||
};
|
||||
|
||||
export type CaseOrganizeResponse = {
|
||||
caseId: string;
|
||||
summary: CaseSummaryItem[];
|
||||
tags: CaseTag[];
|
||||
aiSummary: string;
|
||||
};
|
||||
|
||||
export type CaseCurateResponse = {
|
||||
selectedCaseIds: string[];
|
||||
records: CaseRecord[];
|
||||
sampleHint: string;
|
||||
};
|
||||
|
||||
export function uploadCaseAudio(data: { fileName: string; projectExtOrgId: string }): Promise<ApiResult<CaseUploadResponse>> {
|
||||
return request({
|
||||
url: '/api/knowledge/case/upload',
|
||||
method: 'post',
|
||||
data,
|
||||
headers: { repeatSubmit: false }
|
||||
});
|
||||
}
|
||||
|
||||
export function organizeKnowledgeCase(data: { caseId: string }): Promise<ApiResult<CaseOrganizeResponse>> {
|
||||
return request({
|
||||
url: '/api/knowledge/case/organize',
|
||||
method: 'post',
|
||||
data,
|
||||
headers: { repeatSubmit: false }
|
||||
});
|
||||
}
|
||||
|
||||
export function curateKnowledgeCase(data: { caseId: string; criteria: string; limit: number }): Promise<ApiResult<CaseCurateResponse>> {
|
||||
return request({
|
||||
url: '/api/knowledge/case/curate',
|
||||
method: 'post',
|
||||
data,
|
||||
headers: { repeatSubmit: false }
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user