diff --git a/backend/openapi/components/responses/success-get-room.yaml b/backend/openapi/components/responses/success-get-room.yaml index 48b9961..6e28a8c 100644 --- a/backend/openapi/components/responses/success-get-room.yaml +++ b/backend/openapi/components/responses/success-get-room.yaml @@ -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 diff --git a/backend/openapi/components/responses/success-get-rooms.yaml b/backend/openapi/components/responses/success-get-rooms.yaml index 0c1de83..1714e2e 100644 --- a/backend/openapi/components/responses/success-get-rooms.yaml +++ b/backend/openapi/components/responses/success-get-rooms.yaml @@ -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 diff --git a/backend/openapi/components/schemas/meet-room-options.yaml b/backend/openapi/components/schemas/meet-room-options.yaml index 5f2bde8..2d1cca6 100644 --- a/backend/openapi/components/schemas/meet-room-options.yaml +++ b/backend/openapi/components/schemas/meet-room-options.yaml @@ -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. diff --git a/backend/openapi/components/schemas/validation-error.yaml b/backend/openapi/components/schemas/validation-error.yaml index 8956176..cd90d6f 100644 --- a/backend/openapi/components/schemas/validation-error.yaml +++ b/backend/openapi/components/schemas/validation-error.yaml @@ -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}}' diff --git a/backend/openapi/openvidu-meet-internal-api.yaml b/backend/openapi/openvidu-meet-internal-api.yaml index edcb58f..b6e2a4a 100644 --- a/backend/openapi/openvidu-meet-internal-api.yaml +++ b/backend/openapi/openvidu-meet-internal-api.yaml @@ -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: diff --git a/backend/openapi/paths/internal/rooms.yaml b/backend/openapi/paths/internal/rooms.yaml index 3c74f15..f2dcc04 100644 --- a/backend/openapi/paths/internal/rooms.yaml +++ b/backend/openapi/paths/internal/rooms.yaml @@ -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 diff --git a/backend/openapi/paths/rooms.yaml b/backend/openapi/paths/rooms.yaml index 14b9a22..18e4a6e 100644 --- a/backend/openapi/paths/rooms.yaml +++ b/backend/openapi/paths/rooms.yaml @@ -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: