@@ -367,8 +367,8 @@ message RoomEvent {
367367    DataPacketReceived  data_packet_received  =  27 ;
368368    TranscriptionReceived  transcription_received  =  28 ;
369369    ChatMessageReceived  chat_message  =  29 ;
370-     DataStream.Header   stream_header  =  30 ;
371-     DataStream.Chunk   stream_chunk  =  31 ;
370+     DataStreamHeaderReceived   stream_header_received  =  30 ;
371+     DataStreamChunkReceived   stream_chunk_received  =  31 ;
372372  }
373373}
374374
@@ -541,10 +541,10 @@ message DataStream {
541541  // header properties specific to text streams 
542542  message  TextHeader  {
543543    required  OperationType  operation_type  =  1 ;
544-     required  int32  version  =  2 ;  // Optional: Version for updates/edits 
545-     required  string  reply_to_stream_id  =  3 ;  // Optional: Reply to specific message 
544+     optional  int32  version  =  2 ;  // Optional: Version for updates/edits 
545+     optional  string  reply_to_stream_id  =  3 ;  // Optional: Reply to specific message 
546546    repeated  string  attached_stream_ids  =  4 ; // file attachments for text streams 
547-     required  bool  generated  =  5 ; // true if the text has been generated by an agent from a participant's audio transcription 
547+     optional  bool  generated  =  5 ; // true if the text has been generated by an agent from a participant's audio transcription 
548548
549549  }
550550
@@ -557,26 +557,66 @@ message DataStream {
557557  message  Header  {
558558    required  string  stream_id  =  1 ; // unique identifier for this data stream 
559559    required  int64  timestamp  =  2 ;  // using int64 for Unix timestamp 
560-     required  string  topic  =  3 ;
561-     required  string  mime_type  =  4 ;
560+     required  string  mime_type  =  3 ;
561+     required  string  topic  =  4 ;
562562    optional  uint64  total_length  =  5 ;  // only populated for finite streams, if it's a stream of unknown size this stays empty 
563-     optional  uint64  total_chunks  =  6 ;  // only populated for finite streams, if it's a stream of unknown size this stays empty 
564-     map <string , string > extensions  =  7 ;  // user defined extensions map that can carry additional info 
563+     map <string , string > extensions  =  6 ;  // user defined extensions map that can carry additional info 
565564
566565    // oneof to choose between specific header types 
567566    oneof  content_header  {
568-       TextHeader  text_header  =  8 ;
569-       FileHeader  file_header  =  9 ;
567+       TextHeader  text_header  =  7 ;
568+       FileHeader  file_header  =  8 ;
570569    }
571570  }
572571
573572  message  Chunk  {
574573    required  string  stream_id  =  1 ;  // unique identifier for this data stream to map it to the correct header 
575574    required  uint64  chunk_index  =  2 ;
576575    required  bytes  content  =  3 ; // content as binary (bytes) 
577-     required  bool  complete  =  4 ; // true only if this is the last chunk of this stream - can also be sent with empty content 
578-     required  int32  version  =  5 ; // a version indicating that this chunk_index has been retroactively modified and the original one needs to be replaced 
576+     optional  bool  complete  =  4 ; // true only if this is the last chunk of this stream - can also be sent with empty content 
577+     optional  int32  version  =  5 ; // a version indicating that this chunk_index has been retroactively modified and the original one needs to be replaced 
579578    optional  bytes  iv  =  6 ; // optional, initialization vector for AES-GCM encryption 
580579  }
581580}
582581
582+ message  DataStreamHeaderReceived  {
583+   required  string  participant_identity  =  1 ;
584+   required  DataStream.Header  header  =  2 ;
585+ }
586+ 
587+ message  DataStreamChunkReceived  {
588+   required  string  participant_identity  =  1 ;
589+   required  DataStream.Chunk  chunk  =  2 ;
590+ }
591+ 
592+ message  SendStreamHeaderRequest  {
593+   required  uint64  local_participant_handle  =  1 ;
594+   required  DataStream.Header  header  =  2 ;
595+   repeated  string  destination_identities  =  3 ;
596+   optional  string  sender_identity  =  4 ;
597+ }
598+ 
599+ message  SendStreamChunkRequest  {
600+   required  uint64  local_participant_handle  =  1 ;
601+   required  DataStream.Chunk  chunk  =  2 ;
602+   repeated  string  destination_identities  =  3 ;
603+   optional  string  sender_identity  =  4 ;
604+ }
605+ 
606+ message  SendStreamHeaderResponse  {
607+   required  uint64  async_id  =  1 ;
608+ }
609+ 
610+ message  SendStreamChunkResponse  {
611+   required  uint64  async_id  =  1 ;
612+ }
613+ 
614+ message  SendStreamHeaderCallback  {
615+   required  uint64  async_id  =  1 ;
616+   optional  string  error  =  2 ;
617+ }
618+ 
619+ message  SendStreamChunkCallback  {
620+   required  uint64  async_id  =  1 ;
621+   optional  string  error  =  2 ;
622+ }
0 commit comments