reactnative-plugin-appice 1.6.4 → 1.6.6

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.
@@ -12,6 +12,21 @@ RCT_EXPORT_MODULE()
12
12
  }
13
13
 
14
14
  - (NSDictionary *)constantsToExport {
15
+ FIRST_SEEN = CustomUserPropertyConstants.FIRST_SEEN;
16
+ LAST_SEEN = CustomUserPropertyConstants.LAST_SEEN;
17
+ TOP_N_PRODUCTS_VIEWED = CustomUserPropertyConstants.TOP_N_PRODUCTS_VIEWED;
18
+ N_COMPLAINTS_RAISED = CustomUserPropertyConstants.N_COMPLAINTS_RAISED;
19
+ PREF_LOGIN_DEVICE = CustomUserPropertyConstants.PREF_LOGIN_DEVICE;
20
+ REFERRAL_CAMPAIGN = CustomUserPropertyConstants.REFERRAL_CAMPAIGN;
21
+ TOTAL_ORDER_VALUE = Ecommerce.TOTAL_ORDER_VALUE;
22
+ ADD_TO_CART_N_DAYS = Ecommerce.ADD_TO_CART_N_DAYS;
23
+ CREDIT_SCORE = FinancialServices.CREDIT_SCORE;
24
+ DEBT_TO_INCOME_RATIO = FinancialServices.DEBT_TO_INCOME_RATIO;
25
+ SAVINGS_BALANCE = FinancialServices.SAVINGS_BALANCE;
26
+ CHECKING_BALANCE = FinancialServices.CHECKING_BALANCE;
27
+ AVERAGE_TRANSACTION_AMOUNT = FinancialServices.AVERAGE_TRANSACTION_AMOUNT;
28
+ FREQUENCY_OF_TRANSACTION = FinancialServices.FREQUENCY_OF_TRANSACTION;
29
+ TYPE_OF_TRANSACTION = FinancialServices.TYPE_OF_TRANSACTION;
15
30
  return @{
16
31
  kAppICEPushNotificationClicked : kAppICEPushNotificationClicked,
17
32
  kAppICEInAppClicked : kAppICEInAppClicked,
@@ -24,6 +39,7 @@ RCT_EXPORT_MODULE()
24
39
  ket : @"emt",
25
40
  km : km,
26
41
  kis_emp : @"em",
42
+
27
43
  INBOX_MESSAGE : @"message",
28
44
  INBOX_TITLE : @"title",
29
45
  INBOX_MESSAGE_STATUS : @"messageStatus",
@@ -33,7 +49,26 @@ RCT_EXPORT_MODULE()
33
49
  INBOX_CAMPAIGN_ID : @"campId",
34
50
  INBOX_MESSAGE_CATEGORY : @"category",
35
51
  INBOX_MESSAGE_ICON : @"icon",
36
- INBOX_CUSTOM_DATA : @"cdata"
52
+ INBOX_CUSTOM_DATA : @"cdata",
53
+
54
+ DEMOGRAPHIC_INFO :@"customProperties",
55
+ @"TOP_N_PRODUCTS_VIEWED" : TOP_N_PRODUCTS_VIEWED,
56
+ @"N_COMPLAINTS_RAISED" : N_COMPLAINTS_RAISED,
57
+ @"PREF_LOGIN_DEVICE" : PREF_LOGIN_DEVICE,
58
+ @"REFERRAL_CAMPAIGN" : REFERRAL_CAMPAIGN,
59
+ @"FIRST_SEEN" : FIRST_SEEN,
60
+ @"LAST_SEEN" : LAST_SEEN,
61
+
62
+ @"TOTAL_ORDER_VALUE" : TOTAL_ORDER_VALUE,
63
+ @"ADD_TO_CART_N_DAYS" : ADD_TO_CART_N_DAYS,
64
+
65
+ @"CREDIT_SCORE" : CREDIT_SCORE,
66
+ @"DEBT_TO_INCOME_RATIO" : DEBT_TO_INCOME_RATIO,
67
+ @"SAVINGS_BALANCE" : SAVINGS_BALANCE,
68
+ @"CHECKING_BALANCE" : CHECKING_BALANCE,
69
+ @"AVERAGE_TRANSACTION_AMOUNT" : AVERAGE_TRANSACTION_AMOUNT,
70
+ @"FREQUENCY_OF_TRANSACTION": FREQUENCY_OF_TRANSACTION,
71
+ @"TYPE_OF_TRANSACTION" : TYPE_OF_TRANSACTION
37
72
  };
38
73
  }
