From b1b4ad280b84f68f0afa77efbd01a52fd76065df Mon Sep 17 00:00:00 2001 From: Tomasz Mazur <47872060+AHGIJMKLKKZNPJKQR@users.noreply.github.com> Date: Tue, 24 Jun 2025 15:52:23 +0200 Subject: [PATCH 1/5] Update openapi --- fishjam/_openapi_client/models/room_config.py | 8 ++++++++ tests/test_room_api.py | 1 + 2 files changed, 9 insertions(+) diff --git a/fishjam/_openapi_client/models/room_config.py b/fishjam/_openapi_client/models/room_config.py index 0183ee0..13e7529 100644 --- a/fishjam/_openapi_client/models/room_config.py +++ b/fishjam/_openapi_client/models/room_config.py @@ -16,6 +16,8 @@ class RoomConfig: max_peers: Union[Unset, None, int] = UNSET """Maximum amount of peers allowed into the room""" + public: Union[Unset, None, bool] = UNSET + """True if livestream viewers can omit specifying a token.""" room_type: Union[Unset, RoomConfigRoomType] = RoomConfigRoomType.CONFERENCE """The use-case of the room. If not provided, this defaults to conference.""" video_codec: Union[Unset, None, RoomConfigVideoCodec] = UNSET @@ -28,6 +30,7 @@ class RoomConfig: def to_dict(self) -> Dict[str, Any]: """@private""" max_peers = self.max_peers + public = self.public room_type: Union[Unset, str] = UNSET if not isinstance(self.room_type, Unset): room_type = self.room_type.value @@ -43,6 +46,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict.update({}) if max_peers is not UNSET: field_dict["maxPeers"] = max_peers + if public is not UNSET: + field_dict["public"] = public if room_type is not UNSET: field_dict["roomType"] = room_type if video_codec is not UNSET: @@ -58,6 +63,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() max_peers = d.pop("maxPeers", UNSET) + public = d.pop("public", UNSET) + _room_type = d.pop("roomType", UNSET) room_type: Union[Unset, RoomConfigRoomType] if isinstance(_room_type, Unset): @@ -78,6 +85,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: room_config = cls( max_peers=max_peers, + public=public, room_type=room_type, video_codec=video_codec, webhook_url=webhook_url, diff --git a/tests/test_room_api.py b/tests/test_room_api.py index 8cad535..143acd0 100644 --- a/tests/test_room_api.py +++ b/tests/test_room_api.py @@ -154,6 +154,7 @@ def test_valid(self, room_api: FishjamClient): video_codec=None, webhook_url=None, room_type=RoomConfigRoomType(CONFERENCE), + public=False, ) config.__setitem__("roomId", room.config.__getitem__("roomId")) config.__setitem__( From f2e68c5f12e805253f18b5fce610198d74d95fd4 Mon Sep 17 00:00:00 2001 From: Tomasz Mazur <47872060+AHGIJMKLKKZNPJKQR@users.noreply.github.com> Date: Tue, 24 Jun 2025 15:55:58 +0200 Subject: [PATCH 2/5] Update test --- tests/test_room_api.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_room_api.py b/tests/test_room_api.py index 143acd0..8cad535 100644 --- a/tests/test_room_api.py +++ b/tests/test_room_api.py @@ -154,7 +154,6 @@ def test_valid(self, room_api: FishjamClient): video_codec=None, webhook_url=None, room_type=RoomConfigRoomType(CONFERENCE), - public=False, ) config.__setitem__("roomId", room.config.__getitem__("roomId")) config.__setitem__( From e81cc0e2602427abe6a7e2cb5498ec07c08ef913 Mon Sep 17 00:00:00 2001 From: Tomasz Mazur <47872060+AHGIJMKLKKZNPJKQR@users.noreply.github.com> Date: Thu, 26 Jun 2025 14:37:59 +0200 Subject: [PATCH 3/5] Update openapi --- fishjam/_openapi_client/models/room_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fishjam/_openapi_client/models/room_config.py b/fishjam/_openapi_client/models/room_config.py index 13e7529..8fc0c50 100644 --- a/fishjam/_openapi_client/models/room_config.py +++ b/fishjam/_openapi_client/models/room_config.py @@ -16,7 +16,7 @@ class RoomConfig: max_peers: Union[Unset, None, int] = UNSET """Maximum amount of peers allowed into the room""" - public: Union[Unset, None, bool] = UNSET + public: Union[Unset, bool] = False """True if livestream viewers can omit specifying a token.""" room_type: Union[Unset, RoomConfigRoomType] = RoomConfigRoomType.CONFERENCE """The use-case of the room. If not provided, this defaults to conference.""" From f3efe1c9eebc095ea0edfd2edaeef6f7780c29be Mon Sep 17 00:00:00 2001 From: Tomasz Mazur <47872060+AHGIJMKLKKZNPJKQR@users.noreply.github.com> Date: Thu, 26 Jun 2025 14:43:11 +0200 Subject: [PATCH 4/5] Update RoomOptions --- fishjam/api/_fishjam_client.py | 2 ++ tests/test_room_api.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/fishjam/api/_fishjam_client.py b/fishjam/api/_fishjam_client.py index aa077a1..95f2fcf 100644 --- a/fishjam/api/_fishjam_client.py +++ b/fishjam/api/_fishjam_client.py @@ -59,6 +59,8 @@ class RoomOptions: "conference", "audio_only", "livestream", "full_feature", "broadcaster" ] = "conference" """The use-case of the room. If not provided, this defaults to conference.""" + public: bool = False + """True if livestream viewers can omit specifying a token.""" @dataclass diff --git a/tests/test_room_api.py b/tests/test_room_api.py index 8cad535..2ca6b29 100644 --- a/tests/test_room_api.py +++ b/tests/test_room_api.py @@ -256,9 +256,10 @@ def test_invalid(self, room_api: FishjamClient): class TestCreateLivestreamViewerToken: def test_valid(self, room_api: FishjamClient): - room = room_api.create_room(RoomOptions(room_type=LIVESTREAM)) + room = room_api.create_room(RoomOptions(room_type=LIVESTREAM, public=True)) viewer_token = room_api.create_livestream_viewer_token(room.id) + assert room.config.public assert isinstance(viewer_token, str) def test_invalid(self, room_api: FishjamClient): From 092bae0a0dd9b08956ac219adff8f81a54fa639d Mon Sep 17 00:00:00 2001 From: Tomasz Mazur <47872060+AHGIJMKLKKZNPJKQR@users.noreply.github.com> Date: Thu, 26 Jun 2025 14:47:25 +0200 Subject: [PATCH 5/5] Forward argument --- fishjam/api/_fishjam_client.py | 1 + 1 file changed, 1 insertion(+) diff --git a/fishjam/api/_fishjam_client.py b/fishjam/api/_fishjam_client.py index 95f2fcf..e110220 100644 --- a/fishjam/api/_fishjam_client.py +++ b/fishjam/api/_fishjam_client.py @@ -125,6 +125,7 @@ def create_room(self, options: RoomOptions | None = None) -> Room: video_codec=codec, webhook_url=options.webhook_url, room_type=RoomConfigRoomType(options.room_type), + public=options.public, ) room = cast(