@firebase/firestore 3.4.8-canary.aa41fd662 → 3.4.8-canary.adb9aaa34
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/lite/index.d.ts +1 -0
- package/dist/firestore/src/api/transaction.d.ts +2 -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/target.d.ts +4 -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 +2 -1
- package/dist/firestore/src/lite-api/transaction_options.d.ts +23 -0
- package/dist/firestore/src/local/indexeddb_index_manager.d.ts +0 -5
- package/dist/firestore/src/model/values.d.ts +14 -2
- package/dist/index.d.ts +24 -1
- package/dist/index.esm2017.js +1368 -1327
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +2335 -2296
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +80 -62
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +80 -62
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +1396 -1355
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +25 -1
- package/dist/lite/firestore/lite/index.d.ts +1 -0
- package/dist/lite/firestore/src/api/transaction.d.ts +2 -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/target.d.ts +4 -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 +2 -1
- package/dist/lite/firestore/src/lite-api/transaction_options.d.ts +23 -0
- package/dist/lite/firestore/src/local/indexeddb_index_manager.d.ts +0 -5
- package/dist/lite/firestore/src/model/values.d.ts +14 -2
- package/dist/lite/index.browser.esm2017.js +613 -580
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +580 -568
- package/dist/lite/index.browser.esm5.js.map +1 -1
- package/dist/lite/index.d.ts +24 -1
- package/dist/lite/index.node.cjs.js +53 -10
- package/dist/lite/index.node.cjs.js.map +1 -1
- package/dist/lite/index.node.mjs +53 -10
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +1275 -1242
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/internal.d.ts +25 -1
- package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +94 -94
- package/dist/lite/packages/firestore/lite/index.d.ts +1 -0
- package/dist/lite/packages/firestore/src/api/transaction.d.ts +2 -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/target.d.ts +4 -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 +2 -1
- package/dist/lite/packages/firestore/src/lite-api/transaction_options.d.ts +23 -0
- package/dist/lite/packages/firestore/src/local/indexeddb_index_manager.d.ts +0 -5
- package/dist/lite/packages/firestore/src/model/values.d.ts +14 -2
- package/dist/lite/private.d.ts +25 -1
- package/dist/packages/firestore/dist/index.esm2017.d.ts +76 -75
- package/dist/packages/firestore/lite/index.d.ts +1 -0
- package/dist/packages/firestore/src/api/transaction.d.ts +2 -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/target.d.ts +4 -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 +2 -1
- package/dist/packages/firestore/src/lite-api/transaction_options.d.ts +23 -0
- package/dist/packages/firestore/src/local/indexeddb_index_manager.d.ts +0 -5
- package/dist/packages/firestore/src/model/values.d.ts +14 -2
- package/dist/private.d.ts +25 -1
- package/package.json +10 -10
|
@@ -30,6 +30,7 @@ import { EventManager, ListenOptions, Observer } from './event_manager';
|
|
|
30
30
|
import { Query } from './query';
|
|
31
31
|
import { SyncEngine } from './sync_engine';
|
|
32
32
|
import { Transaction } from './transaction';
|
|
33
|
+
import { TransactionOptions } from './transaction_options';
|
|
33
34
|
import { ViewSnapshot } from './view_snapshot';
|
|
34
35
|
export declare const MAX_CONCURRENT_LIMBO_RESOLUTIONS = 100;
|
|
35
36
|
/**
|
|
@@ -113,6 +114,6 @@ export declare function firestoreClientAddSnapshotsInSyncListener(client: Firest
|
|
|
113
114
|
* been committed. For this reason, it is required that all reads are
|
|
114
115
|
* performed before any writes. Transactions must be performed while online.
|
|
115
116
|
*/
|
|
116
|
-
export declare function firestoreClientTransaction<T>(client: FirestoreClient, updateFunction: (transaction: Transaction) => Promise<T
|
|
117
|
+
export declare function firestoreClientTransaction<T>(client: FirestoreClient, updateFunction: (transaction: Transaction) => Promise<T>, options: TransactionOptions): Promise<T>;
|
|
117
118
|
export declare function firestoreClientLoadBundle(client: FirestoreClient, databaseId: DatabaseId, data: ReadableStream<Uint8Array> | ArrayBuffer | string, resultTask: LoadBundleTask): void;
|
|
118
119
|
export declare function firestoreClientGetNamedQuery(client: FirestoreClient, queryName: string): Promise<NamedQuery | undefined>;
|
|
@@ -72,16 +72,16 @@ export declare function targetGetArrayValues(target: Target, fieldIndex: FieldIn
|
|
|
72
72
|
export declare function targetGetNotInValues(target: Target, fieldIndex: FieldIndex): ProtoValue[] | null;
|
|
73
73
|
/**
|
|
74
74
|
* Returns a lower bound of field values that can be used as a starting point to
|
|
75
|
-
* scan the index defined by `fieldIndex`. Returns `
|
|
75
|
+
* scan the index defined by `fieldIndex`. Returns `MIN_VALUE` if no lower bound
|
|
76
76
|
* exists.
|
|
77
77
|
*/
|
|
78
|
-
export declare function targetGetLowerBound(target: Target, fieldIndex: FieldIndex): Bound
|
|
78
|
+
export declare function targetGetLowerBound(target: Target, fieldIndex: FieldIndex): Bound;
|
|
79
79
|
/**
|
|
80
80
|
* Returns an upper bound of field values that can be used as an ending point
|
|
81
|
-
* when scanning the index defined by `fieldIndex`. Returns `
|
|
81
|
+
* when scanning the index defined by `fieldIndex`. Returns `MAX_VALUE` if no
|
|
82
82
|
* upper bound exists.
|
|
83
83
|
*/
|
|
84
|
-
export declare function targetGetUpperBound(target: Target, fieldIndex: FieldIndex): Bound
|
|
84
|
+
export declare function targetGetUpperBound(target: Target, fieldIndex: FieldIndex): Bound;
|
|
85
85
|
/** Returns the number of segments of a perfect index for this target. */
|
|
86
86
|
export declare function targetGetSegmentCount(target: Target): number;
|
|
87
87
|
export declare abstract class Filter {
|
|
@@ -0,0 +1,25 @@
|
|
|
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 declare const DEFAULT_TRANSACTION_OPTIONS: TransactionOptions;
|
|
18
|
+
/**
|
|
19
|
+
* Options to customize transaction behavior.
|
|
20
|
+
*/
|
|
21
|
+
export declare interface TransactionOptions {
|
|
22
|
+
/** Maximum number of attempts to commit, after which transaction fails. Default is 5. */
|
|
23
|
+
readonly maxAttempts: number;
|
|
24
|
+
}
|
|
25
|
+
export declare function validateTransactionOptions(options: TransactionOptions): void;
|
|
@@ -18,7 +18,7 @@ import { Datastore } from '../remote/datastore';
|
|
|
18
18
|
import { AsyncQueue } from '../util/async_queue';
|
|
19
19
|
import { Deferred } from '../util/promise';
|
|
20
20
|
import { Transaction } from './transaction';
|
|
21
|
-
|
|
21
|
+
import { TransactionOptions } from './transaction_options';
|
|
22
22
|
/**
|
|
23
23
|
* TransactionRunner encapsulates the logic needed to run and retry transactions
|
|
24
24
|
* with backoff.
|
|
@@ -26,11 +26,12 @@ export declare const DEFAULT_MAX_ATTEMPTS_COUNT = 5;
|
|
|
26
26
|
export declare class TransactionRunner<T> {
|
|
27
27
|
private readonly asyncQueue;
|
|
28
28
|
private readonly datastore;
|
|
29
|
+
private readonly options;
|
|
29
30
|
private readonly updateFunction;
|
|
30
31
|
private readonly deferred;
|
|
31
32
|
private attemptsRemaining;
|
|
32
33
|
private backoff;
|
|
33
|
-
constructor(asyncQueue: AsyncQueue, datastore: Datastore, updateFunction: (transaction: Transaction) => Promise<T>, deferred: Deferred<T>);
|
|
34
|
+
constructor(asyncQueue: AsyncQueue, datastore: Datastore, options: TransactionOptions, updateFunction: (transaction: Transaction) => Promise<T>, deferred: Deferred<T>);
|
|
34
35
|
/** Runs the transaction and sets the result on deferred. */
|
|
35
36
|
run(): void;
|
|
36
37
|
private runWithBackOff;
|
|
@@ -19,6 +19,7 @@ import { Firestore } from './database';
|
|
|
19
19
|
import { FieldPath } from './field_path';
|
|
20
20
|
import { DocumentReference, PartialWithFieldValue, SetOptions, UpdateData, WithFieldValue } from './reference';
|
|
21
21
|
import { DocumentSnapshot } from './snapshot';
|
|
22
|
+
import { TransactionOptions } from './transaction_options';
|
|
22
23
|
/**
|
|
23
24
|
* A reference to a transaction.
|
|
24
25
|
*
|
|
@@ -116,4 +117,4 @@ export declare class Transaction {
|
|
|
116
117
|
* `updateFunction `is returned here. Otherwise, if the transaction failed, a
|
|
117
118
|
* rejected promise with the corresponding failure error is returned.
|
|
118
119
|
*/
|
|
119
|
-
export declare function runTransaction<T>(firestore: Firestore, updateFunction: (transaction: Transaction) => Promise<T
|
|
120
|
+
export declare function runTransaction<T>(firestore: Firestore, updateFunction: (transaction: Transaction) => Promise<T>, options?: TransactionOptions): Promise<T>;
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
/**
|
|
18
|
+
* Options to customize transaction behavior.
|
|
19
|
+
*/
|
|
20
|
+
export declare interface TransactionOptions {
|
|
21
|
+
/** Maximum number of attempts to commit, after which transaction fails. Default is 5. */
|
|
22
|
+
readonly maxAttempts?: number;
|
|
23
|
+
}
|
|
@@ -70,11 +70,6 @@ export declare class IndexedDbIndexManager implements IndexManager {
|
|
|
70
70
|
private generateLowerBound;
|
|
71
71
|
/** Generates the upper bound for `arrayValue` and `directionalValue`. */
|
|
72
72
|
private generateUpperBound;
|
|
73
|
-
/**
|
|
74
|
-
* Generates an empty bound that scopes the index scan to the current index
|
|
75
|
-
* and user.
|
|
76
|
-
*/
|
|
77
|
-
private generateEmptyBound;
|
|
78
73
|
private getFieldIndex;
|
|
79
74
|
getIndexType(transaction: PersistenceTransaction, target: Target): PersistencePromise<IndexType>;
|
|
80
75
|
/**
|
|
@@ -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;
|
package/dist/lite/private.d.ts
CHANGED
|
@@ -1970,7 +1970,7 @@ export declare function refEqual<T>(left: DocumentReference<T> | CollectionRefer
|
|
|
1970
1970
|
* `updateFunction `is returned here. Otherwise, if the transaction failed, a
|
|
1971
1971
|
* rejected promise with the corresponding failure error is returned.
|
|
1972
1972
|
*/
|
|
1973
|
-
export declare function runTransaction<T>(firestore: Firestore, updateFunction: (transaction: Transaction) => Promise<T
|
|
1973
|
+
export declare function runTransaction<T>(firestore: Firestore, updateFunction: (transaction: Transaction) => Promise<T>, options?: TransactionOptions): Promise<T>;
|
|
1974
1974
|
|
|
1975
1975
|
/**
|
|
1976
1976
|
* Returns a sentinel used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link @firebase/firestore/lite#(updateDoc:1)} to
|
|
@@ -2475,6 +2475,30 @@ declare class Transaction_2 {
|
|
|
2475
2475
|
private ensureCommitNotCalled;
|
|
2476
2476
|
}
|
|
2477
2477
|
|
|
2478
|
+
/**
|
|
2479
|
+
* @license
|
|
2480
|
+
* Copyright 2022 Google LLC
|
|
2481
|
+
*
|
|
2482
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2483
|
+
* you may not use this file except in compliance with the License.
|
|
2484
|
+
* You may obtain a copy of the License at
|
|
2485
|
+
*
|
|
2486
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2487
|
+
*
|
|
2488
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2489
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2490
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2491
|
+
* See the License for the specific language governing permissions and
|
|
2492
|
+
* limitations under the License.
|
|
2493
|
+
*/
|
|
2494
|
+
/**
|
|
2495
|
+
* Options to customize transaction behavior.
|
|
2496
|
+
*/
|
|
2497
|
+
export declare interface TransactionOptions {
|
|
2498
|
+
/** Maximum number of attempts to commit, after which transaction fails. Default is 5. */
|
|
2499
|
+
readonly maxAttempts?: number;
|
|
2500
|
+
}
|
|
2501
|
+
|
|
2478
2502
|
/** Used to represent a field transform on a mutation. */
|
|
2479
2503
|
declare class TransformOperation {
|
|
2480
2504
|
private _;
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
* to the user.
|
|
20
20
|
*
|
|
21
21
|
* @internal
|
|
22
|
-
*/
|
|
22
|
+
*/
|
|
23
|
+
declare class Jh {
|
|
23
24
|
convertValue(t: any, e?: string): any;
|
|
24
25
|
convertObject(t: any, e: any): {};
|
|
25
26
|
convertGeoPoint(t: any): Wc;
|
|
@@ -99,7 +100,7 @@
|
|
|
99
100
|
* See the License for the specific language governing permissions and
|
|
100
101
|
* limitations under the License.
|
|
101
102
|
*/
|
|
102
|
-
/** DOMException error code constants. */ declare const
|
|
103
|
+
/** DOMException error code constants. */ declare const Pc: -1;
|
|
103
104
|
/**
|
|
104
105
|
* A `CollectionReference` object can be used for adding documents, getting
|
|
105
106
|
* document references, and querying for documents (using {@link query}).
|
|
@@ -318,7 +319,7 @@ declare class Vc extends dc {
|
|
|
318
319
|
* with an underscore.
|
|
319
320
|
*/ _compareTo(t: any): 0 | 1 | -1;
|
|
320
321
|
}
|
|
321
|
-
declare class
|
|
322
|
+
declare class bc {
|
|
322
323
|
_progressObserver: {};
|
|
323
324
|
_taskCompletionResolver: j;
|
|
324
325
|
_lastProgress: {
|
|
@@ -399,7 +400,7 @@ declare class Pc {
|
|
|
399
400
|
* `DocumentSnapshot`. Since query results contain only existing documents, the
|
|
400
401
|
* `exists` property will always be true and `data()` will never return
|
|
401
402
|
* 'undefined'.
|
|
402
|
-
*/ declare class
|
|
403
|
+
*/ declare class bh extends Rh {
|
|
403
404
|
}
|
|
404
405
|
/**
|
|
405
406
|
* A `QuerySnapshot` contains zero or more `DocumentSnapshot` objects
|
|
@@ -407,7 +408,7 @@ declare class Pc {
|
|
|
407
408
|
* array via the `docs` property or enumerated using the `forEach` method. The
|
|
408
409
|
* number of documents can be determined via the `empty` and `size`
|
|
409
410
|
* properties.
|
|
410
|
-
*/ declare class
|
|
411
|
+
*/ declare class Ph {
|
|
411
412
|
/** @hideconstructor */
|
|
412
413
|
constructor(t: any, e: any, n: any, s: any);
|
|
413
414
|
_firestore: any;
|
|
@@ -564,7 +565,7 @@ declare class at {
|
|
|
564
565
|
* to be compared using the `>`, `<=`, `>=` and `>` operators.
|
|
565
566
|
*/ valueOf(): string;
|
|
566
567
|
}
|
|
567
|
-
declare const
|
|
568
|
+
declare const ml_base: {
|
|
568
569
|
new (t: any, e: any): {
|
|
569
570
|
_firestore: any;
|
|
570
571
|
_transaction: any;
|
|
@@ -607,7 +608,7 @@ declare const wl_base: {
|
|
|
607
608
|
* The `Transaction` object passed to a transaction's `updateFunction` provides
|
|
608
609
|
* the methods to read and write data within the transaction context. See
|
|
609
610
|
* {@link runTransaction}.
|
|
610
|
-
*/ declare class
|
|
611
|
+
*/ declare class ml extends ml_base {
|
|
611
612
|
}
|
|
612
613
|
/**
|
|
613
614
|
* @license
|
|
@@ -632,7 +633,7 @@ declare const wl_base: {
|
|
|
632
633
|
* provides methods for adding writes to the write batch. None of the writes
|
|
633
634
|
* will be committed (or visible locally) until {@link WriteBatch.commit} is
|
|
634
635
|
* called.
|
|
635
|
-
*/ declare class
|
|
636
|
+
*/ declare class Zh {
|
|
636
637
|
/** @hideconstructor */
|
|
637
638
|
constructor(t: any, e: any);
|
|
638
639
|
_firestore: any;
|
|
@@ -640,14 +641,14 @@ declare const wl_base: {
|
|
|
640
641
|
_mutations: any[];
|
|
641
642
|
_committed: boolean;
|
|
642
643
|
_dataReader: Zc;
|
|
643
|
-
set(t: any, e: any, n: any):
|
|
644
|
-
update(t: any, e: any, n: any, ...s: any[]):
|
|
644
|
+
set(t: any, e: any, n: any): Zh;
|
|
645
|
+
update(t: any, e: any, n: any, ...s: any[]): Zh;
|
|
645
646
|
/**
|
|
646
647
|
* Deletes the document referred to by the provided {@link DocumentReference}.
|
|
647
648
|
*
|
|
648
649
|
* @param documentRef - A reference to the document to be deleted.
|
|
649
650
|
* @returns This `WriteBatch` instance. Used for chaining method calls.
|
|
650
|
-
*/ delete(t: any):
|
|
651
|
+
*/ delete(t: any): Zh;
|
|
651
652
|
/**
|
|
652
653
|
* Commits all of the writes in this write batch as a single atomic unit.
|
|
653
654
|
*
|
|
@@ -809,7 +810,7 @@ declare function yt(): boolean;
|
|
|
809
810
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
810
811
|
* See the License for the specific language governing permissions and
|
|
811
812
|
* limitations under the License.
|
|
812
|
-
*/ declare function
|
|
813
|
+
*/ declare function Rl(t: any, e: any): Promise<void>;
|
|
813
814
|
/**
|
|
814
815
|
* Validates that two boolean options are not set at the same time.
|
|
815
816
|
* @internal
|
|
@@ -823,7 +824,7 @@ declare function yt(): boolean;
|
|
|
823
824
|
* @returns A `Promise` resolved with a `DocumentReference` pointing to the
|
|
824
825
|
* newly created document after it has been written to the backend (Note that it
|
|
825
826
|
* won't resolve while you're offline).
|
|
826
|
-
*/ declare function
|
|
827
|
+
*/ declare function ll(t: any, e: any): Promise<wc>;
|
|
827
828
|
/**
|
|
828
829
|
* Returns a special value that can be used with {@link (setDoc:1)} or {@link
|
|
829
830
|
* updateDoc:1} that tells the server to remove the given elements from any
|
|
@@ -834,7 +835,7 @@ declare function yt(): boolean;
|
|
|
834
835
|
* @param elements - The elements to remove from the array.
|
|
835
836
|
* @returns The `FieldValue` sentinel for use in a call to `setDoc()` or
|
|
836
837
|
* `updateDoc()`
|
|
837
|
-
*/ declare function
|
|
838
|
+
*/ declare function Tl(...t: any[]): oh;
|
|
838
839
|
/**
|
|
839
840
|
* Returns a special value that can be used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link
|
|
840
841
|
* @firebase/firestore/lite#(updateDoc:1)} that tells the server to union the given elements with any array
|
|
@@ -846,7 +847,7 @@ declare function yt(): boolean;
|
|
|
846
847
|
* @param elements - The elements to union into the array.
|
|
847
848
|
* @returns The `FieldValue` sentinel for use in a call to `setDoc()` or
|
|
848
849
|
* `updateDoc()`.
|
|
849
|
-
*/ declare function
|
|
850
|
+
*/ declare function Il(...t: any[]): rh;
|
|
850
851
|
declare function Mc(t: any): Promise<any>;
|
|
851
852
|
declare function yc(t: any, e: any, ...n: any[]): gc;
|
|
852
853
|
/**
|
|
@@ -867,7 +868,7 @@ declare function _c(t: any, e: any, n: any, s?: {}): void;
|
|
|
867
868
|
* @param reference - A reference to the document to delete.
|
|
868
869
|
* @returns A Promise resolved once the document has been successfully
|
|
869
870
|
* deleted from the backend (note that it won't resolve while you're offline).
|
|
870
|
-
*/ declare function
|
|
871
|
+
*/ declare function hl(t: any): Promise<any>;
|
|
871
872
|
/**
|
|
872
873
|
* @license
|
|
873
874
|
* Copyright 2020 Google LLC
|
|
@@ -887,7 +888,7 @@ declare function _c(t: any, e: any, n: any, s?: {}): void;
|
|
|
887
888
|
/**
|
|
888
889
|
* Returns a sentinel for use with {@link @firebase/firestore/lite#(updateDoc:1)} or
|
|
889
890
|
* {@link @firebase/firestore/lite#(setDoc:1)} with `{merge: true}` to mark a field for deletion.
|
|
890
|
-
*/ declare function
|
|
891
|
+
*/ declare function yl(): nh;
|
|
891
892
|
/**
|
|
892
893
|
* Disables network usage for this instance. It can be re-enabled via {@link
|
|
893
894
|
* enableNetwork}. While the network is disabled, any snapshot listeners,
|
|
@@ -960,7 +961,7 @@ declare function Kh(...t: any[]): qh;
|
|
|
960
961
|
/**
|
|
961
962
|
* Locally writes `mutations` on the async queue.
|
|
962
963
|
* @internal
|
|
963
|
-
*/ declare function
|
|
964
|
+
*/ declare function _l(t: any, e: any): Promise<any>;
|
|
964
965
|
/**
|
|
965
966
|
* @license
|
|
966
967
|
* Copyright 2020 Google LLC
|
|
@@ -1012,21 +1013,21 @@ declare function Kh(...t: any[]): qh;
|
|
|
1012
1013
|
* @returns A Promise resolved with a `DocumentSnapshot` containing the
|
|
1013
1014
|
* current document contents.
|
|
1014
1015
|
*/
|
|
1015
|
-
declare function
|
|
1016
|
+
declare function el(t: any): Promise<Rh>;
|
|
1016
1017
|
/**
|
|
1017
1018
|
* Reads the document referred to by this `DocumentReference` from cache.
|
|
1018
1019
|
* Returns an error if the document is not currently cached.
|
|
1019
1020
|
*
|
|
1020
1021
|
* @returns A `Promise` resolved with a `DocumentSnapshot` containing the
|
|
1021
1022
|
* current document contents.
|
|
1022
|
-
*/ declare function
|
|
1023
|
+
*/ declare function sl(t: any): Promise<Rh>;
|
|
1023
1024
|
/**
|
|
1024
1025
|
* Reads the document referred to by this `DocumentReference` from the server.
|
|
1025
1026
|
* Returns an error if the network is not available.
|
|
1026
1027
|
*
|
|
1027
1028
|
* @returns A `Promise` resolved with a `DocumentSnapshot` containing the
|
|
1028
1029
|
* current document contents.
|
|
1029
|
-
*/ declare function
|
|
1030
|
+
*/ declare function il(t: any): Promise<Rh>;
|
|
1030
1031
|
/**
|
|
1031
1032
|
* Executes the query and returns the results as a `QuerySnapshot`.
|
|
1032
1033
|
*
|
|
@@ -1036,19 +1037,19 @@ declare function tl(t: any): Promise<Rh>;
|
|
|
1036
1037
|
* invoke {@link getDocsFromCache} or {@link getDocsFromServer}.
|
|
1037
1038
|
*
|
|
1038
1039
|
* @returns A `Promise` that will be resolved with the results of the query.
|
|
1039
|
-
*/ declare function
|
|
1040
|
+
*/ declare function rl(t: any): Promise<Ph>;
|
|
1040
1041
|
/**
|
|
1041
1042
|
* Executes the query and returns the results as a `QuerySnapshot` from cache.
|
|
1042
1043
|
* Returns an error if the document is not currently cached.
|
|
1043
1044
|
*
|
|
1044
1045
|
* @returns A `Promise` that will be resolved with the results of the query.
|
|
1045
|
-
*/ declare function
|
|
1046
|
+
*/ declare function ol(t: any): Promise<Ph>;
|
|
1046
1047
|
/**
|
|
1047
1048
|
* Executes the query and returns the results as a `QuerySnapshot` from the
|
|
1048
1049
|
* server. Returns an error if the network is not available.
|
|
1049
1050
|
*
|
|
1050
1051
|
* @returns A `Promise` that will be resolved with the results of the query.
|
|
1051
|
-
*/ declare function
|
|
1052
|
+
*/ declare function ul(t: any): Promise<Ph>;
|
|
1052
1053
|
/**
|
|
1053
1054
|
* Returns the existing {@link Firestore} instance that is associated with the
|
|
1054
1055
|
* provided {@link @firebase/app#FirebaseApp}. If no instance exists, initializes a new
|
|
@@ -1076,7 +1077,7 @@ declare function tl(t: any): Promise<Rh>;
|
|
|
1076
1077
|
* @param n - The value to increment by.
|
|
1077
1078
|
* @returns The `FieldValue` sentinel for use in a call to `setDoc()` or
|
|
1078
1079
|
* `updateDoc()`
|
|
1079
|
-
*/ declare function
|
|
1080
|
+
*/ declare function El(t: any): uh;
|
|
1080
1081
|
/**
|
|
1081
1082
|
* Initializes a new instance of {@link Firestore} with the provided settings.
|
|
1082
1083
|
* Can only be called before any other function, including
|
|
@@ -1113,7 +1114,7 @@ declare function tl(t: any): Promise<Rh>;
|
|
|
1113
1114
|
* @returns A `LoadBundleTask` object, which notifies callers with progress
|
|
1114
1115
|
* updates, and completion or error events. It can be used as a
|
|
1115
1116
|
* `Promise<LoadBundleTaskProgress>`.
|
|
1116
|
-
*/ declare function Lc(t: any, e: any):
|
|
1117
|
+
*/ declare function Lc(t: any, e: any): bc;
|
|
1117
1118
|
/**
|
|
1118
1119
|
* Reads a Firestore {@link Query} from local cache, identified by the given
|
|
1119
1120
|
* name.
|
|
@@ -1126,8 +1127,8 @@ declare function tl(t: any): Promise<Rh>;
|
|
|
1126
1127
|
* @param name - The name of the query.
|
|
1127
1128
|
* @returns A `Promise` that is resolved with the Query or `null`.
|
|
1128
1129
|
*/ declare function Uc(t: any, e: any): any;
|
|
1129
|
-
declare function
|
|
1130
|
-
declare function
|
|
1130
|
+
declare function fl(t: any, ...e: any[]): () => void;
|
|
1131
|
+
declare function dl(t: any, e: any): () => void;
|
|
1131
1132
|
/**
|
|
1132
1133
|
* Creates a {@link QueryConstraint} that sorts the query result by the
|
|
1133
1134
|
* specified field, optionally in descending order instead of ascending.
|
|
@@ -1179,12 +1180,12 @@ declare function fl(t: any, e: any): () => void;
|
|
|
1179
1180
|
* (the `updateFunction` returned a failed promise), the promise returned by the
|
|
1180
1181
|
* `updateFunction `is returned here. Otherwise, if the transaction failed, a
|
|
1181
1182
|
* rejected promise with the corresponding failure error is returned.
|
|
1182
|
-
*/ declare function
|
|
1183
|
+
*/ declare function gl(t: any, e: any, n: any): Promise<any>;
|
|
1183
1184
|
/**
|
|
1184
1185
|
* Returns a sentinel used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link @firebase/firestore/lite#(updateDoc:1)} to
|
|
1185
1186
|
* include a server-generated timestamp in the written data.
|
|
1186
|
-
*/ declare function
|
|
1187
|
-
declare function
|
|
1187
|
+
*/ declare function pl(): ih;
|
|
1188
|
+
declare function al(t: any, e: any, n: any): Promise<any>;
|
|
1188
1189
|
/**
|
|
1189
1190
|
* Sets the verbosity of Cloud Firestore logs (debug, error, or silent).
|
|
1190
1191
|
*
|
|
@@ -1229,7 +1230,7 @@ declare function Lh(...t: any[]): Bh;
|
|
|
1229
1230
|
* @returns A `Promise` that is resolved when the instance has been successfully
|
|
1230
1231
|
* terminated.
|
|
1231
1232
|
*/ declare function Bc(t: any): any;
|
|
1232
|
-
declare function
|
|
1233
|
+
declare function cl(t: any, e: any, n: any, ...s: any[]): Promise<any>;
|
|
1233
1234
|
/**
|
|
1234
1235
|
* Waits until all currently pending writes for the active user have been
|
|
1235
1236
|
* acknowledged by the backend.
|
|
@@ -1283,7 +1284,7 @@ declare function al(t: any, e: any, n: any, ...s: any[]): Promise<any>;
|
|
|
1283
1284
|
*
|
|
1284
1285
|
* @returns A {@link WriteBatch} that can be used to atomically execute multiple
|
|
1285
1286
|
* writes.
|
|
1286
|
-
*/ declare function
|
|
1287
|
+
*/ declare function Al(t: any): Zh;
|
|
1287
1288
|
/**
|
|
1288
1289
|
* @license
|
|
1289
1290
|
* Copyright 2020 Google LLC
|
|
@@ -1417,16 +1418,16 @@ declare function al(t: any, e: any, n: any, ...s: any[]): Promise<any>;
|
|
|
1417
1418
|
* See the License for the specific language governing permissions and
|
|
1418
1419
|
* limitations under the License.
|
|
1419
1420
|
*/ declare class Ac {
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1421
|
+
Fa: Promise<void>;
|
|
1422
|
+
$a: any[];
|
|
1423
|
+
Ba: boolean;
|
|
1424
|
+
La: any[];
|
|
1425
|
+
Ua: any;
|
|
1426
|
+
qa: boolean;
|
|
1425
1427
|
Ka: boolean;
|
|
1426
|
-
Ga:
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
ja: () => void;
|
|
1428
|
+
Ga: any[];
|
|
1429
|
+
No: Wo;
|
|
1430
|
+
Qa: () => void;
|
|
1430
1431
|
get isShuttingDown(): boolean;
|
|
1431
1432
|
/**
|
|
1432
1433
|
* Adds a new operation to the queue without waiting for it to complete (i.e.
|
|
@@ -1439,30 +1440,30 @@ declare function al(t: any, e: any, n: any, ...s: any[]): Promise<any>;
|
|
|
1439
1440
|
/**
|
|
1440
1441
|
* Runs the next operation from the retryable queue. If the operation fails,
|
|
1441
1442
|
* reschedules with backoff.
|
|
1442
|
-
*/
|
|
1443
|
-
|
|
1443
|
+
*/ za(): Promise<void>;
|
|
1444
|
+
Wa(t: any): Promise<any>;
|
|
1444
1445
|
enqueueAfterDelay(t: any, e: any, n: any): vu;
|
|
1445
|
-
|
|
1446
|
+
ja(): void;
|
|
1446
1447
|
verifyOperationInProgress(): void;
|
|
1447
1448
|
/**
|
|
1448
1449
|
* Waits until all currently queued tasks are finished executing. Delayed
|
|
1449
1450
|
* operations are not run.
|
|
1450
|
-
*/
|
|
1451
|
+
*/ Ja(): Promise<void>;
|
|
1451
1452
|
/**
|
|
1452
1453
|
* For Tests: Determine if a delayed operation with a particular TimerId
|
|
1453
1454
|
* exists.
|
|
1454
|
-
*/
|
|
1455
|
+
*/ Ya(t: any): boolean;
|
|
1455
1456
|
/**
|
|
1456
1457
|
* For Tests: Runs some or all delayed operations early.
|
|
1457
1458
|
*
|
|
1458
1459
|
* @param lastTimerId - Delayed operations up to and including this TimerId
|
|
1459
1460
|
* will be drained. Pass TimerId.All to run all delayed operations.
|
|
1460
1461
|
* @returns a Promise that resolves once all operations have been run.
|
|
1461
|
-
*/
|
|
1462
|
+
*/ Xa(t: any): Promise<void>;
|
|
1462
1463
|
/**
|
|
1463
1464
|
* For Tests: Skip all subsequent delays for a timer id.
|
|
1464
|
-
*/
|
|
1465
|
-
/** Called once a DelayedOperation is run or canceled. */
|
|
1465
|
+
*/ Za(t: any): void;
|
|
1466
|
+
/** Called once a DelayedOperation is run or canceled. */ Ha(t: any): void;
|
|
1466
1467
|
}
|
|
1467
1468
|
import { FirebaseError as a } from "@firebase/util/dist/src/errors";
|
|
1468
1469
|
/**
|
|
@@ -1493,7 +1494,7 @@ import { FirebaseError as a } from "@firebase/util/dist/src/errors";
|
|
|
1493
1494
|
databaseId: any;
|
|
1494
1495
|
ignoreUndefinedProperties: any;
|
|
1495
1496
|
M: any;
|
|
1496
|
-
/** Creates a new top-level parse context. */
|
|
1497
|
+
/** Creates a new top-level parse context. */ lc(t: any, e: any, n: any, s?: boolean): Xc;
|
|
1497
1498
|
}
|
|
1498
1499
|
declare class Z {
|
|
1499
1500
|
constructor(t: any);
|
|
@@ -1543,13 +1544,13 @@ declare class dt {
|
|
|
1543
1544
|
}
|
|
1544
1545
|
declare class oh extends jc {
|
|
1545
1546
|
constructor(t: any, e: any);
|
|
1546
|
-
|
|
1547
|
+
fc: any;
|
|
1547
1548
|
_toFieldTransform(t: any): In;
|
|
1548
1549
|
isEqual(t: any): boolean;
|
|
1549
1550
|
}
|
|
1550
1551
|
declare class rh extends jc {
|
|
1551
1552
|
constructor(t: any, e: any);
|
|
1552
|
-
|
|
1553
|
+
fc: any;
|
|
1553
1554
|
_toFieldTransform(t: any): In;
|
|
1554
1555
|
isEqual(t: any): boolean;
|
|
1555
1556
|
}
|
|
@@ -1560,27 +1561,27 @@ declare class nh extends jc {
|
|
|
1560
1561
|
declare class qh extends Dh {
|
|
1561
1562
|
constructor(t: any, e: any, n: any);
|
|
1562
1563
|
type: any;
|
|
1564
|
+
Tc: any;
|
|
1563
1565
|
Ec: any;
|
|
1564
|
-
Ac: any;
|
|
1565
1566
|
_apply(t: any): mc;
|
|
1566
1567
|
}
|
|
1567
1568
|
declare class uh extends jc {
|
|
1568
1569
|
constructor(t: any, e: any);
|
|
1569
|
-
|
|
1570
|
+
dc: any;
|
|
1570
1571
|
_toFieldTransform(t: any): In;
|
|
1571
1572
|
isEqual(t: any): boolean;
|
|
1572
1573
|
}
|
|
1573
1574
|
declare class Oh extends Dh {
|
|
1574
1575
|
constructor(t: any, e: any, n: any);
|
|
1575
1576
|
type: any;
|
|
1577
|
+
yc: any;
|
|
1576
1578
|
Ic: any;
|
|
1577
|
-
Tc: any;
|
|
1578
1579
|
_apply(t: any): mc;
|
|
1579
1580
|
}
|
|
1580
1581
|
declare class kh extends Dh {
|
|
1581
1582
|
constructor(t: any, e: any);
|
|
1582
|
-
|
|
1583
|
-
|
|
1583
|
+
_c: any;
|
|
1584
|
+
gc: any;
|
|
1584
1585
|
type: string;
|
|
1585
1586
|
_apply(t: any): mc;
|
|
1586
1587
|
}
|
|
@@ -1591,15 +1592,15 @@ declare class ih extends jc {
|
|
|
1591
1592
|
declare class Bh extends Dh {
|
|
1592
1593
|
constructor(t: any, e: any, n: any);
|
|
1593
1594
|
type: any;
|
|
1595
|
+
Tc: any;
|
|
1594
1596
|
Ec: any;
|
|
1595
|
-
Ac: any;
|
|
1596
1597
|
_apply(t: any): mc;
|
|
1597
1598
|
}
|
|
1598
1599
|
declare class xh extends Dh {
|
|
1599
1600
|
constructor(t: any, e: any, n: any);
|
|
1601
|
+
_c: any;
|
|
1600
1602
|
wc: any;
|
|
1601
1603
|
mc: any;
|
|
1602
|
-
gc: any;
|
|
1603
1604
|
type: string;
|
|
1604
1605
|
_apply(t: any): mc;
|
|
1605
1606
|
}
|
|
@@ -1650,15 +1651,15 @@ declare class fc {
|
|
|
1650
1651
|
*/
|
|
1651
1652
|
declare class Wo {
|
|
1652
1653
|
constructor(t: any, e: any, n?: number, s?: number, i?: number);
|
|
1653
|
-
|
|
1654
|
+
Yn: any;
|
|
1654
1655
|
timerId: any;
|
|
1656
|
+
mo: number;
|
|
1655
1657
|
yo: number;
|
|
1656
1658
|
po: number;
|
|
1657
1659
|
Io: number;
|
|
1658
|
-
To:
|
|
1659
|
-
Eo: any;
|
|
1660
|
+
To: any;
|
|
1660
1661
|
/** The last backoff attempt, as epoch milliseconds. */
|
|
1661
|
-
|
|
1662
|
+
Eo: number;
|
|
1662
1663
|
/**
|
|
1663
1664
|
* Resets the backoff delay.
|
|
1664
1665
|
*
|
|
@@ -1669,13 +1670,13 @@ declare class Wo {
|
|
|
1669
1670
|
/**
|
|
1670
1671
|
* Resets the backoff delay to the maximum delay (e.g. for use after a
|
|
1671
1672
|
* RESOURCE_EXHAUSTED error).
|
|
1672
|
-
*/
|
|
1673
|
+
*/ Ao(): void;
|
|
1673
1674
|
/**
|
|
1674
1675
|
* Returns a promise that resolves after currentDelayMs, and increases the
|
|
1675
1676
|
* delay for any subsequent attempts. If there was a pending backoff operation
|
|
1676
1677
|
* already, it will be canceled.
|
|
1677
|
-
*/
|
|
1678
|
-
|
|
1678
|
+
*/ Ro(t: any): void;
|
|
1679
|
+
Po(): void;
|
|
1679
1680
|
cancel(): void;
|
|
1680
1681
|
/** Returns a random value in the range [-currentBaseMs/2, currentBaseMs/2] */ bo(): number;
|
|
1681
1682
|
}
|
|
@@ -1775,15 +1776,15 @@ declare class vu {
|
|
|
1775
1776
|
fieldTransforms: any;
|
|
1776
1777
|
fieldMask: any;
|
|
1777
1778
|
get path(): any;
|
|
1778
|
-
get
|
|
1779
|
-
/** Returns a new context with the specified settings overwritten. */
|
|
1780
|
-
|
|
1779
|
+
get ec(): any;
|
|
1780
|
+
/** Returns a new context with the specified settings overwritten. */ nc(t: any): Xc;
|
|
1781
|
+
sc(t: any): Xc;
|
|
1782
|
+
oc(t: any): Xc;
|
|
1781
1783
|
uc(t: any): Xc;
|
|
1782
|
-
ac(t: any):
|
|
1783
|
-
cc(t: any): Q;
|
|
1784
|
+
ac(t: any): Q;
|
|
1784
1785
|
/** Returns 'true' if 'fieldPath' was traversed when creating this context. */ contains(t: any): boolean;
|
|
1785
|
-
|
|
1786
|
-
|
|
1786
|
+
tc(): void;
|
|
1787
|
+
rc(t: any): void;
|
|
1787
1788
|
}
|
|
1788
1789
|
/**
|
|
1789
1790
|
* @license
|
|
@@ -1806,4 +1807,4 @@ declare class vu {
|
|
|
1806
1807
|
field: any;
|
|
1807
1808
|
transform: any;
|
|
1808
1809
|
}
|
|
1809
|
-
export {
|
|
1810
|
+
export { Jh as AbstractUserDataWriter, Qc as Bytes, Pc as CACHE_SIZE_UNLIMITED, gc as CollectionReference, wc as DocumentReference, Rh as DocumentSnapshot, Kc as FieldPath, jc as FieldValue, Vc as Firestore, Q as FirestoreError, Wc as GeoPoint, bc as LoadBundleTask, mc as Query, Dh as QueryConstraint, bh as QueryDocumentSnapshot, Ph as QuerySnapshot, Ah as SnapshotMetadata, at as Timestamp, ml as Transaction, Zh as WriteBatch, vt as _DatabaseId, xt as _DocumentKey, et as _EmptyAppCheckTokenProvider, z as _EmptyAuthCredentialsProvider, mt as _FieldPath, hc as _cast, q as _debugAssert, yt as _isBase64Available, $ as _logWarn, Rl as _setIndexConfiguration, oc as _validateIsNotUsedTogether, ll as addDoc, Tl as arrayRemove, Il as arrayUnion, Mc as clearIndexedDbPersistence, yc as collection, pc as collectionGroup, _c as connectFirestoreEmulator, hl as deleteDoc, yl as deleteField, $c as disableNetwork, Ic as doc, Gc as documentId, xc as enableIndexedDbPersistence, Nc as enableMultiTabIndexedDbPersistence, Fc as enableNetwork, Gh as endAt, Kh as endBefore, Dc as ensureFirestoreConfigured, _l as executeWrite, el as getDoc, sl as getDocFromCache, il as getDocFromServer, rl as getDocs, ol as getDocsFromCache, ul as getDocsFromServer, Sc as getFirestore, El as increment, vc as initializeFirestore, Fh as limit, $h as limitToLast, Lc as loadBundle, Uc as namedQuery, fl as onSnapshot, dl as onSnapshotsInSync, Mh as orderBy, Ch as query, Ec as queryEqual, Tc as refEqual, gl as runTransaction, pl as serverTimestamp, al as setDoc, M as setLogLevel, vh as snapshotEqual, Uh as startAfter, Lh as startAt, Bc as terminate, cl as updateDoc, Oc as waitForPendingWrites, Nh as where, Al as writeBatch };
|