jisti-meet服务开启
This commit is contained in:
@@ -1,79 +0,0 @@
|
||||
import { http } from '@/utils/http'
|
||||
|
||||
/**
|
||||
* 创建视频会议参数
|
||||
*/
|
||||
export interface CreateMeetingParams {
|
||||
roomId: string
|
||||
workcaseId?: string
|
||||
meetingName: string
|
||||
maxParticipants?: number
|
||||
}
|
||||
|
||||
/**
|
||||
* 视频会议VO
|
||||
*/
|
||||
export interface VideoMeetingVO {
|
||||
meetingId: string
|
||||
roomId: string
|
||||
workcaseId?: string
|
||||
meetingName: string
|
||||
meetingPassword?: string
|
||||
jwtToken: string
|
||||
jitsiRoomName: string
|
||||
jitsiServerUrl: string
|
||||
status: string
|
||||
creatorId: string
|
||||
creatorType: string
|
||||
creatorName: string
|
||||
participantCount: number
|
||||
maxParticipants: number
|
||||
actualStartTime?: string
|
||||
actualEndTime?: string
|
||||
durationSeconds?: number
|
||||
durationFormatted?: string
|
||||
iframeUrl: string
|
||||
config?: any
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建视频会议
|
||||
*/
|
||||
export const createVideoMeeting = (params: CreateMeetingParams) => {
|
||||
return http.post<VideoMeetingVO>('/workcase/chat/meeting/create', params)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取会议信息
|
||||
*/
|
||||
export const getMeetingInfo = (meetingId: string) => {
|
||||
return http.get<VideoMeetingVO>(`/workcase/chat/meeting/${meetingId}`)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取聊天室活跃会议
|
||||
*/
|
||||
export const getActiveMeeting = (roomId: string) => {
|
||||
return http.get<VideoMeetingVO>(`/workcase/chat/meeting/room/${roomId}/active`)
|
||||
}
|
||||
|
||||
/**
|
||||
* 加入会议(生成用户专属JWT)
|
||||
*/
|
||||
export const joinMeeting = (meetingId: string) => {
|
||||
return http.post<VideoMeetingVO>(`/workcase/chat/meeting/${meetingId}/join`)
|
||||
}
|
||||
|
||||
/**
|
||||
* 开始会议
|
||||
*/
|
||||
export const startVideoMeeting = (meetingId: string) => {
|
||||
return http.post(`/workcase/chat/meeting/${meetingId}/start`)
|
||||
}
|
||||
|
||||
/**
|
||||
* 结束会议
|
||||
*/
|
||||
export const endVideoMeeting = (meetingId: string) => {
|
||||
return http.post<VideoMeetingVO>(`/workcase/chat/meeting/${meetingId}/end`)
|
||||
}
|
||||
@@ -6,10 +6,12 @@ import type {
|
||||
TbChatRoomMessageDTO,
|
||||
TbCustomerServiceDTO,
|
||||
TbWordCloudDTO,
|
||||
TbVideoMeetingDTO,
|
||||
ChatRoomVO,
|
||||
ChatMemberVO,
|
||||
ChatRoomMessageVO,
|
||||
CustomerServiceVO
|
||||
CustomerServiceVO,
|
||||
VideoMeetingVO
|
||||
} from '@/types/workcase'
|
||||
|
||||
/**
|
||||
@@ -220,5 +222,55 @@ export const workcaseChatAPI = {
|
||||
async getWordCloudPage(pageRequest: PageRequest<TbWordCloudDTO>): Promise<ResultDomain<TbWordCloudDTO>> {
|
||||
const response = await api.post<TbWordCloudDTO>(`${this.baseUrl}/wordcloud/page`, pageRequest)
|
||||
return response.data
|
||||
},
|
||||
|
||||
// ====================== 视频会议管理(Jitsi Meet) ======================
|
||||
|
||||
/**
|
||||
* 创建视频会议
|
||||
*/
|
||||
async createVideoMeeting(meeting: TbVideoMeetingDTO): Promise<ResultDomain<VideoMeetingVO>> {
|
||||
const response = await api.post<VideoMeetingVO>(`${this.baseUrl}/meeting/create`, meeting)
|
||||
return response.data
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取会议信息
|
||||
*/
|
||||
async getVideoMeetingInfo(meetingId: string): Promise<ResultDomain<VideoMeetingVO>> {
|
||||
const response = await api.get<VideoMeetingVO>(`${this.baseUrl}/meeting/${meetingId}`)
|
||||
return response.data
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取聊天室活跃会议
|
||||
*/
|
||||
async getActiveMeeting(roomId: string): Promise<ResultDomain<VideoMeetingVO>> {
|
||||
const response = await api.get<VideoMeetingVO>(`${this.baseUrl}/meeting/room/${roomId}/active`)
|
||||
return response.data
|
||||
},
|
||||
|
||||
/**
|
||||
* 加入会议(生成用户专属JWT)
|
||||
*/
|
||||
async joinVideoMeeting(meetingId: string): Promise<ResultDomain<VideoMeetingVO>> {
|
||||
const response = await api.post<VideoMeetingVO>(`${this.baseUrl}/meeting/${meetingId}/join`)
|
||||
return response.data
|
||||
},
|
||||
|
||||
/**
|
||||
* 开始会议
|
||||
*/
|
||||
async startVideoMeeting(meetingId: string): Promise<ResultDomain<boolean>> {
|
||||
const response = await api.post<boolean>(`${this.baseUrl}/meeting/${meetingId}/start`)
|
||||
return response.data
|
||||
},
|
||||
|
||||
/**
|
||||
* 结束会议
|
||||
*/
|
||||
async endVideoMeeting(meetingId: string): Promise<ResultDomain<VideoMeetingVO>> {
|
||||
const response = await api.post<VideoMeetingVO>(`${this.baseUrl}/meeting/${meetingId}/end`)
|
||||
return response.data
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user