Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

Commit b4f7d60

Browse files
fix: remove types QueryMode, QueryPlan, ResultSetStats (#1982)
* feat: Expose the undeliverable_first_gen_event.proto PiperOrigin-RevId: 600597791 Source-Link: googleapis/googleapis@fc15738 Source-Link: googleapis/googleapis-gen@1939fca Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTkzOWZjYWZlNTZlMmNhMDg3NjdkOTQ1MDlmYTYyNjMxOTM0YjJhMCJ9 fix: improve retry logic for streaming API calls build: update typescript generator version to 4.3.0 The streaming API call retry logic has changed, which in some rare cases may require code changes. Please feel free to reach out to us in the issues if you experience new problems with retrying streaming calls after this update. PiperOrigin-RevId: 599622271 Source-Link: googleapis/googleapis@6239c21 Source-Link: googleapis/googleapis-gen@da13d82 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZGExM2Q4MjIyZDNiYTMzNzM0NTAxOTk5ODY0NDU4NjQwZjE0MDVhZSJ9 chore: Add FindNearest API to the preview branch docs: Improve the documentation on Document.fields PiperOrigin-RevId: 599602467 Source-Link: googleapis/googleapis@d32bd97 Source-Link: googleapis/googleapis-gen@0545ffc Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDU0NWZmYzQ4OGI4MmQzYTQ3NzExMThjOTIzZDY0Y2QwYjc1OTk1MyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix!: remove types QueryMode, QueryPlan, ResultSetStats fix!: remove QueryMode field from RunQueryRequest fix!: remove ResultSetStats field from RunQueryResponse fix!: remove QueryMode field from RunAggregationQueryRequest fix!: remove ResultSetStats field from RunAggregationQueryResponse PiperOrigin-RevId: 601486523 Source-Link: googleapis/googleapis@a8b027a Source-Link: googleapis/googleapis-gen@b9b571f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjliNTcxZjU4NTQxYzBhY2UxZmY5NGJmMjJhZjNkMDYzZWViZmI3YyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 98e668b commit b4f7d60

12 files changed

Lines changed: 142 additions & 61 deletions

dev/protos/google/firestore/v1/document.proto

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,23 @@ message Document {
4141
//
4242
// The map keys represent field names.
4343
//
44-
// A simple field name contains only characters `a` to `z`, `A` to `Z`,
45-
// `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
46-
// `foo_bar_17`.
47-
//
4844
// Field names matching the regular expression `__.*__` are reserved. Reserved
49-
// field names are forbidden except in certain documented contexts. The map
50-
// keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
45+
// field names are forbidden except in certain documented contexts. The field
46+
// names, represented as UTF-8, must not exceed 1,500 bytes and cannot be
5147
// empty.
5248
//
5349
// Field paths may be used in other contexts to refer to structured fields
54-
// defined here. For `map_value`, the field path is represented by the simple
55-
// or quoted field names of the containing fields, delimited by `.`. For
56-
// example, the structured field
57-
// `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
58-
// represented by the field path `foo.x&y`.
50+
// defined here. For `map_value`, the field path is represented by a
51+
// dot-delimited (`.`) string of segments. Each segment is either a simple
52+
// field name (defined below) or a quoted field name. For example, the
53+
// structured field `"foo" : { map_value: { "x&y" : { string_value: "hello"
54+
// }}}` would be represented by the field path `` foo.`x&y` ``.
55+
//
56+
// A simple field name contains only characters `a` to `z`, `A` to `Z`,
57+
// `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
58+
// `foo_bar_17`.
5959
//
60-
// Within a field path, a quoted field name starts and ends with `` ` `` and
60+
// A quoted field name starts and ends with `` ` `` and
6161
// may contain any character. Some characters, including `` ` ``, must be
6262
// escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
6363
// `` `bak\`tik` `` represents `` bak`tik ``.

dev/protos/google/firestore/v1/firestore.proto

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import "google/firestore/v1/aggregation_result.proto";
2323
import "google/firestore/v1/common.proto";
2424
import "google/firestore/v1/document.proto";
2525
import "google/firestore/v1/query.proto";
26-
import "google/firestore/v1/query_profile.proto";
2726
import "google/firestore/v1/write.proto";
2827
import "google/protobuf/empty.proto";
2928
import "google/protobuf/timestamp.proto";
@@ -577,11 +576,6 @@ message RunQueryRequest {
577576
// minute timestamp within the past 7 days.
578577
google.protobuf.Timestamp read_time = 7;
579578
}
580-
581-
// Optional. The mode in which the query request is processed. This field is
582-
// optional, and when not provided, it defaults to `NORMAL` mode where no
583-
// additional statistics will be returned with the query results.
584-
QueryMode mode = 9 [(google.api.field_behavior) = OPTIONAL];
585579
}
586580

587581
// The response for
@@ -618,13 +612,6 @@ message RunQueryResponse {
618612
// documents will be returned.
619613
bool done = 6;
620614
}
621-
622-
// Query plan and execution statistics. Note that the returned stats are
623-
// subject to change as Firestore evolves.
624-
//
625-
// This is only present when the request specifies a mode other than `NORMAL`
626-
// and is sent only once with the last response in the stream.
627-
ResultSetStats stats = 7;
628615
}
629616

