@google-cloud/firestore-api 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +111 -0
- package/build/protos/google/firestore/admin/v1/backup.proto +112 -0
- package/build/protos/google/firestore/admin/v1/database.proto +403 -0
- package/build/protos/google/firestore/admin/v1/field.proto +154 -0
- package/build/protos/google/firestore/admin/v1/firestore_admin.proto +1229 -0
- package/build/protos/google/firestore/admin/v1/index.proto +378 -0
- package/build/protos/google/firestore/admin/v1/location.proto +30 -0
- package/build/protos/google/firestore/admin/v1/operation.proto +330 -0
- package/build/protos/google/firestore/admin/v1/realtime_updates.proto +40 -0
- package/build/protos/google/firestore/admin/v1/schedule.proto +95 -0
- package/build/protos/google/firestore/admin/v1/snapshot.proto +53 -0
- package/build/protos/google/firestore/admin/v1/user_creds.proto +86 -0
- package/build/protos/google/firestore/v1/aggregation_result.proto +43 -0
- package/build/protos/google/firestore/v1/bloom_filter.proto +73 -0
- package/build/protos/google/firestore/v1/common.proto +111 -0
- package/build/protos/google/firestore/v1/document.proto +247 -0
- package/build/protos/google/firestore/v1/explain_stats.proto +41 -0
- package/build/protos/google/firestore/v1/firestore.proto +1237 -0
- package/build/protos/google/firestore/v1/pipeline.proto +43 -0
- package/build/protos/google/firestore/v1/query.proto +600 -0
- package/build/protos/google/firestore/v1/query_profile.proto +92 -0
- package/build/protos/google/firestore/v1/write.proto +286 -0
- package/build/protos/google/firestore/v1beta1/common.proto +82 -0
- package/build/protos/google/firestore/v1beta1/document.proto +149 -0
- package/build/protos/google/firestore/v1beta1/firestore.proto +900 -0
- package/build/protos/google/firestore/v1beta1/query.proto +300 -0
- package/build/protos/google/firestore/v1beta1/undeliverable_first_gen_event.proto +75 -0
- package/build/protos/google/firestore/v1beta1/write.proto +258 -0
- package/build/protos/protos.d.ts +35648 -0
- package/build/protos/protos.js +1 -0
- package/build/protos/protos.json +1 -0
- package/build/src/index.d.ts +13 -0
- package/build/src/index.js +30 -0
- package/build/src/index.js.map +1 -0
- package/build/src/v1/firestore_admin_client.d.ts +1925 -0
- package/build/src/v1/firestore_admin_client.js +2734 -0
- package/build/src/v1/firestore_admin_client.js.map +1 -0
- package/build/src/v1/firestore_admin_client_config.json +172 -0
- package/build/src/v1/firestore_admin_proto_list.json +13 -0
- package/build/src/v1/firestore_client.d.ts +1204 -0
- package/build/src/v1/firestore_client.js +1605 -0
- package/build/src/v1/firestore_client.js.map +1 -0
- package/build/src/v1/firestore_client_config.json +135 -0
- package/build/src/v1/firestore_proto_list.json +12 -0
- package/build/src/v1/gapic_metadata.json +351 -0
- package/build/src/v1/index.d.ts +2 -0
- package/build/src/v1/index.js +25 -0
- package/build/src/v1/index.js.map +1 -0
- package/build/src/v1beta1/firestore_client.d.ts +930 -0
- package/build/src/v1beta1/firestore_client.js +1310 -0
- package/build/src/v1beta1/firestore_client.js.map +1 -0
- package/build/src/v1beta1/firestore_client_config.json +99 -0
- package/build/src/v1beta1/firestore_proto_list.json +8 -0
- package/build/src/v1beta1/gapic_metadata.json +165 -0
- package/build/src/v1beta1/index.d.ts +1 -0
- package/build/src/v1beta1/index.js +23 -0
- package/build/src/v1beta1/index.js.map +1 -0
- package/package.json +65 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// Copyright 2026 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.v1;
|
|
18
|
+
|
|
19
|
+
import "google/api/field_behavior.proto";
|
|
20
|
+
import "google/protobuf/duration.proto";
|
|
21
|
+
import "google/protobuf/struct.proto";
|
|
22
|
+
|
|
23
|
+
option csharp_namespace = "Google.Cloud.Firestore.V1";
|
|
24
|
+
option go_package = "cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb";
|
|
25
|
+
option java_multiple_files = true;
|
|
26
|
+
option java_outer_classname = "QueryProfileProto";
|
|
27
|
+
option java_package = "com.google.firestore.v1";
|
|
28
|
+
option objc_class_prefix = "GCFS";
|
|
29
|
+
option php_namespace = "Google\\Cloud\\Firestore\\V1";
|
|
30
|
+
option ruby_package = "Google::Cloud::Firestore::V1";
|
|
31
|
+
|
|
32
|
+
// Specification of the Firestore Query Profile fields.
|
|
33
|
+
|
|
34
|
+
// Explain options for the query.
|
|
35
|
+
message ExplainOptions {
|
|
36
|
+
// Optional. Whether to execute this query.
|
|
37
|
+
//
|
|
38
|
+
// When false (the default), the query will be planned, returning only
|
|
39
|
+
// metrics from the planning stages.
|
|
40
|
+
//
|
|
41
|
+
// When true, the query will be planned and executed, returning the full
|
|
42
|
+
// query results along with both planning and execution stage metrics.
|
|
43
|
+
bool analyze = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Explain metrics for the query.
|
|
47
|
+
message ExplainMetrics {
|
|
48
|
+
// Planning phase information for the query.
|
|
49
|
+
PlanSummary plan_summary = 1;
|
|
50
|
+
|
|
51
|
+
// Aggregated stats from the execution of the query. Only present when
|
|
52
|
+
// [ExplainOptions.analyze][google.firestore.v1.ExplainOptions.analyze] is set
|
|
53
|
+
// to true.
|
|
54
|
+
ExecutionStats execution_stats = 2;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Planning phase information for the query.
|
|
58
|
+
message PlanSummary {
|
|
59
|
+
// The indexes selected for the query. For example:
|
|
60
|
+
// [
|
|
61
|
+
// {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"},
|
|
62
|
+
// {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"}
|
|
63
|
+
// ]
|
|
64
|
+
repeated google.protobuf.Struct indexes_used = 1;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Execution statistics for the query.
|
|
68
|
+
message ExecutionStats {
|
|
69
|
+
// Total number of results returned, including documents, projections,
|
|
70
|
+
// aggregation results, keys.
|
|
71
|
+
int64 results_returned = 1;
|
|
72
|
+
|
|
73
|
+
// Total time to execute the query in the backend.
|
|
74
|
+
google.protobuf.Duration execution_duration = 3;
|
|
75
|
+
|
|
76
|
+
// Total billable read operations.
|
|
77
|
+
int64 read_operations = 4;
|
|
78
|
+
|
|
79
|
+
// Debugging statistics from the execution of the query. Note that the
|
|
80
|
+
// debugging stats are subject to change as Firestore evolves. It could
|
|
81
|
+
// include:
|
|
82
|
+
// {
|
|
83
|
+
// "indexes_entries_scanned": "1000",
|
|
84
|
+
// "documents_scanned": "20",
|
|
85
|
+
// "billing_details" : {
|
|
86
|
+
// "documents_billable": "20",
|
|
87
|
+
// "index_entries_billable": "1000",
|
|
88
|
+
// "min_query_cost": "0"
|
|
89
|
+
// }
|
|
90
|
+
// }
|
|
91
|
+
google.protobuf.Struct debug_stats = 5;
|
|
92
|
+
}
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
// Copyright 2026 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.v1;
|
|
18
|
+
|
|
19
|
+
import "google/firestore/v1/bloom_filter.proto";
|
|
20
|
+
import "google/firestore/v1/common.proto";
|
|
21
|
+
import "google/firestore/v1/document.proto";
|
|
22
|
+
import "google/protobuf/timestamp.proto";
|
|
23
|
+
|
|
24
|
+
option csharp_namespace = "Google.Cloud.Firestore.V1";
|
|
25
|
+
option go_package = "cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb";
|
|
26
|
+
option java_multiple_files = true;
|
|
27
|
+
option java_outer_classname = "WriteProto";
|
|
28
|
+
option java_package = "com.google.firestore.v1";
|
|
29
|
+
option objc_class_prefix = "GCFS";
|
|
30
|
+
option php_namespace = "Google\\Cloud\\Firestore\\V1";
|
|
31
|
+
option ruby_package = "Google::Cloud::Firestore::V1";
|
|
32
|
+
|
|
33
|
+
// A write on a document.
|
|
34
|
+
message Write {
|
|
35
|
+
// The operation to execute.
|
|
36
|
+
oneof operation {
|
|
37
|
+
// A document to write.
|
|
38
|
+
Document update = 1;
|
|
39
|
+
|
|
40
|
+
// A document name to delete. In the format:
|
|
41
|
+
// `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
|
|
42
|
+
string delete = 2;
|
|
43
|
+
|
|
44
|
+
// Applies a transformation to a document.
|
|
45
|
+
DocumentTransform transform = 6;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// The fields to update in this write.
|
|
49
|
+
//
|
|
50
|
+
// This field can be set only when the operation is `update`.
|
|
51
|
+
// If the mask is not set for an `update` and the document exists, any
|
|
52
|
+
// existing data will be overwritten.
|
|
53
|
+
// If the mask is set and the document on the server has fields not covered by
|
|
54
|
+
// the mask, they are left unchanged.
|
|
55
|
+
// Fields referenced in the mask, but not present in the input document, are
|
|
56
|
+
// deleted from the document on the server.
|
|
57
|
+
// The field paths in this mask must not contain a reserved field name.
|
|
58
|
+
DocumentMask update_mask = 3;
|
|
59
|
+
|
|
60
|
+
// The transforms to perform after update.
|
|
61
|
+
//
|
|
62
|
+
// This field can be set only when the operation is `update`. If present, this
|
|
63
|
+
// write is equivalent to performing `update` and `transform` to the same
|
|
64
|
+
// document atomically and in order.
|
|
65
|
+
repeated DocumentTransform.FieldTransform update_transforms = 7;
|
|
66
|
+
|
|
67
|
+
// An optional precondition on the document.
|
|
68
|
+
//
|
|
69
|
+
// The write will fail if this is set and not met by the target document.
|
|
70
|
+
Precondition current_document = 4;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// A transformation of a document.
|
|
74
|
+
message DocumentTransform {
|
|
75
|
+
// A transformation of a field of the document.
|
|
76
|
+
message FieldTransform {
|
|
77
|
+
// A value that is calculated by the server.
|
|
78
|
+
enum ServerValue {
|
|
79
|
+
// Unspecified. This value must not be used.
|
|
80
|
+
SERVER_VALUE_UNSPECIFIED = 0;
|
|
81
|
+
|
|
82
|
+
// The time at which the server processed the request, with millisecond
|
|
83
|
+
// precision. If used on multiple fields (same or different documents) in
|
|
84
|
+
// a transaction, all the fields will get the same server timestamp.
|
|
85
|
+
REQUEST_TIME = 1;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// The path of the field. See
|
|
89
|
+
// [Document.fields][google.firestore.v1.Document.fields] for the field path
|
|
90
|
+
// syntax reference.
|
|
91
|
+
string field_path = 1;
|
|
92
|
+
|
|
93
|
+
// The transformation to apply on the field.
|
|
94
|
+
oneof transform_type {
|
|
95
|
+
// Sets the field to the given server value.
|
|
96
|
+
ServerValue set_to_server_value = 2;
|
|
97
|
+
|
|
98
|
+
// Adds the given value to the field's current value.
|
|
99
|
+
//
|
|
100
|
+
// This must be an integer or a double value.
|
|
101
|
+
// If the field is not an integer or double, or if the field does not yet
|
|
102
|
+
// exist, the transformation will set the field to the given value.
|
|
103
|
+
// If either of the given value or the current field value are doubles,
|
|
104
|
+
// both values will be interpreted as doubles. Double arithmetic and
|
|
105
|
+
// representation of double values follow IEEE 754 semantics.
|
|
106
|
+
// If there is positive/negative integer overflow, the field is resolved
|
|
107
|
+
// to the largest magnitude positive/negative integer.
|
|
108
|
+
Value increment = 3;
|
|
109
|
+
|
|
110
|
+
// Sets the field to the maximum of its current value and the given value.
|
|
111
|
+
//
|
|
112
|
+
// This must be an integer or a double value.
|
|
113
|
+
// If the field is not an integer or double, or if the field does not yet
|
|
114
|
+
// exist, the transformation will set the field to the given value.
|
|
115
|
+
// If a maximum operation is applied where the field and the input value
|
|
116
|
+
// are of mixed types (that is - one is an integer and one is a double)
|
|
117
|
+
// the field takes on the type of the larger operand. If the operands are
|
|
118
|
+
// equivalent (e.g. 3 and 3.0), the field does not change.
|
|
119
|
+
// 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and
|
|
120
|
+
// zero input value is always the stored value.
|
|
121
|
+
// The maximum of any numeric value x and NaN is NaN.
|
|
122
|
+
Value maximum = 4;
|
|
123
|
+
|
|
124
|
+
// Sets the field to the minimum of its current value and the given value.
|
|
125
|
+
//
|
|
126
|
+
// This must be an integer or a double value.
|
|
127
|
+
// If the field is not an integer or double, or if the field does not yet
|
|
128
|
+
// exist, the transformation will set the field to the input value.
|
|
129
|
+
// If a minimum operation is applied where the field and the input value
|
|
130
|
+
// are of mixed types (that is - one is an integer and one is a double)
|
|
131
|
+
// the field takes on the type of the smaller operand. If the operands are
|
|
132
|
+
// equivalent (e.g. 3 and 3.0), the field does not change.
|
|
133
|
+
// 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and
|
|
134
|
+
// zero input value is always the stored value.
|
|
135
|
+
// The minimum of any numeric value x and NaN is NaN.
|
|
136
|
+
Value minimum = 5;
|
|
137
|
+
|
|
138
|
+
// Append the given elements in order if they are not already present in
|
|
139
|
+
// the current field value.
|
|
140
|
+
// If the field is not an array, or if the field does not yet exist, it is
|
|
141
|
+
// first set to the empty array.
|
|
142
|
+
//
|
|
143
|
+
// Equivalent numbers of different types (e.g. 3L and 3.0) are
|
|
144
|
+
// considered equal when checking if a value is missing.
|
|
145
|
+
// NaN is equal to NaN, and Null is equal to Null.
|
|
146
|
+
// If the input contains multiple equivalent values, only the first will
|
|
147
|
+
// be considered.
|
|
148
|
+
//
|
|
149
|
+
// The corresponding transform_result will be the null value.
|
|
150
|
+
ArrayValue append_missing_elements = 6;
|
|
151
|
+
|
|
152
|
+
// Remove all of the given elements from the array in the field.
|
|
153
|
+
// If the field is not an array, or if the field does not yet exist, it is
|
|
154
|
+
// set to the empty array.
|
|
155
|
+
//
|
|
156
|
+
// Equivalent numbers of the different types (e.g. 3L and 3.0) are
|
|
157
|
+
// considered equal when deciding whether an element should be removed.
|
|
158
|
+
// NaN is equal to NaN, and Null is equal to Null.
|
|
159
|
+
// This will remove all equivalent values if there are duplicates.
|
|
160
|
+
//
|
|
161
|
+
// The corresponding transform_result will be the null value.
|
|
162
|
+
ArrayValue remove_all_from_array = 7;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// The name of the document to transform.
|
|
167
|
+
string document = 1;
|
|
168
|
+
|
|
169
|
+
// The list of transformations to apply to the fields of the document, in
|
|
170
|
+
// order.
|
|
171
|
+
// This must not be empty.
|
|
172
|
+
repeated FieldTransform field_transforms = 2;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// The result of applying a write.
|
|
176
|
+
message WriteResult {
|
|
177
|
+
// The last update time of the document after applying the write. Not set
|
|
178
|
+
// after a `delete`.
|
|
179
|
+
//
|
|
180
|
+
// If the write did not actually change the document, this will be the
|
|
181
|
+
// previous update_time.
|
|
182
|
+
google.protobuf.Timestamp update_time = 1;
|
|
183
|
+
|
|
184
|
+
// The results of applying each
|
|
185
|
+
// [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform],
|
|
186
|
+
// in the same order.
|
|
187
|
+
repeated Value transform_results = 2;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// A [Document][google.firestore.v1.Document] has changed.
|
|
191
|
+
//
|
|
192
|
+
// May be the result of multiple [writes][google.firestore.v1.Write], including
|
|
193
|
+
// deletes, that ultimately resulted in a new value for the
|
|
194
|
+
// [Document][google.firestore.v1.Document].
|
|
195
|
+
//
|
|
196
|
+
// Multiple [DocumentChange][google.firestore.v1.DocumentChange] messages may be
|
|
197
|
+
// returned for the same logical change, if multiple targets are affected.
|
|
198
|
+
message DocumentChange {
|
|
199
|
+
// The new state of the [Document][google.firestore.v1.Document].
|
|
200
|
+
//
|
|
201
|
+
// If `mask` is set, contains only fields that were updated or added.
|
|
202
|
+
Document document = 1;
|
|
203
|
+
|
|
204
|
+
// A set of target IDs of targets that match this document.
|
|
205
|
+
repeated int32 target_ids = 5;
|
|
206
|
+
|
|
207
|
+
// A set of target IDs for targets that no longer match this document.
|
|
208
|
+
repeated int32 removed_target_ids = 6;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// A [Document][google.firestore.v1.Document] has been deleted.
|
|
212
|
+
//
|
|
213
|
+
// May be the result of multiple [writes][google.firestore.v1.Write], including
|
|
214
|
+
// updates, the last of which deleted the
|
|
215
|
+
// [Document][google.firestore.v1.Document].
|
|
216
|
+
//
|
|
217
|
+
// Multiple [DocumentDelete][google.firestore.v1.DocumentDelete] messages may be
|
|
218
|
+
// returned for the same logical delete, if multiple targets are affected.
|
|
219
|
+
message DocumentDelete {
|
|
220
|
+
// The resource name of the [Document][google.firestore.v1.Document] that was
|
|
221
|
+
// deleted.
|
|
222
|
+
string document = 1;
|
|
223
|
+
|
|
224
|
+
// A set of target IDs for targets that previously matched this entity.
|
|
225
|
+
repeated int32 removed_target_ids = 6;
|
|
226
|
+
|
|
227
|
+
// The read timestamp at which the delete was observed.
|
|
228
|
+
//
|
|
229
|
+
// Greater or equal to the `commit_time` of the delete.
|
|
230
|
+
google.protobuf.Timestamp read_time = 4;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// A [Document][google.firestore.v1.Document] has been removed from the view of
|
|
234
|
+
// the targets.
|
|
235
|
+
//
|
|
236
|
+
// Sent if the document is no longer relevant to a target and is out of view.
|
|
237
|
+
// Can be sent instead of a DocumentDelete or a DocumentChange if the server
|
|
238
|
+
// can not send the new value of the document.
|
|
239
|
+
//
|
|
240
|
+
// Multiple [DocumentRemove][google.firestore.v1.DocumentRemove] messages may be
|
|
241
|
+
// returned for the same logical write or delete, if multiple targets are
|
|
242
|
+
// affected.
|
|
243
|
+
message DocumentRemove {
|
|
244
|
+
// The resource name of the [Document][google.firestore.v1.Document] that has
|
|
245
|
+
// gone out of view.
|
|
246
|
+
string document = 1;
|
|
247
|
+
|
|
248
|
+
// A set of target IDs for targets that previously matched this document.
|
|
249
|
+
repeated int32 removed_target_ids = 2;
|
|
250
|
+
|
|
251
|
+
// The read timestamp at which the remove was observed.
|
|
252
|
+
//
|
|
253
|
+
// Greater or equal to the `commit_time` of the change/delete/remove.
|
|
254
|
+
google.protobuf.Timestamp read_time = 4;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// A digest of all the documents that match a given target.
|
|
258
|
+
message ExistenceFilter {
|
|
259
|
+
// The target ID to which this filter applies.
|
|
260
|
+
int32 target_id = 1;
|
|
261
|
+
|
|
262
|
+
// The total count of documents that match
|
|
263
|
+
// [target_id][google.firestore.v1.ExistenceFilter.target_id].
|
|
264
|
+
//
|
|
265
|
+
// If different from the count of documents in the client that match, the
|
|
266
|
+
// client must manually determine which documents no longer match the target.
|
|
267
|
+
//
|
|
268
|
+
// The client can use the `unchanged_names` bloom filter to assist with
|
|
269
|
+
// this determination by testing ALL the document names against the filter;
|
|
270
|
+
// if the document name is NOT in the filter, it means the document no
|
|
271
|
+
// longer matches the target.
|
|
272
|
+
int32 count = 2;
|
|
273
|
+
|
|
274
|
+
// A bloom filter that, despite its name, contains the UTF-8 byte encodings of
|
|
275
|
+
// the resource names of ALL the documents that match
|
|
276
|
+
// [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form
|
|
277
|
+
// `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
|
|
278
|
+
//
|
|
279
|
+
// This bloom filter may be omitted at the server's discretion, such as if it
|
|
280
|
+
// is deemed that the client will not make use of it or if it is too
|
|
281
|
+
// computationally expensive to calculate or transmit. Clients must gracefully
|
|
282
|
+
// handle this field being absent by falling back to the logic used before
|
|
283
|
+
// this field existed; that is, re-add the target without a resume token to
|
|
284
|
+
// figure out which documents in the client's cache are out of sync.
|
|
285
|
+
BloomFilter unchanged_names = 3;
|
|
286
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// Copyright 2025 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 = "CommonProto";
|
|
25
|
+
option java_package = "com.google.firestore.v1beta1";
|
|
26
|
+
option objc_class_prefix = "GCFS";
|
|
27
|
+
option php_namespace = "Google\\Cloud\\Firestore\\V1beta1";
|
|
28
|
+
option ruby_package = "Google::Cloud::Firestore::V1beta1";
|
|
29
|
+
|
|
30
|
+
// A set of field paths on a document.
|
|
31
|
+
// Used to restrict a get or update operation on a document to a subset of its
|
|
32
|
+
// fields.
|
|
33
|
+
// This is different from standard field masks, as this is always scoped to a
|
|
34
|
+
// [Document][google.firestore.v1beta1.Document], and takes in account the dynamic nature of [Value][google.firestore.v1beta1.Value].
|
|
35
|
+
message DocumentMask {
|
|
36
|
+
// The list of field paths in the mask. See [Document.fields][google.firestore.v1beta1.Document.fields] for a field
|
|
37
|
+
// path syntax reference.
|
|
38
|
+
repeated string field_paths = 1;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// A precondition on a document, used for conditional operations.
|
|
42
|
+
message Precondition {
|
|
43
|
+
// The type of precondition.
|
|
44
|
+
oneof condition_type {
|
|
45
|
+
// When set to `true`, the target document must exist.
|
|
46
|
+
// When set to `false`, the target document must not exist.
|
|
47
|
+
bool exists = 1;
|
|
48
|
+
|
|
49
|
+
// When set, the target document must exist and have been last updated at
|
|
50
|
+
// that time.
|
|
51
|
+
google.protobuf.Timestamp update_time = 2;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Options for creating a new transaction.
|
|
56
|
+
message TransactionOptions {
|
|
57
|
+
// Options for a transaction that can be used to read and write documents.
|
|
58
|
+
message ReadWrite {
|
|
59
|
+
// An optional transaction to retry.
|
|
60
|
+
bytes retry_transaction = 1;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Options for a transaction that can only be used to read documents.
|
|
64
|
+
message ReadOnly {
|
|
65
|
+
// The consistency mode for this transaction. If not set, defaults to strong
|
|
66
|
+
// consistency.
|
|
67
|
+
oneof consistency_selector {
|
|
68
|
+
// Reads documents at the given time.
|
|
69
|
+
// This may not be older than 60 seconds.
|
|
70
|
+
google.protobuf.Timestamp read_time = 2;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// The mode of the transaction.
|
|
75
|
+
oneof mode {
|
|
76
|
+
// The transaction can only be used for read operations.
|
|
77
|
+
ReadOnly read_only = 2;
|
|
78
|
+
|
|
79
|
+
// The transaction can be used for both read and write operations.
|
|
80
|
+
ReadWrite read_write = 3;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
// Copyright 2025 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/struct.proto";
|
|
20
|
+
import "google/protobuf/timestamp.proto";
|
|
21
|
+
import "google/type/latlng.proto";
|
|
22
|
+
|
|
23
|
+
option csharp_namespace = "Google.Cloud.Firestore.V1Beta1";
|
|
24
|
+
option go_package = "cloud.google.com/go/firestore/apiv1beta1/firestorepb;firestorepb";
|
|
25
|
+
option java_multiple_files = true;
|
|
26
|
+
option java_outer_classname = "DocumentProto";
|
|
27
|
+
option java_package = "com.google.firestore.v1beta1";
|
|
28
|
+
option objc_class_prefix = "GCFS";
|
|
29
|
+
option php_namespace = "Google\\Cloud\\Firestore\\V1beta1";
|
|
30
|
+
option ruby_package = "Google::Cloud::Firestore::V1beta1";
|
|
31
|
+
|
|
32
|
+
// A Firestore document.
|
|
33
|
+
//
|
|
34
|
+
// Must not exceed 1 MiB - 4 bytes.
|
|
35
|
+
message Document {
|
|
36
|
+
// The resource name of the document, for example
|
|
37
|
+
// `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
|
|
38
|
+
string name = 1;
|
|
39
|
+
|
|
40
|
+
// The document's fields.
|
|
41
|
+
//
|
|
42
|
+
// The map keys represent field names.
|
|
43
|
+
//
|
|
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
|
+
//
|
|
48
|
+
// 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
|
|
51
|
+
// empty.
|
|
52
|
+
//
|
|
53
|
+
// 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`.
|
|
59
|
+
//
|
|
60
|
+
// Within a field path, a quoted field name starts and ends with `` ` `` and
|
|
61
|
+
// may contain any character. Some characters, including `` ` ``, must be
|
|
62
|
+
// escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
|
|
63
|
+
// `` `bak\`tik` `` represents `` bak`tik ``.
|
|
64
|
+
map<string, Value> fields = 2;
|
|
65
|
+
|
|
66
|
+
// Output only. The time at which the document was created.
|
|
67
|
+
//
|
|
68
|
+
// This value increases monotonically when a document is deleted then
|
|
69
|
+
// recreated. It can also be compared to values from other documents and
|
|
70
|
+
// the `read_time` of a query.
|
|
71
|
+
google.protobuf.Timestamp create_time = 3;
|
|
72
|
+
|
|
73
|
+
// Output only. The time at which the document was last changed.
|
|
74
|
+
//
|
|
75
|
+
// This value is initially set to the `create_time` then increases
|
|
76
|
+
// monotonically with each change to the document. It can also be
|
|
77
|
+
// compared to values from other documents and the `read_time` of a query.
|
|
78
|
+
google.protobuf.Timestamp update_time = 4;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// A message that can hold any of the supported value types.
|
|
82
|
+
message Value {
|
|
83
|
+
// Must have a value set.
|
|
84
|
+
oneof value_type {
|
|
85
|
+
// A null value.
|
|
86
|
+
google.protobuf.NullValue null_value = 11;
|
|
87
|
+
|
|
88
|
+
// A boolean value.
|
|
89
|
+
bool boolean_value = 1;
|
|
90
|
+
|
|
91
|
+
// An integer value.
|
|
92
|
+
int64 integer_value = 2;
|
|
93
|
+
|
|
94
|
+
// A double value.
|
|
95
|
+
double double_value = 3;
|
|
96
|
+
|
|
97
|
+
// A timestamp value.
|
|
98
|
+
//
|
|
99
|
+
// Precise only to microseconds. When stored, any additional precision is
|
|
100
|
+
// rounded down.
|
|
101
|
+
google.protobuf.Timestamp timestamp_value = 10;
|
|
102
|
+
|
|
103
|
+
// A string value.
|
|
104
|
+
//
|
|
105
|
+
// The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
|
|
106
|
+
// Only the first 1,500 bytes of the UTF-8 representation are considered by
|
|
107
|
+
// queries.
|
|
108
|
+
string string_value = 17;
|
|
109
|
+
|
|
110
|
+
// A bytes value.
|
|
111
|
+
//
|
|
112
|
+
// Must not exceed 1 MiB - 89 bytes.
|
|
113
|
+
// Only the first 1,500 bytes are considered by queries.
|
|
114
|
+
bytes bytes_value = 18;
|
|
115
|
+
|
|
116
|
+
// A reference to a document. For example:
|
|
117
|
+
// `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
|
|
118
|
+
string reference_value = 5;
|
|
119
|
+
|
|
120
|
+
// A geo point value representing a point on the surface of Earth.
|
|
121
|
+
google.type.LatLng geo_point_value = 8;
|
|
122
|
+
|
|
123
|
+
// An array value.
|
|
124
|
+
//
|
|
125
|
+
// Cannot directly contain another array value, though can contain an
|
|
126
|
+
// map which contains another array.
|
|
127
|
+
ArrayValue array_value = 9;
|
|
128
|
+
|
|
129
|
+
// A map value.
|
|
130
|
+
MapValue map_value = 6;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// An array value.
|
|
135
|
+
message ArrayValue {
|
|
136
|
+
// Values in the array.
|
|
137
|
+
repeated Value values = 1;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// A map value.
|
|
141
|
+
message MapValue {
|
|
142
|
+
// The map's fields.
|
|
143
|
+
//
|
|
144
|
+
// The map keys represent field names. Field names matching the regular
|
|
145
|
+
// expression `__.*__` are reserved. Reserved field names are forbidden except
|
|
146
|
+
// in certain documented contexts. The map keys, represented as UTF-8, must
|
|
147
|
+
// not exceed 1,500 bytes and cannot be empty.
|
|
148
|
+
map<string, Value> fields = 1;
|
|
149
|
+
}
|