File tree Expand file tree Collapse file tree 4 files changed +44
-2
lines changed
packages/firestore/src/protos Expand file tree Collapse file tree 4 files changed +44
-2
lines changed Original file line number Diff line number Diff line change @@ -356,6 +356,9 @@ export declare namespace firestoreV1ApiClientInterfaces {
356356 parent ?: string ;
357357 structuredQuery ?: StructuredQuery ;
358358 }
359+ interface PipelineQueryTarget {
360+ pipeline ?: StructuredPipeline ;
361+ }
359362 interface ReadOnly {
360363 readTime ?: string ;
361364 }
@@ -424,6 +427,7 @@ export declare namespace firestoreV1ApiClientInterfaces {
424427 interface Target {
425428 query ?: QueryTarget ;
426429 documents ?: DocumentsTarget ;
430+ pipelineQuery ?: PipelineQueryTarget ;
427431 resumeToken ?: string | Uint8Array ;
428432 readTime ?: Timestamp ;
429433 targetId ?: number ;
Original file line number Diff line number Diff line change @@ -913,13 +913,25 @@ message Target {
913913 }
914914 }
915915
916+ // A target specified by a pipeline query.
917+ message PipelineQueryTarget {
918+ // The pipeline to run.
919+ oneof pipeline_type {
920+ // A pipelined operation in structured format.
921+ StructuredPipeline pipeline = 1 ;
922+ }
923+ }
924+
916925 // The type of target to listen to.
917926 oneof target_type {
918927 // A target specified by a query.
919928 QueryTarget query = 2 ;
920929
921930 // A target specified by a set of document names.
922931 DocumentsTarget documents = 3 ;
932+
933+ // A target specified by a pipeline query.
934+ PipelineQueryTarget pipeline_query = 13 ;
923935 }
924936
925937 // When to start listening.
Original file line number Diff line number Diff line change @@ -198,6 +198,12 @@ message WriteResult {
198198//
199199// Multiple [DocumentChange][google.firestore.v1.DocumentChange] messages may be returned for the same logical
200200// change, if multiple targets are affected.
201+ //
202+ // For PipelineQueryTargets, `document` will be in the new pipeline format,
203+ // (-- TODO(b/330735468): Insert link to spec. --)
204+ // For a Listen stream with both QueryTargets and PipelineQueryTargets present,
205+ // if a document matches both types of queries, then a separate DocumentChange
206+ // messages will be sent out one for each set.
201207message DocumentChange {
202208 // The new state of the [Document][google.firestore.v1.Document].
203209 //
Original file line number Diff line number Diff line change 23432343 "targetType" : {
23442344 "oneof" : [
23452345 " query" ,
2346- " documents"
2346+ " documents" ,
2347+ " pipeline_query"
23472348 ]
23482349 },
23492350 "resumeType" : {
23622363 "type" : " DocumentsTarget" ,
23632364 "id" : 3
23642365 },
2366+ "pipeline_query" : {
2367+ "type" : " PipelineQueryTarget" ,
2368+ "id" : 13
2369+ },
23652370 "resumeToken" : {
23662371 "type" : " bytes" ,
23672372 "id" : 4
24112416 "id" : 2
24122417 }
24132418 }
2419+ },
2420+ "PipelineQueryTarget" : {
2421+ "oneofs" : {
2422+ "pipelineType" : {
2423+ "oneof" : [
2424+ " pipeline"
2425+ ]
2426+ }
2427+ },
2428+ "fields" : {
2429+ "pipeline" : {
2430+ "type" : " StructuredPipeline" ,
2431+ "id" : 1
2432+ }
2433+ }
24142434 }
24152435 }
24162436 },
32663286 }
32673287 }
32683288 }
3269- }
3289+ }
You can’t perform that action at this time.
0 commit comments