@firebase/firestore 3.4.2 → 3.4.3

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.
Files changed (170) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/firestore/src/api/snapshot.d.ts +6 -6
  3. package/dist/firestore/src/lite-api/snapshot.d.ts +2 -2
  4. package/dist/firestore/test/integration/bootstrap.d.ts +0 -1
  5. package/dist/firestore/test/integration/util/events_accumulator.d.ts +2 -2
  6. package/dist/firestore/test/integration/util/firebase_export.d.ts +6 -14
  7. package/dist/firestore/test/integration/util/helpers.d.ts +18 -18
  8. package/dist/firestore/test/integration/util/internal_helpers.d.ts +3 -3
  9. package/dist/firestore/test/integration/util/settings.d.ts +2 -2
  10. package/dist/firestore/test/unit/api/{blob.test.d.ts → bytes.test.d.ts} +0 -0
  11. package/dist/firestore/test/util/api_helpers.d.ts +1 -1
  12. package/dist/firestore/test/util/helpers.d.ts +4 -6
  13. package/dist/index.d.ts +6 -6
  14. package/dist/index.esm2017.js +869 -869
  15. package/dist/index.esm2017.js.map +1 -1
  16. package/dist/index.esm5.js +1257 -1257
  17. package/dist/index.esm5.js.map +1 -1
  18. package/dist/index.node.cjs.js +2674 -24
  19. package/dist/index.node.cjs.js.map +1 -1
  20. package/dist/index.node.mjs +2675 -25
  21. package/dist/index.node.mjs.map +1 -1
  22. package/dist/index.rn.js +1068 -1068
  23. package/dist/index.rn.js.map +1 -1
  24. package/dist/internal.d.ts +8 -8
  25. package/dist/lite/firestore/src/api/snapshot.d.ts +6 -6
  26. package/dist/lite/firestore/src/lite-api/snapshot.d.ts +2 -2
  27. package/dist/lite/firestore/test/integration/bootstrap.d.ts +0 -1
  28. package/dist/lite/firestore/test/integration/util/events_accumulator.d.ts +2 -2
  29. package/dist/lite/firestore/test/integration/util/firebase_export.d.ts +6 -14
  30. package/dist/lite/firestore/test/integration/util/helpers.d.ts +18 -18
  31. package/dist/lite/firestore/test/integration/util/internal_helpers.d.ts +3 -3
  32. package/dist/lite/firestore/test/integration/util/settings.d.ts +2 -2
  33. package/dist/lite/firestore/test/unit/api/{blob.test.d.ts → bytes.test.d.ts} +0 -0
  34. package/dist/lite/firestore/test/util/api_helpers.d.ts +1 -1
  35. package/dist/lite/firestore/test/util/helpers.d.ts +4 -6
  36. package/dist/lite/index.browser.esm2017.js +1136 -1136
  37. package/dist/lite/index.browser.esm2017.js.map +1 -1
  38. package/dist/lite/index.browser.esm5.js +105 -105
  39. package/dist/lite/index.browser.esm5.js.map +1 -1
  40. package/dist/lite/index.d.ts +2 -2
  41. package/dist/lite/index.node.cjs.js +11 -12
  42. package/dist/lite/index.node.cjs.js.map +1 -1
  43. package/dist/lite/index.node.mjs +11 -12
  44. package/dist/lite/index.node.mjs.map +1 -1
  45. package/dist/lite/index.rn.esm2017.js +148 -148
  46. package/dist/lite/index.rn.esm2017.js.map +1 -1
  47. package/dist/lite/internal.d.ts +2 -2
  48. package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +107 -107
  49. package/dist/lite/packages/firestore/src/api/snapshot.d.ts +6 -6
  50. package/dist/lite/packages/firestore/src/lite-api/snapshot.d.ts +2 -2
  51. package/dist/lite/packages/firestore/test/integration/bootstrap.d.ts +0 -1
  52. package/dist/lite/packages/firestore/test/integration/util/events_accumulator.d.ts +2 -2
  53. package/dist/lite/packages/firestore/test/integration/util/firebase_export.d.ts +6 -14
  54. package/dist/lite/packages/firestore/test/integration/util/helpers.d.ts +18 -18
  55. package/dist/lite/packages/firestore/test/integration/util/internal_helpers.d.ts +3 -3
  56. package/dist/lite/packages/firestore/test/integration/util/settings.d.ts +2 -2
  57. package/dist/lite/packages/firestore/test/unit/api/{blob.test.d.ts → bytes.test.d.ts} +0 -0
  58. package/dist/lite/packages/firestore/test/util/api_helpers.d.ts +1 -1
  59. package/dist/lite/packages/firestore/test/util/helpers.d.ts +4 -6
  60. package/dist/lite/private.d.ts +2 -2
  61. package/dist/packages/firestore/dist/index.esm2017.d.ts +105 -105
  62. package/dist/packages/firestore/src/api/snapshot.d.ts +6 -6
  63. package/dist/packages/firestore/src/lite-api/snapshot.d.ts +2 -2
  64. package/dist/packages/firestore/test/integration/bootstrap.d.ts +0 -1
  65. package/dist/packages/firestore/test/integration/util/events_accumulator.d.ts +2 -2
  66. package/dist/packages/firestore/test/integration/util/firebase_export.d.ts +6 -14
  67. package/dist/packages/firestore/test/integration/util/helpers.d.ts +18 -18
  68. package/dist/packages/firestore/test/integration/util/internal_helpers.d.ts +3 -3
  69. package/dist/packages/firestore/test/integration/util/settings.d.ts +2 -2
  70. package/dist/packages/firestore/test/unit/api/{blob.test.d.ts → bytes.test.d.ts} +0 -0
  71. package/dist/packages/firestore/test/util/api_helpers.d.ts +1 -1
  72. package/dist/packages/firestore/test/util/helpers.d.ts +4 -6
  73. package/dist/private.d.ts +8 -8
  74. package/package.json +4 -7
  75. package/dist/firestore/compat/api/blob.d.ts +0 -29
  76. package/dist/firestore/compat/api/database.d.ts +0 -228
  77. package/dist/firestore/compat/api/field_path.d.ts +0 -36
  78. package/dist/firestore/compat/api/field_value.d.ts +0 -29
  79. package/dist/firestore/compat/api/geo_point.d.ts +0 -17
  80. package/dist/firestore/compat/api/observer.d.ts +0 -29
  81. package/dist/firestore/compat/api/timestamp.d.ts +0 -17
  82. package/dist/firestore/compat/config.d.ts +0 -28
  83. package/dist/firestore/compat/index.console.d.ts +0 -42
  84. package/dist/firestore/compat/index.d.ts +0 -49
  85. package/dist/firestore/compat/index.node.d.ts +0 -22
  86. package/dist/firestore/compat/index.rn.d.ts +0 -22
  87. package/dist/firestore/compat/register-module.d.ts +0 -42
  88. package/dist/firestore/compat/util/input_validation.d.ts +0 -18
  89. package/dist/lite/firestore/compat/api/blob.d.ts +0 -29
  90. package/dist/lite/firestore/compat/api/database.d.ts +0 -228
  91. package/dist/lite/firestore/compat/api/field_path.d.ts +0 -36
  92. package/dist/lite/firestore/compat/api/field_value.d.ts +0 -29
  93. package/dist/lite/firestore/compat/api/geo_point.d.ts +0 -17
  94. package/dist/lite/firestore/compat/api/observer.d.ts +0 -29
  95. package/dist/lite/firestore/compat/api/timestamp.d.ts +0 -17
  96. package/dist/lite/firestore/compat/config.d.ts +0 -28
  97. package/dist/lite/firestore/compat/index.console.d.ts +0 -42
  98. package/dist/lite/firestore/compat/index.d.ts +0 -49
  99. package/dist/lite/firestore/compat/index.node.d.ts +0 -22
  100. package/dist/lite/firestore/compat/index.rn.d.ts +0 -22
  101. package/dist/lite/firestore/compat/register-module.d.ts +0 -42
  102. package/dist/lite/firestore/compat/util/input_validation.d.ts +0 -18
  103. package/dist/lite/packages/firestore/compat/api/blob.d.ts +0 -29
  104. package/dist/lite/packages/firestore/compat/api/database.d.ts +0 -228
  105. package/dist/lite/packages/firestore/compat/api/field_path.d.ts +0 -36
  106. package/dist/lite/packages/firestore/compat/api/field_value.d.ts +0 -29
  107. package/dist/lite/packages/firestore/compat/api/geo_point.d.ts +0 -17
  108. package/dist/lite/packages/firestore/compat/api/observer.d.ts +0 -29
  109. package/dist/lite/packages/firestore/compat/api/timestamp.d.ts +0 -17
  110. package/dist/lite/packages/firestore/compat/config.d.ts +0 -28
  111. package/dist/lite/packages/firestore/compat/index.console.d.ts +0 -42
  112. package/dist/lite/packages/firestore/compat/index.d.ts +0 -49
  113. package/dist/lite/packages/firestore/compat/index.node.d.ts +0 -22
  114. package/dist/lite/packages/firestore/compat/index.rn.d.ts +0 -22
  115. package/dist/lite/packages/firestore/compat/register-module.d.ts +0 -42
  116. package/dist/lite/packages/firestore/compat/util/input_validation.d.ts +0 -18
  117. package/dist/lite/src/protos/README.md +0 -2
  118. package/dist/lite/src/protos/firestore/bundle.proto +0 -121
  119. package/dist/lite/src/protos/firestore_bundle_proto.ts +0 -93
  120. package/dist/lite/src/protos/firestore_proto_api.ts +0 -1259
  121. package/dist/lite/src/protos/google/api/annotations.proto +0 -31
  122. package/dist/lite/src/protos/google/api/http.proto +0 -370
  123. package/dist/lite/src/protos/google/firestore/v1/common.proto +0 -84
  124. package/dist/lite/src/protos/google/firestore/v1/document.proto +0 -151
  125. package/dist/lite/src/protos/google/firestore/v1/firestore.proto +0 -761
  126. package/dist/lite/src/protos/google/firestore/v1/query.proto +0 -302
  127. package/dist/lite/src/protos/google/firestore/v1/write.proto +0 -264
  128. package/dist/lite/src/protos/google/protobuf/any.proto +0 -155
  129. package/dist/lite/src/protos/google/protobuf/descriptor.proto +0 -882
  130. package/dist/lite/src/protos/google/protobuf/empty.proto +0 -52
  131. package/dist/lite/src/protos/google/protobuf/struct.proto +0 -96
  132. package/dist/lite/src/protos/google/protobuf/timestamp.proto +0 -137
  133. package/dist/lite/src/protos/google/protobuf/wrappers.proto +0 -123
  134. package/dist/lite/src/protos/google/rpc/status.proto +0 -92
  135. package/dist/lite/src/protos/google/type/latlng.proto +0 -71
  136. package/dist/lite/src/protos/update.sh +0 -61
  137. package/dist/packages/firestore/compat/api/blob.d.ts +0 -29
  138. package/dist/packages/firestore/compat/api/database.d.ts +0 -228
  139. package/dist/packages/firestore/compat/api/field_path.d.ts +0 -36
  140. package/dist/packages/firestore/compat/api/field_value.d.ts +0 -29
  141. package/dist/packages/firestore/compat/api/geo_point.d.ts +0 -17
  142. package/dist/packages/firestore/compat/api/observer.d.ts +0 -29
  143. package/dist/packages/firestore/compat/api/timestamp.d.ts +0 -17
  144. package/dist/packages/firestore/compat/config.d.ts +0 -28
  145. package/dist/packages/firestore/compat/index.console.d.ts +0 -42
  146. package/dist/packages/firestore/compat/index.d.ts +0 -49
  147. package/dist/packages/firestore/compat/index.node.d.ts +0 -22
  148. package/dist/packages/firestore/compat/index.rn.d.ts +0 -22
  149. package/dist/packages/firestore/compat/register-module.d.ts +0 -42
  150. package/dist/packages/firestore/compat/util/input_validation.d.ts +0 -18
  151. package/dist/src/protos/README.md +0 -2
  152. package/dist/src/protos/firestore/bundle.proto +0 -121
  153. package/dist/src/protos/firestore_bundle_proto.ts +0 -93
  154. package/dist/src/protos/firestore_proto_api.ts +0 -1259
  155. package/dist/src/protos/google/api/annotations.proto +0 -31
  156. package/dist/src/protos/google/api/http.proto +0 -370
  157. package/dist/src/protos/google/firestore/v1/common.proto +0 -84
  158. package/dist/src/protos/google/firestore/v1/document.proto +0 -151
  159. package/dist/src/protos/google/firestore/v1/firestore.proto +0 -761
  160. package/dist/src/protos/google/firestore/v1/query.proto +0 -302
  161. package/dist/src/protos/google/firestore/v1/write.proto +0 -264
  162. package/dist/src/protos/google/protobuf/any.proto +0 -155
  163. package/dist/src/protos/google/protobuf/descriptor.proto +0 -882
  164. package/dist/src/protos/google/protobuf/empty.proto +0 -52
  165. package/dist/src/protos/google/protobuf/struct.proto +0 -96
  166. package/dist/src/protos/google/protobuf/timestamp.proto +0 -137
  167. package/dist/src/protos/google/protobuf/wrappers.proto +0 -123
  168. package/dist/src/protos/google/rpc/status.proto +0 -92
  169. package/dist/src/protos/google/type/latlng.proto +0 -71
  170. package/dist/src/protos/update.sh +0 -61
