@react-native-firebase/analytics 25.1.0 → 26.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.
Files changed (60) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/RNFBAnalytics.podspec +9 -5
  3. package/android/build.gradle +19 -0
  4. package/android/src/reactnative/java/io/invertase/firebase/analytics/{ReactNativeFirebaseAnalyticsModule.java → NativeRNFBTurboAnalytics.java} +57 -19
  5. package/android/src/reactnative/java/io/invertase/firebase/analytics/ReactNativeFirebaseAnalyticsPackage.java +1 -1
  6. package/android/src/reactnative/java/io/invertase/firebase/analytics/generated/java/com/facebook/fbreact/specs/NativeRNFBTurboAnalyticsSpec.java +100 -0
  7. package/android/src/reactnative/java/io/invertase/firebase/analytics/generated/jni/CMakeLists.txt +36 -0
  8. package/android/src/reactnative/java/io/invertase/firebase/analytics/generated/jni/RNFBAnalyticsTurboModules-generated.cpp +122 -0
  9. package/android/src/reactnative/java/io/invertase/firebase/analytics/generated/jni/RNFBAnalyticsTurboModules.h +31 -0
  10. package/android/src/reactnative/java/io/invertase/firebase/analytics/generated/jni/react/renderer/components/RNFBAnalyticsTurboModules/RNFBAnalyticsTurboModulesJSI-generated.cpp +131 -0
  11. package/android/src/reactnative/java/io/invertase/firebase/analytics/generated/jni/react/renderer/components/RNFBAnalyticsTurboModules/RNFBAnalyticsTurboModulesJSI.h +206 -0
  12. package/app.plugin.js +1 -1
  13. package/dist/module/index.js +965 -6
  14. package/dist/module/index.js.map +1 -1
  15. package/dist/module/types/analytics.js +1 -72
  16. package/dist/module/types/analytics.js.map +1 -1
  17. package/dist/module/version.js +1 -1
  18. package/dist/typescript/lib/index.d.ts +500 -4
  19. package/dist/typescript/lib/index.d.ts.map +1 -1
  20. package/dist/typescript/lib/types/analytics.d.ts +0 -103
  21. package/dist/typescript/lib/types/analytics.d.ts.map +1 -1
  22. package/dist/typescript/lib/types/internal.d.ts +1 -1
  23. package/dist/typescript/lib/types/internal.d.ts.map +1 -1
  24. package/dist/typescript/lib/version.d.ts +1 -1
  25. package/ios/RNFBAnalytics/RNFBAnalyticsModule.h +2 -2
  26. package/ios/RNFBAnalytics/{RNFBAnalyticsModule.m → RNFBAnalyticsModule.mm} +52 -66
  27. package/ios/RNFBAnalytics.xcodeproj/project.pbxproj +8 -8
  28. package/ios/generated/RCTAppDependencyProvider.h +25 -0
  29. package/ios/generated/RCTAppDependencyProvider.mm +55 -0
  30. package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
  31. package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
  32. package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
  33. package/ios/generated/RCTThirdPartyComponentsProvider.mm +23 -0
  34. package/ios/generated/RNFBAnalyticsTurboModules/RNFBAnalyticsTurboModules-generated.mm +144 -0
  35. package/ios/generated/RNFBAnalyticsTurboModules/RNFBAnalyticsTurboModules.h +108 -0
  36. package/ios/generated/RNFBAnalyticsTurboModulesJSI-generated.cpp +131 -0
  37. package/ios/generated/RNFBAnalyticsTurboModulesJSI.h +206 -0
  38. package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
  39. package/lib/index.ts +1846 -7
  40. package/lib/types/analytics.ts +0 -118
  41. package/lib/types/internal.ts +1 -1
  42. package/lib/version.ts +1 -1
  43. package/package.json +30 -5
  44. package/plugin/build/app.plugin.d.ts +2 -0
  45. package/plugin/build/app.plugin.js +6 -0
  46. package/plugin/src/app.plugin.ts +3 -0
  47. package/plugin/tsconfig.tsbuildinfo +1 -1
  48. package/react-native.config.js +10 -0
  49. package/specs/NativeRNFBTurboAnalytics.ts +33 -0
  50. package/typedoc.json +2 -45
  51. package/dist/module/modular.js +0 -567
  52. package/dist/module/modular.js.map +0 -1
  53. package/dist/module/namespaced.js +0 -445
  54. package/dist/module/namespaced.js.map +0 -1
  55. package/dist/typescript/lib/modular.d.ts +0 -481
  56. package/dist/typescript/lib/modular.d.ts.map +0 -1
  57. package/dist/typescript/lib/namespaced.d.ts +0 -13
  58. package/dist/typescript/lib/namespaced.d.ts.map +0 -1
  59. package/lib/modular.ts +0 -1040
  60. package/lib/namespaced.ts +0 -915
