@firebase/firestore 3.13.0-canary.1ff891c0d → 3.13.0-canary.47860fe6e
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/global_index.d.ts +38 -8
- package/dist/firestore/src/util/testing_hooks.d.ts +14 -0
- package/dist/firestore/test/integration/util/helpers.d.ts +11 -10
- package/dist/firestore/test/integration/util/testing_hooks_util.d.ts +1 -0
- package/dist/index.cjs.js +150 -136
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm2017.js +150 -136
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +147 -133
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +27 -21
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +27 -21
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +150 -136
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +14 -0
- package/dist/lite/firestore/src/util/testing_hooks.d.ts +14 -0
- package/dist/lite/firestore/test/integration/util/helpers.d.ts +11 -10
- package/dist/lite/firestore/test/integration/util/testing_hooks_util.d.ts +1 -0
- package/dist/lite/index.browser.esm2017.js +2 -2
- package/dist/lite/index.browser.esm5.js +2 -2
- package/dist/lite/index.cjs.js +2 -2
- package/dist/lite/index.node.cjs.js +2 -2
- package/dist/lite/index.node.mjs +2 -2
- package/dist/lite/index.rn.esm2017.js +2 -2
- package/dist/lite/packages/firestore/src/util/testing_hooks.d.ts +14 -0
- package/dist/lite/packages/firestore/test/integration/util/helpers.d.ts +11 -10
- package/dist/lite/packages/firestore/test/integration/util/testing_hooks_util.d.ts +1 -0
- package/dist/packages/firestore/src/util/testing_hooks.d.ts +14 -0
- package/dist/packages/firestore/test/integration/util/helpers.d.ts +11 -10
- package/dist/packages/firestore/test/integration/util/testing_hooks_util.d.ts +1 -0
- package/dist/private.d.ts +14 -0
- package/package.json +9 -9
|
@@ -603,7 +603,10 @@ interface GetOptions {
|
|
|
603
603
|
readonly source?: 'default' | 'server' | 'cache';
|
|
604
604
|
}
|
|
605
605
|
|
|
606
|
-
declare class DocumentReference$1<
|
|
606
|
+
declare class DocumentReference$1<
|
|
607
|
+
T = DocumentData$1,
|
|
608
|
+
T2 extends DocumentData$1 = DocumentData$1
|
|
609
|
+
> {
|
|
607
610
|
private constructor();
|
|
608
611
|
|
|
609
612
|
readonly id: string;
|
|
@@ -669,7 +672,10 @@ interface SnapshotMetadata$1 {
|
|
|
669
672
|
isEqual(other: SnapshotMetadata$1): boolean;
|
|
670
673
|
}
|
|
671
674
|
|
|
672
|
-
declare class DocumentSnapshot$2<
|
|
675
|
+
declare class DocumentSnapshot$2<
|
|
676
|
+
T = DocumentData$1,
|
|
677
|
+
T2 extends DocumentData$1 = DocumentData$1
|
|
678
|
+
> {
|
|
673
679
|
protected constructor();
|
|
674
680
|
|
|
675
681
|
readonly exists: boolean;
|
|
@@ -685,8 +691,9 @@ declare class DocumentSnapshot$2<T = DocumentData$1> {
|
|
|
685
691
|
}
|
|
686
692
|
|
|
687
693
|
declare class QueryDocumentSnapshot$2<
|
|
688
|
-
T = DocumentData$1
|
|
689
|
-
|
|
694
|
+
T = DocumentData$1,
|
|
695
|
+
T2 extends DocumentData$1 = DocumentData$1
|
|
696
|
+
> extends DocumentSnapshot$2<T, T2> {
|
|
690
697
|
private constructor();
|
|
691
698
|
|
|
692
699
|
data(options?: SnapshotOptions$1): T;
|
|
@@ -706,7 +713,7 @@ type WhereFilterOp$1 =
|
|
|
706
713
|
| 'array-contains-any'
|
|
707
714
|
| 'not-in';
|
|
708
715
|
|
|
709
|
-
declare class Query$2<T = DocumentData$1> {
|
|
716
|
+
declare class Query$2<T = DocumentData$1, T2 extends DocumentData$1 = DocumentData$1> {
|
|
710
717
|
protected constructor();
|
|
711
718
|
|
|
712
719
|
readonly firestore: FirebaseFirestore;
|
|
@@ -771,7 +778,10 @@ declare class Query$2<T = DocumentData$1> {
|
|
|
771
778
|
withConverter<U>(converter: FirestoreDataConverter$2<U>): Query$2<U>;
|
|
772
779
|
}
|
|
773
780
|
|
|
774
|
-
declare class QuerySnapshot$1<
|
|
781
|
+
declare class QuerySnapshot$1<
|
|
782
|
+
T = DocumentData$1,
|
|
783
|
+
T2 extends DocumentData$1 = DocumentData$1
|
|
784
|
+
> {
|
|
775
785
|
private constructor();
|
|
776
786
|
|
|
777
787
|
readonly query: Query$2<T>;
|
|
@@ -792,14 +802,20 @@ declare class QuerySnapshot$1<T = DocumentData$1> {
|
|
|
792
802
|
|
|
793
803
|
type DocumentChangeType$1 = 'added' | 'removed' | 'modified';
|
|
794
804
|
|
|
795
|
-
interface DocumentChange$1<
|
|
805
|
+
interface DocumentChange$1<
|
|
806
|
+
T = DocumentData$1,
|
|
807
|
+
T2 extends DocumentData$1 = DocumentData$1
|
|
808
|
+
> {
|
|
796
809
|
readonly type: DocumentChangeType$1;
|
|
797
810
|
readonly doc: QueryDocumentSnapshot$2<T>;
|
|
798
811
|
readonly oldIndex: number;
|
|
799
812
|
readonly newIndex: number;
|
|
800
813
|
}
|
|
801
814
|
|
|
802
|
-
declare class CollectionReference$1<
|
|
815
|
+
declare class CollectionReference$1<
|
|
816
|
+
T = DocumentData$1,
|
|
817
|
+
T2 extends DocumentData$1 = DocumentData$1
|
|
818
|
+
> extends Query$2<T, T2> {
|
|
803
819
|
private constructor();
|
|
804
820
|
|
|
805
821
|
readonly id: string;
|
|
@@ -9154,6 +9170,20 @@ interface ExistenceFilterMismatchInfo {
|
|
|
9154
9170
|
bitmapLength: number;
|
|
9155
9171
|
/** The number of bits of padding in the last byte of the bloom filter. */
|
|
9156
9172
|
padding: number;
|
|
9173
|
+
/**
|
|
9174
|
+
* Check if the given document path is contained in the bloom filter.
|
|
9175
|
+
*
|
|
9176
|
+
* The "path" of a document can be retrieved from the
|
|
9177
|
+
* `DocumentReference.path` property.
|
|
9178
|
+
*
|
|
9179
|
+
* Note that due to the probabilistic nature of a bloom filter, it is
|
|
9180
|
+
* possible that false positives may occur; that is, this function may
|
|
9181
|
+
* return `true` even though the given string is not in the bloom filter.
|
|
9182
|
+
*
|
|
9183
|
+
* This property is "optional"; if it is undefined then parsing the bloom
|
|
9184
|
+
* filter failed.
|
|
9185
|
+
*/
|
|
9186
|
+
mightContain?(documentPath: string): boolean;
|
|
9157
9187
|
};
|
|
9158
9188
|
}
|
|
9159
9189
|
/**
|
|
@@ -94,6 +94,20 @@ export interface ExistenceFilterMismatchInfo {
|
|
|
94
94
|
bitmapLength: number;
|
|
95
95
|
/** The number of bits of padding in the last byte of the bloom filter. */
|
|
96
96
|
padding: number;
|
|
97
|
+
/**
|
|
98
|
+
* Check if the given document path is contained in the bloom filter.
|
|
99
|
+
*
|
|
100
|
+
* The "path" of a document can be retrieved from the
|
|
101
|
+
* `DocumentReference.path` property.
|
|
102
|
+
*
|
|
103
|
+
* Note that due to the probabilistic nature of a bloom filter, it is
|
|
104
|
+
* possible that false positives may occur; that is, this function may
|
|
105
|
+
* return `true` even though the given string is not in the bloom filter.
|
|
106
|
+
*
|
|
107
|
+
* This property is "optional"; if it is undefined then parsing the bloom
|
|
108
|
+
* filter failed.
|
|
109
|
+
*/
|
|
110
|
+
mightContain?(documentPath: string): boolean;
|
|
97
111
|
};
|
|
98
112
|
}
|
|
99
113
|
/**
|
|
@@ -59,6 +59,7 @@ export declare class IndexedDbPersistenceMode implements PersistenceMode {
|
|
|
59
59
|
toLruGc(): IndexedDbPersistenceMode;
|
|
60
60
|
asLocalCacheFirestoreSettings(): PersistentLocalCache;
|
|
61
61
|
}
|
|
62
|
+
export declare const PERSISTENCE_MODE_UNSPECIFIED: unique symbol;
|
|
62
63
|
export declare function isPersistenceAvailable(): boolean;
|
|
63
64
|
declare type ApiSuiteFunction = (message: string, testSuite: (persistence: PersistenceMode) => void) => void;
|
|
64
65
|
interface ApiDescribe {
|
|
@@ -76,24 +77,24 @@ export declare function toDataMap(docSet: QuerySnapshot): {
|
|
|
76
77
|
};
|
|
77
78
|
/** Converts a DocumentSet to an array with the id of each document */
|
|
78
79
|
export declare function toIds(docSet: QuerySnapshot): string[];
|
|
79
|
-
export declare function withTestDb(persistence: PersistenceMode, fn: (db: Firestore) => Promise<void>): Promise<void>;
|
|
80
|
+
export declare function withTestDb(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, fn: (db: Firestore) => Promise<void>): Promise<void>;
|
|
80
81
|
/** Runs provided fn with a db for an alternate project id. */
|
|
81
|
-
export declare function withAlternateTestDb(persistence: PersistenceMode, fn: (db: Firestore) => Promise<void>): Promise<void>;
|
|
82
|
-
export declare function withTestDbs(persistence: PersistenceMode, numDbs: number, fn: (db: Firestore[]) => Promise<void>): Promise<void>;
|
|
83
|
-
export declare function withTestDbsSettings<T>(persistence: PersistenceMode, projectId: string, settings: PrivateSettings, numDbs: number, fn: (db: Firestore[]) => Promise<T>): Promise<T>;
|
|
82
|
+
export declare function withAlternateTestDb(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, fn: (db: Firestore) => Promise<void>): Promise<void>;
|
|
83
|
+
export declare function withTestDbs(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, numDbs: number, fn: (db: Firestore[]) => Promise<void>): Promise<void>;
|
|
84
|
+
export declare function withTestDbsSettings<T>(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, projectId: string, settings: PrivateSettings, numDbs: number, fn: (db: Firestore[]) => Promise<T>): Promise<T>;
|
|
84
85
|
export declare function withNamedTestDbsOrSkipUnlessUsingEmulator(persistence: PersistenceMode, dbNames: string[], fn: (db: Firestore[]) => Promise<void>): Promise<void>;
|
|
85
|
-
export declare function withTestDoc(persistence: PersistenceMode, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
|
|
86
|
-
export declare function withTestDocAndSettings(persistence: PersistenceMode, settings: PrivateSettings, fn: (doc: DocumentReference) => Promise<void>): Promise<void>;
|
|
87
|
-
export declare function withTestDocAndInitialData(persistence: PersistenceMode, initialData: DocumentData | null, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
|
|
86
|
+
export declare function withTestDoc(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
|
|
87
|
+
export declare function withTestDocAndSettings(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, settings: PrivateSettings, fn: (doc: DocumentReference) => Promise<void>): Promise<void>;
|
|
88
|
+
export declare function withTestDocAndInitialData(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, initialData: DocumentData | null, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
|
|
88
89
|
export declare class RetryError extends Error {
|
|
89
90
|
readonly name = "FirestoreIntegrationTestRetryError";
|
|
90
91
|
}
|
|
91
92
|
export declare function withRetry<T>(fn: (attemptNumber: number) => Promise<T>): Promise<T>;
|
|
92
|
-
export declare function withTestCollection<T>(persistence: PersistenceMode, docs: {
|
|
93
|
+
export declare function withTestCollection<T>(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, docs: {
|
|
93
94
|
[key: string]: DocumentData;
|
|
94
95
|
}, fn: (collection: CollectionReference, db: Firestore) => Promise<T>): Promise<T>;
|
|
95
|
-
export declare function withEmptyTestCollection(persistence: PersistenceMode, fn: (collection: CollectionReference, db: Firestore) => Promise<void>): Promise<void>;
|
|
96
|
-
export declare function withTestCollectionSettings<T>(persistence: PersistenceMode, settings: PrivateSettings, docs: {
|
|
96
|
+
export declare function withEmptyTestCollection(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, fn: (collection: CollectionReference, db: Firestore) => Promise<void>): Promise<void>;
|
|
97
|
+
export declare function withTestCollectionSettings<T>(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, settings: PrivateSettings, docs: {
|
|
97
98
|
[key: string]: DocumentData;
|
|
98
99
|
}, fn: (collection: CollectionReference, db: Firestore) => Promise<T>): Promise<T>;
|
|
99
100
|
export {};
|