@luciq/react-native 18.2.0 → 19.0.0-286-SNAPSHOT
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 +17 -5
- package/android/build.gradle +1 -1
- package/android/native.gradle +1 -1
- package/android/sourcemaps.gradle +41 -12
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqAPMModule.java +20 -1
- package/bin/config/migration-config.json +5 -5
- package/bin/index.js +0 -0
- package/cli/config/migration-config.json +5 -5
- package/dist/modules/APM.d.ts +5 -0
- package/dist/modules/APM.js +19 -0
- package/dist/modules/BugReporting.js +38 -0
- package/dist/modules/CrashReporting.js +3 -0
- package/dist/modules/FeatureRequests.js +6 -0
- package/dist/modules/Luciq.js +58 -0
- package/dist/modules/NetworkLogger.js +21 -3
- package/dist/modules/Replies.js +15 -0
- package/dist/modules/SessionReplay.js +6 -0
- package/dist/modules/Surveys.js +10 -0
- package/dist/native/NativeAPM.d.ts +1 -0
- package/ios/RNLuciq/LuciqAPMBridge.h +2 -0
- package/ios/RNLuciq/LuciqAPMBridge.m +4 -1
- package/ios/native.rb +1 -1
- package/package.json +1 -2
- package/src/modules/APM.ts +20 -0
- package/src/modules/BugReporting.ts +38 -0
- package/src/modules/CrashReporting.ts +3 -0
- package/src/modules/FeatureRequests.ts +6 -0
- package/src/modules/Luciq.ts +58 -0
- package/src/modules/NetworkLogger.ts +21 -3
- package/src/modules/Replies.ts +15 -0
- package/src/modules/SessionReplay.ts +6 -0
- package/src/modules/Surveys.ts +10 -0
- package/src/native/NativeAPM.ts +3 -0
- package/plugin/build/index.js +0 -42078
package/dist/modules/Luciq.js
CHANGED
|
@@ -24,6 +24,7 @@ let shouldEnableNativeInterception = false; // For Android: used to disable APM
|
|
|
24
24
|
* @param isEnabled A boolean to enable/disable Luciq.
|
|
25
25
|
*/
|
|
26
26
|
export const setEnabled = (isEnabled) => {
|
|
27
|
+
console.log('[LCQ-RN] Luciq.setEnabled called', { isEnabled });
|
|
27
28
|
NativeLuciq.setEnabled(isEnabled);
|
|
28
29
|
};
|
|
29
30
|
/**
|
|
@@ -50,6 +51,7 @@ function reportCurrentViewForAndroid(screenName) {
|
|
|
50
51
|
* @param config SDK configurations. See {@link LuciqConfig} for more info.
|
|
51
52
|
*/
|
|
52
53
|
export const init = (config) => {
|
|
54
|
+
console.log('[LCQ-RN] Luciq.init called', { config });
|
|
53
55
|
if (Platform.OS === 'android') {
|
|
54
56
|
// Add android feature flags listener for android
|
|
55
57
|
registerFeatureFlagsListener();
|
|
@@ -88,6 +90,7 @@ export const init = (config) => {
|
|
|
88
90
|
* @param appVariant the current App variant name
|
|
89
91
|
*/
|
|
90
92
|
export const setAppVariant = (appVariant) => {
|
|
93
|
+
console.log('[LCQ-RN] Luciq.setAppVariant called', { appVariant });
|
|
91
94
|
NativeLuciq.setAppVariant(appVariant);
|
|
92
95
|
};
|
|
93
96
|
/**
|
|
@@ -264,6 +267,7 @@ function addOnFeatureUpdatedListener(config) {
|
|
|
264
267
|
* @deprecated Use {@link setOverAirVersion} instead.
|
|
265
268
|
*/
|
|
266
269
|
export const setCodePushVersion = (version) => {
|
|
270
|
+
console.log('[LCQ-RN] Luciq.setCodePushVersion called', { version });
|
|
267
271
|
NativeLuciq.setCodePushVersion(version);
|
|
268
272
|
};
|
|
269
273
|
/**
|
|
@@ -272,6 +276,7 @@ export const setCodePushVersion = (version) => {
|
|
|
272
276
|
*
|
|
273
277
|
*/
|
|
274
278
|
export const setOverAirVersion = (OTAserviceVersion) => {
|
|
279
|
+
console.log('[LCQ-RN] Luciq.setOverAirVersion called', { OTAserviceVersion });
|
|
275
280
|
NativeLuciq.setOverAirVersion(OTAserviceVersion);
|
|
276
281
|
};
|
|
277
282
|
/**
|
|
@@ -281,6 +286,7 @@ export const setOverAirVersion = (OTAserviceVersion) => {
|
|
|
281
286
|
* @param data A string to be attached to each report, with a maximum size of 1,000 characters.
|
|
282
287
|
*/
|
|
283
288
|
export const setUserData = (data) => {
|
|
289
|
+
console.log('[LCQ-RN] Luciq.setUserData called', { data });
|
|
284
290
|
NativeLuciq.setUserData(data);
|
|
285
291
|
};
|
|
286
292
|
/**
|
|
@@ -291,6 +297,7 @@ export const setUserData = (data) => {
|
|
|
291
297
|
* @param isEnabled A boolean to set user steps tracking to being enabled or disabled.
|
|
292
298
|
*/
|
|
293
299
|
export const setTrackUserSteps = (isEnabled) => {
|
|
300
|
+
console.log('[LCQ-RN] Luciq.setTrackUserSteps called', { isEnabled });
|
|
294
301
|
if (Platform.OS === 'ios') {
|
|
295
302
|
NativeLuciq.setTrackUserSteps(isEnabled);
|
|
296
303
|
}
|
|
@@ -301,6 +308,7 @@ export const setTrackUserSteps = (isEnabled) => {
|
|
|
301
308
|
* Xcode's console is enabled or not.
|
|
302
309
|
*/
|
|
303
310
|
export const setLCQLogPrintsToConsole = (printsToConsole) => {
|
|
311
|
+
console.log('[LCQ-RN] Luciq.setLCQLogPrintsToConsole called', { printsToConsole });
|
|
304
312
|
if (Platform.OS === 'ios') {
|
|
305
313
|
NativeLuciq.setLCQLogPrintsToConsole(printsToConsole);
|
|
306
314
|
}
|
|
@@ -311,6 +319,7 @@ export const setLCQLogPrintsToConsole = (printsToConsole) => {
|
|
|
311
319
|
* @param isEnabled A boolean parameter to enable or disable the feature.
|
|
312
320
|
*/
|
|
313
321
|
export const setSessionProfilerEnabled = (isEnabled) => {
|
|
322
|
+
console.log('[LCQ-RN] Luciq.setSessionProfilerEnabled called', { isEnabled });
|
|
314
323
|
NativeLuciq.setSessionProfilerEnabled(isEnabled);
|
|
315
324
|
};
|
|
316
325
|
/**
|
|
@@ -320,6 +329,7 @@ export const setSessionProfilerEnabled = (isEnabled) => {
|
|
|
320
329
|
* @param sdkLocale A locale to set the SDK to.
|
|
321
330
|
*/
|
|
322
331
|
export const setLocale = (sdkLocale) => {
|
|
332
|
+
console.log('[LCQ-RN] Luciq.setLocale called', { sdkLocale });
|
|
323
333
|
NativeLuciq.setLocale(sdkLocale);
|
|
324
334
|
};
|
|
325
335
|
/**
|
|
@@ -327,6 +337,7 @@ export const setLocale = (sdkLocale) => {
|
|
|
327
337
|
* @param sdkTheme
|
|
328
338
|
*/
|
|
329
339
|
export const setColorTheme = (sdkTheme) => {
|
|
340
|
+
console.log('[LCQ-RN] Luciq.setColorTheme called', { sdkTheme });
|
|
330
341
|
NativeLuciq.setColorTheme(sdkTheme);
|
|
331
342
|
};
|
|
332
343
|
/**
|
|
@@ -338,6 +349,7 @@ export const setColorTheme = (sdkTheme) => {
|
|
|
338
349
|
* @deprecated Please migrate to the new UI customization API: {@link setTheme}
|
|
339
350
|
*/
|
|
340
351
|
export const setPrimaryColor = (color) => {
|
|
352
|
+
console.log('[LCQ-RN] Luciq.setPrimaryColor called', { color });
|
|
341
353
|
NativeLuciq.setTheme({ primaryColor: color });
|
|
342
354
|
};
|
|
343
355
|
/**
|
|
@@ -346,18 +358,21 @@ export const setPrimaryColor = (color) => {
|
|
|
346
358
|
* @param tags An array of tags to append to current tags.
|
|
347
359
|
*/
|
|
348
360
|
export const appendTags = (tags) => {
|
|
361
|
+
console.log('[LCQ-RN] Luciq.appendTags called', { tags });
|
|
349
362
|
NativeLuciq.appendTags(tags);
|
|
350
363
|
};
|
|
351
364
|
/**
|
|
352
365
|
* Manually removes all tags of reported feedback, bug or crash.
|
|
353
366
|
*/
|
|
354
367
|
export const resetTags = () => {
|
|
368
|
+
console.log('[LCQ-RN] Luciq.resetTags called');
|
|
355
369
|
NativeLuciq.resetTags();
|
|
356
370
|
};
|
|
357
371
|
/**
|
|
358
372
|
* Gets all tags of reported feedback, bug or crash.
|
|
359
373
|
*/
|
|
360
374
|
export const getTags = async () => {
|
|
375
|
+
console.log('[LCQ-RN] Luciq.getTags called');
|
|
361
376
|
const tags = await NativeLuciq.getTags();
|
|
362
377
|
return tags;
|
|
363
378
|
};
|
|
@@ -368,6 +383,7 @@ export const getTags = async () => {
|
|
|
368
383
|
* @param string String value to override the default one.
|
|
369
384
|
*/
|
|
370
385
|
export const setString = (key, string) => {
|
|
386
|
+
console.log('[LCQ-RN] Luciq.setString called', { key, string });
|
|
371
387
|
// Suffix the repro steps list item numbering title with a # to unify the string key's
|
|
372
388
|
// behavior between Android and iOS
|
|
373
389
|
if (Platform.OS === 'android' && key === StringKey.reproStepsListItemNumberingTitle) {
|
|
@@ -385,6 +401,7 @@ export const setString = (key, string) => {
|
|
|
385
401
|
* @param [id] ID of the user to be set.
|
|
386
402
|
*/
|
|
387
403
|
export const identifyUser = (email, name, id) => {
|
|
404
|
+
console.log('[LCQ-RN] Luciq.identifyUser called', { email, name, id });
|
|
388
405
|
NativeLuciq.identifyUser(email, name, id);
|
|
389
406
|
};
|
|
390
407
|
/**
|
|
@@ -393,6 +410,7 @@ export const identifyUser = (email, name, id) => {
|
|
|
393
410
|
* It also reset the chats on device and removes user attributes, user data and completed surveys.
|
|
394
411
|
*/
|
|
395
412
|
export const logOut = () => {
|
|
413
|
+
console.log('[LCQ-RN] Luciq.logOut called');
|
|
396
414
|
NativeLuciq.logOut();
|
|
397
415
|
};
|
|
398
416
|
/**
|
|
@@ -401,6 +419,7 @@ export const logOut = () => {
|
|
|
401
419
|
* @param name Event name.
|
|
402
420
|
*/
|
|
403
421
|
export const logUserEvent = (name) => {
|
|
422
|
+
console.log('[LCQ-RN] Luciq.logUserEvent called', { name });
|
|
404
423
|
NativeLuciq.logUserEvent(name);
|
|
405
424
|
};
|
|
406
425
|
/**
|
|
@@ -414,6 +433,7 @@ export const logUserEvent = (name) => {
|
|
|
414
433
|
* @param message the message
|
|
415
434
|
*/
|
|
416
435
|
export const logVerbose = (message) => {
|
|
436
|
+
console.log('[LCQ-RN] Luciq.logVerbose called', { message });
|
|
417
437
|
if (!message) {
|
|
418
438
|
return;
|
|
419
439
|
}
|
|
@@ -431,6 +451,7 @@ export const logVerbose = (message) => {
|
|
|
431
451
|
* @param message the message
|
|
432
452
|
*/
|
|
433
453
|
export const logInfo = (message) => {
|
|
454
|
+
console.log('[LCQ-RN] Luciq.logInfo called', { message });
|
|
434
455
|
if (!message) {
|
|
435
456
|
return;
|
|
436
457
|
}
|
|
@@ -448,6 +469,7 @@ export const logInfo = (message) => {
|
|
|
448
469
|
* @param message the message
|
|
449
470
|
*/
|
|
450
471
|
export const logDebug = (message) => {
|
|
472
|
+
console.log('[LCQ-RN] Luciq.logDebug called', { message });
|
|
451
473
|
if (!message) {
|
|
452
474
|
return;
|
|
453
475
|
}
|
|
@@ -465,6 +487,7 @@ export const logDebug = (message) => {
|
|
|
465
487
|
* @param message the message
|
|
466
488
|
*/
|
|
467
489
|
export const logError = (message) => {
|
|
490
|
+
console.log('[LCQ-RN] Luciq.logError called', { message });
|
|
468
491
|
if (!message) {
|
|
469
492
|
return;
|
|
470
493
|
}
|
|
@@ -482,6 +505,7 @@ export const logError = (message) => {
|
|
|
482
505
|
* @param message the message
|
|
483
506
|
*/
|
|
484
507
|
export const logWarn = (message) => {
|
|
508
|
+
console.log('[LCQ-RN] Luciq.logWarn called', { message });
|
|
485
509
|
if (!message) {
|
|
486
510
|
return;
|
|
487
511
|
}
|
|
@@ -492,6 +516,7 @@ export const logWarn = (message) => {
|
|
|
492
516
|
* Clear all Luciq logs, console logs, network logs and user steps.
|
|
493
517
|
*/
|
|
494
518
|
export const clearLogs = () => {
|
|
519
|
+
console.log('[LCQ-RN] Luciq.clearLogs called');
|
|
495
520
|
NativeLuciq.clearLogs();
|
|
496
521
|
};
|
|
497
522
|
/**
|
|
@@ -509,6 +534,7 @@ export const clearLogs = () => {
|
|
|
509
534
|
* ```
|
|
510
535
|
*/
|
|
511
536
|
export const setReproStepsConfig = (config) => {
|
|
537
|
+
console.log('[LCQ-RN] Luciq.setReproStepsConfig called', { config });
|
|
512
538
|
let bug = config.bug ?? ReproStepsMode.enabled;
|
|
513
539
|
let crash = config.crash ?? ReproStepsMode.enabledWithNoScreenshots;
|
|
514
540
|
let sessionReplay = config.sessionReplay ?? ReproStepsMode.enabled;
|
|
@@ -526,6 +552,7 @@ export const setReproStepsConfig = (config) => {
|
|
|
526
552
|
* @param value the value
|
|
527
553
|
*/
|
|
528
554
|
export const setUserAttribute = (key, value) => {
|
|
555
|
+
console.log('[LCQ-RN] Luciq.setUserAttribute called', { key, value });
|
|
529
556
|
if (!key || typeof key !== 'string' || typeof value !== 'string') {
|
|
530
557
|
Logger.error(LuciqConstants.SET_USER_ATTRIBUTES_ERROR_TYPE_MESSAGE);
|
|
531
558
|
return;
|
|
@@ -537,6 +564,7 @@ export const setUserAttribute = (key, value) => {
|
|
|
537
564
|
* @param key The attribute key as string
|
|
538
565
|
*/
|
|
539
566
|
export const getUserAttribute = async (key) => {
|
|
567
|
+
console.log('[LCQ-RN] Luciq.getUserAttribute called', { key });
|
|
540
568
|
const attribute = await NativeLuciq.getUserAttribute(key);
|
|
541
569
|
return attribute;
|
|
542
570
|
};
|
|
@@ -547,6 +575,7 @@ export const getUserAttribute = async (key) => {
|
|
|
547
575
|
* @see {@link setUserAttribute}
|
|
548
576
|
*/
|
|
549
577
|
export const removeUserAttribute = (key) => {
|
|
578
|
+
console.log('[LCQ-RN] Luciq.removeUserAttribute called', { key });
|
|
550
579
|
if (!key || typeof key !== 'string') {
|
|
551
580
|
Logger.error(LuciqConstants.REMOVE_USER_ATTRIBUTES_ERROR_TYPE_MESSAGE);
|
|
552
581
|
return;
|
|
@@ -558,6 +587,7 @@ export const removeUserAttribute = (key) => {
|
|
|
558
587
|
* set user attributes, or an empty dictionary if no user attributes have been set.
|
|
559
588
|
*/
|
|
560
589
|
export const getAllUserAttributes = async () => {
|
|
590
|
+
console.log('[LCQ-RN] Luciq.getAllUserAttributes called');
|
|
561
591
|
const attributes = await NativeLuciq.getAllUserAttributes();
|
|
562
592
|
return attributes;
|
|
563
593
|
};
|
|
@@ -565,6 +595,7 @@ export const getAllUserAttributes = async () => {
|
|
|
565
595
|
* Clears all user attributes if exists.
|
|
566
596
|
*/
|
|
567
597
|
export const clearAllUserAttributes = () => {
|
|
598
|
+
console.log('[LCQ-RN] Luciq.clearAllUserAttributes called');
|
|
568
599
|
NativeLuciq.clearAllUserAttributes();
|
|
569
600
|
};
|
|
570
601
|
/**
|
|
@@ -572,6 +603,7 @@ export const clearAllUserAttributes = () => {
|
|
|
572
603
|
* @param mode An enum to set the welcome message mode to live, or beta.
|
|
573
604
|
*/
|
|
574
605
|
export const showWelcomeMessage = (mode) => {
|
|
606
|
+
console.log('[LCQ-RN] Luciq.showWelcomeMessage called', { mode });
|
|
575
607
|
NativeLuciq.showWelcomeMessageWithMode(mode);
|
|
576
608
|
};
|
|
577
609
|
/**
|
|
@@ -579,6 +611,7 @@ export const showWelcomeMessage = (mode) => {
|
|
|
579
611
|
* @param mode An enum to set the welcome message mode to live, beta or disabled.
|
|
580
612
|
*/
|
|
581
613
|
export const setWelcomeMessageMode = (mode) => {
|
|
614
|
+
console.log('[LCQ-RN] Luciq.setWelcomeMessageMode called', { mode });
|
|
582
615
|
NativeLuciq.setWelcomeMessageMode(mode);
|
|
583
616
|
};
|
|
584
617
|
/**
|
|
@@ -587,6 +620,7 @@ export const setWelcomeMessageMode = (mode) => {
|
|
|
587
620
|
* @param fileName
|
|
588
621
|
*/
|
|
589
622
|
export const addFileAttachment = (filePath, fileName) => {
|
|
623
|
+
console.log('[LCQ-RN] Luciq.addFileAttachment called', { filePath, fileName });
|
|
590
624
|
if (Platform.OS === 'android') {
|
|
591
625
|
NativeLuciq.setFileAttachment(filePath, fileName);
|
|
592
626
|
}
|
|
@@ -599,6 +633,7 @@ export const addFileAttachment = (filePath, fileName) => {
|
|
|
599
633
|
* @param viewRef the ref of the component to hide
|
|
600
634
|
*/
|
|
601
635
|
export const addPrivateView = (viewRef) => {
|
|
636
|
+
console.log('[LCQ-RN] Luciq.addPrivateView called', { viewRef });
|
|
602
637
|
const nativeTag = findNodeHandle(viewRef);
|
|
603
638
|
NativeLuciq.addPrivateView(nativeTag);
|
|
604
639
|
};
|
|
@@ -608,6 +643,7 @@ export const addPrivateView = (viewRef) => {
|
|
|
608
643
|
* @param viewRef the ref of the component to remove from hidden views
|
|
609
644
|
*/
|
|
610
645
|
export const removePrivateView = (viewRef) => {
|
|
646
|
+
console.log('[LCQ-RN] Luciq.removePrivateView called', { viewRef });
|
|
611
647
|
const nativeTag = findNodeHandle(viewRef);
|
|
612
648
|
NativeLuciq.removePrivateView(nativeTag);
|
|
613
649
|
};
|
|
@@ -615,9 +651,11 @@ export const removePrivateView = (viewRef) => {
|
|
|
615
651
|
* Shows default Luciq prompt.
|
|
616
652
|
*/
|
|
617
653
|
export const show = () => {
|
|
654
|
+
console.log('[LCQ-RN] Luciq.show called');
|
|
618
655
|
NativeLuciq.show();
|
|
619
656
|
};
|
|
620
657
|
export const onReportSubmitHandler = (handler) => {
|
|
658
|
+
console.log('[LCQ-RN] Luciq.onReportSubmitHandler called');
|
|
621
659
|
emitter.addListener(NativeEvents.PRESENDING_HANDLER, (report) => {
|
|
622
660
|
const { tags, consoleLogs, luciqLogs, userAttributes, fileAttachments } = report;
|
|
623
661
|
const reportObj = new Report(tags, consoleLogs, luciqLogs, userAttributes, fileAttachments);
|
|
@@ -626,6 +664,11 @@ export const onReportSubmitHandler = (handler) => {
|
|
|
626
664
|
NativeLuciq.setPreSendingHandler(handler);
|
|
627
665
|
};
|
|
628
666
|
export const onNavigationStateChange = (prevState, currentState, _action) => {
|
|
667
|
+
console.log('[LCQ-RN] Luciq.onNavigationStateChange called', {
|
|
668
|
+
prevState,
|
|
669
|
+
currentState,
|
|
670
|
+
_action,
|
|
671
|
+
});
|
|
629
672
|
const currentScreen = LuciqUtils.getActiveRouteName(currentState);
|
|
630
673
|
const prevScreen = LuciqUtils.getActiveRouteName(prevState);
|
|
631
674
|
if (prevScreen !== currentScreen) {
|
|
@@ -644,6 +687,7 @@ export const onNavigationStateChange = (prevState, currentState, _action) => {
|
|
|
644
687
|
}
|
|
645
688
|
};
|
|
646
689
|
export const onStateChange = (state) => {
|
|
690
|
+
console.log('[LCQ-RN] Luciq.onStateChange called', { state });
|
|
647
691
|
if (!state) {
|
|
648
692
|
return;
|
|
649
693
|
}
|
|
@@ -667,11 +711,13 @@ export const onStateChange = (state) => {
|
|
|
667
711
|
*
|
|
668
712
|
*/
|
|
669
713
|
export const setNavigationListener = (navigationRef) => {
|
|
714
|
+
console.log('[LCQ-RN] Luciq.setNavigationListener called', { navigationRef });
|
|
670
715
|
return navigationRef.addListener('state', () => {
|
|
671
716
|
onStateChange(navigationRef.getRootState());
|
|
672
717
|
});
|
|
673
718
|
};
|
|
674
719
|
export const reportScreenChange = (screenName) => {
|
|
720
|
+
console.log('[LCQ-RN] Luciq.reportScreenChange called', { screenName });
|
|
675
721
|
NativeLuciq.reportScreenChange(screenName);
|
|
676
722
|
};
|
|
677
723
|
/**
|
|
@@ -679,6 +725,7 @@ export const reportScreenChange = (screenName) => {
|
|
|
679
725
|
* @param featureFlags An array of feature flags to add to the next report.
|
|
680
726
|
*/
|
|
681
727
|
export const addFeatureFlags = (featureFlags) => {
|
|
728
|
+
console.log('[LCQ-RN] Luciq.addFeatureFlags called', { featureFlags });
|
|
682
729
|
const entries = featureFlags.map((item) => [item.name, item.variant || '']);
|
|
683
730
|
const flags = Object.fromEntries(entries);
|
|
684
731
|
NativeLuciq.addFeatureFlags(flags);
|
|
@@ -687,6 +734,7 @@ export const addFeatureFlags = (featureFlags) => {
|
|
|
687
734
|
* Add a feature flag to the to next report.
|
|
688
735
|
*/
|
|
689
736
|
export const addFeatureFlag = (featureFlag) => {
|
|
737
|
+
console.log('[LCQ-RN] Luciq.addFeatureFlag called', { featureFlag });
|
|
690
738
|
addFeatureFlags([featureFlag]);
|
|
691
739
|
};
|
|
692
740
|
/**
|
|
@@ -694,6 +742,7 @@ export const addFeatureFlag = (featureFlag) => {
|
|
|
694
742
|
* @param featureFlags An array of feature flags to remove from the next report.
|
|
695
743
|
*/
|
|
696
744
|
export const removeFeatureFlags = (featureFlags) => {
|
|
745
|
+
console.log('[LCQ-RN] Luciq.removeFeatureFlags called', { featureFlags });
|
|
697
746
|
NativeLuciq.removeFeatureFlags(featureFlags);
|
|
698
747
|
};
|
|
699
748
|
/**
|
|
@@ -701,27 +750,32 @@ export const removeFeatureFlags = (featureFlags) => {
|
|
|
701
750
|
* @param name the name of the feature flag to remove from the next report.
|
|
702
751
|
*/
|
|
703
752
|
export const removeFeatureFlag = (name) => {
|
|
753
|
+
console.log('[LCQ-RN] Luciq.removeFeatureFlag called', { name });
|
|
704
754
|
removeFeatureFlags([name]);
|
|
705
755
|
};
|
|
706
756
|
/**
|
|
707
757
|
* Clear all feature flags
|
|
708
758
|
*/
|
|
709
759
|
export const removeAllFeatureFlags = () => {
|
|
760
|
+
console.log('[LCQ-RN] Luciq.removeAllFeatureFlags called');
|
|
710
761
|
NativeLuciq.removeAllFeatureFlags();
|
|
711
762
|
};
|
|
712
763
|
/**
|
|
713
764
|
* This API has to be call when using custom app rating prompt
|
|
714
765
|
*/
|
|
715
766
|
export const willRedirectToStore = () => {
|
|
767
|
+
console.log('[LCQ-RN] Luciq.willRedirectToStore called');
|
|
716
768
|
NativeLuciq.willRedirectToStore();
|
|
717
769
|
};
|
|
718
770
|
/**
|
|
719
771
|
* This API has be called when changing the default Metro server port (8081) to exclude the DEV URL from network logging.
|
|
720
772
|
*/
|
|
721
773
|
export const setMetroDevServerPort = (port) => {
|
|
774
|
+
console.log('[LCQ-RN] Luciq.setMetroDevServerPort called', { port });
|
|
722
775
|
LuciqRNConfig.metroDevServerPort = port.toString();
|
|
723
776
|
};
|
|
724
777
|
export const componentDidAppearListener = (event) => {
|
|
778
|
+
console.log('[LCQ-RN] Luciq.componentDidAppearListener called', { event });
|
|
725
779
|
if (_isFirstScreen) {
|
|
726
780
|
_lastScreen = event.componentName;
|
|
727
781
|
_isFirstScreen = false;
|
|
@@ -737,6 +791,7 @@ export const componentDidAppearListener = (event) => {
|
|
|
737
791
|
* @param handler A callback that gets the update value of the flag
|
|
738
792
|
*/
|
|
739
793
|
export const _registerFeatureFlagsChangeListener = (handler) => {
|
|
794
|
+
console.log('[LCQ-RN] Luciq._registerFeatureFlagsChangeListener called');
|
|
740
795
|
emitter.addListener(NativeEvents.ON_FEATURE_FLAGS_CHANGE, (payload) => {
|
|
741
796
|
handler(payload);
|
|
742
797
|
});
|
|
@@ -747,6 +802,7 @@ export const _registerFeatureFlagsChangeListener = (handler) => {
|
|
|
747
802
|
* @param autoMaskingTypes The masking type to be applied.
|
|
748
803
|
*/
|
|
749
804
|
export const enableAutoMasking = (autoMaskingTypes) => {
|
|
805
|
+
console.log('[LCQ-RN] Luciq.enableAutoMasking called', { autoMaskingTypes });
|
|
750
806
|
NativeLuciq.enableAutoMasking(autoMaskingTypes);
|
|
751
807
|
};
|
|
752
808
|
/**
|
|
@@ -784,6 +840,7 @@ export const enableAutoMasking = (autoMaskingTypes) => {
|
|
|
784
840
|
* ```
|
|
785
841
|
*/
|
|
786
842
|
export const setTheme = (theme) => {
|
|
843
|
+
console.log('[LCQ-RN] Luciq.setTheme called', { theme });
|
|
787
844
|
NativeLuciq.setTheme(theme);
|
|
788
845
|
};
|
|
789
846
|
/**
|
|
@@ -791,6 +848,7 @@ export const setTheme = (theme) => {
|
|
|
791
848
|
* @param isEnabled A boolean to enable/disable setFullscreen.
|
|
792
849
|
*/
|
|
793
850
|
export const setFullscreen = (isEnabled) => {
|
|
851
|
+
console.log('[LCQ-RN] Luciq.setFullscreen called', { isEnabled });
|
|
794
852
|
if (Platform.OS === 'android') {
|
|
795
853
|
NativeLuciq.setFullscreen(isEnabled);
|
|
796
854
|
}
|
|
@@ -21,6 +21,7 @@ function getPortFromUrl(url) {
|
|
|
21
21
|
* @param isEnabled
|
|
22
22
|
*/
|
|
23
23
|
export const setEnabled = (isEnabled) => {
|
|
24
|
+
console.log('[LCQ-RN] NetworkLogger.setEnabled called', { isEnabled });
|
|
24
25
|
if (isEnabled) {
|
|
25
26
|
xhr.enableInterception();
|
|
26
27
|
xhr.setOnDoneCallback(async (network) => {
|
|
@@ -73,16 +74,27 @@ export const setEnabled = (isEnabled) => {
|
|
|
73
74
|
* @param isEnabled
|
|
74
75
|
*/
|
|
75
76
|
export const setNativeInterceptionEnabled = (isEnabled) => {
|
|
77
|
+
console.log('[LCQ-RN] NetworkLogger.setNativeInterceptionEnabled called', { isEnabled });
|
|
76
78
|
_isNativeInterceptionEnabled = isEnabled;
|
|
77
79
|
};
|
|
78
|
-
export const getNetworkDataObfuscationHandler = () =>
|
|
79
|
-
|
|
80
|
-
|
|
80
|
+
export const getNetworkDataObfuscationHandler = () => {
|
|
81
|
+
console.log('[LCQ-RN] NetworkLogger.getNetworkDataObfuscationHandler called');
|
|
82
|
+
return _networkDataObfuscationHandler;
|
|
83
|
+
};
|
|
84
|
+
export const getRequestFilterExpression = () => {
|
|
85
|
+
console.log('[LCQ-RN] NetworkLogger.getRequestFilterExpression called');
|
|
86
|
+
return _requestFilterExpression;
|
|
87
|
+
};
|
|
88
|
+
export const hasRequestFilterExpression = () => {
|
|
89
|
+
console.log('[LCQ-RN] NetworkLogger.hasRequestFilterExpression called');
|
|
90
|
+
return hasFilterExpression;
|
|
91
|
+
};
|
|
81
92
|
/**
|
|
82
93
|
* Obfuscates any response data.
|
|
83
94
|
* @param handler
|
|
84
95
|
*/
|
|
85
96
|
export const setNetworkDataObfuscationHandler = (handler) => {
|
|
97
|
+
console.log('[LCQ-RN] NetworkLogger.setNetworkDataObfuscationHandler called', { handler });
|
|
86
98
|
_networkDataObfuscationHandler = handler;
|
|
87
99
|
if (_isNativeInterceptionEnabled && Platform.OS === 'ios') {
|
|
88
100
|
if (hasFilterExpression) {
|
|
@@ -98,6 +110,7 @@ export const setNetworkDataObfuscationHandler = (handler) => {
|
|
|
98
110
|
* @param expression
|
|
99
111
|
*/
|
|
100
112
|
export const setRequestFilterExpression = (expression) => {
|
|
113
|
+
console.log('[LCQ-RN] NetworkLogger.setRequestFilterExpression called', { expression });
|
|
101
114
|
_requestFilterExpression = expression;
|
|
102
115
|
hasFilterExpression = true;
|
|
103
116
|
if (_isNativeInterceptionEnabled && Platform.OS === 'ios') {
|
|
@@ -114,9 +127,11 @@ export const setRequestFilterExpression = (expression) => {
|
|
|
114
127
|
* @param handler
|
|
115
128
|
*/
|
|
116
129
|
export const setProgressHandlerForRequest = (handler) => {
|
|
130
|
+
console.log('[LCQ-RN] NetworkLogger.setProgressHandlerForRequest called', { handler });
|
|
117
131
|
xhr.setOnProgressCallback(handler);
|
|
118
132
|
};
|
|
119
133
|
export const apolloLinkRequestHandler = (operation, forward) => {
|
|
134
|
+
console.log('[LCQ-RN] NetworkLogger.apolloLinkRequestHandler called', { operation });
|
|
120
135
|
try {
|
|
121
136
|
operation.setContext((context) => {
|
|
122
137
|
const newHeaders = context.headers ?? {};
|
|
@@ -134,6 +149,7 @@ export const apolloLinkRequestHandler = (operation, forward) => {
|
|
|
134
149
|
* @param isEnabled
|
|
135
150
|
*/
|
|
136
151
|
export const setNetworkLogBodyEnabled = (isEnabled) => {
|
|
152
|
+
console.log('[LCQ-RN] NetworkLogger.setNetworkLogBodyEnabled called', { isEnabled });
|
|
137
153
|
NativeLuciq.setNetworkLogBodyEnabled(isEnabled);
|
|
138
154
|
};
|
|
139
155
|
/**
|
|
@@ -141,6 +157,7 @@ export const setNetworkLogBodyEnabled = (isEnabled) => {
|
|
|
141
157
|
* Exported for internal/testing purposes only.
|
|
142
158
|
*/
|
|
143
159
|
export const resetNetworkListener = () => {
|
|
160
|
+
console.log('[LCQ-RN] NetworkLogger.resetNetworkListener called');
|
|
144
161
|
if (process.env.NODE_ENV === 'test') {
|
|
145
162
|
_networkListener = null;
|
|
146
163
|
NativeNetworkLogger.resetNetworkLogsListener();
|
|
@@ -154,6 +171,7 @@ export const resetNetworkListener = () => {
|
|
|
154
171
|
* Exported for internal/testing purposes only.
|
|
155
172
|
*/
|
|
156
173
|
export const registerNetworkLogsListener = (type, handler) => {
|
|
174
|
+
console.log('[LCQ-RN] NetworkLogger.registerNetworkLogsListener called', { type, handler });
|
|
157
175
|
if (Platform.OS === 'ios') {
|
|
158
176
|
// remove old listeners
|
|
159
177
|
if (NetworkLoggerEmitter.listenerCount(NativeNetworkLoggerEvent.NETWORK_LOGGER_HANDLER) > 0) {
|
package/dist/modules/Replies.js
CHANGED
|
@@ -5,12 +5,14 @@ import { NativeEvents, NativeReplies, emitter } from '../native/NativeReplies';
|
|
|
5
5
|
* @param isEnabled
|
|
6
6
|
*/
|
|
7
7
|
export const setEnabled = (isEnabled) => {
|
|
8
|
+
console.log('[LCQ-RN] Replies.setEnabled called', { isEnabled });
|
|
8
9
|
NativeReplies.setEnabled(isEnabled);
|
|
9
10
|
};
|
|
10
11
|
/**
|
|
11
12
|
* Tells whether the user has chats already or not.
|
|
12
13
|
*/
|
|
13
14
|
export const hasChats = async () => {
|
|
15
|
+
console.log('[LCQ-RN] Replies.hasChats called');
|
|
14
16
|
const result = await NativeReplies.hasChats();
|
|
15
17
|
return result;
|
|
16
18
|
};
|
|
@@ -18,6 +20,7 @@ export const hasChats = async () => {
|
|
|
18
20
|
* Manual invocation for replies.
|
|
19
21
|
*/
|
|
20
22
|
export const show = () => {
|
|
23
|
+
console.log('[LCQ-RN] Replies.show called');
|
|
21
24
|
NativeReplies.show();
|
|
22
25
|
};
|
|
23
26
|
/**
|
|
@@ -25,6 +28,7 @@ export const show = () => {
|
|
|
25
28
|
* @param handler A callback that gets executed when a new message is received.
|
|
26
29
|
*/
|
|
27
30
|
export const setOnNewReplyReceivedHandler = (handler) => {
|
|
31
|
+
console.log('[LCQ-RN] Replies.setOnNewReplyReceivedHandler called');
|
|
28
32
|
emitter.addListener(NativeEvents.ON_REPLY_RECEIVED_HANDLER, handler);
|
|
29
33
|
NativeReplies.setOnNewReplyReceivedHandler(handler);
|
|
30
34
|
};
|
|
@@ -35,6 +39,7 @@ export const setOnNewReplyReceivedHandler = (handler) => {
|
|
|
35
39
|
* Notifications count, or -1 in case the SDK has not been initialized.
|
|
36
40
|
*/
|
|
37
41
|
export const getUnreadRepliesCount = async () => {
|
|
42
|
+
console.log('[LCQ-RN] Replies.getUnreadRepliesCount called');
|
|
38
43
|
const count = await NativeReplies.getUnreadRepliesCount();
|
|
39
44
|
return count;
|
|
40
45
|
};
|
|
@@ -45,6 +50,7 @@ export const getUnreadRepliesCount = async () => {
|
|
|
45
50
|
* notifications are enabled or disabled.
|
|
46
51
|
*/
|
|
47
52
|
export const setInAppNotificationsEnabled = (isEnabled) => {
|
|
53
|
+
console.log('[LCQ-RN] Replies.setInAppNotificationsEnabled called', { isEnabled });
|
|
48
54
|
NativeReplies.setInAppNotificationEnabled(isEnabled);
|
|
49
55
|
};
|
|
50
56
|
/**
|
|
@@ -55,6 +61,7 @@ export const setInAppNotificationsEnabled = (isEnabled) => {
|
|
|
55
61
|
* @param isEnabled desired state of conversation sounds
|
|
56
62
|
*/
|
|
57
63
|
export const setInAppNotificationSound = (isEnabled) => {
|
|
64
|
+
console.log('[LCQ-RN] Replies.setInAppNotificationSound called', { isEnabled });
|
|
58
65
|
if (Platform.OS === 'android') {
|
|
59
66
|
NativeReplies.setInAppNotificationSound(isEnabled);
|
|
60
67
|
}
|
|
@@ -65,6 +72,7 @@ export const setInAppNotificationSound = (isEnabled) => {
|
|
|
65
72
|
* @param isEnabled A boolean to indicate whether push notifications are enabled or disabled.
|
|
66
73
|
*/
|
|
67
74
|
export const setPushNotificationsEnabled = (isEnabled) => {
|
|
75
|
+
console.log('[LCQ-RN] Replies.setPushNotificationsEnabled called', { isEnabled });
|
|
68
76
|
NativeReplies.setPushNotificationsEnabled(isEnabled);
|
|
69
77
|
};
|
|
70
78
|
/**
|
|
@@ -73,6 +81,7 @@ export const setPushNotificationsEnabled = (isEnabled) => {
|
|
|
73
81
|
* @param token the GCM registration token
|
|
74
82
|
*/
|
|
75
83
|
export const setPushNotificationRegistrationTokenAndroid = (token) => {
|
|
84
|
+
console.log('[LCQ-RN] Replies.setPushNotificationRegistrationTokenAndroid called', { token });
|
|
76
85
|
if (Platform.OS === 'android') {
|
|
77
86
|
NativeReplies.setPushNotificationRegistrationToken(token);
|
|
78
87
|
}
|
|
@@ -83,6 +92,7 @@ export const setPushNotificationRegistrationTokenAndroid = (token) => {
|
|
|
83
92
|
* @param data the data bundle related to Luciq
|
|
84
93
|
*/
|
|
85
94
|
export const showNotificationAndroid = (data) => {
|
|
95
|
+
console.log('[LCQ-RN] Replies.showNotificationAndroid called', { data });
|
|
86
96
|
if (Platform.OS === 'android') {
|
|
87
97
|
NativeReplies.showNotification(data);
|
|
88
98
|
}
|
|
@@ -93,6 +103,7 @@ export const showNotificationAndroid = (data) => {
|
|
|
93
103
|
* @param resourceId the notification icon resource ID
|
|
94
104
|
*/
|
|
95
105
|
export const setNotificationIconAndroid = (resourceId) => {
|
|
106
|
+
console.log('[LCQ-RN] Replies.setNotificationIconAndroid called', { resourceId });
|
|
96
107
|
if (Platform.OS === 'android') {
|
|
97
108
|
NativeReplies.setNotificationIcon(resourceId);
|
|
98
109
|
}
|
|
@@ -104,6 +115,7 @@ export const setNotificationIconAndroid = (resourceId) => {
|
|
|
104
115
|
* @param id an id to a notification channel that notifications
|
|
105
116
|
*/
|
|
106
117
|
export const setPushNotificationChannelIdAndroid = (id) => {
|
|
118
|
+
console.log('[LCQ-RN] Replies.setPushNotificationChannelIdAndroid called', { id });
|
|
107
119
|
if (Platform.OS === 'android') {
|
|
108
120
|
NativeReplies.setPushNotificationChannelId(id);
|
|
109
121
|
}
|
|
@@ -115,6 +127,9 @@ export const setPushNotificationChannelIdAndroid = (id) => {
|
|
|
115
127
|
* @param isEnabled desired state of conversation sounds
|
|
116
128
|
*/
|
|
117
129
|
export const setSystemReplyNotificationSoundEnabledAndroid = (isEnabled) => {
|
|
130
|
+
console.log('[LCQ-RN] Replies.setSystemReplyNotificationSoundEnabledAndroid called', {
|
|
131
|
+
isEnabled,
|
|
132
|
+
});
|
|
118
133
|
if (Platform.OS === 'android') {
|
|
119
134
|
NativeReplies.setSystemReplyNotificationSoundEnabled(isEnabled);
|
|
120
135
|
}
|
|
@@ -12,6 +12,7 @@ import { NativeSessionReplay, NativeEvents, emitter } from '../native/NativeSess
|
|
|
12
12
|
* ```
|
|
13
13
|
*/
|
|
14
14
|
export const setEnabled = (isEnabled) => {
|
|
15
|
+
console.log('[LCQ-RN] SessionReplay.setEnabled called', { isEnabled });
|
|
15
16
|
NativeSessionReplay.setEnabled(isEnabled);
|
|
16
17
|
};
|
|
17
18
|
/**
|
|
@@ -27,6 +28,7 @@ export const setEnabled = (isEnabled) => {
|
|
|
27
28
|
* ```
|
|
28
29
|
*/
|
|
29
30
|
export const setNetworkLogsEnabled = (isEnabled) => {
|
|
31
|
+
console.log('[LCQ-RN] SessionReplay.setNetworkLogsEnabled called', { isEnabled });
|
|
30
32
|
NativeSessionReplay.setNetworkLogsEnabled(isEnabled);
|
|
31
33
|
};
|
|
32
34
|
/**
|
|
@@ -42,6 +44,7 @@ export const setNetworkLogsEnabled = (isEnabled) => {
|
|
|
42
44
|
* ```
|
|
43
45
|
*/
|
|
44
46
|
export const setLuciqLogsEnabled = (isEnabled) => {
|
|
47
|
+
console.log('[LCQ-RN] SessionReplay.setLuciqLogsEnabled called', { isEnabled });
|
|
45
48
|
NativeSessionReplay.setLuciqLogsEnabled(isEnabled);
|
|
46
49
|
};
|
|
47
50
|
/**
|
|
@@ -57,6 +60,7 @@ export const setLuciqLogsEnabled = (isEnabled) => {
|
|
|
57
60
|
* ```
|
|
58
61
|
*/
|
|
59
62
|
export const setUserStepsEnabled = (isEnabled) => {
|
|
63
|
+
console.log('[LCQ-RN] SessionReplay.setUserStepsEnabled called', { isEnabled });
|
|
60
64
|
NativeSessionReplay.setUserStepsEnabled(isEnabled);
|
|
61
65
|
};
|
|
62
66
|
/**
|
|
@@ -68,6 +72,7 @@ export const setUserStepsEnabled = (isEnabled) => {
|
|
|
68
72
|
* ```
|
|
69
73
|
*/
|
|
70
74
|
export const getSessionReplayLink = async () => {
|
|
75
|
+
console.log('[LCQ-RN] SessionReplay.getSessionReplayLink called');
|
|
71
76
|
return NativeSessionReplay.getSessionReplayLink();
|
|
72
77
|
};
|
|
73
78
|
/**
|
|
@@ -86,6 +91,7 @@ export const getSessionReplayLink = async () => {
|
|
|
86
91
|
* ```
|
|
87
92
|
*/
|
|
88
93
|
export const setSyncCallback = async (handler) => {
|
|
94
|
+
console.log('[LCQ-RN] SessionReplay.setSyncCallback called');
|
|
89
95
|
emitter.addListener(NativeEvents.SESSION_REPLAY_ON_SYNC_CALLBACK_INVOCATION, (payload) => {
|
|
90
96
|
const result = handler(payload);
|
|
91
97
|
const shouldSync = Boolean(result);
|