@react-native-firebase/analytics 19.2.2 → 19.3.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,12 @@
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
+ ## [19.3.0](https://github.com/invertase/react-native-firebase/compare/v19.2.2...v19.3.0) (2024-05-20)
7
+
8
+ ### Features
9
+
10
+ - **analytics:** allow custom event parameters for begin_checkout and purchase events ([#7760](https://github.com/invertase/react-native-firebase/issues/7760)) ([424b9d9](https://github.com/invertase/react-native-firebase/commit/424b9d9c15921268ba3cc96a3e154fe2ee18c345))
11
+
6
12
  ## [19.2.2](https://github.com/invertase/react-native-firebase/compare/v19.2.1...v19.2.2) (2024-04-13)
7
13
 
8
14
  **Note:** Version bump only for package @react-native-firebase/analytics
@@ -272,6 +272,16 @@ describe('Analytics', function () {
272
272
  }),
273
273
  ).toThrowError('firebase.analytics().logBeginCheckout(*):');
274
274
  });
275
+
276
+ it('accepts arbitrary custom event parameters', function () {
277
+ expect(() =>
278
+ firebase.analytics().logBeginCheckout({
279
+ value: 123,
280
+ currency: 'EUR',
281
+ foo: 'bar',
282
+ }),
283
+ ).not.toThrow();
284
+ });
275
285
  });
276
286
 
277
287
  describe('logGenerateLead()', function () {
@@ -459,6 +469,16 @@ describe('Analytics', function () {
459
469
  }),
460
470
  ).toThrowError('firebase.analytics().logPurchase(*):');
461
471
  });
472
+
473
+ it('accepts arbitrary custom event parameters', function () {
474
+ expect(() =>
475
+ firebase.analytics().logPurchase({
476
+ value: 123,
477
+ currency: 'EUR',
478
+ foo: 'bar',
479
+ }),
480
+ ).not.toThrow();
481
+ });
462
482
  });
463
483
 
464
484
  describe('logRefund()', function () {
package/lib/index.d.ts CHANGED
@@ -179,6 +179,10 @@ export namespace FirebaseAnalyticsTypes {
179
179
  coupon?: string;
180
180
 
181
181
  items?: Item[];
182
+ /**
183
+ * Custom event parameters.
184
+ */
185
+ [key: string]: any;
182
186
  }
183
187
 
184
188
  export interface CampaignDetailsEventParameters {
@@ -334,6 +338,10 @@ export namespace FirebaseAnalyticsTypes {
334
338
  * A single ID for a ecommerce group transaction.
335
339
  */
336
340
  transaction_id?: string;
341
+ /**
342
+ * Custom event parameters.
343
+ */
344
+ [key: string]: any;
337
345
  }
338
346
 
339
347
  export interface ScreenViewParameters {
package/lib/structs.js CHANGED
@@ -65,7 +65,7 @@ export const AddToWishlist = struct({
65
65
  currency: 'string?',
66
66
  });
67
67
 
68
- export const BeginCheckout = struct({
68
+ export const BeginCheckout = struct.interface({
69
69
  items: struct.optional([Item]),
70
70
  value: 'number?',
71
71
  currency: 'string?',
@@ -131,7 +131,7 @@ export const Refund = struct({
131
131
  transaction_id: 'string?',
132
132
  });
133
133
 
134
- export const Purchase = struct({
134
+ export const Purchase = struct.interface({
135
135
  affiliation: 'string?',
136
136
  coupon: 'string?',
137
137
  currency: 'string?',
package/lib/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- module.exports = '19.2.2';
2
+ module.exports = '19.3.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-firebase/analytics",
3
- "version": "19.2.2",
3
+ "version": "19.3.0",
4
4
  "author": "Invertase <oss@invertase.io> (http://invertase.io)",
5
5
  "description": "React Native Firebase - The analytics module provides out of the box support with Google Analytics for Firebase. Integration with the Android & iOS allows for in-depth analytical insight reporting, such as device information, location, user actions and more.",
6
6
  "main": "lib/index.js",
@@ -22,10 +22,10 @@
22
22
  "analytics"
23
23
  ],
24
24
  "peerDependencies": {
25
- "@react-native-firebase/app": "19.2.2"
25
+ "@react-native-firebase/app": "19.3.0"
26
26
  },
27
27
  "publishConfig": {
28
28
  "access": "public"
29
29
  },
30
- "gitHead": "2c1f48eacba95904c89073dcb391d89d0f966165"
30
+ "gitHead": "edac62269c1b3088cadf74586d48f68214d6e8e4"
31
31
  }