clevertap-react-native 0.5.0 → 0.7.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 (117) hide show
  1. package/.codebeatignore +1 -1
  2. package/CHANGELOG.md +28 -0
  3. package/LICENSE +2 -2
  4. package/README.md +21 -18
  5. package/android/.gradle/6.1.1/executionHistory/executionHistory.bin +0 -0
  6. package/android/.gradle/6.1.1/executionHistory/executionHistory.lock +0 -0
  7. package/android/.gradle/6.1.1/fileContent/fileContent.lock +0 -0
  8. package/android/.gradle/6.1.1/fileHashes/fileHashes.bin +0 -0
  9. package/android/.gradle/6.1.1/fileHashes/fileHashes.lock +0 -0
  10. package/android/.gradle/{5.4.1 → 6.1.1}/fileHashes/resourceHashesCache.bin +0 -0
  11. package/android/.gradle/6.1.1/javaCompile/classAnalysis.bin +0 -0
  12. package/android/.gradle/6.1.1/javaCompile/jarAnalysis.bin +0 -0
  13. package/android/.gradle/6.1.1/javaCompile/javaCompile.lock +0 -0
  14. package/android/.gradle/6.1.1/javaCompile/taskHistory.bin +0 -0
  15. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  16. package/android/.gradle/buildOutputCleanup/cache.properties +1 -1
  17. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  18. package/android/.gradle/checksums/checksums.lock +0 -0
  19. package/android/.gradle/checksums/md5-checksums.bin +0 -0
  20. package/android/.gradle/checksums/sha1-checksums.bin +0 -0
  21. package/android/android.iml +24 -18
  22. package/android/build/generated/source/buildConfig/debug/com/clevertap/react/BuildConfig.java +2 -8
  23. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml +3 -8
  24. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output.json +27 -1
  25. package/android/build/intermediates/aar_main_jar/debug/classes.jar +0 -0
  26. package/android/build/intermediates/annotations_typedef_file/debug/{extractDebugAnnotations/typedefs.txt → typedefs.txt} +0 -0
  27. package/android/build/intermediates/compile_only_not_namespaced_r_class_jar/debug/R.jar +0 -0
  28. package/android/build/intermediates/compile_symbol_list/debug/R.txt +4287 -0
  29. package/android/build/intermediates/incremental/debug-mergeJavaRes/merge-state +0 -0
  30. package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +1 -1
  31. package/android/build/intermediates/incremental/packageDebugResources/compile-file-map.properties +1 -1
  32. package/android/build/intermediates/javac/debug/classes/com/clevertap/react/BuildConfig.class +0 -0
  33. package/android/build/intermediates/javac/debug/classes/com/clevertap/react/CleverTapModule$1.class +0 -0
  34. package/android/build/intermediates/javac/debug/classes/com/clevertap/react/CleverTapModule$ErrorMessages.class +0 -0
  35. package/android/build/intermediates/javac/debug/classes/com/clevertap/react/CleverTapModule$InBoxMessages.class +0 -0
  36. package/android/build/intermediates/javac/debug/classes/com/clevertap/react/CleverTapModule.class +0 -0
  37. package/android/build/intermediates/library_manifest/debug/AndroidManifest.xml +3 -8
  38. package/android/build/intermediates/local_only_symbol_list/debug/{parseDebugLibraryResources/R-def.txt → R-def.txt} +0 -0
  39. package/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt +7 -16
  40. package/android/build/intermediates/merged_manifests/debug/output.json +27 -1
  41. package/android/build/intermediates/symbol_list_with_package_name/debug/package-aware-r.txt +3208 -0
  42. package/android/build/outputs/aar/android-debug.aar +0 -0
  43. package/android/build/outputs/logs/manifest-merger-debug-report.txt +10 -18
  44. package/android/build.gradle +9 -9
  45. package/android/src/main/java/com/clevertap/react/CleverTapModule.java +827 -1263
  46. package/android/src/main/java/com/clevertap/react/CleverTapPackage.java +1 -1
  47. package/clevertap-react-native.podspec +1 -1
  48. package/docs/install.md +15 -19
  49. package/docs/integration.md +2 -3
  50. package/docs/usage.md +397 -0
  51. package/index.d.ts +60 -224
  52. package/index.js +227 -374
  53. package/ios/CleverTapReact/CleverTapReact.h +0 -1
  54. package/ios/CleverTapReact/CleverTapReact.m +33 -147
  55. package/ios/CleverTapReact/CleverTapReactEventEmitter.m +1 -6
  56. package/ios/CleverTapReact/CleverTapReactManager.m +0 -4
  57. package/ios/CleverTapReact/CleverTapSDK.framework.zip +0 -0
  58. package/package.json +1 -1
  59. package/.idea/clevertap-rn.iml +0 -9
  60. package/.idea/codeStyles/Project.xml +0 -134
  61. package/.idea/modules.xml +0 -8
  62. package/.idea/vcs.xml +0 -6
  63. package/.idea/workspace.xml +0 -449
  64. package/android/.gradle/5.4.1/executionHistory/executionHistory.bin +0 -0
  65. package/android/.gradle/5.4.1/executionHistory/executionHistory.lock +0 -0
  66. package/android/.gradle/5.4.1/fileChanges/last-build.bin +0 -0
  67. package/android/.gradle/5.4.1/fileContent/fileContent.lock +0 -0
  68. package/android/.gradle/5.4.1/fileHashes/fileHashes.bin +0 -0
  69. package/android/.gradle/5.4.1/fileHashes/fileHashes.lock +0 -0
  70. package/android/.gradle/5.4.1/gc.properties +0 -0
  71. package/android/.gradle/5.4.1/javaCompile/classAnalysis.bin +0 -0
  72. package/android/.gradle/5.4.1/javaCompile/jarAnalysis.bin +0 -0
  73. package/android/.gradle/5.4.1/javaCompile/javaCompile.lock +0 -0
  74. package/android/.gradle/5.4.1/javaCompile/taskHistory.bin +0 -0
  75. package/android/.idea/caches/build_file_checksums.ser +0 -0
  76. package/android/.idea/caches/gradle_models.ser +0 -0
  77. package/android/.idea/codeStyles/Project.xml +0 -134
  78. package/android/.idea/dictionaries/piyush_kukadiya.xml +0 -7
  79. package/android/.idea/gradle.xml +0 -20
  80. package/android/.idea/jarRepositories.xml +0 -40
  81. package/android/.idea/libraries/Gradle__com_android_installreferrer_installreferrer_2_1_aar.xml +0 -11
  82. package/android/.idea/libraries/Gradle__com_android_support_appcompat_v7_23_0_1_aar.xml +0 -18
  83. package/android/.idea/libraries/Gradle__com_android_support_support_annotations_23_0_1_jar.xml +0 -13
  84. package/android/.idea/libraries/Gradle__com_android_support_support_v4_23_0_1_aar.xml +0 -19
  85. package/android/.idea/libraries/Gradle__com_clevertap_android_clevertap_android_sdk_4_0_0_aar.xml +0 -16
  86. package/android/.idea/libraries/Gradle__com_facebook_fbui_textlayoutbuilder_staticlayout_proxy_1_0_jar.xml +0 -13
  87. package/android/.idea/libraries/Gradle__com_facebook_fbui_textlayoutbuilder_textlayoutbuilder_1_0_0_aar.xml +0 -18
  88. package/android/.idea/libraries/Gradle__com_facebook_fresco_drawee_1_3_0_aar.xml +0 -15
  89. package/android/.idea/libraries/Gradle__com_facebook_fresco_fbcore_1_3_0_aar.xml +0 -18
  90. package/android/.idea/libraries/Gradle__com_facebook_fresco_fresco_1_3_0_aar.xml +0 -15
  91. package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_1_3_0_aar.xml +0 -18
  92. package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_base_1_3_0_aar.xml +0 -18
  93. package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_okhttp3_1_3_0_aar.xml +0 -15
  94. package/android/.idea/libraries/Gradle__com_facebook_react_react_native_0_49_5_aar.xml +0 -19
  95. package/android/.idea/libraries/Gradle__com_facebook_soloader_soloader_0_1_0_aar.xml +0 -15
  96. package/android/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_3_0_0_jar.xml +0 -13
  97. package/android/.idea/libraries/Gradle__com_parse_bolts_bolts_tasks_1_4_0_jar.xml +0 -13
  98. package/android/.idea/libraries/Gradle__com_squareup_okhttp3_okhttp_3_6_0_jar.xml +0 -13
  99. package/android/.idea/libraries/Gradle__com_squareup_okhttp3_okhttp_urlconnection_3_6_0_jar.xml +0 -13
  100. package/android/.idea/libraries/Gradle__com_squareup_okio_okio_1_13_0_jar.xml +0 -13
  101. package/android/.idea/libraries/Gradle__javax_inject_javax_inject_1_jar.xml +0 -13
  102. package/android/.idea/libraries/Gradle__org_webkit_android_jsc_r174650_aar.xml +0 -11
  103. package/android/.idea/misc.xml +0 -14
  104. package/android/.idea/modules.xml +0 -8
  105. package/android/.idea/runConfigurations.xml +0 -12
  106. package/android/.idea/vcs.xml +0 -6
  107. package/android/.idea/workspace.xml +0 -317
  108. package/android/build/generated/source/buildConfig/androidTest/debug/com/clevertap/react/test/BuildConfig.java +0 -13
  109. package/android/build/intermediates/annotation_processor_list/debugUnitTest/annotationProcessors.json +0 -1
  110. package/android/build/intermediates/javac/debugUnitTest/classes/com/clevertap/react/CleverTapModuleTest.class +0 -0
  111. package/android/build/intermediates/manifest_merge_blame_file/debugAndroidTest/manifest-merger-blame-debug-androidTest-report.txt +0 -98
  112. package/android/build/intermediates/merged_manifests/debugAndroidTest/AndroidManifest.xml +0 -57
  113. package/android/build/intermediates/merged_manifests/debugAndroidTest/output.json +0 -1
  114. package/android/build/intermediates/packaged-classes/debug/classes.jar +0 -0
  115. package/android/build/intermediates/res/symbol-table-with-package/debug/package-aware-r.txt +0 -1474
  116. package/android/build/intermediates/symbols/debug/R.txt +0 -2034
  117. package/clevertap-logo.png +0 -0
