Skip to content
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
5 changes: 4 additions & 1 deletion packages/firestore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@
"@firebase/webchannel-wrapper": "1.0.5",
"@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 @@ -157,6 +159,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 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 @@
}
}
}
}
}
20 changes: 19 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,14 @@
"@babel/helper-string-parser" "^7.25.9"
"@babel/helper-validator-identifier" "^7.25.9"

"@babel/types@^7.26.10":
version "7.26.10"
resolved "https://registry.npmjs.org/@babel/types/-/types-7.26.10.tgz#396382f6335bd4feb65741eacfc808218f859259"
integrity sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ==
dependencies:
"@babel/helper-string-parser" "^7.25.9"
"@babel/helper-validator-identifier" "^7.25.9"

"@babel/types@^7.26.8":
version "7.26.8"
resolved "https://registry.npmjs.org/@babel/types/-/types-7.26.8.tgz#97dcdc190fab45be7f3dc073e3c11160d677c127"
Expand Down Expand Up @@ -13692,6 +13700,11 @@ re2@^1.17.7:
nan "^2.20.0"
node-gyp "^10.2.0"

re2js@^0.4.2:
version "0.4.3"
resolved "https://registry.npmjs.org/re2js/-/re2js-0.4.3.tgz#1318cd0c12aa6ed3ba56d5e012311ffbfb2aef35"
integrity sha512-EuNmh7jurhHEE8Ge/lBo9JuMLb3qf866Xjjfyovw3wPc7+hlqDkZq4LwhrCQMEI+ARWfrKrHozEndzlpNT0WDg==

react-is@^18.0.0:
version "18.3.1"
resolved "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e"
Expand Down Expand Up @@ -14566,7 +14579,7 @@ semver-greatest-satisfied-range@^1.1.0:
resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8"
integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==

[email protected]:
[email protected], semver@^7.1.2:
version "7.7.1"
resolved "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz#abd5098d82b18c6c81f6074ff2647fd3e7220c9f"
integrity sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==
Expand Down Expand Up @@ -16401,6 +16414,11 @@ undici-types@~6.20.0:
resolved "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433"
integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==

[email protected]:
version "6.19.7"
resolved "https://registry.npmjs.org/undici/-/undici-6.19.7.tgz#7d4cf26dc689838aa8b6753a3c5c4288fc1e0216"
integrity sha512-HR3W/bMGPSr90i8AAp2C4DM3wChFdJPLrWYpIS++LxS8K+W535qftjt+4MyjNYHeWabMj1nvtmLIi7l++iq91A==

unicode-canonical-property-names-ecmascript@^2.0.0:
version "2.0.1"
resolved "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz#cb3173fe47ca743e228216e4a3ddc4c84d628cc2"
Expand Down
Loading