Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@clearroad/api

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@clearroad/api - npm Package Compare versions

Comparing version 1.2.0-rc.1 to 1.2.0-rc.2

144

dist/commonjs/clearroad.js

@@ -17,3 +17,3 @@ 'use strict';

examples: [
'2018-01-01T00:00:00Z'
'2018-04-01T00:00:00Z'
]

@@ -32,5 +32,3 @@ }

type: 'string',
title: 'Reference',
description: 'The reference given to the new billing period',
default: '',
description: 'The reference given to the new billing period which will be used to reference it in the future.',
examples: [

@@ -41,17 +39,12 @@ '2018Q1'

start_date: {
$ref: '#/definitions/datetime',
title: 'Start Date',
description: 'The date, starting which, the billing period is going to be active. Should be in UTC.',
default: ''
$ref: '#/definitions/datetime'
},
stop_date: {
$ref: '#/definitions/datetime',
title: 'Stop Date',
description: 'The date, starting which, the billing period will become inactive. Should be UTC. If it is left empty, the billing period will never turn inactive, once activated.',
default: ''
$ref: '#/definitions/datetime'
},
portal_type: {
type: 'string',
title: 'Portal Type',
description: 'The type of message in the ClearRoad ERP5 instance. Only one type possible',
description: 'The type of message in the ClearRoad Platform. Only one value is possible',
default: 'Billing Period Message',

@@ -75,3 +68,3 @@ enum: [

examples: [
'2017-01-02T14:21:20Z'
'2018-04-01T00:00:00Z'
]

@@ -98,5 +91,3 @@ }

type: 'string',
title: 'The Account Manager Reference',
default: '',
description: 'The reference should be of an account manager that already exists in ERP5.',
description: 'The reference should be of an account manager that already exists in ClearRoad Platform.',
examples: [

@@ -108,5 +99,3 @@ 'testamref'

type: 'string',
title: 'The Data Collector Reference',
description: 'The reference should be of a data provider that already exists in ERP5.',
default: '',
description: 'The reference should be of a data provider that already exists in ClearRoad Platform.',
examples: [

@@ -118,5 +107,3 @@ 'testmpref'

type: 'string',
title: 'The Applicable Sale Trade Condition reference',
description: 'The reference should be of a sale trade condition that already exists in ERP5.',
default: '',
description: 'Sale Trade Condition to apply. The reference should be of an object that already exists in ClearRoad Platform.',
examples: [

@@ -128,4 +115,3 @@ 'test-stc-1'

type: 'string',
title: 'The DOT certificate ID value',
default: '',
description: 'The DOT certificate ID value',
examples: [

@@ -137,5 +123,3 @@ '1051'

type: 'string',
title: 'The customer account reference ',
description: 'The reference of the road account to be defined.',
default: '',
examples: [

@@ -147,16 +131,11 @@ 'USER000011'

$ref: '#/definitions/datetime',
title: 'The start date of the customer account.',
description: 'Could not be left empty.',
default: ''
description: 'The start date of the customer account. Could not be left empty. Should be in UTC.'
},
expiration_date: {
$ref: '#/definitions/datetime',
title: 'The stop date of the customer account',
description: 'Could be left empty - the road account will have no expiration date.',
default: ''
description: 'The stop date of the customer account. Could be left empty - the road account will have no expiration date. Should be in UTC.'
},
fuel_consumption: {
type: 'string',
title: 'The EPA value of the vehicle',
default: '',
description: 'Combined EPA Miles Per Gallon (MPG) rating for the vehicle.',
examples: [

@@ -168,4 +147,3 @@ '12.0'

type: 'string',
title: 'Boolean defining if customer is subject to taxable fuel',
default: '',
description: 'Boolean defining if customer is subject to taxable fuel.',
examples: [

@@ -177,7 +155,6 @@ '1'

type: 'string',
title: 'The On Board Unit reference',
description: 'An onject for this on board unit will be created in the ERP5 instance.',
default: '',
description: 'An object for this on board unit will be created in the ClearRoad platform if it is nor already present.',
pattern: '^[0-9a-z]{24}$',
examples: [
'123456789MRDID'
'977298026d50a5b1795c6563'
]

@@ -187,5 +164,4 @@ },

type: 'string',
title: 'The vehicle VIN Number ',
description: 'An onject for this vehicle will be created in the ERP5 instance.',
default: '',
description: 'An onject for this vehicle will be created in the ClearRoad Platform if it is not already present.',
pattern: '^[0-9A-Z]{17}$',
examples: [

@@ -197,4 +173,9 @@ '2C1MR2295T6789740'

type: 'string',
title: 'The reporting method the customer choosed to use',
default: '',
description: 'The reporting method the customer choosed to use.',
enum: [
'odometer_message_no_transaction',
'odometer_message_transaction',
'ruc_metrics',
'service'
],
examples: [

@@ -206,4 +187,3 @@ 'ruc_metrics'

type: 'string',
title: 'The type of the message.',
description: 'Only one type is possible.',
description: 'The type of the message in the ClearRoad Platform. Only one value is possible.',
default: 'Road Account Message',

@@ -227,3 +207,3 @@ enum: [

examples: [
'2017-01-02T14:21:20Z'
'2018-04-01T00:00:00Z'
]

@@ -247,3 +227,2 @@ }

vehicle_reference: {
title: 'Vehicle Reference',
type: 'string',

@@ -258,3 +237,2 @@ description: 'The Vehicle Identification Number of the road account registration for which the event is reported',

type: 'string',
title: 'On Board Unit Reference',
description: 'The On Board Unit reference of the road account registration for which the event is reported',

@@ -267,4 +245,3 @@ pattern: '^[0-9a-z]{24}$',

event_details: {
title: 'Event Details',
description: 'The details of the event that is reported',
description: 'The details of the event that is reported.',
type: 'array',

@@ -280,3 +257,3 @@ items: {

type: 'integer',
description: 'The ID of the event ',
description: 'The ID of the event. Every type has it own ID.',
default: 0,

@@ -289,4 +266,3 @@ examples: [

$ref: '#/definitions/datetime',
description: 'The datetime of the event. Should be a UTC time.',
$comment: 'Should we accept the timezone in the pattern if the time is in UTC?'
description: 'The datetime of the event. Should be a UTC time.'
}

@@ -300,4 +276,3 @@ }

type: 'string',
title: 'Portal Type',
description: 'The type of the object in ClearRoad ERP5 instance. Only one possible value.',
description: 'The type of the object in ClearRoad Platform. Only one value is possible.',
default: 'Road Event Message',

@@ -321,3 +296,3 @@ enum: [

examples: [
'2017-01-02T14:21:20Z'
'2018-04-01T00:00:00Z'
]

@@ -345,5 +320,3 @@ }

type: 'string',
title: 'Description',
description: 'The description of the reported mileage',
default: '',
examples: [

@@ -354,7 +327,5 @@ 'Mileage data'

vehicle_reference: {
title: 'Vehicle Reference',
description: 'The Vehicle Identification Number of the vehicle for which the message is reported.',
type: 'string',
pattern: '^[0-9A-Z]{17}$',
default: '',
examples: [

@@ -366,5 +337,3 @@ '1GTG6BE38F1262119'

type: 'string',
title: 'The On Board Unit Reference',
description: 'The On Board Unit reference of the device for which the message is reported',
default: '',
pattern: '^[0-9a-z]{24}$',

@@ -377,4 +346,3 @@ examples: [

type: 'string',
description: 'The type of mileage : reported, adjustement... ',
default: '',
description: 'A value to indicate the type of message. Can be one of: ADJ: Adjusted mileage transaction, CRE: Credit transaction, FEE: Fees transaction, INV: Invoicing transaction, MRP: Reported mileage transaction',
examples: [

@@ -385,6 +353,4 @@ 'MRP'

transaction_date: {
$ref: '#/definitions/datetime',
title: 'Transaction Date',
description: 'The date at which miles were traveled. Should be in UTC.',
default: ''
description: 'The date at which mileage was traveled. Should be in UTC.',
$ref: '#/definitions/datetime'
},

@@ -395,8 +361,6 @@ mileage_details: {

type: 'object',
required: [],
properties: {
fuel_price: {
type: 'number',
title: 'Fuel Price',
description: 'The price of the fuel consumed during the trip',
description: 'The price of the fuel consumed at the transaction date.',
default: 0,

@@ -409,4 +373,3 @@ examples: [

type: 'number',
title: 'Fuel Quantity',
description: 'The quantity of fuel consumed during the trip',
description: 'The quantity of fuel consumed at the transaction date.',
default: 0,

@@ -419,4 +382,3 @@ examples: [

type: 'number',
title: 'Miles Price',
description: 'The price of the fuel per mile consumed during the trip.',
description: 'The price of miles traveled.',
default: 0,

@@ -429,4 +391,3 @@ examples: [

type: 'number',
title: 'Miles Quantity',
description: 'The number of miles traveled during the trip',
description: 'The number of miles traveled.',
default: 0,

@@ -439,4 +400,3 @@ examples: [

type: 'integer',
title: 'Rule ID',
description: 'The Rule ID of the state where the trip is made. Each state has its own rule ID.',
description: 'An identifier associated with a geographic area, or zone, in which a specific rate per mile will be assessed for miles traveled. FIPS codes are used to identify states.',
default: 0,

@@ -449,3 +409,2 @@ examples: [

type: 'integer',
title: 'Sub Rule ID',
description: '0 if the travel was on public roads, 1 if it was on private roads',

@@ -464,3 +423,2 @@ default: 0,

type: 'string',
title: 'Portal Type',
description: 'The type of message in the ClearRoad Platform. Only one type possible',

@@ -485,3 +443,3 @@ default: 'Road Message',

examples: [
'2017-01-02T14:21:20Z'
'2018-04-01T00:00:00Z'
]

@@ -500,8 +458,6 @@ }

type: 'string',
title: 'Report Type',
description: 'The type of the requested report',
description: 'The type of the requested report.',
enum: [
'AccountBalance'
],
$comment: 'So far there is only one type of request possible.',
examples: [

@@ -513,4 +469,3 @@ 'AccountBalance'

type: 'string',
title: 'Billing Period Reference',
description: 'The reference of the billing period. The billing period should already exist in the system.',
description: 'The reference of the billing period. The billing period should already exist in the ClearRoad Platform.',
examples: [

@@ -521,15 +476,12 @@ '2018Q1'

request_date: {
$ref: '#/definitions/datetime',
title: 'Request Date',
description: 'The datetime for which the request is made'
description: 'The datetime for which the request is made. Should be in UTC.',
$ref: '#/definitions/datetime'
},
request: {
type: 'string',
title: 'Request',
description: ''
description: 'Used to give specific parameters to report if needed. This filed could be left empty for an AccountBalance report.'
},
portal_type: {
type: 'string',
title: 'Portal Type',
description: 'The type of the object in the ClearRoad ERP5 instance. Only one possible value.',
description: 'The type of the object in the ClearRoad Platform. Only one possible value.',
default: 'Road Report Request',

@@ -536,0 +488,0 @@ enum: [

@@ -8,3 +8,3 @@ const json = {

examples: [
'2018-01-01T00:00:00Z'
'2018-04-01T00:00:00Z'
]

@@ -23,5 +23,3 @@ }

type: 'string',
title: 'Reference',
description: 'The reference given to the new billing period',
default: '',
description: 'The reference given to the new billing period which will be used to reference it in the future.',
examples: [

@@ -32,17 +30,12 @@ '2018Q1'

start_date: {
$ref: '#/definitions/datetime',
title: 'Start Date',
description: 'The date, starting which, the billing period is going to be active. Should be in UTC.',
default: ''
$ref: '#/definitions/datetime'
},
stop_date: {
$ref: '#/definitions/datetime',
title: 'Stop Date',
description: 'The date, starting which, the billing period will become inactive. Should be UTC. If it is left empty, the billing period will never turn inactive, once activated.',
default: ''
$ref: '#/definitions/datetime'
},
portal_type: {
type: 'string',
title: 'Portal Type',
description: 'The type of message in the ClearRoad ERP5 instance. Only one type possible',
description: 'The type of message in the ClearRoad Platform. Only one value is possible',
default: 'Billing Period Message',

@@ -49,0 +42,0 @@ enum: [

@@ -8,3 +8,3 @@ const json = {

examples: [
'2017-01-02T14:21:20Z'
'2018-04-01T00:00:00Z'
]

@@ -31,5 +31,3 @@ }

type: 'string',
title: 'The Account Manager Reference',
default: '',
description: 'The reference should be of an account manager that already exists in ERP5.',
description: 'The reference should be of an account manager that already exists in ClearRoad Platform.',
examples: [

@@ -41,5 +39,3 @@ 'testamref'

type: 'string',
title: 'The Data Collector Reference',
description: 'The reference should be of a data provider that already exists in ERP5.',
default: '',
description: 'The reference should be of a data provider that already exists in ClearRoad Platform.',
examples: [

@@ -51,5 +47,3 @@ 'testmpref'

type: 'string',
title: 'The Applicable Sale Trade Condition reference',
description: 'The reference should be of a sale trade condition that already exists in ERP5.',
default: '',
description: 'Sale Trade Condition to apply. The reference should be of an object that already exists in ClearRoad Platform.',
examples: [

@@ -61,4 +55,3 @@ 'test-stc-1'

type: 'string',
title: 'The DOT certificate ID value',
default: '',
description: 'The DOT certificate ID value',
examples: [

@@ -70,5 +63,3 @@ '1051'

type: 'string',
title: 'The customer account reference ',
description: 'The reference of the road account to be defined.',
default: '',
examples: [

@@ -80,16 +71,11 @@ 'USER000011'

$ref: '#/definitions/datetime',
title: 'The start date of the customer account.',
description: 'Could not be left empty.',
default: ''
description: 'The start date of the customer account. Could not be left empty. Should be in UTC.'
},
expiration_date: {
$ref: '#/definitions/datetime',
title: 'The stop date of the customer account',
description: 'Could be left empty - the road account will have no expiration date.',
default: ''
description: 'The stop date of the customer account. Could be left empty - the road account will have no expiration date. Should be in UTC.'
},
fuel_consumption: {
type: 'string',
title: 'The EPA value of the vehicle',
default: '',
description: 'Combined EPA Miles Per Gallon (MPG) rating for the vehicle.',
examples: [

@@ -101,4 +87,3 @@ '12.0'

type: 'string',
title: 'Boolean defining if customer is subject to taxable fuel',
default: '',
description: 'Boolean defining if customer is subject to taxable fuel.',
examples: [

@@ -110,7 +95,6 @@ '1'

type: 'string',
title: 'The On Board Unit reference',
description: 'An onject for this on board unit will be created in the ERP5 instance.',
default: '',
description: 'An object for this on board unit will be created in the ClearRoad platform if it is nor already present.',
pattern: '^[0-9a-z]{24}$',
examples: [
'123456789MRDID'
'977298026d50a5b1795c6563'
]

@@ -120,5 +104,4 @@ },

type: 'string',
title: 'The vehicle VIN Number ',
description: 'An onject for this vehicle will be created in the ERP5 instance.',
default: '',
description: 'An onject for this vehicle will be created in the ClearRoad Platform if it is not already present.',
pattern: '^[0-9A-Z]{17}$',
examples: [

@@ -130,4 +113,9 @@ '2C1MR2295T6789740'

type: 'string',
title: 'The reporting method the customer choosed to use',
default: '',
description: 'The reporting method the customer choosed to use.',
enum: [
'odometer_message_no_transaction',
'odometer_message_transaction',
'ruc_metrics',
'service'
],
examples: [

@@ -139,4 +127,3 @@ 'ruc_metrics'

type: 'string',
title: 'The type of the message.',
description: 'Only one type is possible.',
description: 'The type of the message in the ClearRoad Platform. Only one value is possible.',
default: 'Road Account Message',

@@ -143,0 +130,0 @@ enum: [

@@ -8,3 +8,3 @@ const json = {

examples: [
'2017-01-02T14:21:20Z'
'2018-04-01T00:00:00Z'
]

@@ -28,3 +28,2 @@ }

vehicle_reference: {
title: 'Vehicle Reference',
type: 'string',

@@ -39,3 +38,2 @@ description: 'The Vehicle Identification Number of the road account registration for which the event is reported',

type: 'string',
title: 'On Board Unit Reference',
description: 'The On Board Unit reference of the road account registration for which the event is reported',

@@ -48,4 +46,3 @@ pattern: '^[0-9a-z]{24}$',

event_details: {
title: 'Event Details',
description: 'The details of the event that is reported',
description: 'The details of the event that is reported.',
type: 'array',

@@ -61,3 +58,3 @@ items: {

type: 'integer',
description: 'The ID of the event ',
description: 'The ID of the event. Every type has it own ID.',
default: 0,

@@ -70,4 +67,3 @@ examples: [

$ref: '#/definitions/datetime',
description: 'The datetime of the event. Should be a UTC time.',
$comment: 'Should we accept the timezone in the pattern if the time is in UTC?'
description: 'The datetime of the event. Should be a UTC time.'
}

@@ -81,4 +77,3 @@ }

type: 'string',
title: 'Portal Type',
description: 'The type of the object in ClearRoad ERP5 instance. Only one possible value.',
description: 'The type of the object in ClearRoad Platform. Only one value is possible.',
default: 'Road Event Message',

@@ -85,0 +80,0 @@ enum: [

@@ -8,3 +8,3 @@ const json = {

examples: [
'2017-01-02T14:21:20Z'
'2018-04-01T00:00:00Z'
]

@@ -32,5 +32,3 @@ }

type: 'string',
title: 'Description',
description: 'The description of the reported mileage',
default: '',
examples: [

@@ -41,7 +39,5 @@ 'Mileage data'

vehicle_reference: {
title: 'Vehicle Reference',
description: 'The Vehicle Identification Number of the vehicle for which the message is reported.',
type: 'string',
pattern: '^[0-9A-Z]{17}$',
default: '',
examples: [

@@ -53,5 +49,3 @@ '1GTG6BE38F1262119'

type: 'string',
title: 'The On Board Unit Reference',
description: 'The On Board Unit reference of the device for which the message is reported',
default: '',
pattern: '^[0-9a-z]{24}$',

@@ -64,4 +58,3 @@ examples: [

type: 'string',
description: 'The type of mileage : reported, adjustement... ',
default: '',
description: 'A value to indicate the type of message. Can be one of: ADJ: Adjusted mileage transaction, CRE: Credit transaction, FEE: Fees transaction, INV: Invoicing transaction, MRP: Reported mileage transaction',
examples: [

@@ -72,6 +65,4 @@ 'MRP'

transaction_date: {
$ref: '#/definitions/datetime',
title: 'Transaction Date',
description: 'The date at which miles were traveled. Should be in UTC.',
default: ''
description: 'The date at which mileage was traveled. Should be in UTC.',
$ref: '#/definitions/datetime'
},

@@ -82,8 +73,6 @@ mileage_details: {

type: 'object',
required: [],
properties: {
fuel_price: {
type: 'number',
title: 'Fuel Price',
description: 'The price of the fuel consumed during the trip',
description: 'The price of the fuel consumed at the transaction date.',
default: 0,

@@ -96,4 +85,3 @@ examples: [

type: 'number',
title: 'Fuel Quantity',
description: 'The quantity of fuel consumed during the trip',
description: 'The quantity of fuel consumed at the transaction date.',
default: 0,

@@ -106,4 +94,3 @@ examples: [

type: 'number',
title: 'Miles Price',
description: 'The price of the fuel per mile consumed during the trip.',
description: 'The price of miles traveled.',
default: 0,

@@ -116,4 +103,3 @@ examples: [

type: 'number',
title: 'Miles Quantity',
description: 'The number of miles traveled during the trip',
description: 'The number of miles traveled.',
default: 0,

@@ -126,4 +112,3 @@ examples: [

type: 'integer',
title: 'Rule ID',
description: 'The Rule ID of the state where the trip is made. Each state has its own rule ID.',
description: 'An identifier associated with a geographic area, or zone, in which a specific rate per mile will be assessed for miles traveled. FIPS codes are used to identify states.',
default: 0,

@@ -136,3 +121,2 @@ examples: [

type: 'integer',
title: 'Sub Rule ID',
description: '0 if the travel was on public roads, 1 if it was on private roads',

@@ -151,3 +135,2 @@ default: 0,

type: 'string',
title: 'Portal Type',
description: 'The type of message in the ClearRoad Platform. Only one type possible',

@@ -154,0 +137,0 @@ default: 'Road Message',

@@ -8,3 +8,3 @@ const json = {

examples: [
'2017-01-02T14:21:20Z'
'2018-04-01T00:00:00Z'
]

@@ -23,8 +23,6 @@ }

type: 'string',
title: 'Report Type',
description: 'The type of the requested report',
description: 'The type of the requested report.',
enum: [
'AccountBalance'
],
$comment: 'So far there is only one type of request possible.',
examples: [

@@ -36,4 +34,3 @@ 'AccountBalance'

type: 'string',
title: 'Billing Period Reference',
description: 'The reference of the billing period. The billing period should already exist in the system.',
description: 'The reference of the billing period. The billing period should already exist in the ClearRoad Platform.',
examples: [

@@ -44,15 +41,12 @@ '2018Q1'

request_date: {
$ref: '#/definitions/datetime',
title: 'Request Date',
description: 'The datetime for which the request is made'
description: 'The datetime for which the request is made. Should be in UTC.',
$ref: '#/definitions/datetime'
},
request: {
type: 'string',
title: 'Request',
description: ''
description: 'Used to give specific parameters to report if needed. This filed could be left empty for an AccountBalance report.'
},
portal_type: {
type: 'string',
title: 'Portal Type',
description: 'The type of the object in the ClearRoad ERP5 instance. Only one possible value.',
description: 'The type of the object in the ClearRoad Platform. Only one possible value.',
default: 'Road Report Request',

@@ -59,0 +53,0 @@ enum: [

@@ -17,3 +17,3 @@ 'use strict';

examples: [
'2018-01-01T00:00:00Z'
'2018-04-01T00:00:00Z'
]

@@ -32,5 +32,3 @@ }

type: 'string',
title: 'Reference',
description: 'The reference given to the new billing period',
default: '',
description: 'The reference given to the new billing period which will be used to reference it in the future.',
examples: [

@@ -41,17 +39,12 @@ '2018Q1'

start_date: {
$ref: '#/definitions/datetime',
title: 'Start Date',
description: 'The date, starting which, the billing period is going to be active. Should be in UTC.',
default: ''
$ref: '#/definitions/datetime'
},
stop_date: {
$ref: '#/definitions/datetime',
title: 'Stop Date',
description: 'The date, starting which, the billing period will become inactive. Should be UTC. If it is left empty, the billing period will never turn inactive, once activated.',
default: ''
$ref: '#/definitions/datetime'
},
portal_type: {
type: 'string',
title: 'Portal Type',
description: 'The type of message in the ClearRoad ERP5 instance. Only one type possible',
description: 'The type of message in the ClearRoad Platform. Only one value is possible',
default: 'Billing Period Message',

@@ -75,3 +68,3 @@ enum: [

examples: [
'2017-01-02T14:21:20Z'
'2018-04-01T00:00:00Z'
]

@@ -98,5 +91,3 @@ }

type: 'string',
title: 'The Account Manager Reference',
default: '',
description: 'The reference should be of an account manager that already exists in ERP5.',
description: 'The reference should be of an account manager that already exists in ClearRoad Platform.',
examples: [

@@ -108,5 +99,3 @@ 'testamref'

type: 'string',
title: 'The Data Collector Reference',
description: 'The reference should be of a data provider that already exists in ERP5.',
default: '',
description: 'The reference should be of a data provider that already exists in ClearRoad Platform.',
examples: [

@@ -118,5 +107,3 @@ 'testmpref'

type: 'string',
title: 'The Applicable Sale Trade Condition reference',
description: 'The reference should be of a sale trade condition that already exists in ERP5.',
default: '',
description: 'Sale Trade Condition to apply. The reference should be of an object that already exists in ClearRoad Platform.',
examples: [

@@ -128,4 +115,3 @@ 'test-stc-1'

type: 'string',
title: 'The DOT certificate ID value',
default: '',
description: 'The DOT certificate ID value',
examples: [

@@ -137,5 +123,3 @@ '1051'

type: 'string',
title: 'The customer account reference ',
description: 'The reference of the road account to be defined.',
default: '',
examples: [

@@ -147,16 +131,11 @@ 'USER000011'

$ref: '#/definitions/datetime',
title: 'The start date of the customer account.',
description: 'Could not be left empty.',
default: ''
description: 'The start date of the customer account. Could not be left empty. Should be in UTC.'
},
expiration_date: {
$ref: '#/definitions/datetime',
title: 'The stop date of the customer account',
description: 'Could be left empty - the road account will have no expiration date.',
default: ''
description: 'The stop date of the customer account. Could be left empty - the road account will have no expiration date. Should be in UTC.'
},
fuel_consumption: {
type: 'string',
title: 'The EPA value of the vehicle',
default: '',
description: 'Combined EPA Miles Per Gallon (MPG) rating for the vehicle.',
examples: [

@@ -168,4 +147,3 @@ '12.0'

type: 'string',
title: 'Boolean defining if customer is subject to taxable fuel',
default: '',
description: 'Boolean defining if customer is subject to taxable fuel.',
examples: [

@@ -177,7 +155,6 @@ '1'

type: 'string',
title: 'The On Board Unit reference',
description: 'An onject for this on board unit will be created in the ERP5 instance.',
default: '',
description: 'An object for this on board unit will be created in the ClearRoad platform if it is nor already present.',
pattern: '^[0-9a-z]{24}$',
examples: [
'123456789MRDID'
'977298026d50a5b1795c6563'
]

@@ -187,5 +164,4 @@ },

type: 'string',
title: 'The vehicle VIN Number ',
description: 'An onject for this vehicle will be created in the ERP5 instance.',
default: '',
description: 'An onject for this vehicle will be created in the ClearRoad Platform if it is not already present.',
pattern: '^[0-9A-Z]{17}$',
examples: [

@@ -197,4 +173,9 @@ '2C1MR2295T6789740'

type: 'string',
title: 'The reporting method the customer choosed to use',
default: '',
description: 'The reporting method the customer choosed to use.',
enum: [
'odometer_message_no_transaction',
'odometer_message_transaction',
'ruc_metrics',
'service'
],
examples: [

@@ -206,4 +187,3 @@ 'ruc_metrics'

type: 'string',
title: 'The type of the message.',
description: 'Only one type is possible.',
description: 'The type of the message in the ClearRoad Platform. Only one value is possible.',
default: 'Road Account Message',

@@ -227,3 +207,3 @@ enum: [

examples: [
'2017-01-02T14:21:20Z'
'2018-04-01T00:00:00Z'
]

@@ -247,3 +227,2 @@ }

vehicle_reference: {
title: 'Vehicle Reference',
type: 'string',

@@ -258,3 +237,2 @@ description: 'The Vehicle Identification Number of the road account registration for which the event is reported',

type: 'string',
title: 'On Board Unit Reference',
description: 'The On Board Unit reference of the road account registration for which the event is reported',

@@ -267,4 +245,3 @@ pattern: '^[0-9a-z]{24}$',

event_details: {
title: 'Event Details',
description: 'The details of the event that is reported',
description: 'The details of the event that is reported.',
type: 'array',

@@ -280,3 +257,3 @@ items: {

type: 'integer',
description: 'The ID of the event ',
description: 'The ID of the event. Every type has it own ID.',
default: 0,

@@ -289,4 +266,3 @@ examples: [

$ref: '#/definitions/datetime',
description: 'The datetime of the event. Should be a UTC time.',
$comment: 'Should we accept the timezone in the pattern if the time is in UTC?'
description: 'The datetime of the event. Should be a UTC time.'
}

@@ -300,4 +276,3 @@ }

type: 'string',
title: 'Portal Type',
description: 'The type of the object in ClearRoad ERP5 instance. Only one possible value.',
description: 'The type of the object in ClearRoad Platform. Only one value is possible.',
default: 'Road Event Message',

@@ -321,3 +296,3 @@ enum: [

examples: [
'2017-01-02T14:21:20Z'
'2018-04-01T00:00:00Z'
]

@@ -345,5 +320,3 @@ }

type: 'string',
title: 'Description',
description: 'The description of the reported mileage',
default: '',
examples: [

@@ -354,7 +327,5 @@ 'Mileage data'

vehicle_reference: {
title: 'Vehicle Reference',
description: 'The Vehicle Identification Number of the vehicle for which the message is reported.',
type: 'string',
pattern: '^[0-9A-Z]{17}$',
default: '',
examples: [

@@ -366,5 +337,3 @@ '1GTG6BE38F1262119'

type: 'string',
title: 'The On Board Unit Reference',
description: 'The On Board Unit reference of the device for which the message is reported',
default: '',
pattern: '^[0-9a-z]{24}$',

@@ -377,4 +346,3 @@ examples: [

type: 'string',
description: 'The type of mileage : reported, adjustement... ',
default: '',
description: 'A value to indicate the type of message. Can be one of: ADJ: Adjusted mileage transaction, CRE: Credit transaction, FEE: Fees transaction, INV: Invoicing transaction, MRP: Reported mileage transaction',
examples: [

@@ -385,6 +353,4 @@ 'MRP'

transaction_date: {
$ref: '#/definitions/datetime',
title: 'Transaction Date',
description: 'The date at which miles were traveled. Should be in UTC.',
default: ''
description: 'The date at which mileage was traveled. Should be in UTC.',
$ref: '#/definitions/datetime'
},

@@ -395,8 +361,6 @@ mileage_details: {

type: 'object',
required: [],
properties: {
fuel_price: {
type: 'number',
title: 'Fuel Price',
description: 'The price of the fuel consumed during the trip',
description: 'The price of the fuel consumed at the transaction date.',
default: 0,

@@ -409,4 +373,3 @@ examples: [

type: 'number',
title: 'Fuel Quantity',
description: 'The quantity of fuel consumed during the trip',
description: 'The quantity of fuel consumed at the transaction date.',
default: 0,

@@ -419,4 +382,3 @@ examples: [

type: 'number',
title: 'Miles Price',
description: 'The price of the fuel per mile consumed during the trip.',
description: 'The price of miles traveled.',
default: 0,

@@ -429,4 +391,3 @@ examples: [

type: 'number',
title: 'Miles Quantity',
description: 'The number of miles traveled during the trip',
description: 'The number of miles traveled.',
default: 0,

@@ -439,4 +400,3 @@ examples: [

type: 'integer',
title: 'Rule ID',
description: 'The Rule ID of the state where the trip is made. Each state has its own rule ID.',
description: 'An identifier associated with a geographic area, or zone, in which a specific rate per mile will be assessed for miles traveled. FIPS codes are used to identify states.',
default: 0,

@@ -449,3 +409,2 @@ examples: [

type: 'integer',
title: 'Sub Rule ID',
description: '0 if the travel was on public roads, 1 if it was on private roads',

@@ -464,3 +423,2 @@ default: 0,

type: 'string',
title: 'Portal Type',
description: 'The type of message in the ClearRoad Platform. Only one type possible',

@@ -485,3 +443,3 @@ default: 'Road Message',

examples: [
'2017-01-02T14:21:20Z'
'2018-04-01T00:00:00Z'
]

@@ -500,8 +458,6 @@ }

type: 'string',
title: 'Report Type',
description: 'The type of the requested report',
description: 'The type of the requested report.',
enum: [
'AccountBalance'
],
$comment: 'So far there is only one type of request possible.',
examples: [

@@ -513,4 +469,3 @@ 'AccountBalance'

type: 'string',
title: 'Billing Period Reference',
description: 'The reference of the billing period. The billing period should already exist in the system.',
description: 'The reference of the billing period. The billing period should already exist in the ClearRoad Platform.',
examples: [

@@ -521,15 +476,12 @@ '2018Q1'

request_date: {
$ref: '#/definitions/datetime',
title: 'Request Date',
description: 'The datetime for which the request is made'
description: 'The datetime for which the request is made. Should be in UTC.',
$ref: '#/definitions/datetime'
},
request: {
type: 'string',
title: 'Request',
description: ''
description: 'Used to give specific parameters to report if needed. This filed could be left empty for an AccountBalance report.'
},
portal_type: {
type: 'string',
title: 'Portal Type',
description: 'The type of the object in the ClearRoad ERP5 instance. Only one possible value.',
description: 'The type of the object in the ClearRoad Platform. Only one possible value.',
default: 'Road Report Request',

@@ -536,0 +488,0 @@ enum: [

{
"name": "@clearroad/api",
"version": "1.2.0-rc.1",
"version": "1.2.0-rc.2",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/commonjs/clearroad.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc