@firebase/firestore 3.0.2-canary.3846fb049 → 3.0.2-canary.4e7aba48a
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/compat/api/database.d.ts +0 -9
- package/dist/firestore/compat/index.console.d.ts +10 -1
- package/dist/firestore/lite/index.d.ts +1 -1
- package/dist/firestore/src/api.d.ts +1 -1
- package/dist/firestore/src/lite-api/reference.d.ts +1 -1
- package/dist/firestore/src/lite-api/types.d.ts +12 -1
- package/dist/index.d.ts +13 -2
- package/dist/index.esm2017.js +2583 -2583
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +2516 -2516
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.esm2017.js +4 -4
- package/dist/index.node.cjs.esm2017.js.map +1 -1
- package/dist/index.node.cjs.js +3 -3
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.rn.js +2799 -2799
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +14 -2
- package/dist/lite/firestore/compat/api/database.d.ts +0 -9
- package/dist/lite/firestore/compat/index.console.d.ts +10 -1
- package/dist/lite/firestore/lite/index.d.ts +1 -1
- package/dist/lite/firestore/src/api.d.ts +1 -1
- package/dist/lite/firestore/src/lite-api/reference.d.ts +1 -1
- package/dist/lite/firestore/src/lite-api/types.d.ts +12 -1
- package/dist/lite/index.browser.esm2017.js +2 -2
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +2 -2
- package/dist/lite/index.browser.esm5.js.map +1 -1
- package/dist/lite/index.d.ts +13 -2
- package/dist/lite/index.node.cjs.js +2 -2
- package/dist/lite/index.node.cjs.js.map +1 -1
- package/dist/lite/index.node.esm2017.js +2 -2
- package/dist/lite/index.node.esm2017.js.map +1 -1
- package/dist/lite/index.rn.esm2017.js +2 -2
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/internal.d.ts +14 -2
- package/dist/lite/packages/firestore/compat/api/database.d.ts +0 -9
- package/dist/lite/packages/firestore/compat/index.console.d.ts +10 -1
- package/dist/lite/packages/firestore/lite/index.d.ts +1 -1
- package/dist/lite/packages/firestore/src/api.d.ts +1 -1
- package/dist/lite/packages/firestore/src/lite-api/reference.d.ts +1 -1
- package/dist/lite/packages/firestore/src/lite-api/types.d.ts +12 -1
- package/dist/lite/private.d.ts +14 -2
- package/dist/packages/firestore/compat/api/database.d.ts +0 -9
- package/dist/packages/firestore/compat/index.console.d.ts +10 -1
- package/dist/packages/firestore/dist/index.esm2017.d.ts +156 -156
- package/dist/packages/firestore/lite/index.d.ts +1 -1
- package/dist/packages/firestore/src/api.d.ts +1 -1
- package/dist/packages/firestore/src/lite-api/reference.d.ts +1 -1
- package/dist/packages/firestore/src/lite-api/types.d.ts +12 -1
- package/dist/private.d.ts +14 -2
- package/package.json +9 -9
package/dist/internal.d.ts
CHANGED
|
@@ -395,6 +395,18 @@ declare const enum ChangeType {
|
|
|
395
395
|
Metadata = 3
|
|
396
396
|
}
|
|
397
397
|
|
|
398
|
+
/**
|
|
399
|
+
* Helper for calculating the nested fields for a given type T1. This is needed
|
|
400
|
+
* to distribute union types such as `undefined | {...}` (happens for optional
|
|
401
|
+
* props) or `{a: A} | {b: B}`.
|
|
402
|
+
*
|
|
403
|
+
* In this use case, `V` is used to distribute the union types of `T[K]` on
|
|
404
|
+
* `Record`, since `T[K]` is evaluated as an expression and not distributed.
|
|
405
|
+
*
|
|
406
|
+
* See https://www.typescriptlang.org/docs/handbook/advanced-types.html#distributive-conditional-types
|
|
407
|
+
*/
|
|
408
|
+
export declare type ChildUpdateFields<K extends string, V> = V extends Record<string, unknown> ? AddPrefixToKeys<K, UpdateData<V>> : never;
|
|
409
|
+
|
|
398
410
|
/**
|
|
399
411
|
* Clears the persistent storage. This includes pending writes and cached
|
|
400
412
|
* documents.
|
|
@@ -2926,7 +2938,7 @@ declare interface NamedQuery_2 {
|
|
|
2926
2938
|
* all possible keys that are all marked as optional
|
|
2927
2939
|
*/
|
|
2928
2940
|
export declare type NestedUpdateFields<T extends Record<string, unknown>> = UnionToIntersection<{
|
|
2929
|
-
[K in keyof T & string]:
|
|
2941
|
+
[K in keyof T & string]: ChildUpdateFields<K, T[K]>;
|
|
2930
2942
|
}[keyof T & string]>;
|
|
2931
2943
|
|
|
2932
2944
|
/**
|
|
@@ -5276,7 +5288,7 @@ declare interface UntypedFirestoreDataConverter<T> {
|
|
|
5276
5288
|
* reference nested fields within the document. FieldValues can be passed in
|
|
5277
5289
|
* as property values.
|
|
5278
5290
|
*/
|
|
5279
|
-
export declare type UpdateData<T> = T extends Primitive ? T : T extends
|
|
5291
|
+
export declare type UpdateData<T> = T extends Primitive ? T : T extends {} ? {
|
|
5280
5292
|
[K in keyof T]?: UpdateData<T[K]> | FieldValue;
|
|
5281
5293
|
} & NestedUpdateFields<T> : Partial<T>;
|
|
5282
5294
|
|
|
@@ -30,15 +30,6 @@ export interface PersistenceProvider {
|
|
|
30
30
|
enableMultiTabIndexedDbPersistence(firestore: Firestore): Promise<void>;
|
|
31
31
|
clearIndexedDbPersistence(firestore: Firestore): Promise<void>;
|
|
32
32
|
}
|
|
33
|
-
/**
|
|
34
|
-
* The persistence provider included with the memory-only SDK. This provider
|
|
35
|
-
* errors for all attempts to access persistence.
|
|
36
|
-
*/
|
|
37
|
-
export declare class MemoryPersistenceProvider implements PersistenceProvider {
|
|
38
|
-
enableIndexedDbPersistence(firestore: Firestore, forceOwnership: boolean): Promise<void>;
|
|
39
|
-
enableMultiTabIndexedDbPersistence(firestore: Firestore): Promise<void>;
|
|
40
|
-
clearIndexedDbPersistence(firestore: Firestore): Promise<void>;
|
|
41
|
-
}
|
|
42
33
|
/**
|
|
43
34
|
* The persistence provider included with the full Firestore SDK.
|
|
44
35
|
*/
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import { FirebaseAuthInternalName } from '@firebase/auth-interop-types';
|
|
18
18
|
import { Provider } from '@firebase/component';
|
|
19
|
-
import { Firestore as FirestoreCompat } from './api/database';
|
|
19
|
+
import { Firestore as FirestoreCompat, PersistenceProvider } from './api/database';
|
|
20
20
|
export { CollectionReference, DocumentReference, DocumentSnapshot, QuerySnapshot } from './api/database';
|
|
21
21
|
export { Blob } from './api/blob';
|
|
22
22
|
export { GeoPoint } from './api/geo_point';
|
|
@@ -27,6 +27,15 @@ export interface FirestoreDatabase {
|
|
|
27
27
|
projectId: string;
|
|
28
28
|
database?: string;
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* The persistence provider included with the memory-only SDK. This provider
|
|
32
|
+
* errors for all attempts to access persistence.
|
|
33
|
+
*/
|
|
34
|
+
export declare class MemoryPersistenceProvider implements PersistenceProvider {
|
|
35
|
+
enableIndexedDbPersistence(firestore: FirestoreCompat, forceOwnership: boolean): Promise<void>;
|
|
36
|
+
enableMultiTabIndexedDbPersistence(firestore: Firestore): Promise<void>;
|
|
37
|
+
clearIndexedDbPersistence(firestore: Firestore): Promise<void>;
|
|
38
|
+
}
|
|
30
39
|
/** Firestore class that exposes the constructor expected by the Console. */
|
|
31
40
|
export declare class Firestore extends FirestoreCompat {
|
|
32
41
|
constructor(firestoreDatabase: FirestoreDatabase, authProvider: Provider<FirebaseAuthInternalName>);
|
|
@@ -11,7 +11,7 @@ export { Firestore as Firestore, EmulatorMockTokenOptions, initializeFirestore,
|
|
|
11
11
|
export { DocumentData, UpdateData, WithFieldValue, PartialWithFieldValue, SetOptions, DocumentReference, Query, CollectionReference, collection, collectionGroup, doc, refEqual, queryEqual } from '../src/lite-api/reference';
|
|
12
12
|
export { endAt, endBefore, startAt, startAfter, limit, limitToLast, orderBy, OrderByDirection, where, WhereFilterOp, query, QueryConstraint, QueryConstraintType } from '../src/lite-api/query';
|
|
13
13
|
export { addDoc, deleteDoc, updateDoc, setDoc, getDoc, getDocs } from '../src/lite-api/reference_impl';
|
|
14
|
-
export { Primitive, NestedUpdateFields, AddPrefixToKeys, UnionToIntersection } from '../src/lite-api/types';
|
|
14
|
+
export { Primitive, NestedUpdateFields, ChildUpdateFields, AddPrefixToKeys, UnionToIntersection } from '../src/lite-api/types';
|
|
15
15
|
export { FieldPath, documentId } from '../src/lite-api/field_path';
|
|
16
16
|
export { FieldValue } from '../src/lite-api/field_value';
|
|
17
17
|
export { increment, arrayRemove, arrayUnion, serverTimestamp, deleteField } from '../src/lite-api/field_value_impl';
|
|
@@ -34,7 +34,7 @@ export { Timestamp } from './api/timestamp';
|
|
|
34
34
|
export { CACHE_SIZE_UNLIMITED } from './api/database';
|
|
35
35
|
export { FirestoreErrorCode, FirestoreError } from './util/error';
|
|
36
36
|
export { AbstractUserDataWriter } from './lite-api/user_data_writer';
|
|
37
|
-
export { Primitive, NestedUpdateFields, AddPrefixToKeys, UnionToIntersection } from '../src/lite-api/types';
|
|
37
|
+
export { Primitive, NestedUpdateFields, ChildUpdateFields, AddPrefixToKeys, UnionToIntersection } from '../src/lite-api/types';
|
|
38
38
|
/**
|
|
39
39
|
* Internal exports
|
|
40
40
|
*/
|
|
@@ -50,7 +50,7 @@ export declare type WithFieldValue<T> = T extends Primitive ? T : T extends {} ?
|
|
|
50
50
|
* reference nested fields within the document. FieldValues can be passed in
|
|
51
51
|
* as property values.
|
|
52
52
|
*/
|
|
53
|
-
export declare type UpdateData<T> = T extends Primitive ? T : T extends
|
|
53
|
+
export declare type UpdateData<T> = T extends Primitive ? T : T extends {} ? {
|
|
54
54
|
[K in keyof T]?: UpdateData<T[K]> | FieldValue;
|
|
55
55
|
} & NestedUpdateFields<T> : Partial<T>;
|
|
56
56
|
/**
|
|
@@ -28,8 +28,19 @@ export declare type Primitive = string | number | boolean | undefined | null;
|
|
|
28
28
|
* all possible keys that are all marked as optional
|
|
29
29
|
*/
|
|
30
30
|
export declare type NestedUpdateFields<T extends Record<string, unknown>> = UnionToIntersection<{
|
|
31
|
-
[K in keyof T & string]:
|
|
31
|
+
[K in keyof T & string]: ChildUpdateFields<K, T[K]>;
|
|
32
32
|
}[keyof T & string]>;
|
|
33
|
+
/**
|
|
34
|
+
* Helper for calculating the nested fields for a given type T1. This is needed
|
|
35
|
+
* to distribute union types such as `undefined | {...}` (happens for optional
|
|
36
|
+
* props) or `{a: A} | {b: B}`.
|
|
37
|
+
*
|
|
38
|
+
* In this use case, `V` is used to distribute the union types of `T[K]` on
|
|
39
|
+
* `Record`, since `T[K]` is evaluated as an expression and not distributed.
|
|
40
|
+
*
|
|
41
|
+
* See https://www.typescriptlang.org/docs/handbook/advanced-types.html#distributive-conditional-types
|
|
42
|
+
*/
|
|
43
|
+
export declare type ChildUpdateFields<K extends string, V> = V extends Record<string, unknown> ? AddPrefixToKeys<K, UpdateData<V>> : never;
|
|
33
44
|
/**
|
|
34
45
|
* Returns a new map where every key is prefixed with the outer key appended
|
|
35
46
|
* to a dot.
|
|
@@ -66,7 +66,7 @@ h.MOCK_USER = new h("mock-user");
|
|
|
66
66
|
* See the License for the specific language governing permissions and
|
|
67
67
|
* limitations under the License.
|
|
68
68
|
*/
|
|
69
|
-
let l = "9.0.2-canary.
|
|
69
|
+
let l = "9.0.2-canary.4e7aba48a";
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
72
|
* @license
|
|
@@ -5917,7 +5917,7 @@ class Cr {
|
|
|
5917
5917
|
}(`${s}_lite`), e(new i("firestore/lite", ((t, {options: n}) => {
|
|
5918
5918
|
const e = t.getProvider("app").getImmediate(), r = new ee(e, new B(t.getProvider("auth-internal")));
|
|
5919
5919
|
return n && r._setSettings(n), r;
|
|
5920
|
-
}), "PUBLIC" /* PUBLIC */)), r("firestore-lite", "3.0.2-canary.
|
|
5920
|
+
}), "PUBLIC" /* PUBLIC */)), r("firestore-lite", "3.0.2-canary.4e7aba48a", "node");
|
|
5921
5921
|
|
|
5922
5922
|
export { ye as Bytes, ae as CollectionReference, ue as DocumentReference, We as DocumentSnapshot, me as FieldPath, _e as FieldValue, ee as Firestore, L as FirestoreError, ge as GeoPoint, ce as Query, Je as QueryConstraint, Ge as QueryDocumentSnapshot, He as QuerySnapshot, pt as Timestamp, Cr as Transaction, Nr as WriteBatch, Ir as addDoc, Rr as arrayRemove, Pr as arrayUnion, he as collection, le as collectionGroup, ie as connectFirestoreEmulator, Er as deleteDoc, Tr as deleteField, fe as doc, pe as documentId, lr as endAt, hr as endBefore, _r as getDoc, gr as getDocs, se as getFirestore, Vr as increment, re as initializeFirestore, sr as limit, ir as limitToLast, er as orderBy, Ze as query, we as queryEqual, de as refEqual, Lr as runTransaction, Ar as serverTimestamp, br as setDoc, d as setLogLevel, Ye as snapshotEqual, cr as startAfter, ur as startAt, oe as terminate, vr as updateDoc, tr as where, $r as writeBatch };
|
|
5923
5923
|
//# sourceMappingURL=index.browser.esm2017.js.map
|