cordova-plugin-insider 1.2.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 (45) hide show
  1. package/.github/CODEOWNERS +8 -0
  2. package/.github/workflows/git-leak.yml +25 -0
  3. package/.github/workflows/insider-cordova-SDK_release.yml +61 -0
  4. package/.github/workflows/release_task_merger.yml +22 -0
  5. package/.github/workflows/release_version_setter.yml +43 -0
  6. package/README.md +104 -0
  7. package/hooks/FSUtils.js +28 -0
  8. package/hooks/after_plugin_install.js +81 -0
  9. package/hooks/before_plugin_uninstall.js +49 -0
  10. package/package.json +19 -0
  11. package/plugin.xml +91 -0
  12. package/release_version.sh +27 -0
  13. package/slack_notifier.sh +20 -0
  14. package/src/android/CDVUtils.java +120 -0
  15. package/src/android/Constants.java +41 -0
  16. package/src/android/InsiderPlugin.java +814 -0
  17. package/src/android/build-extras.gradle +38 -0
  18. package/src/android/res/values/dimens.xml +4 -0
  19. package/src/android/res/values-sw600dp/dimens.xml +3 -0
  20. package/src/android/res/values-sw720dp/dimens.xml +3 -0
  21. package/src/android/res/values-xhdpi/dimens.xml +4 -0
  22. package/src/android/res/values-xxhdpi/dimens.xml +4 -0
  23. package/src/android/res/values-xxxhdpi/dimens.xml +4 -0
  24. package/src/ios/IDFAHelper.h +7 -0
  25. package/src/ios/IDFAHelper.m +19 -0
  26. package/src/ios/InsiderPlugin.h +58 -0
  27. package/src/ios/InsiderPlugin.m +758 -0
  28. package/types/CallbackType.d.ts +7 -0
  29. package/types/ContentOptimizerDataType.d.ts +4 -0
  30. package/types/Event.d.ts +9 -0
  31. package/types/Gender.d.ts +5 -0
  32. package/types/Identifier.d.ts +7 -0
  33. package/types/InsiderPlugin.d.ts +51 -0
  34. package/types/Product.d.ts +18 -0
  35. package/types/User.d.ts +27 -0
  36. package/www/CallbackType.js +7 -0
  37. package/www/Constants.js +86 -0
  38. package/www/ContentOptimizerDataType.js +4 -0
  39. package/www/Event.js +96 -0
  40. package/www/Gender.js +5 -0
  41. package/www/Identifier.js +66 -0
  42. package/www/InsiderPlugin.js +364 -0
  43. package/www/Product.js +211 -0
  44. package/www/User.js +303 -0
  45. package/www/Utils.js +18 -0
