@firebase/firestore 3.4.4-canary.222f264ff → 3.4.4-canary.6c8eabfc5

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 (112) hide show
  1. package/dist/firestore/src/api/{query.d.ts → filter.d.ts} +0 -0
  2. package/dist/firestore/src/api/snapshot.d.ts +1 -2
  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/target.d.ts +34 -5
  6. package/dist/firestore/src/lite-api/query.d.ts +2 -2
  7. package/dist/firestore/src/local/index_manager.d.ts +52 -0
  8. package/dist/firestore/src/local/indexeddb_index_manager.d.ts +11 -0
  9. package/dist/firestore/src/local/indexeddb_schema.d.ts +121 -7
  10. package/dist/firestore/src/local/local_serializer.d.ts +1 -1
  11. package/dist/firestore/src/local/memory_index_manager.d.ts +11 -0
  12. package/dist/firestore/src/local/remote_document_change_buffer.d.ts +3 -12
  13. package/dist/firestore/src/local/simple_db.d.ts +1 -0
  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.d.ts +1 -2
  23. package/dist/index.esm2017.js +3451 -3194
  24. package/dist/index.esm2017.js.map +1 -1
  25. package/dist/index.esm5.js +3430 -3264
  26. package/dist/index.esm5.js.map +1 -1
  27. package/dist/index.node.cjs.js +543 -242
  28. package/dist/index.node.cjs.js.map +1 -1
  29. package/dist/index.node.mjs +543 -242
  30. package/dist/index.node.mjs.map +1 -1
  31. package/dist/index.rn.js +3520 -3301
  32. package/dist/index.rn.js.map +1 -1
  33. package/dist/internal.d.ts +183 -16
  34. package/dist/lite/firestore/src/api/{query.d.ts → filter.d.ts} +0 -0
  35. package/dist/lite/firestore/src/api/snapshot.d.ts +1 -2
  36. package/dist/lite/firestore/src/api.d.ts +1 -1
  37. package/dist/lite/firestore/src/core/database_info.d.ts +1 -0
  38. package/dist/lite/firestore/src/core/target.d.ts +34 -5
  39. package/dist/lite/firestore/src/lite-api/query.d.ts +2 -2
  40. package/dist/lite/firestore/src/local/index_manager.d.ts +52 -0
  41. package/dist/lite/firestore/src/local/indexeddb_index_manager.d.ts +11 -0
  42. package/dist/lite/firestore/src/local/indexeddb_schema.d.ts +121 -7
  43. package/dist/lite/firestore/src/local/local_serializer.d.ts +1 -1
  44. package/dist/lite/firestore/src/local/memory_index_manager.d.ts +11 -0
  45. package/dist/lite/firestore/src/local/remote_document_change_buffer.d.ts +3 -12
  46. package/dist/lite/firestore/src/local/simple_db.d.ts +1 -0
  47. package/dist/lite/firestore/src/model/document.d.ts +7 -0
  48. package/dist/lite/firestore/src/model/document_key.d.ts +1 -0
  49. package/dist/lite/firestore/src/model/field_index.d.ts +87 -7
  50. package/dist/lite/firestore/src/model/values.d.ts +7 -0
  51. package/dist/lite/firestore/test/unit/local/test_remote_document_cache.d.ts +1 -1
  52. package/dist/lite/firestore/test/unit/model/field_index.test.d.ts +17 -0
  53. package/dist/lite/firestore/test/unit/model/target.test.d.ts +17 -0
  54. package/dist/lite/firestore/test/util/helpers.d.ts +8 -2
  55. package/dist/lite/index.browser.esm2017.js +1166 -1152
  56. package/dist/lite/index.browser.esm2017.js.map +1 -1
  57. package/dist/lite/index.browser.esm5.js +367 -359
  58. package/dist/lite/index.browser.esm5.js.map +1 -1
  59. package/dist/lite/index.node.cjs.js +53 -34
  60. package/dist/lite/index.node.cjs.js.map +1 -1
  61. package/dist/lite/index.node.mjs +53 -34
  62. package/dist/lite/index.node.mjs.map +1 -1
  63. package/dist/lite/index.rn.esm2017.js +318 -304
  64. package/dist/lite/index.rn.esm2017.js.map +1 -1
  65. package/dist/lite/internal.d.ts +11 -2
  66. package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +125 -124
  67. package/dist/lite/packages/firestore/src/api/{query.d.ts → filter.d.ts} +0 -0
  68. package/dist/lite/packages/firestore/src/api/snapshot.d.ts +1 -2
  69. package/dist/lite/packages/firestore/src/api.d.ts +1 -1
  70. package/dist/lite/packages/firestore/src/core/database_info.d.ts +1 -0
  71. package/dist/lite/packages/firestore/src/core/target.d.ts +34 -5
  72. package/dist/lite/packages/firestore/src/lite-api/query.d.ts +2 -2
  73. package/dist/lite/packages/firestore/src/local/index_manager.d.ts +52 -0
  74. package/dist/lite/packages/firestore/src/local/indexeddb_index_manager.d.ts +11 -0
  75. package/dist/lite/packages/firestore/src/local/indexeddb_schema.d.ts +121 -7
  76. package/dist/lite/packages/firestore/src/local/local_serializer.d.ts +1 -1
  77. package/dist/lite/packages/firestore/src/local/memory_index_manager.d.ts +11 -0
  78. package/dist/lite/packages/firestore/src/local/remote_document_change_buffer.d.ts +3 -12
  79. package/dist/lite/packages/firestore/src/local/simple_db.d.ts +1 -0
  80. package/dist/lite/packages/firestore/src/model/document.d.ts +7 -0
  81. package/dist/lite/packages/firestore/src/model/document_key.d.ts +1 -0
  82. package/dist/lite/packages/firestore/src/model/field_index.d.ts +87 -7
  83. package/dist/lite/packages/firestore/src/model/values.d.ts +7 -0
  84. package/dist/lite/packages/firestore/test/unit/local/test_remote_document_cache.d.ts +1 -1
  85. package/dist/lite/packages/firestore/test/unit/model/field_index.test.d.ts +17 -0
  86. package/dist/lite/packages/firestore/test/unit/model/target.test.d.ts +17 -0
  87. package/dist/lite/packages/firestore/test/util/helpers.d.ts +8 -2
  88. package/dist/lite/private.d.ts +9 -2
  89. package/dist/packages/firestore/dist/index.esm2017.d.ts +175 -173
  90. package/dist/packages/firestore/src/api/{query.d.ts → filter.d.ts} +0 -0
  91. package/dist/packages/firestore/src/api/snapshot.d.ts +1 -2
  92. package/dist/packages/firestore/src/api.d.ts +1 -1
  93. package/dist/packages/firestore/src/core/database_info.d.ts +1 -0
  94. package/dist/packages/firestore/src/core/target.d.ts +34 -5
  95. package/dist/packages/firestore/src/lite-api/query.d.ts +2 -2
  96. package/dist/packages/firestore/src/local/index_manager.d.ts +52 -0
  97. package/dist/packages/firestore/src/local/indexeddb_index_manager.d.ts +11 -0
  98. package/dist/packages/firestore/src/local/indexeddb_schema.d.ts +121 -7
  99. package/dist/packages/firestore/src/local/local_serializer.d.ts +1 -1
  100. package/dist/packages/firestore/src/local/memory_index_manager.d.ts +11 -0
  101. package/dist/packages/firestore/src/local/remote_document_change_buffer.d.ts +3 -12
  102. package/dist/packages/firestore/src/local/simple_db.d.ts +1 -0
  103. package/dist/packages/firestore/src/model/document.d.ts +7 -0
  104. package/dist/packages/firestore/src/model/document_key.d.ts +1 -0
  105. package/dist/packages/firestore/src/model/field_index.d.ts +87 -7
  106. package/dist/packages/firestore/src/model/values.d.ts +7 -0
  107. package/dist/packages/firestore/test/unit/local/test_remote_document_cache.d.ts +1 -1
  108. package/dist/packages/firestore/test/unit/model/field_index.test.d.ts +17 -0
  109. package/dist/packages/firestore/test/unit/model/target.test.d.ts +17 -0
  110. package/dist/packages/firestore/test/util/helpers.d.ts +8 -2
  111. package/dist/private.d.ts +181 -16
  112. package/package.json +9 -9
