@volter/twin-livekit 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +106 -0
  3. package/dist/src/cli.d.ts +2 -0
  4. package/dist/src/cli.js +23 -0
  5. package/dist/src/egress-service-cli.d.ts +2 -0
  6. package/dist/src/egress-service-cli.js +101 -0
  7. package/dist/src/index.d.ts +14 -0
  8. package/dist/src/index.js +53 -0
  9. package/dist/src/livekit-budget.d.ts +57 -0
  10. package/dist/src/livekit-budget.js +131 -0
  11. package/dist/src/livekit-capabilities.d.ts +3 -0
  12. package/dist/src/livekit-capabilities.js +728 -0
  13. package/dist/src/livekit-conformance.d.ts +8 -0
  14. package/dist/src/livekit-conformance.js +13 -0
  15. package/dist/src/livekit-connector.d.ts +130 -0
  16. package/dist/src/livekit-connector.js +382 -0
  17. package/dist/src/livekit-data.d.ts +86 -0
  18. package/dist/src/livekit-data.js +246 -0
  19. package/dist/src/livekit-perform-harness.d.ts +5 -0
  20. package/dist/src/livekit-perform-harness.js +17 -0
  21. package/dist/src/livekit-server.d.ts +23 -0
  22. package/dist/src/livekit-server.js +45 -0
  23. package/dist/src/livekit-service-cli.d.ts +2 -0
  24. package/dist/src/livekit-service-cli.js +88 -0
  25. package/dist/src/livekit-token.d.ts +68 -0
  26. package/dist/src/livekit-token.js +76 -0
  27. package/dist/src/livekit-twin.d.ts +4 -0
  28. package/dist/src/livekit-twin.js +1161 -0
  29. package/dist/src/livekit-types.d.ts +203 -0
  30. package/dist/src/livekit-types.js +1 -0
  31. package/dist/src/livekit-webhook.d.ts +26 -0
  32. package/dist/src/livekit-webhook.js +79 -0
  33. package/dist/src/redis-service-cli.d.ts +2 -0
  34. package/dist/src/redis-service-cli.js +35 -0
  35. package/dist/test-fixtures/livekit-openapi-operations.SOURCE.md +88 -0
  36. package/dist/test-fixtures/livekit-openapi-operations.json +442 -0
  37. package/dist/test-fixtures/protobufs/cloud_replay.proto +82 -0
  38. package/dist/test-fixtures/protobufs/livekit_agent.proto +185 -0
  39. package/dist/test-fixtures/protobufs/livekit_agent_dispatch.proto +103 -0
  40. package/dist/test-fixtures/protobufs/livekit_agent_simulation.proto +422 -0
  41. package/dist/test-fixtures/protobufs/livekit_agent_worker.proto +29 -0
  42. package/dist/test-fixtures/protobufs/livekit_agentdb.proto +226 -0
  43. package/dist/test-fixtures/protobufs/livekit_analytics.proto +312 -0
  44. package/dist/test-fixtures/protobufs/livekit_cloud_agent.proto +376 -0
  45. package/dist/test-fixtures/protobufs/livekit_connector.proto +41 -0
  46. package/dist/test-fixtures/protobufs/livekit_connector_twilio.proto +65 -0
  47. package/dist/test-fixtures/protobufs/livekit_connector_whatsapp.proto +171 -0
  48. package/dist/test-fixtures/protobufs/livekit_egress.proto +641 -0
  49. package/dist/test-fixtures/protobufs/livekit_ingress.proto +222 -0
  50. package/dist/test-fixtures/protobufs/livekit_internal.proto +228 -0
  51. package/dist/test-fixtures/protobufs/livekit_metrics.proto +103 -0
  52. package/dist/test-fixtures/protobufs/livekit_models.proto +992 -0
  53. package/dist/test-fixtures/protobufs/livekit_phone_number.proto +151 -0
  54. package/dist/test-fixtures/protobufs/livekit_room.proto +312 -0
  55. package/dist/test-fixtures/protobufs/livekit_rtc.proto +673 -0
  56. package/dist/test-fixtures/protobufs/livekit_sip.proto +1000 -0
  57. package/dist/test-fixtures/protobufs/livekit_token_source.proto +49 -0
  58. package/dist/test-fixtures/protobufs/livekit_webhook.proto +62 -0
  59. package/package.json +58 -0
  60. package/src/cli.ts +22 -0
  61. package/src/egress-service-cli.ts +111 -0
  62. package/src/index.ts +103 -0
  63. package/src/livekit-budget.ts +158 -0
  64. package/src/livekit-capabilities.ts +789 -0
  65. package/src/livekit-conformance.ts +15 -0
  66. package/src/livekit-connector.ts +406 -0
  67. package/src/livekit-data.ts +278 -0
  68. package/src/livekit-perform-harness.ts +17 -0
  69. package/src/livekit-server.ts +67 -0
  70. package/src/livekit-service-cli.ts +93 -0
  71. package/src/livekit-token.ts +133 -0
  72. package/src/livekit-twin.ts +1162 -0
  73. package/src/livekit-types.ts +211 -0
  74. package/src/livekit-webhook.ts +91 -0
  75. package/src/redis-service-cli.ts +39 -0
  76. package/test-fixtures/livekit-openapi-operations.SOURCE.md +88 -0
  77. package/test-fixtures/livekit-openapi-operations.json +442 -0
  78. package/test-fixtures/protobufs/cloud_replay.proto +82 -0
  79. package/test-fixtures/protobufs/livekit_agent.proto +185 -0
  80. package/test-fixtures/protobufs/livekit_agent_dispatch.proto +103 -0
  81. package/test-fixtures/protobufs/livekit_agent_simulation.proto +422 -0
  82. package/test-fixtures/protobufs/livekit_agent_worker.proto +29 -0
  83. package/test-fixtures/protobufs/livekit_agentdb.proto +226 -0
  84. package/test-fixtures/protobufs/livekit_analytics.proto +312 -0
  85. package/test-fixtures/protobufs/livekit_cloud_agent.proto +376 -0
  86. package/test-fixtures/protobufs/livekit_connector.proto +41 -0
  87. package/test-fixtures/protobufs/livekit_connector_twilio.proto +65 -0
  88. package/test-fixtures/protobufs/livekit_connector_whatsapp.proto +171 -0
  89. package/test-fixtures/protobufs/livekit_egress.proto +641 -0
  90. package/test-fixtures/protobufs/livekit_ingress.proto +222 -0
  91. package/test-fixtures/protobufs/livekit_internal.proto +228 -0
  92. package/test-fixtures/protobufs/livekit_metrics.proto +103 -0
  93. package/test-fixtures/protobufs/livekit_models.proto +992 -0
  94. package/test-fixtures/protobufs/livekit_phone_number.proto +151 -0
  95. package/test-fixtures/protobufs/livekit_room.proto +312 -0
  96. package/test-fixtures/protobufs/livekit_rtc.proto +673 -0
  97. package/test-fixtures/protobufs/livekit_sip.proto +1000 -0
  98. package/test-fixtures/protobufs/livekit_token_source.proto +49 -0
  99. package/test-fixtures/protobufs/livekit_webhook.proto +62 -0