package/index.d.ts CHANGED
@@ -266,18 +266,6 @@
266
266
  */
267
267
  export function profileSet(profile: any): void;
268
268
 
269
- /**
270
- * Set profile attributes from facebook user
271
- * @param profile {any} facebook graph user object
272
- */
273
- export function profileSetGraphUser(profile: any): void;
274
-
275
- /**
276
- * Set profile attributes rom google plus user
277
- * @param profile {any} google plus user object
278
- */
279
- export function profileGooglePlusUser(profile: any): void;
280
-
281
269
  /**
282
270
  * Get User Profile Property
283
271
  * @param propertyName {string}
@@ -286,17 +274,26 @@
286
274
  export function profileGetProperty(propertyName: string, callback: Callback): void;
287
275
 
288
276
  /**
277
+ * Deprecated - Since version 0.6.0. Use getCleverTapID(callback) instead
289
278
  * Get a unique CleverTap identifier suitable for use with install attribution providers.
290
279
  * calls back with unique CleverTap attribution identifier
291
280
  */
292
281
  export function profileGetCleverTapAttributionIdentifier(callback: Callback): void;
293
282
 
294
283
  /**
284
+ * Deprecated - Since version 0.6.0. Use getCleverTapID(callback) instead
295
285
  * Get User Profile CleverTapID
296
286
  * calls back with CleverTapID or false
297
287
  */
