|
|
|
@ -25,12 +25,12 @@ import { generateOcsUrl } from '@nextcloud/router' |
|
|
|
/** |
|
|
|
* Create breakout rooms for a given conversation |
|
|
|
* |
|
|
|
* @param token The conversation token |
|
|
|
* @param mode Either manual, auto, or free, see constants file |
|
|
|
* @param amount The amount of breakout rooms to be created |
|
|
|
* @param attendeeMap A json encoded Map of attendeeId => room number (0 based) |
|
|
|
* @param {string} token The conversation token |
|
|
|
* @param {string} mode Either manual, auto, or free, see constants file |
|
|
|
* @param {number} amount The amount of breakout rooms to be created |
|
|
|
* @param {string} attendeeMap A json encoded Map of attendeeId => room number (0 based) |
|
|
|
* (Only considered when the mode is "manual") |
|
|
|
* @return {Promise<AxiosResponse<any>>} |
|
|
|
* @return {Promise<import('axios').AxiosResponse<any>>} |
|
|
|
*/ |
|
|
|
const configureBreakoutRooms = async function(token, mode, amount, attendeeMap) { |
|
|
|
return await axios.post(generateOcsUrl('/apps/spreed/api/v1/breakout-rooms/{token}', { token }), { |
|
|
|
@ -43,9 +43,9 @@ const configureBreakoutRooms = async function(token, mode, amount, attendeeMap) |
|
|
|
/** |
|
|
|
* Resets the request assistance |
|
|
|
* |
|
|
|
* @param token the breakout room token |
|
|
|
* @param attendeeMap A json encoded Map of attendeeId => room number (0 based) |
|
|
|
* @return {Promise<AxiosResponse<any>>} The array of conversations |
|
|
|
* @param {string} token the breakout room token |
|
|
|
* @param {string} attendeeMap A json encoded Map of attendeeId => room number (0 based) |
|
|
|
* @return {Promise<import('axios').AxiosResponse<any>>} The array of conversations |
|
|
|
*/ |
|
|
|
const reorganizeAttendees = async function(token, attendeeMap) { |
|
|
|
return await axios.post(generateOcsUrl('/apps/spreed/api/v1/breakout-rooms/{token}/attendees', { |
|
|
|
@ -59,8 +59,8 @@ const reorganizeAttendees = async function(token, attendeeMap) { |
|
|
|
/** |
|
|
|
* Deletes all breakout rooms for a given conversation |
|
|
|
* |
|
|
|
* @param token |
|
|
|
* @return {Promise<AxiosResponse<any>>} |
|
|
|
* @param {string} token The conversation token |
|
|
|
* @return {Promise<import('axios').AxiosResponse<any>>} |
|
|
|
*/ |
|
|
|
const deleteBreakoutRooms = async function(token) { |
|
|
|
return await axios.delete(generateOcsUrl('/apps/spreed/api/v1/breakout-rooms/{token}', { token })) |
|
|
|
@ -69,8 +69,8 @@ const deleteBreakoutRooms = async function(token) { |
|
|
|
/** |
|
|
|
* Fetches the breakout rooms for given conversation |
|
|
|
* |
|
|
|
* @param token The conversation token |
|
|
|
* @return {Promise<AxiosResponse<any>>} The array of conversations |
|
|
|
* @param {string} token The conversation token |
|
|
|
* @return {Promise<import('axios').AxiosResponse<any>>} The array of conversations |
|
|
|
*/ |
|
|
|
const getBreakoutRooms = async function(token) { |
|
|
|
return await axios.get(generateOcsUrl('/apps/spreed/api/v4/room/{token}/breakout-rooms', { token })) |
|
|
|
@ -78,8 +78,8 @@ const getBreakoutRooms = async function(token) { |
|
|
|
|
|
|
|
/** |
|
|
|
* |
|
|
|
* @param token The conversation token |
|
|
|
* @return {Promise<AxiosResponse<any>>} The array of conversations |
|
|
|
* @param {string} token The conversation token |
|
|
|
* @return {Promise<import('axios').AxiosResponse<any>>} The array of conversations |
|
|
|
*/ |
|
|
|
const startBreakoutRooms = async function(token) { |
|
|
|
return await axios.post(generateOcsUrl('/apps/spreed/api/v1/breakout-rooms/{token}/rooms', { token })) |
|
|
|
@ -88,8 +88,8 @@ const startBreakoutRooms = async function(token) { |
|
|
|
/** |
|
|
|
* Stops the breakout rooms |
|
|
|
* |
|
|
|
* @param token The conversation token |
|
|
|
* @return {Promise<AxiosResponse<any>>} The array of conversations |
|
|
|
* @param {string} token The conversation token |
|
|
|
* @return {Promise<import('axios').AxiosResponse<any>>} The array of conversations |
|
|
|
*/ |
|
|
|
const stopBreakoutRooms = async function(token) { |
|
|
|
return await axios.delete(generateOcsUrl('/apps/spreed/api/v1/breakout-rooms/{token}/rooms', { token })) |
|
|
|
@ -97,9 +97,9 @@ const stopBreakoutRooms = async function(token) { |
|
|
|
|
|
|
|
/** |
|
|
|
* |
|
|
|
* @param token the conversation token |
|
|
|
* @param message The message to be posted |
|
|
|
* @return {Promise<AxiosResponse<any>>} The array of conversations |
|
|
|
* @param {string} message The message to be posted |
|
|
|
* @param {string} token the conversation token |
|
|
|
* @return {Promise<import('axios').AxiosResponse<any>>} The array of conversations |
|
|
|
*/ |
|
|
|
const broadcastMessageToBreakoutRooms = async function(message, token) { |
|
|
|
return await axios.post(generateOcsUrl('/apps/spreed/api/v1/breakout-rooms/{token}/broadcast', { |
|
|
|
@ -112,8 +112,8 @@ const broadcastMessageToBreakoutRooms = async function(message, token) { |
|
|
|
|
|
|
|
/** |
|
|
|
* |
|
|
|
* @param token the conversation token |
|
|
|
* @return {Promise<AxiosResponse<any>>} The array of conversations |
|
|
|
* @param {string} token the conversation token |
|
|
|
* @return {Promise<import('axios').AxiosResponse<any>>} The array of conversations |
|
|
|
*/ |
|
|
|
const getBreakoutRoomsParticipants = async function(token) { |
|
|
|
return await axios.get(generateOcsUrl('/apps/spreed/api/v4/room/{token}/breakout-rooms/participants', { |
|
|
|
@ -124,8 +124,8 @@ const getBreakoutRoomsParticipants = async function(token) { |
|
|
|
/** |
|
|
|
* Requests assistance from a moderator |
|
|
|
* |
|
|
|
* @param token the breakout room token |
|
|
|
* @return {Promise<AxiosResponse<any>>} The array of conversations |
|
|
|
* @param {string} token the breakout room token |
|
|
|
* @return {Promise<import('axios').AxiosResponse<any>>} The array of conversations |
|
|
|
*/ |
|
|
|
const requestAssistance = async function(token) { |
|
|
|
return await axios.post(generateOcsUrl('/apps/spreed/api/v1/breakout-rooms/{token}/request-assistance', { |
|
|
|
@ -137,8 +137,8 @@ const requestAssistance = async function(token) { |
|
|
|
/** |
|
|
|
* Resets the request assistance |
|
|
|
* |
|
|
|
* @param token the breakout room token |
|
|
|
* @return {Promise<AxiosResponse<any>>} The array of conversations |
|
|
|
* @param {string} token the breakout room token |
|
|
|
* @return {Promise<import('axios').AxiosResponse<any>>} The array of conversations |
|
|
|
*/ |
|
|
|
const resetRequestAssistance = async function(token) { |
|
|
|
return await axios.delete(generateOcsUrl('/apps/spreed/api/v1/breakout-rooms/{token}/request-assistance', { |
|
|
|
@ -151,9 +151,9 @@ const resetRequestAssistance = async function(token) { |
|
|
|
* This endpoint allows participants to switch between breakout rooms when they are allowed to choose the breakout room |
|
|
|
* and not are automatically or manually assigned by the moderator. |
|
|
|
* |
|
|
|
* @param token Conversation token of the parent room hosting the breakout rooms |
|
|
|
* @param target Conversation token of the target breakout room |
|
|
|
* @return {Promise<AxiosResponse<any>>} The target breakout room |
|
|
|
* @param {string} token Conversation token of the parent room hosting the breakout rooms |
|
|
|
* @param {string} target Conversation token of the target breakout room |
|
|
|
* @return {Promise<import('axios').AxiosResponse<any>>} The target breakout room |
|
|
|
*/ |
|
|
|
const switchToBreakoutRoom = async function(token, target) { |
|
|
|
return await axios.post(generateOcsUrl('/apps/spreed/api/v1/breakout-rooms/{token}/switch', { |
|
|
|
|