@@ -959,121 +959,3 @@ export interface Analytics extends ReactNativeFirebase.FirebaseModule {
959
959
  hashedPhoneNumber: string,
960
960
  ): Promise<void>;
961
961
  }
962
-
963
- /* eslint-disable @typescript-eslint/no-namespace */
964
- declare module '@react-native-firebase/app' {
965
- namespace ReactNativeFirebase {
966
- interface Module {
967
- analytics: FirebaseModuleWithStaticsAndApp<Analytics, Statics>;
968
- }
969
- interface FirebaseApp {
970
- analytics(): Analytics;
971
- }
972
- }
973
- }
974
- /* eslint-enable @typescript-eslint/no-namespace */
975
-
976
- // ============ Backwards Compatibility Namespace - to be removed with namespaced exports ============
977
-
978
- // Helper types to reference outer scope types within the namespace
979
- // These are needed because TypeScript can't directly alias types with the same name
980
- type _Item = Item;
981
- type _AddPaymentInfoEventParameters = AddPaymentInfoEventParameters;
982
- type _AddShippingInfoEventParameters = AddShippingInfoEventParameters;
983
- type _AddToCartEventParameters = AddToCartEventParameters;
984
- type _AddToWishlistEventParameters = AddToWishlistEventParameters;
985
- type _BeginCheckoutEventParameters = BeginCheckoutEventParameters;
986
- type _CampaignDetailsEventParameters = CampaignDetailsEventParameters;
987
- type _EarnVirtualCurrencyEventParameters = EarnVirtualCurrencyEventParameters;
988
- type _GenerateLeadEventParameters = GenerateLeadEventParameters;
989
- type _JoinGroupEventParameters = JoinGroupEventParameters;
990
- type _LevelEndEventParameters = LevelEndEventParameters;
991
- type _LevelStartEventParameters = LevelStartEventParameters;
992
- type _LevelUpEventParameters = LevelUpEventParameters;
993
- type _LoginEventParameters = LoginEventParameters;
994
- type _PostScoreEventParameters = PostScoreEventParameters;
995
- type _PurchaseEventParameters = PurchaseEventParameters;
996
- type _ScreenViewParameters = ScreenViewParameters;
997
- type _RefundEventParameters = RefundEventParameters;
998
- type _RemoveFromCartEventParameters = RemoveFromCartEventParameters;
999
- type _SearchEventParameters = SearchEventParameters;
1000
- type _SelectContentEventParameters = SelectContentEventParameters;
1001
- type _SelectItemEventParameters = SelectItemEventParameters;
1002
- type _SetCheckoutOptionEventParameters = SetCheckoutOptionEventParameters;
1003
- type _SelectPromotionEventParameters = SelectPromotionEventParameters;
1004
- type _ShareEventParameters = ShareEventParameters;
1005
- type _SignUpEventParameters = SignUpEventParameters;
1006
- type _SpendVirtualCurrencyEventParameters = SpendVirtualCurrencyEventParameters;
1007
- type _UnlockAchievementEventParameters = UnlockAchievementEventParameters;
1008
- type _ViewCartEventParameters = ViewCartEventParameters;
1009
- type _ViewItemEventParameters = ViewItemEventParameters;
1010
- type _ViewSearchResultsParameters = ViewSearchResultsParameters;
1011
- type _ViewItemListEventParameters = ViewItemListEventParameters;
1012
- type _ViewPromotionEventParameters = ViewPromotionEventParameters;
1013
- type _AddShippingInfoParameters = AddShippingInfoParameters;
1014
- type _AnalyticsSettings = AnalyticsSettings;
1015
- type _AnalyticsCallOptions = AnalyticsCallOptions;
1016
- type _GtagConfigParams = GtagConfigParams;
1017
- type _ConsentSettings = ConsentSettings;
1018
- type _SettingsOptions = SettingsOptions;
1019
- type _EventParams = EventParams;
1020
- type _Statics = Statics;
1021
-
1022
- /**
1023
- * @deprecated Use the exported types directly instead.
1024
- * FirebaseAnalyticsTypes namespace is kept for backwards compatibility.
1025
- */
1026
- /* eslint-disable @typescript-eslint/no-namespace */
1027
- export namespace FirebaseAnalyticsTypes {
1028
- // Short name aliases referencing top-level types
1029
- export type Module = Analytics;
1030
- export type CallOptions = AnalyticsCallOptions;
1031
- export type Consent = ConsentSettings;
1032
- export type Settings = AnalyticsSettings;
1033
- export type Statics = _Statics;
1034
-
1035
- // Event parameter interfaces
1036
- export type Item = _Item;
1037
- export type AddPaymentInfoEventParameters = _AddPaymentInfoEventParameters;
1038
- export type AddShippingInfoEventParameters = _AddShippingInfoEventParameters;
1039
- export type AddToCartEventParameters = _AddToCartEventParameters;
1040
- export type AddToWishlistEventParameters = _AddToWishlistEventParameters;
1041
- export type BeginCheckoutEventParameters = _BeginCheckoutEventParameters;
1042
- export type CampaignDetailsEventParameters = _CampaignDetailsEventParameters;
1043
- export type EarnVirtualCurrencyEventParameters = _EarnVirtualCurrencyEventParameters;
1044
- export type GenerateLeadEventParameters = _GenerateLeadEventParameters;
1045
- export type JoinGroupEventParameters = _JoinGroupEventParameters;
1046
- export type LevelEndEventParameters = _LevelEndEventParameters;
1047
- export type LevelStartEventParameters = _LevelStartEventParameters;
1048
- export type LevelUpEventParameters = _LevelUpEventParameters;
1049
- export type LoginEventParameters = _LoginEventParameters;
1050
- export type PostScoreEventParameters = _PostScoreEventParameters;
1051
- export type PurchaseEventParameters = _PurchaseEventParameters;
1052
- export type ScreenViewParameters = _ScreenViewParameters;
1053
- export type RefundEventParameters = _RefundEventParameters;
1054
- export type RemoveFromCartEventParameters = _RemoveFromCartEventParameters;
1055
- export type SearchEventParameters = _SearchEventParameters;
1056
- export type SelectContentEventParameters = _SelectContentEventParameters;
1057
- export type SelectItemEventParameters = _SelectItemEventParameters;
1058
- export type SetCheckoutOptionEventParameters = _SetCheckoutOptionEventParameters;
1059
- export type SelectPromotionEventParameters = _SelectPromotionEventParameters;
1060
- export type ShareEventParameters = _ShareEventParameters;
1061
- export type SignUpEventParameters = _SignUpEventParameters;
1062
- export type SpendVirtualCurrencyEventParameters = _SpendVirtualCurrencyEventParameters;
1063
- export type UnlockAchievementEventParameters = _UnlockAchievementEventParameters;
1064
- export type ViewCartEventParameters = _ViewCartEventParameters;
1065
- export type ViewItemEventParameters = _ViewItemEventParameters;
1066
- export type ViewSearchResultsParameters = _ViewSearchResultsParameters;
1067
- export type ViewItemListEventParameters = _ViewItemListEventParameters;
1068
- export type ViewPromotionEventParameters = _ViewPromotionEventParameters;
1069
- export type AddShippingInfoParameters = _AddShippingInfoParameters;
1070
-
1071
- // Configuration and settings interfaces
1072
- export type AnalyticsSettings = _AnalyticsSettings;
1073
- export type AnalyticsCallOptions = _AnalyticsCallOptions;
1074
- export type GtagConfigParams = _GtagConfigParams;
1075
- export type ConsentSettings = _ConsentSettings;
1076
- export type SettingsOptions = _SettingsOptions;
1077
- export type EventParams = _EventParams;
1078
- }
1079
- /* eslint-enable @typescript-eslint/no-namespace */
@@ -52,7 +52,7 @@ export interface RNFBAnalyticsModule {
52
52
 
53
53
  declare module '@react-native-firebase/app/dist/module/internal/NativeModules' {
54
54
  interface ReactNativeFirebaseNativeModules {
55
- RNFBAnalyticsModule: RNFBAnalyticsModule;
55
+ NativeRNFBTurboAnalytics: RNFBAnalyticsModule;
56
56
  }
57
57
  }
58
58
 
package/lib/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = '25.1.0';
2
+ export const version = '26.0.0';
package/package.json CHANGED
@@ -1,17 +1,34 @@
1
1
  {
2
2
  "name": "@react-native-firebase/analytics",
3
- "version": "25.1.0",
3
+ "version": "26.0.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": "./dist/module/index.js",
7
7
  "types": "./dist/typescript/lib/index.d.ts",
8
+ "codegenConfig": {
9
+ "name": "RNFBAnalyticsTurboModules",
10
+ "type": "modules",
11
+ "jsSrcsDir": "specs",
12
+ "includesGeneratedCode": true,
13
+ "android": {
14
+ "javaPackageName": "io.invertase.firebase.analytics"
15
+ },
16
+ "ios": {
17
+ "modulesProvider": {
18
+ "NativeRNFBTurboAnalytics": "RNFBAnalyticsModule"
19
+ }
20
+ }
21
+ },
8
22
  "scripts": {
9
23
  "build": "genversion --esm --semi lib/version.ts",
10
24
  "build:clean": "rimraf android/build && rimraf ios/build",
11
25
  "build:plugin": "rimraf plugin/build && tsc --build plugin",
12
26
  "lint:plugin": "eslint \"plugin/src/**/*.{ts,js}\"",
13
27
  "compile": "bob build",
14
- "prepare": "yarn run build && yarn run build:plugin && yarn compile"
28
+ "prepare": "yarn run build && yarn run build:plugin && yarn compile",
29
+ "codegen": "yarn android:codegen && yarn ios:codegen",
30
+ "android:codegen": "npx @react-native-community/cli codegen --platform android --outputPath=./android/src/reactnative/java/io/invertase/firebase/analytics/generated",
31
+ "ios:codegen": "npx @react-native-community/cli codegen --platform ios --outputPath=./ios/generated"
15
32
  },
16
33
  "repository": {
17
34
  "type": "git",
@@ -25,7 +42,7 @@
25
42
  "analytics"
26
43
  ],
27
44
  "peerDependencies": {
28
- "@react-native-firebase/app": "25.1.0",
45
+ "@react-native-firebase/app": "26.0.0",
29
46
  "expo": ">=47.0.0"
30
47
  },
31
48
  "publishConfig": {
@@ -36,6 +53,7 @@
36
53
  "superstruct": "^2.0.2"
37
54
  },
38
55
  "devDependencies": {
56
+ "@react-native-firebase/app": "26.0.0",
39
57
  "expo": "^55.0.18",
40
58
  "react-native-builder-bob": "^0.41.0",
41
59
  "typescript": "^6.0.3"
@@ -51,7 +69,14 @@
51
69
  "types": "./dist/typescript/lib/index.d.ts",
52
70
  "default": "./dist/module/index.js"
53
71
  },
54
- "./app.plugin.js": "./app.plugin.js",
72
+ "./app.plugin": {
73
+ "types": "./plugin/build/app.plugin.d.ts",
74
+ "default": "./app.plugin.js"
75
+ },
76
+ "./app.plugin.js": {
77
+ "types": "./plugin/build/app.plugin.d.ts",
78
+ "default": "./app.plugin.js"
79
+ },
55
80
  "./package.json": "./package.json"
56
81
  },
57
82
  "react-native-builder-bob": {
@@ -76,5 +101,5 @@
76
101
  "node_modules/",
77
102
  "dist/"
78
103
  ],
79
- "gitHead": "e0a565d8a73a9b103d140ffacfb8876b30d8bdc5"
104
+ "gitHead": "2a360acb2aebdd39dd40e31be386b30697270626"
80
105
  }
