2026-03-02 11:59:47 +00:00
|
|
|
import http from "../http";
|
2026-03-05 09:52:08 +00:00
|
|
|
import axios from "axios";
|
2026-03-02 11:59:47 +00:00
|
|
|
|
|
|
|
|
export interface MeetingVO {
|
|
|
|
|
id: number;
|
|
|
|
|
tenantId: number;
|
|
|
|
|
creatorId: number;
|
2026-03-05 09:52:08 +00:00
|
|
|
creatorName?: string;
|
2026-03-02 11:59:47 +00:00
|
|
|
title: string;
|
|
|
|
|
meetingTime: string;
|
|
|
|
|
participants: string;
|
2026-03-09 08:10:48 +00:00
|
|
|
participantIds?: number[];
|
2026-03-02 11:59:47 +00:00
|
|
|
tags: string;
|
|
|
|
|
audioUrl: string;
|
|
|
|
|
summaryContent: string;
|
|
|
|
|
status: number;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface MeetingDTO {
|
|
|
|
|
id?: number;
|
|
|
|
|
title: string;
|
|
|
|
|
meetingTime: string;
|
|
|
|
|
participants: string;
|
|
|
|
|
tags: string;
|
|
|
|
|
audioUrl: string;
|
|
|
|
|
asrModelId: number;
|
|
|
|
|
promptId: number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const getMeetingPage = (params: {
|
|
|
|
|
current: number;
|
|
|
|
|
size: number;
|
|
|
|
|
title?: string;
|
|
|
|
|
viewType?: 'all' | 'created' | 'involved';
|
|
|
|
|
}) => {
|
|
|
|
|
return http.get<any, { code: string; data: { records: MeetingVO[]; total: number }; msg: string }>(
|
|
|
|
|
"/api/biz/meeting/page",
|
|
|
|
|
{ params }
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const createMeeting = (data: MeetingDTO) => {
|
|
|
|
|
return http.post<any, { code: string; data: MeetingVO; msg: string }>(
|
|
|
|
|
"/api/biz/meeting",
|
|
|
|
|
data
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const deleteMeeting = (id: number) => {
|
|
|
|
|
return http.delete<any, { code: string; data: boolean; msg: string }>(
|
|
|
|
|
`/api/biz/meeting/${id}`
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export interface MeetingTranscriptVO {
|
|
|
|
|
id: number;
|
|
|
|
|
speakerId: string;
|
|
|
|
|
speakerName: string;
|
|
|
|
|
speakerLabel: string;
|
|
|
|
|
content: string;
|
|
|
|
|
startTime: number;
|
|
|
|
|
endTime: number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const getMeetingDetail = (id: number) => {
|
|
|
|
|
return http.get<any, { code: string; data: MeetingVO; msg: string }>(
|
|
|
|
|
`/api/biz/meeting/detail/${id}`
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const getTranscripts = (id: number) => {
|
|
|
|
|
return http.get<any, { code: string; data: MeetingTranscriptVO[]; msg: string }>(
|
|
|
|
|
`/api/biz/meeting/transcripts/${id}`
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const updateSpeakerInfo = (params: { meetingId: number; speakerId: string; newName: string; label: string }) => {
|
|
|
|
|
return http.put<any, { code: string; data: boolean; msg: string }>(
|
|
|
|
|
"/api/biz/meeting/speaker",
|
|
|
|
|
params
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const reSummary = (params: { meetingId: number; summaryModelId: number; promptId: number }) => {
|
|
|
|
|
return http.post<any, { code: string; data: boolean; msg: string }>(
|
|
|
|
|
"/api/biz/meeting/re-summary",
|
|
|
|
|
params
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const updateMeeting = (data: Partial<MeetingVO>) => {
|
|
|
|
|
return http.put<any, { code: string; data: boolean; msg: string }>(
|
|
|
|
|
"/api/biz/meeting",
|
|
|
|
|
data
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
2026-03-09 08:10:48 +00:00
|
|
|
export const updateMeetingParticipants = (params: { meetingId: number; participants: string }) => {
|
|
|
|
|
return http.put<any, { code: string; data: boolean; msg: string }>(
|
|
|
|
|
"/api/biz/meeting/participants",
|
|
|
|
|
params
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
2026-03-02 11:59:47 +00:00
|
|
|
export const uploadAudio = (file: File) => {
|
|
|
|
|
const formData = new FormData();
|
|
|
|
|
formData.append("file", file);
|
|
|
|
|
return http.post<any, { code: string; data: string; msg: string }>(
|
|
|
|
|
"/api/biz/meeting/upload",
|
|
|
|
|
formData,
|
|
|
|
|
{ headers: { "Content-Type": "multipart/form-data" } }
|
|
|
|
|
);
|
|
|
|
|
};
|
2026-03-04 09:19:41 +00:00
|
|
|
|
|
|
|
|
export interface MeetingProgress {
|
|
|
|
|
percent: number;
|
|
|
|
|
message: string;
|
|
|
|
|
updateAt: number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const getMeetingProgress = (id: number) => {
|
|
|
|
|
return http.get<any, { code: string; data: MeetingProgress; msg: string }>(
|
|
|
|
|
`/api/biz/meeting/${id}/progress`
|
|
|
|
|
);
|
|
|
|
|
};
|
2026-03-05 09:52:08 +00:00
|
|
|
|
|
|
|
|
export const downloadMeetingSummary = (id: number, format: 'pdf' | 'word') => {
|
|
|
|
|
const token = localStorage.getItem("accessToken");
|
|
|
|
|
return axios.get(`/api/biz/meeting/${id}/summary/export`, {
|
|
|
|
|
params: { format },
|
|
|
|
|
responseType: 'blob',
|
|
|
|
|
headers: token ? { Authorization: `Bearer ${token}` } : {}
|
|
|
|
|
});
|
|
|
|
|
};
|