@firebase/firestore 3.4.3-canary.e80d18d65 → 3.4.4-canary.00916e719

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 (108) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/firestore/src/api/{query.d.ts → filter.d.ts} +0 -0
  3. package/dist/firestore/src/api.d.ts +1 -1
  4. package/dist/firestore/src/core/database_info.d.ts +1 -0
  5. package/dist/firestore/src/core/firestore_client.d.ts +2 -0
  6. package/dist/firestore/src/core/target.d.ts +34 -5
  7. package/dist/firestore/src/lite-api/query.d.ts +2 -2
  8. package/dist/firestore/src/local/index_manager.d.ts +52 -0
  9. package/dist/firestore/src/local/indexeddb_index_manager.d.ts +11 -0
  10. package/dist/firestore/src/local/indexeddb_schema.d.ts +121 -7
  11. package/dist/firestore/src/local/local_serializer.d.ts +1 -1
  12. package/dist/firestore/src/local/memory_index_manager.d.ts +11 -0
  13. package/dist/firestore/src/local/remote_document_change_buffer.d.ts +3 -12
  14. package/dist/firestore/src/model/document.d.ts +7 -0
  15. package/dist/firestore/src/model/document_key.d.ts +1 -0
  16. package/dist/firestore/src/model/field_index.d.ts +87 -7
  17. package/dist/firestore/src/model/values.d.ts +7 -0
  18. package/dist/firestore/test/unit/local/test_remote_document_cache.d.ts +1 -1
  19. package/dist/firestore/test/unit/model/field_index.test.d.ts +17 -0
  20. package/dist/firestore/test/unit/model/target.test.d.ts +17 -0
  21. package/dist/firestore/test/util/helpers.d.ts +8 -2
  22. package/dist/index.esm2017.js +2678 -2426
  23. package/dist/index.esm2017.js.map +1 -1
  24. package/dist/index.esm5.js +2726 -2561
  25. package/dist/index.esm5.js.map +1 -1
  26. package/dist/index.node.cjs.js +569 -239
  27. package/dist/index.node.cjs.js.map +1 -1
  28. package/dist/index.node.mjs +569 -239
  29. package/dist/index.node.mjs.map +1 -1
  30. package/dist/index.rn.js +2713 -2499
  31. package/dist/index.rn.js.map +1 -1
  32. package/dist/internal.d.ts +184 -14
  33. package/dist/lite/firestore/src/api/{query.d.ts → filter.d.ts} +0 -0
  34. package/dist/lite/firestore/src/api.d.ts +1 -1
  35. package/dist/lite/firestore/src/core/database_info.d.ts +1 -0
  36. package/dist/lite/firestore/src/core/firestore_client.d.ts +2 -0
  37. package/dist/lite/firestore/src/core/target.d.ts +34 -5
  38. package/dist/lite/firestore/src/lite-api/query.d.ts +2 -2
  39. package/dist/lite/firestore/src/local/index_manager.d.ts +52 -0
  40. package/dist/lite/firestore/src/local/indexeddb_index_manager.d.ts +11 -0
  41. package/dist/lite/firestore/src/local/indexeddb_schema.d.ts +121 -7
  42. package/dist/lite/firestore/src/local/local_serializer.d.ts +1 -1
  43. package/dist/lite/firestore/src/local/memory_index_manager.d.ts +11 -0
  44. package/dist/lite/firestore/src/local/remote_document_change_buffer.d.ts +3 -12
  45. package/dist/lite/firestore/src/model/document.d.ts +7 -0
  46. package/dist/lite/firestore/src/model/document_key.d.ts +1 -0
  47. package/dist/lite/firestore/src/model/field_index.d.ts +87 -7
  48. package/dist/lite/firestore/src/model/values.d.ts +7 -0
  49. package/dist/lite/firestore/test/unit/local/test_remote_document_cache.d.ts +1 -1
  50. package/dist/lite/firestore/test/unit/model/field_index.test.d.ts +17 -0
  51. package/dist/lite/firestore/test/unit/model/target.test.d.ts +17 -0
  52. package/dist/lite/firestore/test/util/helpers.d.ts +8 -2
  53. package/dist/lite/index.browser.esm2017.js +1157 -1143
  54. package/dist/lite/index.browser.esm2017.js.map +1 -1
  55. package/dist/lite/index.browser.esm5.js +335 -327
  56. package/dist/lite/index.browser.esm5.js.map +1 -1
  57. package/dist/lite/index.node.cjs.js +53 -34
  58. package/dist/lite/index.node.cjs.js.map +1 -1
  59. package/dist/lite/index.node.mjs +53 -34
  60. package/dist/lite/index.node.mjs.map +1 -1
  61. package/dist/lite/index.rn.esm2017.js +318 -304
  62. package/dist/lite/index.rn.esm2017.js.map +1 -1
  63. package/dist/lite/internal.d.ts +11 -2
  64. package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +122 -121
  65. package/dist/lite/packages/firestore/src/api/{query.d.ts → filter.d.ts} +0 -0
  66. package/dist/lite/packages/firestore/src/api.d.ts +1 -1
  67. package/dist/lite/packages/firestore/src/core/database_info.d.ts +1 -0
  68. package/dist/lite/packages/firestore/src/core/firestore_client.d.ts +2 -0
  69. package/dist/lite/packages/firestore/src/core/target.d.ts +34 -5
  70. package/dist/lite/packages/firestore/src/lite-api/query.d.ts +2 -2
  71. package/dist/lite/packages/firestore/src/local/index_manager.d.ts +52 -0
  72. package/dist/lite/packages/firestore/src/local/indexeddb_index_manager.d.ts +11 -0
  73. package/dist/lite/packages/firestore/src/local/indexeddb_schema.d.ts +121 -7
  74. package/dist/lite/packages/firestore/src/local/local_serializer.d.ts +1 -1
  75. package/dist/lite/packages/firestore/src/local/memory_index_manager.d.ts +11 -0
  76. package/dist/lite/packages/firestore/src/local/remote_document_change_buffer.d.ts +3 -12
  77. package/dist/lite/packages/firestore/src/model/document.d.ts +7 -0
  78. package/dist/lite/packages/firestore/src/model/document_key.d.ts +1 -0
  79. package/dist/lite/packages/firestore/src/model/field_index.d.ts +87 -7
  80. package/dist/lite/packages/firestore/src/model/values.d.ts +7 -0
  81. package/dist/lite/packages/firestore/test/unit/local/test_remote_document_cache.d.ts +1 -1
  82. package/dist/lite/packages/firestore/test/unit/model/field_index.test.d.ts +17 -0
  83. package/dist/lite/packages/firestore/test/unit/model/target.test.d.ts +17 -0
  84. package/dist/lite/packages/firestore/test/util/helpers.d.ts +8 -2
  85. package/dist/lite/private.d.ts +9 -2
  86. package/dist/packages/firestore/dist/index.esm2017.d.ts +148 -146
  87. package/dist/packages/firestore/src/api/{query.d.ts → filter.d.ts} +0 -0
  88. package/dist/packages/firestore/src/api.d.ts +1 -1
  89. package/dist/packages/firestore/src/core/database_info.d.ts +1 -0
  90. package/dist/packages/firestore/src/core/firestore_client.d.ts +2 -0
  91. package/dist/packages/firestore/src/core/target.d.ts +34 -5
  92. package/dist/packages/firestore/src/lite-api/query.d.ts +2 -2
  93. package/dist/packages/firestore/src/local/index_manager.d.ts +52 -0
  94. package/dist/packages/firestore/src/local/indexeddb_index_manager.d.ts +11 -0
  95. package/dist/packages/firestore/src/local/indexeddb_schema.d.ts +121 -7
  96. package/dist/packages/firestore/src/local/local_serializer.d.ts +1 -1
  97. package/dist/packages/firestore/src/local/memory_index_manager.d.ts +11 -0
  98. package/dist/packages/firestore/src/local/remote_document_change_buffer.d.ts +3 -12
  99. package/dist/packages/firestore/src/model/document.d.ts +7 -0
  100. package/dist/packages/firestore/src/model/document_key.d.ts +1 -0
  101. package/dist/packages/firestore/src/model/field_index.d.ts +87 -7
  102. package/dist/packages/firestore/src/model/values.d.ts +7 -0
  103. package/dist/packages/firestore/test/unit/local/test_remote_document_cache.d.ts +1 -1
  104. package/dist/packages/firestore/test/unit/model/field_index.test.d.ts +17 -0
  105. package/dist/packages/firestore/test/unit/model/target.test.d.ts +17 -0
  106. package/dist/packages/firestore/test/util/helpers.d.ts +8 -2
  107. package/dist/private.d.ts +182 -14
  108. package/package.json +10 -10
