@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.
- package/CHANGELOG.md +5 -0
- package/FONTS_SETUP_GUIDE.md +521 -0
- package/Gemfile +1 -0
- package/Gemfile.lock +11 -0
- package/LICENSE +21 -0
- package/README.md +148 -0
- package/RNLuciq.podspec +21 -0
- package/android/build.gradle +88 -0
- package/android/gradle.properties +4 -0
- package/android/jacoco.gradle +52 -0
- package/android/native.gradle +7 -0
- package/android/proguard-rules.txt +1 -0
- package/android/sourcemaps.gradle +255 -0
- package/android/src/main/AndroidManifest.xml +4 -0
- package/android/src/main/java/ai/luciq/reactlibrary/ArgsRegistry.java +278 -0
- package/android/src/main/java/ai/luciq/reactlibrary/Constants.java +20 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciq.java +328 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqAPMModule.java +392 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqBugReportingModule.java +444 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqCrashReportingModule.java +169 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqFeatureRequestsModule.java +98 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqNetworkLoggerModule.java +195 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqReactnativeModule.java +1611 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqReactnativePackage.java +41 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqRepliesModule.java +298 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqSessionReplayModule.java +213 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqSurveysModule.java +237 -0
- package/android/src/main/java/ai/luciq/reactlibrary/utils/ArrayUtil.java +167 -0
- package/android/src/main/java/ai/luciq/reactlibrary/utils/EventEmitterModule.java +35 -0
- package/android/src/main/java/ai/luciq/reactlibrary/utils/LuciqUtil.java +58 -0
- package/android/src/main/java/ai/luciq/reactlibrary/utils/MainThreadHandler.java +13 -0
- package/android/src/main/java/ai/luciq/reactlibrary/utils/MapUtil.java +171 -0
- package/android/src/main/java/ai/luciq/reactlibrary/utils/RNTouchedViewExtractor.java +167 -0
- package/android/src/main/java/ai/luciq/reactlibrary/utils/ReportUtil.java +67 -0
- package/app.plugin.js +1 -0
- package/babel.config.js +3 -0
- package/bin/commands/MigrateCommand.d.ts +6 -0
- package/bin/commands/UploadEasUpdatesSourcemaps.d.ts +2 -0
- package/bin/commands/UploadSoFiles.d.ts +6 -0
- package/bin/commands/UploadSourcemaps.d.ts +2 -0
- package/bin/config/migration-config.json +125 -0
- package/bin/index.d.ts +2 -0
- package/bin/index.js +19179 -0
- package/bin/upload/index.d.ts +4 -0
- package/bin/upload/migrate.d.ts +14 -0
- package/bin/upload/uploadEasUpdatesSourcemaps.d.ts +21 -0
- package/bin/upload/uploadSoFiles.d.ts +21 -0
- package/bin/upload/uploadSourcemaps.d.ts +21 -0
- package/cli/commands/MigrateCommand.ts +32 -0
- package/cli/commands/UploadEasUpdatesSourcemaps.ts +34 -0
- package/cli/commands/UploadSoFiles.ts +38 -0
- package/cli/commands/UploadSourcemaps.ts +40 -0
- package/cli/config/migration-config.json +125 -0
- package/cli/index.ts +21 -0
- package/cli/upload/index.ts +4 -0
- package/cli/upload/migrate.ts +271 -0
- package/cli/upload/uploadEasUpdatesSourcemaps.ts +74 -0
- package/cli/upload/uploadSoFiles.ts +112 -0
- package/cli/upload/uploadSourcemaps.ts +73 -0
- package/dangerfile.ts +44 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +14 -0
- package/dist/models/FeatureFlag.d.ts +11 -0
- package/dist/models/FeatureFlag.js +1 -0
- package/dist/models/LuciqConfig.d.ts +42 -0
- package/dist/models/LuciqConfig.js +1 -0
- package/dist/models/NonFatalOptions.d.ts +15 -0
- package/dist/models/NonFatalOptions.js +1 -0
- package/dist/models/OverAirUpdate.d.ts +12 -0
- package/dist/models/OverAirUpdate.js +1 -0
- package/dist/models/Report.d.ts +70 -0
- package/dist/models/Report.js +109 -0
- package/dist/models/ReproConfig.d.ts +27 -0
- package/dist/models/ReproConfig.js +1 -0
- package/dist/models/SessionMetadata.d.ts +55 -0
- package/dist/models/SessionMetadata.js +1 -0
- package/dist/models/ThemeConfig.d.ts +27 -0
- package/dist/models/ThemeConfig.js +1 -0
- package/dist/models/W3cExternalTraceAttributes.d.ts +22 -0
- package/dist/models/W3cExternalTraceAttributes.js +1 -0
- package/dist/modules/APM.d.ts +77 -0
- package/dist/modules/APM.js +104 -0
- package/dist/modules/BugReporting.d.ts +138 -0
- package/dist/modules/BugReporting.js +202 -0
- package/dist/modules/CrashReporting.d.ts +19 -0
- package/dist/modules/CrashReporting.js +40 -0
- package/dist/modules/FeatureRequests.d.ts +20 -0
- package/dist/modules/FeatureRequests.js +28 -0
- package/dist/modules/Luciq.d.ts +362 -0
- package/dist/modules/Luciq.js +797 -0
- package/dist/modules/NetworkLogger.d.ts +52 -0
- package/dist/modules/NetworkLogger.js +208 -0
- package/dist/modules/Replies.d.ts +78 -0
- package/dist/modules/Replies.js +121 -0
- package/dist/modules/SessionReplay.d.ts +78 -0
- package/dist/modules/SessionReplay.js +98 -0
- package/dist/modules/Surveys.d.ts +75 -0
- package/dist/modules/Surveys.js +101 -0
- package/dist/native/NativeAPM.d.ts +18 -0
- package/dist/native/NativeAPM.js +4 -0
- package/dist/native/NativeBugReporting.d.ts +32 -0
- package/dist/native/NativeBugReporting.js +10 -0
- package/dist/native/NativeConstants.d.ts +182 -0
- package/dist/native/NativeConstants.js +1 -0
- package/dist/native/NativeCrashReporting.d.ts +18 -0
- package/dist/native/NativeCrashReporting.js +2 -0
- package/dist/native/NativeFeatureRequests.d.ts +8 -0
- package/dist/native/NativeFeatureRequests.js +2 -0
- package/dist/native/NativeLuciq.d.ts +86 -0
- package/dist/native/NativeLuciq.js +10 -0
- package/dist/native/NativeNetworkLogger.d.ts +21 -0
- package/dist/native/NativeNetworkLogger.js +14 -0
- package/dist/native/NativePackage.d.ts +21 -0
- package/dist/native/NativePackage.js +2 -0
- package/dist/native/NativeReplies.d.ts +21 -0
- package/dist/native/NativeReplies.js +8 -0
- package/dist/native/NativeSessionReplay.d.ts +16 -0
- package/dist/native/NativeSessionReplay.js +8 -0
- package/dist/native/NativeSurveys.d.ts +22 -0
- package/dist/native/NativeSurveys.js +9 -0
- package/dist/utils/AppStatesHandler.d.ts +3 -0
- package/dist/utils/AppStatesHandler.js +16 -0
- package/dist/utils/Enums.d.ts +244 -0
- package/dist/utils/Enums.js +266 -0
- package/dist/utils/FeatureFlags.d.ts +7 -0
- package/dist/utils/FeatureFlags.js +24 -0
- package/dist/utils/LuciqConstants.d.ts +14 -0
- package/dist/utils/LuciqConstants.js +15 -0
- package/dist/utils/LuciqUtils.d.ts +97 -0
- package/dist/utils/LuciqUtils.js +301 -0
- package/dist/utils/UnhandledRejectionTracking.d.ts +9 -0
- package/dist/utils/UnhandledRejectionTracking.js +99 -0
- package/dist/utils/XhrNetworkInterceptor.d.ts +39 -0
- package/dist/utils/XhrNetworkInterceptor.js +253 -0
- package/dist/utils/config.d.ts +5 -0
- package/dist/utils/config.js +6 -0
- package/dist/utils/logger.d.ts +10 -0
- package/dist/utils/logger.js +39 -0
- package/expo.d.ts +1 -0
- package/expo.js +1 -0
- package/ios/RNLuciq/ArgsRegistry.h +32 -0
- package/ios/RNLuciq/ArgsRegistry.m +276 -0
- package/ios/RNLuciq/LuciqAPMBridge.h +26 -0
- package/ios/RNLuciq/LuciqAPMBridge.m +99 -0
- package/ios/RNLuciq/LuciqBugReportingBridge.h +60 -0
- package/ios/RNLuciq/LuciqBugReportingBridge.m +241 -0
- package/ios/RNLuciq/LuciqCrashReportingBridge.h +18 -0
- package/ios/RNLuciq/LuciqCrashReportingBridge.m +68 -0
- package/ios/RNLuciq/LuciqFeatureRequestsBridge.h +30 -0
- package/ios/RNLuciq/LuciqFeatureRequestsBridge.m +61 -0
- package/ios/RNLuciq/LuciqNetworkLoggerBridge.h +44 -0
- package/ios/RNLuciq/LuciqNetworkLoggerBridge.m +206 -0
- package/ios/RNLuciq/LuciqReactBridge.h +151 -0
- package/ios/RNLuciq/LuciqReactBridge.m +548 -0
- package/ios/RNLuciq/LuciqRepliesBridge.h +40 -0
- package/ios/RNLuciq/LuciqRepliesBridge.m +80 -0
- package/ios/RNLuciq/LuciqSessionReplayBridge.h +32 -0
- package/ios/RNLuciq/LuciqSessionReplayBridge.m +107 -0
- package/ios/RNLuciq/LuciqSurveysBridge.h +46 -0
- package/ios/RNLuciq/LuciqSurveysBridge.m +107 -0
- package/ios/RNLuciq/RCTConvert+LuciqEnums.h +18 -0
- package/ios/RNLuciq/RCTConvert+LuciqEnums.m +127 -0
- package/ios/RNLuciq/RNLuciq.h +35 -0
- package/ios/RNLuciq/RNLuciq.m +107 -0
- package/ios/RNLuciq/Util/LCQAPM+PrivateAPIs.h +15 -0
- package/ios/RNLuciq/Util/LCQCrashReporting+CP.h +13 -0
- package/ios/RNLuciq/Util/LCQNetworkLogger+CP.h +68 -0
- package/ios/RNLuciq/Util/Luciq+CP.h +12 -0
- package/ios/RNLuciq.xcodeproj/project.pbxproj +352 -0
- package/ios/native.rb +12 -0
- package/ios/sourcemaps.sh +120 -0
- package/migrate.js +569 -0
- package/package.json +92 -0
- package/plugin/build/index.js +42078 -0
- package/plugin/src/index.ts +5 -0
- package/plugin/src/pluginProps.ts +6 -0
- package/plugin/src/withLuciq.ts +51 -0
- package/plugin/src/withLuciqAndroid.ts +99 -0
- package/plugin/src/withLuciqIOS.ts +109 -0
- package/plugin/tsconfig.json +7 -0
- package/react-native.config.js +16 -0
- package/scripts/customize-ios-endpoints.sh +28 -0
- package/scripts/dream-11-delete-unused-features.sh +62 -0
- package/scripts/find-token.js +58 -0
- package/scripts/find-token.sh +70 -0
- package/scripts/notify-github.sh +15 -0
- package/scripts/replace.js +58 -0
- package/scripts/snapshot-comment.md +15 -0
- package/scripts/snapshot-version.sh +11 -0
- package/src/index.ts +40 -0
- package/src/models/FeatureFlag.ts +12 -0
- package/src/models/LuciqConfig.ts +48 -0
- package/src/models/NonFatalOptions.ts +16 -0
- package/src/models/OverAirUpdate.ts +14 -0
- package/src/models/Report.ts +124 -0
- package/src/models/ReproConfig.ts +31 -0
- package/src/models/SessionMetadata.ts +57 -0
- package/src/models/ThemeConfig.ts +34 -0
- package/src/models/W3cExternalTraceAttributes.ts +22 -0
- package/src/modules/APM.ts +117 -0
- package/src/modules/BugReporting.ts +254 -0
- package/src/modules/CrashReporting.ts +54 -0
- package/src/modules/FeatureRequests.ts +32 -0
- package/src/modules/Luciq.ts +934 -0
- package/src/modules/NetworkLogger.ts +270 -0
- package/src/modules/Replies.ts +137 -0
- package/src/modules/SessionReplay.ts +111 -0
- package/src/modules/Surveys.ts +118 -0
- package/src/native/NativeAPM.ts +51 -0
- package/src/native/NativeBugReporting.ts +70 -0
- package/src/native/NativeConstants.ts +215 -0
- package/src/native/NativeCrashReporting.ts +29 -0
- package/src/native/NativeFeatureRequests.ts +12 -0
- package/src/native/NativeLuciq.ts +179 -0
- package/src/native/NativeNetworkLogger.ts +42 -0
- package/src/native/NativePackage.ts +25 -0
- package/src/native/NativeReplies.ts +34 -0
- package/src/native/NativeSessionReplay.ts +21 -0
- package/src/native/NativeSurveys.ts +34 -0
- package/src/promise.d.ts +11 -0
- package/src/utils/AppStatesHandler.ts +19 -0
- package/src/utils/Enums.ts +266 -0
- package/src/utils/FeatureFlags.ts +33 -0
- package/src/utils/LuciqConstants.ts +24 -0
- package/src/utils/LuciqUtils.ts +417 -0
- package/src/utils/UnhandledRejectionTracking.ts +118 -0
- package/src/utils/XhrNetworkInterceptor.ts +333 -0
- package/src/utils/config.ts +7 -0
- package/src/utils/logger.ts +54 -0
- package/tsconfig.json +32 -0
- package/tsconfig.test.json +4 -0
- package/tsconfig.upload.json +10 -0
- package/upload/index.d.ts +4 -0
- package/upload/index.js +17314 -0
- package/upload/migrate.d.ts +14 -0
- package/upload/package.json +5 -0
- package/upload/uploadEasUpdatesSourcemaps.d.ts +21 -0
- package/upload/uploadSoFiles.d.ts +21 -0
- package/upload/uploadSourcemaps.d.ts +21 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { Survey } from '../native/NativeSurveys';
|
|
2
|
+
export type { Survey };
|
|
3
|
+
/**
|
|
4
|
+
* Sets whether surveys are enabled or not.
|
|
5
|
+
* If you disable surveys on the SDK but still have active surveys on your Luciq dashboard,
|
|
6
|
+
* those surveys are still going to be sent to the device, but are not going to be
|
|
7
|
+
* shown automatically.
|
|
8
|
+
* To manually display any available surveys, call `Luciq.showSurveyIfAvailable()`.
|
|
9
|
+
* Defaults to `true`.
|
|
10
|
+
* @param isEnabled A boolean to set whether Luciq Surveys is enabled or disabled.
|
|
11
|
+
*/
|
|
12
|
+
export declare const setEnabled: (isEnabled: boolean) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Shows one of the surveys that were not shown before, that also have conditions
|
|
15
|
+
* that match the current device/user.
|
|
16
|
+
* Does nothing if there are no available surveys or if a survey has already been shown
|
|
17
|
+
* in the current session.
|
|
18
|
+
*/
|
|
19
|
+
export declare const showSurveyIfAvailable: () => void;
|
|
20
|
+
/**
|
|
21
|
+
* Returns an array containing the available surveys.
|
|
22
|
+
*/
|
|
23
|
+
export declare const getAvailableSurveys: () => Promise<Survey[] | null>;
|
|
24
|
+
/**
|
|
25
|
+
* Sets whether auto surveys showing are enabled or not.
|
|
26
|
+
* @param autoShowingSurveysEnabled A boolean to indicate whether the
|
|
27
|
+
* surveys auto showing are enabled or not.
|
|
28
|
+
*/
|
|
29
|
+
export declare const setAutoShowingEnabled: (autoShowingSurveysEnabled: boolean) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Sets a block of code to be executed just before the survey's UI is presented.
|
|
32
|
+
* This block is executed on the UI thread. Could be used for performing any UI changes before
|
|
33
|
+
* the survey's UI is shown.
|
|
34
|
+
* @param onShowHandler - A block of code that gets executed before
|
|
35
|
+
* presenting the survey's UI.
|
|
36
|
+
*/
|
|
37
|
+
export declare const setOnShowHandler: (onShowHandler: () => void) => void;
|
|
38
|
+
/**
|
|
39
|
+
* Sets a block of code to be executed right after the survey's UI is dismissed.
|
|
40
|
+
* This block is executed on the UI thread. Could be used for performing any UI
|
|
41
|
+
* changes after the survey's UI is dismissed.
|
|
42
|
+
* @param onDismissHandler - A block of code that gets executed after
|
|
43
|
+
* the survey's UI is dismissed.
|
|
44
|
+
*/
|
|
45
|
+
export declare const setOnDismissHandler: (onDismissHandler: () => void) => void;
|
|
46
|
+
/**
|
|
47
|
+
* Shows survey with a specific token.
|
|
48
|
+
* Does nothing if there are no available surveys with that specific token.
|
|
49
|
+
* Answered and cancelled surveys won't show up again.
|
|
50
|
+
* @param surveyToken - A String with a survey token.
|
|
51
|
+
*
|
|
52
|
+
*/
|
|
53
|
+
export declare const showSurvey: (surveyToken: string) => void;
|
|
54
|
+
/**
|
|
55
|
+
* Returns true if the survey with a specific token was answered before.
|
|
56
|
+
* Will return false if the token does not exist or if the survey was not answered before.
|
|
57
|
+
* @param surveyToken - A String with a survey token.
|
|
58
|
+
* the survey has been responded to or not.
|
|
59
|
+
*
|
|
60
|
+
*/
|
|
61
|
+
export declare const hasRespondedToSurvey: (surveyToken: string) => Promise<boolean | null>;
|
|
62
|
+
/**
|
|
63
|
+
* Setting an option for all the surveys to show a welcome screen before
|
|
64
|
+
* the user starts taking the survey.
|
|
65
|
+
* @param shouldShowWelcomeScreen A boolean for setting whether the
|
|
66
|
+
* welcome screen should show.
|
|
67
|
+
*/
|
|
68
|
+
export declare const setShouldShowWelcomeScreen: (shouldShowWelcomeScreen: boolean) => void;
|
|
69
|
+
/**
|
|
70
|
+
* iOS Only
|
|
71
|
+
* Sets url for the published iOS app on AppStore, You can redirect
|
|
72
|
+
* NPS Surveys or AppRating Surveys to AppStore to let users rate your app on AppStore itself.
|
|
73
|
+
* @param appStoreURL A String url for the published iOS app on AppStore
|
|
74
|
+
*/
|
|
75
|
+
export declare const setAppStoreURL: (appStoreURL: string) => void;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { Platform } from 'react-native';
|
|
2
|
+
import { NativeEvents, NativeSurveys, emitter } from '../native/NativeSurveys';
|
|
3
|
+
/**
|
|
4
|
+
* Sets whether surveys are enabled or not.
|
|
5
|
+
* If you disable surveys on the SDK but still have active surveys on your Luciq dashboard,
|
|
6
|
+
* those surveys are still going to be sent to the device, but are not going to be
|
|
7
|
+
* shown automatically.
|
|
8
|
+
* To manually display any available surveys, call `Luciq.showSurveyIfAvailable()`.
|
|
9
|
+
* Defaults to `true`.
|
|
10
|
+
* @param isEnabled A boolean to set whether Luciq Surveys is enabled or disabled.
|
|
11
|
+
*/
|
|
12
|
+
export const setEnabled = (isEnabled) => {
|
|
13
|
+
NativeSurveys.setEnabled(isEnabled);
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Shows one of the surveys that were not shown before, that also have conditions
|
|
17
|
+
* that match the current device/user.
|
|
18
|
+
* Does nothing if there are no available surveys or if a survey has already been shown
|
|
19
|
+
* in the current session.
|
|
20
|
+
*/
|
|
21
|
+
export const showSurveyIfAvailable = () => {
|
|
22
|
+
NativeSurveys.showSurveysIfAvailable();
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Returns an array containing the available surveys.
|
|
26
|
+
*/
|
|
27
|
+
export const getAvailableSurveys = async () => {
|
|
28
|
+
const surveys = await NativeSurveys.getAvailableSurveys();
|
|
29
|
+
return surveys;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Sets whether auto surveys showing are enabled or not.
|
|
33
|
+
* @param autoShowingSurveysEnabled A boolean to indicate whether the
|
|
34
|
+
* surveys auto showing are enabled or not.
|
|
35
|
+
*/
|
|
36
|
+
export const setAutoShowingEnabled = (autoShowingSurveysEnabled) => {
|
|
37
|
+
NativeSurveys.setAutoShowingEnabled(autoShowingSurveysEnabled);
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Sets a block of code to be executed just before the survey's UI is presented.
|
|
41
|
+
* This block is executed on the UI thread. Could be used for performing any UI changes before
|
|
42
|
+
* the survey's UI is shown.
|
|
43
|
+
* @param onShowHandler - A block of code that gets executed before
|
|
44
|
+
* presenting the survey's UI.
|
|
45
|
+
*/
|
|
46
|
+
export const setOnShowHandler = (onShowHandler) => {
|
|
47
|
+
emitter.addListener(NativeEvents.WILL_SHOW_SURVEY_HANDLER, onShowHandler);
|
|
48
|
+
NativeSurveys.setOnShowHandler(onShowHandler);
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Sets a block of code to be executed right after the survey's UI is dismissed.
|
|
52
|
+
* This block is executed on the UI thread. Could be used for performing any UI
|
|
53
|
+
* changes after the survey's UI is dismissed.
|
|
54
|
+
* @param onDismissHandler - A block of code that gets executed after
|
|
55
|
+
* the survey's UI is dismissed.
|
|
56
|
+
*/
|
|
57
|
+
export const setOnDismissHandler = (onDismissHandler) => {
|
|
58
|
+
emitter.addListener(NativeEvents.DID_DISMISS_SURVEY_HANDLER, onDismissHandler);
|
|
59
|
+
NativeSurveys.setOnDismissHandler(onDismissHandler);
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Shows survey with a specific token.
|
|
63
|
+
* Does nothing if there are no available surveys with that specific token.
|
|
64
|
+
* Answered and cancelled surveys won't show up again.
|
|
65
|
+
* @param surveyToken - A String with a survey token.
|
|
66
|
+
*
|
|
67
|
+
*/
|
|
68
|
+
export const showSurvey = (surveyToken) => {
|
|
69
|
+
NativeSurveys.showSurvey(surveyToken);
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Returns true if the survey with a specific token was answered before.
|
|
73
|
+
* Will return false if the token does not exist or if the survey was not answered before.
|
|
74
|
+
* @param surveyToken - A String with a survey token.
|
|
75
|
+
* the survey has been responded to or not.
|
|
76
|
+
*
|
|
77
|
+
*/
|
|
78
|
+
export const hasRespondedToSurvey = async (surveyToken) => {
|
|
79
|
+
const hasResponded = await NativeSurveys.hasRespondedToSurvey(surveyToken);
|
|
80
|
+
return hasResponded;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Setting an option for all the surveys to show a welcome screen before
|
|
84
|
+
* the user starts taking the survey.
|
|
85
|
+
* @param shouldShowWelcomeScreen A boolean for setting whether the
|
|
86
|
+
* welcome screen should show.
|
|
87
|
+
*/
|
|
88
|
+
export const setShouldShowWelcomeScreen = (shouldShowWelcomeScreen) => {
|
|
89
|
+
NativeSurveys.setShouldShowWelcomeScreen(shouldShowWelcomeScreen);
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* iOS Only
|
|
93
|
+
* Sets url for the published iOS app on AppStore, You can redirect
|
|
94
|
+
* NPS Surveys or AppRating Surveys to AppStore to let users rate your app on AppStore itself.
|
|
95
|
+
* @param appStoreURL A String url for the published iOS app on AppStore
|
|
96
|
+
*/
|
|
97
|
+
export const setAppStoreURL = (appStoreURL) => {
|
|
98
|
+
if (Platform.OS === 'ios') {
|
|
99
|
+
NativeSurveys.setAppStoreURL(appStoreURL);
|
|
100
|
+
}
|
|
101
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { NativeModule } from 'react-native';
|
|
2
|
+
import { NativeEventEmitter } from 'react-native';
|
|
3
|
+
import type { W3cExternalTraceAttributes } from '../models/W3cExternalTraceAttributes';
|
|
4
|
+
export interface ApmNativeModule extends NativeModule {
|
|
5
|
+
setEnabled(isEnabled: boolean): void;
|
|
6
|
+
networkLogAndroid(requestStartTime: number, requestDuration: number, requestHeaders: string, requestBody: string, requestBodySize: number, requestMethod: string, requestUrl: string, requestContentType: string, responseHeaders: string, responseBody: string | null, responseBodySize: number, statusCode: number, responseContentType: string, errorDomain: string, w3cExternalTraceAttributes: W3cExternalTraceAttributes, gqlQueryName?: string, serverErrorMessage?: string): void;
|
|
7
|
+
setAppLaunchEnabled(isEnabled: boolean): void;
|
|
8
|
+
endAppLaunch(): void;
|
|
9
|
+
startFlow(name: string): void;
|
|
10
|
+
endFlow(name: string): void;
|
|
11
|
+
setFlowAttribute(name: string, key: string, value?: string | null): void;
|
|
12
|
+
setAutoUITraceEnabled(isEnabled: boolean): void;
|
|
13
|
+
startUITrace(name: string): void;
|
|
14
|
+
endUITrace(): void;
|
|
15
|
+
lcqSleep(): void;
|
|
16
|
+
}
|
|
17
|
+
export declare const NativeAPM: ApmNativeModule;
|
|
18
|
+
export declare const emitter: NativeEventEmitter;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { NativeEventEmitter, NativeModule } from 'react-native';
|
|
2
|
+
import type { DismissType, ExtendedBugReportMode, FloatingButtonPosition, InvocationEvent, InvocationOption, RecordingButtonPosition, ReportType, userConsentActionType } from '../utils/Enums';
|
|
3
|
+
export interface BugReportingNativeModule extends NativeModule {
|
|
4
|
+
setEnabled(isEnabled: boolean): void;
|
|
5
|
+
show(type: ReportType, options: InvocationOption[]): void;
|
|
6
|
+
setInvocationEvents(events: InvocationEvent[]): void;
|
|
7
|
+
setOptions(options: InvocationOption[]): void;
|
|
8
|
+
setExtendedBugReportMode(mode: ExtendedBugReportMode): void;
|
|
9
|
+
setReportTypes(types: ReportType[]): void;
|
|
10
|
+
setDisclaimerText(text: string): void;
|
|
11
|
+
setCommentMinimumCharacterCount(limit: number, reportTypes: ReportType[]): void;
|
|
12
|
+
setFloatingButtonEdge(edge: FloatingButtonPosition, offset: number): void;
|
|
13
|
+
setVideoRecordingFloatingButtonPosition(buttonPosition: RecordingButtonPosition): void;
|
|
14
|
+
setEnabledAttachmentTypes(screenshot: boolean, extraScreenshot: boolean, galleryImage: boolean, screenRecording: boolean): void;
|
|
15
|
+
setAutoScreenRecordingEnabled(isEnabled: boolean): void;
|
|
16
|
+
setAutoScreenRecordingDuration(maxDuration: number): void;
|
|
17
|
+
setViewHierarchyEnabled(isEnabled: boolean): void;
|
|
18
|
+
setShakingThresholdForiPhone(threshold: number): void;
|
|
19
|
+
setShakingThresholdForiPad(threshold: number): void;
|
|
20
|
+
setShakingThresholdForAndroid(threshold: number): void;
|
|
21
|
+
setOnInvokeHandler(handler: () => void): void;
|
|
22
|
+
setDidSelectPromptOptionHandler(handler: (promptOption: string) => void): void;
|
|
23
|
+
setOnSDKDismissedHandler(handler: (dismissType: DismissType, reportType: ReportType) => void): void;
|
|
24
|
+
addUserConsent(key: string, description: string, mandatory: boolean, checked: boolean, actionType?: userConsentActionType): void;
|
|
25
|
+
}
|
|
26
|
+
export declare const NativeBugReporting: BugReportingNativeModule;
|
|
27
|
+
export declare enum NativeEvents {
|
|
28
|
+
ON_INVOKE_HANDLER = "LCQpreInvocationHandler",
|
|
29
|
+
ON_DISMISS_HANDLER = "LCQpostInvocationHandler",
|
|
30
|
+
DID_SELECT_PROMPT_OPTION_HANDLER = "LCQDidSelectPromptOptionHandler"
|
|
31
|
+
}
|
|
32
|
+
export declare const emitter: NativeEventEmitter;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NativeEventEmitter } from 'react-native';
|
|
2
|
+
import { NativeModules } from './NativePackage';
|
|
3
|
+
export const NativeBugReporting = NativeModules.LCQBugReporting;
|
|
4
|
+
export var NativeEvents;
|
|
5
|
+
(function (NativeEvents) {
|
|
6
|
+
NativeEvents["ON_INVOKE_HANDLER"] = "LCQpreInvocationHandler";
|
|
7
|
+
NativeEvents["ON_DISMISS_HANDLER"] = "LCQpostInvocationHandler";
|
|
8
|
+
NativeEvents["DID_SELECT_PROMPT_OPTION_HANDLER"] = "LCQDidSelectPromptOptionHandler";
|
|
9
|
+
})(NativeEvents || (NativeEvents = {}));
|
|
10
|
+
export const emitter = new NativeEventEmitter(NativeBugReporting);
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
export type NativeConstants = NativeSdkDebugLogsLevel & NativeInvocationEvent & NativeInvocationOption & NativeColorTheme & NativeFloatingButtonPosition & NativeRecordingButtonPosition & NativeWelcomeMessageMode & NativeReportType & NativeDismissType & NativeActionType & NativeExtendedBugReportMode & NativeReproStepsMode & NativeLocale & NativeNonFatalErrorLevel & NativeStringKey & NativeLaunchType & NativeOverAirUpdateServices & NativeAutoMaskingType & NativeUserConsentActionType;
|
|
2
|
+
interface NativeSdkDebugLogsLevel {
|
|
3
|
+
sdkDebugLogsLevelVerbose: any;
|
|
4
|
+
sdkDebugLogsLevelDebug: any;
|
|
5
|
+
sdkDebugLogsLevelError: any;
|
|
6
|
+
sdkDebugLogsLevelNone: any;
|
|
7
|
+
}
|
|
8
|
+
interface NativeUserConsentActionType {
|
|
9
|
+
dropAutoCapturedMedia: any;
|
|
10
|
+
dropLogs: any;
|
|
11
|
+
noChat: any;
|
|
12
|
+
}
|
|
13
|
+
interface NativeInvocationEvent {
|
|
14
|
+
invocationEventNone: any;
|
|
15
|
+
invocationEventShake: any;
|
|
16
|
+
invocationEventScreenshot: any;
|
|
17
|
+
invocationEventTwoFingersSwipeLeft: any;
|
|
18
|
+
invocationEventFloatingButton: any;
|
|
19
|
+
}
|
|
20
|
+
interface NativeInvocationOption {
|
|
21
|
+
optionEmailFieldHidden: any;
|
|
22
|
+
optionEmailFieldOptional: any;
|
|
23
|
+
optionCommentFieldRequired: any;
|
|
24
|
+
optionDisablePostSendingDialog: any;
|
|
25
|
+
}
|
|
26
|
+
interface NativeColorTheme {
|
|
27
|
+
colorThemeLight: any;
|
|
28
|
+
colorThemeDark: any;
|
|
29
|
+
}
|
|
30
|
+
interface NativeFloatingButtonPosition {
|
|
31
|
+
rectMinXEdge: any;
|
|
32
|
+
rectMaxXEdge: any;
|
|
33
|
+
}
|
|
34
|
+
interface NativeRecordingButtonPosition {
|
|
35
|
+
bottomRight: any;
|
|
36
|
+
topRight: any;
|
|
37
|
+
bottomLeft: any;
|
|
38
|
+
topLeft: any;
|
|
39
|
+
}
|
|
40
|
+
interface NativeWelcomeMessageMode {
|
|
41
|
+
welcomeMessageModeLive: any;
|
|
42
|
+
welcomeMessageModeBeta: any;
|
|
43
|
+
welcomeMessageModeDisabled: any;
|
|
44
|
+
}
|
|
45
|
+
interface NativeReportType {
|
|
46
|
+
bugReportingReportTypeBug: any;
|
|
47
|
+
bugReportingReportTypeFeedback: any;
|
|
48
|
+
bugReportingReportTypeQuestion: any;
|
|
49
|
+
}
|
|
50
|
+
interface NativeDismissType {
|
|
51
|
+
dismissTypeSubmit: any;
|
|
52
|
+
dismissTypeCancel: any;
|
|
53
|
+
dismissTypeAddAttachment: any;
|
|
54
|
+
}
|
|
55
|
+
interface NativeActionType {
|
|
56
|
+
allActions: any;
|
|
57
|
+
reportBugAction: any;
|
|
58
|
+
requestNewFeature: any;
|
|
59
|
+
addCommentToFeature: any;
|
|
60
|
+
}
|
|
61
|
+
interface NativeExtendedBugReportMode {
|
|
62
|
+
enabledWithRequiredFields: any;
|
|
63
|
+
enabledWithOptionalFields: any;
|
|
64
|
+
disabled: any;
|
|
65
|
+
}
|
|
66
|
+
interface NativeReproStepsMode {
|
|
67
|
+
reproStepsEnabledWithNoScreenshots: any;
|
|
68
|
+
reproStepsEnabled: any;
|
|
69
|
+
reproStepsDisabled: any;
|
|
70
|
+
}
|
|
71
|
+
interface NativeNonFatalErrorLevel {
|
|
72
|
+
nonFatalErrorLevelInfo: any;
|
|
73
|
+
nonFatalErrorLevelError: any;
|
|
74
|
+
nonFatalErrorLevelWarning: any;
|
|
75
|
+
nonFatalErrorLevelCritical: any;
|
|
76
|
+
}
|
|
77
|
+
interface NativeLocale {
|
|
78
|
+
localeArabic: any;
|
|
79
|
+
localeAzerbaijani: any;
|
|
80
|
+
localeChineseSimplified: any;
|
|
81
|
+
localeChineseTraditional: any;
|
|
82
|
+
localeCzech: any;
|
|
83
|
+
localeDanish: any;
|
|
84
|
+
localeDutch: any;
|
|
85
|
+
localeEnglish: any;
|
|
86
|
+
localeFrench: any;
|
|
87
|
+
localeGerman: any;
|
|
88
|
+
localeItalian: any;
|
|
89
|
+
localeJapanese: any;
|
|
90
|
+
localeKorean: any;
|
|
91
|
+
localePolish: any;
|
|
92
|
+
localePortugueseBrazil: any;
|
|
93
|
+
localeRomanian: any;
|
|
94
|
+
localeRussian: any;
|
|
95
|
+
localeSpanish: any;
|
|
96
|
+
localeSwedish: any;
|
|
97
|
+
localeTurkish: any;
|
|
98
|
+
}
|
|
99
|
+
interface NativeStringKey {
|
|
100
|
+
addAttachmentButtonTitleStringName: any;
|
|
101
|
+
addExtraScreenshot: any;
|
|
102
|
+
addImageFromGallery: any;
|
|
103
|
+
addVideoMessage: any;
|
|
104
|
+
addVoiceMessage: any;
|
|
105
|
+
audio: any;
|
|
106
|
+
audioRecordingPermissionDeniedMessage: any;
|
|
107
|
+
audioRecordingPermissionDeniedTitle: any;
|
|
108
|
+
cancelButtonTitle: any;
|
|
109
|
+
collectingDataText: any;
|
|
110
|
+
commentFieldHintForBugReport: any;
|
|
111
|
+
commentFieldHintForFeedback: any;
|
|
112
|
+
commentFieldHintForQuestion: any;
|
|
113
|
+
conversationsHeaderTitle: any;
|
|
114
|
+
conversationTextFieldHint: any;
|
|
115
|
+
discardAlertStay: any;
|
|
116
|
+
discardAlertDiscard: any;
|
|
117
|
+
discardAlertMessage: any;
|
|
118
|
+
discardAlertTitle: any;
|
|
119
|
+
edgeSwipeStartHint: any;
|
|
120
|
+
emailFieldHint: any;
|
|
121
|
+
image: any;
|
|
122
|
+
insufficientContentMessage: any;
|
|
123
|
+
insufficientContentTitle: any;
|
|
124
|
+
invalidEmailMessage: any;
|
|
125
|
+
invalidEmailTitle: any;
|
|
126
|
+
invocationHeader: any;
|
|
127
|
+
messagesNotification: any;
|
|
128
|
+
messagesNotificationAndOthers: any;
|
|
129
|
+
microphonePermissionAlertSettingsButtonTitle: any;
|
|
130
|
+
okButtonTitle: any;
|
|
131
|
+
recordingMessageToHoldText: any;
|
|
132
|
+
recordingMessageToReleaseText: any;
|
|
133
|
+
reportBug: any;
|
|
134
|
+
reportBugDescription: any;
|
|
135
|
+
reportFeedback: any;
|
|
136
|
+
reportFeedbackDescription: any;
|
|
137
|
+
reportQuestion: any;
|
|
138
|
+
reportQuestionDescription: any;
|
|
139
|
+
reportReproStepsDisclaimerBody: any;
|
|
140
|
+
reportReproStepsDisclaimerLink: any;
|
|
141
|
+
reproStepsListDescription: any;
|
|
142
|
+
reproStepsListEmptyStateDescription: any;
|
|
143
|
+
reproStepsListHeader: any;
|
|
144
|
+
reproStepsListItemNumberingTitle: any;
|
|
145
|
+
reproStepsProgressDialogBody: any;
|
|
146
|
+
requestFeatureDescription: any;
|
|
147
|
+
screenRecording: any;
|
|
148
|
+
screenshotHeaderTitle: any;
|
|
149
|
+
shakeHint: any;
|
|
150
|
+
startAlertText: any;
|
|
151
|
+
surveysStoreRatingThanksSubtitle: any;
|
|
152
|
+
surveysStoreRatingThanksTitle: any;
|
|
153
|
+
swipeHint: any;
|
|
154
|
+
team: any;
|
|
155
|
+
thankYouAlertText: any;
|
|
156
|
+
thankYouText: any;
|
|
157
|
+
videoPressRecord: any;
|
|
158
|
+
welcomeMessageBetaFinishStepContent: any;
|
|
159
|
+
welcomeMessageBetaFinishStepTitle: any;
|
|
160
|
+
welcomeMessageBetaHowToReportStepContent: any;
|
|
161
|
+
welcomeMessageBetaHowToReportStepTitle: any;
|
|
162
|
+
welcomeMessageBetaWelcomeStepContent: any;
|
|
163
|
+
welcomeMessageBetaWelcomeStepTitle: any;
|
|
164
|
+
welcomeMessageLiveWelcomeStepContent: any;
|
|
165
|
+
welcomeMessageLiveWelcomeStepTitle: any;
|
|
166
|
+
}
|
|
167
|
+
interface NativeLaunchType {
|
|
168
|
+
cold: any;
|
|
169
|
+
warm: any;
|
|
170
|
+
unknown: any;
|
|
171
|
+
}
|
|
172
|
+
interface NativeOverAirUpdateServices {
|
|
173
|
+
expo: any;
|
|
174
|
+
codePush: any;
|
|
175
|
+
}
|
|
176
|
+
interface NativeAutoMaskingType {
|
|
177
|
+
labels: any;
|
|
178
|
+
textInputs: any;
|
|
179
|
+
media: any;
|
|
180
|
+
none: any;
|
|
181
|
+
}
|
|
182
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { NativeModule, Platform } from 'react-native';
|
|
2
|
+
import type { StackFrame } from 'react-native/Libraries/Core/Devtools/parseErrorStack';
|
|
3
|
+
import type { NonFatalErrorLevel } from '../utils/Enums';
|
|
4
|
+
export interface CrashData {
|
|
5
|
+
message: string;
|
|
6
|
+
e_message: string;
|
|
7
|
+
e_name: string;
|
|
8
|
+
os: (typeof Platform)['OS'];
|
|
9
|
+
platform: 'react_native';
|
|
10
|
+
exception: StackFrame[];
|
|
11
|
+
}
|
|
12
|
+
export interface CrashReportingNativeModule extends NativeModule {
|
|
13
|
+
setEnabled(isEnabled: boolean): void;
|
|
14
|
+
sendJSCrash(data: CrashData | string): Promise<void>;
|
|
15
|
+
sendHandledJSCrash(data: CrashData | string, userAttributes?: Record<string, string> | null, fingerprint?: string | null, nonFatalExceptionLevel?: NonFatalErrorLevel | null): Promise<void>;
|
|
16
|
+
setNDKCrashesEnabled(isEnabled: boolean): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
export declare const NativeCrashReporting: CrashReportingNativeModule;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { NativeModule } from 'react-native';
|
|
2
|
+
import type { ActionType } from '../utils/Enums';
|
|
3
|
+
export interface FeatureRequestsNativeModule extends NativeModule {
|
|
4
|
+
setEnabled(isEnabled: boolean): void;
|
|
5
|
+
show(): void;
|
|
6
|
+
setEmailFieldRequiredForFeatureRequests(isEmailFieldRequired: boolean, types: ActionType[]): void;
|
|
7
|
+
}
|
|
8
|
+
export declare const NativeFeatureRequests: FeatureRequestsNativeModule;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { NativeEventEmitter, NativeModule, ProcessedColorValue } from 'react-native';
|
|
2
|
+
import type Report from '../models/Report';
|
|
3
|
+
import type { AutoMaskingType, ColorTheme, InvocationEvent, Locale, LogLevel, ReproStepsMode, StringKey, WelcomeMessageMode } from '../utils/Enums';
|
|
4
|
+
import type { NativeConstants } from './NativeConstants';
|
|
5
|
+
import type { W3cExternalTraceAttributes } from '../models/W3cExternalTraceAttributes';
|
|
6
|
+
import type { OverAirUpdate } from '../models/OverAirUpdate';
|
|
7
|
+
import type { ThemeConfig } from '../models/ThemeConfig';
|
|
8
|
+
export interface LuciqNativeModule extends NativeModule {
|
|
9
|
+
getConstants(): NativeConstants;
|
|
10
|
+
setEnabled(isEnabled: boolean): void;
|
|
11
|
+
init(token: string, invocationEvents: InvocationEvent[], debugLogsLevel: LogLevel, useNativeNetworkInterception: boolean, codePushVersion?: string, appVariant?: string, options?: {
|
|
12
|
+
ignoreAndroidSecureFlag?: boolean;
|
|
13
|
+
}, overAirVersion?: OverAirUpdate): void;
|
|
14
|
+
show(): void;
|
|
15
|
+
setCodePushVersion(version: string): void;
|
|
16
|
+
setOverAirVersion(OTAserviceVersion: OverAirUpdate): void;
|
|
17
|
+
setAppVariant(appVariant: string): void;
|
|
18
|
+
setLCQLogPrintsToConsole(printsToConsole: boolean): void;
|
|
19
|
+
setSessionProfilerEnabled(isEnabled: boolean): void;
|
|
20
|
+
setLocale(sdkLocale: Locale): void;
|
|
21
|
+
setColorTheme(sdkTheme: ColorTheme): void;
|
|
22
|
+
setPrimaryColor(color: ProcessedColorValue | null | undefined): void;
|
|
23
|
+
setString(string: string, key: StringKey): void;
|
|
24
|
+
networkLogAndroid(url: string, requestBody: string, responseBody: string | null, method: string, responseCode: number, requestHeaders: string, responseHeaders: string, duration: number): void;
|
|
25
|
+
networkLogIOS(url: string, method: string, requestBody: string | null, requestBodySize: number, responseBody: string | null, responseBodySize: number, responseCode: number, requestHeaders: Record<string, string>, responseHeaders: Record<string, string>, contentType: string, errorDomain: string, errorCode: number, startTime: number, duration: number, gqlQueryName: string | undefined, serverErrorMessage: string | undefined, W3cExternalTraceAttributes: W3cExternalTraceAttributes): void;
|
|
26
|
+
setNetworkLoggingEnabled(isEnabled: boolean): void;
|
|
27
|
+
setNetworkLogBodyEnabled(isEnabled: boolean): void;
|
|
28
|
+
setReproStepsConfig(bugMode: ReproStepsMode, crashMode: ReproStepsMode, sessionReplay: ReproStepsMode): void;
|
|
29
|
+
setTrackUserSteps(isEnabled: boolean): void;
|
|
30
|
+
reportScreenChange(firstScreen: string): void;
|
|
31
|
+
reportCurrentViewChange(screenName: string): void;
|
|
32
|
+
addPrivateView(nativeTag: number | null): void;
|
|
33
|
+
removePrivateView(nativeTag: number | null): void;
|
|
34
|
+
logVerbose(message: string): void;
|
|
35
|
+
logInfo(message: string): void;
|
|
36
|
+
logDebug(message: string): void;
|
|
37
|
+
logError(message: string): void;
|
|
38
|
+
logWarn(message: string): void;
|
|
39
|
+
clearLogs(): void;
|
|
40
|
+
identifyUser(email: string, name: string, id?: string): void;
|
|
41
|
+
logOut(): void;
|
|
42
|
+
logUserEvent(name: string): void;
|
|
43
|
+
setUserData(data: string): void;
|
|
44
|
+
setUserAttribute(key: string, value: string): void;
|
|
45
|
+
getUserAttribute(key: string): Promise<string>;
|
|
46
|
+
removeUserAttribute(key: string): void;
|
|
47
|
+
getAllUserAttributes(): Promise<Record<string, string>>;
|
|
48
|
+
clearAllUserAttributes(): void;
|
|
49
|
+
showWelcomeMessageWithMode(mode: WelcomeMessageMode): void;
|
|
50
|
+
setWelcomeMessageMode(mode: WelcomeMessageMode): void;
|
|
51
|
+
appendTags(tags: string[]): void;
|
|
52
|
+
resetTags(): void;
|
|
53
|
+
getTags(): Promise<string[]>;
|
|
54
|
+
addFeatureFlags(featureFlags: Record<string, string | undefined>): void;
|
|
55
|
+
removeFeatureFlags(featureFlags: string[]): void;
|
|
56
|
+
removeAllFeatureFlags(): void;
|
|
57
|
+
setFileAttachment(filePath: string, fileName?: string): void;
|
|
58
|
+
setPreSendingHandler(handler?: (report: Report) => void): void;
|
|
59
|
+
appendTagToReport(tag: string): void;
|
|
60
|
+
appendConsoleLogToReport(consoleLog: string): void;
|
|
61
|
+
setUserAttributeToReport(key: string, value: string): void;
|
|
62
|
+
logDebugToReport(log: string): void;
|
|
63
|
+
logVerboseToReport(log: string): void;
|
|
64
|
+
logWarnToReport(log: string): void;
|
|
65
|
+
logErrorToReport(log: string): void;
|
|
66
|
+
logInfoToReport(log: string): void;
|
|
67
|
+
addFileAttachmentWithURLToReport(url: string, filename?: string): void;
|
|
68
|
+
addFileAttachmentWithDataToReport(data: string, filename?: string): void;
|
|
69
|
+
willRedirectToStore(): void;
|
|
70
|
+
isW3ExternalTraceIDEnabled(): Promise<boolean>;
|
|
71
|
+
isW3ExternalGeneratedHeaderEnabled(): Promise<boolean>;
|
|
72
|
+
isW3CaughtHeaderEnabled(): Promise<boolean>;
|
|
73
|
+
registerFeatureFlagsChangeListener(): void;
|
|
74
|
+
setOnFeaturesUpdatedListener(handler?: (params: any) => void): void;
|
|
75
|
+
enableAutoMasking(autoMaskingTypes: AutoMaskingType[]): void;
|
|
76
|
+
getNetworkBodyMaxSize(): Promise<number>;
|
|
77
|
+
setTheme(theme: ThemeConfig): void;
|
|
78
|
+
setFullscreen(isEnabled: boolean): void;
|
|
79
|
+
}
|
|
80
|
+
export declare const NativeLuciq: LuciqNativeModule;
|
|
81
|
+
export declare enum NativeEvents {
|
|
82
|
+
PRESENDING_HANDLER = "LCQpreSendingHandler",
|
|
83
|
+
LCQ_ON_FEATURES_UPDATED_CALLBACK = "LCQOnFeatureUpdatedCallback",
|
|
84
|
+
ON_FEATURE_FLAGS_CHANGE = "LCQOnNewFeatureFlagsUpdateReceivedCallback"
|
|
85
|
+
}
|
|
86
|
+
export declare const emitter: NativeEventEmitter;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NativeEventEmitter } from 'react-native';
|
|
2
|
+
import { NativeModules } from './NativePackage';
|
|
3
|
+
export const NativeLuciq = NativeModules.Luciq;
|
|
4
|
+
export var NativeEvents;
|
|
5
|
+
(function (NativeEvents) {
|
|
6
|
+
NativeEvents["PRESENDING_HANDLER"] = "LCQpreSendingHandler";
|
|
7
|
+
NativeEvents["LCQ_ON_FEATURES_UPDATED_CALLBACK"] = "LCQOnFeatureUpdatedCallback";
|
|
8
|
+
NativeEvents["ON_FEATURE_FLAGS_CHANGE"] = "LCQOnNewFeatureFlagsUpdateReceivedCallback";
|
|
9
|
+
})(NativeEvents || (NativeEvents = {}));
|
|
10
|
+
export const emitter = new NativeEventEmitter(NativeLuciq);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { NativeEventEmitter, type NativeModule } from 'react-native';
|
|
2
|
+
export declare enum NetworkListenerType {
|
|
3
|
+
filtering = "filtering",
|
|
4
|
+
obfuscation = "obfuscation",
|
|
5
|
+
both = "both"
|
|
6
|
+
}
|
|
7
|
+
export interface NetworkLoggerNativeModule extends NativeModule {
|
|
8
|
+
isNativeInterceptionEnabled(): boolean;
|
|
9
|
+
registerNetworkLogsListener(type?: NetworkListenerType): void;
|
|
10
|
+
updateNetworkLogSnapshot(url: string, callbackID: string, requestBody: string | null, responseBody: string | null, responseCode: number, requestHeaders: Record<string, string>, responseHeaders: Record<string, string>): void;
|
|
11
|
+
hasAPMNetworkPlugin(): Promise<boolean>;
|
|
12
|
+
resetNetworkLogsListener(): void;
|
|
13
|
+
setNetworkLoggingRequestFilterPredicateIOS(id: string, value: boolean): void;
|
|
14
|
+
forceStartNetworkLoggingIOS(): void;
|
|
15
|
+
forceStopNetworkLoggingIOS(): void;
|
|
16
|
+
}
|
|
17
|
+
export declare const NativeNetworkLogger: NetworkLoggerNativeModule;
|
|
18
|
+
export declare enum NativeNetworkLoggerEvent {
|
|
19
|
+
NETWORK_LOGGER_HANDLER = "LCQNetworkLoggerHandler"
|
|
20
|
+
}
|
|
21
|
+
export declare const NetworkLoggerEmitter: NativeEventEmitter;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NativeModules } from './NativePackage';
|
|
2
|
+
import { NativeEventEmitter } from 'react-native';
|
|
3
|
+
export var NetworkListenerType;
|
|
4
|
+
(function (NetworkListenerType) {
|
|
5
|
+
NetworkListenerType["filtering"] = "filtering";
|
|
6
|
+
NetworkListenerType["obfuscation"] = "obfuscation";
|
|
7
|
+
NetworkListenerType["both"] = "both";
|
|
8
|
+
})(NetworkListenerType || (NetworkListenerType = {}));
|
|
9
|
+
export const NativeNetworkLogger = NativeModules.LCQNetworkLogger;
|
|
10
|
+
export var NativeNetworkLoggerEvent;
|
|
11
|
+
(function (NativeNetworkLoggerEvent) {
|
|
12
|
+
NativeNetworkLoggerEvent["NETWORK_LOGGER_HANDLER"] = "LCQNetworkLoggerHandler";
|
|
13
|
+
})(NativeNetworkLoggerEvent || (NativeNetworkLoggerEvent = {}));
|
|
14
|
+
export const NetworkLoggerEmitter = new NativeEventEmitter(NativeNetworkLogger);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ApmNativeModule } from './NativeAPM';
|
|
2
|
+
import type { BugReportingNativeModule } from './NativeBugReporting';
|
|
3
|
+
import type { CrashReportingNativeModule } from './NativeCrashReporting';
|
|
4
|
+
import type { FeatureRequestsNativeModule } from './NativeFeatureRequests';
|
|
5
|
+
import type { LuciqNativeModule } from './NativeLuciq';
|
|
6
|
+
import type { RepliesNativeModule } from './NativeReplies';
|
|
7
|
+
import type { SurveysNativeModule } from './NativeSurveys';
|
|
8
|
+
import type { SessionReplayNativeModule } from './NativeSessionReplay';
|
|
9
|
+
import type { NetworkLoggerNativeModule } from './NativeNetworkLogger';
|
|
10
|
+
export interface LuciqNativePackage {
|
|
11
|
+
LCQAPM: ApmNativeModule;
|
|
12
|
+
LCQBugReporting: BugReportingNativeModule;
|
|
13
|
+
LCQCrashReporting: CrashReportingNativeModule;
|
|
14
|
+
LCQFeatureRequests: FeatureRequestsNativeModule;
|
|
15
|
+
Luciq: LuciqNativeModule;
|
|
16
|
+
LCQReplies: RepliesNativeModule;
|
|
17
|
+
LCQSurveys: SurveysNativeModule;
|
|
18
|
+
LCQSessionReplay: SessionReplayNativeModule;
|
|
19
|
+
LCQNetworkLogger: NetworkLoggerNativeModule;
|
|
20
|
+
}
|
|
21
|
+
export declare const NativeModules: LuciqNativePackage;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { NativeEventEmitter, NativeModule } from 'react-native';
|
|
2
|
+
export interface RepliesNativeModule extends NativeModule {
|
|
3
|
+
setEnabled(isEnabled: boolean): void;
|
|
4
|
+
show(): void;
|
|
5
|
+
hasChats(): Promise<boolean>;
|
|
6
|
+
getUnreadRepliesCount(): Promise<number>;
|
|
7
|
+
setOnNewReplyReceivedHandler(handler: () => void): void;
|
|
8
|
+
setPushNotificationsEnabled(isEnabled: boolean): void;
|
|
9
|
+
setInAppNotificationEnabled(isEnabled: boolean): void;
|
|
10
|
+
setInAppNotificationSound(isEnabled: boolean): void;
|
|
11
|
+
setPushNotificationRegistrationToken(token: string): void;
|
|
12
|
+
showNotification(data: Record<string, string>): void;
|
|
13
|
+
setNotificationIcon(resourceId: number): void;
|
|
14
|
+
setPushNotificationChannelId(id: string): void;
|
|
15
|
+
setSystemReplyNotificationSoundEnabled(isEnabled: boolean): void;
|
|
16
|
+
}
|
|
17
|
+
export declare const NativeReplies: RepliesNativeModule;
|
|
18
|
+
export declare enum NativeEvents {
|
|
19
|
+
ON_REPLY_RECEIVED_HANDLER = "LCQOnNewReplyReceivedCallback"
|
|
20
|
+
}
|
|
21
|
+
export declare const emitter: NativeEventEmitter;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NativeEventEmitter } from 'react-native';
|
|
2
|
+
import { NativeModules } from './NativePackage';
|
|
3
|
+
export const NativeReplies = NativeModules.LCQReplies;
|
|
4
|
+
export var NativeEvents;
|
|
5
|
+
(function (NativeEvents) {
|
|
6
|
+
NativeEvents["ON_REPLY_RECEIVED_HANDLER"] = "LCQOnNewReplyReceivedCallback";
|
|
7
|
+
})(NativeEvents || (NativeEvents = {}));
|
|
8
|
+
export const emitter = new NativeEventEmitter(NativeReplies);
|