@firebase/firestore 3.4.3 → 3.4.4-canary.0482aa5b7
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/src/api/database.d.ts +14 -9
- package/dist/firestore/src/api/{query.d.ts → filter.d.ts} +0 -0
- package/dist/firestore/src/api/index_configuration.d.ts +117 -0
- package/dist/firestore/src/api/snapshot.d.ts +1 -2
- package/dist/firestore/src/api.d.ts +2 -1
- package/dist/firestore/src/core/database_info.d.ts +1 -0
- package/dist/firestore/src/core/firestore_client.d.ts +2 -0
- package/dist/firestore/src/core/target.d.ts +34 -5
- package/dist/firestore/src/lite-api/query.d.ts +2 -2
- package/dist/firestore/src/local/index_manager.d.ts +52 -0
- package/dist/firestore/src/local/indexeddb_index_manager.d.ts +11 -0
- package/dist/firestore/src/local/indexeddb_schema.d.ts +121 -7
- package/dist/firestore/src/local/local_serializer.d.ts +1 -1
- package/dist/firestore/src/local/memory_index_manager.d.ts +11 -0
- package/dist/firestore/src/local/remote_document_change_buffer.d.ts +3 -12
- package/dist/firestore/src/model/document.d.ts +7 -0
- package/dist/firestore/src/model/document_key.d.ts +1 -0
- package/dist/firestore/src/model/field_index.d.ts +156 -0
- package/dist/firestore/src/model/values.d.ts +7 -0
- package/dist/firestore/test/integration/api/index_configuration.test.d.ts +17 -0
- package/dist/firestore/test/unit/local/test_remote_document_cache.d.ts +1 -1
- package/dist/firestore/test/unit/model/field_index.test.d.ts +17 -0
- package/dist/firestore/test/unit/model/target.test.d.ts +17 -0
- package/dist/firestore/test/util/helpers.d.ts +8 -2
- package/dist/index.d.ts +16 -11
- package/dist/index.esm2017.js +2979 -2671
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +3036 -2815
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +644 -235
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +644 -236
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +2761 -2449
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +303 -25
- package/dist/lite/firestore/src/api/database.d.ts +14 -9
- package/dist/lite/firestore/src/api/{query.d.ts → filter.d.ts} +0 -0
- package/dist/lite/firestore/src/api/index_configuration.d.ts +117 -0
- package/dist/lite/firestore/src/api/snapshot.d.ts +1 -2
- package/dist/lite/firestore/src/api.d.ts +2 -1
- package/dist/lite/firestore/src/core/database_info.d.ts +1 -0
- package/dist/lite/firestore/src/core/firestore_client.d.ts +2 -0
- package/dist/lite/firestore/src/core/target.d.ts +34 -5
- package/dist/lite/firestore/src/lite-api/query.d.ts +2 -2
- package/dist/lite/firestore/src/local/index_manager.d.ts +52 -0
- package/dist/lite/firestore/src/local/indexeddb_index_manager.d.ts +11 -0
- package/dist/lite/firestore/src/local/indexeddb_schema.d.ts +121 -7
- package/dist/lite/firestore/src/local/local_serializer.d.ts +1 -1
- package/dist/lite/firestore/src/local/memory_index_manager.d.ts +11 -0
- package/dist/lite/firestore/src/local/remote_document_change_buffer.d.ts +3 -12
- package/dist/lite/firestore/src/model/document.d.ts +7 -0
- package/dist/lite/firestore/src/model/document_key.d.ts +1 -0
- package/dist/lite/firestore/src/model/field_index.d.ts +156 -0
- package/dist/lite/firestore/src/model/values.d.ts +7 -0
- package/dist/lite/firestore/test/integration/api/index_configuration.test.d.ts +17 -0
- package/dist/lite/firestore/test/unit/local/test_remote_document_cache.d.ts +1 -1
- package/dist/lite/firestore/test/unit/model/field_index.test.d.ts +17 -0
- package/dist/lite/firestore/test/unit/model/target.test.d.ts +17 -0
- package/dist/lite/firestore/test/util/helpers.d.ts +8 -2
- package/dist/lite/index.browser.esm2017.js +352 -338
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +334 -326
- package/dist/lite/index.browser.esm5.js.map +1 -1
- package/dist/lite/index.node.cjs.js +53 -34
- package/dist/lite/index.node.cjs.js.map +1 -1
- package/dist/lite/index.node.mjs +53 -34
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +318 -304
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/internal.d.ts +11 -2
- package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +98 -97
- package/dist/lite/packages/firestore/src/api/database.d.ts +14 -9
- package/dist/lite/packages/firestore/src/api/{query.d.ts → filter.d.ts} +0 -0
- package/dist/lite/packages/firestore/src/api/index_configuration.d.ts +117 -0
- package/dist/lite/packages/firestore/src/api/snapshot.d.ts +1 -2
- package/dist/lite/packages/firestore/src/api.d.ts +2 -1
- package/dist/lite/packages/firestore/src/core/database_info.d.ts +1 -0
- package/dist/lite/packages/firestore/src/core/firestore_client.d.ts +2 -0
- package/dist/lite/packages/firestore/src/core/target.d.ts +34 -5
- package/dist/lite/packages/firestore/src/lite-api/query.d.ts +2 -2
- package/dist/lite/packages/firestore/src/local/index_manager.d.ts +52 -0
- package/dist/lite/packages/firestore/src/local/indexeddb_index_manager.d.ts +11 -0
- package/dist/lite/packages/firestore/src/local/indexeddb_schema.d.ts +121 -7
- package/dist/lite/packages/firestore/src/local/local_serializer.d.ts +1 -1
- package/dist/lite/packages/firestore/src/local/memory_index_manager.d.ts +11 -0
- package/dist/lite/packages/firestore/src/local/remote_document_change_buffer.d.ts +3 -12
- package/dist/lite/packages/firestore/src/model/document.d.ts +7 -0
- package/dist/lite/packages/firestore/src/model/document_key.d.ts +1 -0
- package/dist/lite/packages/firestore/src/model/field_index.d.ts +156 -0
- package/dist/lite/packages/firestore/src/model/values.d.ts +7 -0
- package/dist/lite/packages/firestore/test/integration/api/index_configuration.test.d.ts +17 -0
- package/dist/lite/packages/firestore/test/unit/local/test_remote_document_cache.d.ts +1 -1
- package/dist/lite/packages/firestore/test/unit/model/field_index.test.d.ts +17 -0
- package/dist/lite/packages/firestore/test/unit/model/target.test.d.ts +17 -0
- package/dist/lite/packages/firestore/test/util/helpers.d.ts +8 -2
- package/dist/lite/private.d.ts +9 -2
- package/dist/packages/firestore/dist/index.esm2017.d.ts +214 -191
- package/dist/packages/firestore/src/api/database.d.ts +14 -9
- package/dist/packages/firestore/src/api/{query.d.ts → filter.d.ts} +0 -0
- package/dist/packages/firestore/src/api/index_configuration.d.ts +117 -0
- package/dist/packages/firestore/src/api/snapshot.d.ts +1 -2
- package/dist/packages/firestore/src/api.d.ts +2 -1
- package/dist/packages/firestore/src/core/database_info.d.ts +1 -0
- package/dist/packages/firestore/src/core/firestore_client.d.ts +2 -0
- package/dist/packages/firestore/src/core/target.d.ts +34 -5
- package/dist/packages/firestore/src/lite-api/query.d.ts +2 -2
- package/dist/packages/firestore/src/local/index_manager.d.ts +52 -0
- package/dist/packages/firestore/src/local/indexeddb_index_manager.d.ts +11 -0
- package/dist/packages/firestore/src/local/indexeddb_schema.d.ts +121 -7
- package/dist/packages/firestore/src/local/local_serializer.d.ts +1 -1
- package/dist/packages/firestore/src/local/memory_index_manager.d.ts +11 -0
- package/dist/packages/firestore/src/local/remote_document_change_buffer.d.ts +3 -12
- package/dist/packages/firestore/src/model/document.d.ts +7 -0
- package/dist/packages/firestore/src/model/document_key.d.ts +1 -0
- package/dist/packages/firestore/src/model/field_index.d.ts +156 -0
- package/dist/packages/firestore/src/model/values.d.ts +7 -0
- package/dist/packages/firestore/test/integration/api/index_configuration.test.d.ts +17 -0
- package/dist/packages/firestore/test/unit/local/test_remote_document_cache.d.ts +1 -1
- package/dist/packages/firestore/test/unit/model/field_index.test.d.ts +17 -0
- package/dist/packages/firestore/test/unit/model/target.test.d.ts +17 -0
- package/dist/packages/firestore/test/util/helpers.d.ts +8 -2
- package/dist/private.d.ts +205 -25
- package/package.json +10 -10
package/dist/internal.d.ts
CHANGED
|
@@ -214,8 +214,8 @@ declare type BatchId = number;
|
|
|
214
214
|
*/
|
|
215
215
|
declare class Bound {
|
|
216
216
|
readonly position: Value[];
|
|
217
|
-
readonly
|
|
218
|
-
constructor(position: Value[],
|
|
217
|
+
readonly inclusive: boolean;
|
|
218
|
+
constructor(position: Value[], inclusive: boolean);
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
/**
|
|
@@ -623,6 +623,7 @@ export declare class _DatabaseId {
|
|
|
623
623
|
readonly projectId: string;
|
|
624
624
|
readonly database: string;
|
|
625
625
|
constructor(projectId: string, database?: string);
|
|
626
|
+
static empty(): _DatabaseId;
|
|
626
627
|
get isDefaultDatabase(): boolean;
|
|
627
628
|
isEqual(other: {}): boolean;
|
|
628
629
|
}
|
|
@@ -841,6 +842,11 @@ declare interface Document_2 {
|
|
|
841
842
|
* document was guaranteed to not exist.
|
|
842
843
|
*/
|
|
843
844
|
readonly version: SnapshotVersion;
|
|
845
|
+
/**
|
|
846
|
+
* The timestamp at which this document was read from the remote server. Uses
|
|
847
|
+
* `SnapshotVersion.min()` for documents created by the user.
|
|
848
|
+
*/
|
|
849
|
+
readonly readTime: SnapshotVersion;
|
|
844
850
|
/** The underlying data of this document or an empty value if no data exists. */
|
|
845
851
|
readonly data: ObjectValue;
|
|
846
852
|
/** Returns whether local mutations were applied via the mutation queue. */
|
|
@@ -931,6 +937,7 @@ export declare class _DocumentKey {
|
|
|
931
937
|
constructor(path: _ResourcePath);
|
|
932
938
|
static fromPath(path: string): _DocumentKey;
|
|
933
939
|
static fromName(name: string): _DocumentKey;
|
|
940
|
+
static empty(): _DocumentKey;
|
|
934
941
|
/** Returns true if the document is in the specified collectionId. */
|
|
935
942
|
hasCollectionId(collectionId: string): boolean;
|
|
936
943
|
isEqual(other: _DocumentKey | null): boolean;
|
|
@@ -1067,8 +1074,7 @@ export declare class DocumentSnapshot<T = DocumentData> extends DocumentSnapshot
|
|
|
1067
1074
|
/** @hideconstructor protected */
|
|
1068
1075
|
constructor(_firestore: Firestore, userDataWriter: AbstractUserDataWriter, key: _DocumentKey, document: Document_2 | null, metadata: SnapshotMetadata, converter: UntypedFirestoreDataConverter<T> | null);
|
|
1069
1076
|
/**
|
|
1070
|
-
*
|
|
1071
|
-
* exists. True if the document exists.
|
|
1077
|
+
* Returns whether or not the data exists. True if the document exists.
|
|
1072
1078
|
*/
|
|
1073
1079
|
exists(): this is QueryDocumentSnapshot<T>;
|
|
1074
1080
|
/**
|
|
@@ -1317,6 +1323,45 @@ export declare function executeWrite(firestore: Firestore, mutations: Mutation[]
|
|
|
1317
1323
|
|
|
1318
1324
|
declare type FieldFilterOp = 'OPERATOR_UNSPECIFIED' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL' | 'EQUAL' | 'NOT_EQUAL' | 'ARRAY_CONTAINS' | 'IN' | 'ARRAY_CONTAINS_ANY' | 'NOT_IN';
|
|
1319
1325
|
|
|
1326
|
+
/**
|
|
1327
|
+
* An index definition for field indexes in Firestore.
|
|
1328
|
+
*
|
|
1329
|
+
* Every index is associated with a collection. The definition contains a list
|
|
1330
|
+
* of fields and their index kind (which can be `ASCENDING`, `DESCENDING` or
|
|
1331
|
+
* `CONTAINS` for ArrayContains/ArrayContainsAny queries).
|
|
1332
|
+
*
|
|
1333
|
+
* Unlike the backend, the SDK does not differentiate between collection or
|
|
1334
|
+
* collection group-scoped indices. Every index can be used for both single
|
|
1335
|
+
* collection and collection group queries.
|
|
1336
|
+
*/
|
|
1337
|
+
declare class FieldIndex {
|
|
1338
|
+
/**
|
|
1339
|
+
* The index ID. Returns -1 if the index ID is not available (e.g. the index
|
|
1340
|
+
* has not yet been persisted).
|
|
1341
|
+
*/
|
|
1342
|
+
readonly indexId: number;
|
|
1343
|
+
/** The collection ID this index applies to. */
|
|
1344
|
+
readonly collectionGroup: string;
|
|
1345
|
+
/** The field segments for this index. */
|
|
1346
|
+
readonly segments: IndexSegment[];
|
|
1347
|
+
/** Shows how up-to-date the index is for the current user. */
|
|
1348
|
+
readonly indexState: IndexState_2;
|
|
1349
|
+
/** An ID for an index that has not yet been added to persistence. */
|
|
1350
|
+
static UNKNOWN_ID: number;
|
|
1351
|
+
constructor(
|
|
1352
|
+
/**
|
|
1353
|
+
* The index ID. Returns -1 if the index ID is not available (e.g. the index
|
|
1354
|
+
* has not yet been persisted).
|
|
1355
|
+
*/
|
|
1356
|
+
indexId: number,
|
|
1357
|
+
/** The collection ID this index applies to. */
|
|
1358
|
+
collectionGroup: string,
|
|
1359
|
+
/** The field segments for this index. */
|
|
1360
|
+
segments: IndexSegment[],
|
|
1361
|
+
/** Shows how up-to-date the index is for the current user. */
|
|
1362
|
+
indexState: IndexState_2);
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1320
1365
|
/**
|
|
1321
1366
|
* Provides a set of fields that can be used to partially patch a document.
|
|
1322
1367
|
* FieldMask is used in conjunction with ObjectValue.
|
|
@@ -1513,6 +1558,7 @@ declare class FirestoreClient {
|
|
|
1513
1558
|
private user;
|
|
1514
1559
|
private readonly clientId;
|
|
1515
1560
|
private authCredentialListener;
|
|
1561
|
+
private appCheckCredentialListener;
|
|
1516
1562
|
offlineComponents?: OfflineComponentProvider;
|
|
1517
1563
|
onlineComponents?: OnlineComponentProvider;
|
|
1518
1564
|
constructor(authCredentials: CredentialsProvider<User>, appCheckCredentials: CredentialsProvider<string>,
|
|
@@ -1527,6 +1573,7 @@ declare class FirestoreClient {
|
|
|
1527
1573
|
asyncQueue: AsyncQueue, databaseInfo: DatabaseInfo);
|
|
1528
1574
|
getConfiguration(): Promise<ComponentConfiguration>;
|
|
1529
1575
|
setCredentialChangeListener(listener: (user: User) => Promise<void>): void;
|
|
1576
|
+
setAppCheckTokenChangeListener(listener: (appCheckToken: string, user: User) => Promise<void>): void;
|
|
1530
1577
|
/**
|
|
1531
1578
|
* Checks that the client has not been terminated. Ensures that other methods on
|
|
1532
1579
|
* this class cannot be called after the client is terminated.
|
|
@@ -2300,8 +2347,74 @@ export declare function getFirestore(app?: FirebaseApp): Firestore;
|
|
|
2300
2347
|
*/
|
|
2301
2348
|
export declare function increment(n: number): FieldValue;
|
|
2302
2349
|
|
|
2350
|
+
/**
|
|
2351
|
+
* The SDK definition of a Firestore index.
|
|
2352
|
+
*
|
|
2353
|
+
* @internal
|
|
2354
|
+
*/
|
|
2355
|
+
declare interface Index {
|
|
2356
|
+
/** The ID of the collection to index. */
|
|
2357
|
+
readonly collectionGroup: string;
|
|
2358
|
+
/** A list of fields to index. */
|
|
2359
|
+
readonly fields?: IndexField[];
|
|
2360
|
+
[key: string]: unknown;
|
|
2361
|
+
}
|
|
2362
|
+
|
|
2363
|
+
/**
|
|
2364
|
+
* A list of Firestore indexes to speed up local query execution.
|
|
2365
|
+
*
|
|
2366
|
+
* See {@link https://firebase.google.com/docs/reference/firestore/indexes/#json_format | JSON Format}
|
|
2367
|
+
* for a description of the format of the index definition.
|
|
2368
|
+
*
|
|
2369
|
+
* @internal
|
|
2370
|
+
*/
|
|
2371
|
+
declare interface IndexConfiguration {
|
|
2372
|
+
/** A list of all Firestore indexes. */
|
|
2373
|
+
readonly indexes?: Index[];
|
|
2374
|
+
[key: string]: unknown;
|
|
2375
|
+
}
|
|
2376
|
+
|
|
2377
|
+
/**
|
|
2378
|
+
* A single field element in an index configuration.
|
|
2379
|
+
*
|
|
2380
|
+
* @internal
|
|
2381
|
+
*/
|
|
2382
|
+
declare interface IndexField {
|
|
2383
|
+
/** The field path to index. */
|
|
2384
|
+
readonly fieldPath: string;
|
|
2385
|
+
/**
|
|
2386
|
+
* What type of array index to create. Set to `CONTAINS` for `array-contains`
|
|
2387
|
+
* and `array-contains-any` indexes.
|
|
2388
|
+
*
|
|
2389
|
+
* Only one of `arrayConfig` or `order` should be set;
|
|
2390
|
+
*/
|
|
2391
|
+
readonly arrayConfig?: 'CONTAINS';
|
|
2392
|
+
/**
|
|
2393
|
+
* What type of array index to create. Set to `ASCENDING` or 'DESCENDING` for
|
|
2394
|
+
* `==`, `!=`, `<=`, `<=`, `in` and `not-in` filters.
|
|
2395
|
+
*
|
|
2396
|
+
* Only one of `arrayConfig` or `order` should be set.
|
|
2397
|
+
*/
|
|
2398
|
+
readonly order?: 'ASCENDING' | 'DESCENDING';
|
|
2399
|
+
[key: string]: unknown;
|
|
2400
|
+
}
|
|
2401
|
+
|
|
2303
2402
|
declare type IndexFieldMode = 'MODE_UNSPECIFIED' | 'ASCENDING' | 'DESCENDING';
|
|
2304
2403
|
|
|
2404
|
+
/** The type of the index, e.g. for which type of query it can be used. */
|
|
2405
|
+
declare const enum IndexKind {
|
|
2406
|
+
/**
|
|
2407
|
+
* Ordered index. Can be used for <, <=, ==, >=, >, !=, IN and NOT IN queries.
|
|
2408
|
+
*/
|
|
2409
|
+
ASCENDING = 0,
|
|
2410
|
+
/**
|
|
2411
|
+
* Ordered index. Can be used for <, <=, ==, >=, >, !=, IN and NOT IN queries.
|
|
2412
|
+
*/
|
|
2413
|
+
DESCENDING = 1,
|
|
2414
|
+
/** Contains index. Can be used for ArrayContains and ArrayContainsAny. */
|
|
2415
|
+
CONTAINS = 2
|
|
2416
|
+
}
|
|
2417
|
+
|
|
2305
2418
|
/**
|
|
2306
2419
|
* Represents a set of indexes that are used to execute queries efficiently.
|
|
2307
2420
|
*
|
|
@@ -2325,10 +2438,125 @@ declare interface IndexManager {
|
|
|
2325
2438
|
* path for a root-level collection).
|
|
2326
2439
|
*/
|
|
2327
2440
|
getCollectionParents(transaction: PersistenceTransaction, collectionId: string): PersistencePromise<_ResourcePath[]>;
|
|
2441
|
+
/**
|
|
2442
|
+
* Adds a field path index.
|
|
2443
|
+
*
|
|
2444
|
+
* Values for this index are persisted via the index backfill, which runs
|
|
2445
|
+
* asynchronously in the background. Once the first values are written,
|
|
2446
|
+
* an index can be used to serve partial results for any matching queries.
|
|
2447
|
+
* Any unindexed portion of the database will continue to be served via
|
|
2448
|
+
* collection scons.
|
|
2449
|
+
*/
|
|
2450
|
+
addFieldIndex(transaction: PersistenceTransaction, index: FieldIndex): PersistencePromise<void>;
|
|
2451
|
+
/** Removes the given field index and deletes all index values. */
|
|
2452
|
+
deleteFieldIndex(transaction: PersistenceTransaction, index: FieldIndex): PersistencePromise<void>;
|
|
2453
|
+
/**
|
|
2454
|
+
* Returns a list of field indexes that correspond to the specified collection
|
|
2455
|
+
* group.
|
|
2456
|
+
*
|
|
2457
|
+
* @param collectionGroup The collection group to get matching field indexes
|
|
2458
|
+
* for.
|
|
2459
|
+
* @return A collection of field indexes for the specified collection group.
|
|
2460
|
+
*/
|
|
2461
|
+
getFieldIndexes(transaction: PersistenceTransaction, collectionGroup: string): PersistencePromise<FieldIndex[]>;
|
|
2462
|
+
/** Returns all configured field indexes. */
|
|
2463
|
+
getFieldIndexes(transaction: PersistenceTransaction): PersistencePromise<FieldIndex[]>;
|
|
2464
|
+
/**
|
|
2465
|
+
* Returns an index that can be used to serve the provided target. Returns
|
|
2466
|
+
* `null` if no index is configured.
|
|
2467
|
+
*/
|
|
2468
|
+
getFieldIndex(transaction: PersistenceTransaction, target: Target): PersistencePromise<FieldIndex | null>;
|
|
2469
|
+
/**
|
|
2470
|
+
* Returns the documents that match the given target based on the provided
|
|
2471
|
+
* index.
|
|
2472
|
+
*/
|
|
2473
|
+
getDocumentsMatchingTarget(transaction: PersistenceTransaction, fieldIndex: FieldIndex, target: Target): PersistencePromise<DocumentKeySet>;
|
|
2474
|
+
/**
|
|
2475
|
+
* Returns the next collection group to update. Returns `null` if no group
|
|
2476
|
+
* exists.
|
|
2477
|
+
*/
|
|
2478
|
+
getNextCollectionGroupToUpdate(transaction: PersistenceTransaction): PersistencePromise<string | null>;
|
|
2479
|
+
/**
|
|
2480
|
+
* Sets the collection group's latest read time.
|
|
2481
|
+
*
|
|
2482
|
+
* This method updates the index offset for all field indices for the
|
|
2483
|
+
* collection group and increments their sequence number. Subsequent calls to
|
|
2484
|
+
* `getNextCollectionGroupToUpdate()` will return a different collection group
|
|
2485
|
+
* (unless only one collection group is configured).
|
|
2486
|
+
*/
|
|
2487
|
+
updateCollectionGroup(transaction: PersistenceTransaction, collectionGroup: string, offset: IndexOffset): PersistencePromise<void>;
|
|
2488
|
+
/** Updates the index entries for the provided documents. */
|
|
2489
|
+
updateIndexEntries(transaction: PersistenceTransaction, documents: DocumentMap): PersistencePromise<void>;
|
|
2490
|
+
}
|
|
2491
|
+
|
|
2492
|
+
/**
|
|
2493
|
+
* Stores the latest read time, document and batch ID that were processed for an
|
|
2494
|
+
* index.
|
|
2495
|
+
*/
|
|
2496
|
+
declare class IndexOffset {
|
|
2497
|
+
/**
|
|
2498
|
+
* The latest read time version that has been indexed by Firestore for this
|
|
2499
|
+
* field index.
|
|
2500
|
+
*/
|
|
2501
|
+
readonly readTime: SnapshotVersion;
|
|
2502
|
+
/**
|
|
2503
|
+
* The key of the last document that was indexed for this query. Use
|
|
2504
|
+
* `DocumentKey.empty()` if no document has been indexed.
|
|
2505
|
+
*/
|
|
2506
|
+
readonly documentKey: _DocumentKey;
|
|
2507
|
+
readonly largestBatchId: number;
|
|
2508
|
+
constructor(
|
|
2509
|
+
/**
|
|
2510
|
+
* The latest read time version that has been indexed by Firestore for this
|
|
2511
|
+
* field index.
|
|
2512
|
+
*/
|
|
2513
|
+
readTime: SnapshotVersion,
|
|
2514
|
+
/**
|
|
2515
|
+
* The key of the last document that was indexed for this query. Use
|
|
2516
|
+
* `DocumentKey.empty()` if no document has been indexed.
|
|
2517
|
+
*/
|
|
2518
|
+
documentKey: _DocumentKey, largestBatchId: number);
|
|
2519
|
+
/** The state of an index that has not yet been backfilled. */
|
|
2520
|
+
static min(): IndexOffset;
|
|
2521
|
+
}
|
|
2522
|
+
|
|
2523
|
+
/** An index component consisting of field path and index type. */
|
|
2524
|
+
declare class IndexSegment {
|
|
2525
|
+
/** The field path of the component. */
|
|
2526
|
+
readonly fieldPath: _FieldPath;
|
|
2527
|
+
/** The fields sorting order. */
|
|
2528
|
+
readonly kind: IndexKind;
|
|
2529
|
+
constructor(
|
|
2530
|
+
/** The field path of the component. */
|
|
2531
|
+
fieldPath: _FieldPath,
|
|
2532
|
+
/** The fields sorting order. */
|
|
2533
|
+
kind: IndexKind);
|
|
2328
2534
|
}
|
|
2329
2535
|
|
|
2330
2536
|
declare type IndexState = 'STATE_UNSPECIFIED' | 'CREATING' | 'READY' | 'ERROR';
|
|
2331
2537
|
|
|
2538
|
+
/**
|
|
2539
|
+
* Stores the "high water mark" that indicates how updated the Index is for the
|
|
2540
|
+
* current user.
|
|
2541
|
+
*/
|
|
2542
|
+
declare class IndexState_2 {
|
|
2543
|
+
/**
|
|
2544
|
+
* Indicates when the index was last updated (relative to other indexes).
|
|
2545
|
+
*/
|
|
2546
|
+
readonly sequenceNumber: number;
|
|
2547
|
+
/** The the latest indexed read time, document and batch id. */
|
|
2548
|
+
readonly offset: IndexOffset;
|
|
2549
|
+
constructor(
|
|
2550
|
+
/**
|
|
2551
|
+
* Indicates when the index was last updated (relative to other indexes).
|
|
2552
|
+
*/
|
|
2553
|
+
sequenceNumber: number,
|
|
2554
|
+
/** The the latest indexed read time, document and batch id. */
|
|
2555
|
+
offset: IndexOffset);
|
|
2556
|
+
/** The state of an index that has not yet been backfilled. */
|
|
2557
|
+
static empty(): IndexState_2;
|
|
2558
|
+
}
|
|
2559
|
+
|
|
2332
2560
|
/**
|
|
2333
2561
|
* Initializes a new instance of {@link Firestore} with the provided settings.
|
|
2334
2562
|
* Can only be called before any other function, including
|
|
@@ -2432,13 +2660,13 @@ declare class LLRBNode<K, V> {
|
|
|
2432
2660
|
/**
|
|
2433
2661
|
* Loads a Firestore bundle into the local cache.
|
|
2434
2662
|
*
|
|
2435
|
-
* @param firestore - The {@link Firestore} instance to load bundles for
|
|
2436
|
-
* @param bundleData - An object representing the bundle to be loaded. Valid
|
|
2437
|
-
*
|
|
2663
|
+
* @param firestore - The {@link Firestore} instance to load bundles for.
|
|
2664
|
+
* @param bundleData - An object representing the bundle to be loaded. Valid
|
|
2665
|
+
* objects are `ArrayBuffer`, `ReadableStream<Uint8Array>` or `string`.
|
|
2438
2666
|
*
|
|
2439
|
-
* @returns
|
|
2440
|
-
*
|
|
2441
|
-
*
|
|
2667
|
+
* @returns A `LoadBundleTask` object, which notifies callers with progress
|
|
2668
|
+
* updates, and completion or error events. It can be used as a
|
|
2669
|
+
* `Promise<LoadBundleTaskProgress>`.
|
|
2442
2670
|
*/
|
|
2443
2671
|
export declare function loadBundle(firestore: Firestore, bundleData: ReadableStream<Uint8Array> | ArrayBuffer | string): LoadBundleTask;
|
|
2444
2672
|
|
|
@@ -2585,6 +2813,7 @@ declare class MutableDocument implements Document_2 {
|
|
|
2585
2813
|
readonly key: _DocumentKey;
|
|
2586
2814
|
private documentType;
|
|
2587
2815
|
version: SnapshotVersion;
|
|
2816
|
+
readTime: SnapshotVersion;
|
|
2588
2817
|
data: ObjectValue;
|
|
2589
2818
|
private documentState;
|
|
2590
2819
|
private constructor();
|
|
@@ -2624,6 +2853,7 @@ declare class MutableDocument implements Document_2 {
|
|
|
2624
2853
|
convertToUnknownDocument(version: SnapshotVersion): MutableDocument;
|
|
2625
2854
|
setHasCommittedMutations(): MutableDocument;
|
|
2626
2855
|
setHasLocalMutations(): MutableDocument;
|
|
2856
|
+
setReadTime(readTime: SnapshotVersion): MutableDocument;
|
|
2627
2857
|
get hasLocalMutations(): boolean;
|
|
2628
2858
|
get hasCommittedMutations(): boolean;
|
|
2629
2859
|
get hasPendingWrites(): boolean;
|
|
@@ -2916,11 +3146,16 @@ declare interface NamedQuery {
|
|
|
2916
3146
|
}
|
|
2917
3147
|
|
|
2918
3148
|
/**
|
|
2919
|
-
* Reads a Firestore {@link Query} from local cache, identified by the given
|
|
3149
|
+
* Reads a Firestore {@link Query} from local cache, identified by the given
|
|
3150
|
+
* name.
|
|
2920
3151
|
*
|
|
2921
3152
|
* The named queries are packaged into bundles on the server side (along
|
|
2922
|
-
* with resulting documents), and loaded to local cache using `loadBundle`. Once
|
|
2923
|
-
* cache, use this method to extract a {@link Query} by name.
|
|
3153
|
+
* with resulting documents), and loaded to local cache using `loadBundle`. Once
|
|
3154
|
+
* in local cache, use this method to extract a {@link Query} by name.
|
|
3155
|
+
*
|
|
3156
|
+
* @param firestore - The {@link Firestore} instance to read the query from.
|
|
3157
|
+
* @param name - The name of the query.
|
|
3158
|
+
* @returns A `Promise` that is resolved with the Query or `null`.
|
|
2924
3159
|
*/
|
|
2925
3160
|
export declare function namedQuery(firestore: Firestore, name: string): Promise<Query | null>;
|
|
2926
3161
|
|
|
@@ -3935,14 +4170,6 @@ declare interface RemoteDocumentCache {
|
|
|
3935
4170
|
getSize(transaction: PersistenceTransaction): PersistencePromise<number>;
|
|
3936
4171
|
}
|
|
3937
4172
|
|
|
3938
|
-
/**
|
|
3939
|
-
* Represents a document change to be applied to remote document cache.
|
|
3940
|
-
*/
|
|
3941
|
-
declare interface RemoteDocumentChange {
|
|
3942
|
-
readonly document: MutableDocument;
|
|
3943
|
-
readonly readTime: SnapshotVersion | null;
|
|
3944
|
-
}
|
|
3945
|
-
|
|
3946
4173
|
/**
|
|
3947
4174
|
* An in-memory buffer of entries to be written to a RemoteDocumentCache.
|
|
3948
4175
|
* It can be used to batch up a set of changes to be written to the cache, but
|
|
@@ -3958,26 +4185,25 @@ declare interface RemoteDocumentChange {
|
|
|
3958
4185
|
* porting this class as part of that implementation work.
|
|
3959
4186
|
*/
|
|
3960
4187
|
declare abstract class RemoteDocumentChangeBuffer {
|
|
3961
|
-
protected changes: ObjectMap<_DocumentKey,
|
|
4188
|
+
protected changes: ObjectMap<_DocumentKey, MutableDocument>;
|
|
3962
4189
|
private changesApplied;
|
|
3963
4190
|
protected abstract getFromCache(transaction: PersistenceTransaction, documentKey: _DocumentKey): PersistencePromise<MutableDocument>;
|
|
3964
4191
|
protected abstract getAllFromCache(transaction: PersistenceTransaction, documentKeys: DocumentKeySet): PersistencePromise<MutableDocumentMap>;
|
|
3965
4192
|
protected abstract applyChanges(transaction: PersistenceTransaction): PersistencePromise<void>;
|
|
3966
|
-
protected getReadTime(key: _DocumentKey): SnapshotVersion;
|
|
3967
4193
|
/**
|
|
3968
4194
|
* Buffers a `RemoteDocumentCache.addEntry()` call.
|
|
3969
4195
|
*
|
|
3970
4196
|
* You can only modify documents that have already been retrieved via
|
|
3971
4197
|
* `getEntry()/getEntries()` (enforced via IndexedDbs `apply()`).
|
|
3972
4198
|
*/
|
|
3973
|
-
addEntry(document: MutableDocument
|
|
4199
|
+
addEntry(document: MutableDocument): void;
|
|
3974
4200
|
/**
|
|
3975
4201
|
* Buffers a `RemoteDocumentCache.removeEntry()` call.
|
|
3976
4202
|
*
|
|
3977
4203
|
* You can only remove documents that have already been retrieved via
|
|
3978
4204
|
* `getEntry()/getEntries()` (enforced via IndexedDbs `apply()`).
|
|
3979
4205
|
*/
|
|
3980
|
-
removeEntry(key: _DocumentKey, readTime
|
|
4206
|
+
removeEntry(key: _DocumentKey, readTime: SnapshotVersion): void;
|
|
3981
4207
|
/**
|
|
3982
4208
|
* Looks up an entry in the cache. The buffered changes will first be checked,
|
|
3983
4209
|
* and if no buffered change applies, this will forward to
|
|
@@ -4216,6 +4442,58 @@ export declare function setDoc<T>(reference: DocumentReference<T>, data: WithFie
|
|
|
4216
4442
|
*/
|
|
4217
4443
|
export declare function setDoc<T>(reference: DocumentReference<T>, data: PartialWithFieldValue<T>, options: SetOptions): Promise<void>;
|
|
4218
4444
|
|
|
4445
|
+
/**
|
|
4446
|
+
* Configures indexing for local query execution. Any previous index
|
|
4447
|
+
* configuration is overridden. The `Promise` resolves once the index
|
|
4448
|
+
* configuration has been persisted.
|
|
4449
|
+
*
|
|
4450
|
+
* The index entries themselves are created asynchronously. You can continue to
|
|
4451
|
+
* use queries that require indexing even if the indices are not yet available.
|
|
4452
|
+
* Query execution will automatically start using the index once the index
|
|
4453
|
+
* entries have been written.
|
|
4454
|
+
*
|
|
4455
|
+
* Indexes are only supported with IndexedDb persistence. Invoke either
|
|
4456
|
+
* `enableIndexedDbPersistence()` or `enableMultiTabIndexedDbPersistence()`
|
|
4457
|
+
* before setting an index configuration. If IndexedDb is not enabled, any
|
|
4458
|
+
* index configuration is ignored.
|
|
4459
|
+
*
|
|
4460
|
+
* @internal
|
|
4461
|
+
* @param firestore - The {@link Firestore} instance to configure indexes for.
|
|
4462
|
+
* @param configuration -The index definition.
|
|
4463
|
+
* @throws FirestoreError if the JSON format is invalid.
|
|
4464
|
+
* @returns A `Promise` that resolves once all indices are successfully
|
|
4465
|
+
* configured.
|
|
4466
|
+
*/
|
|
4467
|
+
export declare function _setIndexConfiguration(firestore: Firestore, configuration: IndexConfiguration): Promise<void>;
|
|
4468
|
+
|
|
4469
|
+
/**
|
|
4470
|
+
* Configures indexing for local query execution. Any previous index
|
|
4471
|
+
* configuration is overridden. The `Promise` resolves once the index
|
|
4472
|
+
* configuration has been persisted.
|
|
4473
|
+
*
|
|
4474
|
+
* The index entries themselves are created asynchronously. You can continue to
|
|
4475
|
+
* use queries that require indexing even if the indices are not yet available.
|
|
4476
|
+
* Query execution will automatically start using the index once the index
|
|
4477
|
+
* entries have been written.
|
|
4478
|
+
*
|
|
4479
|
+
* Indexes are only supported with IndexedDb persistence. Invoke either
|
|
4480
|
+
* `enableIndexedDbPersistence()` or `enableMultiTabIndexedDbPersistence()`
|
|
4481
|
+
* before setting an index configuration. If IndexedDb is not enabled, any
|
|
4482
|
+
* index configuration is ignored.
|
|
4483
|
+
*
|
|
4484
|
+
* The method accepts the JSON format exported by the Firebase CLI (`firebase
|
|
4485
|
+
* firestore:indexes`). If the JSON format is invalid, this method throws an
|
|
4486
|
+
* error.
|
|
4487
|
+
*
|
|
4488
|
+
* @internal
|
|
4489
|
+
* @param firestore - The {@link Firestore} instance to configure indexes for.
|
|
4490
|
+
* @param json -The JSON format exported by the Firebase CLI.
|
|
4491
|
+
* @throws FirestoreError if the JSON format is invalid.
|
|
4492
|
+
* @returns A `Promise` that resolves once all indices are successfully
|
|
4493
|
+
* configured.
|
|
4494
|
+
*/
|
|
4495
|
+
export declare function _setIndexConfiguration(firestore: Firestore, json: string): Promise<void>;
|
|
4496
|
+
|
|
4219
4497
|
/**
|
|
4220
4498
|
* Sets the verbosity of Cloud Firestore logs (debug, error, or silent).
|
|
4221
4499
|
*
|
|
@@ -209,20 +209,25 @@ export declare function terminate(firestore: Firestore): Promise<void>;
|
|
|
209
209
|
/**
|
|
210
210
|
* Loads a Firestore bundle into the local cache.
|
|
211
211
|
*
|
|
212
|
-
* @param firestore - The {@link Firestore} instance to load bundles for
|
|
213
|
-
* @param bundleData - An object representing the bundle to be loaded. Valid
|
|
214
|
-
*
|
|
212
|
+
* @param firestore - The {@link Firestore} instance to load bundles for.
|
|
213
|
+
* @param bundleData - An object representing the bundle to be loaded. Valid
|
|
214
|
+
* objects are `ArrayBuffer`, `ReadableStream<Uint8Array>` or `string`.
|
|
215
215
|
*
|
|
216
|
-
* @returns
|
|
217
|
-
*
|
|
218
|
-
*
|
|
216
|
+
* @returns A `LoadBundleTask` object, which notifies callers with progress
|
|
217
|
+
* updates, and completion or error events. It can be used as a
|
|
218
|
+
* `Promise<LoadBundleTaskProgress>`.
|
|
219
219
|
*/
|
|
220
220
|
export declare function loadBundle(firestore: Firestore, bundleData: ReadableStream<Uint8Array> | ArrayBuffer | string): LoadBundleTask;
|
|
221
221
|
/**
|
|
222
|
-
* Reads a Firestore {@link Query} from local cache, identified by the given
|
|
222
|
+
* Reads a Firestore {@link Query} from local cache, identified by the given
|
|
223
|
+
* name.
|
|
223
224
|
*
|
|
224
225
|
* The named queries are packaged into bundles on the server side (along
|
|
225
|
-
* with resulting documents), and loaded to local cache using `loadBundle`. Once
|
|
226
|
-
* cache, use this method to extract a {@link Query} by name.
|
|
226
|
+
* with resulting documents), and loaded to local cache using `loadBundle`. Once
|
|
227
|
+
* in local cache, use this method to extract a {@link Query} by name.
|
|
228
|
+
*
|
|
229
|
+
* @param firestore - The {@link Firestore} instance to read the query from.
|
|
230
|
+
* @param name - The name of the query.
|
|
231
|
+
* @returns A `Promise` that is resolved with the Query or `null`.
|
|
227
232
|
*/
|
|
228
233
|
export declare function namedQuery(firestore: Firestore, name: string): Promise<Query | null>;
|
|
File without changes
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 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 { Firestore } from './database';
|
|
18
|
+
export { connectFirestoreEmulator, EmulatorMockTokenOptions } from '../lite-api/database';
|
|
19
|
+
/**
|
|
20
|
+
* A single field element in an index configuration.
|
|
21
|
+
*
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
export interface IndexField {
|
|
25
|
+
/** The field path to index. */
|
|
26
|
+
readonly fieldPath: string;
|
|
27
|
+
/**
|
|
28
|
+
* What type of array index to create. Set to `CONTAINS` for `array-contains`
|
|
29
|
+
* and `array-contains-any` indexes.
|
|
30
|
+
*
|
|
31
|
+
* Only one of `arrayConfig` or `order` should be set;
|
|
32
|
+
*/
|
|
33
|
+
readonly arrayConfig?: 'CONTAINS';
|
|
34
|
+
/**
|
|
35
|
+
* What type of array index to create. Set to `ASCENDING` or 'DESCENDING` for
|
|
36
|
+
* `==`, `!=`, `<=`, `<=`, `in` and `not-in` filters.
|
|
37
|
+
*
|
|
38
|
+
* Only one of `arrayConfig` or `order` should be set.
|
|
39
|
+
*/
|
|
40
|
+
readonly order?: 'ASCENDING' | 'DESCENDING';
|
|
41
|
+
[key: string]: unknown;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The SDK definition of a Firestore index.
|
|
45
|
+
*
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
export interface Index {
|
|
49
|
+
/** The ID of the collection to index. */
|
|
50
|
+
readonly collectionGroup: string;
|
|
51
|
+
/** A list of fields to index. */
|
|
52
|
+
readonly fields?: IndexField[];
|
|
53
|
+
[key: string]: unknown;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* A list of Firestore indexes to speed up local query execution.
|
|
57
|
+
*
|
|
58
|
+
* See {@link https://firebase.google.com/docs/reference/firestore/indexes/#json_format | JSON Format}
|
|
59
|
+
* for a description of the format of the index definition.
|
|
60
|
+
*
|
|
61
|
+
* @internal
|
|
62
|
+
*/
|
|
63
|
+
export interface IndexConfiguration {
|
|
64
|
+
/** A list of all Firestore indexes. */
|
|
65
|
+
readonly indexes?: Index[];
|
|
66
|
+
[key: string]: unknown;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Configures indexing for local query execution. Any previous index
|
|
70
|
+
* configuration is overridden. The `Promise` resolves once the index
|
|
71
|
+
* configuration has been persisted.
|
|
72
|
+
*
|
|
73
|
+
* The index entries themselves are created asynchronously. You can continue to
|
|
74
|
+
* use queries that require indexing even if the indices are not yet available.
|
|
75
|
+
* Query execution will automatically start using the index once the index
|
|
76
|
+
* entries have been written.
|
|
77
|
+
*
|
|
78
|
+
* Indexes are only supported with IndexedDb persistence. Invoke either
|
|
79
|
+
* `enableIndexedDbPersistence()` or `enableMultiTabIndexedDbPersistence()`
|
|
80
|
+
* before setting an index configuration. If IndexedDb is not enabled, any
|
|
81
|
+
* index configuration is ignored.
|
|
82
|
+
*
|
|
83
|
+
* @internal
|
|
84
|
+
* @param firestore - The {@link Firestore} instance to configure indexes for.
|
|
85
|
+
* @param configuration -The index definition.
|
|
86
|
+
* @throws FirestoreError if the JSON format is invalid.
|
|
87
|
+
* @returns A `Promise` that resolves once all indices are successfully
|
|
88
|
+
* configured.
|
|
89
|
+
*/
|
|
90
|
+
export declare function setIndexConfiguration(firestore: Firestore, configuration: IndexConfiguration): Promise<void>;
|
|
91
|
+
/**
|
|
92
|
+
* Configures indexing for local query execution. Any previous index
|
|
93
|
+
* configuration is overridden. The `Promise` resolves once the index
|
|
94
|
+
* configuration has been persisted.
|
|
95
|
+
*
|
|
96
|
+
* The index entries themselves are created asynchronously. You can continue to
|
|
97
|
+
* use queries that require indexing even if the indices are not yet available.
|
|
98
|
+
* Query execution will automatically start using the index once the index
|
|
99
|
+
* entries have been written.
|
|
100
|
+
*
|
|
101
|
+
* Indexes are only supported with IndexedDb persistence. Invoke either
|
|
102
|
+
* `enableIndexedDbPersistence()` or `enableMultiTabIndexedDbPersistence()`
|
|
103
|
+
* before setting an index configuration. If IndexedDb is not enabled, any
|
|
104
|
+
* index configuration is ignored.
|
|
105
|
+
*
|
|
106
|
+
* The method accepts the JSON format exported by the Firebase CLI (`firebase
|
|
107
|
+
* firestore:indexes`). If the JSON format is invalid, this method throws an
|
|
108
|
+
* error.
|
|
109
|
+
*
|
|
110
|
+
* @internal
|
|
111
|
+
* @param firestore - The {@link Firestore} instance to configure indexes for.
|
|
112
|
+
* @param json -The JSON format exported by the Firebase CLI.
|
|
113
|
+
* @throws FirestoreError if the JSON format is invalid.
|
|
114
|
+
* @returns A `Promise` that resolves once all indices are successfully
|
|
115
|
+
* configured.
|
|
116
|
+
*/
|
|
117
|
+
export declare function setIndexConfiguration(firestore: Firestore, json: string): Promise<void>;
|
|
@@ -198,8 +198,7 @@ export declare class DocumentSnapshot<T = DocumentData> extends LiteDocumentSnap
|
|
|
198
198
|
/** @hideconstructor protected */
|
|
199
199
|
constructor(_firestore: Firestore, userDataWriter: AbstractUserDataWriter, key: DocumentKey, document: Document | null, metadata: SnapshotMetadata, converter: UntypedFirestoreDataConverter<T> | null);
|
|
200
200
|
/**
|
|
201
|
-
*
|
|
202
|
-
* exists. True if the document exists.
|
|
201
|
+
* Returns whether or not the data exists. True if the document exists.
|
|
203
202
|
*/
|
|
204
203
|
exists(): this is QueryDocumentSnapshot<T>;
|
|
205
204
|
/**
|
|
@@ -20,7 +20,7 @@ export { LoadBundleTask, LoadBundleTaskProgress, TaskState } from './api/bundle'
|
|
|
20
20
|
export { FirestoreSettings, PersistenceSettings } from './api/settings';
|
|
21
21
|
export { DocumentChange, DocumentSnapshot, QueryDocumentSnapshot, QuerySnapshot, snapshotEqual, SnapshotOptions, FirestoreDataConverter, DocumentChangeType, SnapshotMetadata } from './api/snapshot';
|
|
22
22
|
export { DocumentReference, CollectionReference, Query, doc, collection, collectionGroup, SetOptions, DocumentData, UpdateData, WithFieldValue, PartialWithFieldValue, refEqual, queryEqual } from './api/reference';
|
|
23
|
-
export { endAt, endBefore, startAt, startAfter, limit, limitToLast, where, orderBy, query, QueryConstraint, QueryConstraintType, OrderByDirection, WhereFilterOp } from './api/
|
|
23
|
+
export { endAt, endBefore, startAt, startAfter, limit, limitToLast, where, orderBy, query, QueryConstraint, QueryConstraintType, OrderByDirection, WhereFilterOp } from './api/filter';
|
|
24
24
|
export { Unsubscribe, SnapshotListenOptions } from './api/reference_impl';
|
|
25
25
|
export { runTransaction, Transaction } from './api/transaction';
|
|
26
26
|
export { getDoc, getDocFromCache, getDocFromServer, getDocs, getDocsFromCache, getDocsFromServer, onSnapshot, onSnapshotsInSync, setDoc, updateDoc, deleteDoc, addDoc, executeWrite } from './api/reference_impl';
|
|
@@ -49,3 +49,4 @@ export type { ByteString as _ByteString } from './util/byte_string';
|
|
|
49
49
|
export { logWarn as _logWarn } from './util/log';
|
|
50
50
|
export { EmptyAuthCredentialsProvider as _EmptyAuthCredentialsProvider } from './api/credentials';
|
|
51
51
|
export { EmptyAppCheckTokenProvider as _EmptyAppCheckTokenProvider } from './api/credentials';
|
|
52
|
+
export { setIndexConfiguration as _setIndexConfiguration } from './api/index_configuration';
|
|
@@ -53,6 +53,7 @@ export declare class FirestoreClient {
|
|
|
53
53
|
private user;
|
|
54
54
|
private readonly clientId;
|
|
55
55
|
private authCredentialListener;
|
|
56
|
+
private appCheckCredentialListener;
|
|
56
57
|
offlineComponents?: OfflineComponentProvider;
|
|
57
58
|
onlineComponents?: OnlineComponentProvider;
|
|
58
59
|
constructor(authCredentials: CredentialsProvider<User>, appCheckCredentials: CredentialsProvider<string>,
|
|
@@ -67,6 +68,7 @@ export declare class FirestoreClient {
|
|
|
67
68
|
asyncQueue: AsyncQueue, databaseInfo: DatabaseInfo);
|
|
68
69
|
getConfiguration(): Promise<ComponentConfiguration>;
|
|
69
70
|
setCredentialChangeListener(listener: (user: User) => Promise<void>): void;
|
|
71
|
+
setAppCheckTokenChangeListener(listener: (appCheckToken: string, user: User) => Promise<void>): void;
|
|
70
72
|
/**
|
|
71
73
|
* Checks that the client has not been terminated. Ensures that other methods on
|
|
72
74
|
* this class cannot be called after the client is terminated.
|