39
74
  - (dispatch_queue_t)methodQueue {
@@ -366,6 +401,26 @@ RCT_EXPORT_METHOD(synchronizeInbox:(int)timeout callback:(RCTResponseSenderBlock
366
401
  return @{};
367
402
  }
368
403
  }
404
+ /**
405
+ * GetUser Details
406
+ * @callback will have the dictionary
407
+ */
408
+ RCT_EXPORT_METHOD(getUser:(RCTResponseSenderBlock)callback)
409
+ {
410
+ appICEUserDetails *app = [[appICE sharedInstance] getUserDetail];
411
+ NSDictionary *userDictionary = [app toDictionary];
412
+ NSLog(@"getUserDetails: %@", userDictionary);
413
+ [self returnResult:userDictionary withCallback:callback andError:nil];
414
+ }
415
+
416
+ /**
417
+ * RegisterLifeCycle
418
+ */
419
+ RCT_EXPORT_METHOD(registerLifeCycle) {
420
+
421
+ // implementation to register the lifecycle
422
+ }
423
+
369
424
 
370
425
  - (void)returnResult:(id)result withCallback:(RCTResponseSenderBlock)callback andError:(NSString *)error {
371
426
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reactnative-plugin-appice",
3
- "version": "1.6.4",
3
+ "version": "1.6.6",
4
4
  "description": "appICE React Native SDK",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -1,42 +0,0 @@
1
- package com.reactlibrary;
2
-
3
- public interface Constants {
4
-
5
- //=========================
6
- //USER-PROFILE
7
- //=========================
8
- String APPICE_USER_NAME = "n";
9
- String APPICE_USER_PHONE = "ph";
10
- String APPICE_USER_EMAIL = "em";
11
- String dateOfBirth = "dob";
12
- String APPICE_USER_AGE = "a";
13
- String APPICE_USER_EDUCATION = "ed";
14
- String APPICE_USER_GENDER = "g";
15
- String APPICE_USER_IS_EMPLOYED = "is_emp";
16
- String APPICE_USER_EMPLOYMENT_TYPE = "et";
17
- String APPICE_USER_MARRIED = "m";
18
-
19
- //===========================
20
- //PUSH
21
- //============================
22
- String APPICE_PUSH_NOTIFICATION_CLICKED = "AppICEPushNotificationClicked";
23
-
24
- //===========================
25
- //IN-APP
26
- //============================
27
- String APPICE_INAPP_NOTIFICATION_CLICKED = "AppICEInAppClicked";
28
-
29
- //============================
30
- //INBOX
31
- //=============================
32
- String INBOX_MESSAGE = "message";
33
- String INBOX_TITLE = "title";
34
- String INBOX_MESSAGE_STATUS = "messageStatus";
35
- String INBOX_CAMPAIGN_TYPE = "campType";
36
- String INBOX_MESSAGE_LANGUAGE = "messageLanguage";
37
- String INBOX_MESSAGE_ID = "id";
38
- String INBOX_CAMPAIGN_ID = "campId";
39
- String INBOX_MESSAGE_CATEGORY = "category";
40
- String INBOX_MESSAGE_ICON = "icon";
41
- String INBOX_CUSTOM_DATA = "cdata";
42
- }