97 Commits

Author SHA1 Message Date
CSantosM
c5bca6e133 backend: Enhances test reliability with active waiting
Replaces arbitrary `sleep()` calls in integration tests with explicit `wait-helpers`. These new helpers actively poll for specific conditions (e.g., room deletion, participant connection, recording status) directly from the database or LiveKit, rather than relying on fixed delays. This significantly reduces test flakiness and improves the accuracy of assertions.

Extracts LiveKit CLI interaction helpers (`joinFakeParticipant`, `disconnectFakeParticipants`, `updateParticipantMetadata`) into a dedicated `livekit-cli-helpers.ts` file for better organization and separation of concerns. Updates numerous integration tests to utilize the new waiting and LiveKit CLI helpers.
2026-03-06 16:38:12 +01:00
juancarmore
7607f134a0 Merge branch 'main' into feat/room-members-users 2026-03-04 18:17:05 +01:00
CSantosM
53f62708ce backend(test): increase sleep duration for webhook processing in expired rooms GC test 2026-03-04 12:56:42 +01:00
CSantosM
8953e9891c backend(test): Extends test sleep for webhook processing
Increases the sleep duration in room deletion test helpers from 1 second to 5 seconds. This ensures that webhooks triggered by room deletion have enough time to process before test execution continues, addressing intermittent test failures caused by premature assertions. This is a temporary measure to improve test stability.
2026-03-04 12:28:35 +01:00
juancarmore
e05dfdf001 backend: enhance room member token generation with support for recording access and update related tests 2026-03-03 10:02:39 +01:00
juancarmore
63d72c994b refactor: rename anonymous room access to access across all codebase
- Updated the MeetRoom interface to replace anonymous access configuration with a unified access configuration.
- Refactored RoomService to handle access configuration for both anonymous and registered users.
- Modified tests to reflect changes in access configuration structure.
- Updated frontend components to use the new access configuration for meeting URLs and permissions.
- Ensured backward compatibility by adjusting API endpoints and request/response types.
2026-03-02 17:37:25 +01:00
juancarmore
43181bd068 backend: refactor global configuration methods to support partial updates and improve field retrieval 2026-02-27 10:34:46 +01:00
juancarmore
340d53066c backend: enhance user repository and service to support partial updates and selective field retrieval 2026-02-27 09:39:26 +01:00
juancarmore
54bb06adfd backend: implement atomic update paths for recording and room repositories 2026-02-26 19:51:42 +01:00
juancarmore
2572fd3960 backend: update room retrieval to use selective fields for efficiency 2026-02-26 18:37:48 +01:00
juancarmore
37023fe077 backend: refactor code to use partial updates for room properties 2026-02-26 17:50:46 +01:00
juancarmore
eaf021f1dc test: add unit tests for MeetRecordingInfo, MeetRoom, and MeetRoomMember fields coverage 2026-02-26 14:11:16 +01:00
juancarmore
22a42e4c63 test: add unit tests for document-only fields in various schemas 2026-02-26 14:10:56 +01:00
juancarmore
b2380ec12b fix: replace update method with replace for room data consistency in setupTestUsersForRoom 2026-02-24 20:42:20 +01:00
juancarmore
78edf51842 test: replace update method with replace for room status consistency in GC tests 2026-02-24 20:39:19 +01:00
Carlos Santos
177134d2a6
Updates to Express v5 (#7)
Updates the Express dependency to version 5.2.1 and its corresponding types.

This change also adapts the request validator middleware to extract validated query parameters and store them in `res.locals` instead of modifying `req.query` to align with Express v5's intended usage and prevent potential conflicts.

Includes a fix for a server startup error, logging the error and exiting the process, and adds a type definition file for Express locals.
2026-02-24 11:54:43 +01:00
juancarmore
a25569b4f7 test: add migration tests for global config, recordings, rooms, and users 2026-02-23 13:49:06 +01:00
juancarmore
5cbd05be11 backend: refactor test cleanup to sequentially delete rooms and recordings 2026-02-23 10:14:51 +01:00
CSantosM
f780fac60d backend: add sorting parameters to getRooms API calls in tests 2026-02-17 14:47:49 +01:00
CSantosM
1856201b87 backend: refactor GET Recording fields filtering tests to remove redundant setup 2026-02-17 12:53:55 +01:00
CSantosM
65674e164d backend: separated room and recording deletion for avoiding race condition deleting recordings 2026-02-17 11:54:37 +01:00
CSantosM
f42d91ec74 backend: remove allowUserCreation from security config tests for simplification 2026-02-17 11:28:30 +01:00
CSantosM
4708181628 backend: update expectObjectFields to use expect.arrayContaining for better key validation 2026-02-17 11:08:30 +01:00
CSantosM
874538a8b7 backend: Adds fields filtering tests to recording API
Enables filtering of recording API responses (start, get, list, stop)
using both the `fields` query parameter and the `X-Fields` header.
The feature allows clients to request only specific fields in the
response, improving performance and reducing payload size.
When both are provided, values are merged (union of unique fields).
2026-02-16 19:02:00 +01:00
CSantosM
d155846708 backend: enhance room deletion API to support field filtering
- Added support for `fields` and `extraFields` parameters in `deleteMeetRoom` and `bulkDeleteMeetRooms` methods to allow clients to specify which fields to include in the response.
- Updated the `RoomService` to handle field filtering logic when deleting rooms, ensuring only requested fields are returned in the response.
- Enhanced integration tests to verify that the API correctly filters responses based on `fields` and `extraFields` query parameters and headers during room deletion operations.
- Created new test cases to validate the behavior when some rooms fail to delete due to active meetings, ensuring the response includes the correct fields.
- Refactored existing tests to accommodate the new field filtering functionality and ensure comprehensive coverage.
2026-02-13 16:45:38 +01:00
CSantosM
5c80387244 backend: enhance room API tests to validate extra fields in responses 2026-02-13 16:45:38 +01:00
CSantosM
b8e7baf705 Renames expand to extraFields in room API
Updates the room API to use `extraFields` instead of `expand` for including additional data in responses.

This change improves clarity and consistency in the API design.
It also simplifies the filtering logic by explicitly differentiating between
base fields (controlled by `fields`) and extra fields (controlled by `extraFields`).

The changes include:
- Renaming the query parameter and header
- Updating the validation schemas
- Adjusting the filtering logic in the controller and service layers
- Updating the frontend components and services
2026-02-13 16:45:38 +01:00
juancarmore
5ca46e59d8 Merge branch 'main' into feat/room-members-users 2026-02-13 12:10:00 +01:00
cruizba
a853aa02a2 backend: apply dynamic base path to OpenAPI docs server URLs
When deployed under a base path (e.g. /meet), the Stoplight "Try It"
requests were hitting /api/v1 instead of /meet/api/v1. This applies
the base path to the embedded OpenAPI spec's servers array at serve time,
following the same pattern used for the frontend index.html.

Also renames html-injection.utils to html-dynamic-base-path.utils and
updates function names for better wording.
2026-02-11 19:18:30 +01:00
CSantosM
19e7c48fd0 test: Update field filtering assertions in room creation tests 2026-02-09 14:36:25 +01:00
CSantosM
d4a87f8a45 Enables response control via headers
Adds functionality to control the room creation and retrieval responses
using the `X-Fields` and `X-Expand` headers.

- `X-Fields` allows clients to specify which fields to include in the
  response, optimizing bandwidth usage.
- `X-Expand` allows clients to request the full data of expandable
  properties, such as `config`, avoiding subsequent GET requests.

This change introduces new request validators, service methods, and
helper functions to handle the header logic and process the room objects accordingly.
2026-02-09 13:16:58 +01:00
CSantosM
ecef2844a0 Adds filtering and expansion to room/recording APIs
Introduces filtering capabilities for room and recording list endpoints.

This allows users to query rooms and recordings based on various criteria such as name, status, and other relevant properties.
It also implements expansion support for room properties, enabling retrieval of full object details instead of stubs.

The changes include:
- Defines data models for room and recording filter requests.
- Updates Zod schemas for robust input validation.
- Implements logic for collapsing and expanding room properties, improving API response structure and efficiency.
2026-02-09 13:16:58 +01:00
juancarmore
70ca7a0fa9 backend: remove currentParticipantIdentity from room member schema and refactor RoomMemberService to use meberId as participant identity when joining a meeting. Update related tests 2026-02-09 10:03:06 +01:00
CSantosM
85e4a5b8a6 Adds expandable properties to room responses
Implements expandable properties for room responses to reduce payload size.

Introduces an `expand` query parameter to control which complex properties, like `config`, are included in the response. By default, these properties are replaced with a stub containing a HATEOAS link to fetch the full data.

This change optimizes network bandwidth and improves API performance by preventing unnecessary data transfer, especially when clients only need a subset of room details.
2026-02-05 13:52:24 +01:00
juancarmore
335ab30a48 test: add integration tests for Room Members API 2026-02-05 12:22:10 +01:00
juancarmore
f01ec31c1b test: update room member token response validation and permissions handling 2026-02-05 12:21:37 +01:00
juancarmore
18426e2111 test: update webhook config references and improve request helpers
- Renamed `getWebbhookConfig` and `updateWebbhookConfig` to `getWebhookConfig` and `updateWebhookConfig` respectively for consistency.
- Updated integration tests to reflect the new function names.
- Refactored request helper methods to use `getFullPath` for API endpoint construction.
- Removed unnecessary parameters in `stopRecording` calls across various tests.
- Cleaned up test scenarios by removing redundant room deletion logic.
- Ensured proper handling of recording states in tests to avoid race conditions.
2026-02-05 12:19:46 +01:00
juancarmore
07ac5b91c9 Merge remote-tracking branch 'origin/main' into feat/room-members-users 2026-02-03 13:16:40 +01:00
juancarmore
6e225fe265 test: add integration tests for room member creation and validation 2026-02-03 11:36:07 +01:00
cruizba
177648e6d5 tests: Use getFullPath for constructing recording URLs in assertions 2026-02-02 21:09:34 +01:00
cruizba
b059b88be4 fix tests: Update API path construction with new path 2026-02-02 20:51:03 +01:00
juancarmore
d252784a39 test: add tests for room member token invalidation scenarios 2026-02-02 17:18:57 +01:00
CSantosM
ba7600bfc5 test: Fix default captions config enabled state to false 2026-02-02 17:01:41 +01:00
CSantosM
accb35c7e1 Adds recording encoding options to room config and start recording
Adds configuration options for recording encoding, including presets and advanced settings, allowing users to customize video and audio quality.

This enhancement introduces new schemas for recording encoding presets and advanced options, enabling users to select from predefined encoding profiles or fine-tune specific video and audio parameters.

A conversion helper is implemented to translate between the internal encoding configurations and the format required by the LiveKit SDK.

backend: Adds recording encoding configuration options

Allows users to specify custom audio and video encoding settings for recordings, overriding room defaults.

This enhancement provides greater flexibility in controlling recording quality and file size. It introduces new schema definitions for encoding options and validates these configurations through Zod schemas.

Enforces complete video/audio encoding options

Requires both video and audio configurations with all their properties
when using advanced encoding options for recordings. This change ensures
complete encoding setups and prevents potential recording failures due to
missing encoding parameters. It also corrects a typo of keyframeInterval.

Add video depth option to recording encoding settings
2026-02-02 17:00:01 +01:00
juancarmore
21f4563202 test: add integration tests for user management API 2026-02-02 12:41:30 +01:00
juancarmore
c561cf9bcd test: enhance change password and user profile tests with new scenarios and validations 2026-01-30 17:27:21 +01:00
juancarmore
54c2c79ccb test: streamline authentication request helpers and update related tests 2026-01-30 17:26:44 +01:00
juancarmore
cdbb30fc2a test: add comprehensive token validation tests for access and room member tokens 2026-01-30 13:04:24 +01:00
juancarmore
993681395c test: enhance authentication API tests with user role validations and token management 2026-01-30 10:21:32 +01:00
juancarmore
ad3e0b81e5 test: update authentication methods to return access and refresh tokens 2026-01-30 10:21:08 +01:00