@sentiance-react-native/user-context 6.3.0-rc.1 → 6.3.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.
|
@@ -62,6 +62,7 @@ public class SentianceUserContextConverter {
|
|
|
62
62
|
private static WritableMap convertEvent(Event event) {
|
|
63
63
|
WritableMap map = Arguments.createMap();
|
|
64
64
|
|
|
65
|
+
map.putString("id", event.getId());
|
|
65
66
|
map.putString("startTime", event.getStartTime().toString());
|
|
66
67
|
map.putDouble("startTimeEpoch", event.getStartTime().getEpochTime());
|
|
67
68
|
if (event.getEndTime() != null) {
|
|
@@ -70,7 +71,7 @@ public class SentianceUserContextConverter {
|
|
|
70
71
|
|
|
71
72
|
Long durationInSeconds = event.getDurationInSeconds();
|
|
72
73
|
if (durationInSeconds != null) {
|
|
73
|
-
map.
|
|
74
|
+
map.putDouble("durationInSeconds", durationInSeconds);
|
|
74
75
|
}
|
|
75
76
|
}
|
|
76
77
|
|
package/android/src/main/java/com/sentiance/react/bridge/usercontext/SentianceUserContextModule.java
CHANGED
|
@@ -72,13 +72,19 @@ public class SentianceUserContextModule extends AbstractSentianceModule {
|
|
|
72
72
|
promise.resolve(true);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
@Override
|
|
75
76
|
@ReactMethod
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
protected void addListener(String eventName, int subscriptionId, Promise promise) {
|
|
78
|
+
|
|
78
79
|
}
|
|
79
80
|
|
|
81
|
+
@Override
|
|
80
82
|
@ReactMethod
|
|
81
|
-
|
|
82
|
-
|
|
83
|
+
protected void removeListener(String eventName, int subscriptionId, Promise promise) {
|
|
84
|
+
|
|
83
85
|
}
|
|
86
|
+
|
|
87
|
+
@Override
|
|
88
|
+
@ReactMethod
|
|
89
|
+
public void removeListeners(Integer count) {}
|
|
84
90
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -19,32 +19,19 @@ declare module "@sentiance-react-native/user-context" {
|
|
|
19
19
|
| "AGGRESSIVE_DRIVER"
|
|
20
20
|
| "ANTICIPATIVE_DRIVER"
|
|
21
21
|
| "BAR_GOER"
|
|
22
|
-
| "BEAUTY_QUEEN"
|
|
23
|
-
| "BRAND_LOYAL__BAR"
|
|
24
|
-
| "BRAND_LOYAL__CAFE"
|
|
25
|
-
| "BRAND_LOYAL__RESTAURANT"
|
|
26
|
-
| "BRAND_LOYAL__RETAIL"
|
|
27
|
-
| "BRAND_LOYALTY"
|
|
28
|
-
| "BRAND_LOYALTY__GAS_STATIONS"
|
|
29
|
-
| "BRAND_LOYALTY__RESTAURANT_BAR"
|
|
30
|
-
| "BRAND_LOYALTY__SUPERMARKET"
|
|
31
22
|
| "CITY_DRIVER"
|
|
32
23
|
| "CITY_HOME"
|
|
33
24
|
| "CITY_WORKER"
|
|
34
|
-
| "CLUBBER"
|
|
35
25
|
| "CULTURE_BUFF"
|
|
36
26
|
| "DIE_HARD_DRIVER"
|
|
37
27
|
| "DISTRACTED_DRIVER"
|
|
38
|
-
| "DO_IT_YOURSELVER"
|
|
39
28
|
| "DOG_WALKER"
|
|
40
29
|
| "EARLY_BIRD"
|
|
41
30
|
| "EASY_COMMUTER"
|
|
42
31
|
| "EFFICIENT_DRIVER"
|
|
43
|
-
| "FASHIONISTA"
|
|
44
32
|
| "FOODIE"
|
|
45
33
|
| "FREQUENT_FLYER"
|
|
46
34
|
| "FULLTIME_WORKER"
|
|
47
|
-
| "GAMER"
|
|
48
35
|
| "GREEN_COMMUTER"
|
|
49
36
|
| "HEALTHY_BIKER"
|
|
50
37
|
| "HEALTHY_WALKER"
|
|
@@ -76,20 +63,6 @@ declare module "@sentiance-react-native/user-context" {
|
|
|
76
63
|
| "RECENTLY_CHANGED_JOB"
|
|
77
64
|
| "RECENTLY_MOVED_HOME"
|
|
78
65
|
| "RESTO_LOVER"
|
|
79
|
-
| "RESTO_LOVER__AMERICAN"
|
|
80
|
-
| "RESTO_LOVER__ASIAN"
|
|
81
|
-
| "RESTO_LOVER__BARBECUE"
|
|
82
|
-
| "RESTO_LOVER__FASTFOOD"
|
|
83
|
-
| "RESTO_LOVER__FRENCH"
|
|
84
|
-
| "RESTO_LOVER__GERMAN"
|
|
85
|
-
| "RESTO_LOVER__GREEK"
|
|
86
|
-
| "RESTO_LOVER__GRILL"
|
|
87
|
-
| "RESTO_LOVER__INTERNATIONAL"
|
|
88
|
-
| "RESTO_LOVER__ITALIAN"
|
|
89
|
-
| "RESTO_LOVER__MEDITERRANEAN"
|
|
90
|
-
| "RESTO_LOVER__MEXICAN"
|
|
91
|
-
| "RESTO_LOVER__SEAFOOD"
|
|
92
|
-
| "RESTO_LOVER__SNACK"
|
|
93
66
|
| "RURAL_HOME"
|
|
94
67
|
| "RURAL_WORKER"
|
|
95
68
|
| "SHOPAHOLIC"
|
|
@@ -199,6 +172,7 @@ declare module "@sentiance-react-native/user-context" {
|
|
|
199
172
|
| "NIGHT";
|
|
200
173
|
|
|
201
174
|
export interface Event {
|
|
175
|
+
id: string;
|
|
202
176
|
startTime: string;
|
|
203
177
|
startTimeEpoch: number; // in milliseconds
|
|
204
178
|
endTime: string | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentiance-react-native/user-context",
|
|
3
|
-
"version": "6.3.0
|
|
3
|
+
"version": "6.3.0",
|
|
4
4
|
"description": "React Native Sentiance - This module provides an easy API to add user context awareness into your apps.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"sentiance"
|
|
15
15
|
],
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"@sentiance-react-native/core": "6.3.0
|
|
17
|
+
"@sentiance-react-native/core": "6.3.0"
|
|
18
18
|
},
|
|
19
19
|
"author": "",
|
|
20
20
|
"license": "",
|