@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.
@@ -53,6 +53,7 @@ let shouldEnableNativeInterception = false; // For Android: used to disable APM
53
53
  * @param isEnabled A boolean to enable/disable Luciq.
54
54
  */
55
55
  export const setEnabled = (isEnabled: boolean) => {
56
+ console.log('[LCQ-RN] Luciq.setEnabled called', { isEnabled });
56
57
  NativeLuciq.setEnabled(isEnabled);
57
58
  };
58
59
 
@@ -81,6 +82,7 @@ function reportCurrentViewForAndroid(screenName: string | null) {
81
82
  * @param config SDK configurations. See {@link LuciqConfig} for more info.
82
83
  */
83
84
  export const init = (config: LuciqConfig) => {
85
+ console.log('[LCQ-RN] Luciq.init called', { config });
84
86
  if (Platform.OS === 'android') {
85
87
  // Add android feature flags listener for android
86
88
  registerFeatureFlagsListener();
@@ -127,6 +129,7 @@ export const init = (config: LuciqConfig) => {
127
129
  * @param appVariant the current App variant name
128
130
  */
129
131
  export const setAppVariant = (appVariant: string) => {
132
+ console.log('[LCQ-RN] Luciq.setAppVariant called', { appVariant });
130
133
  NativeLuciq.setAppVariant(appVariant);
131
134
  };
132
135
 
@@ -328,6 +331,7 @@ function addOnFeatureUpdatedListener(config: LuciqConfig) {
328
331
  * @deprecated Use {@link setOverAirVersion} instead.
329
332
  */
330
333
  export const setCodePushVersion = (version: string) => {
334
+ console.log('[LCQ-RN] Luciq.setCodePushVersion called', { version });
331
335
  NativeLuciq.setCodePushVersion(version);
332
336
  };
333
337
 
@@ -337,6 +341,7 @@ export const setCodePushVersion = (version: string) => {
337
341
  *
338
342
  */
339
343
  export const setOverAirVersion = (OTAserviceVersion: OverAirUpdate) => {
344
+ console.log('[LCQ-RN] Luciq.setOverAirVersion called', { OTAserviceVersion });
340
345
  NativeLuciq.setOverAirVersion(OTAserviceVersion);
341
346
  };
342
347
 
@@ -347,6 +352,7 @@ export const setOverAirVersion = (OTAserviceVersion: OverAirUpdate) => {
347
352
  * @param data A string to be attached to each report, with a maximum size of 1,000 characters.
348
353
  */
349
354
  export const setUserData = (data: string) => {
355
+ console.log('[LCQ-RN] Luciq.setUserData called', { data });
350
356
  NativeLuciq.setUserData(data);
351
357
  };
352
358
 
@@ -358,6 +364,7 @@ export const setUserData = (data: string) => {
358
364
  * @param isEnabled A boolean to set user steps tracking to being enabled or disabled.
359
365
  */
360
366
  export const setTrackUserSteps = (isEnabled: boolean) => {
367
+ console.log('[LCQ-RN] Luciq.setTrackUserSteps called', { isEnabled });
361
368
  if (Platform.OS === 'ios') {
362
369
  NativeLuciq.setTrackUserSteps(isEnabled);
363
370
  }
@@ -369,6 +376,7 @@ export const setTrackUserSteps = (isEnabled: boolean) => {
369
376
  * Xcode's console is enabled or not.
370
377
  */
371
378
  export const setLCQLogPrintsToConsole = (printsToConsole: boolean) => {
379
+ console.log('[LCQ-RN] Luciq.setLCQLogPrintsToConsole called', { printsToConsole });
372
380
  if (Platform.OS === 'ios') {
373
381
  NativeLuciq.setLCQLogPrintsToConsole(printsToConsole);
374
382
  }
@@ -380,6 +388,7 @@ export const setLCQLogPrintsToConsole = (printsToConsole: boolean) => {
380
388
  * @param isEnabled A boolean parameter to enable or disable the feature.
381
389
  */
382
390
  export const setSessionProfilerEnabled = (isEnabled: boolean) => {
391
+ console.log('[LCQ-RN] Luciq.setSessionProfilerEnabled called', { isEnabled });
383
392
  NativeLuciq.setSessionProfilerEnabled(isEnabled);
384
393
  };
385
394
 
@@ -390,6 +399,7 @@ export const setSessionProfilerEnabled = (isEnabled: boolean) => {
390
399
  * @param sdkLocale A locale to set the SDK to.
391
400
  */
392
401
  export const setLocale = (sdkLocale: Locale) => {
402
+ console.log('[LCQ-RN] Luciq.setLocale called', { sdkLocale });
393
403
  NativeLuciq.setLocale(sdkLocale);
394
404
  };
395
405
 
@@ -398,6 +408,7 @@ export const setLocale = (sdkLocale: Locale) => {
398
408
  * @param sdkTheme
399
409
  */
400
410
  export const setColorTheme = (sdkTheme: ColorTheme) => {
411
+ console.log('[LCQ-RN] Luciq.setColorTheme called', { sdkTheme });
401
412
  NativeLuciq.setColorTheme(sdkTheme);
402
413
  };
403
414
 
@@ -410,6 +421,7 @@ export const setColorTheme = (sdkTheme: ColorTheme) => {
410
421
  * @deprecated Please migrate to the new UI customization API: {@link setTheme}
411
422
  */
412
423
  export const setPrimaryColor = (color: string) => {
424
+ console.log('[LCQ-RN] Luciq.setPrimaryColor called', { color });
413
425
  NativeLuciq.setTheme({ primaryColor: color });
414
426
  };
415
427
 
@@ -419,6 +431,7 @@ export const setPrimaryColor = (color: string) => {
419
431
  * @param tags An array of tags to append to current tags.
420
432
  */
421
433
  export const appendTags = (tags: string[]) => {
434
+ console.log('[LCQ-RN] Luciq.appendTags called', { tags });
422
435
  NativeLuciq.appendTags(tags);
423
436
  };
424
437
 
@@ -426,6 +439,7 @@ export const appendTags = (tags: string[]) => {
426
439
  * Manually removes all tags of reported feedback, bug or crash.
427
440
  */
428
441
  export const resetTags = () => {
442
+ console.log('[LCQ-RN] Luciq.resetTags called');
429
443
  NativeLuciq.resetTags();
430
444
  };
431
445
 
@@ -433,6 +447,7 @@ export const resetTags = () => {
433
447
  * Gets all tags of reported feedback, bug or crash.
434
448
  */
435
449
  export const getTags = async (): Promise<string[] | null> => {
450
+ console.log('[LCQ-RN] Luciq.getTags called');
436
451
  const tags = await NativeLuciq.getTags();
437
452
 
438
453
  return tags;
@@ -445,6 +460,7 @@ export const getTags = async (): Promise<string[] | null> => {
445
460
  * @param string String value to override the default one.
446
461
  */
447
462
  export const setString = (key: StringKey, string: string) => {
463
+ console.log('[LCQ-RN] Luciq.setString called', { key, string });
448
464
  // Suffix the repro steps list item numbering title with a # to unify the string key's
449
465
  // behavior between Android and iOS
450
466
  if (Platform.OS === 'android' && key === StringKey.reproStepsListItemNumberingTitle) {
@@ -464,6 +480,7 @@ export const setString = (key: StringKey, string: string) => {
464
480
  * @param [id] ID of the user to be set.
465
481
  */
466
482
  export const identifyUser = (email: string, name: string, id?: string) => {
483
+ console.log('[LCQ-RN] Luciq.identifyUser called', { email, name, id });
467
484
  NativeLuciq.identifyUser(email, name, id);
468
485
  };
469
486
 
@@ -473,6 +490,7 @@ export const identifyUser = (email: string, name: string, id?: string) => {
473
490
  * It also reset the chats on device and removes user attributes, user data and completed surveys.
474
491
  */
475
492
  export const logOut = () => {
493
+ console.log('[LCQ-RN] Luciq.logOut called');
476
494
  NativeLuciq.logOut();
477
495
  };
478
496
 
@@ -482,6 +500,7 @@ export const logOut = () => {
482
500
  * @param name Event name.
483
501
  */
484
502
  export const logUserEvent = (name: string) => {
503
+ console.log('[LCQ-RN] Luciq.logUserEvent called', { name });
485
504
  NativeLuciq.logUserEvent(name);
486
505
  };
487
506
 
@@ -496,6 +515,7 @@ export const logUserEvent = (name: string) => {
496
515
  * @param message the message
497
516
  */
498
517
  export const logVerbose = (message: string) => {
518
+ console.log('[LCQ-RN] Luciq.logVerbose called', { message });
499
519
  if (!message) {
500
520
  return;
501
521
  }
@@ -514,6 +534,7 @@ export const logVerbose = (message: string) => {
514
534
  * @param message the message
515
535
  */
516
536
  export const logInfo = (message: string) => {
537
+ console.log('[LCQ-RN] Luciq.logInfo called', { message });
517
538
  if (!message) {
518
539
  return;
519
540
  }
@@ -532,6 +553,7 @@ export const logInfo = (message: string) => {
532
553
  * @param message the message
533
554
  */
534
555
  export const logDebug = (message: string) => {
556
+ console.log('[LCQ-RN] Luciq.logDebug called', { message });
535
557
  if (!message) {
536
558
  return;
537
559
  }
@@ -550,6 +572,7 @@ export const logDebug = (message: string) => {
550
572
  * @param message the message
551
573
  */
552
574
  export const logError = (message: string) => {
575
+ console.log('[LCQ-RN] Luciq.logError called', { message });
553
576
  if (!message) {
554
577
  return;
555
578
  }
@@ -568,6 +591,7 @@ export const logError = (message: string) => {
568
591
  * @param message the message
569
592
  */
570
593
  export const logWarn = (message: string) => {
594
+ console.log('[LCQ-RN] Luciq.logWarn called', { message });
571
595
  if (!message) {
572
596
  return;
573
597
  }
@@ -579,6 +603,7 @@ export const logWarn = (message: string) => {
579
603
  * Clear all Luciq logs, console logs, network logs and user steps.
580
604
  */
581
605
  export const clearLogs = () => {
606
+ console.log('[LCQ-RN] Luciq.clearLogs called');
582
607
  NativeLuciq.clearLogs();
583
608
  };
584
609
 
@@ -597,6 +622,7 @@ export const clearLogs = () => {
597
622
  * ```
598
623
  */
599
624
  export const setReproStepsConfig = (config: ReproConfig) => {
625
+ console.log('[LCQ-RN] Luciq.setReproStepsConfig called', { config });
600
626
  let bug = config.bug ?? ReproStepsMode.enabled;
601
627
  let crash = config.crash ?? ReproStepsMode.enabledWithNoScreenshots;
602
628
  let sessionReplay = config.sessionReplay ?? ReproStepsMode.enabled;
@@ -617,6 +643,7 @@ export const setReproStepsConfig = (config: ReproConfig) => {
617
643
  * @param value the value
618
644
  */
619
645
  export const setUserAttribute = (key: string, value: string) => {
646
+ console.log('[LCQ-RN] Luciq.setUserAttribute called', { key, value });
620
647
  if (!key || typeof key !== 'string' || typeof value !== 'string') {
621
648
  Logger.error(LuciqConstants.SET_USER_ATTRIBUTES_ERROR_TYPE_MESSAGE);
622
649
  return;
@@ -630,6 +657,7 @@ export const setUserAttribute = (key: string, value: string) => {
630
657
  * @param key The attribute key as string
631
658
  */
632
659
  export const getUserAttribute = async (key: string): Promise<string | null> => {
660
+ console.log('[LCQ-RN] Luciq.getUserAttribute called', { key });
633
661
  const attribute = await NativeLuciq.getUserAttribute(key);
634
662
 
635
663
  return attribute;
@@ -642,6 +670,7 @@ export const getUserAttribute = async (key: string): Promise<string | null> => {
642
670
  * @see {@link setUserAttribute}
643
671
  */
644
672
  export const removeUserAttribute = (key: string) => {
673
+ console.log('[LCQ-RN] Luciq.removeUserAttribute called', { key });
645
674
  if (!key || typeof key !== 'string') {
646
675
  Logger.error(LuciqConstants.REMOVE_USER_ATTRIBUTES_ERROR_TYPE_MESSAGE);
647
676
 
@@ -655,6 +684,7 @@ export const removeUserAttribute = (key: string) => {
655
684
  * set user attributes, or an empty dictionary if no user attributes have been set.
656
685
  */
657
686
  export const getAllUserAttributes = async (): Promise<Record<string, string>> => {
687
+ console.log('[LCQ-RN] Luciq.getAllUserAttributes called');
658
688
  const attributes = await NativeLuciq.getAllUserAttributes();
659
689
 
660
690
  return attributes;
@@ -664,6 +694,7 @@ export const getAllUserAttributes = async (): Promise<Record<string, string>> =>
664
694
  * Clears all user attributes if exists.
665
695
  */
666
696
  export const clearAllUserAttributes = () => {
697
+ console.log('[LCQ-RN] Luciq.clearAllUserAttributes called');
667
698
  NativeLuciq.clearAllUserAttributes();
668
699
  };
669
700
 
@@ -672,6 +703,7 @@ export const clearAllUserAttributes = () => {
672
703
  * @param mode An enum to set the welcome message mode to live, or beta.
673
704
  */
674
705
  export const showWelcomeMessage = (mode: WelcomeMessageMode) => {
706
+ console.log('[LCQ-RN] Luciq.showWelcomeMessage called', { mode });
675
707
  NativeLuciq.showWelcomeMessageWithMode(mode);
676
708
  };
677
709
 
@@ -680,6 +712,7 @@ export const showWelcomeMessage = (mode: WelcomeMessageMode) => {
680
712
  * @param mode An enum to set the welcome message mode to live, beta or disabled.
681
713
  */
682
714
  export const setWelcomeMessageMode = (mode: WelcomeMessageMode) => {
715
+ console.log('[LCQ-RN] Luciq.setWelcomeMessageMode called', { mode });
683
716
  NativeLuciq.setWelcomeMessageMode(mode);
684
717
  };
685
718
 
@@ -689,6 +722,7 @@ export const setWelcomeMessageMode = (mode: WelcomeMessageMode) => {
689
722
  * @param fileName
690
723
  */
691
724
  export const addFileAttachment = (filePath: string, fileName: string) => {
725
+ console.log('[LCQ-RN] Luciq.addFileAttachment called', { filePath, fileName });
692
726
  if (Platform.OS === 'android') {
693
727
  NativeLuciq.setFileAttachment(filePath, fileName);
694
728
  } else {
@@ -701,6 +735,7 @@ export const addFileAttachment = (filePath: string, fileName: string) => {
701
735
  * @param viewRef the ref of the component to hide
702
736
  */
703
737
  export const addPrivateView = (viewRef: number | React.Component | React.ComponentClass) => {
738
+ console.log('[LCQ-RN] Luciq.addPrivateView called', { viewRef });
704
739
  const nativeTag = findNodeHandle(viewRef);
705
740
  NativeLuciq.addPrivateView(nativeTag);
706
741
  };
@@ -711,6 +746,7 @@ export const addPrivateView = (viewRef: number | React.Component | React.Compone
711
746
  * @param viewRef the ref of the component to remove from hidden views
712
747
  */
713
748
  export const removePrivateView = (viewRef: number | React.Component | React.ComponentClass) => {
749
+ console.log('[LCQ-RN] Luciq.removePrivateView called', { viewRef });
714
750
  const nativeTag = findNodeHandle(viewRef);
715
751
  NativeLuciq.removePrivateView(nativeTag);
716
752
  };
@@ -719,10 +755,12 @@ export const removePrivateView = (viewRef: number | React.Component | React.Comp
719
755
  * Shows default Luciq prompt.
720
756
  */
721
757
  export const show = () => {
758
+ console.log('[LCQ-RN] Luciq.show called');
722
759
  NativeLuciq.show();
723
760
  };
724
761
 
725
762
  export const onReportSubmitHandler = (handler?: (report: Report) => void) => {
763
+ console.log('[LCQ-RN] Luciq.onReportSubmitHandler called');
726
764
  emitter.addListener(NativeEvents.PRESENDING_HANDLER, (report) => {
727
765
  const { tags, consoleLogs, luciqLogs, userAttributes, fileAttachments } = report;
728
766
  const reportObj = new Report(tags, consoleLogs, luciqLogs, userAttributes, fileAttachments);
@@ -737,6 +775,11 @@ export const onNavigationStateChange = (
737
775
  currentState: NavigationStateV4,
738
776
  _action: NavigationAction,
739
777
  ) => {
778
+ console.log('[LCQ-RN] Luciq.onNavigationStateChange called', {
779
+ prevState,
780
+ currentState,
781
+ _action,
782
+ });
740
783
  const currentScreen = LuciqUtils.getActiveRouteName(currentState);
741
784
  const prevScreen = LuciqUtils.getActiveRouteName(prevState);
742
785
 
@@ -757,6 +800,7 @@ export const onNavigationStateChange = (
757
800
  };
758
801
 
759
802
  export const onStateChange = (state?: NavigationStateV5) => {
803
+ console.log('[LCQ-RN] Luciq.onStateChange called', { state });
760
804
  if (!state) {
761
805
  return;
762
806
  }
@@ -785,12 +829,14 @@ export const onStateChange = (state?: NavigationStateV5) => {
785
829
  export const setNavigationListener = (
786
830
  navigationRef: NavigationContainerRefWithCurrent<ReactNavigation.RootParamList>,
787
831
  ) => {
832
+ console.log('[LCQ-RN] Luciq.setNavigationListener called', { navigationRef });
788
833
  return navigationRef.addListener('state', () => {
789
834
  onStateChange(navigationRef.getRootState());
790
835
  });
791
836
  };
792
837
 
793
838
  export const reportScreenChange = (screenName: string) => {
839
+ console.log('[LCQ-RN] Luciq.reportScreenChange called', { screenName });
794
840
  NativeLuciq.reportScreenChange(screenName);
795
841
  };
796
842
 
@@ -799,6 +845,7 @@ export const reportScreenChange = (screenName: string) => {
799
845
  * @param featureFlags An array of feature flags to add to the next report.
800
846
  */
801
847
  export const addFeatureFlags = (featureFlags: FeatureFlag[]) => {
848
+ console.log('[LCQ-RN] Luciq.addFeatureFlags called', { featureFlags });
802
849
  const entries = featureFlags.map((item) => [item.name, item.variant || '']);
803
850
  const flags = Object.fromEntries(entries);
804
851
  NativeLuciq.addFeatureFlags(flags);
@@ -808,6 +855,7 @@ export const addFeatureFlags = (featureFlags: FeatureFlag[]) => {
808
855
  * Add a feature flag to the to next report.
809
856
  */
810
857
  export const addFeatureFlag = (featureFlag: FeatureFlag) => {
858
+ console.log('[LCQ-RN] Luciq.addFeatureFlag called', { featureFlag });
811
859
  addFeatureFlags([featureFlag]);
812
860
  };
813
861
 
@@ -816,6 +864,7 @@ export const addFeatureFlag = (featureFlag: FeatureFlag) => {
816
864
  * @param featureFlags An array of feature flags to remove from the next report.
817
865
  */
818
866
  export const removeFeatureFlags = (featureFlags: string[]) => {
867
+ console.log('[LCQ-RN] Luciq.removeFeatureFlags called', { featureFlags });
819
868
  NativeLuciq.removeFeatureFlags(featureFlags);
820
869
  };
821
870
 
@@ -824,6 +873,7 @@ export const removeFeatureFlags = (featureFlags: string[]) => {
824
873
  * @param name the name of the feature flag to remove from the next report.
825
874
  */
826
875
  export const removeFeatureFlag = (name: string) => {
876
+ console.log('[LCQ-RN] Luciq.removeFeatureFlag called', { name });
827
877
  removeFeatureFlags([name]);
828
878
  };
829
879
 
@@ -831,6 +881,7 @@ export const removeFeatureFlag = (name: string) => {
831
881
  * Clear all feature flags
832
882
  */
833
883
  export const removeAllFeatureFlags = () => {
884
+ console.log('[LCQ-RN] Luciq.removeAllFeatureFlags called');
834
885
  NativeLuciq.removeAllFeatureFlags();
835
886
  };
836
887
 
@@ -838,6 +889,7 @@ export const removeAllFeatureFlags = () => {
838
889
  * This API has to be call when using custom app rating prompt
839
890
  */
840
891
  export const willRedirectToStore = () => {
892
+ console.log('[LCQ-RN] Luciq.willRedirectToStore called');
841
893
  NativeLuciq.willRedirectToStore();
842
894
  };
843
895
 
@@ -845,10 +897,12 @@ export const willRedirectToStore = () => {
845
897
  * This API has be called when changing the default Metro server port (8081) to exclude the DEV URL from network logging.
846
898
  */
847
899
  export const setMetroDevServerPort = (port: number) => {
900
+ console.log('[LCQ-RN] Luciq.setMetroDevServerPort called', { port });
848
901
  LuciqRNConfig.metroDevServerPort = port.toString();
849
902
  };
850
903
 
851
904
  export const componentDidAppearListener = (event: ComponentDidAppearEvent) => {
905
+ console.log('[LCQ-RN] Luciq.componentDidAppearListener called', { event });
852
906
  if (_isFirstScreen) {
853
907
  _lastScreen = event.componentName;
854
908
  _isFirstScreen = false;
@@ -872,6 +926,7 @@ export const _registerFeatureFlagsChangeListener = (
872
926
  networkBodyLimit: number;
873
927
  }) => void,
874
928
  ) => {
929
+ console.log('[LCQ-RN] Luciq._registerFeatureFlagsChangeListener called');
875
930
  emitter.addListener(NativeEvents.ON_FEATURE_FLAGS_CHANGE, (payload) => {
876
931
  handler(payload);
877
932
  });
@@ -883,6 +938,7 @@ export const _registerFeatureFlagsChangeListener = (
883
938
  * @param autoMaskingTypes The masking type to be applied.
884
939
  */
885
940
  export const enableAutoMasking = (autoMaskingTypes: AutoMaskingType[]) => {
941
+ console.log('[LCQ-RN] Luciq.enableAutoMasking called', { autoMaskingTypes });
886
942
  NativeLuciq.enableAutoMasking(autoMaskingTypes);
887
943
  };
888
944
 
@@ -921,6 +977,7 @@ export const enableAutoMasking = (autoMaskingTypes: AutoMaskingType[]) => {
921
977
  * ```
922
978
  */
923
979
  export const setTheme = (theme: ThemeConfig) => {
980
+ console.log('[LCQ-RN] Luciq.setTheme called', { theme });
924
981
  NativeLuciq.setTheme(theme);
925
982
  };
926
983
  /**
@@ -928,6 +985,7 @@ export const setTheme = (theme: ThemeConfig) => {
928
985
  * @param isEnabled A boolean to enable/disable setFullscreen.
929
986
  */
930
987
  export const setFullscreen = (isEnabled: boolean) => {
988
+ console.log('[LCQ-RN] Luciq.setFullscreen called', { isEnabled });
931
989
  if (Platform.OS === 'android') {
932
990
  NativeLuciq.setFullscreen(isEnabled);
933
991
  }
@@ -40,6 +40,7 @@ function getPortFromUrl(url: string) {
40
40
  * @param isEnabled
41
41
  */
42
42
  export const setEnabled = (isEnabled: boolean) => {
43
+ console.log('[LCQ-RN] NetworkLogger.setEnabled called', { isEnabled });
43
44
  if (isEnabled) {
44
45
  xhr.enableInterception();
45
46
  xhr.setOnDoneCallback(async (network) => {
@@ -115,14 +116,24 @@ export const setEnabled = (isEnabled: boolean) => {
115
116
  * @param isEnabled
116
117
  */
117
118
  export const setNativeInterceptionEnabled = (isEnabled: boolean) => {
119
+ console.log('[LCQ-RN] NetworkLogger.setNativeInterceptionEnabled called', { isEnabled });
118
120
  _isNativeInterceptionEnabled = isEnabled;
119
121
  };
120
122
 
121
- export const getNetworkDataObfuscationHandler = () => _networkDataObfuscationHandler;
123
+ export const getNetworkDataObfuscationHandler = () => {
124
+ console.log('[LCQ-RN] NetworkLogger.getNetworkDataObfuscationHandler called');
125
+ return _networkDataObfuscationHandler;
126
+ };
122
127
 
123
- export const getRequestFilterExpression = () => _requestFilterExpression;
128
+ export const getRequestFilterExpression = () => {
129
+ console.log('[LCQ-RN] NetworkLogger.getRequestFilterExpression called');
130
+ return _requestFilterExpression;
131
+ };
124
132
 
125
- export const hasRequestFilterExpression = () => hasFilterExpression;
133
+ export const hasRequestFilterExpression = () => {
134
+ console.log('[LCQ-RN] NetworkLogger.hasRequestFilterExpression called');
135
+ return hasFilterExpression;
136
+ };
126
137
 
127
138
  /**
128
139
  * Obfuscates any response data.
@@ -131,6 +142,7 @@ export const hasRequestFilterExpression = () => hasFilterExpression;
131
142
  export const setNetworkDataObfuscationHandler = (
132
143
  handler?: NetworkDataObfuscationHandler | null | undefined,
133
144
  ) => {
145
+ console.log('[LCQ-RN] NetworkLogger.setNetworkDataObfuscationHandler called', { handler });
134
146
  _networkDataObfuscationHandler = handler;
135
147
  if (_isNativeInterceptionEnabled && Platform.OS === 'ios') {
136
148
  if (hasFilterExpression) {
@@ -146,6 +158,7 @@ export const setNetworkDataObfuscationHandler = (
146
158
  * @param expression
147
159
  */
148
160
  export const setRequestFilterExpression = (expression: string) => {
161
+ console.log('[LCQ-RN] NetworkLogger.setRequestFilterExpression called', { expression });
149
162
  _requestFilterExpression = expression;
150
163
  hasFilterExpression = true;
151
164
 
@@ -163,10 +176,12 @@ export const setRequestFilterExpression = (expression: string) => {
163
176
  * @param handler
164
177
  */
165
178
  export const setProgressHandlerForRequest = (handler: ProgressCallback) => {
179
+ console.log('[LCQ-RN] NetworkLogger.setProgressHandlerForRequest called', { handler });
166
180
  xhr.setOnProgressCallback(handler);
167
181
  };
168
182
 
169
183
  export const apolloLinkRequestHandler: RequestHandler = (operation, forward) => {
184
+ console.log('[LCQ-RN] NetworkLogger.apolloLinkRequestHandler called', { operation });
170
185
  try {
171
186
  operation.setContext((context: Record<string, any>) => {
172
187
  const newHeaders: Record<string, any> = context.headers ?? {};
@@ -185,6 +200,7 @@ export const apolloLinkRequestHandler: RequestHandler = (operation, forward) =>
185
200
  * @param isEnabled
186
201
  */
187
202
  export const setNetworkLogBodyEnabled = (isEnabled: boolean) => {
203
+ console.log('[LCQ-RN] NetworkLogger.setNetworkLogBodyEnabled called', { isEnabled });
188
204
  NativeLuciq.setNetworkLogBodyEnabled(isEnabled);
189
205
  };
190
206
 
@@ -193,6 +209,7 @@ export const setNetworkLogBodyEnabled = (isEnabled: boolean) => {
193
209
  * Exported for internal/testing purposes only.
194
210
  */
195
211
  export const resetNetworkListener = () => {
212
+ console.log('[LCQ-RN] NetworkLogger.resetNetworkListener called');
196
213
  if (process.env.NODE_ENV === 'test') {
197
214
  _networkListener = null;
198
215
  NativeNetworkLogger.resetNetworkLogsListener();
@@ -211,6 +228,7 @@ export const registerNetworkLogsListener = (
211
228
  type: NetworkListenerType,
212
229
  handler?: (networkSnapshot: NetworkData) => void,
213
230
  ) => {
231
+ console.log('[LCQ-RN] NetworkLogger.registerNetworkLogsListener called', { type, handler });
214
232
  if (Platform.OS === 'ios') {
215
233
  // remove old listeners
216
234
  if (NetworkLoggerEmitter.listenerCount(NativeNetworkLoggerEvent.NETWORK_LOGGER_HANDLER) > 0) {
@@ -7,6 +7,7 @@ import { NativeEvents, NativeReplies, emitter } from '../native/NativeReplies';
7
7
  * @param isEnabled
8
8
  */
9
9
  export const setEnabled = (isEnabled: boolean) => {
10
+ console.log('[LCQ-RN] Replies.setEnabled called', { isEnabled });
10
11
  NativeReplies.setEnabled(isEnabled);
11
12
  };
12
13
 
@@ -14,6 +15,7 @@ export const setEnabled = (isEnabled: boolean) => {
14
15
  * Tells whether the user has chats already or not.
15
16
  */
16
17
  export const hasChats = async (): Promise<boolean> => {
18
+ console.log('[LCQ-RN] Replies.hasChats called');
17
19
  const result = await NativeReplies.hasChats();
18
20
 
19
21
  return result;
@@ -23,6 +25,7 @@ export const hasChats = async (): Promise<boolean> => {
23
25
  * Manual invocation for replies.
24
26
  */
25
27
  export const show = () => {
28
+ console.log('[LCQ-RN] Replies.show called');
26
29
  NativeReplies.show();
27
30
  };
28
31
 
@@ -31,6 +34,7 @@ export const show = () => {
31
34
  * @param handler A callback that gets executed when a new message is received.
32
35
  */
33
36
  export const setOnNewReplyReceivedHandler = (handler: () => void) => {
37
+ console.log('[LCQ-RN] Replies.setOnNewReplyReceivedHandler called');
34
38
  emitter.addListener(NativeEvents.ON_REPLY_RECEIVED_HANDLER, handler);
35
39
  NativeReplies.setOnNewReplyReceivedHandler(handler);
36
40
  };
@@ -42,6 +46,7 @@ export const setOnNewReplyReceivedHandler = (handler: () => void) => {
42
46
  * Notifications count, or -1 in case the SDK has not been initialized.
43
47
  */
44
48
  export const getUnreadRepliesCount = async (): Promise<number> => {
49
+ console.log('[LCQ-RN] Replies.getUnreadRepliesCount called');
45
50
  const count = await NativeReplies.getUnreadRepliesCount();
46
51
 
47
52
  return count;
@@ -54,6 +59,7 @@ export const getUnreadRepliesCount = async (): Promise<number> => {
54
59
  * notifications are enabled or disabled.
55
60
  */
56
61
  export const setInAppNotificationsEnabled = (isEnabled: boolean) => {
62
+ console.log('[LCQ-RN] Replies.setInAppNotificationsEnabled called', { isEnabled });
57
63
  NativeReplies.setInAppNotificationEnabled(isEnabled);
58
64
  };
59
65
 
@@ -65,6 +71,7 @@ export const setInAppNotificationsEnabled = (isEnabled: boolean) => {
65
71
  * @param isEnabled desired state of conversation sounds
66
72
  */
67
73
  export const setInAppNotificationSound = (isEnabled: boolean) => {
74
+ console.log('[LCQ-RN] Replies.setInAppNotificationSound called', { isEnabled });
68
75
  if (Platform.OS === 'android') {
69
76
  NativeReplies.setInAppNotificationSound(isEnabled);
70
77
  }
@@ -76,6 +83,7 @@ export const setInAppNotificationSound = (isEnabled: boolean) => {
76
83
  * @param isEnabled A boolean to indicate whether push notifications are enabled or disabled.
77
84
  */
78
85
  export const setPushNotificationsEnabled = (isEnabled: boolean) => {
86
+ console.log('[LCQ-RN] Replies.setPushNotificationsEnabled called', { isEnabled });
79
87
  NativeReplies.setPushNotificationsEnabled(isEnabled);
80
88
  };
81
89
 
@@ -85,6 +93,7 @@ export const setPushNotificationsEnabled = (isEnabled: boolean) => {
85
93
  * @param token the GCM registration token
86
94
  */
87
95
  export const setPushNotificationRegistrationTokenAndroid = (token: string) => {
96
+ console.log('[LCQ-RN] Replies.setPushNotificationRegistrationTokenAndroid called', { token });
88
97
  if (Platform.OS === 'android') {
89
98
  NativeReplies.setPushNotificationRegistrationToken(token);
90
99
  }
@@ -96,6 +105,7 @@ export const setPushNotificationRegistrationTokenAndroid = (token: string) => {
96
105
  * @param data the data bundle related to Luciq
97
106
  */
98
107
  export const showNotificationAndroid = (data: Record<string, string>) => {
108
+ console.log('[LCQ-RN] Replies.showNotificationAndroid called', { data });
99
109
  if (Platform.OS === 'android') {
100
110
  NativeReplies.showNotification(data);
101
111
  }
@@ -107,6 +117,7 @@ export const showNotificationAndroid = (data: Record<string, string>) => {
107
117
  * @param resourceId the notification icon resource ID
108
118
  */
109
119
  export const setNotificationIconAndroid = (resourceId: number) => {
120
+ console.log('[LCQ-RN] Replies.setNotificationIconAndroid called', { resourceId });
110
121
  if (Platform.OS === 'android') {
111
122
  NativeReplies.setNotificationIcon(resourceId);
112
123
  }
@@ -119,6 +130,7 @@ export const setNotificationIconAndroid = (resourceId: number) => {
119
130
  * @param id an id to a notification channel that notifications
120
131
  */
121
132
  export const setPushNotificationChannelIdAndroid = (id: string) => {
133
+ console.log('[LCQ-RN] Replies.setPushNotificationChannelIdAndroid called', { id });
122
134
  if (Platform.OS === 'android') {
123
135
  NativeReplies.setPushNotificationChannelId(id);
124
136
  }
@@ -131,6 +143,9 @@ export const setPushNotificationChannelIdAndroid = (id: string) => {
131
143
  * @param isEnabled desired state of conversation sounds
132
144
  */
133
145
  export const setSystemReplyNotificationSoundEnabledAndroid = (isEnabled: boolean) => {
146
+ console.log('[LCQ-RN] Replies.setSystemReplyNotificationSoundEnabledAndroid called', {
147
+ isEnabled,
148
+ });
134
149
  if (Platform.OS === 'android') {
135
150
  NativeReplies.setSystemReplyNotificationSoundEnabled(isEnabled);
136
151
  }
@@ -13,6 +13,7 @@ import type { SessionMetadata } from '../models/SessionMetadata';
13
13
  * ```
14
14
  */
15
15
  export const setEnabled = (isEnabled: boolean) => {
16
+ console.log('[LCQ-RN] SessionReplay.setEnabled called', { isEnabled });
16
17
  NativeSessionReplay.setEnabled(isEnabled);
17
18
  };
18
19
 
@@ -29,6 +30,7 @@ export const setEnabled = (isEnabled: boolean) => {
29
30
  * ```
30
31
  */
31
32
  export const setNetworkLogsEnabled = (isEnabled: boolean) => {
33
+ console.log('[LCQ-RN] SessionReplay.setNetworkLogsEnabled called', { isEnabled });
32
34
  NativeSessionReplay.setNetworkLogsEnabled(isEnabled);
33
35
  };
34
36
 
@@ -45,6 +47,7 @@ export const setNetworkLogsEnabled = (isEnabled: boolean) => {
45
47
  * ```
46
48
  */
47
49
  export const setLuciqLogsEnabled = (isEnabled: boolean) => {
50
+ console.log('[LCQ-RN] SessionReplay.setLuciqLogsEnabled called', { isEnabled });
48
51
  NativeSessionReplay.setLuciqLogsEnabled(isEnabled);
49
52
  };
50
53
 
@@ -61,6 +64,7 @@ export const setLuciqLogsEnabled = (isEnabled: boolean) => {
61
64
  * ```
62
65
  */
63
66
  export const setUserStepsEnabled = (isEnabled: boolean) => {
67
+ console.log('[LCQ-RN] SessionReplay.setUserStepsEnabled called', { isEnabled });
64
68
  NativeSessionReplay.setUserStepsEnabled(isEnabled);
65
69
  };
66
70
 
@@ -73,6 +77,7 @@ export const setUserStepsEnabled = (isEnabled: boolean) => {
73
77
  * ```
74
78
  */
75
79
  export const getSessionReplayLink = async (): Promise<string> => {
80
+ console.log('[LCQ-RN] SessionReplay.getSessionReplayLink called');
76
81
  return NativeSessionReplay.getSessionReplayLink();
77
82
  };
78
83
 
@@ -94,6 +99,7 @@ export const getSessionReplayLink = async (): Promise<string> => {
94
99
  export const setSyncCallback = async (
95
100
  handler: (payload: SessionMetadata) => boolean,
96
101
  ): Promise<void> => {
102
+ console.log('[LCQ-RN] SessionReplay.setSyncCallback called');
97
103
  emitter.addListener(NativeEvents.SESSION_REPLAY_ON_SYNC_CALLBACK_INVOCATION, (payload) => {
98
104
  const result = handler(payload);
99
105
  const shouldSync = Boolean(result);