@@ -19,6 +19,7 @@ import { ArrayValue, MapValue, Value } from '../protos/firestore_proto_api';
19
19
  import { DocumentKey } from './document_key';
20
20
  import { TypeOrder } from './type_order';
21
21
  export declare const MAX_VALUE: Value;
22
+ export declare const MIN_VALUE: Value;
22
23
  /** Extracts the backend's type order for the provided value. */
23
24
  export declare function typeOrder(value: Value): TypeOrder;
24
25
  /** Tests `left` and `right` for equality based on the backend semantics. */
@@ -76,3 +77,9 @@ export declare function isMapValue(value?: Value | null): value is {
76
77
  export declare function deepClone(source: Value): Value;
77
78
  /** Returns true if the Value represents the canonical {@link #MAX_VALUE} . */
78
79
  export declare function isMaxValue(value: Value): boolean;
80
+ /** Returns the lowest value for the given value type (inclusive). */
81
+ export declare function valuesGetLowerBound(value: Value): Value;
82
+ /** Returns the largest value for the given value type (exclusive). */
83
+ export declare function valuesGetUpperBound(value: Value): Value;
84
+ export declare function valuesMax(left: Value | undefined, right: Value | undefined): Value | undefined;
85
+ export declare function valuesMin(left: Value | undefined, right: Value | undefined): Value | undefined;
@@ -33,7 +33,7 @@ export declare class TestRemoteDocumentCache {
33
33
  * Reads all of the documents first so we can safely add them and keep the size calculation in
34
34
  * sync.
35
35
  */
36
- addEntries(documents: MutableDocument[], readTime: SnapshotVersion): Promise<void>;
36
+ addEntries(documents: MutableDocument[]): Promise<void>;
37
37
  /**
38
38
  * Adds a single document using the document's version as its read time.
39
39
  * Reads the document first to track the document size internally.
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 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
+ export {};
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 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
+ export {};
@@ -14,7 +14,7 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import { Bytes, DocumentReference, OrderByDirection } from '../../src';
17
+ import { Bytes, DocumentReference } from '../../src';
18
18
  import { BundledDocuments } from '../../src/core/bundle';
19
19
  import { DatabaseId } from '../../src/core/database_info';
20
20
  import { Query } from '../../src/core/query';
@@ -30,6 +30,7 @@ import { Document, MutableDocument } from '../../src/model/document';
30
30
  import { DocumentComparator } from '../../src/model/document_comparator';
31
31
  import { DocumentKey } from '../../src/model/document_key';
32
32
  import { DocumentSet } from '../../src/model/document_set';
33
+ import { FieldIndex, IndexKind, IndexOffset } from '../../src/model/field_index';
33
34
  import { FieldMask } from '../../src/model/field_mask';
34
35
  import { DeleteMutation, MutationResult, PatchMutation, Precondition, SetMutation } from '../../src/model/mutation';
35
36
  import { JsonObject, ObjectValue } from '../../src/model/object_value';
@@ -58,6 +59,11 @@ export declare function key(path: string): DocumentKey;
58
59
  export declare function keys(...documents: Array<Document | string>): DocumentKeySet;
59
60
  export declare function path(path: string, offset?: number): ResourcePath;
60
61
  export declare function field(path: string): FieldPath;
62
+ export declare function fieldIndex(collectionGroup: string, options?: {
63
+ id?: number;
64
+ fields?: Array<[field: string, kind: IndexKind]>;
65
+ offset?: IndexOffset;
66
+ }): FieldIndex;
61
67
  export declare function mask(...paths: string[]): FieldMask;
62
68
  export declare function blob(...bytes: number[]): Bytes;
63
69
  export declare function filter(path: string, op: string, value: unknown): FieldFilter;
@@ -65,7 +71,7 @@ export declare function setMutation(keyStr: string, json: JsonObject<unknown>):
65
71
  export declare function patchMutation(keyStr: string, json: JsonObject<unknown>, precondition?: Precondition): PatchMutation;
66
72
  export declare function deleteMutation(keyStr: string): DeleteMutation;
67
73
  export declare function mutationResult(testVersion: TestSnapshotVersion): MutationResult;
68
- export declare function bound(values: Array<[string, {}, OrderByDirection]>, before: boolean): Bound;
74
+ export declare function bound(values: unknown[], inclusive: boolean): Bound;
69
75
  export declare function query(resourcePath: string, ...constraints: Array<OrderBy | Filter>): Query;
70
76
  export declare function targetData(targetId: TargetId, queryPurpose: TargetPurpose, path: string): TargetData;
71
77
  export declare function noChangeEvent(targetId: number, snapshotVersion: number, resumeToken?: ByteString): RemoteEvent;