Skip to content

[1/4] Add ppl protos and setup dependencies #8909

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: feat/pipelines
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dist
.awcache
.cache
/config/project.json
/config/prod.project.json
scripts/docgen-compat/html

# OS Specific Files
Expand Down
3 changes: 3 additions & 0 deletions packages/firestore/externs.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@
"node_modules/typescript/lib/lib.dom.d.ts",
"node_modules/typescript/lib/lib.es2015.promise.d.ts",
"node_modules/typescript/lib/lib.es2015.symbol.d.ts",
"node_modules/typescript/lib/lib.es2020.bigint.d.ts",
"node_modules/typescript/lib/lib.es2015.iterable.d.ts",
"node_modules/typescript/lib/lib.es2015.collection.d.ts",
"node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts",
"node_modules/typescript/lib/lib.es2015.core.d.ts",
"node_modules/typescript/lib/lib.es2017.object.d.ts",
"node_modules/typescript/lib/lib.es2017.string.d.ts",
"node_modules/typescript/lib/lib.es2019.array.d.ts",
"node_modules/re2js/build/index.esm.d.ts",
"packages/app-types/index.d.ts",
"packages/app-types/private.d.ts",
"packages/app/dist/app.d.ts",
Expand Down
10 changes: 7 additions & 3 deletions packages/firestore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@
"license": "Apache-2.0",
"files": [
"dist",
"lite/package.json"
"lite",
"pipelines"
],
"dependencies": {
"@firebase/component": "0.6.13",
Expand All @@ -128,7 +129,9 @@
"@firebase/webchannel-wrapper": "1.0.3",
"@grpc/grpc-js": "~1.9.0",
"@grpc/proto-loader": "^0.7.8",
"tslib": "^2.1.0"
"re2js": "^0.4.2",
"tslib": "^2.1.0",
"undici": "6.19.7"
},
"peerDependencies": {
"@firebase/app": "0.x"
Expand All @@ -146,6 +149,7 @@
"rollup": "2.79.2",
"rollup-plugin-copy": "3.5.0",
"rollup-plugin-copy-assets": "2.0.3",
"rollup-plugin-dts": "5.3.1",
"rollup-plugin-replace": "2.2.0",
"rollup-plugin-sourcemaps": "0.6.3",
"@rollup/plugin-terser": "0.4.4",
Expand All @@ -162,7 +166,7 @@
"bugs": {
"url": "https://github.com/firebase/firebase-js-sdk/issues"
},
"types": "dist/index.d.ts",
"types": "dist/firestore/src/index.d.ts",
"nyc": {
"extension": [
".ts"
Expand Down
6 changes: 6 additions & 0 deletions packages/firestore/src/protos/firestore_proto_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,9 @@ export declare namespace firestoreV1ApiClientInterfaces {
parent?: string;
structuredQuery?: StructuredQuery;
}
interface PipelineQueryTarget {
structuredPipeline?: StructuredPipeline;
}
interface ReadOnly {
readTime?: string;
}
Expand Down Expand Up @@ -424,6 +427,7 @@ export declare namespace firestoreV1ApiClientInterfaces {
interface Target {
query?: QueryTarget;
documents?: DocumentsTarget;
pipelineQuery?: PipelineQueryTarget;
resumeToken?: string | Uint8Array;
readTime?: Timestamp;
targetId?: number;
Expand Down Expand Up @@ -555,6 +559,8 @@ export declare type Pipeline = firestoreV1ApiClientInterfaces.Pipeline;
export declare type Precondition = firestoreV1ApiClientInterfaces.Precondition;
export declare type Projection = firestoreV1ApiClientInterfaces.Projection;
export declare type QueryTarget = firestoreV1ApiClientInterfaces.QueryTarget;
export declare type PipelineQueryTarget =
firestoreV1ApiClientInterfaces.PipelineQueryTarget;
export declare type ReadOnly = firestoreV1ApiClientInterfaces.ReadOnly;
export declare type ReadWrite = firestoreV1ApiClientInterfaces.ReadWrite;
export declare type RollbackRequest =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -913,13 +913,25 @@ message Target {
}
}

// A target specified by a pipeline query.
message PipelineQueryTarget {
// The pipeline to run.
oneof pipeline_type {
// A pipelined operation in structured format.
StructuredPipeline structured_pipeline = 1;
}
}

// The type of target to listen to.
oneof target_type {
// A target specified by a query.
QueryTarget query = 2;

// A target specified by a set of document names.
DocumentsTarget documents = 3;

// A target specified by a pipeline query.
PipelineQueryTarget pipeline_query = 13;
}

// When to start listening.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,12 @@ message WriteResult {
//
// Multiple [DocumentChange][google.firestore.v1.DocumentChange] messages may be returned for the same logical
// change, if multiple targets are affected.
//
// For PipelineQueryTargets, `document` will be in the new pipeline format,
// (-- TODO(b/330735468): Insert link to spec. --)
// For a Listen stream with both QueryTargets and PipelineQueryTargets present,
// if a document matches both types of queries, then a separate DocumentChange
// messages will be sent out one for each set.
message DocumentChange {
// The new state of the [Document][google.firestore.v1.Document].
//
Expand Down
24 changes: 22 additions & 2 deletions packages/firestore/src/protos/protos.json
Original file line number Diff line number Diff line change
Expand Up @@ -2343,7 +2343,8 @@
"targetType": {
"oneof": [
"query",
"documents"
"documents",
"pipeline_query"
]
},
"resumeType": {
Expand All @@ -2362,6 +2363,10 @@
"type": "DocumentsTarget",
"id": 3
},
"pipelineQuery": {
"type": "PipelineQueryTarget",
"id": 13
},
"resumeToken": {
"type": "bytes",
"id": 4
Expand Down Expand Up @@ -2411,6 +2416,21 @@
"id": 2
}
}
},
"PipelineQueryTarget": {
"oneofs": {
"pipelineType": {
"oneof": [
"structuredPipeline"
]
}
},
"fields": {
"structuredPipeline": {
"type": "StructuredPipeline",
"id": 1
}
}
}
}
},
Expand Down Expand Up @@ -3266,4 +3286,4 @@
}
}
}
}
}
Loading
Loading