+
    ~j.                         ^ RI t ^ RIHt ^ RIHtHtHtHtHtH	t	H
t
HtHtHtHtHtHtHtHtHtHtHtHtHtHt ^ RIHtHt ^RIHt ^RIHt Rt   ! R R]4      t!R# )	    N)uuid4)CreateRoomRequestListRoomsRequestDeleteRoomRequestListRoomsResponseDeleteRoomResponseListParticipantsRequestListParticipantsResponseRoomParticipantIdentityMuteRoomTrackRequestMuteRoomTrackResponseUpdateParticipantRequestUpdateSubscriptionsRequestSendDataRequestSendDataResponseUpdateRoomMetadataRequestRemoveParticipantResponseUpdateSubscriptionsResponseForwardParticipantRequestForwardParticipantResponseMoveParticipantRequestMoveParticipantResponse)RoomParticipantInfo)Service)VideoGrantsRoomServicec                   ,  a a ] tR t^"t oRtV3R lV 3R lltV3R lR ltV3R lR ltV3R lR	 ltV3R
 lR lt	V3R lR lt
V3R lR ltV3R lR ltV3R lR ltV3R lR ltV3R lR ltV3R lR ltV3R lR ltV3R lR ltRtVtV ;t# )r   a@  Client for LiveKit RoomService API

Recommended way to use this service is via `livekit.api.LiveKitAPI`:

```python
from livekit import api
lkapi = api.LiveKitAPI()
room_service = lkapi.room
```

Also see https://docs.livekit.io/home/server/managing-rooms/ and https://docs.livekit.io/home/server/managing-participants/
c                F   < V ^8  d   QhRS[ P                  RS[RS[RS[/# )   sessionurlapi_key
api_secret)aiohttpClientSessionstr)format__classdict__s   "m/Users/mitch_tango/dev/rabbit-r1-livekit/agent/.venv/lib/python3.14/site-packages/livekit/api/room_service.py__annotate__RoomService.__annotate__0   s0     < < 5 5 <C <# <[^ <    c                (   < \         SV `  WW44       R # )N)super__init__)selfr!   r"   r#   r$   	__class__s   &&&&&r*   r0   RoomService.__init__0   s    w;r-   c                &   < V ^8  d   QhRS[ RS[/# )r    createreturn)r   r   )r(   r)   s   "r*   r+   r,   3   s     
 
!
 

r-   c                   "   V P                   P                  \        RVV P                  \	        RR7      4      \
        4      G Rj  xL
 #  L5i)ab  Creates a new room with specified configuration.

Args:
    create (CreateRoomRequest): arg containing:
        - name: str - Unique room name
        - empty_timeout: int - Seconds to keep room open if empty
        - max_participants: int - Max allowed participants
        - metadata: str - Custom room metadata
        - egress: RoomEgress - Egress configuration
        - min_playout_delay: int - Minimum playout delay in ms
        - max_playout_delay: int - Maximum playout delay in ms
        - sync_streams: bool - Enable A/V sync for playout delays >200ms

Returns:
    Room: The created room object

CreateRoomTroom_createN)_clientrequestSVC_auth_headerr   r   )r1   r5   s   &&r*   create_roomRoomService.create_room3   sG     ( \\))kd;<
 
 	
 
   AAAAc                &   < V ^8  d   QhRS[ RS[/# r    listr6   )r   r   )r(   r)   s   "r*   r+   r,   O   s     
 
%5 
:K 
r-   c                   "   V P                   P                  \        RVV P                  \	        RR7      4      \
        4      G Rj  xL
 #  L5i)zLists active rooms.

Args:
    list (ListRoomsRequest): arg containing:
        - names: list[str] - Optional list of room names to filter by

Returns:
    ListRoomsResponse:
        - rooms: list[Room] - List of active Room objects
	ListRoomsT)	room_listN)r;   r<   r=   r>   r   r   r1   rD   s   &&r*   
list_roomsRoomService.list_roomsO   sG      \\))kD9:
 
 	
 
rA   c                &   < V ^8  d   QhRS[ RS[/# )r    deleter6   )r   r   )r(   r)   s   "r*   r+   r,   b   s     
 
(9 
>P 
r-   c                   "   V P                   P                  \        RVV P                  \	        RR7      4      \
        4      G Rj  xL
 #  L5i)zDeletes a room and disconnects all participants.

Args:
    delete (DeleteRoomRequest): arg containing:
        - room: str - Name of room to delete

Returns:
    DeleteRoomResponse: Empty response object

DeleteRoomTr9   N)r;   r<   r=   r>   r   r   )r1   rL   s   &&r*   delete_roomRoomService.delete_roomb   sG      \\))kd;<
 
 	
 
