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-vehicle

v1.2.46

Published

Vehicle and model management — CRUD operations, real-time data, services, and options.

Readme

@vulog/aima-vehicle

Vehicle and model management — CRUD operations, real-time data, services, and options.

Installation

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

Usage

import { getVehicles, getVehicleById, getVehiclesRealTime } from '@vulog/aima-vehicle';
import { getClient } from '@vulog/aima-client';

const client = getClient({ ... });

const vehicles = await getVehicles(client);
const vehicle = await getVehicleById(client, 'vehicle-uuid');
const realTime = await getVehiclesRealTime(client, 500, Date.now() - 3600_000);

API Reference

getModelsById

getModelsById(client: Client, id: number): Promise<Model>

Fetches a single vehicle model by ID.

| Param | Type | Description | | -------- | -------- | ------------------------- | | client | Client | Authenticated AIMA client | | id | number | Model identifier |


getModelByIdAssets

getModelByIdAssets(client: Client, id: number): Promise<Assets>

Returns EDS assets for a model.

| Param | Type | Description | | -------- | -------- | ------------------------- | | client | Client | Authenticated AIMA client | | id | number | Model identifier |


getModels

getModels(client: Client): Promise<Model[]>

Returns all vehicle models for the fleet.

| Param | Type | Description | | -------- | -------- | ------------------------- | | client | Client | Authenticated AIMA client |


getVehicleById

getVehicleById(client: Client, id: string): Promise<Vehicle | null>

Fetches a vehicle by ID. Returns null on 404.

| Param | Type | Description | | -------- | -------- | ------------------------- | | client | Client | Authenticated AIMA client | | id | string | Vehicle identifier |


getVehicleRealTimeById

getVehicleRealTimeById(client: Client, id: string): Promise<VehicleRealTime | null>

Returns real-time telemetry for a vehicle. Returns null on 404.

| Param | Type | Description | | -------- | -------- | ------------------------- | | client | Client | Authenticated AIMA client | | id | string | Vehicle identifier |


getVehicleByIdAssets

getVehicleByIdAssets(client: Client, id: string): Promise<Assets>

Returns EDS assets for a vehicle.

| Param | Type | Description | | -------- | -------- | ------------------------- | | client | Client | Authenticated AIMA client | | id | string | Vehicle identifier |


getVehicles

getVehicles(client: Client, pageSize?: number): Promise<Vehicle[]>

Returns all vehicles in the fleet. Auto-paginates up to 50 pages using the given page size (default 500).

| Param | Type | Description | | ---------- | -------- | ---------------------------------- | | client | Client | Authenticated AIMA client | | pageSize | number | Results per page (default 500) |


getVehiclesRealTime

getVehiclesRealTime(client: Client, pageSize?: number, lastUpdatedMillis?: number): Promise<VehicleRealTime[]>

Returns real-time data for all vehicles. Auto-paginates up to 50 pages. lastUpdatedMillis must be a past UTC timestamp in milliseconds.

| Param | Type | Description | | ------------------- | -------- | --------------------------------------- | | client | Client | Authenticated AIMA client | | pageSize | number | Results per page (default 500) | | lastUpdatedMillis | number | Only return vehicles updated after this |


pingVehicleById

pingVehicleById(client: Client, id: string): Promise<boolean>

Checks whether a vehicle's box is connected. Returns true if connected.

| Param | Type | Description | | -------- | -------- | ------------------------- | | client | Client | Authenticated AIMA client | | id | string | Vehicle identifier |


enableVehicle

enableVehicle(client: Client, vehicleId: string, payload: EnableVehicleBody): Promise<void>

Enables a vehicle.

| Param | Type | Description | | ----------- | ------------------- | ------------------------- | | client | Client | Authenticated AIMA client | | vehicleId | string | Vehicle identifier | | payload | EnableVehicleBody | Enable payload |


disableVehicle

disableVehicle(client: Client, vehicleId: string, payload: DisableVehicleBody): Promise<void>

Disables a vehicle.

| Param | Type | Description | | ----------- | -------------------- | ------------------------- | | client | Client | Authenticated AIMA client | | vehicleId | string | Vehicle identifier | | payload | DisableVehicleBody | Disable payload |


getModelVehicles

getModelVehicles(client: Client, options?: PaginableOptions): Promise<PaginableResponse<ModelVehicle>>

Returns a paginated list of model-to-vehicle mappings.

| Param | Type | Description | | --------- | ------------------ | ------------------------- | | client | Client | Authenticated AIMA client | | options | PaginableOptions | Pagination options |


createVehicle

createVehicle(client: Client, body: CreateVehicleBody): Promise<Vehicle>

Creates a new vehicle in the fleet.

| Param | Type | Description | | -------- | ------------------- | ------------------------- | | client | Client | Authenticated AIMA client | | body | CreateVehicleBody | Vehicle creation data |


addServiceForVehicle

addServiceForVehicle(client: Client, serviceId: string, vehicleId: string): Promise<void>

Assigns a service to a vehicle.

| Param | Type | Description | | ----------- | -------- | ------------------------- | | client | Client | Authenticated AIMA client | | serviceId | string | Service identifier | | vehicleId | string | Vehicle identifier |


removeServiceForVehicle

removeServiceForVehicle(client: Client, serviceId: string, vehicleId: string): Promise<void>

Removes a service from a vehicle.

| Param | Type | Description | | ----------- | -------- | ------------------------- | | client | Client | Authenticated AIMA client | | serviceId | string | Service identifier | | vehicleId | string | Vehicle identifier |


getOptions

getOptions(client: Client): Promise<Options[]>

Returns all vehicle options available in the fleet.

| Param | Type | Description | | -------- | -------- | ------------------------- | | client | Client | Authenticated AIMA client |


addOptionForVehicle

addOptionForVehicle(client: Client, vehicleId: string, optionId: number): Promise<Vehicle>

Adds an option to a vehicle. Returns the updated vehicle.

| Param | Type | Description | | ----------- | -------- | ------------------------- | | client | Client | Authenticated AIMA client | | vehicleId | string | Vehicle identifier | | optionId | number | Option identifier |


removeOptionForVehicle

removeOptionForVehicle(client: Client, vehicleId: string, optionId: number): Promise<Vehicle>

Removes an option from a vehicle. Returns the updated vehicle.

| Param | Type | Description | | ----------- | -------- | ------------------------- | | client | Client | Authenticated AIMA client | | vehicleId | string | Vehicle identifier | | optionId | number | Option identifier |

Types

Vehicle

Fleet vehicle data including id, name, plate, vin, model, options, fleetId, published, archived, noBox, msisdn, iccid, and optional wakeupProvider, imsi, residualValue.

VehicleRealTime

Real-time vehicle telemetry including location, battery, booking state, door/window status, zone membership, and box connectivity.

Model

Vehicle model definition including id, name, energyType, vehicleType, transmission, nbOfSeats, autonomy, fleetId.

Assets

{
    fleet_id: string;
    model_id: number;
    assets: {
        aid: string;
        type: string;
        url: string;
        value: string;
        b_value: string;
        text: string;
    }[];
}

ModelVehicle

{
    serviceId: string;
    serviceVisibility: 'PUBLIC' | 'PRIVATE';
    modelId: number;
    vehicles: string[];
}

CreateVehicleBody

Vehicle creation data. Optional fields include wakeupProvider, archived, msisdn, iccid, imsi, residualValue.

EnableVehicleBody / DisableVehicleBody

Payloads for enabling and disabling a vehicle.

Options

{
    id: number;
    fleetId: string;
    name: string;
    type: string;
    description: string;
}