@firebase/firestore 3.4.8 → 3.4.9-canary.0197076b8
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.
- package/CHANGELOG.md +10 -0
- package/dist/firestore/lite/index.d.ts +1 -0
- package/dist/firestore/src/api/transaction.d.ts +4 -1
- package/dist/firestore/src/api/transaction_options.d.ts +17 -0
- package/dist/firestore/src/api.d.ts +1 -0
- package/dist/firestore/src/core/firestore_client.d.ts +2 -1
- package/dist/firestore/src/core/query.d.ts +2 -4
- package/dist/firestore/src/core/target.d.ts +6 -4
- package/dist/firestore/src/core/transaction_options.d.ts +25 -0
- package/dist/firestore/src/core/transaction_runner.d.ts +3 -2
- package/dist/firestore/src/lite-api/transaction.d.ts +4 -1
- package/dist/firestore/src/lite-api/transaction_options.d.ts +23 -0
- package/dist/firestore/src/local/document_overlay_cache.d.ts +5 -0
- package/dist/firestore/src/local/index_manager.d.ts +24 -3
- package/dist/firestore/src/local/indexeddb_document_overlay_cache.d.ts +1 -0
- package/dist/firestore/src/local/indexeddb_index_manager.d.ts +4 -7
- package/dist/firestore/src/local/indexeddb_schema.d.ts +4 -2
- package/dist/firestore/src/local/indexeddb_schema_converter.d.ts +1 -0
- package/dist/firestore/src/local/indexeddb_sentinels.d.ts +1 -0
- package/dist/firestore/src/local/local_documents_view.d.ts +47 -8
- package/dist/firestore/src/local/memory_document_overlay_cache.d.ts +1 -0
- package/dist/firestore/src/local/memory_index_manager.d.ts +3 -2
- package/dist/firestore/src/local/overlayed_document.d.ts +36 -0
- package/dist/firestore/src/local/query_engine.d.ts +44 -5
- package/dist/firestore/src/model/collections.d.ts +3 -1
- package/dist/firestore/src/model/field_mask.d.ts +6 -0
- package/dist/firestore/src/model/mutation.d.ts +19 -1
- package/dist/firestore/src/model/mutation_batch.d.ts +9 -4
- package/dist/firestore/src/model/values.d.ts +14 -2
- package/dist/firestore/src/tsdoc-metadata.json +11 -11
- package/dist/firestore/src/util/misc.d.ts +3 -0
- package/dist/firestore/test/unit/local/counting_query_engine.d.ts +2 -1
- package/dist/firestore/test/unit/local/test_document_overlay_cache.d.ts +1 -0
- package/dist/firestore/test/unit/local/test_index_manager.d.ts +2 -2
- package/dist/firestore/test/util/helpers.d.ts +12 -0
- package/dist/index.d.ts +28 -3
- package/dist/index.esm2017.js +9384 -9023
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +7406 -7016
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +5607 -5089
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +5607 -5089
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +7162 -6801
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +6007 -5918
- package/dist/lite/firestore/lite/index.d.ts +1 -0
- package/dist/lite/firestore/src/api/transaction.d.ts +4 -1
- package/dist/lite/firestore/src/api/transaction_options.d.ts +17 -0
- package/dist/lite/firestore/src/api.d.ts +1 -0
- package/dist/lite/firestore/src/core/firestore_client.d.ts +2 -1
- package/dist/lite/firestore/src/core/query.d.ts +2 -4
- package/dist/lite/firestore/src/core/target.d.ts +6 -4
- package/dist/lite/firestore/src/core/transaction_options.d.ts +25 -0
- package/dist/lite/firestore/src/core/transaction_runner.d.ts +3 -2
- package/dist/lite/firestore/src/lite-api/transaction.d.ts +4 -1
- package/dist/lite/firestore/src/lite-api/transaction_options.d.ts +23 -0
- package/dist/lite/firestore/src/local/document_overlay_cache.d.ts +5 -0
- package/dist/lite/firestore/src/local/index_manager.d.ts +24 -3
- package/dist/lite/firestore/src/local/indexeddb_document_overlay_cache.d.ts +1 -0
- package/dist/lite/firestore/src/local/indexeddb_index_manager.d.ts +4 -7
- package/dist/lite/firestore/src/local/indexeddb_schema.d.ts +4 -2
- package/dist/lite/firestore/src/local/indexeddb_schema_converter.d.ts +1 -0
- package/dist/lite/firestore/src/local/indexeddb_sentinels.d.ts +1 -0
- package/dist/lite/firestore/src/local/local_documents_view.d.ts +47 -8
- package/dist/lite/firestore/src/local/memory_document_overlay_cache.d.ts +1 -0
- package/dist/lite/firestore/src/local/memory_index_manager.d.ts +3 -2
- package/dist/lite/firestore/src/local/overlayed_document.d.ts +36 -0
- package/dist/lite/firestore/src/local/query_engine.d.ts +44 -5
- package/dist/lite/firestore/src/model/collections.d.ts +3 -1
- package/dist/lite/firestore/src/model/field_mask.d.ts +6 -0
- package/dist/lite/firestore/src/model/mutation.d.ts +19 -1
- package/dist/lite/firestore/src/model/mutation_batch.d.ts +9 -4
- package/dist/lite/firestore/src/model/values.d.ts +14 -2
- package/dist/lite/firestore/src/util/misc.d.ts +3 -0
- package/dist/lite/firestore/test/unit/local/counting_query_engine.d.ts +2 -1
- package/dist/lite/firestore/test/unit/local/test_document_overlay_cache.d.ts +1 -0
- package/dist/lite/firestore/test/unit/local/test_index_manager.d.ts +2 -2
- package/dist/lite/firestore/test/util/helpers.d.ts +12 -0
- package/dist/lite/index.browser.esm2017.js +1209 -698
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +1213 -813
- package/dist/lite/index.browser.esm5.js.map +1 -1
- package/dist/lite/index.d.ts +26 -1
- package/dist/lite/index.node.cjs.js +709 -15
- package/dist/lite/index.node.cjs.js.map +1 -1
- package/dist/lite/index.node.mjs +709 -15
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +1828 -1317
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/internal.d.ts +2912 -2874
- package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +103 -101
- package/dist/lite/packages/firestore/lite/index.d.ts +1 -0
- package/dist/lite/packages/firestore/src/api/transaction.d.ts +4 -1
- package/dist/lite/packages/firestore/src/api/transaction_options.d.ts +17 -0
- package/dist/lite/packages/firestore/src/api.d.ts +1 -0
- package/dist/lite/packages/firestore/src/core/firestore_client.d.ts +2 -1
- package/dist/lite/packages/firestore/src/core/query.d.ts +2 -4
- package/dist/lite/packages/firestore/src/core/target.d.ts +6 -4
- package/dist/lite/packages/firestore/src/core/transaction_options.d.ts +25 -0
- package/dist/lite/packages/firestore/src/core/transaction_runner.d.ts +3 -2
- package/dist/lite/packages/firestore/src/lite-api/transaction.d.ts +4 -1
- package/dist/lite/packages/firestore/src/lite-api/transaction_options.d.ts +23 -0
- package/dist/lite/packages/firestore/src/local/document_overlay_cache.d.ts +5 -0
- package/dist/lite/packages/firestore/src/local/index_manager.d.ts +24 -3
- package/dist/lite/packages/firestore/src/local/indexeddb_document_overlay_cache.d.ts +1 -0
- package/dist/lite/packages/firestore/src/local/indexeddb_index_manager.d.ts +4 -7
- package/dist/lite/packages/firestore/src/local/indexeddb_schema.d.ts +4 -2
- package/dist/lite/packages/firestore/src/local/indexeddb_schema_converter.d.ts +1 -0
- package/dist/lite/packages/firestore/src/local/indexeddb_sentinels.d.ts +1 -0
- package/dist/lite/packages/firestore/src/local/local_documents_view.d.ts +47 -8
- package/dist/lite/packages/firestore/src/local/memory_document_overlay_cache.d.ts +1 -0
- package/dist/lite/packages/firestore/src/local/memory_index_manager.d.ts +3 -2
- package/dist/lite/packages/firestore/src/local/overlayed_document.d.ts +36 -0
- package/dist/lite/packages/firestore/src/local/query_engine.d.ts +44 -5
- package/dist/lite/packages/firestore/src/model/collections.d.ts +3 -1
- package/dist/lite/packages/firestore/src/model/field_mask.d.ts +6 -0
- package/dist/lite/packages/firestore/src/model/mutation.d.ts +19 -1
- package/dist/lite/packages/firestore/src/model/mutation_batch.d.ts +9 -4
- package/dist/lite/packages/firestore/src/model/values.d.ts +14 -2
- package/dist/lite/packages/firestore/src/util/misc.d.ts +3 -0
- package/dist/lite/packages/firestore/test/unit/local/counting_query_engine.d.ts +2 -1
- package/dist/lite/packages/firestore/test/unit/local/test_document_overlay_cache.d.ts +1 -0
- package/dist/lite/packages/firestore/test/unit/local/test_index_manager.d.ts +2 -2
- package/dist/lite/packages/firestore/test/util/helpers.d.ts +12 -0
- package/dist/lite/private.d.ts +2772 -2734
- package/dist/packages/firestore/dist/index.esm2017.d.ts +197 -194
- package/dist/packages/firestore/lite/index.d.ts +1 -0
- package/dist/packages/firestore/src/api/transaction.d.ts +4 -1
- package/dist/packages/firestore/src/api/transaction_options.d.ts +17 -0
- package/dist/packages/firestore/src/api.d.ts +1 -0
- package/dist/packages/firestore/src/core/firestore_client.d.ts +2 -1
- package/dist/packages/firestore/src/core/query.d.ts +2 -4
- package/dist/packages/firestore/src/core/target.d.ts +6 -4
- package/dist/packages/firestore/src/core/transaction_options.d.ts +25 -0
- package/dist/packages/firestore/src/core/transaction_runner.d.ts +3 -2
- package/dist/packages/firestore/src/lite-api/transaction.d.ts +4 -1
- package/dist/packages/firestore/src/lite-api/transaction_options.d.ts +23 -0
- package/dist/packages/firestore/src/local/document_overlay_cache.d.ts +5 -0
- package/dist/packages/firestore/src/local/index_manager.d.ts +24 -3
- package/dist/packages/firestore/src/local/indexeddb_document_overlay_cache.d.ts +1 -0
- package/dist/packages/firestore/src/local/indexeddb_index_manager.d.ts +4 -7
- package/dist/packages/firestore/src/local/indexeddb_schema.d.ts +4 -2
- package/dist/packages/firestore/src/local/indexeddb_schema_converter.d.ts +1 -0
- package/dist/packages/firestore/src/local/indexeddb_sentinels.d.ts +1 -0
- package/dist/packages/firestore/src/local/local_documents_view.d.ts +47 -8
- package/dist/packages/firestore/src/local/memory_document_overlay_cache.d.ts +1 -0
- package/dist/packages/firestore/src/local/memory_index_manager.d.ts +3 -2
- package/dist/packages/firestore/src/local/overlayed_document.d.ts +36 -0
- package/dist/packages/firestore/src/local/query_engine.d.ts +44 -5
- package/dist/packages/firestore/src/model/collections.d.ts +3 -1
- package/dist/packages/firestore/src/model/field_mask.d.ts +6 -0
- package/dist/packages/firestore/src/model/mutation.d.ts +19 -1
- package/dist/packages/firestore/src/model/mutation_batch.d.ts +9 -4
- package/dist/packages/firestore/src/model/values.d.ts +14 -2
- package/dist/packages/firestore/src/util/misc.d.ts +3 -0
- package/dist/packages/firestore/test/unit/local/counting_query_engine.d.ts +2 -1
- package/dist/packages/firestore/test/unit/local/test_document_overlay_cache.d.ts +1 -0
- package/dist/packages/firestore/test/unit/local/test_index_manager.d.ts +2 -2
- package/dist/packages/firestore/test/util/helpers.d.ts +12 -0
- package/dist/private.d.ts +5715 -5626
- package/package.json +20 -18
|
@@ -149,7 +149,19 @@ export declare abstract class Mutation {
|
|
|
149
149
|
abstract readonly key: DocumentKey;
|
|
150
150
|
abstract readonly precondition: Precondition;
|
|
151
151
|
abstract readonly fieldTransforms: FieldTransform[];
|
|
152
|
+
/**
|
|
153
|
+
* Returns a `FieldMask` representing the fields that will be changed by
|
|
154
|
+
* applying this mutation. Returns `null` if the mutation will overwrite the
|
|
155
|
+
* entire document.
|
|
156
|
+
*/
|
|
157
|
+
abstract getFieldMask(): FieldMask | null;
|
|
152
158
|
}
|
|
159
|
+
/**
|
|
160
|
+
* A utility method to calculate a `Mutation` representing the overlay from the
|
|
161
|
+
* final state of the document, and a `FieldMask` representing the fields that
|
|
162
|
+
* are mutated by the local mutations.
|
|
163
|
+
*/
|
|
164
|
+
export declare function calculateOverlayMutation(doc: MutableDocument, mask: FieldMask | null): Mutation | null;
|
|
153
165
|
/**
|
|
154
166
|
* Applies this mutation to the given document for the purposes of computing a
|
|
155
167
|
* new remote document. If the input document doesn't match the expected state
|
|
@@ -172,10 +184,12 @@ export declare function mutationApplyToRemoteDocument(mutation: Mutation, docume
|
|
|
172
184
|
* @param document - The document to mutate. The input document can be an
|
|
173
185
|
* invalid document if the client has no knowledge of the pre-mutation state
|
|
174
186
|
* of the document.
|
|
187
|
+
* @param previousMask - The fields that have been updated before applying this mutation.
|
|
175
188
|
* @param localWriteTime - A timestamp indicating the local write time of the
|
|
176
189
|
* batch this mutation is a part of.
|
|
190
|
+
* @returns A `FieldMask` representing the fields that are changed by applying this mutation.
|
|
177
191
|
*/
|
|
178
|
-
export declare function mutationApplyToLocalView(mutation: Mutation, document: MutableDocument, localWriteTime: Timestamp):
|
|
192
|
+
export declare function mutationApplyToLocalView(mutation: Mutation, document: MutableDocument, previousMask: FieldMask | null, localWriteTime: Timestamp): FieldMask | null;
|
|
179
193
|
/**
|
|
180
194
|
* If this mutation is not idempotent, returns the base value to persist with
|
|
181
195
|
* this mutation. If a base value is returned, the mutation is always applied
|
|
@@ -205,6 +219,7 @@ export declare class SetMutation extends Mutation {
|
|
|
205
219
|
readonly fieldTransforms: FieldTransform[];
|
|
206
220
|
constructor(key: DocumentKey, value: ObjectValue, precondition: Precondition, fieldTransforms?: FieldTransform[]);
|
|
207
221
|
readonly type: MutationType;
|
|
222
|
+
getFieldMask(): FieldMask | null;
|
|
208
223
|
}
|
|
209
224
|
/**
|
|
210
225
|
* A mutation that modifies fields of the document at the given key with the
|
|
@@ -227,6 +242,7 @@ export declare class PatchMutation extends Mutation {
|
|
|
227
242
|
readonly fieldTransforms: FieldTransform[];
|
|
228
243
|
constructor(key: DocumentKey, data: ObjectValue, fieldMask: FieldMask, precondition: Precondition, fieldTransforms?: FieldTransform[]);
|
|
229
244
|
readonly type: MutationType;
|
|
245
|
+
getFieldMask(): FieldMask | null;
|
|
230
246
|
}
|
|
231
247
|
/** A mutation that deletes the document at the given key. */
|
|
232
248
|
export declare class DeleteMutation extends Mutation {
|
|
@@ -235,6 +251,7 @@ export declare class DeleteMutation extends Mutation {
|
|
|
235
251
|
constructor(key: DocumentKey, precondition: Precondition);
|
|
236
252
|
readonly type: MutationType;
|
|
237
253
|
readonly fieldTransforms: FieldTransform[];
|
|
254
|
+
getFieldMask(): FieldMask | null;
|
|
238
255
|
}
|
|
239
256
|
/**
|
|
240
257
|
* A mutation that verifies the existence of the document at the given key with
|
|
@@ -249,4 +266,5 @@ export declare class VerifyMutation extends Mutation {
|
|
|
249
266
|
constructor(key: DocumentKey, precondition: Precondition);
|
|
250
267
|
readonly type: MutationType;
|
|
251
268
|
readonly fieldTransforms: FieldTransform[];
|
|
269
|
+
getFieldMask(): FieldMask | null;
|
|
252
270
|
}
|
|
@@ -17,8 +17,10 @@
|
|
|
17
17
|
import { SnapshotVersion } from '../core/snapshot_version';
|
|
18
18
|
import { BatchId } from '../core/types';
|
|
19
19
|
import { Timestamp } from '../lite-api/timestamp';
|
|
20
|
-
import {
|
|
20
|
+
import { OverlayedDocument } from '../local/overlayed_document';
|
|
21
|
+
import { DocumentKeySet, MutationMap, DocumentVersionMap, DocumentKeyMap } from './collections';
|
|
21
22
|
import { MutableDocument } from './document';
|
|
23
|
+
import { FieldMask } from './field_mask';
|
|
22
24
|
import { Mutation, MutationResult } from './mutation';
|
|
23
25
|
/**
|
|
24
26
|
* A batch of mutations that will be sent as one unit to the backend.
|
|
@@ -54,13 +56,16 @@ export declare class MutationBatch {
|
|
|
54
56
|
* batch.
|
|
55
57
|
*
|
|
56
58
|
* @param document - The document to apply mutations to.
|
|
59
|
+
* @param mutatedFields - Fields that have been updated before applying this mutation batch.
|
|
60
|
+
* @returns A `FieldMask` representing all the fields that are mutated.
|
|
57
61
|
*/
|
|
58
|
-
applyToLocalView(document: MutableDocument):
|
|
62
|
+
applyToLocalView(document: MutableDocument, mutatedFields: FieldMask | null): FieldMask | null;
|
|
59
63
|
/**
|
|
60
64
|
* Computes the local view for all provided documents given the mutations in
|
|
61
|
-
* this batch.
|
|
65
|
+
* this batch. Returns a `DocumentKey` to `Mutation` map which can be used to
|
|
66
|
+
* replace all the mutation applications.
|
|
62
67
|
*/
|
|
63
|
-
applyToLocalDocumentSet(documentMap:
|
|
68
|
+
applyToLocalDocumentSet(documentMap: DocumentKeyMap<OverlayedDocument>, documentsWithoutRemoteVersion: DocumentKeySet): MutationMap;
|
|
64
69
|
keys(): DocumentKeySet;
|
|
65
70
|
isEqual(other: MutationBatch): boolean;
|
|
66
71
|
}
|
|
@@ -81,5 +81,17 @@ export declare function isMaxValue(value: Value): boolean;
|
|
|
81
81
|
export declare function valuesGetLowerBound(value: Value): Value;
|
|
82
82
|
/** Returns the largest value for the given value type (exclusive). */
|
|
83
83
|
export declare function valuesGetUpperBound(value: Value): Value;
|
|
84
|
-
export declare function
|
|
85
|
-
|
|
84
|
+
export declare function lowerBoundCompare(left: {
|
|
85
|
+
value: Value;
|
|
86
|
+
inclusive: boolean;
|
|
87
|
+
}, right: {
|
|
88
|
+
value: Value;
|
|
89
|
+
inclusive: boolean;
|
|
90
|
+
}): number;
|
|
91
|
+
export declare function upperBoundCompare(left: {
|
|
92
|
+
value: Value;
|
|
93
|
+
inclusive: boolean;
|
|
94
|
+
}, right: {
|
|
95
|
+
value: Value;
|
|
96
|
+
inclusive: boolean;
|
|
97
|
+
}): number;
|
|
@@ -25,6 +25,9 @@ export declare function primitiveComparator<T>(left: T, right: T): number;
|
|
|
25
25
|
export interface Equatable<T> {
|
|
26
26
|
isEqual(other: T): boolean;
|
|
27
27
|
}
|
|
28
|
+
export interface Iterable<V> {
|
|
29
|
+
forEach: (cb: (v: V) => void) => void;
|
|
30
|
+
}
|
|
28
31
|
/** Helper to compare arrays using isEqual(). */
|
|
29
32
|
export declare function arrayEquals<T>(left: T[], right: T[], comparator: (l: T, r: T) => boolean): boolean;
|
|
30
33
|
/**
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import { Query } from '../../../src/core/query';
|
|
18
18
|
import { SnapshotVersion } from '../../../src/core/snapshot_version';
|
|
19
|
+
import { IndexManager } from '../../../src/local/index_manager';
|
|
19
20
|
import { LocalDocumentsView } from '../../../src/local/local_documents_view';
|
|
20
21
|
import { PersistencePromise } from '../../../src/local/persistence_promise';
|
|
21
22
|
import { PersistenceTransaction } from '../../../src/local/persistence_transaction';
|
|
@@ -51,7 +52,7 @@ export declare class CountingQueryEngine extends QueryEngine {
|
|
|
51
52
|
documentsReadByKey: number;
|
|
52
53
|
resetCounts(): void;
|
|
53
54
|
getDocumentsMatchingQuery(transaction: PersistenceTransaction, query: Query, lastLimboFreeSnapshotVersion: SnapshotVersion, remoteKeys: DocumentKeySet): PersistencePromise<DocumentMap>;
|
|
54
|
-
|
|
55
|
+
initialize(localDocuments: LocalDocumentsView, indexManager: IndexManager): void;
|
|
55
56
|
private wrapRemoteDocumentCache;
|
|
56
57
|
private wrapMutationQueue;
|
|
57
58
|
}
|
|
@@ -31,6 +31,7 @@ export declare class TestDocumentOverlayCache {
|
|
|
31
31
|
constructor(persistence: Persistence, cache: DocumentOverlayCache);
|
|
32
32
|
saveOverlays(largestBatch: number, data: MutationMap): Promise<void>;
|
|
33
33
|
getOverlay(key: DocumentKey): Promise<Overlay | null>;
|
|
34
|
+
getOverlays(keys: DocumentKeySet): Promise<OverlayMap>;
|
|
34
35
|
getOverlayMutation(docKey: string): Promise<Mutation | null>;
|
|
35
36
|
getOverlaysForCollection(path: ResourcePath, sinceBatchId: number): Promise<OverlayMap>;
|
|
36
37
|
getOverlaysForCollectionGroup(collectionGroup: string, sinceBatchId: number, count: number): Promise<OverlayMap>;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import { Target } from '../../../src/core/target';
|
|
18
|
-
import { IndexManager } from '../../../src/local/index_manager';
|
|
18
|
+
import { IndexManager, IndexType } from '../../../src/local/index_manager';
|
|
19
19
|
import { Persistence } from '../../../src/local/persistence';
|
|
20
20
|
import { DocumentMap } from '../../../src/model/collections';
|
|
21
21
|
import { DocumentKey } from '../../../src/model/document_key';
|
|
@@ -34,7 +34,7 @@ export declare class TestIndexManager {
|
|
|
34
34
|
addFieldIndex(index: FieldIndex): Promise<void>;
|
|
35
35
|
deleteFieldIndex(index: FieldIndex): Promise<void>;
|
|
36
36
|
getFieldIndexes(collectionGroup?: string): Promise<FieldIndex[]>;
|
|
37
|
-
|
|
37
|
+
getIndexType(target: Target): Promise<IndexType>;
|
|
38
38
|
getDocumentsMatchingTarget(target: Target): Promise<DocumentKey[] | null>;
|
|
39
39
|
getNextCollectionGroupToUpdate(): Promise<string | null>;
|
|
40
40
|
updateCollectionGroup(collectionGroup: string, offset: IndexOffset): Promise<void>;
|
|
@@ -69,6 +69,7 @@ export declare function blob(...bytes: number[]): Bytes;
|
|
|
69
69
|
export declare function filter(path: string, op: string, value: unknown): FieldFilter;
|
|
70
70
|
export declare function setMutation(keyStr: string, json: JsonObject<unknown>): SetMutation;
|
|
71
71
|
export declare function patchMutation(keyStr: string, json: JsonObject<unknown>, precondition?: Precondition): PatchMutation;
|
|
72
|
+
export declare function mergeMutation(keyStr: string, json: JsonObject<unknown>, updateMask: FieldPath[]): PatchMutation;
|
|
72
73
|
export declare function deleteMutation(keyStr: string): DeleteMutation;
|
|
73
74
|
export declare function mutationResult(testVersion: TestSnapshotVersion): MutationResult;
|
|
74
75
|
export declare function bound(values: unknown[], inclusive: boolean): Bound;
|
|
@@ -177,3 +178,14 @@ export declare function expectSetToEqual<T>(set: SortedSet<T>, arr: T[]): void;
|
|
|
177
178
|
export declare function expectEqualitySets<T>(elems: T[][], equalityFn: (v1: T, v2: T) => boolean, stringifyFn?: (v: T) => string): void;
|
|
178
179
|
export declare function validateFirestoreError(expectedCode: Code, actualError: Error): void;
|
|
179
180
|
export declare function forEachNumber<V>(obj: Dict<V>, fn: (key: number, val: V) => void): void;
|
|
181
|
+
/**
|
|
182
|
+
* Returns all possible permutations of the given array.
|
|
183
|
+
* For `[a, b]`, this method returns `[[a, b], [b, a]]`.
|
|
184
|
+
*/
|
|
185
|
+
export declare function computePermutations<T>(input: T[]): T[][];
|
|
186
|
+
/**
|
|
187
|
+
* Returns all possible combinations of the given array, including an empty
|
|
188
|
+
* array. For `[a, b, c]` this method returns
|
|
189
|
+
* `[[], [a], [a, b], [a, c], [b, c], [a, b, c]`.
|
|
190
|
+
*/
|
|
191
|
+
export declare function computeCombinations<T>(input: T[]): T[][];
|