rA   c                &   < V ^8  d   QhRS[ RS[/# r    updater6   )r   r   )r(   r)   s   "r*   r+   r,   t   s     
 
1J 
t 
r-   c                   "   V P                   P                  \        RVV P                  \	        RVP
                  R7      4      \        4      G Rj  xL
 #  L5i)a  Updates a room's [metadata](https://docs.livekit.io/home/client/data/room-metadata/).

Args:
    update (UpdateRoomMetadataRequest): arg containing:
        - room: str - Name of room to update
        - metadata: str - New metadata to set

Returns:
    Room: Updated Room object
UpdateRoomMetadataT
room_adminroomN)r;   r<   r=   r>   r   rX   r   r1   rS   s   &&r*   update_room_metadata RoomService.update_room_metadatat   sM      \\)) kTLM
 
 	
 
   AAAAc                &   < V ^8  d   QhRS[ RS[/# rC   )r	   r
   )r(   r)   s   "r*   r+   r,      s     
 
,C 
H` 
r-   c                   "   V P                   P                  \        RVV P                  \	        RVP
                  R7      4      \        4      G Rj  xL
 #  L5i)a  Lists all participants in a room.

Args:
    list (ListParticipantsRequest): arg containing:
        - room: str - Name of room to list participants from

Returns:
    ListParticipantsResponse:
        - participants: list[ParticipantInfo] - List of participant details
ListParticipantsTrV   N)r;   r<   r=   r>   r   rX   r
   rH   s   &&r*   list_participantsRoomService.list_participants   sM      \\))kT		JK$
 
 	
 
r\   c                &   < V ^8  d   QhRS[ RS[/# )r    getr6   )r   r   )r(   r)   s   "r*   r+   r,      s     
 
)@ 
_ 
r-   c                   "   V P                   P                  \        RVV P                  \	        RVP
                  R7      4      \        4      G Rj  xL
 #  L5i)a  Gets details about a specific participant.

Args:
    get (RoomParticipantIdentity): arg containing:
        - room: str - Room name
        - identity: str - Participant identity to look up

Returns:
    ParticipantInfo:
        - sid: str - Participant session ID
        - identity: str - Participant identity
        - state: int - Connection state
        - tracks: list[TrackInfo] - Published tracks
        - metadata: str - Participant metadata
        - joined_at: int - Join timestamp
        - name: str - Display name
        - version: int - Protocol version
        - permission: ParticipantPermission - Granted permissions
        - region: str - Connected region
GetParticipantTrV   Nr;   r<   r=   r>   r   rX   r   )r1   rc   s   &&r*   get_participantRoomService.get_participant   sM     * \\))kTIJ
 
 	
 
r\   c                &   < V ^8  d   QhRS[ RS[/# )r    remover6   )r   r   )r(   r)   s   "r*   r+   r,      s     
 
-
	"
r-   c                   "   V P                   P                  \        RVV P                  \	        RVP
                  R7      4      \        4      G Rj  xL
 #  L5i)zRemoves a participant from a room.

Args:
    remove (RoomParticipantIdentity): arg containing:
        - room: str - Room name
        - identity: str - Identity of participant to remove

Returns:
    RemoveParticipantResponse: Empty response object
RemoveParticipantTrV   N)r;   r<   r=   r>   r   rX   r   )r1   rj   s   &&r*   remove_participantRoomService.remove_participant   sM      \\))kTLM%
 
 	
 
r\   c                $   < V ^8  d   QhRS[ RR/# )r    forwardr6   N)r   )r(   r)   s   "r*   r+   r,      s     
 
1J 
t 
r-   c                   "   V P                   P                  \        RVV P                  \	        RVP
                  VP                  R7      4      \        4      G Rj  xL
  R#  L5i)ab  Forwards a participant and their published tracks from one room to another.

This feature is only available for LiveKit Cloud/Private Cloud.

Args:
    forward (ForwardParticipantRequest): arg containing:
        - room: str - Room name
        - identity: str - identity of Participant to forward
        - destination_room: str - Destination room name
ForwardParticipantTrW   rX   destination_roomN)r;   r<   r=   r>   r   rX   rt   r   )r1   rp   s   &&r*   forward_participantRoomService.forward_participant   sX      ll"" #',,IaIa
 '

 
	
 
	
   AA%A#A%c                $   < V ^8  d   QhRS[ RR/# )r    mover6   N)r   )r(   r)   s   "r*   r+   r,      s     
 
+A 
d 
r-   c                   "   V P                   P                  \        RVV P                  \	        RVP
                  VP                  R7      4      \        4      G Rj  xL
  R#  L5i)a0  Moves a participant from one room to another.

This feature is only available for LiveKit Cloud/Private Cloud.

Args:
    move (MoveParticipantRequest): arg containing:
        - room: str - Room name
        - identity: str - Participant identity
        - destination_room: str - Destination room name
MoveParticipantTrs   N)r;   r<   r=   r>   r   rX   rt   r   )r1   ry   s   &&r*   move_participantRoomService.move_participant   sZ      ll""#%)%:%: $
 	
 	
rw   c                &   < V ^8  d   QhRS[ RS[/# rR   )r   r   )r(   r)   s   "r*   r+   r,      s     
 
$
 

r-   c                   "   V P                   P                  \        RVV P                  \	        RVP
                  R7      4      \        4      G Rj  xL
 #  L5i)a  Mutes or unmutes a participant's published track.

Args:
    update (MuteRoomTrackRequest): arg containing:
        - room: str - Room name
        - identity: str - Participant identity
        - track_sid: str - Track session ID to mute
        - muted: bool - True to mute, False to unmute

Returns:
    MuteRoomTrackResponse containing:
        - track: TrackInfo - Updated track information
MutePublishedTrackTrV   N)r;   r<   r=   r>   r   rX   r   rY   s   &&r*   mute_published_track RoomService.mute_published_track   sM     " \\)) kTLM!
 
 	
 
r\   c                &   < V ^8  d   QhRS[ RS[/# rR   )r   r   )r(   r)   s   "r*   r+   r,     s     
 
/G 
O 
r-   c                   "   V P                   P                  \        RVV P                  \	        RVP
                  R7      4      \        4      G Rj  xL
 #  L5i)a  Updates a participant's metadata or permissions.

Args:
    update (UpdateParticipantRequest): arg containing:
        - room: str - Room name
        - identity: str - Participant identity
        - metadata: str - New metadata
        - permission: ParticipantPermission - New permissions
        - name: str - New display name
        - attributes: dict[str, str] - Key-value attributes

Returns:
    ParticipantInfo: Updated participant information
UpdateParticipantTrV   Nrf   rY   s   &&r*   update_participantRoomService.update_participant  sM      \\))kTLM
 
 	
 
r\   c                &   < V ^8  d   QhRS[ RS[/# rR   )r   r   )r(   r)   s   "r*   r+   r,   .  s     
 
0
	$
r-   c                   "   V P                   P                  \        RVV P                  \	        RVP
                  R7      4      \        4      G Rj  xL
 #  L5i)a  Updates a participant's track subscriptions.

Args:
    update (UpdateSubscriptionsRequest): arg containing:
        - room: str - Room name
        - identity: str - Participant identity
        - track_sids: list[str] - Track session IDs
        - subscribe: bool - True to subscribe, False to unsubscribe
        - participant_tracks: list[ParticipantTracks] - Participant track mappings

Returns:
    UpdateSubscriptionsResponse: Empty response object
UpdateSubscriptionsTrV   N)r;   r<   r=   r>   r   rX   r   rY   s   &&r*   update_subscriptions RoomService.update_subscriptions.  sM       \\))!kTLM'
 
 	
 
r\   c                &   < V ^8  d   QhRS[ RS[/# )r    sendr6   )r   r   )r(   r)   s   "r*   r+   r,   F  s     
 
O 
8H 
r-   c                   "   \        4       P                  Vn        V P                  P	                  \
        RVV P                  \        RVP                  R7      4      \        4      G Rj  xL
 #  L5i)a  Sends data to participants in a room.

Args:
    send (SendDataRequest): arg containing:
        - room: str - Room name
        - data: bytes - Data payload to send
        - kind: DataPacket.Kind - RELIABLE or LOSSY delivery
        - destination_identities: list[str] - Target participant identities
        - topic: str - Optional topic for the message

Returns:
    SendDataResponse: Empty response object
SendDataTrV   N)
r   bytesnoncer;   r<   r=   r>   r   rX   r   )r1   r   s   &&r*   	send_dataRoomService.send_dataF  sZ      W]]
\\))kT		JK
 
 	
 
s   A(A1*A/+A1 )__name__
__module____qualname____firstlineno____doc__r0   r?   rI   rO   rZ   r`   rg   rm   ru   r|   r   r   r   r   __static_attributes____classdictcell____classcell__)r2   r)   s   @@r*   r   r   "   s     < <
 
8
 
&
 
$
 
&
 
&
 
:
 
*
 
0
 
4
 
2
 
.
 
0
 
 
r-   )"r%   uuidr   livekit.protocol.roomr   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   livekit.protocol.modelsr   r   _servicer   access_tokenr   r=   r   r   r-   r*   <module>r      sJ          . :  % z
' z
r-   