@coralogix/react-native-plugin 0.11.3 → 0.12.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
@@ -1,3 +1,9 @@
1
+ ## 0.12.0 (2026-10-06)
2
+
3
+ ### 🚀 Features
4
+
5
+ - Added optional `account_id` and `account_name` to `UserContext`.
6
+
1
7
  ## 0.11.3 (2026-09-26)
2
8
 
3
9
  ### 🩹 Fixes
package/CxSdk.podspec CHANGED
@@ -16,9 +16,9 @@ Pod::Spec.new do |s|
16
16
 
17
17
  s.source_files = "ios/**/*.{h,m,mm,swift}"
18
18
 
19
- s.dependency 'Coralogix','2.18.4'
20
- s.dependency 'CoralogixInternal','2.18.4'
21
- s.dependency 'SessionReplay','2.18.4'
19
+ s.dependency 'Coralogix','2.19.0'
20
+ s.dependency 'CoralogixInternal','2.19.0'
21
+ s.dependency 'SessionReplay','2.19.0'
22
22
 
23
23
  # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
24
24
  # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
package/README.md CHANGED
@@ -48,6 +48,8 @@ CoralogixRum.setUserContext({
48
48
  user_id: '123',
49
49
  user_name: 'name',
50
50
  user_email: 'user@email.com',
51
+ account_id: 'acc-42', // optional, from 0.12.0
52
+ account_name: 'Acme Corp', // optional, from 0.12.0
51
53
  user_metadata: {
52
54
  role: 'admin',
53
55
  // ...
@@ -87,7 +87,7 @@ dependencies {
87
87
  // 2.22.0 is the first release exposing View.isCoralogixMasked() and
88
88
  // View.isInsideCoralogixMaskedSubtree(), which the masked-interaction walk in
89
89
  // reportUserInteraction reads instead of reimplementing the SDK's mask rule here.
90
- implementation "com.coralogix:android-sdk:2.22.0"
90
+ implementation "com.coralogix:android-sdk:2.23.0"
91
91
 
92
92
  testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
93
93
  testImplementation "org.mockito:mockito-core:5.12.0"
@@ -833,7 +833,9 @@ class CxSdkModule(reactContext: ReactApplicationContext) :
833
833
  userId = getString("user_id") ?: "",
834
834
  username = getString("user_name") ?: "",
835
835
  email = getString("user_email") ?: "",
836
- metadata = getMap("user_metadata")?.toStringMap() ?: mapOf()
836
+ metadata = getMap("user_metadata")?.toStringMap() ?: mapOf(),
837
+ accountId = getString("account_id"),
838
+ accountName = getString("account_name")
837
839
  )
838
840
 
839
841
  private fun ReadableMap.toInstrumentationMap(): Map<Instrumentation, Boolean> {
@@ -970,6 +972,8 @@ class CxSdkModule(reactContext: ReactApplicationContext) :
970
972
  map.putString("user_name", username)
971
973
  map.putString("user_email", email)
972
974
  map.putMap("user_metadata", metadata.toWritableMap())
975
+ accountId?.let { map.putString("account_id", it) }
976
+ accountName?.let { map.putString("account_name", it) }
973
977
 
974
978
  return map
975
979
  }
package/index.cjs.js CHANGED
@@ -1140,7 +1140,7 @@ function stopJsRefreshRateSampler() {
1140
1140
  appStateSub = null;
1141
1141
  }
1142
1142
 
1143
- var version = "0.11.3";
1143
+ var version = "0.12.0";
1144
1144
  var pkg = {
1145
1145
  version: version};
1146
1146
 
@@ -2053,12 +2053,16 @@ const CoralogixRum = {
2053
2053
  if (!result || typeof result !== 'object') {
2054
2054
  return undefined;
2055
2055
  }
2056
- return {
2056
+ return _extends({
2057
2057
  user_id: result.user_id || '',
2058
2058
  user_name: result.user_name || '',
2059
2059
  user_email: result.user_email || '',
2060
2060
  user_metadata: result.user_metadata || {}
2061
- };
2061
+ }, result.account_id && {
2062
+ account_id: result.account_id
2063
+ }, result.account_name && {
2064
+ account_name: result.account_name
2065
+ });
2062
2066
  },
2063
2067
  setLabels: labels => {
2064
2068
  if (!isInited) {
package/index.esm.js CHANGED
@@ -1138,7 +1138,7 @@ function stopJsRefreshRateSampler() {
1138
1138
  appStateSub = null;
1139
1139
  }
1140
1140
 
1141
- var version = "0.11.3";
1141
+ var version = "0.12.0";
1142
1142
  var pkg = {
1143
1143
  version: version};
1144
1144
 
@@ -2051,12 +2051,16 @@ const CoralogixRum = {
2051
2051
  if (!result || typeof result !== 'object') {
2052
2052
  return undefined;
2053
2053
  }
2054
- return {
2054
+ return _extends({
2055
2055
  user_id: result.user_id || '',
2056
2056
  user_name: result.user_name || '',
2057
2057
  user_email: result.user_email || '',
2058
2058
  user_metadata: result.user_metadata || {}
2059
- };
2059
+ }, result.account_id && {
2060
+ account_id: result.account_id
2061
+ }, result.account_name && {
2062
+ account_name: result.account_name
2063
+ });
2060
2064
  },
2061
2065
  setLabels: labels => {
2062
2066
  if (!isInited) {
package/ios/CxSdk.swift CHANGED
@@ -606,7 +606,9 @@ class CxSdk: RCTEventEmitter {
606
606
  let coralogixUser = UserContext(userId: userContext?["user_id"] as? String ?? "",
607
607
  userName: userContext?["user_name"] as? String ?? "",
608
608
  userEmail:userContext?["user_email"] as? String ?? "",
609
- userMetadata: userMetadata)
609
+ userMetadata: userMetadata,
610
+ accountId: userContext?["account_id"] as? String,
611
+ accountName: userContext?["account_name"] as? String)
610
612
  let ignoreUrls = (parameter["ignoreUrls"] as? [Any])?.compactMap { $0 as? String } ?? []
611
613
  let ignoreError = (parameter["ignoreErrors"] as? [Any])?.compactMap { $0 as? String } ?? []
612
614
  let rawNetworkExtraConfig = parameter["networkExtraConfig"] as? [[String: Any]]
@@ -716,7 +718,9 @@ class CxSdk: RCTEventEmitter {
716
718
  return UserContext(userId: parameter["user_id"] as? String ?? "",
717
719
  userName: parameter["user_name"] as? String ?? "",
718
720
  userEmail:parameter["user_email"] as? String ?? "",
719
- userMetadata: userMetadata)
721
+ userMetadata: userMetadata,
722
+ accountId: parameter["account_id"] as? String,
723
+ accountName: parameter["account_name"] as? String)
720
724
  }
721
725
 
722
726
  private func mobileVitalsType(from string: String) -> CoralogixExporterOptions.MobileVitalsType? {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coralogix/react-native-plugin",
3
- "version": "0.11.3",
3
+ "version": "0.12.0",
4
4
  "description": "Official Coralogix React Native plugin",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Coralogix",
@@ -2,6 +2,8 @@ export interface UserContextConfig {
2
2
  user_id: string;
3
3
  user_name: string;
4
4
  user_email?: string;
5
+ account_id?: string;
6
+ account_name?: string;
5
7
  user_metadata?: {
6
8
  [key: string]: any;
7
9
  };