0.3.0 • Published 2 months ago

@jifeline/customer-vehicles v0.3.0

Weekly downloads
-
License
-
Repository
-
Last release
2 months ago

Customer Vehicles library

The Customer Vehicles library is an implementation of the vehicles domain within the Jifeline Customer API. With this library, after setting the config in the @jifeline/core auth module, the vehicle can be defined for which products can be requested.

Usage of the library

Import the customerVehicles library to make use of the different features.

import { auth, i18n, Locale } from '@jifeline/core';
import { customerVehicles } from '@jifeline/customer-vehicles';

// Configure the core lib and authenticate by login in with connector / pin or username & password.
auth.configure(config);
auth.loginPin().subscribe();
auth.loginUsername().subscribe();

// After authentication - use the customer vehicles library. Eg;
customerVehicles
  .makes
  .getAllVehicleMakes()
  .subscribe(vehicleMakes => console.log(vehicleMakes));

Features

The Customer Vehicles library provides the following features:

  • define vehicle
  • vehicle definition
  • vehicle history
  • vehicle makes
  • vehicle model groups
  • vehicle models
  • vehicle model variants
  • vehicle names
  • vin

Define vehicle

The define vehicle feature can be used to define a vehicle definition. A vehicle definition is a specification of a vehicle based on make, model group, model, and a model variant.

The following functions are supported:

  • define vehicle type
  • get base vehicle element from type
  • is vehicle defined
  • get vehicle to define
  • get definition of vehicle
  • clear defined vehicle element
  • get next vehicle element type to define
  • is type defined

Vehicle Definition

The vehicle definition feature can be used to resolve a vehicle definition based on a VIN, or a vehicle element ID, which can be the model ID or model variant ID.

The following functions are supported:

  • get vehicle definition by element id
  • get vehicle definition by vin

Vehicle History

The vehicle history feature can be used to get the history of when tickets are created for a given vehicle.

The following functions are supported:

  • get vehicle history
  • get all vehicle history

Vehicle makes

The vehicle makes feature can provide a list of all vehicle makes.

The following functions are supported:

  • get all vehicle makes

Vehicle model groups

The vehicle model groups feature can provide a list of all vehicle model groups of a given vehicle make.

The following functions are supported:

  • get all vehicle model groups

Vehicle models

The vehicle models feature can provide a list of all vehicle models of a given vehicle model group. It can also get the definition of a vehicle model based on the vehicle model ID.

The following functions are supported:

  • get all vehicle models
  • get vehicle model

Vehicle model variants

The vehicle model variants feature can provide a list of all vehicle model variants of a given vehicle model. It can also get the definition of a vehicle model variant based on the vehicle model variant ID.

The following functions are supported:

  • get all vehicle model variants
  • get vehicle model variant

Vehicle names

The vehicle names feature can create names for a Vehicle, vehicle definition, or the name of a vehicle element. It can also create labels for the manufactured dates of a vehicle.

The following functions are supported:

  • get name of vehicle
  • get vehicle name by vehicle definition
  • get vehicle name by element id
  • get manufactured label by vehicle element
  • get manufactured label

VIN

The VIN feature can validate a given VIN. In order to be valid, it must comply to the following rules:

  • Required
  • Minimum characters required
  • Maximum characters exceeded
  • O character is not allowed
  • I character is not allowed
  • Q character is not allowed
  • Last characters should be numeric
  • VIN should be alphanumeric
  • VIN is not supported

The following functions are supported:

  • validate vin
0.3.0

2 months ago

0.2.1

6 months ago

0.2.0

8 months ago

0.1.1

10 months ago

0.1.0

10 months ago