33 array ,
44 integer ,
55 literal ,
6- looseObject ,
76 minValue ,
87 nonEmpty ,
98 number ,
@@ -23,10 +22,11 @@ const EMPTY_ARRAY = Object.freeze([]);
2322
2423const streamSequenceSchema = pipe ( number ( ) , integer ( ) , minValue ( 1 ) ) ;
2524
26- const streamingDataSchema = looseObject ( {
25+ const streamingDataSchema = object ( {
2726 streamId : optional ( undefinedable ( string ( ) ) ) ,
2827 streamSequence : optional ( streamSequenceSchema ) ,
29- streamType : union ( [ literal ( 'streaming' ) , literal ( 'informative' ) , literal ( 'final' ) ] )
28+ streamType : union ( [ literal ( 'streaming' ) , literal ( 'informative' ) , literal ( 'final' ) ] ) ,
29+ type : optional ( string ( ) )
3030} ) ;
3131
3232const channelDataStreamingActivitySchema = union ( [
@@ -97,7 +97,7 @@ const entitiesStreamingActivitySchema = union([
9797 object ( {
9898 attachments : optional ( array ( any ( ) ) , EMPTY_ARRAY ) ,
9999 entities : array (
100- looseObject ( {
100+ object ( {
101101 // "streamId" is optional for the very first activity in the session.
102102 streamId : optional ( undefinedable ( string ( ) ) ) ,
103103 streamSequence : streamSequenceSchema ,
@@ -114,7 +114,7 @@ const entitiesStreamingActivitySchema = union([
114114 object ( {
115115 attachments : optional ( array ( any ( ) ) , EMPTY_ARRAY ) ,
116116 entities : array (
117- looseObject ( {
117+ object ( {
118118 // "streamId" is optional for the very first activity in the session.
119119 streamId : optional ( undefinedable ( string ( ) ) ) ,
120120 streamSequence : streamSequenceSchema ,
@@ -131,7 +131,7 @@ const entitiesStreamingActivitySchema = union([
131131 object ( {
132132 attachments : optional ( array ( any ( ) ) , EMPTY_ARRAY ) ,
133133 entities : array (
134- looseObject ( {
134+ object ( {
135135 // "streamId" is required for the final activity in the session.
136136 // The final activity must not be the sole activity in the session.
137137 streamId : pipe ( string ( ) , nonEmpty ( ) ) ,
@@ -148,7 +148,7 @@ const entitiesStreamingActivitySchema = union([
148148 object ( {
149149 attachments : optional ( array ( any ( ) ) , EMPTY_ARRAY ) ,
150150 entities : array (
151- looseObject ( {
151+ object ( {
152152 // "streamId" is required for the final activity in the session.
153153 // The final activity must not be the sole activity in the session.
154154 streamId : pipe ( string ( ) , nonEmpty ( ) ) ,
0 commit comments