630617
// The request for
@@ -664,11 +651,6 @@ message RunAggregationQueryRequest {
664651
// minute timestamp within the past 7 days.
665652
google.protobuf.Timestamp read_time = 6;
666653
}
667-
668-
// Optional. The mode in which the query request is processed. This field is
669-
// optional, and when not provided, it defaults to `NORMAL` mode where no
670-
// additional statistics will be returned with the query results.
671-
QueryMode mode = 7 [(google.api.field_behavior) = OPTIONAL];
672654
}
673655

674656
// The response for
@@ -694,13 +676,6 @@ message RunAggregationQueryResponse {
694676
// `result` will be sent, and this represents the time at which the query
695677
// was run.
696678
google.protobuf.Timestamp read_time = 3;
697-
698-
// Query plan and execution statistics. Note that the returned stats are
699-
// subject to change as Firestore evolves.
700-
//
701-
// This is only present when the request specifies a mode other than `NORMAL`
702-
// and is sent only once with the last response in the stream.
703-
ResultSetStats stats = 6;
704679
}
705680

706681
// The request for

dev/protos/google/firestore/v1/query.proto

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ option php_namespace = "Google\\Cloud\\Firestore\\V1";
3030
option ruby_package = "Google::Cloud::Firestore::V1";
3131

3232
// A Firestore query.
33+
//
34+
// The query stages are executed in the following order:
35+
// 1. from
36+
// 2. where
37+
// 3. select
38+
// 4. order_by + start_at + end_at
39+
// 5. offset
40+
// 6. limit
3341
message StructuredQuery {
3442
// A selection of a collection, such as `messages as m1`.
3543
message CollectionSelector {
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
// Copyright 2023 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.firestore.v1beta1;
18+
19+
import "google/protobuf/timestamp.proto";
20+
21+
option csharp_namespace = "Google.Cloud.Firestore.V1Beta1";
22+
option go_package = "cloud.google.com/go/firestore/apiv1beta1/firestorepb;firestorepb";
23+
option java_multiple_files = true;
24+
option java_outer_classname = "UndeliverableFirstGenEventProto";
25+
option java_package = "com.google.firestore.v1beta1";
26+
option php_namespace = "Google\\Cloud\\Firestore\\V1beta1";
27+
option ruby_package = "Google::Cloud::Firestore::V1beta1";
28+
29+
// A message signifying an event that cannot be delivered to Cloud Functions
30+
// from Firestore using [Cloud Firestore triggers 1st
31+
// gen](https://cloud.google.com/functions/docs/calling/cloud-firestore)
32+
message UndeliverableFirstGenEvent {
33+
// Reason for events being undeliverable.
34+
enum Reason {
35+
// Unspecified.
36+
REASON_UNSPECIFIED = 0;
37+
38+
// Exceeding maximum event size limit
39+
EXCEEDING_SIZE_LIMIT = 1;
40+
}
41+
42+
// Document change type.
43+
enum DocumentChangeType {
44+
// Unspecified.
45+
DOCUMENT_CHANGE_TYPE_UNSPECIFIED = 0;
46+
47+
// Represent creation operation.
48+
CREATE = 1;
49+
50+
// Represent delete operation.
51+
DELETE = 2;
52+
53+
// Represent update operation.
54+
UPDATE = 3;
55+
}
56+
57+
// Error message for events being undeliverable.
58+
string message = 1;
59+
60+
// Reason for events being undeliverable.
61+
Reason reason = 2;
62+
63+
// The resource name of the changed document, in the format of
64+
// `projects/{projectId}/databases/{databaseId}/documents/{document_path}`.
65+
string document_name = 3;
66+
67+
// The type of the document change.
68+
DocumentChangeType document_change_type = 4;
69+
70+
// The names of the functions that were supposed to be triggered.
71+
repeated string function_name = 5;
72+
73+
// The commit time of triggered write operation.
74+
google.protobuf.Timestamp triggered_time = 6;
75+
}

dev/protos/google/protobuf/descriptor.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,8 +1014,10 @@ message FeatureSet {
10141014

10151015
extensions 1000; // for Protobuf C++
10161016
extensions 1001; // for Protobuf Java
1017+
extensions 1002; // for Protobuf Go
10171018

10181019
extensions 9995 to 9999; // For internal testing
1020+
extensions 10000; // for https://github.com/bufbuild/protobuf-es
10191021
}
10201022

10211023
// A compiled specification for the defaults of a set of features. These

dev/src/v1/firestore_client.ts

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -212,23 +212,28 @@ export class FirestoreClient {
212212
this.descriptors.stream = {
213213
batchGetDocuments: new this._gaxModule.StreamDescriptor(
214214
this._gaxModule.StreamType.SERVER_STREAMING,
215-
!!opts.fallback
215+
!!opts.fallback,
216+
/* gaxStreamingRetries: */ true
216217
),
217218
runQuery: new this._gaxModule.StreamDescriptor(
218219
this._gaxModule.StreamType.SERVER_STREAMING,
219-
!!opts.fallback
220+
!!opts.fallback,
221+
/* gaxStreamingRetries: */ true
220222
),
221223
runAggregationQuery: new this._gaxModule.StreamDescriptor(
222224
this._gaxModule.StreamType.SERVER_STREAMING,
223-
!!opts.fallback
225+
!!opts.fallback,
226+
/* gaxStreamingRetries: */ true
224227
),
225228
write: new this._gaxModule.StreamDescriptor(
226229
this._gaxModule.StreamType.BIDI_STREAMING,
227-
!!opts.fallback
230+
!!opts.fallback,
231+
/* gaxStreamingRetries: */ true
228232
),
229233
listen: new this._gaxModule.StreamDescriptor(
230234
this._gaxModule.StreamType.BIDI_STREAMING,
231-
!!opts.fallback
235+
!!opts.fallback,
236+
/* gaxStreamingRetries: */ true
232237
),
233238
};
234239

@@ -1230,10 +1235,6 @@ export class FirestoreClient {
12301235
* This must be a microsecond precision timestamp within the past one hour,
12311236
* or if Point-in-Time Recovery is enabled, can additionally be a whole
12321237
* minute timestamp within the past 7 days.
1233-
* @param {google.firestore.v1.QueryMode} [request.mode]
1234-
* Optional. The mode in which the query request is processed. This field is
1235-
* optional, and when not provided, it defaults to `NORMAL` mode where no
1236-
* additional statistics will be returned with the query results.
12371238
* @param {object} [options]
12381239
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
12391240
* @returns {Stream}
@@ -1300,10 +1301,6 @@ export class FirestoreClient {
13001301
* This must be a microsecond precision timestamp within the past one hour,
13011302
* or if Point-in-Time Recovery is enabled, can additionally be a whole
13021303
* minute timestamp within the past 7 days.
1303-
* @param {google.firestore.v1.QueryMode} [request.mode]
1304-
* Optional. The mode in which the query request is processed. This field is
1305-
* optional, and when not provided, it defaults to `NORMAL` mode where no
1306-
* additional statistics will be returned with the query results.
13071304
* @param {object} [options]
13081305
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
13091306
* @returns {Stream}

dev/src/v1/firestore_proto_list.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@
55
"../../protos/google/firestore/v1/document.proto",
66
"../../protos/google/firestore/v1/firestore.proto",
77
"../../protos/google/firestore/v1/query.proto",
8-
"../../protos/google/firestore/v1/query_profile.proto",
98
"../../protos/google/firestore/v1/write.proto"
109
]

dev/src/v1beta1/firestore_client.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,19 +208,23 @@ export class FirestoreClient {
208208
this.descriptors.stream = {
209209
batchGetDocuments: new this._gaxModule.StreamDescriptor(
210210
this._gaxModule.StreamType.SERVER_STREAMING,
211-
!!opts.fallback
211+
!!opts.fallback,
212+
/* gaxStreamingRetries: */ true
212213
),
213214
runQuery: new this._gaxModule.StreamDescriptor(
214215
this._gaxModule.StreamType.SERVER_STREAMING,
215-
!!opts.fallback
216+
!!opts.fallback,
217+
/* gaxStreamingRetries: */ true
216218
),
217219
write: new this._gaxModule.StreamDescriptor(
218220
this._gaxModule.StreamType.BIDI_STREAMING,
219-
!!opts.fallback
221+
!!opts.fallback,
222+
/* gaxStreamingRetries: */ true
220223
),
221224
listen: new this._gaxModule.StreamDescriptor(
222225
this._gaxModule.StreamType.BIDI_STREAMING,
223-
!!opts.fallback
226+
!!opts.fallback,
227+
/* gaxStreamingRetries: */ true
224228
),
225229
};
226230

dev/src/v1beta1/firestore_proto_list.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
"../../protos/google/firestore/v1beta1/document.proto",
44
"../../protos/google/firestore/v1beta1/firestore.proto",
55
"../../protos/google/firestore/v1beta1/query.proto",
6+
"../../protos/google/firestore/v1beta1/undeliverable_first_gen_event.proto",
67
"../../protos/google/firestore/v1beta1/write.proto"
78
]

dev/src/v1beta1/gapic_metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
44
"language": "typescript",
55
"protoPackage": "google.firestore.v1beta1",
6-
"libraryPackage": "firestore",
6+
"libraryPackage": "@google-cloud/firestore",
77
"services": {
88
"Firestore": {
99
"clients": {

0 commit comments

Comments
 (0)