backend: Update room API responses and add new room properties for enhanced functionality

This commit is contained in:
Carlos Santos 2025-04-07 18:11:32 +02:00
parent 0cc73050a8
commit 990f23f7b2
7 changed files with 93 additions and 43 deletions

View File

@ -30,6 +30,9 @@ content:
summary: Room details including preferences but no URLs
value:
roomId: 'room-123'
roomIdPrefix: 'room'
creationDate: 1620000000000
expirationDate: 1620000800000
preferences:
chatPreferences:
enabled: true

View File

@ -65,6 +65,9 @@ content:
value:
rooms:
- roomId: 'room-123'
roomIdPrefix: 'room'
creationDate: 1620000000000
expirationDate: 1620000800000
preferences:
chatPreferences:
enabled: true
@ -73,6 +76,9 @@ content:
virtualBackgroundPreferences:
enabled: true
- roomId: 'room-456'
roomIdPrefix: 'room'
creationDate: 1620001000000
expirationDate: 1620001800000
preferences:
chatPreferences:
enabled: false

View File

@ -12,7 +12,7 @@ properties:
type: string
example: 'room'
description: >
A prefix to be used for the room ID. The room ID will be generated by concatenating this prefix with a unique identifier.
A prefix to be used for the room ID. The room ID will be generated by concatenating this prefix with an unique identifier.
# maxParticipants:
# type: integer
# example: 10
@ -22,4 +22,4 @@ properties:
preferences:
$ref: './meet-room-preferences.yaml#/MeetRoomPreferences'
description: >
The preferences for the room. These preferences wil
The preferences for the room. These preferences will be used to configure the room's settings.

View File

@ -5,7 +5,7 @@ properties:
example: 'Unprocessable Entity'
message:
type: string
example: 'Invalid request body'
example: 'Invalid request'
details:
type: array
items:
@ -13,7 +13,7 @@ properties:
properties:
field:
type: string
example: 'expirationDate'
example: '{{field}}'
message:
type: string
example: 'Expected number, received string'
example: 'Expected {{type}} but got {{value}}'

View File

@ -16,6 +16,8 @@ paths:
$ref: './paths/internal/auth.yaml#/~1auth~1refresh'
/auth/profile:
$ref: './paths/internal/auth.yaml#/~1auth~1profile'
/rooms/{roomId}:
$ref: './paths/internal/rooms.yaml#/~1rooms~1{roomId}'
/rooms/{roomId}/participant-role:
$ref: './paths/internal/rooms.yaml#/~1rooms~1{roomId}~1participant-role'
/recordings/{recordingId}/stream:

View File

@ -1,3 +1,38 @@
/rooms/{roomId}:
put:
operationId: updateRoom
summary: Update a room
description: >
Updates the preferences of an OpenVidu Meet room with the specified room ID.
tags:
- Internal API - Rooms
security:
- apiKeyInHeader: []
- accessTokenCookie: []
parameters:
- name: roomId
in: path
required: true
description: The unique identifier of the room to update
schema:
type: string
example: 'room-123'
requestBody:
$ref: '../../components/requestBodies/update-room-request.yaml'
responses:
'200':
$ref: '../../components/responses/success-create-room.yaml'
'401':
$ref: '../../components/responses/unauthorized-error.yaml'
'403':
$ref: '../../components/responses/forbidden-error.yaml'
'404':
$ref: '../../components/responses/error-room-not-found.yaml'
'422':
$ref: '../../components/responses/validation-error.yaml'
'500':
$ref: '../../components/responses/internal-server-error.yaml'
/rooms/{roomId}/participant-role:
get:
operationId: getParticipantRole

View File

@ -47,6 +47,36 @@
$ref: '../components/responses/forbidden-error.yaml'
'500':
$ref: '../components/responses/internal-server-error.yaml'
delete:
operationId: bulkDeleteRooms
summary: Bulk delete rooms
description: >
Delete multiple OpenVidu Meet rooms at once with the specified room IDs.
tags:
- OpenVidu Meet - Room
security:
- apiKeyInHeader: []
- accessTokenCookie: []
parameters:
- name: roomIds
in: query
required: true
description: A comma-separated list of room IDs to delete.
schema:
type: string
example: 'room-123,room-456'
responses:
'204':
description: Bulk deletion completed.
'401':
$ref: '../components/responses/unauthorized-error.yaml'
'403':
$ref: '../components/responses/forbidden-error.yaml'
'422':
$ref: '../components/responses/validation-error.yaml'
'500':
$ref: '../components/responses/internal-server-error.yaml'
/rooms/{roomId}:
get:
operationId: getRoom
@ -65,7 +95,6 @@
responses:
'200':
$ref: '../components/responses/success-get-room.yaml'
'401':
$ref: '../components/responses/unauthorized-error.yaml'
'403':
@ -74,47 +103,22 @@
$ref: '../components/responses/error-room-not-found.yaml'
'500':
$ref: '../components/responses/internal-server-error.yaml'
put:
operationId: updateRoom
summary: Update a room
description: >
Updates the preferences of an OpenVidu Meet room with the specified room ID.
tags:
- OpenVidu Meet - Room
security:
- apiKeyInHeader: []
- accessTokenCookie: []
parameters:
- name: roomId
in: path
required: true
description: The unique identifier of the room to update
schema:
type: string
example: 'room-123'
requestBody:
$ref: '../components/requestBodies/update-room-request.yaml'
responses:
'200':
$ref: '../components/responses/success-create-room.yaml'
'401':
$ref: '../components/responses/unauthorized-error.yaml'
'403':
$ref: '../components/responses/forbidden-error.yaml'
'404':
$ref: '../components/responses/error-room-not-found.yaml'
'422':
$ref: '../components/responses/validation-error.yaml'
'500':
$ref: '../components/responses/internal-server-error.yaml'
delete:
operationId: deleteRoom
summary: Delete a room
description: >
Deletes an OpenVidu Meet room with the specified room ID.
The room with participants will be closed and all participants will be disconnected.
The room will be deleted from the system and will no longer be available.
Permanently removes an OpenVidu Meet room with the specified room ID.
When a room is deleted:
- All active participants are immediately disconnected
- All associated resources and session data are removed
- The room ID becomes available for reuse
This operation is idempotent - deleting a non-existent room or
attempting to delete an already removed room will return a successful
response.
tags:
- OpenVidu Meet - Room
security: