@luciq/react-native 19.0.0-286-SNAPSHOT → 19.1.0

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