@@ -0,0 +1,151 @@
1
+ syntax = "proto3";
2
+
3
+ package livekit;
4
+
5
+ option go_package = "github.com/livekit/protocol/livekit";
6
+ option csharp_namespace = "LiveKit.Proto";
7
+ option ruby_package = "LiveKit::Proto";
8
+
9
+ import "google/protobuf/timestamp.proto";
10
+ import "livekit_models.proto";
11
+ import "logger/options.proto";
12
+
13
+
14
+ // Phone number status enumeration
15
+ enum PhoneNumberStatus {
16
+ PHONE_NUMBER_STATUS_UNSPECIFIED = 0; // Default value
17
+ PHONE_NUMBER_STATUS_ACTIVE = 1; // Number is active and ready for use
18
+ PHONE_NUMBER_STATUS_PENDING = 2; // Number is being provisioned
19
+ PHONE_NUMBER_STATUS_RELEASED = 3; // Number has been released
20
+ PHONE_NUMBER_STATUS_OFFLINE = 4; // Number is offline (not associated with any dispatch rule)
21
+ }
22
+
23
+ // Phone number type enumeration
24
+ enum PhoneNumberType {
25
+ PHONE_NUMBER_TYPE_UNKNOWN = 0; // Default value - unknown or parsing error
26
+ PHONE_NUMBER_TYPE_MOBILE = 1; // Mobile phone number
27
+ PHONE_NUMBER_TYPE_LOCAL = 2; // Local/fixed line number
28
+ PHONE_NUMBER_TYPE_TOLL_FREE = 3; // Toll-free number
29
+ }
30
+
31
+ // Public Phone Number Service - External API for phone number management
32
+ service PhoneNumberService {
33
+ // Search available phone numbers in inventory
34
+ rpc SearchPhoneNumbers(SearchPhoneNumbersRequest)
35
+ returns (SearchPhoneNumbersResponse) {}
36
+
37
+ // Purchase a phone number from inventory
38
+ rpc PurchasePhoneNumber(PurchasePhoneNumberRequest)
39
+ returns (PurchasePhoneNumberResponse) {}
40
+
41
+ // List phone numbers for a project
42
+ rpc ListPhoneNumbers(ListPhoneNumbersRequest)
43
+ returns (ListPhoneNumbersResponse) {}
44
+
45
+ // Get a phone number from a project
46
+ rpc GetPhoneNumber(GetPhoneNumberRequest)
47
+ returns (GetPhoneNumberResponse) {}
48
+
49
+ // Update a phone number in a project
50
+ rpc UpdatePhoneNumber(UpdatePhoneNumberRequest)
51
+ returns (UpdatePhoneNumberResponse) {}
52
+
53
+ // Release phone numbers
54
+ rpc ReleasePhoneNumbers(ReleasePhoneNumbersRequest)
55
+ returns (ReleasePhoneNumbersResponse) {}
56
+ }
57
+
58
+ // SearchPhoneNumbersRequest - Request to search available phone numbers
59
+ message SearchPhoneNumbersRequest {
60
+ string country_code = 1; // Filter by country code (e.g., "US", "CA")
61
+ optional string area_code = 2; // Filter by area code (e.g., "415")
62
+ optional int32 limit = 3; // Maximum number of results (default: 50)
63
+ optional TokenPagination page_token = 4; // Token for pagination (empty for first page)
64
+ }
65
+
66
+ // SearchPhoneNumbersResponse - Response containing available phone numbers
67
+ message SearchPhoneNumbersResponse {
68
+ repeated PhoneNumber items = 1; // List of available phone numbers
69
+ TokenPagination next_page_token = 2; // Token for next page (empty if no more pages)
70
+ }
71
+
72
+ // PurchasePhoneNumberRequest - Request to purchase phone numbers
73
+ message PurchasePhoneNumberRequest {
74
+ repeated string phone_numbers = 1; // Phone numbers to purchase (e.g., ["+1234567890", "+1234567891"])
75
+ optional string sip_dispatch_rule_id = 2 [(logger.name) = "sipDispatchRuleID"]; // SIP dispatch rule ID to apply to all purchased numbers
76
+ }
77
+
78
+ // PurchasePhoneNumberResponse - Response containing the purchased phone numbers
79
+ message PurchasePhoneNumberResponse {
80
+ repeated PhoneNumber phone_numbers = 1; // Details of the purchased phone numbers
81
+ }
82
+
83
+ // ListPhoneNumbersRequest - Request to list phone numbers
84
+ message ListPhoneNumbersRequest {
85
+ optional int32 limit = 1; // Maximum number of results (default: 50)
86
+ repeated PhoneNumberStatus statuses = 2; // Filter by statuses (active, pending, released)
87
+ optional TokenPagination page_token = 3; // Token for pagination (empty for first page)
88
+ optional string sip_dispatch_rule_id = 4 [(logger.name) = "sipDispatchRuleID"]; // Filter by SIP dispatch rule ID
89
+ }
90
+
91
+ // ListPhoneNumbersResponse - Response containing phone numbers
92
+ message ListPhoneNumbersResponse {
93
+ repeated PhoneNumber items = 1; // List of phone numbers
94
+ TokenPagination next_page_token = 2; // Token for next page (empty if no more pages)
95
+ int32 total_count = 3; // Total number of phone numbers
96
+ int32 offline_count = 4; // Total number of offline phone numbers
97
+ }
98
+
99
+ // GetPhoneNumberRequest - Request to get a phone number
100
+ message GetPhoneNumberRequest {
101
+ optional string id = 1; // Use phone number ID for direct lookup
102
+ optional string phone_number = 2; // Use phone number string for lookup
103
+ }
104
+
105
+ // GetPhoneNumberResponse - Response containing the phone number
106
+ message GetPhoneNumberResponse {
107
+ PhoneNumber phone_number = 1; // The phone number details
108
+ }
109
+
110
+ // UpdatePhoneNumberRequest - Request to update a phone number
111
+ message UpdatePhoneNumberRequest {
112
+ optional string id = 1; // Use phone number ID for direct lookup
113
+ optional string phone_number = 2; // Use phone number string for lookup
114
+ optional string sip_dispatch_rule_id = 3 [(logger.name) = "sipDispatchRuleID"]; // SIP dispatch rule ID to assign to the phone number
115
+ }
116
+
117
+ // UpdatePhoneNumberResponse - Response containing the updated phone number
118
+ message UpdatePhoneNumberResponse {
119
+ PhoneNumber phone_number = 1; // The updated phone number details
120
+ }
121
+
122
+ // ReleasePhoneNumbersRequest - Request to release phone numbers
123
+ message ReleasePhoneNumbersRequest {
124
+ repeated string ids = 1; // Use phone number IDs for direct lookup
125
+ repeated string phone_numbers = 2; // Use phone number strings for lookup
126
+ }
127
+
128
+ // ReleasePhoneNumbersResponse - Response for releasing phone numbers
129
+ message ReleasePhoneNumbersResponse {
130
+ // Empty response - operation completed successfully
131
+ }
132
+
133
+ // PhoneNumber - Unified phone number type for inventory and purchased numbers
134
+ message PhoneNumber {
135
+ string id = 1; // Unique identifier
136
+ string e164_format = 2; // Phone number in E.164 format (e.g., "+14155552671")
137
+ string country_code = 3; // Country code (e.g., "US")
138
+ string area_code = 4; // Area code (e.g., "415")
139
+ PhoneNumberType number_type = 5; // Number type (mobile, local, toll-free, unknown)
140
+ string locality = 6; // City/locality (e.g., "San Francisco")
141
+ string region = 7; // State/region (e.g., "CA")
142
+ double spam_score = 8; // Spam score for fraud detection
143
+ google.protobuf.Timestamp created_at = 9; // Creation timestamp
144
+ google.protobuf.Timestamp updated_at = 10; // Last update timestamp
145
+ repeated string capabilities = 11; // Available capabilities (e.g., "voice", "sms")
146
+ PhoneNumberStatus status = 12; // Current status
147
+ google.protobuf.Timestamp assigned_at = 13; // Assignment timestamp
148
+ google.protobuf.Timestamp released_at = 14; // Release timestamp (if applicable)
149
+ string sip_dispatch_rule_id = 15 [deprecated=true, (logger.name) = "sipDispatchRuleID"]; // Associated SIP dispatch rule ID (deprecated: use sip_dispatch_rule_ids instead)
150
+ repeated string sip_dispatch_rule_ids = 16; // Associated SIP dispatch rule IDs
151
+ }
@@ -0,0 +1,312 @@
1
+ // Copyright 2023 LiveKit, Inc.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package livekit;
18
+ option go_package = "github.com/livekit/protocol/livekit";
19
+ option csharp_namespace = "LiveKit.Proto";
20
+ option ruby_package = "LiveKit::Proto";
21
+
22
+ import "livekit_models.proto";
23
+ import "livekit_egress.proto";
24
+ import "livekit_agent_dispatch.proto";
25
+
26
+ import "logger/options.proto";
27
+
28
+ // Room service that can be performed on any node
29
+ // they are Twirp-based HTTP req/responses
30
+ service RoomService {
31
+ // Creates a room with settings. Requires `roomCreate` permission.
32
+ // This method is optional; rooms are automatically created when clients connect to them for the first time.
33
+ rpc CreateRoom(CreateRoomRequest) returns (Room);
34
+
35
+ // List rooms that are active on the server. Requires `roomList` permission.
36
+ rpc ListRooms(ListRoomsRequest) returns (ListRoomsResponse);
37
+
38
+ // Deletes an existing room by name or id. Requires `roomCreate` permission.
39
+ // DeleteRoom will disconnect all participants that are currently in the room.
40
+ rpc DeleteRoom(DeleteRoomRequest) returns (DeleteRoomResponse);
41
+
42
+ // Lists participants in a room, Requires `roomAdmin`
43
+ rpc ListParticipants(ListParticipantsRequest) returns (ListParticipantsResponse);
44
+
45
+ // Get information on a specific participant, Requires `roomAdmin`
46
+ rpc GetParticipant(RoomParticipantIdentity) returns (ParticipantInfo);
47
+
48
+ // Removes a participant from room. Requires `roomAdmin`
49
+ rpc RemoveParticipant(RoomParticipantIdentity) returns (RemoveParticipantResponse);
50
+
51
+ // Mute/unmute a participant's track, Requires `roomAdmin`
52
+ rpc MutePublishedTrack(MuteRoomTrackRequest) returns (MuteRoomTrackResponse);
53
+
54
+ // Update participant metadata, will cause updates to be broadcasted to everyone in the room. Requires `roomAdmin`
55
+ rpc UpdateParticipant(UpdateParticipantRequest) returns (ParticipantInfo);
56
+
57
+ // Subscribes or unsubscribe a participant from tracks. Requires `roomAdmin`
58
+ rpc UpdateSubscriptions(UpdateSubscriptionsRequest) returns (UpdateSubscriptionsResponse);
59
+
60
+ // Send data over data channel to participants in a room, Requires `roomAdmin`
61
+ rpc SendData(SendDataRequest) returns (SendDataResponse);
62
+
63
+ // Update room metadata, will cause updates to be broadcasted to everyone in the room, Requires `roomAdmin`
64
+ rpc UpdateRoomMetadata(UpdateRoomMetadataRequest) returns (Room);
65
+
66
+ // Cloud-only
67
+ // Forward a connected participant's track(s) to another room. Requires `roomAdmin` and `destinationRoom`. The forwarding will
68
+ // stop when the participant leaves the room or `RemoveParticipant` has been called in the destination room.
69
+ // A participant can be forwarded to multiple rooms. The destination room will be created if it does not exist.
70
+ rpc ForwardParticipant(ForwardParticipantRequest) returns (ForwardParticipantResponse);
71
+
72
+ // Cloud-only
73
+ // Move a connected participant to a different room. Requires `roomAdmin` and `destinationRoom`.
74
+ // The participant will be removed from the current room and added to the destination room.
75
+ // From the other observers' perspective, the participant would've disconnected from the previous room and joined the new one.
76
+ rpc MoveParticipant(MoveParticipantRequest) returns (MoveParticipantResponse);
77
+
78
+ rpc PerformRpc(PerformRpcRequest) returns (PerformRpcResponse);
79
+ }
80
+
81
+ message CreateRoomRequest {
82
+ // name of the room
83
+ string name = 1;
84
+ // configuration to use for this room parameters. Setting parameters below override the config defaults.
85
+ string room_preset = 12;
86
+ // number of seconds to keep the room open if no one joins
87
+ uint32 empty_timeout = 2;
88
+ // number of seconds to keep the room open after everyone leaves
89
+ uint32 departure_timeout = 10;
90
+ // limit number of participants that can be in a room
91
+ uint32 max_participants = 3;
92
+ // override the node room is allocated to, for debugging
93
+ string node_id = 4 [(logger.name) = "nodeID"];
94
+ // metadata of room
95
+ string metadata = 5 [
96
+ (logger.sensitivity) = SENSITIVITY_PII,
97
+ (logger.redact_format) = "<redacted ({{ .Size }} bytes)>"
98
+ ];
99
+ // search tags
100
+ map<string, string> tags = 15;
101
+ // auto-egress configurations
102
+ RoomEgress egress = 6;
103
+ // playout delay of subscriber
104
+ uint32 min_playout_delay = 7;
105
+ uint32 max_playout_delay = 8;
106
+ // improves A/V sync when playout_delay set to a value larger than 200ms. It will disables transceiver re-use
107
+ // so not recommended for rooms with frequent subscription changes
108
+ bool sync_streams = 9;
109
+ // replay
110
+ bool replay_enabled = 13;
111
+
112
+ // Define agents that should be dispatched to this room
113
+ repeated RoomAgentDispatch agents = 14;
114
+
115
+ // NEXT-ID: 16
116
+ }
117
+
118
+ message RoomEgress {
119
+ RoomCompositeEgressRequest room = 1;
120
+ AutoParticipantEgress participant = 3;
121
+ AutoTrackEgress tracks = 2;
122
+ }
123
+
124
+ message RoomAgent {
125
+ repeated RoomAgentDispatch dispatches = 1;
126
+ }
127
+
128
+ message ListRoomsRequest {
129
+ // when set, will only return rooms with name match
130
+ repeated string names = 1;
131
+ }
132
+
133
+ message ListRoomsResponse {
134
+ repeated Room rooms = 1;
135
+ }
136
+
137
+ message DeleteRoomRequest {
138
+ // name of the room
139
+ string room = 1;
140
+ }
141
+
142
+ message DeleteRoomResponse {
143
+ }
144
+
145
+ message ListParticipantsRequest {
146
+ // name of the room
147
+ string room = 1;
148
+ }
149
+
150
+ message ListParticipantsResponse {
151
+ repeated ParticipantInfo participants = 1;
152
+ }
153
+
154
+ message RoomParticipantIdentity {
155
+ // name of the room
156
+ string room = 1;
157
+ // identity of the participant
158
+ string identity = 2;
159
+ // Unix timestamp used to invalidate token whose nbf is before this value.
160
+ // Used only by RemoveParticipant; defaults to now(server)+leeway(1min) if left empty.
161
+ int64 revoke_token_ts = 3;
162
+ }
163
+
164
+ message RemoveParticipantResponse {
165
+ }
166
+
167
+ message MuteRoomTrackRequest {
168
+ // name of the room
169
+ string room = 1;
170
+ string identity = 2;
171
+ // sid of the track to mute
172
+ string track_sid = 3;
173
+ // set to true to mute, false to unmute
174
+ bool muted = 4;
175
+ }
176
+
177
+ message MuteRoomTrackResponse {
178
+ TrackInfo track = 1;
179
+ }
180
+
181
+ message UpdateParticipantRequest {
182
+ string room = 1;
183
+ string identity = 2;
184
+ // metadata to update. skipping updates if left empty
185
+ string metadata = 3 [
186
+ (logger.sensitivity) = SENSITIVITY_PII,
187
+ (logger.redact_format) = "<redacted ({{ .Size }} bytes)>"
188
+ ];
189
+ // set to update the participant's permissions
190
+ ParticipantPermission permission = 4;
191
+ // display name to update
192
+ string name = 5 [
193
+ (logger.sensitivity) = SENSITIVITY_PII,
194
+ (logger.redact_format) = "<redacted ({{ .Size }} bytes)>"
195
+ ];
196
+ // attributes to update. it only updates attributes that have been set
197
+ // to delete attributes, set the value to an empty string
198
+ map<string, string> attributes = 6 [
199
+ (logger.sensitivity) = SENSITIVITY_PII,
200
+ (logger.redact_format) = "<redacted ({{ .Size }} bytes)>"
201
+ ];
202
+ }
203
+
204
+ message UpdateSubscriptionsRequest {
205
+ string room = 1;
206
+ string identity = 2;
207
+ // list of sids of tracks
208
+ repeated string track_sids = 3;
209
+ // set to true to subscribe, false to unsubscribe from tracks
210
+ bool subscribe = 4;
211
+ // list of participants and their tracks
212
+ repeated ParticipantTracks participant_tracks = 5;
213
+ }
214
+
215
+ message UpdateSubscriptionsResponse {
216
+ // empty for now
217
+ }
218
+
219
+ message SendDataRequest {
220
+ string room = 1;
221
+ bytes data = 2;
222
+ DataPacket.Kind kind = 3;
223
+ // mark deprecated
224
+ repeated string destination_sids = 4 [deprecated = true];
225
+ // when set, only forward to these identities
226
+ repeated string destination_identities = 6;
227
+ optional string topic = 5;
228
+ // added by SDK to enable de-duping of messages, for INTERNAL USE ONLY
229
+ bytes nonce = 7;
230
+
231
+ // NEXT_ID: 8
232
+ }
233
+
234
+ message SendDataResponse {
235
+ //
236
+ }
237
+
238
+ message UpdateRoomMetadataRequest {
239
+ string room = 1;
240
+ // metadata to update. skipping updates if left empty
241
+ string metadata = 2 [
242
+ (logger.sensitivity) = SENSITIVITY_PII,
243
+ (logger.redact_format) = "<redacted ({{ .Size }} bytes)>"
244
+ ];
245
+ }
246
+
247
+ message RoomConfiguration {
248
+ string name = 1; // Used as ID, must be unique
249
+ // number of seconds to keep the room open if no one joins
250
+ uint32 empty_timeout = 2;
251
+ // number of seconds to keep the room open after everyone leaves
252
+ uint32 departure_timeout = 3;
253
+ // limit number of participants that can be in a room, excluding Egress and Agent participants
254
+ uint32 max_participants = 4;
255
+ // metadata of room
256
+ string metadata = 11 [
257
+ (logger.sensitivity) = SENSITIVITY_PII,
258
+ (logger.redact_format) = "<redacted ({{ .Size }} bytes)>"
259
+ ];
260
+ // egress
261
+ RoomEgress egress = 5;
262
+ // playout delay of subscriber
263
+ uint32 min_playout_delay = 7;
264
+ uint32 max_playout_delay = 8;
265
+ // improves A/V sync when playout_delay set to a value larger than 200ms. It will disables transceiver re-use
266
+ // so not recommended for rooms with frequent subscription changes
267
+ bool sync_streams = 9;
268
+
269
+ // Define agents that should be dispatched to this room
270
+ repeated RoomAgentDispatch agents = 10;
271
+
272
+ // Tags to attach to the room
273
+ map<string, string> tags = 12;
274
+
275
+ // NEXT_ID: 13
276
+ }
277
+
278
+ message ForwardParticipantRequest {
279
+ // room to forward participant from
280
+ string room = 1;
281
+ // identity of the participant to forward
282
+ string identity = 2;
283
+ // room to forward participant to
284
+ string destination_room = 3;
285
+ }
286
+
287
+ message ForwardParticipantResponse {
288
+ }
289
+
290
+ message MoveParticipantRequest {
291
+ // room to move participant from
292
+ string room = 1;
293
+ // identity of the participant to move to
294
+ string identity = 2;
295
+ // room to move participant to
296
+ string destination_room = 3;
297
+ }
298
+
299
+ message MoveParticipantResponse {
300
+ }
301
+
302
+ message PerformRpcRequest {
303
+ string room = 1;
304
+ string destination_identity = 2;
305
+ string method = 3;
306
+ string payload = 4;
307
+ uint32 response_timeout_ms = 5;
308
+ }
309
+
310
+ message PerformRpcResponse {
311
+ string payload = 1;
312
+ }