@@ -0,0 +1,38 @@
1
+ repositories {
2
+ maven { url "https://maven.google.com" }
3
+ maven { url "https://mobilesdk.useinsider.com/android" }
4
+ maven { url "https://developer.huawei.com/repo/" }
5
+ }
6
+
7
+ android {
8
+ compileSdkVersion 31
9
+ useLibrary 'org.apache.http.legacy'
10
+
11
+ defaultConfig {
12
+ minSdkVersion 21
13
+ targetSdkVersion 31
14
+ versionCode 1
15
+ versionName "1.0"
16
+ manifestPlaceholders = [ partner: "partner_name" ]
17
+ multiDexEnabled true
18
+ }
19
+ }
20
+
21
+ dependencies {
22
+ implementation 'com.useinsider:insider:13.4.0'
23
+ implementation 'com.useinsider:insiderhybrid:1.1.4'
24
+
25
+ implementation 'com.fasterxml.jackson.core:jackson-core:2.12.4'
26
+ implementation 'com.fasterxml.jackson.core:jackson-databind:2.12.4'
27
+
28
+ implementation 'androidx.legacy:legacy-support-v4:1.0.0'
29
+ implementation 'androidx.lifecycle:lifecycle-process:2.3.1'
30
+
31
+ implementation 'com.google.android.gms:play-services-location:20.0.0'
32
+ implementation 'com.google.firebase:firebase-messaging:23.0.5'
33
+ implementation 'com.google.android.gms:play-services-ads:16.0.0'
34
+
35
+ implementation 'com.huawei.hms:push:6.5.0.300'
36
+ implementation 'com.huawei.hms:ads-identifier:3.4.39.302'
37
+ implementation 'com.huawei.hms:location:6.3.0.300'
38
+ }
@@ -0,0 +1,4 @@
1
+ <resources>
2
+ <dimen name="ins_car_im_size">170dp</dimen>
3
+ <dimen name="ins_car_disc_size">180dp</dimen>
4
+ </resources>
@@ -0,0 +1,3 @@
1
+ <resources>
2
+ <dimen name="ins_car_im_size">220dp</dimen>
3
+ </resources>
@@ -0,0 +1,3 @@
1
+ <resources>
2
+ <dimen name="ins_car_im_size">220dp</dimen>
3
+ </resources>
@@ -0,0 +1,4 @@
1
+ <resources>
2
+ <dimen name="ins_car_im_size">180dp</dimen>
3
+ <dimen name="ins_car_disc_size">180dp</dimen>
4
+ </resources>
@@ -0,0 +1,4 @@
1
+ <resources>
2
+ <dimen name="ins_car_im_size">180dp</dimen>
3
+ <dimen name="ins_car_disc_size">160dp</dimen>
4
+ </resources>
@@ -0,0 +1,4 @@
1
+ <resources>
2
+ <dimen name="ins_car_im_size">150dp</dimen>
3
+ <dimen name="ins_car_disc_size">120dp</dimen>
4
+ </resources>
@@ -0,0 +1,7 @@
1
+ #import <Foundation/Foundation.h>
2
+
3
+ @interface IDFAHelper:NSObject
4
+
5
+ - (bool)requestPermission;
6
+
7
+ @end
@@ -0,0 +1,19 @@
1
+ #import "IDFAHelper.h"
2
+ #import <AdSupport/ASIdentifierManager.h>
3
+ #import <AppTrackingTransparency/AppTrackingTransparency.h>
4
+
5
+ @implementation IDFAHelper
6
+
7
+ - (bool)requestPermission{
8
+ if (@available(iOS 14, *)) {
9
+ [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
10
+ NSLog(@"[INSIDER]:[IDFA] requestPermission completed.");
11
+ }];
12
+ return true;
13
+ } else {
14
+ NSLog(@"[INSIDER]:[IDFA] requestPermission is supported only for iOS >= 14");
15
+ return false;
16
+ }
17
+ }
18
+
19
+ @end
@@ -0,0 +1,58 @@
1
+ #import <InsiderMobile/Insider.h>
2
+ #import <InsiderHybrid/InsiderHybrid.h>
3
+ #import <InsiderMobile/InsiderCallbackTypeEnum.h>
4
+ #import "IDFAHelper.h"
5
+ #import <UserNotifications/UserNotifications.h>
6
+
7
+ @interface InsiderPlugin : CDVPlugin
8
+
9
+ - (void) init:(CDVInvokedUrlCommand *)command;
10
+ - (void) initWithLaunchOptions:(CDVInvokedUrlCommand *)command;
11
+ - (void) registerWithQuietPermission:(CDVInvokedUrlCommand *)command;
12
+ - (void) enableIDFACollection:(CDVInvokedUrlCommand *)command;
13
+ - (void) setGDPRConsent:(CDVInvokedUrlCommand *)command;
14
+ - (void) startTrackingGeofence:(CDVInvokedUrlCommand *)command;
15
+ - (void) tagEvent:(CDVInvokedUrlCommand *)command;
16
+ - (void) enableLocationCollection:(CDVInvokedUrlCommand *)command;
17
+ - (void) enableIpCollection:(CDVInvokedUrlCommand *)command;
18
+ - (void) enableCarrierCollection:(CDVInvokedUrlCommand *)command;
19
+ - (void) removeInapp:(CDVInvokedUrlCommand *)command;
20
+ - (void) getContentStringWithName:(CDVInvokedUrlCommand *)command;
21
+ - (void) getContentIntWithName:(CDVInvokedUrlCommand *)command;
22
+ - (void) getContentBoolWithName:(CDVInvokedUrlCommand *)command;
23
+ - (void) visitHomePage:(CDVInvokedUrlCommand *)command;
24
+ - (void) visitListingPage:(CDVInvokedUrlCommand *)command;
25
+ - (void) visitProductDetailPage:(CDVInvokedUrlCommand *)command;
26
+ - (void) visitCartPage:(CDVInvokedUrlCommand *)command;
27
+ - (void) itemPurchased:(CDVInvokedUrlCommand *)command;
28
+ - (void) itemAddedToCart:(CDVInvokedUrlCommand *)command;
29
+ - (void) itemRemovedFromCart:(CDVInvokedUrlCommand *)command;
30
+ - (void) cartCleared:(CDVInvokedUrlCommand *)command;
31
+ - (void) getSmartRecommendation:(CDVInvokedUrlCommand *)command;
32
+ - (void) getSmartRecommendationWithProduct:(CDVInvokedUrlCommand *)command;
33
+ - (void) clickSmartRecommendationProduct:(CDVInvokedUrlCommand *)command;
34
+ - (void) getMessageCenterData:(CDVInvokedUrlCommand *)command;
35
+ - (void) setGender:(CDVInvokedUrlCommand *)command;
36
+ - (void) setSurname:(CDVInvokedUrlCommand *)command;
37
+ - (void) setAge:(CDVInvokedUrlCommand *)command;
38
+ - (void) setSMSOptin:(CDVInvokedUrlCommand *)command;
39
+ - (void) setEmailOptin:(CDVInvokedUrlCommand *)command;
40
+ - (void) setPushOptin:(CDVInvokedUrlCommand *)command;
41
+ - (void) setLocationOptin:(CDVInvokedUrlCommand *)command;
42
+ - (void) setWhatsappOptin:(CDVInvokedUrlCommand *)command;
43
+ - (void) setLocale:(CDVInvokedUrlCommand *)command;
44
+ - (void) setFacebookID:(CDVInvokedUrlCommand *)command;
45
+ - (void) setTwitterID:(CDVInvokedUrlCommand *)command;
46
+ - (void) setCustomAttributeWithString:(CDVInvokedUrlCommand *)command;
47
+ - (void) setCustomAttributeWithInt:(CDVInvokedUrlCommand *)command;
48
+ - (void) setCustomAttributeWithDouble:(CDVInvokedUrlCommand *)command;
49
+ - (void) setCustomAttributeWithBoolean:(CDVInvokedUrlCommand *)command;
50
+ - (void) setCustomAttributeWithDate:(CDVInvokedUrlCommand *)command;
51
+ - (void) setCustomAttributeWithArray:(CDVInvokedUrlCommand *)command;
52
+ - (void) unsetCustomAttribute:(CDVInvokedUrlCommand *)command;
53
+ - (void) login:(CDVInvokedUrlCommand *)command;
54
+ - (void) logout:(CDVInvokedUrlCommand *)command;
55
+ - (void) signUpConfirmation:(CDVInvokedUrlCommand *)command;
56
+ - (void) putException:(CDVInvokedUrlCommand *)command;
57
+ - (void) handleNotification:(CDVInvokedUrlCommand *)command;
58
+ @end