@react-native-firebase/database 21.12.3 → 21.14.0

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 CHANGED
@@ -3,6 +3,16 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [21.14.0](https://github.com/invertase/react-native-firebase/compare/v21.13.0...v21.14.0) (2025-04-14)
7
+
8
+ **Note:** Version bump only for package @react-native-firebase/database
9
+
10
+ ## [21.13.0](https://github.com/invertase/react-native-firebase/compare/v21.12.3...v21.13.0) (2025-03-31)
11
+
12
+ ### Bug Fixes
13
+
14
+ - **database:** improve type definitions ([#8373](https://github.com/invertase/react-native-firebase/issues/8373)) ([95050c0](https://github.com/invertase/react-native-firebase/commit/95050c05ca88a7e22a9a55302f80240d1401bda8))
15
+
6
16
  ## [21.12.3](https://github.com/invertase/react-native-firebase/compare/v21.12.2...v21.12.3) (2025-03-26)
7
17
 
8
18
  **Note:** Version bump only for package @react-native-firebase/database
@@ -220,5 +220,13 @@ export function getServerTime(db: Database): Promise<number>;
220
220
  */
221
221
  export function increment(delta: number): object;
222
222
 
223
+ /**
224
+ * Logs debugging information to the console. Not implemented on native.
225
+ *
226
+ * @param enabled
227
+ * @param persistent
228
+ */
229
+ export declare function enableLogging(enabled: boolean, persistent?: boolean): any;
230
+
223
231
  export * from './query';
224
232
  export * from './transaction';
@@ -123,5 +123,9 @@ export function increment(delta) {
123
123
  return ServerValue.increment(delta);
124
124
  }
125
125
 
126
+ export function enableLogging(_enabled, _persistent) {
127
+ throw new Error('enableLogging() is not implemented');
128
+ }
129
+
126
130
  export * from './query';
127
131
  export * from './transaction';
@@ -124,28 +124,6 @@ export declare function equalTo(
124
124
  key?: string,
125
125
  ): QueryConstraint;
126
126
 
127
- /**
128
- * Creates a `QueryConstraint` that includes children that match the specified
129
- * value.
130
- *
131
- * Using `startAt()`, `startAfter()`, `endBefore()`, `endAt()` and `equalTo()`
132
- * allows you to choose arbitrary starting and ending points for your queries.
133
- *
134
- * The optional key argument can be used to further limit the range of the
135
- * query. If it is specified, then children that have exactly the specified
136
- * value must also have exactly the specified key as their key name. This can be
137
- * used to filter result sets with many matches for the same value.
138
- *
139
- * @param value - The value to match for. The argument type depends on which
140
- * `orderBy*()` function was used in this query. Specify a value that matches
141
- * the `orderBy*()` type. When used in combination with `orderByKey()`, the
142
- * value must be a string.
143
- * @param key - The child key to start at, among the children with the
144
- * previously specified priority. This argument is only allowed if ordering by
145
- * child, value, or priority.
146
- */
147
- export function equalTo(value: number | string | boolean | null, key?: string): QueryConstraint;
148
-
149
127
  /**
150
128
  * Creates a QueryConstraint with the specified starting point.
151
129
  *
@@ -170,30 +148,6 @@ export declare function startAt(
170
148
  key?: string,
171
149
  ): QueryConstraint;
172
150
 
173
- /**
174
- * Creates a `QueryConstraint` with the specified starting point.
175
- *
176
- * Using `startAt()`, `startAfter()`, `endBefore()`, `endAt()` and `equalTo()`
177
- * allows you to choose arbitrary starting and ending points for your queries.
178
- *
179
- * The starting point is inclusive, so children with exactly the specified value
180
- * will be included in the query. The optional key argument can be used to
181
- * further limit the range of the query. If it is specified, then children that
182
- * have exactly the specified value must also have a key name greater than or
183
- * equal to the specified key.
184
- *
185
- * @param value - The value to start at. The argument type depends on which
186
- * `orderBy*()` function was used in this query. Specify a value that matches
187
- * the `orderBy*()` type. When used in combination with `orderByKey()`, the
188
- * value must be a string.
189
- * @param key - The child key to start at. This argument is only allowed if
190
- * ordering by child, value, or priority.
191
- */
192
- export function startAt(
193
- value: number | string | boolean | null = null,
194
- key?: string,
195
- ): QueryConstraint;
196
-
197
151
  /**
198
152
  * Creates a `QueryConstraint` with the specified starting point (exclusive).
199
153
  *
@@ -214,26 +168,6 @@ export function startAt(
214
168
  */
215
169
  export function startAfter(value: number | string | boolean | null, key?: string): QueryConstraint;
216
170
 
217
- /**
218
- * Creates a `QueryConstraint` with the specified starting point (exclusive).
219
- *
220
- * Using `startAt()`, `startAfter()`, `endBefore()`, `endAt()` and `equalTo()`
221
- * allows you to choose arbitrary starting and ending points for your queries.
222
- *
223
- * The starting point is exclusive. If only a value is provided, children
224
- * with a value greater than the specified value will be included in the query.
225
- * If a key is specified, then children must have a value greater than or equal
226
- * to the specified value and a key name greater than the specified key.
227
- *
228
- * @param value - The value to start after. The argument type depends on which
229
- * `orderBy*()` function was used in this query. Specify a value that matches
230
- * the `orderBy*()` type. When used in combination with `orderByKey()`, the
231
- * value must be a string.
232
- * @param key - The child key to start after. This argument is only allowed if
233
- * ordering by child, value, or priority.
234
- */
235
- export function startAfter(value: number | string | boolean | null, key?: string): QueryConstraint;
236
-
237
171
  /**
238
172
  * Creates a new `QueryConstraint` that if limited to the first specific number
239
173
  * of children.
@@ -903,6 +837,25 @@ export function setWithPriority(
903
837
  */
904
838
  export function get(query: Query): Promise<DataSnapshot>;
905
839
 
840
+ /**
841
+ * Detaches a callback previously attached with the corresponding on*() (onValue, onChildAdded) listener.
842
+ * Note: This is not the recommended way to remove a listener. Instead, please use the returned callback function from the respective on* callbacks.
843
+ * Detach a callback previously attached with on*(). Calling off() on a parent listener will not automatically remove listeners registered on child nodes, off() must also be called on any child listeners to remove the callback.
844
+ * If a callback is not specified, all callbacks for the specified eventType will be removed.
845
+ * Similarly, if no eventType is specified, all callbacks for the Reference will be removed.
846
+ * Individual listeners can also be removed by invoking their unsubscribe callbacks.
847
+ * Note: Not implemented on native
848
+ *
849
+ * @param query - The query to run
850
+ * @param eventType One of the following strings: "value", "child_added", "child_changed", "child_removed", or "child_moved.
851
+ * @param callback
852
+ */
853
+ export declare function off(
854
+ query: Query,
855
+ eventType?: EventType,
856
+ callback?: (snapshot: DataSnapshot, previousChildName?: string | null) => unknown,
857
+ ): void;
858
+
906
859
  /**
907
860
  * Gets a `Reference` for the location at the specified relative path.
908
861
  *
@@ -239,6 +239,10 @@ export function get(query) {
239
239
  return query.once('value');
240
240
  }
241
241
 
242
+ export function off(_query, _eventType, _callback) {
243
+ throw new Error('off() is not implemented');
244
+ }
245
+
242
246
  /**
243
247
  * @param {DatabaseReference} parent
244
248
  * @param {string} path
package/lib/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- module.exports = '21.12.3';
2
+ module.exports = '21.14.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-firebase/database",
3
- "version": "21.12.3",
3
+ "version": "21.14.0",
4
4
  "author": "Invertase <oss@invertase.io> (http://invertase.io)",
5
5
  "description": "React Native Firebase - The Firebase Realtime Database is a cloud-hosted database. Data is stored as JSON and synchronized in realtime to every connected client. React Native Firebase provides native integration with the Android & iOS Firebase SDKs, supporting both realtime data sync and offline capabilities.",
6
6
  "main": "lib/index.js",
@@ -25,10 +25,10 @@
25
25
  "realtome database"
26
26
  ],
27
27
  "peerDependencies": {
28
- "@react-native-firebase/app": "21.12.3"
28
+ "@react-native-firebase/app": "21.14.0"
29
29
  },
30
30
  "publishConfig": {
31
31
  "access": "public"
32
32
  },
33
- "gitHead": "ea8aeec70b59b191d42bc753d1353c6f705b3e4b"
33
+ "gitHead": "7c7beaab9cf8a619927a33ef7a15b8000e2874c2"
34
34
  }