298
288
  export function profileGetCleverTapID(callback: Callback): void;
299
289
 
290
+ /**
291
+ * Returns a unique identifier through callback by which CleverTap identifies this user
292
+ *
293
+ * @param {function(err, res)} non-null callback to retrieve identifier
294
+ */
295
+ export function getCleverTapID(callback: Callback): void;
296
+
300
297
  /**
301
298
  * Remove the property specified by key from the user profile
302
299
  * @param key {string}
@@ -337,6 +334,26 @@
337
334
  */
338
335
  export function profileRemoveMultiValuesForKey(values: any, key: string): void;
339
336
 
337
+ /*******************************
338
+ * Increment/Decrement Operators
339
+ *******************************/
340
+
341
+ /**
342
+ * This method is used to increment the given value
343
+ *
344
+ * @param value {Number} can be int,double or float only (NaN,Infinity etc not supported)
345
+ * @param key {string} profile property
346
+ */
347
+ export function profileIncrementValueForKey(value:number, key:string): void;
348
+
349
+ /**
350
+ * This method is used to decrement the given value
351
+ *
352
+ * @param value {Number} can be int,double or float only (NaN,Infinity etc not supported)
353
+ * @param key {string} profile property
354
+ */
355
+ export function profileDecrementValueForKey(value:number, key:string): void;
356
+
340
357
  /*******************
341
358
  * Session
342
359
  ******************/
