@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,302 +0,0 @@
1
- // Copyright 2019 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/document.proto";
22
- import "google/protobuf/wrappers.proto";
23
-
24
- option csharp_namespace = "Google.Cloud.Firestore.V1";
25
- option go_package = "google.golang.org/genproto/googleapis/firestore/v1;firestore";
26
- option java_multiple_files = true;
27
- option java_outer_classname = "QueryProto";
28
- option java_package = "com.google.firestore.v1";
29
- option objc_class_prefix = "GCFS";
30
- option php_namespace = "Google\\Cloud\\Firestore\\V1";
31
-
32
-
33
- // A Firestore query.
34
- message StructuredQuery {
35
- // A selection of a collection, such as `messages as m1`.
36
- message CollectionSelector {
37
- // The collection ID.
38
- // When set, selects only collections with this ID.
39
- string collection_id = 2;
40
-
41
- // When false, selects only collections that are immediate children of
42
- // the `parent` specified in the containing `RunQueryRequest`.
43
- // When true, selects all descendant collections.
44
- bool all_descendants = 3;
45
- }
46
-
47
- // A filter.
48
- message Filter {
49
- // The type of filter.
50
- oneof filter_type {
51
- // A composite filter.
52
- CompositeFilter composite_filter = 1;
53
-
54
- // A filter on a document field.
55
- FieldFilter field_filter = 2;
56
-
57
- // A filter that takes exactly one argument.
58
- UnaryFilter unary_filter = 3;
59
- }
60
- }
61
-
62
- // A filter that merges multiple other filters using the given operator.
63
- message CompositeFilter {
64
- // A composite filter operator.
65
- enum Operator {
66
- // Unspecified. This value must not be used.
67
- OPERATOR_UNSPECIFIED = 0;
68
-
69
- // The results are required to satisfy each of the combined filters.
70
- AND = 1;
71
- }
72
-
73
- // The operator for combining multiple filters.
74
- Operator op = 1;
75
-
76
- // The list of filters to combine.
77
- // Must contain at least one filter.
78
- repeated Filter filters = 2;
79
- }
80
-
81
- // A filter on a specific field.
82
- message FieldFilter {
83
- // A field filter operator.
84
- enum Operator {
85
- // Unspecified. This value must not be used.
86
- OPERATOR_UNSPECIFIED = 0;
87
-
88
- // The given `field` is less than the given `value`.
89
- //
90
- // Requires:
91
- //
92
- // * That `field` come first in `order_by`.
93
- LESS_THAN = 1;
94
-
95
- // The given `field` is less than or equal to the given `value`.
96
- //
97
- // Requires:
98
- //
99
- // * That `field` come first in `order_by`.
100
- LESS_THAN_OR_EQUAL = 2;
101
-
102
- // The given `field` is greater than the given `value`.
103
- //
104
- // Requires:
105
- //
106
- // * That `field` come first in `order_by`.
107
- GREATER_THAN = 3;
108
-
109
- // The given `field` is greater than or equal to the given `value`.
110
- //
111
- // Requires:
112
- //
113
- // * That `field` come first in `order_by`.
114
- GREATER_THAN_OR_EQUAL = 4;
115
-
116
- // The given `field` is equal to the given `value`..
117
- EQUAL = 5;
118
-
119
- // The given `field` is not equal to the given `value`.
120
- //
121
- // Requires:
122
- //
123
- // * No other `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`.
124
- // * That `field` comes first in the `order_by`.
125
- NOT_EQUAL = 6;
126
-
127
- // The given `field` is an array that contains the given `value`.
128
- ARRAY_CONTAINS = 7;
129
-
130
- // The given `field` is equal to at least one value in the given array.
131
- //
132
- // Requires:
133
- //
134
- // * That `value` is a non-empty `ArrayValue` with at most 10 values.
135
- // * No other `IN` or `ARRAY_CONTAINS_ANY`. (-- or `NOT_IN` --)
136
- IN = 8;
137
-
138
- // The given `field` is an array that contains any of the values in the
139
- // given array.
140
- //
141
- // Requires:
142
- //
143
- // * That `value` is a non-empty `ArrayValue` with at most 10 values.
144
- // * No other `IN` or `ARRAY_CONTAINS_ANY`. (-- or `NOT_IN` --)
145
- ARRAY_CONTAINS_ANY = 9;
146
-
147
- // The value of the `field` is not in the given array.
148
- //
149
- // Requires:
150
- //
151
- // * That `value` is a non-empty `ArrayValue` with at most 10 values.
152
- // * No other `IN`, `ARRAY_CONTAINS_ANY`, `NOT_IN`, `NOT_EQUAL`,
153
- // `IS_NOT_NULL`, or `IS_NOT_NAN`.
154
- // * That `field` comes first in the `order_by`.
155
- NOT_IN = 10;
156
- }
157
-
158
- // The field to filter by.
159
- FieldReference field = 1;
160
-
161
- // The operator to filter by.
162
- Operator op = 2;
163
-
164
- // The value to compare to.
165
- Value value = 3;
166
- }
167
-
168
- // A filter with a single operand.
169
- message UnaryFilter {
170
- // A unary operator.
171
- enum Operator {
172
- // Unspecified. This value must not be used.
173
- OPERATOR_UNSPECIFIED = 0;
174
-
175
- // The given `field` is equal to `NaN`.
176
- IS_NAN = 2;
177
-
178
- // The given `field` is equal to `NULL`.
179
- IS_NULL = 3;
180
-
181
- // The given `field` is not equal to `NaN`.
182
- //
183
- // Requires:
184
- //
185
- // * No other `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`.
186
- // * That `field` comes first in the `order_by`.
187
- IS_NOT_NAN = 4;
188
-
189
- // The given `field` is not equal to `NULL`.
190
- //
191
- // Requires:
192
- //
193
- // * A single `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`.
194
- // * That `field` comes first in the `order_by`.
195
- IS_NOT_NULL = 5;
196
- }
197
-
198
- // The unary operator to apply.
199
- Operator op = 1;
200
-
201
- // The argument to the filter.
202
- oneof operand_type {
203
- // The field to which to apply the operator.
204
- FieldReference field = 2;
205
- }
206
- }
207
-
208
- // An order on a field.
209
- message Order {
210
- // The field to order by.
211
- FieldReference field = 1;
212
-
213
- // The direction to order by. Defaults to `ASCENDING`.
214
- Direction direction = 2;
215
- }
216
-
217
- // A reference to a field, such as `max(messages.time) as max_time`.
218
- message FieldReference {
219
- string field_path = 2;
220
- }
221
-
222
- // The projection of document's fields to return.
223
- message Projection {
224
- // The fields to return.
225
- //
226
- // If empty, all fields are returned. To only return the name
227
- // of the document, use `['__name__']`.
228
- repeated FieldReference fields = 2;
229
- }
230
-
231
- // A sort direction.
232
- enum Direction {
233
- // Unspecified.
234
- DIRECTION_UNSPECIFIED = 0;
235
-
236
- // Ascending.
237
- ASCENDING = 1;
238
-
239
- // Descending.
240
- DESCENDING = 2;
241
- }
242
-
243
- // The projection to return.
244
- Projection select = 1;
245
-
246
- // The collections to query.
247
- repeated CollectionSelector from = 2;
248
-
249
- // The filter to apply.
250
- Filter where = 3;
251
-
252
- // The order to apply to the query results.
253
- //
254
- // Firestore guarantees a stable ordering through the following rules:
255
- //
256
- // * Any field required to appear in `order_by`, that is not already
257
- // specified in `order_by`, is appended to the order in field name order
258
- // by default.
259
- // * If an order on `__name__` is not specified, it is appended by default.
260
- //
261
- // Fields are appended with the same sort direction as the last order
262
- // specified, or 'ASCENDING' if no order was specified. For example:
263
- //
264
- // * `SELECT * FROM Foo ORDER BY A` becomes
265
- // `SELECT * FROM Foo ORDER BY A, __name__`
266
- // * `SELECT * FROM Foo ORDER BY A DESC` becomes
267
- // `SELECT * FROM Foo ORDER BY A DESC, __name__ DESC`
268
- // * `SELECT * FROM Foo WHERE A > 1` becomes
269
- // `SELECT * FROM Foo WHERE A > 1 ORDER BY A, __name__`
270
- repeated Order order_by = 4;
271
-
272
- // A starting point for the query results.
273
- Cursor start_at = 7;
274
-
275
- // A end point for the query results.
276
- Cursor end_at = 8;
277
-
278
- // The number of results to skip.
279
- //
280
- // Applies before limit, but after all other constraints. Must be >= 0 if
281
- // specified.
282
- int32 offset = 6;
283
-
284
- // The maximum number of results to return.
285
- //
286
- // Applies after all other constraints.
287
- // Must be >= 0 if specified.
288
- google.protobuf.Int32Value limit = 5;
289
- }
290
-
291
- // A position in a query result set.
292
- message Cursor {
293
- // The values that represent a position, in the order they appear in
294
- // the order by clause of a query.
295
- //
296
- // Can contain fewer values than specified in the order by clause.
297
- repeated Value values = 1;
298
-
299
- // If the position is just before or just after the given values, relative
300
- // to the sort order defined by the query.
301
- bool before = 2;
302
- }
@@ -1,264 +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/protobuf/timestamp.proto";
24
-
25
- option csharp_namespace = "Google.Cloud.Firestore.V1";
26
- option go_package = "google.golang.org/genproto/googleapis/firestore/v1;firestore";
27
- option java_multiple_files = true;
28
- option java_outer_classname = "WriteProto";
29
- option java_package = "com.google.firestore.v1";
30
- option objc_class_prefix = "GCFS";
31
- option php_namespace = "Google\\Cloud\\Firestore\\V1";
32
-
33
-
34
- // A write on a document.
35
- message Write {
36
- // The operation to execute.
37
- oneof operation {
38
- // A document to write.
39
- Document update = 1;
40
-
41
- // A document name to delete. In the format:
42
- // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
43
- string delete = 2;
44
-
45
- // The name of a document on which to verify the `current_document`
46
- // precondition.
47
- // This only requires read access to the document.
48
- string verify = 5;
49
-
50
- // Applies a transformation to a document.
51
- DocumentTransform transform = 6;
52
- }
53
-
54
- // The fields to update in this write.
55
- //
56
- // This field can be set only when the operation is `update`.
57
- // If the mask is not set for an `update` and the document exists, any
58
- // existing data will be overwritten.
59
- // If the mask is set and the document on the server has fields not covered by
60
- // the mask, they are left unchanged.
61
- // Fields referenced in the mask, but not present in the input document, are
62
- // deleted from the document on the server.
63
- // The field paths in this mask must not contain a reserved field name.
64
- DocumentMask update_mask = 3;
65
-
66
- // The transforms to perform after update.
67
- //
68
- // This field can be set only when the operation is `update`. If present, this
69
- // write is equivalent to performing `update` and `transform` to the same
70
- // document atomically and in order.
71
- repeated DocumentTransform.FieldTransform update_transforms = 7;
72
-
73
- // An optional precondition on the document.
74
- //
75
- // The write will fail if this is set and not met by the target document.
76
- Precondition current_document = 4;
77
- }
78
-
79
- // A transformation of a document.
80
- message DocumentTransform {
81
- // A transformation of a field of the document.
82
- message FieldTransform {
83
- // A value that is calculated by the server.
84
- enum ServerValue {
85
- // Unspecified. This value must not be used.
86
- SERVER_VALUE_UNSPECIFIED = 0;
87
-
88
- // The time at which the server processed the request, with millisecond
89
- // precision.
90
- REQUEST_TIME = 1;
91
- }
92
-
93
- // The path of the field. See [Document.fields][google.firestore.v1.Document.fields] for the field path syntax
94
- // reference.
95
- string field_path = 1;
96
-
97
- // The transformation to apply on the field.
98
- oneof transform_type {
99
- // Sets the field to the given server value.
100
- ServerValue set_to_server_value = 2;
101
-
102
- // Adds the given value to the field's current value.
103
- //
104
- // This must be an integer or a double value.
105
- // If the field is not an integer or double, or if the field does not yet
106
- // exist, the transformation will set the field to the given value.
107
- // If either of the given value or the current field value are doubles,
108
- // both values will be interpreted as doubles. Double arithmetic and
109
- // representation of double values follow IEEE 754 semantics.
110
- // If there is positive/negative integer overflow, the field is resolved
111
- // to the largest magnitude positive/negative integer.
112
- Value increment = 3;
113
-
114
- // Sets the field to the maximum of its current value and the given value.
115
- //
116
- // This must be an integer or a double value.
117
- // If the field is not an integer or double, or if the field does not yet
118
- // exist, the transformation will set the field to the given value.
119
- // If a maximum operation is applied where the field and the input value
120
- // are of mixed types (that is - one is an integer and one is a double)
121
- // the field takes on the type of the larger operand. If the operands are
122
- // equivalent (e.g. 3 and 3.0), the field does not change.
123
- // 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and
124
- // zero input value is always the stored value.
125
- // The maximum of any numeric value x and NaN is NaN.
126
- Value maximum = 4;
127
-
128
- // Sets the field to the minimum of its current value and the given value.
129
- //
130
- // This must be an integer or a double value.
131
- // If the field is not an integer or double, or if the field does not yet
132
- // exist, the transformation will set the field to the input value.
133
- // If a minimum operation is applied where the field and the input value
134
- // are of mixed types (that is - one is an integer and one is a double)
135
- // the field takes on the type of the smaller operand. If the operands are
136
- // equivalent (e.g. 3 and 3.0), the field does not change.
137
- // 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and
138
- // zero input value is always the stored value.
139
- // The minimum of any numeric value x and NaN is NaN.
140
- Value minimum = 5;
141
-
142
- // Append the given elements in order if they are not already present in
143
- // the current field value.
144
- // If the field is not an array, or if the field does not yet exist, it is
145
- // first set to the empty array.
146
- //
147
- // Equivalent numbers of different types (e.g. 3L and 3.0) are
148
- // considered equal when checking if a value is missing.
149
- // NaN is equal to NaN, and Null is equal to Null.
150
- // If the input contains multiple equivalent values, only the first will
151
- // be considered.
152
- //
153
- // The corresponding transform_result will be the null value.
154
- ArrayValue append_missing_elements = 6;
155
-
156
- // Remove all of the given elements from the array in the field.
157
- // If the field is not an array, or if the field does not yet exist, it is
158
- // set to the empty array.
159
- //
160
- // Equivalent numbers of the different types (e.g. 3L and 3.0) are
161
- // considered equal when deciding whether an element should be removed.
162
- // NaN is equal to NaN, and Null is equal to Null.
163
- // This will remove all equivalent values if there are duplicates.
164
- //
165
- // The corresponding transform_result will be the null value.
166
- ArrayValue remove_all_from_array = 7;
167
- }
168
- }
169
-
170
- // The name of the document to transform.
171
- string document = 1;
172
-
173
- // The list of transformations to apply to the fields of the document, in
174
- // order.
175
- // This must not be empty.
176
- repeated FieldTransform field_transforms = 2;
177
- }
178
-
179
- // The result of applying a write.
180
- message WriteResult {
181
- // The last update time of the document after applying the write. Not set
182
- // after a `delete`.
183
- //
184
- // If the write did not actually change the document, this will be the
185
- // previous update_time.
186
- google.protobuf.Timestamp update_time = 1;
187
-
188
- // The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
189
- // same order.
190
- repeated Value transform_results = 2;
191
- }
192
-
193
- // A [Document][google.firestore.v1.Document] has changed.
194
- //
195
- // May be the result of multiple [writes][google.firestore.v1.Write], including deletes, that
196
- // ultimately resulted in a new value for the [Document][google.firestore.v1.Document].
197
- //
198
- // Multiple [DocumentChange][google.firestore.v1.DocumentChange] messages may be returned for the same logical
199
- // change, if multiple targets are affected.
200
- message DocumentChange {
201
- // The new state of the [Document][google.firestore.v1.Document].
202
- //
203
- // If `mask` is set, contains only fields that were updated or added.
204
- Document document = 1;
205
-
206
- // A set of target IDs of targets that match this document.
207
- repeated int32 target_ids = 5;
208
-
209
- // A set of target IDs for targets that no longer match this document.
210
- repeated int32 removed_target_ids = 6;
211
- }
212
-
213
- // A [Document][google.firestore.v1.Document] has been deleted.
214
- //
215
- // May be the result of multiple [writes][google.firestore.v1.Write], including updates, the
216
- // last of which deleted the [Document][google.firestore.v1.Document].
217
- //
218
- // Multiple [DocumentDelete][google.firestore.v1.DocumentDelete] messages may be returned for the same logical
219
- // delete, if multiple targets are affected.
220
- message DocumentDelete {
221
- // The resource name of the [Document][google.firestore.v1.Document] that was 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 the targets.
234
- //
235
- // Sent if the document is no longer relevant to a target and is out of view.
236
- // Can be sent instead of a DocumentDelete or a DocumentChange if the server
237
- // can not send the new value of the document.
238
- //
239
- // Multiple [DocumentRemove][google.firestore.v1.DocumentRemove] messages may be returned for the same logical
240
- // write or delete, if multiple targets are affected.
241
- message DocumentRemove {
242
- // The resource name of the [Document][google.firestore.v1.Document] that has gone out of view.
243
- string document = 1;
244
-
245
- // A set of target IDs for targets that previously matched this document.
246
- repeated int32 removed_target_ids = 2;
247
-
248
- // The read timestamp at which the remove was observed.
249
- //
250
- // Greater or equal to the `commit_time` of the change/delete/remove.
251
- google.protobuf.Timestamp read_time = 4;
252
- }
253
-
254
- // A digest of all the documents that match a given target.
255
- message ExistenceFilter {
256
- // The target ID to which this filter applies.
257
- int32 target_id = 1;
258
-
259
- // The total count of documents that match [target_id][google.firestore.v1.ExistenceFilter.target_id].
260
- //
261
- // If different from the count of documents in the client that match, the
262
- // client must manually determine which documents no longer match the target.
263
- int32 count = 2;
264
- }