@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,31 +0,0 @@
1
- // Copyright (c) 2015, Google Inc.
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.api;
18
-
19
- import "google/api/http.proto";
20
- import "google/protobuf/descriptor.proto";
21
-
22
- option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
23
- option java_multiple_files = true;
24
- option java_outer_classname = "AnnotationsProto";
25
- option java_package = "com.google.api";
26
- option objc_class_prefix = "GAPI";
27
-
28
- extend google.protobuf.MethodOptions {
29
- // See `HttpRule`.
30
- HttpRule http = 72295728;
31
- }
@@ -1,370 +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.api;
19
-
20
- option cc_enable_arenas = true;
21
- option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
22
- option java_multiple_files = true;
23
- option java_outer_classname = "HttpProto";
24
- option java_package = "com.google.api";
25
- option objc_class_prefix = "GAPI";
26
-
27
-
28
- // Defines the HTTP configuration for an API service. It contains a list of
29
- // [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
30
- // to one or more HTTP REST API methods.
31
- message Http {
32
- // A list of HTTP configuration rules that apply to individual API methods.
33
- //
34
- // **NOTE:** All service configuration rules follow "last one wins" order.
35
- repeated HttpRule rules = 1;
36
-
37
- // When set to true, URL path parmeters will be fully URI-decoded except in
38
- // cases of single segment matches in reserved expansion, where "%2F" will be
39
- // left encoded.
40
- //
41
- // The default behavior is to not decode RFC 6570 reserved characters in multi
42
- // segment matches.
43
- bool fully_decode_reserved_expansion = 2;
44
- }
45
-
46
- // # gRPC Transcoding
47
- //
48
- // gRPC Transcoding is a feature for mapping between a gRPC method and one or
49
- // more HTTP REST endpoints. It allows developers to build a single API service
50
- // that supports both gRPC APIs and REST APIs. Many systems, including [Google
51
- // APIs](https://github.com/googleapis/googleapis),
52
- // [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC
53
- // Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
54
- // and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature
55
- // and use it for large scale production services.
56
- //
57
- // `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
58
- // how different portions of the gRPC request message are mapped to the URL
59
- // path, URL query parameters, and HTTP request body. It also controls how the
60
- // gRPC response message is mapped to the HTTP response body. `HttpRule` is
61
- // typically specified as an `google.api.http` annotation on the gRPC method.
62
- //
63
- // Each mapping specifies a URL path template and an HTTP method. The path
64
- // template may refer to one or more fields in the gRPC request message, as long
65
- // as each field is a non-repeated field with a primitive (non-message) type.
66
- // The path template controls how fields of the request message are mapped to
67
- // the URL path.
68
- //
69
- // Example:
70
- //
71
- // service Messaging {
72
- // rpc GetMessage(GetMessageRequest) returns (Message) {
73
- // option (google.api.http) = {
74
- // get: "/v1/{name=messages/*}"
75
- // };
76
- // }
77
- // }
78
- // message GetMessageRequest {
79
- // string name = 1; // Mapped to URL path.
80
- // }
81
- // message Message {
82
- // string text = 1; // The resource content.
83
- // }
84
- //
85
- // This enables an HTTP REST to gRPC mapping as below:
86
- //
87
- // HTTP | gRPC
88
- // -----|-----
89
- // `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")`
90
- //
91
- // Any fields in the request message which are not bound by the path template
92
- // automatically become HTTP query parameters if there is no HTTP request body.
93
- // For example:
94
- //
95
- // service Messaging {
96
- // rpc GetMessage(GetMessageRequest) returns (Message) {
97
- // option (google.api.http) = {
98
- // get:"/v1/messages/{message_id}"
99
- // };
100
- // }
101
- // }
102
- // message GetMessageRequest {
103
- // message SubMessage {
104
- // string subfield = 1;
105
- // }
106
- // string message_id = 1; // Mapped to URL path.
107
- // int64 revision = 2; // Mapped to URL query parameter `revision`.
108
- // SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`.
109
- // }
110
- //
111
- // This enables a HTTP JSON to RPC mapping as below:
112
- //
113
- // HTTP | gRPC
114
- // -----|-----
115
- // `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))`
116
- //
117
- // Note that fields which are mapped to URL query parameters must have a
118
- // primitive type or a repeated primitive type or a non-repeated message type.
119
- // In the case of a repeated type, the parameter can be repeated in the URL
120
- // as `...?param=A&param=B`. In the case of a message type, each field of the
121
- // message is mapped to a separate parameter, such as
122
- // `...?foo.a=A&foo.b=B&foo.c=C`.
123
- //
124
- // For HTTP methods that allow a request body, the `body` field
125
- // specifies the mapping. Consider a REST update method on the
126
- // message resource collection:
127
- //
128
- // service Messaging {
129
- // rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
130
- // option (google.api.http) = {
131
- // patch: "/v1/messages/{message_id}"
132
- // body: "message"
133
- // };
134
- // }
135
- // }
136
- // message UpdateMessageRequest {
137
- // string message_id = 1; // mapped to the URL
138
- // Message message = 2; // mapped to the body
139
- // }
140
- //
141
- // The following HTTP JSON to RPC mapping is enabled, where the
142
- // representation of the JSON in the request body is determined by
143
- // protos JSON encoding:
144
- //
145
- // HTTP | gRPC
146
- // -----|-----
147
- // `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
148
- //
149
- // The special name `*` can be used in the body mapping to define that
150
- // every field not bound by the path template should be mapped to the
151
- // request body. This enables the following alternative definition of
152
- // the update method:
153
- //
154
- // service Messaging {
155
- // rpc UpdateMessage(Message) returns (Message) {
156
- // option (google.api.http) = {
157
- // patch: "/v1/messages/{message_id}"
158
- // body: "*"
159
- // };
160
- // }
161
- // }
162
- // message Message {
163
- // string message_id = 1;
164
- // string text = 2;
165
- // }
166
- //
167
- //
168
- // The following HTTP JSON to RPC mapping is enabled:
169
- //
170
- // HTTP | gRPC
171
- // -----|-----
172
- // `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")`
173
- //
174
- // Note that when using `*` in the body mapping, it is not possible to
175
- // have HTTP parameters, as all fields not bound by the path end in
176
- // the body. This makes this option more rarely used in practice when
177
- // defining REST APIs. The common usage of `*` is in custom methods
178
- // which don't use the URL at all for transferring data.
179
- //
180
- // It is possible to define multiple HTTP methods for one RPC by using
181
- // the `additional_bindings` option. Example:
182
- //
183
- // service Messaging {
184
- // rpc GetMessage(GetMessageRequest) returns (Message) {
185
- // option (google.api.http) = {
186
- // get: "/v1/messages/{message_id}"
187
- // additional_bindings {
188
- // get: "/v1/users/{user_id}/messages/{message_id}"
189
- // }
190
- // };
191
- // }
192
- // }
193
- // message GetMessageRequest {
194
- // string message_id = 1;
195
- // string user_id = 2;
196
- // }
197
- //
198
- // This enables the following two alternative HTTP JSON to RPC mappings:
199
- //
200
- // HTTP | gRPC
201
- // -----|-----
202
- // `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
203
- // `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")`
204
- //
205
- // ## Rules for HTTP mapping
206
- //
207
- // 1. Leaf request fields (recursive expansion nested messages in the request
208
- // message) are classified into three categories:
209
- // - Fields referred by the path template. They are passed via the URL path.
210
- // - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP
211
- // request body.
212
- // - All other fields are passed via the URL query parameters, and the
213
- // parameter name is the field path in the request message. A repeated
214
- // field can be represented as multiple query parameters under the same
215
- // name.
216
- // 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields
217
- // are passed via URL path and HTTP request body.
218
- // 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all
219
- // fields are passed via URL path and URL query parameters.
220
- //
221
- // ### Path template syntax
222
- //
223
- // Template = "/" Segments [ Verb ] ;
224
- // Segments = Segment { "/" Segment } ;
225
- // Segment = "*" | "**" | LITERAL | Variable ;
226
- // Variable = "{" FieldPath [ "=" Segments ] "}" ;
227
- // FieldPath = IDENT { "." IDENT } ;
228
- // Verb = ":" LITERAL ;
229
- //
230
- // The syntax `*` matches a single URL path segment. The syntax `**` matches
231
- // zero or more URL path segments, which must be the last part of the URL path
232
- // except the `Verb`.
233
- //
234
- // The syntax `Variable` matches part of the URL path as specified by its
235
- // template. A variable template must not contain other variables. If a variable
236
- // matches a single path segment, its template may be omitted, e.g. `{var}`
237
- // is equivalent to `{var=*}`.
238
- //
239
- // The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
240
- // contains any reserved character, such characters should be percent-encoded
241
- // before the matching.
242
- //
243
- // If a variable contains exactly one path segment, such as `"{var}"` or
244
- // `"{var=*}"`, when such a variable is expanded into a URL path on the client
245
- // side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The
246
- // server side does the reverse decoding. Such variables show up in the
247
- // [Discovery Document](https://developers.google.com/discovery/v1/reference/apis)
248
- // as `{var}`.
249
- //
250
- // If a variable contains multiple path segments, such as `"{var=foo/*}"`
251
- // or `"{var=**}"`, when such a variable is expanded into a URL path on the
252
- // client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.
253
- // The server side does the reverse decoding, except "%2F" and "%2f" are left
254
- // unchanged. Such variables show up in the
255
- // [Discovery Document](https://developers.google.com/discovery/v1/reference/apis)
256
- // as `{+var}`.
257
- //
258
- // ## Using gRPC API Service Configuration
259
- //
260
- // gRPC API Service Configuration (service config) is a configuration language
261
- // for configuring a gRPC service to become a user-facing product. The
262
- // service config is simply the YAML representation of the `google.api.Service`
263
- // proto message.
264
- //
265
- // As an alternative to annotating your proto file, you can configure gRPC
266
- // transcoding in your service config YAML files. You do this by specifying a
267
- // `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
268
- // effect as the proto annotation. This can be particularly useful if you
269
- // have a proto that is reused in multiple services. Note that any transcoding
270
- // specified in the service config will override any matching transcoding
271
- // configuration in the proto.
272
- //
273
- // Example:
274
- //
275
- // http:
276
- // rules:
277
- // # Selects a gRPC method and applies HttpRule to it.
278
- // - selector: example.v1.Messaging.GetMessage
279
- // get: /v1/messages/{message_id}/{sub.subfield}
280
- //
281
- // ## Special notes
282
- //
283
- // When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
284
- // proto to JSON conversion must follow the [proto3
285
- // specification](https://developers.google.com/protocol-buffers/docs/proto3#json).
286
- //
287
- // While the single segment variable follows the semantics of
288
- // [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
289
- // Expansion, the multi segment variable **does not** follow RFC 6570 Section
290
- // 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
291
- // does not expand special characters like `?` and `#`, which would lead
292
- // to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
293
- // for multi segment variables.
294
- //
295
- // The path variables **must not** refer to any repeated or mapped field,
296
- // because client libraries are not capable of handling such variable expansion.
297
- //
298
- // The path variables **must not** capture the leading "/" character. The reason
299
- // is that the most common use case "{var}" does not capture the leading "/"
300
- // character. For consistency, all path variables must share the same behavior.
301
- //
302
- // Repeated message fields must not be mapped to URL query parameters, because
303
- // no client library can support such complicated mapping.
304
- //
305
- // If an API needs to use a JSON array for request or response body, it can map
306
- // the request or response body to a repeated field. However, some gRPC
307
- // Transcoding implementations may not support this feature.
308
- message HttpRule {
309
- // Selects a method to which this rule applies.
310
- //
311
- // Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
312
- string selector = 1;
313
-
314
- // Determines the URL pattern is matched by this rules. This pattern can be
315
- // used with any of the {get|put|post|delete|patch} methods. A custom method
316
- // can be defined using the 'custom' field.
317
- oneof pattern {
318
- // Maps to HTTP GET. Used for listing and getting information about
319
- // resources.
320
- string get = 2;
321
-
322
- // Maps to HTTP PUT. Used for replacing a resource.
323
- string put = 3;
324
-
325
- // Maps to HTTP POST. Used for creating a resource or performing an action.
326
- string post = 4;
327
-
328
- // Maps to HTTP DELETE. Used for deleting a resource.
329
- string delete = 5;
330
-
331
- // Maps to HTTP PATCH. Used for updating a resource.
332
- string patch = 6;
333
-
334
- // The custom pattern is used for specifying an HTTP method that is not
335
- // included in the `pattern` field, such as HEAD, or "*" to leave the
336
- // HTTP method unspecified for this rule. The wild-card rule is useful
337
- // for services that provide content to Web (HTML) clients.
338
- CustomHttpPattern custom = 8;
339
- }
340
-
341
- // The name of the request field whose value is mapped to the HTTP request
342
- // body, or `*` for mapping all request fields not captured by the path
343
- // pattern to the HTTP body, or omitted for not having any HTTP request body.
344
- //
345
- // NOTE: the referred field must be present at the top-level of the request
346
- // message type.
347
- string body = 7;
348
-
349
- // Optional. The name of the response field whose value is mapped to the HTTP
350
- // response body. When omitted, the entire response message will be used
351
- // as the HTTP response body.
352
- //
353
- // NOTE: The referred field must be present at the top-level of the response
354
- // message type.
355
- string response_body = 12;
356
-
357
- // Additional HTTP bindings for the selector. Nested bindings must
358
- // not contain an `additional_bindings` field themselves (that is,
359
- // the nesting may only be one level deep).
360
- repeated HttpRule additional_bindings = 11;
361
- }
362
-
363
- // A custom pattern is used for defining custom HTTP verb.
364
- message CustomHttpPattern {
365
- // The name of this custom HTTP verb.
366
- string kind = 1;
367
-
368
- // The path matched by this custom verb.
369
- string path = 2;
370
- }
@@ -1,84 +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/protobuf/timestamp.proto";
22
-
23
- option csharp_namespace = "Google.Cloud.Firestore.V1";
24
- option go_package = "google.golang.org/genproto/googleapis/firestore/v1;firestore";
25
- option java_multiple_files = true;
26
- option java_outer_classname = "CommonProto";
27
- option java_package = "com.google.firestore.v1";
28
- option objc_class_prefix = "GCFS";
29
- option php_namespace = "Google\\Cloud\\Firestore\\V1";
30
-
31
-
32
- // A set of field paths on a document.
33
- // Used to restrict a get or update operation on a document to a subset of its
34
- // fields.
35
- // This is different from standard field masks, as this is always scoped to a
36
- // [Document][google.firestore.v1.Document], and takes in account the dynamic nature of [Value][google.firestore.v1.Value].
37
- message DocumentMask {
38
- // The list of field paths in the mask. See [Document.fields][google.firestore.v1.Document.fields] for a field
39
- // path syntax reference.
40
- repeated string field_paths = 1;
41
- }
42
-
43
- // A precondition on a document, used for conditional operations.
44
- message Precondition {
45
- // The type of precondition.
46
- oneof condition_type {
47
- // When set to `true`, the target document must exist.
48
- // When set to `false`, the target document must not exist.
49
- bool exists = 1;
50
-
51
- // When set, the target document must exist and have been last updated at
52
- // that time.
53
- google.protobuf.Timestamp update_time = 2;
54
- }
55
- }
56
-
57
- // Options for creating a new transaction.
58
- message TransactionOptions {
59
- // Options for a transaction that can be used to read and write documents.
60
- message ReadWrite {
61
- // An optional transaction to retry.
62
- bytes retry_transaction = 1;
63
- }
64
-
65
- // Options for a transaction that can only be used to read documents.
66
- message ReadOnly {
67
- // The consistency mode for this transaction. If not set, defaults to strong
68
- // consistency.
69
- oneof consistency_selector {
70
- // Reads documents at the given time.
71
- // This may not be older than 60 seconds.
72
- google.protobuf.Timestamp read_time = 2;
73
- }
74
- }
75
-
76
- // The mode of the transaction.
77
- oneof mode {
78
- // The transaction can only be used for read operations.
79
- ReadOnly read_only = 2;
80
-
81
- // The transaction can be used for both read and write operations.
82
- ReadWrite read_write = 3;
83
- }
84
- }
@@ -1,151 +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/protobuf/struct.proto";
22
- import "google/protobuf/timestamp.proto";
23
- import "google/type/latlng.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 = "DocumentProto";
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 Firestore document.
35
- //
36
- // Must not exceed 1 MiB - 4 bytes.
37
- message Document {
38
- // The resource name of the document, for example
39
- // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
40
- string name = 1;
41
-
42
- // The document's fields.
43
- //
44
- // The map keys represent field names.
45
- //
46
- // A simple field name contains only characters `a` to `z`, `A` to `Z`,
47
- // `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
48
- // `foo_bar_17`.
49
- //
50
- // Field names matching the regular expression `__.*__` are reserved. Reserved
51
- // field names are forbidden except in certain documented contexts. The map
52
- // keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
53
- // empty.
54
- //
55
- // Field paths may be used in other contexts to refer to structured fields
56
- // defined here. For `map_value`, the field path is represented by the simple
57
- // or quoted field names of the containing fields, delimited by `.`. For
58
- // example, the structured field
59
- // `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
60
- // represented by the field path `foo.x&y`.
61
- //
62
- // Within a field path, a quoted field name starts and ends with `` ` `` and
63
- // may contain any character. Some characters, including `` ` ``, must be
64
- // escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
65
- // `` `bak\`tik` `` represents `` bak`tik ``.
66
- map<string, Value> fields = 2;
67
-
68
- // Output only. The time at which the document was created.
69
- //
70
- // This value increases monotonically when a document is deleted then
71
- // recreated. It can also be compared to values from other documents and
72
- // the `read_time` of a query.
73
- google.protobuf.Timestamp create_time = 3;
74
-
75
- // Output only. The time at which the document was last changed.
76
- //
77
- // This value is initially set to the `create_time` then increases
78
- // monotonically with each change to the document. It can also be
79
- // compared to values from other documents and the `read_time` of a query.
80
- google.protobuf.Timestamp update_time = 4;
81
- }
82
-
83
- // A message that can hold any of the supported value types.
84
- message Value {
85
- // Must have a value set.
86
- oneof value_type {
87
- // A null value.
88
- google.protobuf.NullValue null_value = 11;
89
-
90
- // A boolean value.
91
- bool boolean_value = 1;
92
-
93
- // An integer value.
94
- int64 integer_value = 2;
95
-
96
- // A double value.
97
- double double_value = 3;
98
-
99
- // A timestamp value.
100
- //
101
- // Precise only to microseconds. When stored, any additional precision is
102
- // rounded down.
103
- google.protobuf.Timestamp timestamp_value = 10;
104
-
105
- // A string value.
106
- //
107
- // The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
108
- // Only the first 1,500 bytes of the UTF-8 representation are considered by
109
- // queries.
110
- string string_value = 17;
111
-
112
- // A bytes value.
113
- //
114
- // Must not exceed 1 MiB - 89 bytes.
115
- // Only the first 1,500 bytes are considered by queries.
116
- bytes bytes_value = 18;
117
-
118
- // A reference to a document. For example:
119
- // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
120
- string reference_value = 5;
121
-
122
- // A geo point value representing a point on the surface of Earth.
123
- google.type.LatLng geo_point_value = 8;
124
-
125
- // An array value.
126
- //
127
- // Cannot directly contain another array value, though can contain an
128
- // map which contains another array.
129
- ArrayValue array_value = 9;
130
-
131
- // A map value.
132
- MapValue map_value = 6;
133
- }
134
- }
135
-
136
- // An array value.
137
- message ArrayValue {
138
- // Values in the array.
139
- repeated Value values = 1;
140
- }
141
-
142
- // A map value.
143
- message MapValue {
144
- // The map's fields.
145
- //
146
- // The map keys represent field names. Field names matching the regular
147
- // expression `__.*__` are reserved. Reserved field names are forbidden except
148
- // in certain documented contexts. The map keys, represented as UTF-8, must
149
- // not exceed 1,500 bytes and cannot be empty.
150
- map<string, Value> fields = 1;
151
- }