Represents an occurrence of an event that was detected for a user.

interface Event {
    distance?: number;
    durationInSeconds: null | number;
    endTime: null | string;
    endTimeEpoch: null | number;
    hasEnded: boolean;
    id: string;
    isProvisional: boolean;
    lastUpdateTime: string;
    lastUpdateTimeEpoch: number;
    location: null | GeoLocation;
    occupantRole: OccupantRole;
    startTime: string;
    startTimeEpoch: number;
    transportMode: null | TransportMode;
    transportTags: TransportTags;
    type: EventType;
    venue: null | Venue;
    waypoints: Waypoint[];
}

Properties

distance?: number

The distance travelled during the transport in meters. If the distance cannot be computed then it is null.

durationInSeconds: null | number

the duration of the event in seconds if it has ended, otherwise returns it is null.

endTime: null | string

An ISO 8601 representation of the end time of the event if the event has ended, otherwise it is null.

endTimeEpoch: null | number

The end epoch time of the event in milliseconds if the event has ended, otherwise it is null.

hasEnded: boolean

Indicates whether the event has ended.

id: string

The unique identifier of the event.

isProvisional: boolean

Indicates whether the event is provisional.

A provisional event is identified based on real-time detections, but may change in the near future as more data is collected and processed, to filter out unwanted artifacts. For example, a provisional car transport may get identified, followed by a provisional bus transport. After the full trip is complete, these provisional events may get merged into a single final car event.

Final events are generated independently of the provisional events, and have unique event IDs. They are not linked to the provisional events they may resemble, replace, or overlap with.

Currently, provisional events apply only to 'transport' types, as the SDK tries to determine the mode of transport in (near) real time. When the full trip is complete (e.g. the user becomes stationary), the collected data is reprocessed to produce a more accurate and cleaned up list of transport events.

lastUpdateTime: string

An ISO 8601 representation of the last update time of the event.

lastUpdateTimeEpoch: number

The last update epoch time of the event, in milliseconds.

location: null | GeoLocation

The location where the user is stationary at.

occupantRole: OccupantRole

The detected user occupant role.

startTime: string

An ISO 8601 representation of the start time of the event.

startTimeEpoch: number

The start epoch time of the event, in milliseconds.

transportMode: null | TransportMode

The mode of transportation if the event is a transport, null otherwise.

transportTags: TransportTags

The set of tags that you have previously set (if any) for this transport, if the event is a transport - empty otherwise.

type: EventType

The event type. Based on this type, you can determine whether the event is a transport or a stationary etc...

venue: null | Venue

The venue of this stationary.

waypoints: Waypoint[]

The waypoints collected during the transport if the event is a transport, empty otherwise.