@@ -0,0 +1,2 @@
1
+ import plugin from './index';
2
+ export = plugin;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ const index_1 = __importDefault(require("./index"));
6
+ module.exports = index_1.default;
@@ -0,0 +1,3 @@
1
+ import plugin from './index';
2
+
3
+ export = plugin;
@@ -1 +1 @@
1
- {"root":["./src/index.ts","./src/pluginConfig.ts","./src/ios/index.ts","./src/ios/podfile.ts"],"version":"6.0.3"}
1
+ {"root":["./src/app.plugin.ts","./src/index.ts","./src/pluginConfig.ts","./src/ios/index.ts","./src/ios/podfile.ts"],"version":"6.0.3"}
@@ -0,0 +1,10 @@
1
+ module.exports = {
2
+ dependency: {
3
+ platforms: {
4
+ android: {
5
+ cmakeListsPath:
6
+ './src/reactnative/java/io/invertase/firebase/analytics/generated/jni/CMakeLists.txt',
7
+ },
8
+ },
9
+ },
10
+ };
@@ -0,0 +1,33 @@
1
+ /* eslint-disable @typescript-eslint/no-wrapper-object-types */
2
+ import type { TurboModule } from 'react-native';
3
+ import { TurboModuleRegistry } from 'react-native';
4
+
5
+ export interface Spec extends TurboModule {
6
+ logEvent(name: string, params?: Object | null): Promise<void>;
7
+ setAnalyticsCollectionEnabled(enabled: boolean): Promise<void>;
8
+ setSessionTimeoutDuration(milliseconds: number): Promise<void>;
9
+ getAppInstanceId(): Promise<string | null>;
10
+ getSessionId(): Promise<number | null>;
11
+ setUserId(id: string | null): Promise<void>;
12
+ setUserProperty(name: string, value: string | null): Promise<void>;
13
+ setUserProperties(properties: Object): Promise<void>;
14
+ resetAnalyticsData(): Promise<void>;
15
+ setDefaultEventParameters(params?: Object | null): Promise<void>;
16
+ setConsent(consentSettings: Object): Promise<void>;
17
+ /** iOS only (StoreKit 2). Android rejects at runtime. */
18
+ logTransaction(transactionId: string): Promise<void>;
19
+ /** iOS only. Android rejects at runtime. */
20
+ initiateOnDeviceConversionMeasurementWithEmailAddress(emailAddress: string): Promise<void>;
21
+ /** iOS only. Android rejects at runtime. */
22
+ initiateOnDeviceConversionMeasurementWithHashedEmailAddress(
23
+ hashedEmailAddress: string,
24
+ ): Promise<void>;
25
+ /** iOS only. Android rejects at runtime. */
26
+ initiateOnDeviceConversionMeasurementWithPhoneNumber(phoneNumber: string): Promise<void>;
27
+ /** iOS only. Android rejects at runtime. */
28
+ initiateOnDeviceConversionMeasurementWithHashedPhoneNumber(
29
+ hashedPhoneNumber: string,
30
+ ): Promise<void>;
31
+ }
32
+
33
+ export default TurboModuleRegistry.getEnforcing<Spec>('NativeRNFBTurboAnalytics');
package/typedoc.json CHANGED
@@ -1,48 +1,5 @@
1
1
  {
2
2
  "$schema": "https://typedoc.org/schema.json",
3
- "entryPoints": ["lib/modular.ts", "lib/types/analytics.ts"],
4
- "tsconfig": "tsconfig.json",
5
- "intentionallyNotExported": [
6
- "_AddPaymentInfoEventParameters",
7
- "_AddShippingInfoEventParameters",
8
- "_AddShippingInfoParameters",
9
- "_AddToCartEventParameters",
10
- "_AddToWishlistEventParameters",
11
- "_AnalyticsCallOptions",
12
- "_AnalyticsSettings",
13
- "_BeginCheckoutEventParameters",
14
- "_CampaignDetailsEventParameters",
15
- "_ConsentSettings",
16
- "_EarnVirtualCurrencyEventParameters",
17
- "_EventParams",
18
- "_GenerateLeadEventParameters",
19
- "_GtagConfigParams",
20
- "_Item",
21
- "_JoinGroupEventParameters",
22
- "_LevelEndEventParameters",
23
- "_LevelStartEventParameters",
24
- "_LevelUpEventParameters",
25
- "_LoginEventParameters",
26
- "_PostScoreEventParameters",
27
- "_PurchaseEventParameters",
28
- "_RefundEventParameters",
29
- "_RemoveFromCartEventParameters",
30
- "_ScreenViewParameters",
31
- "_SearchEventParameters",
32
- "_SelectContentEventParameters",
33
- "_SelectItemEventParameters",
34
- "_SelectPromotionEventParameters",
35
- "_SetCheckoutOptionEventParameters",
36
- "_SettingsOptions",
37
- "_ShareEventParameters",
38
- "_SignUpEventParameters",
39
- "_SpendVirtualCurrencyEventParameters",
40
- "_Statics",
41
- "_UnlockAchievementEventParameters",
42
- "_ViewCartEventParameters",
43
- "_ViewItemEventParameters",
44
- "_ViewItemListEventParameters",
45
- "_ViewPromotionEventParameters",
46
- "_ViewSearchResultsParameters"
47
- ]
3
+ "entryPoints": ["lib/index.ts", "lib/types/analytics.ts"],
4
+ "tsconfig": "tsconfig.json"
48
5
  }