@luciq/react-native 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.
Files changed (239) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/FONTS_SETUP_GUIDE.md +521 -0
  3. package/Gemfile +1 -0
  4. package/Gemfile.lock +11 -0
  5. package/LICENSE +21 -0
  6. package/README.md +148 -0
  7. package/RNLuciq.podspec +21 -0
  8. package/android/build.gradle +88 -0
  9. package/android/gradle.properties +4 -0
  10. package/android/jacoco.gradle +52 -0
  11. package/android/native.gradle +7 -0
  12. package/android/proguard-rules.txt +1 -0
  13. package/android/sourcemaps.gradle +255 -0
  14. package/android/src/main/AndroidManifest.xml +4 -0
  15. package/android/src/main/java/ai/luciq/reactlibrary/ArgsRegistry.java +278 -0
  16. package/android/src/main/java/ai/luciq/reactlibrary/Constants.java +20 -0
  17. package/android/src/main/java/ai/luciq/reactlibrary/RNLuciq.java +328 -0
  18. package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqAPMModule.java +392 -0
  19. package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqBugReportingModule.java +444 -0
  20. package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqCrashReportingModule.java +169 -0
  21. package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqFeatureRequestsModule.java +98 -0
  22. package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqNetworkLoggerModule.java +195 -0
  23. package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqReactnativeModule.java +1611 -0
  24. package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqReactnativePackage.java +41 -0
  25. package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqRepliesModule.java +298 -0
  26. package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqSessionReplayModule.java +213 -0
  27. package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqSurveysModule.java +237 -0
  28. package/android/src/main/java/ai/luciq/reactlibrary/utils/ArrayUtil.java +167 -0
  29. package/android/src/main/java/ai/luciq/reactlibrary/utils/EventEmitterModule.java +35 -0
  30. package/android/src/main/java/ai/luciq/reactlibrary/utils/LuciqUtil.java +58 -0
  31. package/android/src/main/java/ai/luciq/reactlibrary/utils/MainThreadHandler.java +13 -0
  32. package/android/src/main/java/ai/luciq/reactlibrary/utils/MapUtil.java +171 -0
  33. package/android/src/main/java/ai/luciq/reactlibrary/utils/RNTouchedViewExtractor.java +167 -0
  34. package/android/src/main/java/ai/luciq/reactlibrary/utils/ReportUtil.java +67 -0
  35. package/app.plugin.js +1 -0
  36. package/babel.config.js +3 -0
  37. package/bin/commands/MigrateCommand.d.ts +6 -0
  38. package/bin/commands/UploadEasUpdatesSourcemaps.d.ts +2 -0
  39. package/bin/commands/UploadSoFiles.d.ts +6 -0
  40. package/bin/commands/UploadSourcemaps.d.ts +2 -0
  41. package/bin/config/migration-config.json +125 -0
  42. package/bin/index.d.ts +2 -0
  43. package/bin/index.js +19179 -0
  44. package/bin/upload/index.d.ts +4 -0
  45. package/bin/upload/migrate.d.ts +14 -0
  46. package/bin/upload/uploadEasUpdatesSourcemaps.d.ts +21 -0
  47. package/bin/upload/uploadSoFiles.d.ts +21 -0
  48. package/bin/upload/uploadSourcemaps.d.ts +21 -0
  49. package/cli/commands/MigrateCommand.ts +32 -0
  50. package/cli/commands/UploadEasUpdatesSourcemaps.ts +34 -0
  51. package/cli/commands/UploadSoFiles.ts +38 -0
  52. package/cli/commands/UploadSourcemaps.ts +40 -0
  53. package/cli/config/migration-config.json +125 -0
  54. package/cli/index.ts +21 -0
  55. package/cli/upload/index.ts +4 -0
  56. package/cli/upload/migrate.ts +271 -0
  57. package/cli/upload/uploadEasUpdatesSourcemaps.ts +74 -0
  58. package/cli/upload/uploadSoFiles.ts +112 -0
  59. package/cli/upload/uploadSourcemaps.ts +73 -0
  60. package/dangerfile.ts +44 -0
  61. package/dist/index.d.ts +19 -0
  62. package/dist/index.js +14 -0
  63. package/dist/models/FeatureFlag.d.ts +11 -0
  64. package/dist/models/FeatureFlag.js +1 -0
  65. package/dist/models/LuciqConfig.d.ts +42 -0
  66. package/dist/models/LuciqConfig.js +1 -0
  67. package/dist/models/NonFatalOptions.d.ts +15 -0
  68. package/dist/models/NonFatalOptions.js +1 -0
  69. package/dist/models/OverAirUpdate.d.ts +12 -0
  70. package/dist/models/OverAirUpdate.js +1 -0
  71. package/dist/models/Report.d.ts +70 -0
  72. package/dist/models/Report.js +109 -0
  73. package/dist/models/ReproConfig.d.ts +27 -0
  74. package/dist/models/ReproConfig.js +1 -0
  75. package/dist/models/SessionMetadata.d.ts +55 -0
  76. package/dist/models/SessionMetadata.js +1 -0
  77. package/dist/models/ThemeConfig.d.ts +27 -0
  78. package/dist/models/ThemeConfig.js +1 -0
  79. package/dist/models/W3cExternalTraceAttributes.d.ts +22 -0
  80. package/dist/models/W3cExternalTraceAttributes.js +1 -0
  81. package/dist/modules/APM.d.ts +77 -0
  82. package/dist/modules/APM.js +104 -0
  83. package/dist/modules/BugReporting.d.ts +138 -0
  84. package/dist/modules/BugReporting.js +202 -0
  85. package/dist/modules/CrashReporting.d.ts +19 -0
  86. package/dist/modules/CrashReporting.js +40 -0
  87. package/dist/modules/FeatureRequests.d.ts +20 -0
  88. package/dist/modules/FeatureRequests.js +28 -0
  89. package/dist/modules/Luciq.d.ts +362 -0
  90. package/dist/modules/Luciq.js +797 -0
  91. package/dist/modules/NetworkLogger.d.ts +52 -0
  92. package/dist/modules/NetworkLogger.js +208 -0
  93. package/dist/modules/Replies.d.ts +78 -0
  94. package/dist/modules/Replies.js +121 -0
  95. package/dist/modules/SessionReplay.d.ts +78 -0
  96. package/dist/modules/SessionReplay.js +98 -0
  97. package/dist/modules/Surveys.d.ts +75 -0
  98. package/dist/modules/Surveys.js +101 -0
  99. package/dist/native/NativeAPM.d.ts +18 -0
  100. package/dist/native/NativeAPM.js +4 -0
  101. package/dist/native/NativeBugReporting.d.ts +32 -0
  102. package/dist/native/NativeBugReporting.js +10 -0
  103. package/dist/native/NativeConstants.d.ts +182 -0
  104. package/dist/native/NativeConstants.js +1 -0
  105. package/dist/native/NativeCrashReporting.d.ts +18 -0
  106. package/dist/native/NativeCrashReporting.js +2 -0
  107. package/dist/native/NativeFeatureRequests.d.ts +8 -0
  108. package/dist/native/NativeFeatureRequests.js +2 -0
  109. package/dist/native/NativeLuciq.d.ts +86 -0
  110. package/dist/native/NativeLuciq.js +10 -0
  111. package/dist/native/NativeNetworkLogger.d.ts +21 -0
  112. package/dist/native/NativeNetworkLogger.js +14 -0
  113. package/dist/native/NativePackage.d.ts +21 -0
  114. package/dist/native/NativePackage.js +2 -0
  115. package/dist/native/NativeReplies.d.ts +21 -0
  116. package/dist/native/NativeReplies.js +8 -0
  117. package/dist/native/NativeSessionReplay.d.ts +16 -0
  118. package/dist/native/NativeSessionReplay.js +8 -0
  119. package/dist/native/NativeSurveys.d.ts +22 -0
  120. package/dist/native/NativeSurveys.js +9 -0
  121. package/dist/utils/AppStatesHandler.d.ts +3 -0
  122. package/dist/utils/AppStatesHandler.js +16 -0
  123. package/dist/utils/Enums.d.ts +244 -0
  124. package/dist/utils/Enums.js +266 -0
  125. package/dist/utils/FeatureFlags.d.ts +7 -0
  126. package/dist/utils/FeatureFlags.js +24 -0
  127. package/dist/utils/LuciqConstants.d.ts +14 -0
  128. package/dist/utils/LuciqConstants.js +15 -0
  129. package/dist/utils/LuciqUtils.d.ts +97 -0
  130. package/dist/utils/LuciqUtils.js +301 -0
  131. package/dist/utils/UnhandledRejectionTracking.d.ts +9 -0
  132. package/dist/utils/UnhandledRejectionTracking.js +99 -0
  133. package/dist/utils/XhrNetworkInterceptor.d.ts +39 -0
  134. package/dist/utils/XhrNetworkInterceptor.js +253 -0
  135. package/dist/utils/config.d.ts +5 -0
  136. package/dist/utils/config.js +6 -0
  137. package/dist/utils/logger.d.ts +10 -0
  138. package/dist/utils/logger.js +39 -0
  139. package/expo.d.ts +1 -0
  140. package/expo.js +1 -0
  141. package/ios/RNLuciq/ArgsRegistry.h +32 -0
  142. package/ios/RNLuciq/ArgsRegistry.m +276 -0
  143. package/ios/RNLuciq/LuciqAPMBridge.h +26 -0
  144. package/ios/RNLuciq/LuciqAPMBridge.m +99 -0
  145. package/ios/RNLuciq/LuciqBugReportingBridge.h +60 -0
  146. package/ios/RNLuciq/LuciqBugReportingBridge.m +241 -0
  147. package/ios/RNLuciq/LuciqCrashReportingBridge.h +18 -0
  148. package/ios/RNLuciq/LuciqCrashReportingBridge.m +68 -0
  149. package/ios/RNLuciq/LuciqFeatureRequestsBridge.h +30 -0
  150. package/ios/RNLuciq/LuciqFeatureRequestsBridge.m +61 -0
  151. package/ios/RNLuciq/LuciqNetworkLoggerBridge.h +44 -0
  152. package/ios/RNLuciq/LuciqNetworkLoggerBridge.m +206 -0
  153. package/ios/RNLuciq/LuciqReactBridge.h +151 -0
  154. package/ios/RNLuciq/LuciqReactBridge.m +548 -0
  155. package/ios/RNLuciq/LuciqRepliesBridge.h +40 -0
  156. package/ios/RNLuciq/LuciqRepliesBridge.m +80 -0
  157. package/ios/RNLuciq/LuciqSessionReplayBridge.h +32 -0
  158. package/ios/RNLuciq/LuciqSessionReplayBridge.m +107 -0
  159. package/ios/RNLuciq/LuciqSurveysBridge.h +46 -0
  160. package/ios/RNLuciq/LuciqSurveysBridge.m +107 -0
  161. package/ios/RNLuciq/RCTConvert+LuciqEnums.h +18 -0
  162. package/ios/RNLuciq/RCTConvert+LuciqEnums.m +127 -0
  163. package/ios/RNLuciq/RNLuciq.h +35 -0
  164. package/ios/RNLuciq/RNLuciq.m +107 -0
  165. package/ios/RNLuciq/Util/LCQAPM+PrivateAPIs.h +15 -0
  166. package/ios/RNLuciq/Util/LCQCrashReporting+CP.h +13 -0
  167. package/ios/RNLuciq/Util/LCQNetworkLogger+CP.h +68 -0
  168. package/ios/RNLuciq/Util/Luciq+CP.h +12 -0
  169. package/ios/RNLuciq.xcodeproj/project.pbxproj +352 -0
  170. package/ios/native.rb +12 -0
  171. package/ios/sourcemaps.sh +120 -0
  172. package/migrate.js +569 -0
  173. package/package.json +92 -0
  174. package/plugin/build/index.js +42078 -0
  175. package/plugin/src/index.ts +5 -0
  176. package/plugin/src/pluginProps.ts +6 -0
  177. package/plugin/src/withLuciq.ts +51 -0
  178. package/plugin/src/withLuciqAndroid.ts +99 -0
  179. package/plugin/src/withLuciqIOS.ts +109 -0
  180. package/plugin/tsconfig.json +7 -0
  181. package/react-native.config.js +16 -0
  182. package/scripts/customize-ios-endpoints.sh +28 -0
  183. package/scripts/dream-11-delete-unused-features.sh +62 -0
  184. package/scripts/find-token.js +58 -0
  185. package/scripts/find-token.sh +70 -0
  186. package/scripts/notify-github.sh +15 -0
  187. package/scripts/replace.js +58 -0
  188. package/scripts/snapshot-comment.md +15 -0
  189. package/scripts/snapshot-version.sh +11 -0
  190. package/src/index.ts +40 -0
  191. package/src/models/FeatureFlag.ts +12 -0
  192. package/src/models/LuciqConfig.ts +48 -0
  193. package/src/models/NonFatalOptions.ts +16 -0
  194. package/src/models/OverAirUpdate.ts +14 -0
  195. package/src/models/Report.ts +124 -0
  196. package/src/models/ReproConfig.ts +31 -0
  197. package/src/models/SessionMetadata.ts +57 -0
  198. package/src/models/ThemeConfig.ts +34 -0
  199. package/src/models/W3cExternalTraceAttributes.ts +22 -0
  200. package/src/modules/APM.ts +117 -0
  201. package/src/modules/BugReporting.ts +254 -0
  202. package/src/modules/CrashReporting.ts +54 -0
  203. package/src/modules/FeatureRequests.ts +32 -0
  204. package/src/modules/Luciq.ts +934 -0
  205. package/src/modules/NetworkLogger.ts +270 -0
  206. package/src/modules/Replies.ts +137 -0
  207. package/src/modules/SessionReplay.ts +111 -0
  208. package/src/modules/Surveys.ts +118 -0
  209. package/src/native/NativeAPM.ts +51 -0
  210. package/src/native/NativeBugReporting.ts +70 -0
  211. package/src/native/NativeConstants.ts +215 -0
  212. package/src/native/NativeCrashReporting.ts +29 -0
  213. package/src/native/NativeFeatureRequests.ts +12 -0
  214. package/src/native/NativeLuciq.ts +179 -0
  215. package/src/native/NativeNetworkLogger.ts +42 -0
  216. package/src/native/NativePackage.ts +25 -0
  217. package/src/native/NativeReplies.ts +34 -0
  218. package/src/native/NativeSessionReplay.ts +21 -0
  219. package/src/native/NativeSurveys.ts +34 -0
  220. package/src/promise.d.ts +11 -0
  221. package/src/utils/AppStatesHandler.ts +19 -0
  222. package/src/utils/Enums.ts +266 -0
  223. package/src/utils/FeatureFlags.ts +33 -0
  224. package/src/utils/LuciqConstants.ts +24 -0
  225. package/src/utils/LuciqUtils.ts +417 -0
  226. package/src/utils/UnhandledRejectionTracking.ts +118 -0
  227. package/src/utils/XhrNetworkInterceptor.ts +333 -0
  228. package/src/utils/config.ts +7 -0
  229. package/src/utils/logger.ts +54 -0
  230. package/tsconfig.json +32 -0
  231. package/tsconfig.test.json +4 -0
  232. package/tsconfig.upload.json +10 -0
  233. package/upload/index.d.ts +4 -0
  234. package/upload/index.js +17314 -0
  235. package/upload/migrate.d.ts +14 -0
  236. package/upload/package.json +5 -0
  237. package/upload/uploadEasUpdatesSourcemaps.d.ts +21 -0
  238. package/upload/uploadSoFiles.d.ts +21 -0
  239. package/upload/uploadSourcemaps.d.ts +21 -0
