@firebase/firestore 3.4.9-canary.aa44d529e → 3.4.9-canary.abcab980c
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/dist/firestore/src/api/transaction.d.ts +2 -0
- package/dist/firestore/src/core/component_provider.d.ts +11 -6
- package/dist/firestore/src/lite-api/transaction.d.ts +2 -0
- package/dist/firestore/src/local/document_overlay_cache.d.ts +5 -0
- package/dist/firestore/src/local/index_backfiller.d.ts +44 -0
- package/dist/firestore/src/local/index_manager.d.ts +2 -0
- package/dist/firestore/src/local/indexeddb_document_overlay_cache.d.ts +1 -0
- package/dist/firestore/src/local/indexeddb_index_manager.d.ts +1 -0
- package/dist/firestore/src/local/indexeddb_schema.d.ts +3 -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 +64 -9
- package/dist/firestore/src/local/local_store.d.ts +9 -0
- package/dist/firestore/src/local/lru_garbage_collector_impl.d.ts +5 -5
- package/dist/firestore/src/local/memory_document_overlay_cache.d.ts +1 -0
- package/dist/firestore/src/local/memory_index_manager.d.ts +1 -0
- package/dist/firestore/src/local/overlayed_document.d.ts +36 -0
- package/dist/firestore/src/local/persistence.d.ts +3 -5
- package/dist/firestore/src/local/persistence_promise.d.ts +11 -0
- package/dist/firestore/src/local/query_engine.d.ts +1 -1
- package/dist/firestore/src/model/collections.d.ts +8 -2
- 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 +8 -4
- package/dist/firestore/src/util/async_queue.d.ts +5 -1
- package/dist/firestore/test/unit/local/index_backfiller.test.d.ts +17 -0
- package/dist/firestore/test/unit/local/test_document_overlay_cache.d.ts +1 -0
- package/dist/firestore/test/unit/specs/spec_test_components.d.ts +5 -3
- package/dist/firestore/test/util/helpers.d.ts +13 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.esm2017.js +10689 -10296
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +9353 -8844
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +6738 -6123
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +6738 -6123
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +9818 -9424
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +190 -17
- package/dist/lite/firestore/src/api/transaction.d.ts +2 -0
- package/dist/lite/firestore/src/core/component_provider.d.ts +11 -6
- package/dist/lite/firestore/src/lite-api/transaction.d.ts +2 -0
- package/dist/lite/firestore/src/local/document_overlay_cache.d.ts +5 -0
- package/dist/lite/firestore/src/local/index_backfiller.d.ts +44 -0
- package/dist/lite/firestore/src/local/index_manager.d.ts +2 -0
- 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 +1 -0
- package/dist/lite/firestore/src/local/indexeddb_schema.d.ts +3 -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 +64 -9
- package/dist/lite/firestore/src/local/local_store.d.ts +9 -0
- package/dist/lite/firestore/src/local/lru_garbage_collector_impl.d.ts +5 -5
- 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 +1 -0
- package/dist/lite/firestore/src/local/overlayed_document.d.ts +36 -0
- package/dist/lite/firestore/src/local/persistence.d.ts +3 -5
- package/dist/lite/firestore/src/local/persistence_promise.d.ts +11 -0
- package/dist/lite/firestore/src/local/query_engine.d.ts +1 -1
- package/dist/lite/firestore/src/model/collections.d.ts +8 -2
- 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 +8 -4
- package/dist/lite/firestore/src/util/async_queue.d.ts +5 -1
- package/dist/lite/firestore/test/unit/local/index_backfiller.test.d.ts +17 -0
- package/dist/lite/firestore/test/unit/local/test_document_overlay_cache.d.ts +1 -0
- package/dist/lite/firestore/test/unit/specs/spec_test_components.d.ts +5 -3
- package/dist/lite/firestore/test/util/helpers.d.ts +13 -0
- package/dist/lite/index.browser.esm2017.js +1220 -738
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +1156 -764
- package/dist/lite/index.browser.esm5.js.map +1 -1
- package/dist/lite/index.d.ts +2 -0
- package/dist/lite/index.node.cjs.js +655 -2
- package/dist/lite/index.node.cjs.js.map +1 -1
- package/dist/lite/index.node.mjs +655 -2
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +1184 -702
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/internal.d.ts +19 -1
- package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +106 -104
- package/dist/lite/packages/firestore/src/api/transaction.d.ts +2 -0
- package/dist/lite/packages/firestore/src/core/component_provider.d.ts +11 -6
- package/dist/lite/packages/firestore/src/lite-api/transaction.d.ts +2 -0
- package/dist/lite/packages/firestore/src/local/document_overlay_cache.d.ts +5 -0
- package/dist/lite/packages/firestore/src/local/index_backfiller.d.ts +44 -0
- package/dist/lite/packages/firestore/src/local/index_manager.d.ts +2 -0
- 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 +1 -0
- package/dist/lite/packages/firestore/src/local/indexeddb_schema.d.ts +3 -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 +64 -9
- package/dist/lite/packages/firestore/src/local/local_store.d.ts +9 -0
- package/dist/lite/packages/firestore/src/local/lru_garbage_collector_impl.d.ts +5 -5
- 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 +1 -0
- package/dist/lite/packages/firestore/src/local/overlayed_document.d.ts +36 -0
- package/dist/lite/packages/firestore/src/local/persistence.d.ts +3 -5
- package/dist/lite/packages/firestore/src/local/persistence_promise.d.ts +11 -0
- package/dist/lite/packages/firestore/src/local/query_engine.d.ts +1 -1
- package/dist/lite/packages/firestore/src/model/collections.d.ts +8 -2
- 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 +8 -4
- package/dist/lite/packages/firestore/src/util/async_queue.d.ts +5 -1
- package/dist/lite/packages/firestore/test/unit/local/index_backfiller.test.d.ts +17 -0
- package/dist/lite/packages/firestore/test/unit/local/test_document_overlay_cache.d.ts +1 -0
- package/dist/lite/packages/firestore/test/unit/specs/spec_test_components.d.ts +5 -3
- package/dist/lite/packages/firestore/test/util/helpers.d.ts +13 -0
- package/dist/lite/private.d.ts +19 -1
- package/dist/packages/firestore/dist/index.esm2017.d.ts +203 -201
- package/dist/packages/firestore/src/api/transaction.d.ts +2 -0
- package/dist/packages/firestore/src/core/component_provider.d.ts +11 -6
- package/dist/packages/firestore/src/lite-api/transaction.d.ts +2 -0
- package/dist/packages/firestore/src/local/document_overlay_cache.d.ts +5 -0
- package/dist/packages/firestore/src/local/index_backfiller.d.ts +44 -0
- package/dist/packages/firestore/src/local/index_manager.d.ts +2 -0
- 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 +1 -0
- package/dist/packages/firestore/src/local/indexeddb_schema.d.ts +3 -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 +64 -9
- package/dist/packages/firestore/src/local/local_store.d.ts +9 -0
- package/dist/packages/firestore/src/local/lru_garbage_collector_impl.d.ts +5 -5
- 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 +1 -0
- package/dist/packages/firestore/src/local/overlayed_document.d.ts +36 -0
- package/dist/packages/firestore/src/local/persistence.d.ts +3 -5
- package/dist/packages/firestore/src/local/persistence_promise.d.ts +11 -0
- package/dist/packages/firestore/src/local/query_engine.d.ts +1 -1
- package/dist/packages/firestore/src/model/collections.d.ts +8 -2
- 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 +8 -4
- package/dist/packages/firestore/src/util/async_queue.d.ts +5 -1
- package/dist/packages/firestore/test/unit/local/index_backfiller.test.d.ts +17 -0
- package/dist/packages/firestore/test/unit/local/test_document_overlay_cache.d.ts +1 -0
- package/dist/packages/firestore/test/unit/specs/spec_test_components.d.ts +5 -3
- package/dist/packages/firestore/test/util/helpers.d.ts +13 -0
- package/dist/private.d.ts +190 -17
- package/package.json +15 -13
|
@@ -20,8 +20,9 @@ import { Observer } from '../../../src/core/event_manager';
|
|
|
20
20
|
import { Query } from '../../../src/core/query';
|
|
21
21
|
import { ViewSnapshot } from '../../../src/core/view_snapshot';
|
|
22
22
|
import { IndexedDbPersistence } from '../../../src/local/indexeddb_persistence';
|
|
23
|
+
import { LocalStore } from '../../../src/local/local_store';
|
|
23
24
|
import { MemoryPersistence } from '../../../src/local/memory_persistence';
|
|
24
|
-
import {
|
|
25
|
+
import { Scheduler, Persistence } from '../../../src/local/persistence';
|
|
25
26
|
import { PersistencePromise } from '../../../src/local/persistence_promise';
|
|
26
27
|
import { PersistenceTransaction, PersistenceTransactionMode } from '../../../src/local/persistence_transaction';
|
|
27
28
|
import { SharedClientState } from '../../../src/local/shared_client_state';
|
|
@@ -62,7 +63,8 @@ export declare class MockMultiTabOfflineComponentProvider extends MultiTabOfflin
|
|
|
62
63
|
private readonly document;
|
|
63
64
|
persistence: MockIndexedDbPersistence;
|
|
64
65
|
constructor(window: WindowLike, document: FakeDocument, onlineComponentProvider: OnlineComponentProvider);
|
|
65
|
-
createGarbageCollectionScheduler(cfg: ComponentConfiguration):
|
|
66
|
+
createGarbageCollectionScheduler(cfg: ComponentConfiguration, localStore: LocalStore): Scheduler | null;
|
|
67
|
+
createIndexBackfillerScheduler(cfg: ComponentConfiguration, localStore: LocalStore): Scheduler | null;
|
|
66
68
|
createSharedClientState(cfg: ComponentConfiguration): SharedClientState;
|
|
67
69
|
createPersistence(cfg: ComponentConfiguration): MockIndexedDbPersistence;
|
|
68
70
|
}
|
|
@@ -71,7 +73,7 @@ export declare class MockMemoryOfflineComponentProvider extends MemoryOfflineCom
|
|
|
71
73
|
persistence: MockMemoryPersistence;
|
|
72
74
|
connection: MockConnection;
|
|
73
75
|
constructor(gcEnabled: boolean);
|
|
74
|
-
createGarbageCollectionScheduler(cfg: ComponentConfiguration):
|
|
76
|
+
createGarbageCollectionScheduler(cfg: ComponentConfiguration): Scheduler | null;
|
|
75
77
|
createPersistence(cfg: ComponentConfiguration): Persistence;
|
|
76
78
|
}
|
|
77
79
|
export declare class MockConnection implements Connection {
|
|
@@ -63,12 +63,14 @@ export declare function fieldIndex(collectionGroup: string, options?: {
|
|
|
63
63
|
id?: number;
|
|
64
64
|
fields?: Array<[field: string, kind: IndexKind]>;
|
|
65
65
|
offset?: IndexOffset;
|
|
66
|
+
sequenceNumber?: number;
|
|
66
67
|
}): FieldIndex;
|
|
67
68
|
export declare function mask(...paths: string[]): FieldMask;
|
|
68
69
|
export declare function blob(...bytes: number[]): Bytes;
|
|
69
70
|
export declare function filter(path: string, op: string, value: unknown): FieldFilter;
|
|
70
71
|
export declare function setMutation(keyStr: string, json: JsonObject<unknown>): SetMutation;
|
|
71
72
|
export declare function patchMutation(keyStr: string, json: JsonObject<unknown>, precondition?: Precondition): PatchMutation;
|
|
73
|
+
export declare function mergeMutation(keyStr: string, json: JsonObject<unknown>, updateMask: FieldPath[]): PatchMutation;
|
|
72
74
|
export declare function deleteMutation(keyStr: string): DeleteMutation;
|
|
73
75
|
export declare function mutationResult(testVersion: TestSnapshotVersion): MutationResult;
|
|
74
76
|
export declare function bound(values: unknown[], inclusive: boolean): Bound;
|
|
@@ -177,3 +179,14 @@ export declare function expectSetToEqual<T>(set: SortedSet<T>, arr: T[]): void;
|
|
|
177
179
|
export declare function expectEqualitySets<T>(elems: T[][], equalityFn: (v1: T, v2: T) => boolean, stringifyFn?: (v: T) => string): void;
|
|
178
180
|
export declare function validateFirestoreError(expectedCode: Code, actualError: Error): void;
|
|
179
181
|
export declare function forEachNumber<V>(obj: Dict<V>, fn: (key: number, val: V) => void): void;
|
|
182
|
+
/**
|
|
183
|
+
* Returns all possible permutations of the given array.
|
|
184
|
+
* For `[a, b]`, this method returns `[[a, b], [b, a]]`.
|
|
185
|
+
*/
|
|
186
|
+
export declare function computePermutations<T>(input: T[]): T[][];
|
|
187
|
+
/**
|
|
188
|
+
* Returns all possible combinations of the given array, including an empty
|
|
189
|
+
* array. For `[a, b, c]` this method returns
|
|
190
|
+
* `[[], [a], [a, b], [a, c], [b, c], [a, b, c]`.
|
|
191
|
+
*/
|
|
192
|
+
export declare function computeCombinations<T>(input: T[]): T[][];
|
package/dist/lite/private.d.ts
CHANGED
|
@@ -770,6 +770,12 @@ declare type FieldFilterOp = 'OPERATOR_UNSPECIFIED' | 'LESS_THAN' | 'LESS_THAN_O
|
|
|
770
770
|
declare class FieldMask {
|
|
771
771
|
readonly fields: FieldPath_2[];
|
|
772
772
|
constructor(fields: FieldPath_2[]);
|
|
773
|
+
static empty(): FieldMask;
|
|
774
|
+
/**
|
|
775
|
+
* Returns a new FieldMask object that is the result of adding all the given
|
|
776
|
+
* fields paths to this field mask.
|
|
777
|
+
*/
|
|
778
|
+
unionWith(extraFields: FieldPath_2[]): FieldMask;
|
|
773
779
|
/**
|
|
774
780
|
* Verifies that `fieldPath` is included by at least one field in this field
|
|
775
781
|
* mask.
|
|
@@ -1614,6 +1620,12 @@ declare abstract class Mutation {
|
|
|
1614
1620
|
abstract readonly key: DocumentKey;
|
|
1615
1621
|
abstract readonly precondition: Precondition;
|
|
1616
1622
|
abstract readonly fieldTransforms: FieldTransform[];
|
|
1623
|
+
/**
|
|
1624
|
+
* Returns a `FieldMask` representing the fields that will be changed by
|
|
1625
|
+
* applying this mutation. Returns `null` if the mutation will overwrite the
|
|
1626
|
+
* entire document.
|
|
1627
|
+
*/
|
|
1628
|
+
abstract getFieldMask(): FieldMask | null;
|
|
1617
1629
|
}
|
|
1618
1630
|
|
|
1619
1631
|
declare const enum MutationType {
|
|
@@ -1965,6 +1977,8 @@ export declare function refEqual<T>(left: DocumentReference<T> | CollectionRefer
|
|
|
1965
1977
|
* transaction against.
|
|
1966
1978
|
* @param updateFunction - The function to execute within the transaction
|
|
1967
1979
|
* context.
|
|
1980
|
+
* @param options - An options object to configure maximum number of attempts to
|
|
1981
|
+
* commit.
|
|
1968
1982
|
* @returns If the transaction completed successfully or was explicitly aborted
|
|
1969
1983
|
* (the `updateFunction` returned a failed promise), the promise returned by the
|
|
1970
1984
|
* `updateFunction `is returned here. Otherwise, if the transaction failed, a
|
|
@@ -2209,7 +2223,11 @@ declare const enum TimerId {
|
|
|
2209
2223
|
* A timer used to retry operations scheduled via retryable AsyncQueue
|
|
2210
2224
|
* operations.
|
|
2211
2225
|
*/
|
|
2212
|
-
AsyncQueueRetry = "async_queue_retry"
|
|
2226
|
+
AsyncQueueRetry = "async_queue_retry",
|
|
2227
|
+
/**
|
|
2228
|
+
* A timer used to periodically attempt index backfill.
|
|
2229
|
+
*/
|
|
2230
|
+
IndexBackfill = "index_backfill"
|
|
2213
2231
|
}
|
|
2214
2232
|
|
|
2215
2233
|
/**
|