@@ -466,218 +483,6 @@
466
483
  */
467
484
  export function pushDisplayUnitClickedEventForID(unitID: string): void;
468
485
 
469
- /****************************
470
- * AB Tests Methods
471
- ****************************/
472
- /**
473
- * Disables/Enables the ability to send Dynamic Variables to the CleverTap Dashboard
474
- * Disabled by default
475
- */
476
- export function setUIEditorConnectionEnabled(enabled: boolean): void;
477
- /**
478
- * Registers an ABTesting variable of type Boolean for ease of editing on the CleverTap Dashboard
479
- * @param name {string} name of the variable
480
- */
481
- export function registerBooleanVariable(name: string): void;
482
-
483
- /**
484
- * Registers an ABTesting variable of type Double for ease of editing on the CleverTap Dashboard
485
- * @param name {string} name of the variable
486
- */
487
- export function registerDoubleVariable(name: string): void;
488
-
489
- /**
490
- * Registers an ABTesting variable of type Integer for ease of editing on the CleverTap Dashboard
491
- * @param name {string} name of the variable
492
- */
493
- export function registerIntegerVariable(name: string): void;
494
-
495
- /**
496
- * Registers an ABTesting variable of type String for ease of editing on the CleverTap Dashboard
497
- * @param name {string} name of the variable
498
- */
499
- export function registerStringVariable(name: string): void;
500
-
501
- /**
502
- * Registers an ABTesting variable of type List of Boolean for ease of editing on the CleverTap Dashboard
503
- * @param name {string} name of the variable
504
- */
505
- export function registerListOfBooleanVariable(name: string): void;
506
-
507
- /**
508
- * Registers an ABTesting variable of type List of Double for ease of editing on the CleverTap Dashboard
509
- * @param name {string} name of the variable
510
- */
511
- export function registerListOfDoubleVariable(name: string): void;
512
-
513
- /**
514
- * Registers an ABTesting variable of type List of Integer for ease of editing on the CleverTap Dashboard
515
- * @param name {string} name of the variable
516
- */
517
- export function registerListOfIntegerVariable(name: string): void;
518
-
519
- /**
520
- * Registers an ABTesting variable of type List of String for ease of editing on the CleverTap Dashboard
521
- * @param name {string} name of the variable
522
- */
523
- export function registerListOfStringVariable(name: string): void;
524
-
525
- /**
526
- * Registers an ABTesting variable of type Map of Boolean for ease of editing on the CleverTap Dashboard
527
- * @param name {string} name of the variable
528
- */
529
- export function registerMapOfBooleanVariable(name: string): void;
530
-
531
- /**
532
- * Registers an ABTesting variable of type Map of Double for ease of editing on the CleverTap Dashboard
533
- * @param name {string} name of the variable
534
- */
535
- export function registerMapOfDoubleVariable(name: string): void;
536
-
537
- /**
538
- * Registers an ABTesting variable of type Map of Integer for ease of editing on the CleverTap Dashboard
539
- * @param name {string} name of the variable
540
- */
541
- export function registerMapOfIntegerVariable(name: string): void;
542
-
543
- /**
544
- * Registers an ABTesting variable of type Map of String for ease of editing on the CleverTap Dashboard
545
- * @param name {string} name of the variable
546
- */
547
- export function registerMapOfStringVariable(name: string): void;
548
-
549
- /**
550
- * Returns the Boolean value of the named variable set via an AB Testing Experiment or the default value if unset
551
- * @param name - the name of the variable
552
- * @param defaultValue - the default value to return if the value has not been set via an AB Testing Experiment
553
- * calls back with Boolean, the value set by the Experiment or the default value if unset
554
- */
555
- export function getBooleanVariable(
556
- name: string,
557
- defaultValue: any,
558
- callback: Callback): void;
559
-
560
- /**
561
- * Returns the Double value of the named variable set via an AB Testing Experiment or the default value if unset
562
- * @param name - the name of the variable
563
- * @param defaultValue - the default value to return if the value has not been set via an AB Testing Experiment
564
- * calls back with Double, the value set by the Experiment or the default value if unset
565
- */
566
- export function getDoubleVariable(
567
- name: string,
568
- defaultValue: any,
569
- callback: Callback): void;
570
-
571
- /**
572
- * Returns the Integer value of the named variable set via an AB Testing Experiment or the default value if unset
573
- * @param name - the name of the variable
574
- * @param defaultValue - the default value to return if the value has not been set via an AB Testing Experiment
575
- * calls back with Integer, the value set by the Experiment or the default value if unset
576
- */
577
- export function getIntegerVariable(
578
- name: string,
579
- defaultValue: any,
580
- callback: Callback): void;
581
-
582
- /**
583
- * Returns the String value of the named variable set via an AB Testing Experiment or the default value if unset
584
- * @param name - the name of the variable
585
- * @param defaultValue - the default value to return if the value has not been set via an AB Testing Experiment
586
- * calls back with string, the value set by the Experiment or the default value if unset
587
- */
588
- export function getStringVariable(
589
- name: string,
590
- defaultValue: any,
591
- callback: Callback): void;
592
-
593
- /**
594
- * Returns the List of Boolean value of the named variable set via an AB Testing Experiment or the default value if unset
595
- * @param name - the name of the variable
596
- * @param defaultValue - the default value to return if the value has not been set via an AB Testing Experiment
597
- * calls back with List of Boolean, the value set by the Experiment or the default value if unset
598
- */
599
- export function getListOfBooleanVariable(
600
- name: string,
601
- defaultValue: any,
602
- callback: Callback): void;
603
-
604
- /**
605
- * Returns the List of Double value of the named variable set via an AB Testing Experiment or the default value if unset
606
- * @param name - the name of the variable
607
- * @param defaultValue - the default value to return if the value has not been set via an AB Testing Experiment
608
- * calls back with List of Double, the value set by the Experiment or the default value if unset
609
- */
610
- export function getListOfDoubleVariable(
611
- name: string,
612
- defaultValue: any,
613
- callback: Callback): void;
614
-
615
- /**
616
- * Returns the List of Integer value of the named variable set via an AB Testing Experiment or the default value if unset
617
- * @param name - the name of the variable
618
- * @param defaultValue - the default value to return if the value has not been set via an AB Testing Experiment
619
- * calls back with List of Integer, the value set by the Experiment or the default value if unset
620
- */
621
- export function getListOfIntegerVariable(
622
- name: string,
623
- defaultValue: any,
624
- callback: Callback): void;
625
-
626
- /**
627
- * Returns the List of String value of the named variable set via an AB Testing Experiment or the default value if unset
628
- * @param name - the name of the variable
629
- * @param defaultValue - the default value to return if the value has not been set via an AB Testing Experiment
630
- * calls back with List of String, the value set by the Experiment or the default value if unset
631
- */
632
- export function getListOfStringVariable(
633
- name: string,
634
- defaultValue: any,
635
- callback: Callback): void;
636
-
637
- /**
638
- * Returns the Map of Boolean value of the named variable set via an AB Testing Experiment or the default value if unset
639
- * @param name - the name of the variable
640
- * @param defaultValue - the default value to return if the value has not been set via an AB Testing Experiment
641
- * calls back with Map of Boolean, the value set by the Experiment or the default value if unset
642
- */
643
- export function getMapOfBooleanVariable(
644
- name: string,
645
- defaultValue: any,
646
- callback: Callback): void;
647
-
648
- /**
649
- * Returns the Map of Double value of the named variable set via an AB Testing Experiment or the default value if unset
650
- * @param name - the name of the variable
651
- * @param defaultValue - the default value to return if the value has not been set via an AB Testing Experiment
652
- * calls back with Map of Double, the value set by the Experiment or the default value if unset
653
- */
654
- export function getMapOfDoubleVariable(
655
- name: string,
656
- defaultValue: any,
657
- callback: Callback): void;
658
-
659
- /**
660
- * Returns the Map of Integer value of the named variable set via an AB Testing Experiment or the default value if unset
661
- * @param name - the name of the variable
662
- * @param defaultValue - the default value to return if the value has not been set via an AB Testing Experiment
663
- * calls back withMap of Integer, the value set by the Experiment or the default value if unset
664
- */
665
- export function getMapOfIntegerVariable(
666
- name: string,
667
- defaultValue: any,
668
- callback: Callback): void;
669
-
670
- /**
671
- * Returns the Map of String value of the named variable set via an AB Testing Experiment or the default value if unset
672
- * @param name - the name of the variable
673
- * @param defaultValue - the default value to return if the value has not been set via an AB Testing Experiment
674
- * calls back withMap of String, the value set by the Experiment or the default value if unset
675
- */
676
- export function getMapOfStringVariable(
677
- name: string,
678
- defaultValue: any,
679
- callback: Callback): void;
680
-
681
486
  /*******************
682
487
  * Product Configs
683
488
  ******************/