@@ -0,0 +1,40 @@
1
+ import { NativeCrashReporting } from '../native/NativeCrashReporting';
2
+ import LuciqUtils from '../utils/LuciqUtils';
3
+ import { Platform } from 'react-native';
4
+ import { NonFatalErrorLevel } from '../utils/Enums';
5
+ import { Logger } from '../utils/logger';
6
+ /**
7
+ * Enables and disables everything related to crash reporting including intercepting
8
+ * errors in the global error handler. It is enabled by default.
9
+ * @param isEnabled
10
+ */
11
+ export const setEnabled = (isEnabled) => {
12
+ NativeCrashReporting.setEnabled(isEnabled);
13
+ };
14
+ /**
15
+ * Send handled JS error object
16
+ * @param error Error object to be sent to Luciq's servers
17
+ * @param nonFatalOptions extra config for the non-fatal error sent with Error Object
18
+ */
19
+ export const reportError = (error, nonFatalOptions = {}) => {
20
+ if (error instanceof Error) {
21
+ let level = NonFatalErrorLevel.error;
22
+ if (nonFatalOptions.level != null) {
23
+ level = nonFatalOptions.level;
24
+ }
25
+ return LuciqUtils.sendCrashReport(error, (data) => NativeCrashReporting.sendHandledJSCrash(data, nonFatalOptions.userAttributes, nonFatalOptions.fingerprint, level));
26
+ }
27
+ else {
28
+ Logger.warn(`LCQ-RN: The error ${error} has been omitted because only error type is supported.`);
29
+ return;
30
+ }
31
+ };
32
+ /**
33
+ * Enables and disables capturing native C++ NDK crashes.
34
+ * @param isEnabled
35
+ */
36
+ export const setNDKCrashesEnabled = (isEnabled) => {
37
+ if (Platform.OS === 'android') {
38
+ NativeCrashReporting.setNDKCrashesEnabled(isEnabled);
39
+ }
40
+ };
@@ -0,0 +1,20 @@
1
+ import type { ActionType } from '../utils/Enums';
2
+ /**
3
+ * Enables and disables everything related to feature requests.
4
+ *
5
+ * @param isEnabled
6
+ */
7
+ export declare const setEnabled: (isEnabled: boolean) => void;
8
+ /**
9
+ * Sets whether users are required to enter an email address or not when
10
+ * sending reports.
11
+ * Defaults to YES.
12
+ *
13
+ * @param isEmailFieldRequired A boolean to indicate whether email field is required or not.
14
+ * @param types An enum that indicates which action types will have the isEmailFieldRequired
15
+ */
16
+ export declare const setEmailFieldRequired: (isEmailFieldRequired: boolean, type: ActionType) => void;
17
+ /**
18
+ * Shows the UI for feature requests list
19
+ */
20
+ export declare const show: () => void;
@@ -0,0 +1,28 @@
1
+ import { NativeFeatureRequests } from '../native/NativeFeatureRequests';
2
+ /**
3
+ * Enables and disables everything related to feature requests.
4
+ *
5
+ * @param isEnabled
6
+ */
7
+ export const setEnabled = (isEnabled) => {
8
+ NativeFeatureRequests.setEnabled(isEnabled);
9
+ };
10
+ /**
11
+ * Sets whether users are required to enter an email address or not when
12
+ * sending reports.
13
+ * Defaults to YES.
14
+ *
15
+ * @param isEmailFieldRequired A boolean to indicate whether email field is required or not.
16
+ * @param types An enum that indicates which action types will have the isEmailFieldRequired
17
+ */
18
+ export const setEmailFieldRequired = (isEmailFieldRequired, type) => {
19
+ NativeFeatureRequests.setEmailFieldRequiredForFeatureRequests(isEmailFieldRequired, [
20
+ type,
21
+ ]);
22
+ };
23
+ /**
24
+ * Shows the UI for feature requests list
25
+ */
26
+ export const show = () => {
27
+ NativeFeatureRequests.show();
28
+ };
@@ -0,0 +1,362 @@
1
+ import type { NavigationContainerRefWithCurrent, NavigationState as NavigationStateV5 } from '@react-navigation/native';
2
+ import type { ComponentDidAppearEvent } from 'react-native-navigation';
3
+ import type { NavigationAction, NavigationState as NavigationStateV4 } from 'react-navigation';
4
+ import type { LuciqConfig } from '../models/LuciqConfig';
5
+ import Report from '../models/Report';
6
+ import { AutoMaskingType, ColorTheme, Locale, StringKey, WelcomeMessageMode } from '../utils/Enums';
7
+ import type { ReproConfig } from '../models/ReproConfig';
8
+ import type { FeatureFlag } from '../models/FeatureFlag';
9
+ import type { OverAirUpdate } from '../models/OverAirUpdate';
10
+ import type { ThemeConfig } from '../models/ThemeConfig';
11
+ /**
12
+ * Enables or disables Luciq functionality.
13
+ * @param isEnabled A boolean to enable/disable Luciq.
14
+ */
15
+ export declare const setEnabled: (isEnabled: boolean) => void;
16
+ /**
17
+ * Initializes the SDK.
18
+ * This is the main SDK method that does all the magic. This is the only
19
+ * method that SHOULD be called.
20
+ * Should be called in constructor of the AppRegistry component
21
+ * @param config SDK configurations. See {@link LuciqConfig} for more info.
22
+ */
23
+ export declare const init: (config: LuciqConfig) => void;
24
+ /**
25
+ * Set Current App Variant.
26
+ * @param appVariant the current App variant name
27
+ */
28
+ export declare const setAppVariant: (appVariant: string) => void;
29
+ /**
30
+ * Sets the Code Push version to be sent with each report.
31
+ * @param version the Code Push version.
32
+ *
33
+ * @deprecated Use {@link setOverAirVersion} instead.
34
+ */
35
+ export declare const setCodePushVersion: (version: string) => void;
36
+ /**
37
+ * Sets over air update version to be sent with each report.
38
+ * @param version the OTA version.
39
+ *
40
+ */
41
+ export declare const setOverAirVersion: (OTAserviceVersion: OverAirUpdate) => void;
42
+ /**
43
+ * Attaches user data to each report being sent.
44
+ * Each call to this method overrides the user data to be attached.
45
+ * Maximum size of the string is 1,000 characters.
46
+ * @param data A string to be attached to each report, with a maximum size of 1,000 characters.
47
+ */
48
+ export declare const setUserData: (data: string) => void;
49
+ /**
50
+ * Sets whether the SDK is tracking user steps or not.
51
+ * Enabling user steps would give you an insight on the scenario a user has
52
+ * performed before encountering a bug or a crash. User steps are attached
53
+ * with each report being sent.
54
+ * @param isEnabled A boolean to set user steps tracking to being enabled or disabled.
55
+ */
56
+ export declare const setTrackUserSteps: (isEnabled: boolean) => void;
57
+ /**
58
+ * Sets whether LCQLog should also print to Xcode's console log or not.
59
+ * @param printsToConsole A boolean to set whether printing to
60
+ * Xcode's console is enabled or not.
61
+ */
62
+ export declare const setLCQLogPrintsToConsole: (printsToConsole: boolean) => void;
63
+ /**
64
+ * The session profiler is enabled by default and it attaches to the bug and
65
+ * crash reports the following information during the last 60 seconds before the report is sent.
66
+ * @param isEnabled A boolean parameter to enable or disable the feature.
67
+ */
68
+ export declare const setSessionProfilerEnabled: (isEnabled: boolean) => void;
69
+ /**
70
+ * Sets the SDK's locale.
71
+ * Use to change the SDK's UI to different language.
72
+ * Defaults to the device's current locale.
73
+ * @param sdkLocale A locale to set the SDK to.
74
+ */
75
+ export declare const setLocale: (sdkLocale: Locale) => void;
76
+ /**
77
+ * Sets the color theme of the SDK's whole UI.
78
+ * @param sdkTheme
79
+ */
80
+ export declare const setColorTheme: (sdkTheme: ColorTheme) => void;
81
+ /**
82
+ * Sets the primary color of the SDK's UI.
83
+ * Sets the color of UI elements indicating interactivity or call to action.
84
+ * To use, import processColor and pass to it with argument the color hex
85
+ * as argument.
86
+ * @param color A color to set the UI elements of the SDK to.
87
+ * @deprecated Please migrate to the new UI customization API: {@link setTheme}
88
+ */
89
+ export declare const setPrimaryColor: (color: string) => void;
90
+ /**
91
+ * Appends a set of tags to previously added tags of reported feedback,
92
+ * bug or crash.
93
+ * @param tags An array of tags to append to current tags.
94
+ */
95
+ export declare const appendTags: (tags: string[]) => void;
96
+ /**
97
+ * Manually removes all tags of reported feedback, bug or crash.
98
+ */
99
+ export declare const resetTags: () => void;
100
+ /**
101
+ * Gets all tags of reported feedback, bug or crash.
102
+ */
103
+ export declare const getTags: () => Promise<string[] | null>;
104
+ /**
105
+ * Overrides any of the strings shown in the SDK with custom ones.
106
+ * Allows you to customize any of the strings shown to users in the SDK.
107
+ * @param key Key of string to override.
108
+ * @param string String value to override the default one.
109
+ */
110
+ export declare const setString: (key: StringKey, string: string) => void;
111
+ /**
112
+ * Sets the default value of the user's email and ID and hides the email field from the reporting UI
113
+ * and set the user's name to be included with all reports.
114
+ * It also reset the chats on device to that email and removes user attributes,
115
+ * user data and completed surveys.
116
+ * @param email Email address to be set as the user's email.
117
+ * @param name Name of the user to be set.
118
+ * @param [id] ID of the user to be set.
119
+ */
120
+ export declare const identifyUser: (email: string, name: string, id?: string) => void;
121
+ /**
122
+ * Sets the default value of the user's email to nil and show email field and remove user name
123
+ * from all reports
124
+ * It also reset the chats on device and removes user attributes, user data and completed surveys.
125
+ */
126
+ export declare const logOut: () => void;
127
+ /**
128
+ * Logs a user event that happens through the lifecycle of the application.
129
+ * Logged user events are going to be sent with each report, as well as at the end of a session.
130
+ * @param name Event name.
131
+ */
132
+ export declare const logUserEvent: (name: string) => void;
133
+ /**
134
+ * Appends a log message to Luciq internal log.
135
+ * These logs are then sent along the next uploaded report.
136
+ * All log messages are timestamped.
137
+ * Logs aren't cleared per single application run.
138
+ * If you wish to reset the logs, use {@link clearLogs()}
139
+ * Note: logs passed to this method are **NOT** printed to Logcat.
140
+ *
141
+ * @param message the message
142
+ */
143
+ export declare const logVerbose: (message: string) => void;
144
+ /**
145
+ * Appends a log message to Luciq internal log.
146
+ * These logs are then sent along the next uploaded report.
147
+ * All log messages are timestamped.
148
+ * Logs aren't cleared per single application run.
149
+ * If you wish to reset the logs, use {@link clearLogs()}
150
+ * Note: logs passed to this method are **NOT** printed to Logcat.
151
+ *
152
+ * @param message the message
153
+ */
154
+ export declare const logInfo: (message: string) => void;
155
+ /**
156
+ * Appends a log message to Luciq internal log.
157
+ * These logs are then sent along the next uploaded report.
158
+ * All log messages are timestamped.
159
+ * Logs aren't cleared per single application run.
160
+ * If you wish to reset the logs, use {@link clearLogs()}
161
+ * Note: logs passed to this method are **NOT** printed to Logcat.
162
+ *
163
+ * @param message the message
164
+ */
165
+ export declare const logDebug: (message: string) => void;
166
+ /**
167
+ * Appends a log message to Luciq internal log.
168
+ * These logs are then sent along the next uploaded report.
169
+ * All log messages are timestamped.
170
+ * Logs aren't cleared per single application run.
171
+ * If you wish to reset the logs, use {@link clearLogs()}
172
+ * Note: logs passed to this method are **NOT** printed to Logcat.
173
+ *
174
+ * @param message the message
175
+ */
176
+ export declare const logError: (message: string) => void;
177
+ /**
178
+ * Appends a log message to Luciq internal log.
179
+ * These logs are then sent along the next uploaded report.
180
+ * All log messages are timestamped.
181
+ * Logs aren't cleared per single application run.
182
+ * If you wish to reset the logs, use {@link clearLogs()}
183
+ * Note: logs passed to this method are **NOT** printed to Logcat.
184
+ *
185
+ * @param message the message
186
+ */
187
+ export declare const logWarn: (message: string) => void;
188
+ /**
189
+ * Clear all Luciq logs, console logs, network logs and user steps.
190
+ */
191
+ export declare const clearLogs: () => void;
192
+ /**
193
+ * Sets the repro steps mode for bugs and crashes.
194
+ *
195
+ * @param config The repro steps config.
196
+ *
197
+ * @example
198
+ * ```js
199
+ * Luciq.setReproStepsConfig({
200
+ * bug: ReproStepsMode.enabled,
201
+ * crash: ReproStepsMode.disabled,
202
+ * sessionReplay: ReproStepsMode.enabled,
203
+ * });
204
+ * ```
205
+ */
206
+ export declare const setReproStepsConfig: (config: ReproConfig) => void;
207
+ /**
208
+ * Sets user attribute to overwrite it's value or create a new one if it doesn't exist.
209
+ *
210
+ * @param key the attribute
211
+ * @param value the value
212
+ */
213
+ export declare const setUserAttribute: (key: string, value: string) => void;
214
+ /**
215
+ * Returns the user attribute associated with a given key.
216
+ * @param key The attribute key as string
217
+ */
218
+ export declare const getUserAttribute: (key: string) => Promise<string | null>;
219
+ /**
220
+ * Removes user attribute if exists.
221
+ *
222
+ * @param key the attribute key as string
223
+ * @see {@link setUserAttribute}
224
+ */
225
+ export declare const removeUserAttribute: (key: string) => void;
226
+ /**
227
+ * Returns all user attributes.
228
+ * set user attributes, or an empty dictionary if no user attributes have been set.
229
+ */
230
+ export declare const getAllUserAttributes: () => Promise<Record<string, string>>;
231
+ /**
232
+ * Clears all user attributes if exists.
233
+ */
234
+ export declare const clearAllUserAttributes: () => void;
235
+ /**
236
+ * Shows the welcome message in a specific mode.
237
+ * @param mode An enum to set the welcome message mode to live, or beta.
238
+ */
239
+ export declare const showWelcomeMessage: (mode: WelcomeMessageMode) => void;
240
+ /**
241
+ * Sets the welcome message mode to live, beta or disabled.
242
+ * @param mode An enum to set the welcome message mode to live, beta or disabled.
243
+ */
244
+ export declare const setWelcomeMessageMode: (mode: WelcomeMessageMode) => void;
245
+ /**
246
+ * Add file to be attached to the bug report.
247
+ * @param filePath
248
+ * @param fileName
249
+ */
250
+ export declare const addFileAttachment: (filePath: string, fileName: string) => void;
251
+ /**
252
+ * Hides component from screenshots, screen recordings and view hierarchy.
253
+ * @param viewRef the ref of the component to hide
254
+ */
255
+ export declare const addPrivateView: (viewRef: number | React.Component | React.ComponentClass) => void;
256
+ /**
257
+ * Removes component from the set of hidden views. The component will show again in
258
+ * screenshots, screen recordings and view hierarchy.
259
+ * @param viewRef the ref of the component to remove from hidden views
260
+ */
261
+ export declare const removePrivateView: (viewRef: number | React.Component | React.ComponentClass) => void;
262
+ /**
263
+ * Shows default Luciq prompt.
264
+ */
265
+ export declare const show: () => void;
266
+ export declare const onReportSubmitHandler: (handler?: ((report: Report) => void) | undefined) => void;
267
+ export declare const onNavigationStateChange: (prevState: NavigationStateV4, currentState: NavigationStateV4, _action: NavigationAction) => void;
268
+ export declare const onStateChange: (state?: NavigationStateV5) => void;
269
+ /**
270
+ * Sets a listener for screen change
271
+ * @param navigationRef a refrence of a navigation container
272
+ *
273
+ */
274
+ export declare const setNavigationListener: (navigationRef: NavigationContainerRefWithCurrent<ReactNavigation.RootParamList>) => () => void;
275
+ export declare const reportScreenChange: (screenName: string) => void;
276
+ /**
277
+ * Add feature flags to the next report.
278
+ * @param featureFlags An array of feature flags to add to the next report.
279
+ */
280
+ export declare const addFeatureFlags: (featureFlags: FeatureFlag[]) => void;
281
+ /**
282
+ * Add a feature flag to the to next report.
283
+ */
284
+ export declare const addFeatureFlag: (featureFlag: FeatureFlag) => void;
285
+ /**
286
+ * Remove feature flags from the next report.
287
+ * @param featureFlags An array of feature flags to remove from the next report.
288
+ */
289
+ export declare const removeFeatureFlags: (featureFlags: string[]) => void;
290
+ /**
291
+ * Remove a feature flag from the next report.
292
+ * @param name the name of the feature flag to remove from the next report.
293
+ */
294
+ export declare const removeFeatureFlag: (name: string) => void;
295
+ /**
296
+ * Clear all feature flags
297
+ */
298
+ export declare const removeAllFeatureFlags: () => void;
299
+ /**
300
+ * This API has to be call when using custom app rating prompt
301
+ */
302
+ export declare const willRedirectToStore: () => void;
303
+ /**
304
+ * This API has be called when changing the default Metro server port (8081) to exclude the DEV URL from network logging.
305
+ */
306
+ export declare const setMetroDevServerPort: (port: number) => void;
307
+ export declare const componentDidAppearListener: (event: ComponentDidAppearEvent) => void;
308
+ /**
309
+ * Sets listener to feature flag changes
310
+ * @param handler A callback that gets the update value of the flag
311
+ */
312
+ export declare const _registerFeatureFlagsChangeListener: (handler: (payload: {
313
+ isW3ExternalTraceIDEnabled: boolean;
314
+ isW3ExternalGeneratedHeaderEnabled: boolean;
315
+ isW3CaughtHeaderEnabled: boolean;
316
+ networkBodyLimit: number;
317
+ }) => void) => void;
318
+ /**
319
+ * Sets the auto mask screenshots types.
320
+ * @param autoMaskingTypes The masking type to be applied.
321
+ */
322
+ export declare const enableAutoMasking: (autoMaskingTypes: AutoMaskingType[]) => void;
323
+ /**
324
+ * Sets a custom theme for Luciq UI elements.
325
+ *
326
+ * This method provides comprehensive theming support. It will automatically use LCQTheme
327
+ * if available in the SDK version, otherwise falls back to individual theming methods.
328
+ *
329
+ * @param theme - Configuration object containing theme properties
330
+ *
331
+ * @example
332
+ * ```typescript
333
+ * // Basic usage with primary color (always supported)
334
+ * Luciq.setTheme({
335
+ * primaryColor: '#FF6B6B'
336
+ * });
337
+ *
338
+ * // Comprehensive theming (uses LCQTheme when available)
339
+ * Luciq.setTheme({
340
+ * primaryColor: '#FF6B6B',
341
+ * secondaryTextColor: '#666666',
342
+ * primaryTextColor: '#333333',
343
+ * titleTextColor: '#000000',
344
+ * backgroundColor: '#FFFFFF',
345
+ * primaryTextStyle: 'bold',
346
+ * secondaryTextStyle: 'normal',
347
+ * titleTextStyle: 'bold',
348
+ * ctaTextStyle: 'bold',
349
+ * primaryFontPath: '/data/user/0/ai.yourapp/files/fonts/YourFont.ttf',
350
+ * secondaryFontPath: '/data/user/0/ai.yourapp/files/fonts/YourFont.ttf',
351
+ * ctaTextType: '/data/user/0/ai.yourapp/files/fonts/YourFont.ttf',
352
+ * primaryFontAsset: 'fonts/YourFont.ttf',
353
+ * secondaryFontAsset: 'fonts/YourFont.ttf'
354
+ * });
355
+ * ```
356
+ */
357
+ export declare const setTheme: (theme: ThemeConfig) => void;
358
+ /**
359
+ * Enables or disables displaying in full-screen mode, hiding the status and navigation bars.
360
+ * @param isEnabled A boolean to enable/disable setFullscreen.
361
+ */
362
+ export declare const setFullscreen: (isEnabled: boolean) => void;