@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,70 @@
|
|
|
1
|
+
import { NativeEventEmitter, NativeModule } from 'react-native';
|
|
2
|
+
|
|
3
|
+
import type {
|
|
4
|
+
DismissType,
|
|
5
|
+
ExtendedBugReportMode,
|
|
6
|
+
FloatingButtonPosition,
|
|
7
|
+
InvocationEvent,
|
|
8
|
+
InvocationOption,
|
|
9
|
+
RecordingButtonPosition,
|
|
10
|
+
ReportType,
|
|
11
|
+
userConsentActionType,
|
|
12
|
+
} from '../utils/Enums';
|
|
13
|
+
import { NativeModules } from './NativePackage';
|
|
14
|
+
|
|
15
|
+
export interface BugReportingNativeModule extends NativeModule {
|
|
16
|
+
// Essential APIs //
|
|
17
|
+
setEnabled(isEnabled: boolean): void;
|
|
18
|
+
show(type: ReportType, options: InvocationOption[]): void;
|
|
19
|
+
|
|
20
|
+
// Customization APIs //
|
|
21
|
+
setInvocationEvents(events: InvocationEvent[]): void;
|
|
22
|
+
setOptions(options: InvocationOption[]): void;
|
|
23
|
+
setExtendedBugReportMode(mode: ExtendedBugReportMode): void;
|
|
24
|
+
setReportTypes(types: ReportType[]): void;
|
|
25
|
+
setDisclaimerText(text: string): void;
|
|
26
|
+
setCommentMinimumCharacterCount(limit: number, reportTypes: ReportType[]): void;
|
|
27
|
+
setFloatingButtonEdge(edge: FloatingButtonPosition, offset: number): void;
|
|
28
|
+
setVideoRecordingFloatingButtonPosition(buttonPosition: RecordingButtonPosition): void;
|
|
29
|
+
setEnabledAttachmentTypes(
|
|
30
|
+
screenshot: boolean,
|
|
31
|
+
extraScreenshot: boolean,
|
|
32
|
+
galleryImage: boolean,
|
|
33
|
+
screenRecording: boolean,
|
|
34
|
+
): void;
|
|
35
|
+
|
|
36
|
+
// Screen Recording APIs //
|
|
37
|
+
setAutoScreenRecordingEnabled(isEnabled: boolean): void;
|
|
38
|
+
setAutoScreenRecordingDuration(maxDuration: number): void;
|
|
39
|
+
setViewHierarchyEnabled(isEnabled: boolean): void;
|
|
40
|
+
|
|
41
|
+
// Shaking Threshold APIs //
|
|
42
|
+
setShakingThresholdForiPhone(threshold: number): void;
|
|
43
|
+
setShakingThresholdForiPad(threshold: number): void;
|
|
44
|
+
setShakingThresholdForAndroid(threshold: number): void;
|
|
45
|
+
|
|
46
|
+
// Callbacks //
|
|
47
|
+
setOnInvokeHandler(handler: () => void): void;
|
|
48
|
+
setDidSelectPromptOptionHandler(handler: (promptOption: string) => void): void;
|
|
49
|
+
setOnSDKDismissedHandler(
|
|
50
|
+
handler: (dismissType: DismissType, reportType: ReportType) => void,
|
|
51
|
+
): void;
|
|
52
|
+
|
|
53
|
+
addUserConsent(
|
|
54
|
+
key: string,
|
|
55
|
+
description: string,
|
|
56
|
+
mandatory: boolean,
|
|
57
|
+
checked: boolean,
|
|
58
|
+
actionType?: userConsentActionType,
|
|
59
|
+
): void;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export const NativeBugReporting = NativeModules.LCQBugReporting;
|
|
63
|
+
|
|
64
|
+
export enum NativeEvents {
|
|
65
|
+
ON_INVOKE_HANDLER = 'LCQpreInvocationHandler',
|
|
66
|
+
ON_DISMISS_HANDLER = 'LCQpostInvocationHandler',
|
|
67
|
+
DID_SELECT_PROMPT_OPTION_HANDLER = 'LCQDidSelectPromptOptionHandler',
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export const emitter = new NativeEventEmitter(NativeBugReporting);
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
export type NativeConstants = NativeSdkDebugLogsLevel &
|
|
2
|
+
NativeInvocationEvent &
|
|
3
|
+
NativeInvocationOption &
|
|
4
|
+
NativeColorTheme &
|
|
5
|
+
NativeFloatingButtonPosition &
|
|
6
|
+
NativeRecordingButtonPosition &
|
|
7
|
+
NativeWelcomeMessageMode &
|
|
8
|
+
NativeReportType &
|
|
9
|
+
NativeDismissType &
|
|
10
|
+
NativeActionType &
|
|
11
|
+
NativeExtendedBugReportMode &
|
|
12
|
+
NativeReproStepsMode &
|
|
13
|
+
NativeLocale &
|
|
14
|
+
NativeNonFatalErrorLevel &
|
|
15
|
+
NativeStringKey &
|
|
16
|
+
NativeLaunchType &
|
|
17
|
+
NativeOverAirUpdateServices &
|
|
18
|
+
NativeAutoMaskingType &
|
|
19
|
+
NativeUserConsentActionType;
|
|
20
|
+
|
|
21
|
+
interface NativeSdkDebugLogsLevel {
|
|
22
|
+
sdkDebugLogsLevelVerbose: any;
|
|
23
|
+
sdkDebugLogsLevelDebug: any;
|
|
24
|
+
sdkDebugLogsLevelError: any;
|
|
25
|
+
sdkDebugLogsLevelNone: any;
|
|
26
|
+
}
|
|
27
|
+
interface NativeUserConsentActionType {
|
|
28
|
+
dropAutoCapturedMedia: any;
|
|
29
|
+
dropLogs: any;
|
|
30
|
+
noChat: any;
|
|
31
|
+
}
|
|
32
|
+
interface NativeInvocationEvent {
|
|
33
|
+
invocationEventNone: any;
|
|
34
|
+
invocationEventShake: any;
|
|
35
|
+
invocationEventScreenshot: any;
|
|
36
|
+
invocationEventTwoFingersSwipeLeft: any;
|
|
37
|
+
invocationEventFloatingButton: any;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
interface NativeInvocationOption {
|
|
41
|
+
optionEmailFieldHidden: any;
|
|
42
|
+
optionEmailFieldOptional: any;
|
|
43
|
+
optionCommentFieldRequired: any;
|
|
44
|
+
optionDisablePostSendingDialog: any;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
interface NativeColorTheme {
|
|
48
|
+
colorThemeLight: any;
|
|
49
|
+
colorThemeDark: any;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
interface NativeFloatingButtonPosition {
|
|
53
|
+
rectMinXEdge: any;
|
|
54
|
+
rectMaxXEdge: any;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
interface NativeRecordingButtonPosition {
|
|
58
|
+
bottomRight: any;
|
|
59
|
+
topRight: any;
|
|
60
|
+
bottomLeft: any;
|
|
61
|
+
topLeft: any;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
interface NativeWelcomeMessageMode {
|
|
65
|
+
welcomeMessageModeLive: any;
|
|
66
|
+
welcomeMessageModeBeta: any;
|
|
67
|
+
welcomeMessageModeDisabled: any;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
interface NativeReportType {
|
|
71
|
+
bugReportingReportTypeBug: any;
|
|
72
|
+
bugReportingReportTypeFeedback: any;
|
|
73
|
+
bugReportingReportTypeQuestion: any;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
interface NativeDismissType {
|
|
77
|
+
dismissTypeSubmit: any;
|
|
78
|
+
dismissTypeCancel: any;
|
|
79
|
+
dismissTypeAddAttachment: any;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
interface NativeActionType {
|
|
83
|
+
allActions: any;
|
|
84
|
+
reportBugAction: any;
|
|
85
|
+
requestNewFeature: any;
|
|
86
|
+
addCommentToFeature: any;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
interface NativeExtendedBugReportMode {
|
|
90
|
+
enabledWithRequiredFields: any;
|
|
91
|
+
enabledWithOptionalFields: any;
|
|
92
|
+
disabled: any;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
interface NativeReproStepsMode {
|
|
96
|
+
reproStepsEnabledWithNoScreenshots: any;
|
|
97
|
+
reproStepsEnabled: any;
|
|
98
|
+
reproStepsDisabled: any;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
interface NativeNonFatalErrorLevel {
|
|
102
|
+
nonFatalErrorLevelInfo: any;
|
|
103
|
+
nonFatalErrorLevelError: any;
|
|
104
|
+
nonFatalErrorLevelWarning: any;
|
|
105
|
+
nonFatalErrorLevelCritical: any;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
interface NativeLocale {
|
|
109
|
+
localeArabic: any;
|
|
110
|
+
localeAzerbaijani: any;
|
|
111
|
+
localeChineseSimplified: any;
|
|
112
|
+
localeChineseTraditional: any;
|
|
113
|
+
localeCzech: any;
|
|
114
|
+
localeDanish: any;
|
|
115
|
+
localeDutch: any;
|
|
116
|
+
localeEnglish: any;
|
|
117
|
+
localeFrench: any;
|
|
118
|
+
localeGerman: any;
|
|
119
|
+
localeItalian: any;
|
|
120
|
+
localeJapanese: any;
|
|
121
|
+
localeKorean: any;
|
|
122
|
+
localePolish: any;
|
|
123
|
+
localePortugueseBrazil: any;
|
|
124
|
+
localeRomanian: any;
|
|
125
|
+
localeRussian: any;
|
|
126
|
+
localeSpanish: any;
|
|
127
|
+
localeSwedish: any;
|
|
128
|
+
localeTurkish: any;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
interface NativeStringKey {
|
|
132
|
+
addAttachmentButtonTitleStringName: any;
|
|
133
|
+
addExtraScreenshot: any;
|
|
134
|
+
addImageFromGallery: any;
|
|
135
|
+
addVideoMessage: any;
|
|
136
|
+
addVoiceMessage: any;
|
|
137
|
+
audio: any;
|
|
138
|
+
audioRecordingPermissionDeniedMessage: any;
|
|
139
|
+
audioRecordingPermissionDeniedTitle: any;
|
|
140
|
+
cancelButtonTitle: any;
|
|
141
|
+
collectingDataText: any;
|
|
142
|
+
commentFieldHintForBugReport: any;
|
|
143
|
+
commentFieldHintForFeedback: any;
|
|
144
|
+
commentFieldHintForQuestion: any;
|
|
145
|
+
conversationsHeaderTitle: any;
|
|
146
|
+
conversationTextFieldHint: any;
|
|
147
|
+
discardAlertStay: any;
|
|
148
|
+
discardAlertDiscard: any;
|
|
149
|
+
discardAlertMessage: any;
|
|
150
|
+
discardAlertTitle: any;
|
|
151
|
+
edgeSwipeStartHint: any;
|
|
152
|
+
emailFieldHint: any;
|
|
153
|
+
image: any;
|
|
154
|
+
insufficientContentMessage: any;
|
|
155
|
+
insufficientContentTitle: any;
|
|
156
|
+
invalidEmailMessage: any;
|
|
157
|
+
invalidEmailTitle: any;
|
|
158
|
+
invocationHeader: any;
|
|
159
|
+
messagesNotification: any;
|
|
160
|
+
messagesNotificationAndOthers: any;
|
|
161
|
+
microphonePermissionAlertSettingsButtonTitle: any;
|
|
162
|
+
okButtonTitle: any;
|
|
163
|
+
recordingMessageToHoldText: any;
|
|
164
|
+
recordingMessageToReleaseText: any;
|
|
165
|
+
reportBug: any;
|
|
166
|
+
reportBugDescription: any;
|
|
167
|
+
reportFeedback: any;
|
|
168
|
+
reportFeedbackDescription: any;
|
|
169
|
+
reportQuestion: any;
|
|
170
|
+
reportQuestionDescription: any;
|
|
171
|
+
reportReproStepsDisclaimerBody: any;
|
|
172
|
+
reportReproStepsDisclaimerLink: any;
|
|
173
|
+
reproStepsListDescription: any;
|
|
174
|
+
reproStepsListEmptyStateDescription: any;
|
|
175
|
+
reproStepsListHeader: any;
|
|
176
|
+
reproStepsListItemNumberingTitle: any;
|
|
177
|
+
reproStepsProgressDialogBody: any;
|
|
178
|
+
requestFeatureDescription: any;
|
|
179
|
+
screenRecording: any;
|
|
180
|
+
screenshotHeaderTitle: any;
|
|
181
|
+
shakeHint: any;
|
|
182
|
+
startAlertText: any;
|
|
183
|
+
surveysStoreRatingThanksSubtitle: any;
|
|
184
|
+
surveysStoreRatingThanksTitle: any;
|
|
185
|
+
swipeHint: any;
|
|
186
|
+
team: any;
|
|
187
|
+
thankYouAlertText: any;
|
|
188
|
+
thankYouText: any;
|
|
189
|
+
videoPressRecord: any;
|
|
190
|
+
welcomeMessageBetaFinishStepContent: any;
|
|
191
|
+
welcomeMessageBetaFinishStepTitle: any;
|
|
192
|
+
welcomeMessageBetaHowToReportStepContent: any;
|
|
193
|
+
welcomeMessageBetaHowToReportStepTitle: any;
|
|
194
|
+
welcomeMessageBetaWelcomeStepContent: any;
|
|
195
|
+
welcomeMessageBetaWelcomeStepTitle: any;
|
|
196
|
+
welcomeMessageLiveWelcomeStepContent: any;
|
|
197
|
+
welcomeMessageLiveWelcomeStepTitle: any;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
interface NativeLaunchType {
|
|
201
|
+
cold: any;
|
|
202
|
+
warm: any;
|
|
203
|
+
unknown: any;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
interface NativeOverAirUpdateServices {
|
|
207
|
+
expo: any;
|
|
208
|
+
codePush: any;
|
|
209
|
+
}
|
|
210
|
+
interface NativeAutoMaskingType {
|
|
211
|
+
labels: any;
|
|
212
|
+
textInputs: any;
|
|
213
|
+
media: any;
|
|
214
|
+
none: any;
|
|
215
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { NativeModule, Platform } from 'react-native';
|
|
2
|
+
import type { StackFrame } from 'react-native/Libraries/Core/Devtools/parseErrorStack';
|
|
3
|
+
|
|
4
|
+
import { NativeModules } from './NativePackage';
|
|
5
|
+
import type { NonFatalErrorLevel } from '../utils/Enums';
|
|
6
|
+
|
|
7
|
+
export interface CrashData {
|
|
8
|
+
message: string;
|
|
9
|
+
e_message: string;
|
|
10
|
+
e_name: string;
|
|
11
|
+
os: (typeof Platform)['OS'];
|
|
12
|
+
platform: 'react_native';
|
|
13
|
+
exception: StackFrame[];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface CrashReportingNativeModule extends NativeModule {
|
|
17
|
+
setEnabled(isEnabled: boolean): void;
|
|
18
|
+
sendJSCrash(data: CrashData | string): Promise<void>;
|
|
19
|
+
|
|
20
|
+
sendHandledJSCrash(
|
|
21
|
+
data: CrashData | string,
|
|
22
|
+
userAttributes?: Record<string, string> | null,
|
|
23
|
+
fingerprint?: string | null,
|
|
24
|
+
nonFatalExceptionLevel?: NonFatalErrorLevel | null,
|
|
25
|
+
): Promise<void>;
|
|
26
|
+
setNDKCrashesEnabled(isEnabled: boolean): Promise<void>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const NativeCrashReporting = NativeModules.LCQCrashReporting;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { NativeModule } from 'react-native';
|
|
2
|
+
|
|
3
|
+
import type { ActionType } from '../utils/Enums';
|
|
4
|
+
import { NativeModules } from './NativePackage';
|
|
5
|
+
|
|
6
|
+
export interface FeatureRequestsNativeModule extends NativeModule {
|
|
7
|
+
setEnabled(isEnabled: boolean): void;
|
|
8
|
+
show(): void;
|
|
9
|
+
setEmailFieldRequiredForFeatureRequests(isEmailFieldRequired: boolean, types: ActionType[]): void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const NativeFeatureRequests = NativeModules.LCQFeatureRequests;
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { NativeEventEmitter, NativeModule, ProcessedColorValue } from 'react-native';
|
|
2
|
+
|
|
3
|
+
import type Report from '../models/Report';
|
|
4
|
+
import type {
|
|
5
|
+
AutoMaskingType,
|
|
6
|
+
ColorTheme,
|
|
7
|
+
InvocationEvent,
|
|
8
|
+
Locale,
|
|
9
|
+
LogLevel,
|
|
10
|
+
ReproStepsMode,
|
|
11
|
+
StringKey,
|
|
12
|
+
WelcomeMessageMode,
|
|
13
|
+
} from '../utils/Enums';
|
|
14
|
+
import type { NativeConstants } from './NativeConstants';
|
|
15
|
+
import type { W3cExternalTraceAttributes } from '../models/W3cExternalTraceAttributes';
|
|
16
|
+
import { NativeModules } from './NativePackage';
|
|
17
|
+
import type { OverAirUpdate } from '../models/OverAirUpdate';
|
|
18
|
+
import type { ThemeConfig } from '../models/ThemeConfig';
|
|
19
|
+
|
|
20
|
+
export interface LuciqNativeModule extends NativeModule {
|
|
21
|
+
getConstants(): NativeConstants;
|
|
22
|
+
|
|
23
|
+
// Essential APIs //
|
|
24
|
+
setEnabled(isEnabled: boolean): void;
|
|
25
|
+
init(
|
|
26
|
+
token: string,
|
|
27
|
+
invocationEvents: InvocationEvent[],
|
|
28
|
+
debugLogsLevel: LogLevel,
|
|
29
|
+
useNativeNetworkInterception: boolean,
|
|
30
|
+
codePushVersion?: string,
|
|
31
|
+
appVariant?: string,
|
|
32
|
+
options?: {
|
|
33
|
+
ignoreAndroidSecureFlag?: boolean;
|
|
34
|
+
},
|
|
35
|
+
overAirVersion?: OverAirUpdate,
|
|
36
|
+
): void;
|
|
37
|
+
show(): void;
|
|
38
|
+
|
|
39
|
+
// Misc APIs //
|
|
40
|
+
setCodePushVersion(version: string): void;
|
|
41
|
+
setOverAirVersion(OTAserviceVersion: OverAirUpdate): void;
|
|
42
|
+
setAppVariant(appVariant: string): void;
|
|
43
|
+
setLCQLogPrintsToConsole(printsToConsole: boolean): void;
|
|
44
|
+
setSessionProfilerEnabled(isEnabled: boolean): void;
|
|
45
|
+
|
|
46
|
+
// Customization APIs //
|
|
47
|
+
setLocale(sdkLocale: Locale): void;
|
|
48
|
+
setColorTheme(sdkTheme: ColorTheme): void;
|
|
49
|
+
setPrimaryColor(color: ProcessedColorValue | null | undefined): void;
|
|
50
|
+
setString(string: string, key: StringKey): void;
|
|
51
|
+
|
|
52
|
+
// Network APIs //
|
|
53
|
+
networkLogAndroid(
|
|
54
|
+
url: string,
|
|
55
|
+
requestBody: string,
|
|
56
|
+
responseBody: string | null,
|
|
57
|
+
method: string,
|
|
58
|
+
responseCode: number,
|
|
59
|
+
requestHeaders: string,
|
|
60
|
+
responseHeaders: string,
|
|
61
|
+
duration: number,
|
|
62
|
+
): void;
|
|
63
|
+
|
|
64
|
+
networkLogIOS(
|
|
65
|
+
url: string,
|
|
66
|
+
method: string,
|
|
67
|
+
requestBody: string | null,
|
|
68
|
+
requestBodySize: number,
|
|
69
|
+
responseBody: string | null,
|
|
70
|
+
responseBodySize: number,
|
|
71
|
+
responseCode: number,
|
|
72
|
+
requestHeaders: Record<string, string>,
|
|
73
|
+
responseHeaders: Record<string, string>,
|
|
74
|
+
contentType: string,
|
|
75
|
+
errorDomain: string,
|
|
76
|
+
errorCode: number,
|
|
77
|
+
startTime: number,
|
|
78
|
+
duration: number,
|
|
79
|
+
gqlQueryName: string | undefined,
|
|
80
|
+
serverErrorMessage: string | undefined,
|
|
81
|
+
W3cExternalTraceAttributes: W3cExternalTraceAttributes,
|
|
82
|
+
): void;
|
|
83
|
+
|
|
84
|
+
setNetworkLoggingEnabled(isEnabled: boolean): void;
|
|
85
|
+
setNetworkLogBodyEnabled(isEnabled: boolean): void;
|
|
86
|
+
|
|
87
|
+
// Repro Steps APIs //
|
|
88
|
+
setReproStepsConfig(
|
|
89
|
+
bugMode: ReproStepsMode,
|
|
90
|
+
crashMode: ReproStepsMode,
|
|
91
|
+
sessionReplay: ReproStepsMode,
|
|
92
|
+
): void;
|
|
93
|
+
setTrackUserSteps(isEnabled: boolean): void;
|
|
94
|
+
reportScreenChange(firstScreen: string): void;
|
|
95
|
+
reportCurrentViewChange(screenName: string): void;
|
|
96
|
+
addPrivateView(nativeTag: number | null): void;
|
|
97
|
+
removePrivateView(nativeTag: number | null): void;
|
|
98
|
+
|
|
99
|
+
// Logging APIs //
|
|
100
|
+
logVerbose(message: string): void;
|
|
101
|
+
logInfo(message: string): void;
|
|
102
|
+
logDebug(message: string): void;
|
|
103
|
+
logError(message: string): void;
|
|
104
|
+
logWarn(message: string): void;
|
|
105
|
+
clearLogs(): void;
|
|
106
|
+
|
|
107
|
+
// User APIs //
|
|
108
|
+
identifyUser(email: string, name: string, id?: string): void;
|
|
109
|
+
logOut(): void;
|
|
110
|
+
logUserEvent(name: string): void;
|
|
111
|
+
setUserData(data: string): void;
|
|
112
|
+
|
|
113
|
+
// User Attributes APIs //
|
|
114
|
+
setUserAttribute(key: string, value: string): void;
|
|
115
|
+
getUserAttribute(key: string): Promise<string>;
|
|
116
|
+
removeUserAttribute(key: string): void;
|
|
117
|
+
getAllUserAttributes(): Promise<Record<string, string>>;
|
|
118
|
+
clearAllUserAttributes(): void;
|
|
119
|
+
|
|
120
|
+
// Welcome Message APIs //
|
|
121
|
+
showWelcomeMessageWithMode(mode: WelcomeMessageMode): void;
|
|
122
|
+
setWelcomeMessageMode(mode: WelcomeMessageMode): void;
|
|
123
|
+
|
|
124
|
+
// Tags APIs //
|
|
125
|
+
appendTags(tags: string[]): void;
|
|
126
|
+
resetTags(): void;
|
|
127
|
+
getTags(): Promise<string[]>;
|
|
128
|
+
|
|
129
|
+
// Experiments APIs //
|
|
130
|
+
addFeatureFlags(featureFlags: Record<string, string | undefined>): void;
|
|
131
|
+
|
|
132
|
+
removeFeatureFlags(featureFlags: string[]): void;
|
|
133
|
+
|
|
134
|
+
removeAllFeatureFlags(): void;
|
|
135
|
+
|
|
136
|
+
// Files APIs //
|
|
137
|
+
setFileAttachment(filePath: string, fileName?: string): void;
|
|
138
|
+
|
|
139
|
+
// Report APIs //
|
|
140
|
+
setPreSendingHandler(handler?: (report: Report) => void): void;
|
|
141
|
+
appendTagToReport(tag: string): void;
|
|
142
|
+
appendConsoleLogToReport(consoleLog: string): void;
|
|
143
|
+
setUserAttributeToReport(key: string, value: string): void;
|
|
144
|
+
logDebugToReport(log: string): void;
|
|
145
|
+
logVerboseToReport(log: string): void;
|
|
146
|
+
logWarnToReport(log: string): void;
|
|
147
|
+
logErrorToReport(log: string): void;
|
|
148
|
+
logInfoToReport(log: string): void;
|
|
149
|
+
addFileAttachmentWithURLToReport(url: string, filename?: string): void;
|
|
150
|
+
addFileAttachmentWithDataToReport(data: string, filename?: string): void;
|
|
151
|
+
willRedirectToStore(): void;
|
|
152
|
+
|
|
153
|
+
// W3C Feature Flags
|
|
154
|
+
isW3ExternalTraceIDEnabled(): Promise<boolean>;
|
|
155
|
+
|
|
156
|
+
isW3ExternalGeneratedHeaderEnabled(): Promise<boolean>;
|
|
157
|
+
|
|
158
|
+
isW3CaughtHeaderEnabled(): Promise<boolean>;
|
|
159
|
+
|
|
160
|
+
// Feature Flags Listener for Android
|
|
161
|
+
registerFeatureFlagsChangeListener(): void;
|
|
162
|
+
|
|
163
|
+
setOnFeaturesUpdatedListener(handler?: (params: any) => void): void; // android only
|
|
164
|
+
enableAutoMasking(autoMaskingTypes: AutoMaskingType[]): void;
|
|
165
|
+
getNetworkBodyMaxSize(): Promise<number>;
|
|
166
|
+
|
|
167
|
+
setTheme(theme: ThemeConfig): void;
|
|
168
|
+
setFullscreen(isEnabled: boolean): void;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export const NativeLuciq = NativeModules.Luciq as LuciqNativeModule;
|
|
172
|
+
|
|
173
|
+
export enum NativeEvents {
|
|
174
|
+
PRESENDING_HANDLER = 'LCQpreSendingHandler',
|
|
175
|
+
LCQ_ON_FEATURES_UPDATED_CALLBACK = 'LCQOnFeatureUpdatedCallback',
|
|
176
|
+
ON_FEATURE_FLAGS_CHANGE = 'LCQOnNewFeatureFlagsUpdateReceivedCallback',
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export const emitter = new NativeEventEmitter(NativeLuciq);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { NativeModules } from './NativePackage';
|
|
2
|
+
import { NativeEventEmitter, type NativeModule } from 'react-native';
|
|
3
|
+
|
|
4
|
+
export enum NetworkListenerType {
|
|
5
|
+
filtering = 'filtering',
|
|
6
|
+
obfuscation = 'obfuscation',
|
|
7
|
+
both = 'both',
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface NetworkLoggerNativeModule extends NativeModule {
|
|
11
|
+
isNativeInterceptionEnabled(): boolean;
|
|
12
|
+
|
|
13
|
+
registerNetworkLogsListener(type?: NetworkListenerType): void;
|
|
14
|
+
|
|
15
|
+
updateNetworkLogSnapshot(
|
|
16
|
+
url: string,
|
|
17
|
+
callbackID: string,
|
|
18
|
+
requestBody: string | null,
|
|
19
|
+
responseBody: string | null,
|
|
20
|
+
responseCode: number,
|
|
21
|
+
requestHeaders: Record<string, string>,
|
|
22
|
+
responseHeaders: Record<string, string>,
|
|
23
|
+
): void;
|
|
24
|
+
|
|
25
|
+
hasAPMNetworkPlugin(): Promise<boolean>; // Android only
|
|
26
|
+
|
|
27
|
+
resetNetworkLogsListener(): void; //Android only
|
|
28
|
+
|
|
29
|
+
setNetworkLoggingRequestFilterPredicateIOS(id: string, value: boolean): void; // iOS only
|
|
30
|
+
|
|
31
|
+
forceStartNetworkLoggingIOS(): void; // iOS only;
|
|
32
|
+
|
|
33
|
+
forceStopNetworkLoggingIOS(): void; // iOS only;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const NativeNetworkLogger = NativeModules.LCQNetworkLogger;
|
|
37
|
+
|
|
38
|
+
export enum NativeNetworkLoggerEvent {
|
|
39
|
+
NETWORK_LOGGER_HANDLER = 'LCQNetworkLoggerHandler',
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export const NetworkLoggerEmitter = new NativeEventEmitter(NativeNetworkLogger);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { NativeModules as ReactNativeModules } from 'react-native';
|
|
2
|
+
|
|
3
|
+
import type { ApmNativeModule } from './NativeAPM';
|
|
4
|
+
import type { BugReportingNativeModule } from './NativeBugReporting';
|
|
5
|
+
import type { CrashReportingNativeModule } from './NativeCrashReporting';
|
|
6
|
+
import type { FeatureRequestsNativeModule } from './NativeFeatureRequests';
|
|
7
|
+
import type { LuciqNativeModule } from './NativeLuciq';
|
|
8
|
+
import type { RepliesNativeModule } from './NativeReplies';
|
|
9
|
+
import type { SurveysNativeModule } from './NativeSurveys';
|
|
10
|
+
import type { SessionReplayNativeModule } from './NativeSessionReplay';
|
|
11
|
+
import type { NetworkLoggerNativeModule } from './NativeNetworkLogger';
|
|
12
|
+
|
|
13
|
+
export interface LuciqNativePackage {
|
|
14
|
+
LCQAPM: ApmNativeModule;
|
|
15
|
+
LCQBugReporting: BugReportingNativeModule;
|
|
16
|
+
LCQCrashReporting: CrashReportingNativeModule;
|
|
17
|
+
LCQFeatureRequests: FeatureRequestsNativeModule;
|
|
18
|
+
Luciq: LuciqNativeModule;
|
|
19
|
+
LCQReplies: RepliesNativeModule;
|
|
20
|
+
LCQSurveys: SurveysNativeModule;
|
|
21
|
+
LCQSessionReplay: SessionReplayNativeModule;
|
|
22
|
+
LCQNetworkLogger: NetworkLoggerNativeModule;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const NativeModules = ReactNativeModules as LuciqNativePackage;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { NativeEventEmitter, NativeModule } from 'react-native';
|
|
2
|
+
|
|
3
|
+
import { NativeModules } from './NativePackage';
|
|
4
|
+
|
|
5
|
+
export interface RepliesNativeModule extends NativeModule {
|
|
6
|
+
// Essential APIs //
|
|
7
|
+
setEnabled(isEnabled: boolean): void;
|
|
8
|
+
show(): void;
|
|
9
|
+
hasChats(): Promise<boolean>;
|
|
10
|
+
getUnreadRepliesCount(): Promise<number>;
|
|
11
|
+
|
|
12
|
+
// Callbacks //
|
|
13
|
+
setOnNewReplyReceivedHandler(handler: () => void): void;
|
|
14
|
+
|
|
15
|
+
// Notifications APIs //
|
|
16
|
+
setPushNotificationsEnabled(isEnabled: boolean): void;
|
|
17
|
+
setInAppNotificationEnabled(isEnabled: boolean): void;
|
|
18
|
+
|
|
19
|
+
// Android Notifications APIs //
|
|
20
|
+
setInAppNotificationSound(isEnabled: boolean): void;
|
|
21
|
+
setPushNotificationRegistrationToken(token: string): void;
|
|
22
|
+
showNotification(data: Record<string, string>): void;
|
|
23
|
+
setNotificationIcon(resourceId: number): void;
|
|
24
|
+
setPushNotificationChannelId(id: string): void;
|
|
25
|
+
setSystemReplyNotificationSoundEnabled(isEnabled: boolean): void;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const NativeReplies = NativeModules.LCQReplies;
|
|
29
|
+
|
|
30
|
+
export enum NativeEvents {
|
|
31
|
+
ON_REPLY_RECEIVED_HANDLER = 'LCQOnNewReplyReceivedCallback',
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const emitter = new NativeEventEmitter(NativeReplies);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { NativeEventEmitter } from 'react-native';
|
|
2
|
+
import type { NativeModule } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { NativeModules } from './NativePackage';
|
|
5
|
+
|
|
6
|
+
export interface SessionReplayNativeModule extends NativeModule {
|
|
7
|
+
setEnabled(isEnabled: boolean): void;
|
|
8
|
+
setNetworkLogsEnabled(isEnabled: boolean): void;
|
|
9
|
+
setLuciqLogsEnabled(isEnabled: boolean): void;
|
|
10
|
+
setUserStepsEnabled(isEnabled: boolean): void;
|
|
11
|
+
getSessionReplayLink(): Promise<string>;
|
|
12
|
+
setSyncCallback(): Promise<void>;
|
|
13
|
+
evaluateSync(shouldSync: boolean): void;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const NativeSessionReplay = NativeModules.LCQSessionReplay;
|
|
17
|
+
export enum NativeEvents {
|
|
18
|
+
SESSION_REPLAY_ON_SYNC_CALLBACK_INVOCATION = 'LCQSessionReplayOnSyncCallback',
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const emitter = new NativeEventEmitter(NativeSessionReplay);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { NativeEventEmitter, NativeModule } from 'react-native';
|
|
2
|
+
|
|
3
|
+
import { NativeModules } from './NativePackage';
|
|
4
|
+
|
|
5
|
+
export interface Survey {
|
|
6
|
+
title: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface SurveysNativeModule extends NativeModule {
|
|
10
|
+
// Essential APIs //
|
|
11
|
+
setEnabled(isEnabled: boolean): void;
|
|
12
|
+
setAutoShowingEnabled(autoShowingSurveysEnabled: boolean): void;
|
|
13
|
+
showSurvey(surveyToken: string): void;
|
|
14
|
+
showSurveysIfAvailable(): void;
|
|
15
|
+
getAvailableSurveys(): Promise<Survey[]>;
|
|
16
|
+
hasRespondedToSurvey(surveyToken: string): Promise<boolean>;
|
|
17
|
+
|
|
18
|
+
// Misc APIs //
|
|
19
|
+
setShouldShowWelcomeScreen(shouldShowWelcomeScreen: boolean): void;
|
|
20
|
+
setAppStoreURL(appStoreURL: string): void;
|
|
21
|
+
|
|
22
|
+
// Callbacks //
|
|
23
|
+
setOnShowHandler(onShowHandler: () => void): void;
|
|
24
|
+
setOnDismissHandler(onDismissHandler: () => void): void;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const NativeSurveys = NativeModules.LCQSurveys;
|
|
28
|
+
|
|
29
|
+
export enum NativeEvents {
|
|
30
|
+
WILL_SHOW_SURVEY_HANDLER = 'LCQWillShowSurvey',
|
|
31
|
+
DID_DISMISS_SURVEY_HANDLER = 'LCQDidDismissSurvey',
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const emitter = new NativeEventEmitter(NativeSurveys);
|
package/src/promise.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare module 'promise/setimmediate/rejection-tracking' {
|
|
2
|
+
export interface RejectionTrackingOptions {
|
|
3
|
+
allRejections?: boolean;
|
|
4
|
+
whitelist?: Function[];
|
|
5
|
+
onUnhandled?: (id: number, error: unknown) => void;
|
|
6
|
+
onHandled?: (id: number, error: unknown) => void;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function enable(options?: RejectionTrackingOptions): void;
|
|
10
|
+
export function disable(): void;
|
|
11
|
+
}
|