@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,52 +0,0 @@
1
- // Protocol Buffers - Google's data interchange format
2
- // Copyright 2008 Google Inc. All rights reserved.
3
- // https://developers.google.com/protocol-buffers/
4
- //
5
- // Redistribution and use in source and binary forms, with or without
6
- // modification, are permitted provided that the following conditions are
7
- // met:
8
- //
9
- // * Redistributions of source code must retain the above copyright
10
- // notice, this list of conditions and the following disclaimer.
11
- // * Redistributions in binary form must reproduce the above
12
- // copyright notice, this list of conditions and the following disclaimer
13
- // in the documentation and/or other materials provided with the
14
- // distribution.
15
- // * Neither the name of Google Inc. nor the names of its
16
- // contributors may be used to endorse or promote products derived from
17
- // this software without specific prior written permission.
18
- //
19
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
-
31
- syntax = "proto3";
32
-
33
- package google.protobuf;
34
-
35
- option csharp_namespace = "Google.Protobuf.WellKnownTypes";
36
- option go_package = "github.com/golang/protobuf/ptypes/empty";
37
- option java_package = "com.google.protobuf";
38
- option java_outer_classname = "EmptyProto";
39
- option java_multiple_files = true;
40
- option objc_class_prefix = "GPB";
41
- option cc_enable_arenas = true;
42
-
43
- // A generic empty message that you can re-use to avoid defining duplicated
44
- // empty messages in your APIs. A typical example is to use it as the request
45
- // or the response type of an API method. For instance:
46
- //
47
- // service Foo {
48
- // rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
49
- // }
50
- //
51
- // The JSON representation for `Empty` is empty JSON object `{}`.
52
- message Empty {}
@@ -1,96 +0,0 @@
1
- // Protocol Buffers - Google's data interchange format
2
- // Copyright 2008 Google Inc. All rights reserved.
3
- // https://developers.google.com/protocol-buffers/
4
- //
5
- // Redistribution and use in source and binary forms, with or without
6
- // modification, are permitted provided that the following conditions are
7
- // met:
8
- //
9
- // * Redistributions of source code must retain the above copyright
10
- // notice, this list of conditions and the following disclaimer.
11
- // * Redistributions in binary form must reproduce the above
12
- // copyright notice, this list of conditions and the following disclaimer
13
- // in the documentation and/or other materials provided with the
14
- // distribution.
15
- // * Neither the name of Google Inc. nor the names of its
16
- // contributors may be used to endorse or promote products derived from
17
- // this software without specific prior written permission.
18
- //
19
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
-
31
- syntax = "proto3";
32
-
33
- package google.protobuf;
34
-
35
- option csharp_namespace = "Google.Protobuf.WellKnownTypes";
36
- option cc_enable_arenas = true;
37
- option go_package = "github.com/golang/protobuf/ptypes/struct;structpb";
38
- option java_package = "com.google.protobuf";
39
- option java_outer_classname = "StructProto";
40
- option java_multiple_files = true;
41
- option objc_class_prefix = "GPB";
42
-
43
-
44
- // `Struct` represents a structured data value, consisting of fields
45
- // which map to dynamically typed values. In some languages, `Struct`
46
- // might be supported by a native representation. For example, in
47
- // scripting languages like JS a struct is represented as an
48
- // object. The details of that representation are described together
49
- // with the proto support for the language.
50
- //
51
- // The JSON representation for `Struct` is JSON object.
52
- message Struct {
53
- // Unordered map of dynamically typed values.
54
- map<string, Value> fields = 1;
55
- }
56
-
57
- // `Value` represents a dynamically typed value which can be either
58
- // null, a number, a string, a boolean, a recursive struct value, or a
59
- // list of values. A producer of value is expected to set one of that
60
- // variants, absence of any variant indicates an error.
61
- //
62
- // The JSON representation for `Value` is JSON value.
63
- message Value {
64
- // The kind of value.
65
- oneof kind {
66
- // Represents a null value.
67
- NullValue null_value = 1;
68
- // Represents a double value.
69
- double number_value = 2;
70
- // Represents a string value.
71
- string string_value = 3;
72
- // Represents a boolean value.
73
- bool bool_value = 4;
74
- // Represents a structured value.
75
- Struct struct_value = 5;
76
- // Represents a repeated `Value`.
77
- ListValue list_value = 6;
78
- }
79
- }
80
-
81
- // `NullValue` is a singleton enumeration to represent the null value for the
82
- // `Value` type union.
83
- //
84
- // The JSON representation for `NullValue` is JSON `null`.
85
- enum NullValue {
86
- // Null value.
87
- NULL_VALUE = 0;
88
- }
89
-
90
- // `ListValue` is a wrapper around a repeated field of values.
91
- //
92
- // The JSON representation for `ListValue` is JSON array.
93
- message ListValue {
94
- // Repeated field of dynamically typed values.
95
- repeated Value values = 1;
96
- }
@@ -1,137 +0,0 @@
1
- // Protocol Buffers - Google's data interchange format
2
- // Copyright 2008 Google Inc. All rights reserved.
3
- // https://developers.google.com/protocol-buffers/
4
- //
5
- // Redistribution and use in source and binary forms, with or without
6
- // modification, are permitted provided that the following conditions are
7
- // met:
8
- //
9
- // * Redistributions of source code must retain the above copyright
10
- // notice, this list of conditions and the following disclaimer.
11
- // * Redistributions in binary form must reproduce the above
12
- // copyright notice, this list of conditions and the following disclaimer
13
- // in the documentation and/or other materials provided with the
14
- // distribution.
15
- // * Neither the name of Google Inc. nor the names of its
16
- // contributors may be used to endorse or promote products derived from
17
- // this software without specific prior written permission.
18
- //
19
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
-
31
- syntax = "proto3";
32
-
33
- package google.protobuf;
34
-
35
- option csharp_namespace = "Google.Protobuf.WellKnownTypes";
36
- option cc_enable_arenas = true;
37
- option go_package = "github.com/golang/protobuf/ptypes/timestamp";
38
- option java_package = "com.google.protobuf";
39
- option java_outer_classname = "TimestampProto";
40
- option java_multiple_files = true;
41
- option objc_class_prefix = "GPB";
42
-
43
- // A Timestamp represents a point in time independent of any time zone or local
44
- // calendar, encoded as a count of seconds and fractions of seconds at
45
- // nanosecond resolution. The count is relative to an epoch at UTC midnight on
46
- // January 1, 1970, in the proleptic Gregorian calendar which extends the
47
- // Gregorian calendar backwards to year one.
48
- //
49
- // All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
50
- // second table is needed for interpretation, using a [24-hour linear
51
- // smear](https://developers.google.com/time/smear).
52
- //
53
- // The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
54
- // restricting to that range, we ensure that we can convert to and from [RFC
55
- // 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
56
- //
57
- // # Examples
58
- //
59
- // Example 1: Compute Timestamp from POSIX `time()`.
60
- //
61
- // Timestamp timestamp;
62
- // timestamp.set_seconds(time(NULL));
63
- // timestamp.set_nanos(0);
64
- //
65
- // Example 2: Compute Timestamp from POSIX `gettimeofday()`.
66
- //
67
- // struct timeval tv;
68
- // gettimeofday(&tv, NULL);
69
- //
70
- // Timestamp timestamp;
71
- // timestamp.set_seconds(tv.tv_sec);
72
- // timestamp.set_nanos(tv.tv_usec * 1000);
73
- //
74
- // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
75
- //
76
- // FILETIME ft;
77
- // GetSystemTimeAsFileTime(&ft);
78
- // UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
79
- //
80
- // // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
81
- // // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
82
- // Timestamp timestamp;
83
- // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
84
- // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
85
- //
86
- // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
87
- //
88
- // long millis = System.currentTimeMillis();
89
- //
90
- // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
91
- // .setNanos((int) ((millis % 1000) * 1000000)).build();
92
- //
93
- //
94
- // Example 5: Compute Timestamp from current time in Python.
95
- //
96
- // timestamp = Timestamp()
97
- // timestamp.GetCurrentTime()
98
- //
99
- // # JSON Mapping
100
- //
101
- // In JSON format, the Timestamp type is encoded as a string in the
102
- // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
103
- // format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
104
- // where {year} is always expressed using four digits while {month}, {day},
105
- // {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
106
- // seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
107
- // are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
108
- // is required. A proto3 JSON serializer should always use UTC (as indicated by
109
- // "Z") when printing the Timestamp type and a proto3 JSON parser should be
110
- // able to accept both UTC and other timezones (as indicated by an offset).
111
- //
112
- // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
113
- // 01:30 UTC on January 15, 2017.
114
- //
115
- // In JavaScript, one can convert a Date object to this format using the
116
- // standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
117
- // method. In Python, a standard `datetime.datetime` object can be converted
118
- // to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)
119
- // with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
120
- // can use the Joda Time's [`ISODateTimeFormat.dateTime()`](
121
- // http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
122
- // ) to obtain a formatter capable of generating timestamps in this format.
123
- //
124
- //
125
- message Timestamp {
126
-
127
- // Represents seconds of UTC time since Unix epoch
128
- // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
129
- // 9999-12-31T23:59:59Z inclusive.
130
- int64 seconds = 1;
131
-
132
- // Non-negative fractions of a second at nanosecond resolution. Negative
133
- // second values with fractions must still have non-negative nanos values
134
- // that count forward in time. Must be from 0 to 999,999,999
135
- // inclusive.
136
- int32 nanos = 2;
137
- }
@@ -1,123 +0,0 @@
1
- // Protocol Buffers - Google's data interchange format
2
- // Copyright 2008 Google Inc. All rights reserved.
3
- // https://developers.google.com/protocol-buffers/
4
- //
5
- // Redistribution and use in source and binary forms, with or without
6
- // modification, are permitted provided that the following conditions are
7
- // met:
8
- //
9
- // * Redistributions of source code must retain the above copyright
10
- // notice, this list of conditions and the following disclaimer.
11
- // * Redistributions in binary form must reproduce the above
12
- // copyright notice, this list of conditions and the following disclaimer
13
- // in the documentation and/or other materials provided with the
14
- // distribution.
15
- // * Neither the name of Google Inc. nor the names of its
16
- // contributors may be used to endorse or promote products derived from
17
- // this software without specific prior written permission.
18
- //
19
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
-
31
- // Wrappers for primitive (non-message) types. These types are useful
32
- // for embedding primitives in the `google.protobuf.Any` type and for places
33
- // where we need to distinguish between the absence of a primitive
34
- // typed field and its default value.
35
- //
36
- // These wrappers have no meaningful use within repeated fields as they lack
37
- // the ability to detect presence on individual elements.
38
- // These wrappers have no meaningful use within a map or a oneof since
39
- // individual entries of a map or fields of a oneof can already detect presence.
40
-
41
- syntax = "proto3";
42
-
43
- package google.protobuf;
44
-
45
- option csharp_namespace = "Google.Protobuf.WellKnownTypes";
46
- option cc_enable_arenas = true;
47
- option go_package = "github.com/golang/protobuf/ptypes/wrappers";
48
- option java_package = "com.google.protobuf";
49
- option java_outer_classname = "WrappersProto";
50
- option java_multiple_files = true;
51
- option objc_class_prefix = "GPB";
52
-
53
- // Wrapper message for `double`.
54
- //
55
- // The JSON representation for `DoubleValue` is JSON number.
56
- message DoubleValue {
57
- // The double value.
58
- double value = 1;
59
- }
60
-
61
- // Wrapper message for `float`.
62
- //
63
- // The JSON representation for `FloatValue` is JSON number.
64
- message FloatValue {
65
- // The float value.
66
- float value = 1;
67
- }
68
-
69
- // Wrapper message for `int64`.
70
- //
71
- // The JSON representation for `Int64Value` is JSON string.
72
- message Int64Value {
73
- // The int64 value.
74
- int64 value = 1;
75
- }
76
-
77
- // Wrapper message for `uint64`.
78
- //
79
- // The JSON representation for `UInt64Value` is JSON string.
80
- message UInt64Value {
81
- // The uint64 value.
82
- uint64 value = 1;
83
- }
84
-
85
- // Wrapper message for `int32`.
86
- //
87
- // The JSON representation for `Int32Value` is JSON number.
88
- message Int32Value {
89
- // The int32 value.
90
- int32 value = 1;
91
- }
92
-
93
- // Wrapper message for `uint32`.
94
- //
95
- // The JSON representation for `UInt32Value` is JSON number.
96
- message UInt32Value {
97
- // The uint32 value.
98
- uint32 value = 1;
99
- }
100
-
101
- // Wrapper message for `bool`.
102
- //
103
- // The JSON representation for `BoolValue` is JSON `true` and `false`.
104
- message BoolValue {
105
- // The bool value.
106
- bool value = 1;
107
- }
108
-
109
- // Wrapper message for `string`.
110
- //
111
- // The JSON representation for `StringValue` is JSON string.
112
- message StringValue {
113
- // The string value.
114
- string value = 1;
115
- }
116
-
117
- // Wrapper message for `bytes`.
118
- //
119
- // The JSON representation for `BytesValue` is JSON string.
120
- message BytesValue {
121
- // The bytes value.
122
- bytes value = 1;
123
- }
@@ -1,92 +0,0 @@
1
- // Copyright 2017 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.rpc;
18
-
19
- import "google/protobuf/any.proto";
20
-
21
- option go_package = "google.golang.org/genproto/googleapis/rpc/status;status";
22
- option java_multiple_files = true;
23
- option java_outer_classname = "StatusProto";
24
- option java_package = "com.google.rpc";
25
- option objc_class_prefix = "RPC";
26
-
27
-
28
- // The `Status` type defines a logical error model that is suitable for different
29
- // programming environments, including REST APIs and RPC APIs. It is used by
30
- // [gRPC](https://github.com/grpc). The error model is designed to be:
31
- //
32
- // - Simple to use and understand for most users
33
- // - Flexible enough to meet unexpected needs
34
- //
35
- // # Overview
36
- //
37
- // The `Status` message contains three pieces of data: error code, error message,
38
- // and error details. The error code should be an enum value of
39
- // [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed. The
40
- // error message should be a developer-facing English message that helps
41
- // developers *understand* and *resolve* the error. If a localized user-facing
42
- // error message is needed, put the localized message in the error details or
43
- // localize it in the client. The optional error details may contain arbitrary
44
- // information about the error. There is a predefined set of error detail types
45
- // in the package `google.rpc` that can be used for common error conditions.
46
- //
47
- // # Language mapping
48
- //
49
- // The `Status` message is the logical representation of the error model, but it
50
- // is not necessarily the actual wire format. When the `Status` message is
51
- // exposed in different client libraries and different wire protocols, it can be
52
- // mapped differently. For example, it will likely be mapped to some exceptions
53
- // in Java, but more likely mapped to some error codes in C.
54
- //
55
- // # Other uses
56
- //
57
- // The error model and the `Status` message can be used in a variety of
58
- // environments, either with or without APIs, to provide a
59
- // consistent developer experience across different environments.
60
- //
61
- // Example uses of this error model include:
62
- //
63
- // - Partial errors. If a service needs to return partial errors to the client,
64
- // it may embed the `Status` in the normal response to indicate the partial
65
- // errors.
66
- //
67
- // - Workflow errors. A typical workflow has multiple steps. Each step may
68
- // have a `Status` message for error reporting.
69
- //
70
- // - Batch operations. If a client uses batch request and batch response, the
71
- // `Status` message should be used directly inside batch response, one for
72
- // each error sub-response.
73
- //
74
- // - Asynchronous operations. If an API call embeds asynchronous operation
75
- // results in its response, the status of those operations should be
76
- // represented directly using the `Status` message.
77
- //
78
- // - Logging. If some API errors are stored in logs, the message `Status` could
79
- // be used directly after any stripping needed for security/privacy reasons.
80
- message Status {
81
- // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
82
- int32 code = 1;
83
-
84
- // A developer-facing error message, which should be in English. Any
85
- // user-facing error message should be localized and sent in the
86
- // [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
87
- string message = 2;
88
-
89
- // A list of messages that carry the error details. There is a common set of
90
- // message types for APIs to use.
91
- repeated google.protobuf.Any details = 3;
92
- }
@@ -1,71 +0,0 @@
1
- // Copyright 2016 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.type;
18
-
19
- option go_package = "google.golang.org/genproto/googleapis/type/latlng;latlng";
20
- option java_multiple_files = true;
21
- option java_outer_classname = "LatLngProto";
22
- option java_package = "com.google.type";
23
- option objc_class_prefix = "GTP";
24
-
25
-
26
- // An object representing a latitude/longitude pair. This is expressed as a pair
27
- // of doubles representing degrees latitude and degrees longitude. Unless
28
- // specified otherwise, this must conform to the
29
- // <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
30
- // standard</a>. Values must be within normalized ranges.
31
- //
32
- // Example of normalization code in Python:
33
- //
34
- // def NormalizeLongitude(longitude):
35
- // """Wraps decimal degrees longitude to [-180.0, 180.0]."""
36
- // q, r = divmod(longitude, 360.0)
37
- // if r > 180.0 or (r == 180.0 and q <= -1.0):
38
- // return r - 360.0
39
- // return r
40
- //
41
- // def NormalizeLatLng(latitude, longitude):
42
- // """Wraps decimal degrees latitude and longitude to
43
- // [-90.0, 90.0] and [-180.0, 180.0], respectively."""
44
- // r = latitude % 360.0
45
- // if r <= 90.0:
46
- // return r, NormalizeLongitude(longitude)
47
- // elif r >= 270.0:
48
- // return r - 360, NormalizeLongitude(longitude)
49
- // else:
50
- // return 180 - r, NormalizeLongitude(longitude + 180.0)
51
- //
52
- // assert 180.0 == NormalizeLongitude(180.0)
53
- // assert -180.0 == NormalizeLongitude(-180.0)
54
- // assert -179.0 == NormalizeLongitude(181.0)
55
- // assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
56
- // assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
57
- // assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
58
- // assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
59
- // assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
60
- // assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
61
- // assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
62
- // assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
63
- // assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
64
- // assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
65
- message LatLng {
66
- // The latitude in degrees. It must be in the range [-90.0, +90.0].
67
- double latitude = 1;
68
-
69
- // The longitude in degrees. It must be in the range [-180.0, +180.0].
70
- double longitude = 2;
71
- }
@@ -1,61 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Copyright 2017 Google Inc.
4
- #
5
- # Licensed under the Apache License, Version 2.0 (the "License");
6
- # you may not use this file except in compliance with the License.
7
- # You may obtain a copy of the License at
8
- #
9
- # http://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing, software
12
- # distributed under the License is distributed on an "AS IS" BASIS,
13
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
-
17
- set -euo pipefail
18
- IFS=$'\n\t'
19
-
20
- # Variables
21
- PROTOS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
22
- WORK_DIR=`mktemp -d`
23
-
24
- # deletes the temp directory on exit
25
- function cleanup {
26
- rm -rf "$WORK_DIR"
27
- echo "Deleted temp working directory $WORK_DIR"
28
- }
29
-
30
- # register the cleanup function to be called on the EXIT signal
31
- trap cleanup EXIT
32
-
33
- # Enter work dir
34
- pushd "$WORK_DIR"
35
-
36
- # Clone necessary git repos.
37
- git clone https://github.com/googleapis/googleapis.git
38
- git clone https://github.com/google/protobuf.git
39
-
40
- # Copy necessary protos.
41
- mkdir -p "${PROTOS_DIR}/google/api"
42
- cp googleapis/google/api/{annotations.proto,http.proto} \
43
- "${PROTOS_DIR}/google/api/"
44
-
45
- mkdir -p "${PROTOS_DIR}/google/firestore/v1"
46
- cp googleapis/google/firestore/v1/*.proto \
47
- "${PROTOS_DIR}/google/firestore/v1/"
48
-
49
- mkdir -p "${PROTOS_DIR}/google/rpc"
50
- cp googleapis/google/rpc/status.proto \
51
- "${PROTOS_DIR}/google/rpc/"
52
-
53
- mkdir -p "${PROTOS_DIR}/google/type"
54
- cp googleapis/google/type/latlng.proto \
55
- "${PROTOS_DIR}/google/type/"
56
-
57
- mkdir -p "${PROTOS_DIR}/google/protobuf"
58
- cp protobuf/src/google/protobuf/{any,empty,struct,timestamp,wrappers,descriptor}.proto \
59
- "${PROTOS_DIR}/google/protobuf/"
60
-
61
- popd
@@ -1,29 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2017 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import { Bytes } from '../../src/api';
18
- import { Compat } from '@firebase/util';
19
- /** Immutable class holding a blob (binary data) */
20
- export declare class Blob implements Compat<Bytes> {
21
- readonly _delegate: Bytes;
22
- constructor(_delegate: Bytes);
23
- static fromBase64String(base64: string): Blob;
24
- static fromUint8Array(array: Uint8Array): Blob;
25
- toBase64(): string;
26
- toUint8Array(): Uint8Array;
27
- isEqual(other: Blob): boolean;
28
- toString(): string;
29
- }