@@ -1,761 +0,0 @@
1
- // Copyright 2018 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
-
16
- syntax = "proto3";
17
-
18
- package google.firestore.v1;
19
-
20
- import "google/api/annotations.proto";
21
- import "google/firestore/v1/common.proto";
22
- import "google/firestore/v1/document.proto";
23
- import "google/firestore/v1/query.proto";
24
- import "google/firestore/v1/write.proto";
25
- import "google/protobuf/empty.proto";
26
- import "google/protobuf/timestamp.proto";
27
- import "google/rpc/status.proto";
28
-
29
- option csharp_namespace = "Google.Cloud.Firestore.V1";
30
- option go_package = "google.golang.org/genproto/googleapis/firestore/v1;firestore";
31
- option java_multiple_files = true;
32
- option java_outer_classname = "FirestoreProto";
33
- option java_package = "com.google.firestore.v1";
34
- option objc_class_prefix = "GCFS";
35
- option php_namespace = "Google\\Cloud\\Firestore\\V1";
36
- // Specification of the Firestore API.
37
-
38
- // The Cloud Firestore service.
39
- //
40
- // This service exposes several types of comparable timestamps:
41
- //
42
- // * `create_time` - The time at which a document was created. Changes only
43
- // when a document is deleted, then re-created. Increases in a strict
44
- // monotonic fashion.
45
- // * `update_time` - The time at which a document was last updated. Changes
46
- // every time a document is modified. Does not change when a write results
47
- // in no modifications. Increases in a strict monotonic fashion.
48
- // * `read_time` - The time at which a particular state was observed. Used
49
- // to denote a consistent snapshot of the database or the time at which a
50
- // Document was observed to not exist.
51
- // * `commit_time` - The time at which the writes in a transaction were
52
- // committed. Any read with an equal or greater `read_time` is guaranteed
53
- // to see the effects of the transaction.
54
- service Firestore {
55
- // Gets a single document.
56
- rpc GetDocument(GetDocumentRequest) returns (Document) {
57
- option (google.api.http) = {
58
- get: "/v1/{name=projects/*/databases/*/documents/*/**}"
59
- };
60
- }
61
-
62
- // Lists documents.
63
- rpc ListDocuments(ListDocumentsRequest) returns (ListDocumentsResponse) {
64
- option (google.api.http) = {
65
- get: "/v1/{parent=projects/*/databases/*/documents/*/**}/{collection_id}"
66
- };
67
- }
68
-
69
- // Creates a new document.
70
- rpc CreateDocument(CreateDocumentRequest) returns (Document) {
71
- option (google.api.http) = {
72
- post: "/v1/{parent=projects/*/databases/*/documents/**}/{collection_id}"
73
- body: "document"
74
- };
75
- }
76
-
77
- // Updates or inserts a document.
78
- rpc UpdateDocument(UpdateDocumentRequest) returns (Document) {
79
- option (google.api.http) = {
80
- patch: "/v1/{document.name=projects/*/databases/*/documents/*/**}"
81
- body: "document"
82
- };
83
- }
84
-
85
- // Deletes a document.
86
- rpc DeleteDocument(DeleteDocumentRequest) returns (google.protobuf.Empty) {
87
- option (google.api.http) = {
88
- delete: "/v1/{name=projects/*/databases/*/documents/*/**}"
89
- };
90
- }
91
-
92
- // Gets multiple documents.
93
- //
94
- // Documents returned by this method are not guaranteed to be returned in the
95
- // same order that they were requested.
96
- rpc BatchGetDocuments(BatchGetDocumentsRequest) returns (stream BatchGetDocumentsResponse) {
97
- option (google.api.http) = {
98
- post: "/v1/{database=projects/*/databases/*}/documents:batchGet"
99
- body: "*"
100
- };
101
- }
102
-
103
- // Starts a new transaction.
104
- rpc BeginTransaction(BeginTransactionRequest) returns (BeginTransactionResponse) {
105
- option (google.api.http) = {
106
- post: "/v1/{database=projects/*/databases/*}/documents:beginTransaction"
107
- body: "*"
108
- };
109
- }
110
-
111
- // Commits a transaction, while optionally updating documents.
112
- rpc Commit(CommitRequest) returns (CommitResponse) {
113
- option (google.api.http) = {
114
- post: "/v1/{database=projects/*/databases/*}/documents:commit"
115
- body: "*"
116
- };
117
- }
118
-
119
- // Rolls back a transaction.
120
- rpc Rollback(RollbackRequest) returns (google.protobuf.Empty) {
121
- option (google.api.http) = {
122
- post: "/v1/{database=projects/*/databases/*}/documents:rollback"
123
- body: "*"
124
- };
125
- }
126
-
127
- // Runs a query.
128
- rpc RunQuery(RunQueryRequest) returns (stream RunQueryResponse) {
129
- option (google.api.http) = {
130
- post: "/v1/{parent=projects/*/databases/*/documents}:runQuery"
131
- body: "*"
132
- additional_bindings {
133
- post: "/v1/{parent=projects/*/databases/*/documents/*/**}:runQuery"
134
- body: "*"
135
- }
136
- };
137
- }
138
-
139
- // Streams batches of document updates and deletes, in order.
140
- rpc Write(stream WriteRequest) returns (stream WriteResponse) {
141
- option (google.api.http) = {
142
- post: "/v1/{database=projects/*/databases/*}/documents:write"
143
- body: "*"
144
- };
145
- }
146
-
147
- // Listens to changes.
148
- rpc Listen(stream ListenRequest) returns (stream ListenResponse) {
149
- option (google.api.http) = {
150
- post: "/v1/{database=projects/*/databases/*}/documents:listen"
151
- body: "*"
152
- };
153
- }
154
-
155
- // Lists all the collection IDs underneath a document.
156
- rpc ListCollectionIds(ListCollectionIdsRequest) returns (ListCollectionIdsResponse) {
157
- option (google.api.http) = {
158
- post: "/v1/{parent=projects/*/databases/*/documents}:listCollectionIds"
159
- body: "*"
160
- additional_bindings {
161
- post: "/v1/{parent=projects/*/databases/*/documents/*/**}:listCollectionIds"
162
- body: "*"
163
- }
164
- };
165
- }
166
- }
167
-
168
- // The request for [Firestore.GetDocument][google.firestore.v1.Firestore.GetDocument].
169
- message GetDocumentRequest {
170
- // The resource name of the Document to get. In the format:
171
- // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
172
- string name = 1;
173
-
174
- // The fields to return. If not set, returns all fields.
175
- //
176
- // If the document has a field that is not present in this mask, that field
177
- // will not be returned in the response.
178
- DocumentMask mask = 2;
179
-
180
- // The consistency mode for this transaction.
181
- // If not set, defaults to strong consistency.
182
- oneof consistency_selector {
183
- // Reads the document in a transaction.
184
- bytes transaction = 3;
185
-
186
- // Reads the version of the document at the given time.
187
- // This may not be older than 60 seconds.
188
- google.protobuf.Timestamp read_time = 5;
189
- }
190
- }
191
-
192
- // The request for [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments].
193
- message ListDocumentsRequest {
194
- // The parent resource name. In the format:
195
- // `projects/{project_id}/databases/{database_id}/documents` or
196
- // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
197
- // For example:
198
- // `projects/my-project/databases/my-database/documents` or
199
- // `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
200
- string parent = 1;
201
-
202
- // The collection ID, relative to `parent`, to list. For example: `chatrooms`
203
- // or `messages`.
204
- string collection_id = 2;
205
-
206
- // The maximum number of documents to return.
207
- int32 page_size = 3;
208
-
209
- // The `next_page_token` value returned from a previous List request, if any.
210
- string page_token = 4;
211
-
212
- // The order to sort results by. For example: `priority desc, name`.
213
- string order_by = 6;
214
-
215
- // The fields to return. If not set, returns all fields.
216
- //
217
- // If a document has a field that is not present in this mask, that field
218
- // will not be returned in the response.
219
- DocumentMask mask = 7;
220
-
221
- // The consistency mode for this transaction.
222
- // If not set, defaults to strong consistency.
223
- oneof consistency_selector {
224
- // Reads documents in a transaction.
225
- bytes transaction = 8;
226
-
227
- // Reads documents as they were at the given time.
228
- // This may not be older than 60 seconds.
229
- google.protobuf.Timestamp read_time = 10;
230
- }
231
-
232
- // If the list should show missing documents. A missing document is a
233
- // document that does not exist but has sub-documents. These documents will
234
- // be returned with a key but will not have fields, [Document.create_time][google.firestore.v1.Document.create_time],
235
- // or [Document.update_time][google.firestore.v1.Document.update_time] set.
236
- //
237
- // Requests with `show_missing` may not specify `where` or
238
- // `order_by`.
239
- bool show_missing = 12;
240
- }
241
-
242
- // The response for [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments].
243
- message ListDocumentsResponse {
244
- // The Documents found.
245
- repeated Document documents = 1;
246
-
247
- // The next page token.
248
- string next_page_token = 2;
249
- }
250
-
251
- // The request for [Firestore.CreateDocument][google.firestore.v1.Firestore.CreateDocument].
252
- message CreateDocumentRequest {
253
- // The parent resource. For example:
254
- // `projects/{project_id}/databases/{database_id}/documents` or
255
- // `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}`
256
- string parent = 1;
257
-
258
- // The collection ID, relative to `parent`, to list. For example: `chatrooms`.
259
- string collection_id = 2;
260
-
261
- // The client-assigned document ID to use for this document.
262
- //
263
- // Optional. If not specified, an ID will be assigned by the service.
264
- string document_id = 3;
265
-
266
- // The document to create. `name` must not be set.
267
- Document document = 4;
268
-
269
- // The fields to return. If not set, returns all fields.
270
- //
271
- // If the document has a field that is not present in this mask, that field
272
- // will not be returned in the response.
273
- DocumentMask mask = 5;
274
- }
275
-
276
- // The request for [Firestore.UpdateDocument][google.firestore.v1.Firestore.UpdateDocument].
277
- message UpdateDocumentRequest {
278
- // The updated document.
279
- // Creates the document if it does not already exist.
280
- Document document = 1;
281
-
282
- // The fields to update.
283
- // None of the field paths in the mask may contain a reserved name.
284
- //
285
- // If the document exists on the server and has fields not referenced in the
286
- // mask, they are left unchanged.
287
- // Fields referenced in the mask, but not present in the input document, are
288
- // deleted from the document on the server.
289
- DocumentMask update_mask = 2;
290
-
291
- // The fields to return. If not set, returns all fields.
292
- //
293
- // If the document has a field that is not present in this mask, that field
294
- // will not be returned in the response.
295
- DocumentMask mask = 3;
296
-
297
- // An optional precondition on the document.
298
- // The request will fail if this is set and not met by the target document.
299
- Precondition current_document = 4;
300
- }
301
-
302
- // The request for [Firestore.DeleteDocument][google.firestore.v1.Firestore.DeleteDocument].
303
- message DeleteDocumentRequest {
304
- // The resource name of the Document to delete. In the format:
305
- // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
306
- string name = 1;
307
-
308
- // An optional precondition on the document.
309
- // The request will fail if this is set and not met by the target document.
310
- Precondition current_document = 2;
311
- }
312
-
313
- // The request for [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments].
314
- message BatchGetDocumentsRequest {
315
- // The database name. In the format:
316
- // `projects/{project_id}/databases/{database_id}`.
317
- string database = 1;
318
-
319
- // The names of the documents to retrieve. In the format:
320
- // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
321
- // The request will fail if any of the document is not a child resource of the
322
- // given `database`. Duplicate names will be elided.
323
- repeated string documents = 2;
324
-
325
- // The fields to return. If not set, returns all fields.
326
- //
327
- // If a document has a field that is not present in this mask, that field will
328
- // not be returned in the response.
329
- DocumentMask mask = 3;
330
-
331
- // The consistency mode for this transaction.
332
- // If not set, defaults to strong consistency.
333
- oneof consistency_selector {
334
- // Reads documents in a transaction.
335
- bytes transaction = 4;
336
-
337
- // Starts a new transaction and reads the documents.
338
- // Defaults to a read-only transaction.
339
- // The new transaction ID will be returned as the first response in the
340
- // stream.
341
- TransactionOptions new_transaction = 5;
342
-
343
- // Reads documents as they were at the given time.
344
- // This may not be older than 60 seconds.
345
- google.protobuf.Timestamp read_time = 7;
346
- }
347
- }
348
-
349
- // The streamed response for [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments].
350
- message BatchGetDocumentsResponse {
351
- // A single result.
352
- // This can be empty if the server is just returning a transaction.
353
- oneof result {
354
- // A document that was requested.
355
- Document found = 1;
356
-
357
- // A document name that was requested but does not exist. In the format:
358
- // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
359
- string missing = 2;
360
- }
361
-
362
- // The transaction that was started as part of this request.
363
- // Will only be set in the first response, and only if
364
- // [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] was set in the request.
365
- bytes transaction = 3;
366
-
367
- // The time at which the document was read.
368
- // This may be monotically increasing, in this case the previous documents in
369
- // the result stream are guaranteed not to have changed between their
370
- // read_time and this one.
371
- google.protobuf.Timestamp read_time = 4;
372
- }
373
-
374
- // The request for [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction].
375
- message BeginTransactionRequest {
376
- // The database name. In the format:
377
- // `projects/{project_id}/databases/{database_id}`.
378
- string database = 1;
379
-
380
- // The options for the transaction.
381
- // Defaults to a read-write transaction.
382
- TransactionOptions options = 2;
383
- }
384
-
385
- // The response for [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction].
386
- message BeginTransactionResponse {
387
- // The transaction that was started.
388
- bytes transaction = 1;
389
- }
390
-
391
- // The request for [Firestore.Commit][google.firestore.v1.Firestore.Commit].
392
- message CommitRequest {
393
- // The database name. In the format:
394
- // `projects/{project_id}/databases/{database_id}`.
395
- string database = 1;
396
-
397
- // The writes to apply.
398
- //
399
- // Always executed atomically and in order.
400
- repeated Write writes = 2;
401
-
402
- // If set, applies all writes in this transaction, and commits it.
403
- bytes transaction = 3;
404
- }
405
-
406
- // The response for [Firestore.Commit][google.firestore.v1.Firestore.Commit].
407
- message CommitResponse {
408
- // The result of applying the writes.
409
- //
410
- // This i-th write result corresponds to the i-th write in the
411
- // request.
412
- repeated WriteResult write_results = 1;
413
-
414
- // The time at which the commit occurred.
415
- google.protobuf.Timestamp commit_time = 2;
416
- }
417
-
418
- // The request for [Firestore.Rollback][google.firestore.v1.Firestore.Rollback].
419
- message RollbackRequest {
420
- // The database name. In the format:
421
- // `projects/{project_id}/databases/{database_id}`.
422
- string database = 1;
423
-
424
- // The transaction to roll back.
425
- bytes transaction = 2;
426
- }
427
-
428
- // The request for [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery].
429
- message RunQueryRequest {
430
- // The parent resource name. In the format:
431
- // `projects/{project_id}/databases/{database_id}/documents` or
432
- // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
433
- // For example:
434
- // `projects/my-project/databases/my-database/documents` or
435
- // `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
436
- string parent = 1;
437
-
438
- // The query to run.
439
- oneof query_type {
440
- // A structured query.
441
- StructuredQuery structured_query = 2;
442
- }
443
-
444
- // The consistency mode for this transaction.
445
- // If not set, defaults to strong consistency.
446
- oneof consistency_selector {
447
- // Reads documents in a transaction.
448
- bytes transaction = 5;
449
-
450
- // Starts a new transaction and reads the documents.
451
- // Defaults to a read-only transaction.
452
- // The new transaction ID will be returned as the first response in the
453
- // stream.
454
- TransactionOptions new_transaction = 6;
455
-
456
- // Reads documents as they were at the given time.
457
- // This may not be older than 60 seconds.
458
- google.protobuf.Timestamp read_time = 7;
459
- }
460
- }
461
-
462
- // The response for [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery].
463
- message RunQueryResponse {
464
- // The transaction that was started as part of this request.
465
- // Can only be set in the first response, and only if
466
- // [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] was set in the request.
467
- // If set, no other fields will be set in this response.
468
- bytes transaction = 2;
469
-
470
- // A query result.
471
- // Not set when reporting partial progress.
472
- Document document = 1;
473
-
474
- // The time at which the document was read. This may be monotonically
475
- // increasing; in this case, the previous documents in the result stream are
476
- // guaranteed not to have changed between their `read_time` and this one.
477
- //
478
- // If the query returns no results, a response with `read_time` and no
479
- // `document` will be sent, and this represents the time at which the query
480
- // was run.
481
- google.protobuf.Timestamp read_time = 3;
482
-
483
- // The number of results that have been skipped due to an offset between
484
- // the last response and the current response.
485
- int32 skipped_results = 4;
486
- }
487
-
488
- // The request for [Firestore.Write][google.firestore.v1.Firestore.Write].
489
- //
490
- // The first request creates a stream, or resumes an existing one from a token.
491
- //
492
- // When creating a new stream, the server replies with a response containing
493
- // only an ID and a token, to use in the next request.
494
- //
495
- // When resuming a stream, the server first streams any responses later than the
496
- // given token, then a response containing only an up-to-date token, to use in
497
- // the next request.
498
- message WriteRequest {
499
- // The database name. In the format:
500
- // `projects/{project_id}/databases/{database_id}`.
501
- // This is only required in the first message.
502
- string database = 1;
503
-
504
- // The ID of the write stream to resume.
505
- // This may only be set in the first message. When left empty, a new write
506
- // stream will be created.
507
- string stream_id = 2;
508
-
509
- // The writes to apply.
510
- //
511
- // Always executed atomically and in order.
512
- // This must be empty on the first request.
513
- // This may be empty on the last request.
514
- // This must not be empty on all other requests.
515
- repeated Write writes = 3;
516
-
517
- // A stream token that was previously sent by the server.
518
- //
519
- // The client should set this field to the token from the most recent
520
- // [WriteResponse][google.firestore.v1.WriteResponse] it has received. This acknowledges that the client has
521
- // received responses up to this token. After sending this token, earlier
522
- // tokens may not be used anymore.
523
- //
524
- // The server may close the stream if there are too many unacknowledged
525
- // responses.
526
- //
527
- // Leave this field unset when creating a new stream. To resume a stream at
528
- // a specific point, set this field and the `stream_id` field.
529
- //
530
- // Leave this field unset when creating a new stream.
531
- bytes stream_token = 4;
532
-
533
- // Labels associated with this write request.
534
- map<string, string> labels = 5;
535
- }
536
-
537
- // The response for [Firestore.Write][google.firestore.v1.Firestore.Write].
538
- message WriteResponse {
539
- // The ID of the stream.
540
- // Only set on the first message, when a new stream was created.
541
- string stream_id = 1;
542
-
543
- // A token that represents the position of this response in the stream.
544
- // This can be used by a client to resume the stream at this point.
545
- //
546
- // This field is always set.
547
- bytes stream_token = 2;
548
-
549
- // The result of applying the writes.
550
- //
551
- // This i-th write result corresponds to the i-th write in the
552
- // request.
553
- repeated WriteResult write_results = 3;
554
-
555
- // The time at which the commit occurred.
556
- google.protobuf.Timestamp commit_time = 4;
557
- }
558
-
559
- // A request for [Firestore.Listen][google.firestore.v1.Firestore.Listen]
560
- message ListenRequest {
561
- // The database name. In the format:
562
- // `projects/{project_id}/databases/{database_id}`.
563
- string database = 1;
564
-
565
- // The supported target changes.
566
- oneof target_change {
567
- // A target to add to this stream.
568
- Target add_target = 2;
569
-
570
- // The ID of a target to remove from this stream.
571
- int32 remove_target = 3;
572
- }
573
-
574
- // Labels associated with this target change.
575
- map<string, string> labels = 4;
576
- }
577
-
578
- // The response for [Firestore.Listen][google.firestore.v1.Firestore.Listen].
579
- message ListenResponse {
580
- // The supported responses.
581
- oneof response_type {
582
- // Targets have changed.
583
- TargetChange target_change = 2;
584
-
585
- // A [Document][google.firestore.v1.Document] has changed.
586
- DocumentChange document_change = 3;
587
-
588
- // A [Document][google.firestore.v1.Document] has been deleted.
589
- DocumentDelete document_delete = 4;
590
-
591
- // A [Document][google.firestore.v1.Document] has been removed from a target (because it is no longer
592
- // relevant to that target).
593
- DocumentRemove document_remove = 6;
594
-
595
- // A filter to apply to the set of documents previously returned for the
596
- // given target.
597
- //
598
- // Returned when documents may have been removed from the given target, but
599
- // the exact documents are unknown.
600
- ExistenceFilter filter = 5;
601
- }
602
- }
603
-
604
- // A specification of a set of documents to listen to.
605
- message Target {
606
- // A target specified by a set of documents names.
607
- message DocumentsTarget {
608
- // The names of the documents to retrieve. In the format:
609
- // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
610
- // The request will fail if any of the document is not a child resource of
611
- // the given `database`. Duplicate names will be elided.
612
- repeated string documents = 2;
613
- }
614
-
615
- // A target specified by a query.
616
- message QueryTarget {
617
- // The parent resource name. In the format:
618
- // `projects/{project_id}/databases/{database_id}/documents` or
619
- // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
620
- // For example:
621
- // `projects/my-project/databases/my-database/documents` or
622
- // `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
623
- string parent = 1;
624
-
625
- // The query to run.
626
- oneof query_type {
627
- // A structured query.
628
- StructuredQuery structured_query = 2;
629
- }
630
- }
631
-
632
- // The type of target to listen to.
633
- oneof target_type {
634
- // A target specified by a query.
635
- QueryTarget query = 2;
636
-
637
- // A target specified by a set of document names.
638
- DocumentsTarget documents = 3;
639
- }
640
-
641
- // When to start listening.
642
- //
643
- // If not specified, all matching Documents are returned before any
644
- // subsequent changes.
645
- oneof resume_type {
646
- // A resume token from a prior [TargetChange][google.firestore.v1.TargetChange] for an identical target.
647
- //
648
- // Using a resume token with a different target is unsupported and may fail.
649
- bytes resume_token = 4;
650
-
651
- // Start listening after a specific `read_time`.
652
- //
653
- // The client must know the state of matching documents at this time.
654
- google.protobuf.Timestamp read_time = 11;
655
- }
656
-
657
- // A client provided target ID.
658
- //
659
- // If not set, the server will assign an ID for the target.
660
- //
661
- // Used for resuming a target without changing IDs. The IDs can either be
662
- // client-assigned or be server-assigned in a previous stream. All targets
663
- // with client provided IDs must be added before adding a target that needs
664
- // a server-assigned id.
665
- int32 target_id = 5;
666
-
667
- // If the target should be removed once it is current and consistent.
668
- bool once = 6;
669
- }
670
-
671
- // Targets being watched have changed.
672
- message TargetChange {
673
- // The type of change.
674
- enum TargetChangeType {
675
- // No change has occurred. Used only to send an updated `resume_token`.
676
- NO_CHANGE = 0;
677
-
678
- // The targets have been added.
679
- ADD = 1;
680
-
681
- // The targets have been removed.
682
- REMOVE = 2;
683
-
684
- // The targets reflect all changes committed before the targets were added
685
- // to the stream.
686
- //
687
- // This will be sent after or with a `read_time` that is greater than or
688
- // equal to the time at which the targets were added.
689
- //
690
- // Listeners can wait for this change if read-after-write semantics
691
- // are desired.
692
- CURRENT = 3;
693
-
694
- // The targets have been reset, and a new initial state for the targets
695
- // will be returned in subsequent changes.
696
- //
697
- // After the initial state is complete, `CURRENT` will be returned even
698
- // if the target was previously indicated to be `CURRENT`.
699
- RESET = 4;
700
- }
701
-
702
- // The type of change that occurred.
703
- TargetChangeType target_change_type = 1;
704
-
705
- // The target IDs of targets that have changed.
706
- //
707
- // If empty, the change applies to all targets.
708
- //
709
- // For `target_change_type=ADD`, the order of the target IDs matches the order
710
- // of the requests to add the targets. This allows clients to unambiguously
711
- // associate server-assigned target IDs with added targets.
712
- //
713
- // For other states, the order of the target IDs is not defined.
714
- repeated int32 target_ids = 2;
715
-
716
- // The error that resulted in this change, if applicable.
717
- google.rpc.Status cause = 3;
718
-
719
- // A token that can be used to resume the stream for the given `target_ids`,
720
- // or all targets if `target_ids` is empty.
721
- //
722
- // Not set on every target change.
723
- bytes resume_token = 4;
724
-
725
- // The consistent `read_time` for the given `target_ids` (omitted when the
726
- // target_ids are not at a consistent snapshot).
727
- //
728
- // The stream is guaranteed to send a `read_time` with `target_ids` empty
729
- // whenever the entire stream reaches a new consistent snapshot. ADD,
730
- // CURRENT, and RESET messages are guaranteed to (eventually) result in a
731
- // new consistent snapshot (while NO_CHANGE and REMOVE messages are not).
732
- //
733
- // For a given stream, `read_time` is guaranteed to be monotonically
734
- // increasing.
735
- google.protobuf.Timestamp read_time = 6;
736
- }
737
-
738
- // The request for [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds].
739
- message ListCollectionIdsRequest {
740
- // The parent document. In the format:
741
- // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
742
- // For example:
743
- // `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
744
- string parent = 1;
745
-
746
- // The maximum number of results to return.
747
- int32 page_size = 2;
748
-
749
- // A page token. Must be a value from
750
- // [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse].
751
- string page_token = 3;
752
- }
753
-
754
- // The response from [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds].
755
- message ListCollectionIdsResponse {
756
- // The collection ids.
757
- repeated string collection_ids = 1;
758
-
759
- // A page token that may be used to continue the list.
760
- string next_page_token = 2;
761
- }