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;
|
2026-03-27 02:30:48 +00:00
|
|
|
analysis?: {
|
|
|
|
|
overview?: string;
|
|
|
|
|
keywords?: string[];
|
|
|
|
|
chapters?: Array<{ time?: string; title?: string; summary?: string }>;
|
|
|
|
|
speakerSummaries?: Array<{ speaker?: string; summary?: string }>;
|
|
|
|
|
keyPoints?: Array<{ title?: string; summary?: string; speaker?: string; time?: string }>;
|
|
|
|
|
todos?: string[];
|
|
|
|
|
};
|
2026-03-02 11:59:47 +00:00
|
|
|
status: number;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 03:18:44 +00:00
|
|
|
export interface CreateMeetingCommand {
|
2026-03-02 11:59:47 +00:00
|
|
|
id?: number;
|
|
|
|
|
title: string;
|
|
|
|
|
meetingTime: string;
|
|
|
|
|
participants: string;
|
|
|
|
|
tags: string;
|
2026-03-12 12:39:49 +00:00
|
|
|
audioUrl?: string;
|
2026-03-02 11:59:47 +00:00
|
|
|
asrModelId: number;
|
2026-03-12 12:39:49 +00:00
|
|
|
summaryModelId?: number;
|
2026-03-02 11:59:47 +00:00
|
|
|
promptId: number;
|
2026-03-12 12:39:49 +00:00
|
|
|
useSpkId?: number;
|
|
|
|
|
hotWords?: string[];
|
2026-03-02 11:59:47 +00:00
|
|
|
}
|
|
|
|
|
|
2026-03-26 03:18:44 +00:00
|
|
|
export type MeetingDTO = CreateMeetingCommand;
|
|
|
|
|
|
|
|
|
|
export interface UpdateMeetingBasicCommand {
|
|
|
|
|
meetingId: number;
|
|
|
|
|
title?: string;
|
|
|
|
|
meetingTime?: string;
|
|
|
|
|
tags?: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export type MeetingUpdateBasicDTO = UpdateMeetingBasicCommand;
|
|
|
|
|
|
|
|
|
|
export interface UpdateMeetingSummaryCommand {
|
|
|
|
|
meetingId: number;
|
|
|
|
|
summaryContent: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export type MeetingUpdateSummaryDTO = UpdateMeetingSummaryCommand;
|
|
|
|
|
|
2026-03-02 11:59:47 +00:00
|
|
|
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 }
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
2026-03-26 03:18:44 +00:00
|
|
|
export const createMeeting = (data: CreateMeetingCommand) => {
|
2026-03-02 11:59:47 +00:00
|
|
|
return http.post<any, { code: string; data: MeetingVO; msg: string }>(
|
|
|
|
|
"/api/biz/meeting",
|
|
|
|
|
data
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
2026-03-12 12:39:49 +00:00
|
|
|
export interface RealtimeTranscriptItemDTO {
|
|
|
|
|
speakerId?: string;
|
|
|
|
|
speakerName?: string;
|
|
|
|
|
content: string;
|
|
|
|
|
startTime?: number;
|
|
|
|
|
endTime?: number;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-30 09:56:30 +00:00
|
|
|
export interface RealtimeSocketSessionVO {
|
|
|
|
|
sessionToken: string;
|
|
|
|
|
path: string;
|
|
|
|
|
expiresInSeconds: number;
|
|
|
|
|
startMessage: Record<string, any>;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface RealtimeSocketSessionRequest {
|
|
|
|
|
asrModelId: number;
|
|
|
|
|
mode?: string;
|
|
|
|
|
language?: string;
|
|
|
|
|
useSpkId?: number;
|
|
|
|
|
enablePunctuation?: boolean;
|
|
|
|
|
enableItn?: boolean;
|
|
|
|
|
enableTextRefine?: boolean;
|
|
|
|
|
saveAudio?: boolean;
|
|
|
|
|
hotwords?: Array<{ hotword: string; weight: number }>;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 03:18:44 +00:00
|
|
|
export const createRealtimeMeeting = (data: CreateMeetingCommand) => {
|
2026-03-12 12:39:49 +00:00
|
|
|
return http.post<any, { code: string; data: MeetingVO; msg: string }>(
|
|
|
|
|
"/api/biz/meeting/realtime/start",
|
|
|
|
|
data
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const appendRealtimeTranscripts = (meetingId: number, data: RealtimeTranscriptItemDTO[]) => {
|
|
|
|
|
return http.post<any, { code: string; data: boolean; msg: string }>(
|
|
|
|
|
`/api/biz/meeting/${meetingId}/realtime/transcripts`,
|
|
|
|
|
data
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
2026-03-30 09:56:30 +00:00
|
|
|
export const openRealtimeMeetingSocketSession = (
|
|
|
|
|
meetingId: number,
|
|
|
|
|
data: RealtimeSocketSessionRequest,
|
|
|
|
|
) => {
|
|
|
|
|
return http.post<any, { code: string; data: RealtimeSocketSessionVO; msg: string }>(
|
|
|
|
|
`/api/biz/meeting/${meetingId}/realtime/socket-session`,
|
|
|
|
|
data
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
2026-03-12 12:39:49 +00:00
|
|
|
export const completeRealtimeMeeting = (meetingId: number, data?: { audioUrl?: string }) => {
|
|
|
|
|
return http.post<any, { code: string; data: boolean; msg: string }>(
|
|
|
|
|
`/api/biz/meeting/${meetingId}/realtime/complete`,
|
|
|
|
|
data || {}
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
2026-03-02 11:59:47 +00:00
|
|
|
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 }>(
|
2026-03-26 03:18:44 +00:00
|
|
|
`/api/biz/meeting/${id}`
|
2026-03-02 11:59:47 +00:00
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const getTranscripts = (id: number) => {
|
|
|
|
|
return http.get<any, { code: string; data: MeetingTranscriptVO[]; msg: string }>(
|
2026-03-26 03:18:44 +00:00
|
|
|
`/api/biz/meeting/${id}/transcripts`
|
2026-03-02 11:59:47 +00:00
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
2026-03-26 03:18:44 +00:00
|
|
|
export interface MeetingSpeakerUpdateDTO {
|
|
|
|
|
meetingId: number;
|
|
|
|
|
speakerId: string;
|
|
|
|
|
newName: string;
|
|
|
|
|
label: string;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-27 05:50:01 +00:00
|
|
|
export interface MeetingTranscriptUpdateDTO {
|
|
|
|
|
meetingId: number;
|
|
|
|
|
transcriptId: number;
|
|
|
|
|
content: string;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-26 03:18:44 +00:00
|
|
|
export const updateSpeakerInfo = (params: MeetingSpeakerUpdateDTO) => {
|
2026-03-02 11:59:47 +00:00
|
|
|
return http.put<any, { code: string; data: boolean; msg: string }>(
|
|
|
|
|
"/api/biz/meeting/speaker",
|
|
|
|
|
params
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
2026-03-27 05:50:01 +00:00
|
|
|
export const updateMeetingTranscript = (params: MeetingTranscriptUpdateDTO) => {
|
|
|
|
|
return http.put<any, { code: string; data: boolean; msg: string }>(
|
|
|
|
|
`/api/biz/meeting/${params.meetingId}/transcripts/${params.transcriptId}`,
|
|
|
|
|
params
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
2026-03-26 03:18:44 +00:00
|
|
|
export interface MeetingResummaryDTO {
|
|
|
|
|
meetingId: number;
|
|
|
|
|
summaryModelId: number;
|
|
|
|
|
promptId: number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const reSummary = (params: MeetingResummaryDTO) => {
|
2026-03-02 11:59:47 +00:00
|
|
|
return http.post<any, { code: string; data: boolean; msg: string }>(
|
2026-03-26 03:18:44 +00:00
|
|
|
`/api/biz/meeting/${params.meetingId}/summary/regenerate`,
|
2026-03-02 11:59:47 +00:00
|
|
|
params
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
2026-03-26 03:18:44 +00:00
|
|
|
export const updateMeetingBasic = (data: UpdateMeetingBasicCommand) => {
|
2026-03-02 11:59:47 +00:00
|
|
|
return http.put<any, { code: string; data: boolean; msg: string }>(
|
2026-03-26 03:18:44 +00:00
|
|
|
`/api/biz/meeting/${data.meetingId}/basic`,
|
2026-03-02 11:59:47 +00:00
|
|
|
data
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
2026-03-26 03:18:44 +00:00
|
|
|
export const updateMeetingSummary = (data: UpdateMeetingSummaryCommand) => {
|
|
|
|
|
return http.put<any, { code: string; data: boolean; msg: string }>(
|
|
|
|
|
`/api/biz/meeting/${data.meetingId}/summary`,
|
|
|
|
|
data
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export interface UpdateMeetingParticipantsCommand {
|
|
|
|
|
meetingId: number;
|
|
|
|
|
participants: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export type MeetingParticipantsUpdateDTO = UpdateMeetingParticipantsCommand;
|
|
|
|
|
|
|
|
|
|
export const updateMeetingParticipants = (params: UpdateMeetingParticipantsCommand) => {
|
2026-03-09 08:10:48 +00:00
|
|
|
return http.put<any, { code: string; data: boolean; msg: string }>(
|
2026-03-26 03:18:44 +00:00
|
|
|
`/api/biz/meeting/${params.meetingId}/participants`,
|
2026-03-09 08:10:48 +00:00
|
|
|
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}` } : {}
|
|
|
|
|
});
|
|
|
|
|
};
|