@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
|
@@ -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/private.d.ts
CHANGED
|
@@ -332,6 +332,18 @@ declare const enum ChangeType {
|
|
|
332
332
|
Metadata = 3
|
|
333
333
|
}
|
|
334
334
|
|
|
335
|
+
/**
|
|
336
|
+
* Helper for calculating the nested fields for a given type T1. This is needed
|
|
337
|
+
* to distribute union types such as `undefined | {...}` (happens for optional
|
|
338
|
+
* props) or `{a: A} | {b: B}`.
|
|
339
|
+
*
|
|
340
|
+
* In this use case, `V` is used to distribute the union types of `T[K]` on
|
|
341
|
+
* `Record`, since `T[K]` is evaluated as an expression and not distributed.
|
|
342
|
+
*
|
|
343
|
+
* See https://www.typescriptlang.org/docs/handbook/advanced-types.html#distributive-conditional-types
|
|
344
|
+
*/
|
|
345
|
+
export declare type ChildUpdateFields<K extends string, V> = V extends Record<string, unknown> ? AddPrefixToKeys<K, UpdateData<V>> : never;
|
|
346
|
+
|
|
335
347
|
/**
|
|
336
348
|
* Clears the persistent storage. This includes pending writes and cached
|
|
337
349
|
* documents.
|
|
@@ -2768,7 +2780,7 @@ declare interface NamedQuery_2 {
|
|
|
2768
2780
|
* all possible keys that are all marked as optional
|
|
2769
2781
|
*/
|
|
2770
2782
|
export declare type NestedUpdateFields<T extends Record<string, unknown>> = UnionToIntersection<{
|
|
2771
|
-
[K in keyof T & string]:
|
|
2783
|
+
[K in keyof T & string]: ChildUpdateFields<K, T[K]>;
|
|
2772
2784
|
}[keyof T & string]>;
|
|
2773
2785
|
|
|
2774
2786
|
/**
|
|
@@ -5101,7 +5113,7 @@ declare interface UntypedFirestoreDataConverter<T> {
|
|
|
5101
5113
|
* reference nested fields within the document. FieldValues can be passed in
|
|
5102
5114
|
* as property values.
|
|
5103
5115
|
*/
|
|
5104
|
-
export declare type UpdateData<T> = T extends Primitive ? T : T extends
|
|
5116
|
+
export declare type UpdateData<T> = T extends Primitive ? T : T extends {} ? {
|
|
5105
5117
|
[K in keyof T]?: UpdateData<T[K]> | FieldValue;
|
|
5106
5118
|
} & NestedUpdateFields<T> : Partial<T>;
|
|
5107
5119
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firebase/firestore",
|
|
3
|
-
"version": "3.0.2-canary.
|
|
3
|
+
"version": "3.0.2-canary.4e7aba48a",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": "^8.13.0 || >=10.10.0"
|
|
6
6
|
},
|
|
@@ -69,22 +69,22 @@
|
|
|
69
69
|
"lite/package.json"
|
|
70
70
|
],
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@firebase/component": "0.5.6-canary.
|
|
73
|
-
"@firebase/logger": "0.2.6-canary.
|
|
74
|
-
"@firebase/util": "1.3.0-canary.
|
|
75
|
-
"@firebase/webchannel-wrapper": "0.5.1-canary.
|
|
72
|
+
"@firebase/component": "0.5.6-canary.4e7aba48a",
|
|
73
|
+
"@firebase/logger": "0.2.6-canary.4e7aba48a",
|
|
74
|
+
"@firebase/util": "1.3.0-canary.4e7aba48a",
|
|
75
|
+
"@firebase/webchannel-wrapper": "0.5.1-canary.4e7aba48a",
|
|
76
76
|
"@grpc/grpc-js": "^1.3.2",
|
|
77
77
|
"@grpc/proto-loader": "^0.6.0",
|
|
78
78
|
"node-fetch": "2.6.2",
|
|
79
79
|
"tslib": "^2.1.0"
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|
|
82
|
-
"@firebase/app": "0.7.0-canary.
|
|
82
|
+
"@firebase/app": "0.7.0-canary.4e7aba48a"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
|
-
"@firebase/app": "0.7.0-canary.
|
|
86
|
-
"@firebase/app-compat": "0.1.1-canary.
|
|
87
|
-
"@firebase/auth": "0.17.2-canary.
|
|
85
|
+
"@firebase/app": "0.7.0-canary.4e7aba48a",
|
|
86
|
+
"@firebase/app-compat": "0.1.1-canary.4e7aba48a",
|
|
87
|
+
"@firebase/auth": "0.17.2-canary.4e7aba48a",
|
|
88
88
|
"@rollup/plugin-alias": "3.1.5",
|
|
89
89
|
"@rollup/plugin-json": "4.1.0",
|
|
90
90
|
"@types/eslint": "7.28.0",
|