@firebase/firestore 3.0.2-canary.46d26ff96 → 3.0.2-canary.4d2a54fb0
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 -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 +2 -2
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +2 -2
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.esm2017.js +2 -2
- package/dist/index.node.cjs.esm2017.js.map +1 -1
- package/dist/index.node.cjs.js +2 -2
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.rn.js +708 -708
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +14 -2
- 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 +69 -69
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/internal.d.ts +14 -2
- 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/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
|
@@ -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.
|
package/dist/index.d.ts
CHANGED
|
@@ -101,6 +101,17 @@ export declare class Bytes {
|
|
|
101
101
|
* {@link Firestore} instance.
|
|
102
102
|
*/
|
|
103
103
|
export declare const CACHE_SIZE_UNLIMITED = -1;
|
|
104
|
+
/**
|
|
105
|
+
* Helper for calculating the nested fields for a given type T1. This is needed
|
|
106
|
+
* to distribute union types such as `undefined | {...}` (happens for optional
|
|
107
|
+
* props) or `{a: A} | {b: B}`.
|
|
108
|
+
*
|
|
109
|
+
* In this use case, `V` is used to distribute the union types of `T[K]` on
|
|
110
|
+
* `Record`, since `T[K]` is evaluated as an expression and not distributed.
|
|
111
|
+
*
|
|
112
|
+
* See https://www.typescriptlang.org/docs/handbook/advanced-types.html#distributive-conditional-types
|
|
113
|
+
*/
|
|
114
|
+
export declare type ChildUpdateFields<K extends string, V> = V extends Record<string, unknown> ? AddPrefixToKeys<K, UpdateData<V>> : never;
|
|
104
115
|
/**
|
|
105
116
|
* Clears the persistent storage. This includes pending writes and cached
|
|
106
117
|
* documents.
|
|
@@ -1038,7 +1049,7 @@ export declare function namedQuery(firestore: Firestore, name: string): Promise<
|
|
|
1038
1049
|
* all possible keys that are all marked as optional
|
|
1039
1050
|
*/
|
|
1040
1051
|
export declare type NestedUpdateFields<T extends Record<string, unknown>> = UnionToIntersection<{
|
|
1041
|
-
[K in keyof T & string]:
|
|
1052
|
+
[K in keyof T & string]: ChildUpdateFields<K, T[K]>;
|
|
1042
1053
|
}[keyof T & string]>;
|
|
1043
1054
|
/**
|
|
1044
1055
|
* Attaches a listener for `DocumentSnapshot` events. You may either pass
|
|
@@ -1859,7 +1870,7 @@ export declare interface Unsubscribe {
|
|
|
1859
1870
|
* reference nested fields within the document. FieldValues can be passed in
|
|
1860
1871
|
* as property values.
|
|
1861
1872
|
*/
|
|
1862
|
-
export declare type UpdateData<T> = T extends Primitive ? T : T extends
|
|
1873
|
+
export declare type UpdateData<T> = T extends Primitive ? T : T extends {} ? {
|
|
1863
1874
|
[K in keyof T]?: UpdateData<T[K]> | FieldValue;
|
|
1864
1875
|
} & NestedUpdateFields<T> : Partial<T>;
|
|
1865
1876
|
/**
|
package/dist/index.esm2017.js
CHANGED
|
@@ -68,7 +68,7 @@ V.MOCK_USER = new V("mock-user");
|
|
|
68
68
|
* See the License for the specific language governing permissions and
|
|
69
69
|
* limitations under the License.
|
|
70
70
|
*/
|
|
71
|
-
let S = "9.0.2-canary.
|
|
71
|
+
let S = "9.0.2-canary.4d2a54fb0";
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* @license
|
|
@@ -17780,7 +17780,7 @@ function gh(t, e) {
|
|
|
17780
17780
|
return e = Object.assign({
|
|
17781
17781
|
useFetchStreams: !0
|
|
17782
17782
|
}, e), s._setSettings(e), s;
|
|
17783
|
-
}), "PUBLIC" /* PUBLIC */)), s("@firebase/firestore", "3.0.2-canary.
|
|
17783
|
+
}), "PUBLIC" /* PUBLIC */)), s("@firebase/firestore", "3.0.2-canary.4d2a54fb0", Vh);
|
|
17784
17784
|
|
|
17785
17785
|
export { th as AbstractUserDataWriter, Jc as Bytes, Cc as CACHE_SIZE_UNLIMITED, Ic as CollectionReference, Ec as DocumentReference, Su as DocumentSnapshot, zc as FieldPath, Yc as FieldValue, Nc as Firestore, q as FirestoreError, Xc as GeoPoint, Dc as LoadBundleTask, Tc as Query, $u as QueryConstraint, Du as QueryDocumentSnapshot, Cu as QuerySnapshot, Vu as SnapshotMetadata, nt as Timestamp, Eh as Transaction, sh as WriteBatch, cc as _DatabaseId, Rt as _DocumentKey, Q as _EmptyCredentialsProvider, ht as _FieldPath, _c as _cast, L as _debugAssert, ft as _isBase64Available, $ as _logWarn, lc as _validateIsNotUsedTogether, _h as addDoc, bh as arrayRemove, Rh as arrayUnion, Bc as clearIndexedDbPersistence, Ac as collection, Rc as collectionGroup, pc as connectFirestoreEmulator, wh as deleteDoc, Ih as deleteField, Kc as disableNetwork, bc as doc, Hc as documentId, Fc as enableIndexedDbPersistence, Mc as enableMultiTabIndexedDbPersistence, qc as enableNetwork, Hu as endAt, zu as endBefore, $c as ensureFirestoreConfigured, yh as executeWrite, rh as getDoc, ah as getDocFromCache, ch as getDocFromServer, uh as getDocs, hh as getDocsFromCache, lh as getDocsFromServer, kc as getFirestore, Ph as increment, xc as initializeFirestore, qu as limit, Ku as limitToLast, Qc as loadBundle, Wc as namedQuery, mh as onSnapshot, gh as onSnapshotsInSync, Bu as orderBy, Ou as query, vc as queryEqual, Pc as refEqual, Th as runTransaction, Ah as serverTimestamp, fh as setDoc, N as setLogLevel, xu as snapshotEqual, Wu as startAfter, Qu as startAt, jc as terminate, dh as updateDoc, Uc as waitForPendingWrites, Mu as where, vh as writeBatch };
|
|
17786
17786
|
//# sourceMappingURL=index.esm2017.js.map
|