@sentiance-react-native/user-context 6.9.1-rc.2 → 6.10.0-alpha.1
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.
- package/lib/index.d.ts +16 -1
- package/package.json +2 -2
package/lib/index.d.ts
CHANGED
|
@@ -171,10 +171,19 @@ declare module "@sentiance-react-native/user-context" {
|
|
|
171
171
|
| "EVENING"
|
|
172
172
|
| "NIGHT";
|
|
173
173
|
|
|
174
|
+
export type UserContextUpdateCriteria =
|
|
175
|
+
| "CURRENT_EVENT"
|
|
176
|
+
| "ACTIVE_SEGMENTS"
|
|
177
|
+
| "VISITED_VENUES";
|
|
178
|
+
|
|
179
|
+
export type TransportTags = { [key: string]: string };
|
|
180
|
+
|
|
174
181
|
export interface Event {
|
|
175
182
|
id: string;
|
|
176
183
|
startTime: string;
|
|
177
184
|
startTimeEpoch: number; // in milliseconds
|
|
185
|
+
lastUpdateTime: string;
|
|
186
|
+
lastUpdateTimeEpoch: number; // in milliseconds
|
|
178
187
|
endTime: string | null;
|
|
179
188
|
endTimeEpoch: number | null; // in milliseconds
|
|
180
189
|
durationInSeconds: number | null;
|
|
@@ -186,6 +195,7 @@ declare module "@sentiance-react-native/user-context" {
|
|
|
186
195
|
transportMode: TransportMode | null;
|
|
187
196
|
waypoints: Waypoint[];
|
|
188
197
|
distance?: number; // in meters
|
|
198
|
+
transportTags: TransportTags;
|
|
189
199
|
}
|
|
190
200
|
|
|
191
201
|
export interface GeoLocation {
|
|
@@ -237,11 +247,16 @@ declare module "@sentiance-react-native/user-context" {
|
|
|
237
247
|
semanticTime: SemanticTime;
|
|
238
248
|
}
|
|
239
249
|
|
|
250
|
+
export interface UserContextUpdate {
|
|
251
|
+
readonly criteria: UserContextUpdateCriteria[];
|
|
252
|
+
readonly userContext: UserContext;
|
|
253
|
+
}
|
|
254
|
+
|
|
240
255
|
export interface SentianceUserContext {
|
|
241
256
|
requestUserContext(): Promise<UserContext>;
|
|
242
257
|
|
|
243
258
|
addUserContextUpdateListener(
|
|
244
|
-
onUserContextUpdated: (
|
|
259
|
+
onUserContextUpdated: (userContextUpdate: UserContextUpdate) => void
|
|
245
260
|
): Promise<EmitterSubscription>;
|
|
246
261
|
}
|
|
247
262
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentiance-react-native/user-context",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.10.0-alpha.1",
|
|
4
4
|
"description": "The Sentiance User Context library",
|
|
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.
|
|
17
|
+
"@sentiance-react-native/core": "6.10.0-alpha.1"
|
|
18
18
|
},
|
|
19
19
|
"author": "",
|
|
20
20
|
"license": "",
|