2020import type { BinaryReadOptions , FieldList , JsonReadOptions , JsonValue , PartialMessage , PlainMessage } from "@bufbuild/protobuf" ;
2121import { Message , proto2 } from "@bufbuild/protobuf" ;
2222import { FfiOwnedHandle } from "./handle_pb.js" ;
23+ import { EncryptionType } from "./e2ee_pb.js" ;
2324
2425/**
2526 * A reader for an incoming stream.
@@ -1074,6 +1075,152 @@ export class StreamSendFileCallback extends Message<StreamSendFileCallback> {
10741075 }
10751076}
10761077
1078+ /**
1079+ * Sends bytes over a data stream.
1080+ *
1081+ * @generated from message livekit.proto.StreamSendBytesRequest
1082+ */
1083+ export class StreamSendBytesRequest extends Message < StreamSendBytesRequest > {
1084+ /**
1085+ * @generated from field: required uint64 local_participant_handle = 1;
1086+ */
1087+ localParticipantHandle ?: bigint ;
1088+
1089+ /**
1090+ * @generated from field: required livekit.proto.StreamByteOptions options = 2;
1091+ */
1092+ options ?: StreamByteOptions ;
1093+
1094+ /**
1095+ * Bytes to send.
1096+ *
1097+ * @generated from field: required bytes bytes = 3;
1098+ */
1099+ bytes ?: Uint8Array ;
1100+
1101+ constructor ( data ?: PartialMessage < StreamSendBytesRequest > ) {
1102+ super ( ) ;
1103+ proto2 . util . initPartial ( data , this ) ;
1104+ }
1105+
1106+ static readonly runtime : typeof proto2 = proto2 ;
1107+ static readonly typeName = "livekit.proto.StreamSendBytesRequest" ;
1108+ static readonly fields : FieldList = proto2 . util . newFieldList ( ( ) => [
1109+ { no : 1 , name : "local_participant_handle" , kind : "scalar" , T : 4 /* ScalarType.UINT64 */ , req : true } ,
1110+ { no : 2 , name : "options" , kind : "message" , T : StreamByteOptions , req : true } ,
1111+ { no : 3 , name : "bytes" , kind : "scalar" , T : 12 /* ScalarType.BYTES */ , req : true } ,
1112+ ] ) ;
1113+
1114+ static fromBinary ( bytes : Uint8Array , options ?: Partial < BinaryReadOptions > ) : StreamSendBytesRequest {
1115+ return new StreamSendBytesRequest ( ) . fromBinary ( bytes , options ) ;
1116+ }
1117+
1118+ static fromJson ( jsonValue : JsonValue , options ?: Partial < JsonReadOptions > ) : StreamSendBytesRequest {
1119+ return new StreamSendBytesRequest ( ) . fromJson ( jsonValue , options ) ;
1120+ }
1121+
1122+ static fromJsonString ( jsonString : string , options ?: Partial < JsonReadOptions > ) : StreamSendBytesRequest {
1123+ return new StreamSendBytesRequest ( ) . fromJsonString ( jsonString , options ) ;
1124+ }
1125+
1126+ static equals ( a : StreamSendBytesRequest | PlainMessage < StreamSendBytesRequest > | undefined , b : StreamSendBytesRequest | PlainMessage < StreamSendBytesRequest > | undefined ) : boolean {
1127+ return proto2 . util . equals ( StreamSendBytesRequest , a , b ) ;
1128+ }
1129+ }
1130+
1131+ /**
1132+ * @generated from message livekit.proto.StreamSendBytesResponse
1133+ */
1134+ export class StreamSendBytesResponse extends Message < StreamSendBytesResponse > {
1135+ /**
1136+ * @generated from field: required uint64 async_id = 1;
1137+ */
1138+ asyncId ?: bigint ;
1139+
1140+ constructor ( data ?: PartialMessage < StreamSendBytesResponse > ) {
1141+ super ( ) ;
1142+ proto2 . util . initPartial ( data , this ) ;
1143+ }
1144+
1145+ static readonly runtime : typeof proto2 = proto2 ;
1146+ static readonly typeName = "livekit.proto.StreamSendBytesResponse" ;
1147+ static readonly fields : FieldList = proto2 . util . newFieldList ( ( ) => [
1148+ { no : 1 , name : "async_id" , kind : "scalar" , T : 4 /* ScalarType.UINT64 */ , req : true } ,
1149+ ] ) ;
1150+
1151+ static fromBinary ( bytes : Uint8Array , options ?: Partial < BinaryReadOptions > ) : StreamSendBytesResponse {
1152+ return new StreamSendBytesResponse ( ) . fromBinary ( bytes , options ) ;
1153+ }
1154+
1155+ static fromJson ( jsonValue : JsonValue , options ?: Partial < JsonReadOptions > ) : StreamSendBytesResponse {
1156+ return new StreamSendBytesResponse ( ) . fromJson ( jsonValue , options ) ;
1157+ }
1158+
1159+ static fromJsonString ( jsonString : string , options ?: Partial < JsonReadOptions > ) : StreamSendBytesResponse {
1160+ return new StreamSendBytesResponse ( ) . fromJsonString ( jsonString , options ) ;
1161+ }
1162+
1163+ static equals ( a : StreamSendBytesResponse | PlainMessage < StreamSendBytesResponse > | undefined , b : StreamSendBytesResponse | PlainMessage < StreamSendBytesResponse > | undefined ) : boolean {
1164+ return proto2 . util . equals ( StreamSendBytesResponse , a , b ) ;
1165+ }
1166+ }
1167+
1168+ /**
1169+ * @generated from message livekit.proto.StreamSendBytesCallback
1170+ */
1171+ export class StreamSendBytesCallback extends Message < StreamSendBytesCallback > {
1172+ /**
1173+ * @generated from field: required uint64 async_id = 1;
1174+ */
1175+ asyncId ?: bigint ;
1176+
1177+ /**
1178+ * @generated from oneof livekit.proto.StreamSendBytesCallback.result
1179+ */
1180+ result : {
1181+ /**
1182+ * @generated from field: livekit.proto.ByteStreamInfo info = 2;
1183+ */
1184+ value : ByteStreamInfo ;
1185+ case : "info" ;
1186+ } | {
1187+ /**
1188+ * @generated from field: livekit.proto.StreamError error = 3;
1189+ */
1190+ value : StreamError ;
1191+ case : "error" ;
1192+ } | { case : undefined ; value ?: undefined } = { case : undefined } ;
1193+
1194+ constructor ( data ?: PartialMessage < StreamSendBytesCallback > ) {
1195+ super ( ) ;
1196+ proto2 . util . initPartial ( data , this ) ;
1197+ }
1198+
1199+ static readonly runtime : typeof proto2 = proto2 ;
1200+ static readonly typeName = "livekit.proto.StreamSendBytesCallback" ;
1201+ static readonly fields : FieldList = proto2 . util . newFieldList ( ( ) => [
1202+ { no : 1 , name : "async_id" , kind : "scalar" , T : 4 /* ScalarType.UINT64 */ , req : true } ,
1203+ { no : 2 , name : "info" , kind : "message" , T : ByteStreamInfo , oneof : "result" } ,
1204+ { no : 3 , name : "error" , kind : "message" , T : StreamError , oneof : "result" } ,
1205+ ] ) ;
1206+
1207+ static fromBinary ( bytes : Uint8Array , options ?: Partial < BinaryReadOptions > ) : StreamSendBytesCallback {
1208+ return new StreamSendBytesCallback ( ) . fromBinary ( bytes , options ) ;
1209+ }
1210+
1211+ static fromJson ( jsonValue : JsonValue , options ?: Partial < JsonReadOptions > ) : StreamSendBytesCallback {
1212+ return new StreamSendBytesCallback ( ) . fromJson ( jsonValue , options ) ;
1213+ }
1214+
1215+ static fromJsonString ( jsonString : string , options ?: Partial < JsonReadOptions > ) : StreamSendBytesCallback {
1216+ return new StreamSendBytesCallback ( ) . fromJsonString ( jsonString , options ) ;
1217+ }
1218+
1219+ static equals ( a : StreamSendBytesCallback | PlainMessage < StreamSendBytesCallback > | undefined , b : StreamSendBytesCallback | PlainMessage < StreamSendBytesCallback > | undefined ) : boolean {
1220+ return proto2 . util . equals ( StreamSendBytesCallback , a , b ) ;
1221+ }
1222+ }
1223+
10771224/**
10781225 * Sends text over a data stream.
10791226 *
@@ -2163,6 +2310,11 @@ export class TextStreamInfo extends Message<TextStreamInfo> {
21632310 */
21642311 generated ?: boolean ;
21652312
2313+ /**
2314+ * @generated from field: required livekit.proto.EncryptionType encryption_type = 12;
2315+ */
2316+ encryptionType ?: EncryptionType ;
2317+
21662318 constructor ( data ?: PartialMessage < TextStreamInfo > ) {
21672319 super ( ) ;
21682320 proto2 . util . initPartial ( data , this ) ;
@@ -2182,6 +2334,7 @@ export class TextStreamInfo extends Message<TextStreamInfo> {
21822334 { no : 9 , name : "reply_to_stream_id" , kind : "scalar" , T : 9 /* ScalarType.STRING */ , opt : true } ,
21832335 { no : 10 , name : "attached_stream_ids" , kind : "scalar" , T : 9 /* ScalarType.STRING */ , repeated : true } ,
21842336 { no : 11 , name : "generated" , kind : "scalar" , T : 8 /* ScalarType.BOOL */ , opt : true } ,
2337+ { no : 12 , name : "encryption_type" , kind : "enum" , T : proto2 . getEnumType ( EncryptionType ) , req : true } ,
21852338 ] ) ;
21862339
21872340 static fromBinary ( bytes : Uint8Array , options ?: Partial < BinaryReadOptions > ) : TextStreamInfo {
@@ -2280,6 +2433,11 @@ export class ByteStreamInfo extends Message<ByteStreamInfo> {
22802433 */
22812434 name ?: string ;
22822435
2436+ /**
2437+ * @generated from field: required livekit.proto.EncryptionType encryption_type = 8;
2438+ */
2439+ encryptionType ?: EncryptionType ;
2440+
22832441 constructor ( data ?: PartialMessage < ByteStreamInfo > ) {
22842442 super ( ) ;
22852443 proto2 . util . initPartial ( data , this ) ;
@@ -2295,6 +2453,7 @@ export class ByteStreamInfo extends Message<ByteStreamInfo> {
22952453 { no : 5 , name : "total_length" , kind : "scalar" , T : 4 /* ScalarType.UINT64 */ , opt : true } ,
22962454 { no : 6 , name : "attributes" , kind : "map" , K : 9 /* ScalarType.STRING */ , V : { kind : "scalar" , T : 9 /* ScalarType.STRING */ } } ,
22972455 { no : 7 , name : "name" , kind : "scalar" , T : 9 /* ScalarType.STRING */ , req : true } ,
2456+ { no : 8 , name : "encryption_type" , kind : "enum" , T : proto2 . getEnumType ( EncryptionType ) , req : true } ,
22982457 ] ) ;
22992458
23002459 static fromBinary ( bytes : Uint8Array , options ?: Partial < BinaryReadOptions > ) : ByteStreamInfo {
0 commit comments