@@ -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;
@@ -177,8 +177,8 @@ declare abstract class BasePath<B extends BasePath<B>> {
177
177
  */
178
178
  declare class Bound {
179
179
  readonly position: Value[];
180
- readonly before: boolean;
181
- constructor(position: Value[], before: boolean);
180
+ readonly inclusive: boolean;
181
+ constructor(position: Value[], inclusive: boolean);
182
182
  }
183
183
 
184
184
  /**
@@ -545,6 +545,11 @@ declare interface Document_2 {
545
545
  * document was guaranteed to not exist.
546
546
  */
547
547
  readonly version: SnapshotVersion;
548
+ /**
549
+ * The timestamp at which this document was read from the remote server. Uses
550
+ * `SnapshotVersion.min()` for documents created by the user.
551
+ */
552
+ readonly readTime: SnapshotVersion;
548
553
  /** The underlying data of this document or an empty value if no data exists. */
549
554
  readonly data: ObjectValue;
550
555
  /** Returns whether local mutations were applied via the mutation queue. */
@@ -1507,6 +1512,7 @@ declare class MutableDocument implements Document_2 {
1507
1512
  readonly key: DocumentKey;
1508
1513
  private documentType;
1509
1514
  version: SnapshotVersion;
1515
+ readTime: SnapshotVersion;
1510
1516
  data: ObjectValue;
1511
1517
  private documentState;
1512
1518
  private constructor();
@@ -1546,6 +1552,7 @@ declare class MutableDocument implements Document_2 {
1546
1552
  convertToUnknownDocument(version: SnapshotVersion): MutableDocument;
1547
1553
  setHasCommittedMutations(): MutableDocument;
1548
1554
  setHasLocalMutations(): MutableDocument;
1555
+ setReadTime(readTime: SnapshotVersion): MutableDocument;
1549
1556
  get hasLocalMutations(): boolean;
1550
1557
  get hasCommittedMutations(): boolean;
1551
1558
  get hasPendingWrites(): boolean;