npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@vulog/aima-event

v1.2.48

Published

Event tracking — query fleet events by type, trip, or time range.

Readme

@vulog/aima-event

Event tracking — query fleet events by type, trip, or time range.

Installation

npm install @vulog/aima-event @vulog/aima-client @vulog/aima-core

Usage

import { getClient } from '@vulog/aima-client';
import { getEventsByType, getEvents, getEventsByTripId } from '@vulog/aima-event';

const client = getClient({ /* client options */ });

const events = await getEventsByType(client, 'TRIP_START');
const allEvents = await getEvents(client, { page: 0, size: 50 });
const tripEvents = await getEventsByTripId(client, 'trip-uuid');

API Reference

getEventsByType

getEventsByType(
    client: Client,
    type: EventType,
    options?: PaginableOptions<EventFilters, 'date'>
): Promise<PaginableResponse<Event>>

Returns events of the given type for the fleet. Default time window: last 2 months to now.

Params: client — Authenticated AIMA client; type — event type to filter on; options — optional pagination and date filters
Returns: Promise<PaginableResponse<Event>>


getEvents

getEvents(
    client: Client,
    options?: PaginableOptions<EventFilters, 'date'>
): Promise<PaginableResponse<Event>>

Returns events of all types for the fleet. Default time window: last 2 months to now.

Params: client — Authenticated AIMA client; options — optional pagination and date filters
Returns: Promise<PaginableResponse<Event>>


getEventsByTripId

getEventsByTripId(
    client: Client,
    tripId: string,
    options?: PaginableOptions<EventFilters & { type?: EventType[] }, 'date'>
): Promise<PaginableResponse<Event>>

Returns events for a specific trip, optionally filtered by event type.

Params: client — Authenticated AIMA client; tripId — trip identifier; options — optional pagination, date filters, and type filter
Returns: Promise<PaginableResponse<Event>>

Types

EventFilters

interface EventFilters {
    startDate?: string; // format: yyyy-MM-dd'T'HH:mm:ssZ
    endDate?: string;   // format: yyyy-MM-dd'T'HH:mm:ssZ
}

Event

interface Event {
    fleetId: string;
    userId: string;
    origin: string;
    type: EventType;
    date: string;
    failed: boolean;
    originId?: string;
    insertionDate?: string;
    deletionDate?: string;
    doNotTrack: boolean;
    extraInfo: ExtraInfo;
}

ExtraInfo

An object with event-specific data; its shape depends on the event type.

EventType

A string union of 160+ event types. Examples:

| Value | Description | | ----- | ----------- | | BOOKING_CANCEL | Booking canceled | | TRIP_START | Trip started | | TRIP_END | Trip ended | | VEHICLE_LOCK | Vehicle locked | | VEHICLE_UNLOCK | Vehicle unlocked | | PAYMENT_SUCCESS | Payment succeeded | | USER_CREATED | User account created | | USER_ARCHIVED | User account archived | | USER_PLAN_SUBSCRIBED | Mobility plan subscribed | | USER_PLAN_UNSUBSCRIBED | Mobility plan unsubscribed | | VEHICLE_OUT_OF_SERVICE | Vehicle marked out of service | | VEHICLE_ENABLE | Vehicle back in service |

See the source for the full list of supported event types.