@react-native-firebase/firestore 17.5.0 → 18.0.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,27 @@
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
+ ## [18.0.0](https://github.com/invertase/react-native-firebase/compare/v17.5.0...v18.0.0) (2023-06-05)
7
+
8
+ ### ⚠ BREAKING CHANGES
9
+
10
+ - **app, sdk:** this version of the underlying firebase-ios-sdk has
11
+ a minimum Xcode requirement of 14.1 which transitively implies a macOS
12
+ minimum version of 12.5
13
+ - **app, sdk:** the "safetyNet" provider for App Check has been removed
14
+ from the underlying firebase-android-sdk and we have removed it here. You
15
+ should upgrade to the "playIntegrity" provider for App Check
16
+
17
+ ### Features
18
+
19
+ - **app, sdk:** android-sdk v32 - app-check safetyNet provider is removed ([a0e76ec](https://github.com/invertase/react-native-firebase/commit/a0e76ecab65c69a19055a84bc19c069482b1bc88))
20
+ - **app, sdk:** ios-sdk 10.10.0, requires Xcode 14.1+ / macOS 12.5+ ([3122918](https://github.com/invertase/react-native-firebase/commit/3122918c19c27696caf51f30caafdcaa76807db8))
21
+
22
+ ### Bug Fixes
23
+
24
+ - **firestore, types:** add types for Filter constraints on Queries ([#7124](https://github.com/invertase/react-native-firebase/issues/7124)) ([0785d27](https://github.com/invertase/react-native-firebase/commit/0785d276669b9c875951d4527e8884c9014e48fe))
25
+ - **firestore:** Allow queries with combined in and array-contains-any ([#7142](https://github.com/invertase/react-native-firebase/issues/7142)) ([8da6951](https://github.com/invertase/react-native-firebase/commit/8da69519b3dd516a67976a490434f8f9c12a426e))
26
+
6
27
  ## [17.5.0](https://github.com/invertase/react-native-firebase/compare/v17.4.3...v17.5.0) (2023-05-11)
7
28
 
8
29
  ### Features
@@ -297,12 +297,6 @@ export default class FirestoreQueryModifiers {
297
297
  );
298
298
  }
299
299
 
300
- if (this.hasIn) {
301
- throw new Error(
302
- "Invalid query. You cannot use 'array-contains-any' filters with 'in' filters.",
303
- );
304
- }
305
-
306
300
  if (this.hasNotIn) {
307
301
  throw new Error(
308
302
  "Invalid query. You cannot use 'array-contains-any' filters with 'not-in' filters.",
@@ -313,16 +307,6 @@ export default class FirestoreQueryModifiers {
313
307
  }
314
308
 
315
309
  if (filter.operator === OPERATORS.in) {
316
- if (this.hasIn) {
317
- throw new Error("Invalid query. You cannot use more than one 'in' filter.");
318
- }
319
-
320
- if (this.hasArrayContainsAny) {
321
- throw new Error(
322
- "Invalid query. You cannot use 'in' filters with 'array-contains-any' filters.",
323
- );
324
- }
325
-
326
310
  if (this.hasNotIn) {
327
311
  throw new Error("Invalid query. You cannot use 'in' filters with 'not-in' filters.");
328
312
  }
package/lib/index.d.ts CHANGED
@@ -1395,6 +1395,24 @@ export namespace FirebaseFirestoreTypes {
1395
1395
  * @param value The comparison value.
1396
1396
  */
1397
1397
  where(fieldPath: keyof T | FieldPath, opStr: WhereFilterOp, value: any): Query<T>;
1398
+
1399
+ /**
1400
+ * Creates and returns a new Query with the additional filter that documents must contain the specified field and
1401
+ * the value should satisfy the relation constraint provided.
1402
+ *
1403
+ * #### Example
1404
+ *
1405
+ * ```js
1406
+ * // Get all users who's age is 30 or above
1407
+ * const querySnapshot = await firebase.firestore()
1408
+ * .collection('users')
1409
+ * .where(Filter('age', '>=', 30));
1410
+ * .get();
1411
+ * ```
1412
+ *
1413
+ * @param filter The filter to apply to the query.
1414
+ */
1415
+ where(filter: QueryFilterConstraint | QueryCompositeFilterConstraint): Query<T>;
1398
1416
  }
1399
1417
 
1400
1418
  /**
@@ -2047,6 +2065,11 @@ export namespace FirebaseFirestoreTypes {
2047
2065
  */
2048
2066
  Timestamp: typeof Timestamp;
2049
2067
 
2068
+ /**
2069
+ * Returns the `Filter` function.
2070
+ */
2071
+ Filter: typeof Filter;
2072
+
2050
2073
  /**
2051
2074
  * Used to set the cache size to unlimited when passing to `cacheSizeBytes` in
2052
2075
  * `firebase.firestore().settings()`.
@@ -2317,6 +2340,8 @@ export const firebase: ReactNativeFirebase.Module & {
2317
2340
  ): ReactNativeFirebase.FirebaseApp & { firestore(): FirebaseFirestoreTypes.Module };
2318
2341
  };
2319
2342
 
2343
+ export const Filter: FilterFunction;
2344
+
2320
2345
  export default defaultExport;
2321
2346
 
2322
2347
  /**
package/lib/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- module.exports = '17.5.0';
2
+ module.exports = '18.0.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-firebase/firestore",
3
- "version": "17.5.0",
3
+ "version": "18.0.0",
4
4
  "author": "Invertase <oss@invertase.io> (http://invertase.io)",
5
5
  "description": "React Native Firebase - Cloud Firestore is a NoSQL cloud database to store and sync data between your React Native application and Firebase's database. The API matches the Firebase Web SDK whilst taking advantage of the native SDKs performance and offline capabilities.",
6
6
  "main": "lib/index.js",
@@ -27,10 +27,10 @@
27
27
  "firestore"
28
28
  ],
29
29
  "peerDependencies": {
30
- "@react-native-firebase/app": "17.5.0"
30
+ "@react-native-firebase/app": "18.0.0"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public"
34
34
  },
35
- "gitHead": "a58ea4bfd72c903d43844da30d4f3bf5feb0f057"
35
+ "gitHead": "db49dfeab62fa0c52530ccf2bfdfe9e27947bdbd"
36
36
  }