@@ -767,6 +572,37 @@
767
572
  defaultValue: boolean,
768
573
  callback: Callback): void;
769
574
 
575
+
576
+ /*******************
577
+ * InApp Controls
578
+ ******************/
579
+
580
+ /**
581
+ * Suspends display of InApp Notifications.
582
+ * The InApp Notifications are queued once this method is called
583
+ * and will be displayed once resumeInAppNotifications() is called.
584
+ */
585
+ export function suspendInAppNotifications(): void;
586
+
587
+ /**
588
+ * Suspends the display of InApp Notifications and discards any new InApp Notifications to be shown
589
+ * after this method is called.
590
+ * The InApp Notifications will be displayed only once resumeInAppNotifications() is called.
591
+ */
592
+ export function discardInAppNotifications(): void;
593
+
594
+ /**
595
+ * Resumes display of InApp Notifications.
596
+ *
597
+ * If suspendInAppNotifications() was called previously, calling this method will instantly show
598
+ * all queued InApp Notifications and also resume InApp Notifications on events raised after this
599
+ * method is called.
600
+ *
601
+ * If discardInAppNotifications() was called previously, calling this method will only resume
602
+ * InApp Notifications on events raised after this method is called.
603
+ */
604
+ export function resumeInAppNotifications(): void;
605
+
770
606
  /*******************
771
607
  * Developer Options
772
608
  ******************/