@react-native-firebase/database 24.1.1 → 25.0.1
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/CHANGELOG.md +36 -0
- package/dist/module/DatabaseDataSnapshot.js +144 -0
- package/dist/module/DatabaseDataSnapshot.js.map +1 -0
- package/dist/module/DatabaseOnDisconnect.js +84 -0
- package/dist/module/DatabaseOnDisconnect.js.map +1 -0
- package/dist/module/DatabaseQuery.js +298 -0
- package/dist/module/DatabaseQuery.js.map +1 -0
- package/{lib → dist/module}/DatabaseQueryModifiers.js +49 -98
- package/dist/module/DatabaseQueryModifiers.js.map +1 -0
- package/dist/module/DatabaseReference.js +169 -0
- package/dist/module/DatabaseReference.js.map +1 -0
- package/dist/module/DatabaseStatics.js +35 -0
- package/dist/module/DatabaseStatics.js.map +1 -0
- package/{lib → dist/module}/DatabaseSyncTree.js +74 -156
- package/dist/module/DatabaseSyncTree.js.map +1 -0
- package/{lib → dist/module}/DatabaseThenableReference.js +12 -12
- package/dist/module/DatabaseThenableReference.js.map +1 -0
- package/{lib → dist/module}/DatabaseTransaction.js +26 -89
- package/dist/module/DatabaseTransaction.js.map +1 -0
- package/dist/module/index.js +27 -0
- package/dist/module/index.js.map +1 -0
- package/dist/module/modular/query.js +138 -0
- package/dist/module/modular/query.js.map +1 -0
- package/dist/module/modular/transaction.js +24 -0
- package/dist/module/modular/transaction.js.map +1 -0
- package/dist/module/modular.js +76 -0
- package/dist/module/modular.js.map +1 -0
- package/dist/module/namespaced.js +147 -0
- package/dist/module/namespaced.js.map +1 -0
- package/dist/module/package.json +1 -0
- package/dist/module/types/database.js +21 -0
- package/dist/module/types/database.js.map +1 -0
- package/dist/module/types/internal.js +4 -0
- package/dist/module/types/internal.js.map +1 -0
- package/dist/module/types/namespaced.js +67 -0
- package/dist/module/types/namespaced.js.map +1 -0
- package/dist/module/version.js +5 -0
- package/dist/module/version.js.map +1 -0
- package/dist/module/web/RNFBDatabaseModule.android.js +6 -0
- package/dist/module/web/RNFBDatabaseModule.android.js.map +1 -0
- package/dist/module/web/RNFBDatabaseModule.ios.js +6 -0
- package/dist/module/web/RNFBDatabaseModule.ios.js.map +1 -0
- package/dist/module/web/RNFBDatabaseModule.js +375 -0
- package/dist/module/web/RNFBDatabaseModule.js.map +1 -0
- package/{lib → dist/module}/web/query.js +19 -24
- package/dist/module/web/query.js.map +1 -0
- package/dist/typescript/lib/DatabaseDataSnapshot.d.ts +20 -0
- package/dist/typescript/lib/DatabaseDataSnapshot.d.ts.map +1 -0
- package/dist/typescript/lib/DatabaseOnDisconnect.d.ts +19 -0
- package/dist/typescript/lib/DatabaseOnDisconnect.d.ts.map +1 -0
- package/dist/typescript/lib/DatabaseQuery.d.ts +32 -0
- package/dist/typescript/lib/DatabaseQuery.d.ts.map +1 -0
- package/dist/typescript/lib/DatabaseQueryModifiers.d.ts +55 -0
- package/dist/typescript/lib/DatabaseQueryModifiers.d.ts.map +1 -0
- package/dist/typescript/lib/DatabaseReference.d.ts +21 -0
- package/dist/typescript/lib/DatabaseReference.d.ts.map +1 -0
- package/dist/typescript/lib/DatabaseStatics.d.ts +10 -0
- package/dist/typescript/lib/DatabaseStatics.d.ts.map +1 -0
- package/dist/typescript/lib/DatabaseSyncTree.d.ts +72 -0
- package/dist/typescript/lib/DatabaseSyncTree.d.ts.map +1 -0
- package/dist/typescript/lib/DatabaseThenableReference.d.ts +13 -0
- package/dist/typescript/lib/DatabaseThenableReference.d.ts.map +1 -0
- package/dist/typescript/lib/DatabaseTransaction.d.ts +15 -0
- package/dist/typescript/lib/DatabaseTransaction.d.ts.map +1 -0
- package/dist/typescript/lib/index.d.ts +6 -0
- package/dist/typescript/lib/index.d.ts.map +1 -0
- package/dist/typescript/lib/modular/query.d.ts +41 -0
- package/dist/typescript/lib/modular/query.d.ts.map +1 -0
- package/dist/typescript/lib/modular/transaction.d.ts +3 -0
- package/dist/typescript/lib/modular/transaction.d.ts.map +1 -0
- package/dist/typescript/lib/modular.d.ts +24 -0
- package/dist/typescript/lib/modular.d.ts.map +1 -0
- package/dist/typescript/lib/namespaced.d.ts +13 -0
- package/dist/typescript/lib/namespaced.d.ts.map +1 -0
- package/dist/typescript/lib/types/database.d.ts +93 -0
- package/dist/typescript/lib/types/database.d.ts.map +1 -0
- package/dist/typescript/lib/types/internal.d.ts +189 -0
- package/dist/typescript/lib/types/internal.d.ts.map +1 -0
- package/dist/typescript/lib/types/namespaced.d.ts +1230 -0
- package/dist/typescript/lib/types/namespaced.d.ts.map +1 -0
- package/dist/typescript/lib/version.d.ts +2 -0
- package/dist/typescript/lib/version.d.ts.map +1 -0
- package/dist/typescript/lib/web/RNFBDatabaseModule.android.d.ts +3 -0
- package/dist/typescript/lib/web/RNFBDatabaseModule.android.d.ts.map +1 -0
- package/dist/typescript/lib/web/RNFBDatabaseModule.d.ts +3 -0
- package/dist/typescript/lib/web/RNFBDatabaseModule.d.ts.map +1 -0
- package/dist/typescript/lib/web/RNFBDatabaseModule.ios.d.ts +3 -0
- package/dist/typescript/lib/web/RNFBDatabaseModule.ios.d.ts.map +1 -0
- package/dist/typescript/lib/web/query.d.ts +13 -0
- package/dist/typescript/lib/web/query.d.ts.map +1 -0
- package/dist/typescript/package.json +1 -0
- package/lib/{DatabaseDataSnapshot.js → DatabaseDataSnapshot.ts} +62 -88
- package/lib/{DatabaseOnDisconnect.js → DatabaseOnDisconnect.ts} +25 -23
- package/lib/{DatabaseQuery.js → DatabaseQuery.ts} +130 -144
- package/lib/DatabaseQueryModifiers.ts +283 -0
- package/lib/{DatabaseReference.js → DatabaseReference.ts} +103 -85
- package/lib/{DatabaseStatics.js → DatabaseStatics.ts} +4 -2
- package/lib/DatabaseSyncTree.ts +390 -0
- package/lib/DatabaseThenableReference.ts +73 -0
- package/lib/DatabaseTransaction.ts +172 -0
- package/lib/index.ts +25 -0
- package/lib/modular/query.ts +410 -0
- package/lib/modular/transaction.ts +34 -0
- package/lib/modular.ts +134 -0
- package/lib/{index.js → namespaced.ts} +91 -90
- package/lib/types/database.ts +144 -0
- package/lib/types/internal.ts +317 -0
- package/lib/{index.d.ts → types/namespaced.ts} +48 -9
- package/lib/version.ts +2 -0
- package/lib/web/RNFBDatabaseModule.android.ts +4 -0
- package/lib/web/RNFBDatabaseModule.ios.ts +4 -0
- package/lib/web/RNFBDatabaseModule.ts +534 -0
- package/lib/web/query.ts +97 -0
- package/package.json +42 -7
- package/tsconfig.json +21 -0
- package/typedoc.json +3 -3
- package/lib/modular/index.d.ts +0 -246
- package/lib/modular/index.js +0 -134
- package/lib/modular/query.d.ts +0 -972
- package/lib/modular/query.js +0 -305
- package/lib/modular/transaction.d.ts +0 -54
- package/lib/modular/transaction.js +0 -24
- package/lib/version.js +0 -2
- package/lib/web/RNFBDatabaseModule.android.js +0 -2
- package/lib/web/RNFBDatabaseModule.ios.js +0 -2
- package/lib/web/RNFBDatabaseModule.js +0 -558
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"namespaced.d.ts","sourceRoot":"","sources":["../../../../lib/types/namespaced.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH;;;GAGG;AAEH,yBAAiB,qBAAqB,CAAC;IACrC,OAAO,cAAc,GAAG,mBAAmB,CAAC,cAAc,CAAC;IAE3D;;OAEG;IACH;;OAEG;IACH,UAAiB,WAAW;QAC1B;;;;;;;;;;;WAWG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;;;;;;;;;;;WAYG;QACH,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;KAClC;IAED;;;;;;;;OAQG;IACH;;OAEG;IACH,UAAiB,OAAO;QACtB;;;;;;;;WAQG;QACH,WAAW,EAAE,WAAW,CAAC;QACzB,WAAW,EAAE,MAAM,CAAC;KACrB;IAED;;OAEG;IACH,UAAiB,iBAAiB;QAChC,SAAS,EAA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QAAQ,EAAE,mBAAmB,CAAC,+BAA+B,CAC3D,qBAAqB,CAAC,MAAM,EAC5B,qBAAqB,CAAC,OAAO,CAC9B,CAAC;IACF,QAAQ,EAAE,mBAAmB,CAAC,MAAM,CAAC;IACrC,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,mBAAmB,CAAC,WAAW,CAAC;CACrD,CAAC;AAEF,OAAO,CAAC,MAAM,aAAa,EAAE,iBAAiB,CAAC;AAE/C,MAAM,CAAC,OAAO,CAAC,MAAM,QAAQ,EAAE,mBAAmB,CAAC,MAAM,GAAG;IAC1D,QAAQ,EAAE,OAAO,aAAa,CAAC;IAC/B,GAAG,CACD,IAAI,CAAC,EAAE,MAAM,GACZ,mBAAmB,CAAC,WAAW,GAAG;QAAE,QAAQ,IAAI,qBAAqB,CAAC,MAAM,CAAA;KAAE,CAAC;CACnF,CAAC;AAEF,eAAe,aAAa,CAAC;AAE7B;;GAEG;AACH,OAAO,QAAQ,4BAA4B,CAAC;IAE1C,UAAU,mBAAmB,CAAC;QAC5B,OAAO,+BAA+B,GAAG,mBAAmB,CAAC,+BAA+B,CAAC;QAC7F,UAAU,MAAM;YACd,QAAQ,EAAE,+BAA+B,CACvC,qBAAqB,CAAC,MAAM,EAC5B,qBAAqB,CAAC,OAAO,CAC9B,CAAC;SACH;QAED,UAAU,WAAW;YACnB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,qBAAqB,CAAC,MAAM,CAAC;SAC9D;KACF;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../lib/version.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RNFBDatabaseModule.android.d.ts","sourceRoot":"","sources":["../../../../lib/web/RNFBDatabaseModule.android.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,6BAA6B,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAM,CAAC;AAEhE,eAAe,6BAA6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RNFBDatabaseModule.d.ts","sourceRoot":"","sources":["../../../../lib/web/RNFBDatabaseModule.ts"],"names":[],"mappings":"AA+HA,QAAA,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAoZnD,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RNFBDatabaseModule.ios.d.ts","sourceRoot":"","sources":["../../../../lib/web/RNFBDatabaseModule.ios.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAM,CAAC;AAE5D,eAAe,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { query } from '@react-native-firebase/app/dist/module/internal/web/firebaseDatabase';
|
|
2
|
+
import type { DatabaseQueryModifier } from '../DatabaseQueryModifiers';
|
|
3
|
+
type WebDatabaseReference = Parameters<typeof query>[0];
|
|
4
|
+
type QueryFilterValue = number | string | boolean | null;
|
|
5
|
+
type WebDatabaseQueryModifier = DatabaseQueryModifier | {
|
|
6
|
+
type: 'filter';
|
|
7
|
+
name: 'endBefore' | 'startAfter';
|
|
8
|
+
value: QueryFilterValue;
|
|
9
|
+
key?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function getQueryInstance(dbRef: WebDatabaseReference, modifiers: WebDatabaseQueryModifier[]): ReturnType<typeof query>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../../lib/web/query.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,EAGN,MAAM,sEAAsE,CAAC;AAC9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAExD,KAAK,gBAAgB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;AACzD,KAAK,wBAAwB,GACzB,qBAAqB,GACrB;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,WAAW,GAAG,YAAY,CAAC;IACjC,KAAK,EAAE,gBAAgB,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAWN,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,oBAAoB,EAC3B,SAAS,EAAE,wBAAwB,EAAE,GACpC,UAAU,CAAC,OAAO,KAAK,CAAC,CAyD1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -19,89 +19,88 @@ import {
|
|
|
19
19
|
createDeprecationProxy,
|
|
20
20
|
isArray,
|
|
21
21
|
isFunction,
|
|
22
|
+
isNumber,
|
|
22
23
|
isObject,
|
|
23
24
|
isString,
|
|
24
|
-
|
|
25
|
+
MODULAR_DEPRECATION_ARG,
|
|
25
26
|
} from '@react-native-firebase/app/dist/module/common';
|
|
26
27
|
import { deepGet } from '@react-native-firebase/app/dist/module/common/deeps';
|
|
27
28
|
|
|
28
|
-
import {
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
import type { DatabaseSnapshotInternal } from './types/internal';
|
|
30
|
+
import type { FirebaseDatabaseTypes } from './types/namespaced';
|
|
31
|
+
|
|
32
|
+
type ReferenceWithDeprecationArg = FirebaseDatabaseTypes.Reference & {
|
|
33
|
+
child(path: string, deprecationArg?: string): FirebaseDatabaseTypes.Reference;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
function ap(reference: FirebaseDatabaseTypes.Reference): ReferenceWithDeprecationArg {
|
|
37
|
+
return reference as ReferenceWithDeprecationArg;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export default class DatabaseDataSnapshot implements FirebaseDatabaseTypes.DataSnapshot {
|
|
41
|
+
_snapshot: DatabaseSnapshotInternal;
|
|
42
|
+
_ref: FirebaseDatabaseTypes.Reference;
|
|
43
|
+
|
|
44
|
+
constructor(reference: FirebaseDatabaseTypes.Reference, snapshot: DatabaseSnapshotInternal) {
|
|
31
45
|
this._snapshot = snapshot;
|
|
32
46
|
|
|
33
|
-
if (reference.key !== snapshot.key) {
|
|
34
|
-
|
|
35
|
-
|
|
47
|
+
if (reference.key !== snapshot.key && isString(snapshot.key)) {
|
|
48
|
+
this._ref = ap(reference.ref).child.call(
|
|
49
|
+
reference.ref,
|
|
50
|
+
snapshot.key,
|
|
51
|
+
MODULAR_DEPRECATION_ARG,
|
|
52
|
+
);
|
|
36
53
|
} else {
|
|
37
54
|
this._ref = reference;
|
|
38
55
|
}
|
|
39
|
-
|
|
40
|
-
// TODO #894
|
|
41
|
-
// if (this._ref.path === '.info/connected') {
|
|
42
|
-
// Handle 1/0 vs true/false values on ios/android
|
|
43
|
-
// }
|
|
44
56
|
}
|
|
45
57
|
|
|
46
|
-
get key() {
|
|
58
|
+
get key(): string | null {
|
|
47
59
|
return this._snapshot.key;
|
|
48
60
|
}
|
|
49
61
|
|
|
50
|
-
get ref() {
|
|
62
|
+
get ref(): FirebaseDatabaseTypes.Reference {
|
|
51
63
|
return this._ref;
|
|
52
64
|
}
|
|
53
65
|
|
|
54
|
-
|
|
55
|
-
* Returns a new snapshot of the child location
|
|
56
|
-
* @param path
|
|
57
|
-
* @returns {DatabaseDataSnapshot}
|
|
58
|
-
*/
|
|
59
|
-
child(path) {
|
|
66
|
+
child(path: string): FirebaseDatabaseTypes.DataSnapshot {
|
|
60
67
|
if (!isString(path)) {
|
|
61
68
|
throw new Error("snapshot().child(*) 'path' must be a string value");
|
|
62
69
|
}
|
|
63
70
|
|
|
64
|
-
|
|
71
|
+
const rootValue = this._snapshot.value as Record<string, unknown> | unknown[];
|
|
72
|
+
let value = deepGet(rootValue, path);
|
|
65
73
|
|
|
66
74
|
if (value === undefined) {
|
|
67
75
|
value = null;
|
|
68
76
|
}
|
|
69
77
|
|
|
70
|
-
const childRef = this._ref.child.call(this._ref, path, MODULAR_DEPRECATION_ARG);
|
|
78
|
+
const childRef = ap(this._ref).child.call(this._ref, path, MODULAR_DEPRECATION_ARG);
|
|
71
79
|
|
|
72
|
-
let childPriority = null;
|
|
80
|
+
let childPriority: string | number | null = null;
|
|
73
81
|
if (this._snapshot.childPriorities) {
|
|
74
|
-
const childPriorityValue = this._snapshot.childPriorities[childRef.key];
|
|
82
|
+
const childPriorityValue = this._snapshot.childPriorities[childRef.key as string];
|
|
75
83
|
if (isString(childPriorityValue) || isNumber(childPriorityValue)) {
|
|
76
84
|
childPriority = childPriorityValue;
|
|
77
85
|
}
|
|
78
86
|
}
|
|
87
|
+
|
|
79
88
|
return createDeprecationProxy(
|
|
80
89
|
new DatabaseDataSnapshot(childRef, {
|
|
81
90
|
value,
|
|
82
91
|
key: childRef.key,
|
|
83
92
|
exists: value !== null,
|
|
84
|
-
childKeys: isObject(value) ? Object.keys(value) : [],
|
|
93
|
+
childKeys: isObject(value) ? Object.keys(value as Record<string, unknown>) : [],
|
|
85
94
|
priority: childPriority,
|
|
86
95
|
}),
|
|
87
|
-
);
|
|
96
|
+
) as FirebaseDatabaseTypes.DataSnapshot;
|
|
88
97
|
}
|
|
89
98
|
|
|
90
|
-
|
|
91
|
-
* Returns whether the value exists
|
|
92
|
-
*
|
|
93
|
-
* @returns {(function())|((path: PathLike, callback: (exists: boolean) => void) => void)|boolean|exists|(() => boolean)}
|
|
94
|
-
*/
|
|
95
|
-
exists() {
|
|
99
|
+
exists(): boolean {
|
|
96
100
|
return this._snapshot.exists;
|
|
97
101
|
}
|
|
98
102
|
|
|
99
|
-
|
|
100
|
-
* Exports value and priority
|
|
101
|
-
*
|
|
102
|
-
* @returns {{'.priority': *, '.value': *}}
|
|
103
|
-
*/
|
|
104
|
-
exportVal() {
|
|
103
|
+
exportVal(): any {
|
|
105
104
|
let { value } = this._snapshot;
|
|
106
105
|
|
|
107
106
|
if (isObject(value) || isArray(value)) {
|
|
@@ -114,23 +113,20 @@ export default class DatabaseDataSnapshot {
|
|
|
114
113
|
};
|
|
115
114
|
}
|
|
116
115
|
|
|
117
|
-
|
|
118
|
-
* Iterate over keys in order from Firebase
|
|
119
|
-
*
|
|
120
|
-
* @param action
|
|
121
|
-
* @return {boolean}
|
|
122
|
-
*/
|
|
123
|
-
forEach(action) {
|
|
116
|
+
forEach(action: (child: FirebaseDatabaseTypes.DataSnapshot) => boolean | void): boolean {
|
|
124
117
|
if (!isFunction(action)) {
|
|
125
118
|
throw new Error("snapshot.forEach(*) 'action' must be a function.");
|
|
126
119
|
}
|
|
127
120
|
|
|
128
|
-
|
|
121
|
+
const iterate = action as (
|
|
122
|
+
child: FirebaseDatabaseTypes.DataSnapshot,
|
|
123
|
+
index?: number,
|
|
124
|
+
) => boolean | void;
|
|
125
|
+
|
|
129
126
|
if (isArray(this._snapshot.value)) {
|
|
130
|
-
return this._snapshot.value.some(
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
});
|
|
127
|
+
return this._snapshot.value.some(
|
|
128
|
+
(_value, i) => iterate(this.child(i.toString()), i) === true,
|
|
129
|
+
);
|
|
134
130
|
}
|
|
135
131
|
|
|
136
132
|
if (!this._snapshot.childKeys.length) {
|
|
@@ -141,8 +137,11 @@ export default class DatabaseDataSnapshot {
|
|
|
141
137
|
|
|
142
138
|
for (let i = 0; i < this._snapshot.childKeys.length; i++) {
|
|
143
139
|
const key = this._snapshot.childKeys[i];
|
|
144
|
-
|
|
145
|
-
|
|
140
|
+
if (key === undefined) {
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
const snapshot = this.child(key);
|
|
144
|
+
const actionReturn = iterate(snapshot, i);
|
|
146
145
|
|
|
147
146
|
if (actionReturn === true) {
|
|
148
147
|
cancelled = true;
|
|
@@ -153,39 +152,24 @@ export default class DatabaseDataSnapshot {
|
|
|
153
152
|
return cancelled;
|
|
154
153
|
}
|
|
155
154
|
|
|
156
|
-
getPriority() {
|
|
157
|
-
return this._snapshot.priority;
|
|
155
|
+
getPriority(): string | number | null {
|
|
156
|
+
return this._snapshot.priority ?? null;
|
|
158
157
|
}
|
|
159
158
|
|
|
160
|
-
|
|
161
|
-
* Checks the returned value for a nested child path
|
|
162
|
-
*
|
|
163
|
-
* @param path
|
|
164
|
-
* @returns {boolean}
|
|
165
|
-
*/
|
|
166
|
-
hasChild(path) {
|
|
159
|
+
hasChild(path: string): boolean {
|
|
167
160
|
if (!isString(path)) {
|
|
168
161
|
throw new Error("snapshot.hasChild(*) 'path' must be a string value.");
|
|
169
162
|
}
|
|
170
163
|
|
|
171
|
-
|
|
164
|
+
const rootValue = this._snapshot.value as Record<string, unknown> | unknown[];
|
|
165
|
+
return deepGet(rootValue, path) !== undefined;
|
|
172
166
|
}
|
|
173
167
|
|
|
174
|
-
|
|
175
|
-
* Returns whether the snapshot has any children
|
|
176
|
-
*
|
|
177
|
-
* @returns {boolean}
|
|
178
|
-
*/
|
|
179
|
-
hasChildren() {
|
|
168
|
+
hasChildren(): boolean {
|
|
180
169
|
return this.numChildren() > 0;
|
|
181
170
|
}
|
|
182
171
|
|
|
183
|
-
|
|
184
|
-
* Returns the number of children this snapshot has
|
|
185
|
-
*
|
|
186
|
-
* @returns {number}
|
|
187
|
-
*/
|
|
188
|
-
numChildren() {
|
|
172
|
+
numChildren(): number {
|
|
189
173
|
const { value } = this._snapshot;
|
|
190
174
|
if (isArray(value)) {
|
|
191
175
|
return value.length;
|
|
@@ -193,24 +177,14 @@ export default class DatabaseDataSnapshot {
|
|
|
193
177
|
if (!isObject(value)) {
|
|
194
178
|
return 0;
|
|
195
179
|
}
|
|
196
|
-
return Object.keys(value).length;
|
|
180
|
+
return Object.keys(value as Record<string, unknown>).length;
|
|
197
181
|
}
|
|
198
182
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
* Same as snapshot.val()
|
|
202
|
-
* @returns {any}
|
|
203
|
-
*/
|
|
204
|
-
toJSON() {
|
|
205
|
-
return this.val();
|
|
183
|
+
toJSON(): object | null {
|
|
184
|
+
return this.val() as object | null;
|
|
206
185
|
}
|
|
207
186
|
|
|
208
|
-
|
|
209
|
-
* Returns the serialized value of the snapshot returned from Firebase
|
|
210
|
-
*
|
|
211
|
-
* @returns {any}
|
|
212
|
-
*/
|
|
213
|
-
val() {
|
|
187
|
+
val(): any {
|
|
214
188
|
const { value } = this._snapshot;
|
|
215
189
|
|
|
216
190
|
if (isObject(value) || isArray(value)) {
|
|
@@ -26,15 +26,22 @@ import {
|
|
|
26
26
|
promiseWithOptionalCallback,
|
|
27
27
|
} from '@react-native-firebase/app/dist/module/common';
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
import type { DatabaseModuleInternal } from './types/internal';
|
|
30
|
+
import type { FirebaseDatabaseTypes } from './types/namespaced';
|
|
31
|
+
|
|
32
|
+
interface DatabaseOnDisconnectReferenceInternal {
|
|
33
|
+
readonly path: string;
|
|
34
|
+
readonly _database: DatabaseModuleInternal;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export default class DatabaseOnDisconnect implements FirebaseDatabaseTypes.OnDisconnect {
|
|
38
|
+
_ref: DatabaseOnDisconnectReferenceInternal;
|
|
39
|
+
|
|
40
|
+
constructor(reference: DatabaseOnDisconnectReferenceInternal) {
|
|
31
41
|
this._ref = reference;
|
|
32
42
|
}
|
|
33
43
|
|
|
34
|
-
|
|
35
|
-
* @url https://firebase.google.com/docs/reference/js/firebase.database.OnDisconnect#cancel
|
|
36
|
-
*/
|
|
37
|
-
cancel(onComplete) {
|
|
44
|
+
cancel(onComplete?: (error: Error | null) => void): Promise<void> {
|
|
38
45
|
if (!isUndefined(onComplete) && !isFunction(onComplete)) {
|
|
39
46
|
throw new Error(
|
|
40
47
|
"firebase.database().ref().onDisconnect().cancel(*) 'onComplete' must be a function if provided.",
|
|
@@ -47,10 +54,7 @@ export default class DatabaseOnDisconnect {
|
|
|
47
54
|
);
|
|
48
55
|
}
|
|
49
56
|
|
|
50
|
-
|
|
51
|
-
* @url https://firebase.google.com/docs/reference/js/firebase.database.OnDisconnect#remove
|
|
52
|
-
*/
|
|
53
|
-
remove(onComplete) {
|
|
57
|
+
remove(onComplete?: (error: Error | null) => void): Promise<void> {
|
|
54
58
|
if (!isUndefined(onComplete) && !isFunction(onComplete)) {
|
|
55
59
|
throw new Error(
|
|
56
60
|
"firebase.database().ref().onDisconnect().remove(*) 'onComplete' must be a function if provided.",
|
|
@@ -63,10 +67,7 @@ export default class DatabaseOnDisconnect {
|
|
|
63
67
|
);
|
|
64
68
|
}
|
|
65
69
|
|
|
66
|
-
|
|
67
|
-
* @url https://firebase.google.com/docs/reference/js/firebase.database.OnDisconnect#set
|
|
68
|
-
*/
|
|
69
|
-
set(value, onComplete) {
|
|
70
|
+
set(value: any, onComplete?: (error: Error | null) => void): Promise<void> {
|
|
70
71
|
if (isUndefined(value)) {
|
|
71
72
|
throw new Error("firebase.database().ref().value(*) 'value' must be defined.");
|
|
72
73
|
}
|
|
@@ -83,10 +84,11 @@ export default class DatabaseOnDisconnect {
|
|
|
83
84
|
);
|
|
84
85
|
}
|
|
85
86
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
setWithPriority(
|
|
88
|
+
value: any,
|
|
89
|
+
priority: string | number | null,
|
|
90
|
+
onComplete?: (error: Error | null) => void,
|
|
91
|
+
): Promise<void> {
|
|
90
92
|
if (isUndefined(value)) {
|
|
91
93
|
throw new Error("firebase.database().ref().setWithPriority(*) 'value' must be defined.");
|
|
92
94
|
}
|
|
@@ -109,17 +111,17 @@ export default class DatabaseOnDisconnect {
|
|
|
109
111
|
);
|
|
110
112
|
}
|
|
111
113
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
update(
|
|
115
|
+
values: { [key: string]: any },
|
|
116
|
+
onComplete?: (error: Error | null) => void,
|
|
117
|
+
): Promise<void> {
|
|
116
118
|
if (!isObject(values)) {
|
|
117
119
|
throw new Error(
|
|
118
120
|
"firebase.database().ref().onDisconnect().update(*) 'values' must be an object.",
|
|
119
121
|
);
|
|
120
122
|
}
|
|
121
123
|
|
|
122
|
-
if (!Object.keys(values).length) {
|
|
124
|
+
if (!Object.keys(values as Record<string, unknown>).length) {
|
|
123
125
|
throw new Error(
|
|
124
126
|
"firebase.database().ref().onDisconnect().update(*) 'values' must be an object containing multiple values.",
|
|
125
127
|
);
|