<script type="text/javascript" src="https://apis.fleetfreedom.com/js/trakit.fleetfreedom.js"></script>
var value = trakit.fleetfreedom.convert.member;
/* or */
var result = trakit.fleetfreedom.convert.member(...params);
Method | Returns | Description |
---|---|---|
acToHa( | number | Value in acres converted to hectares. |
cmpsToInps( | number | Value in centimetres converted to inches. |
cmToIn( | number | Value in centimetres converted to inches. |
cToF( | number | Value in Celsius converted to Fahrenheit. |
flozToMl( | number | Value in US standard fluid ounces converted to millilitres. |
flozUKToMl( | number | Value in British fluid ounces converted to millilitres. |
fromTo( | number | A generic converter from one UserMeasurementPreference to another. Does not convert from one size to another in the same UserMeasurementPreference. Units must be given in equivalent sizes ie: gallons to litres, kilometers to miles. |
fToC( | number | Value in Fahrenheit converted to Celsius. |
ftpsToMps( | number | Value in feet converted to metres. |
ftToM( | number | Value in feet converted to metres. |
galToL( | number | Value in US standard gallons converted to litres. |
galUKToL( | number | Value in British gallons converted to litres. |
gToOz( | number | Value in grams converted to ounces. |
haToAc( | number | Value in hectares converted to acres. |
inpsToCmps( | number | Value in inches converted to centimetres. |
inToCm( | number | Value in inches converted to centimetres. |
kgToLbs( | number | Value in kilograms converted to pounds. |
kmToMi( | number | Value in kilometres converted to miles. |
kpaToPsi( | number | Value in kilo-pascals converted to pounds per square inch. |
kphToMph( | number | Value in kilometres converted to miles. |
kwh100kimToMpkwh( | number | Returns the corollary of either miles per kilowatt hour or kilowatt hour per 100 kilometres. |
l100kmToMpg( | number | Returns the corollary of either miles per US standard gallon or litres per 100 kilometres. |
l100kmToMpgUK( | number | Returns the corollary of either miles per British gallon or litres per 100 kilometres. |
lbsToKg( | number | Value in pounds converted to kilograms. |
lToGal( | number | Value in litres converted to US standard gallons. |
lToGalUK( | number | Value in litres converted to British gallons. |
miToKm( | number | Value in miles converted to kilometres. |
mlToFloz( | number | Value in millilitres converted to US standard fluid ounces. |
mlToFlozUK( | number | Value in millilitres converted to British fluid ounces. |
mpgToL100km( | number | Returns the corollary of either miles per US standard gallon or litres per 100 kilometres. |
mpgUKToL100km( | number | Returns the corollary of either miles per British gallon or litres per 100 kilometres. |
mphToKph( | number | Value in miles converted to kilometres. |
mpkwhToKwh100kim( | number | Returns the corollary of either miles per kilowatt hour or kilowatt hour per 100 kilometres. |
mpsToFtps( | number | Value in metres converted to feet. |
mToFt( | number | Value in metres converted to feet. |
mToYd( | number | Value in metres converted to yards. |
ozToG( | number | Value in ounces converted to grams. |
psiToKpa( | number | Value in pounds per square inch converted to kilo-pascals. |
sqftToSqm( | number | Value in square feet converted to square meters. |
sqkmToSqmi( | number | Value in square kilometres converted to square miles. |
sqmiToSqkm( | number | Value in square miles converted to square kilometres. |
sqmToSqft( | number | Value in square meters converted to square feet. |
tonToT( | number | Value in US (short) tons converted to metric tonnes. |
tonUKToT( | number | Value in British (long) tons converted to metric tonnes. |
tToTon( | number | Value in metric tonnes converted to US (short) tons. |
tToTonUK( | number | Value in metric tonnes converted to British (long) tons. |
ydToM( | number | Value in yards converted to metres. |
var value = trakit.fleetfreedom.encoding.member;
/* or */
var result = trakit.fleetfreedom.encoding.member(...params);
Method | Returns | Description |
---|---|---|
fromBase64( | string | Converts a base64 encoded string back to a readable string |
fromPassword( | string | Decodes the given Provider password as a human readable value. |
fromUrl( | string | Decodes a URL encoded string |
fromUtf8( | string | Decodes a UTF8 string |
toBase64( | string | Converts a string to base64 encoded string |
toPassword( | string | Encodes the given string as a Provider password. |
toUrl( | string | Converts a string to a valid URL encoded value |
toUtf8( | string | Encodes a string into a valid UTF8 string |
var value = trakit.fleetfreedom.utility.member;
/* or */
var result = trakit.fleetfreedom.utility.member(...params);
Property | Type | Default | Description |
---|---|---|---|
timezones | Array | undefined | A list of all supported system timezones. |
Method | Returns | Description |
---|---|---|
arrayOfType( | boolean | Checks every object in an array for the instance type. Empty arrays are returned as true. |
codify( Throws TypeError "input value is not a string". | string | Creates a searchable/coded string based on a user inputted string. Quotation marks, apostrophes, and accents are removed. |
douglasPeucker( | Array.<T> | An implementation of the Ramer-Douglas-Peucker path reduction algorithm. The source array should be more than two items in length, otherwise reduction is pointless. The callback function returns a number (greater than zero) as the triangle height as defiend by three points; first point, middle point, and last point. The "kink" threshold is set using the tolerance argument which must be a number greater than or equal to zero. |
escape( | string | Creates an HTTP safe string for transmission similar to the escape function. |
fileSize( | string | Creates a more human readable string representation of the filesize. |
fromPassword( | string | Decodes the given Provider password as a human readable value. |
guid( | string | Delivers a GUID-like string with a mixed in location/refresh unique seed |
inherits( | function | Creates a JavaScript binding for super-classes |
isN( | boolean | Opposite of utility.isNaN. Checks to see if the given parameter is a number object, or number literal, and that it is not NaN. This method will return false for values: "", "1234", null, undefined, true, and false. |
isNaN( | boolean | Similar to isNaN, it checks to see if the given parameter is not a number object, not a number literal, and that it is NaN. This method will return true for values: "", "1234", null, undefined, true, and false. |
isNothing( | boolean | Checks for both null and undefined |
merge( | Object | Does a deep copy of values from one object to another |
numberGroups( Throws TypeError "size must be greater than zero". | string | Groups digits of a number together to make a more human readable version. |
parseSearch( | Array.<SearchPattern> | Creates an array of SearchPatterns for easier matching. Used for doing OR matching. |
parseTime( | number | Parses a serialized TimeSpan into a number representing the total seconds. For example the string "1.07:42:03.467" equals 114123.467, which is 1 day, 7 hours, 42 minutes, 3 seconds, and 467 milliseconds. |
roundTo( | number | Rounds a number to the desired number of decimal places. Using a negative places value will round to the nearest ten. |
stringifyTime( | string | Parses a number representing the total seconds into a serialized TimeSpan string. For example the number 114123.467 would be serialized as "1.07:42:03.467". |
unescape( | string | Similar to the unescape function, it will decode a string encoded using utility.escape. |
var value = trakit.fleetfreedom.version.member;
/* or */
var result = trakit.fleetfreedom.version.member(...params);
var object = new trakit.fleetfreedom.Collection(/** Object */ iterable);
Property | Type | Description |
---|---|---|
size | number | The number of objects in the Collection. |
Method | Returns | Description |
---|---|---|
add( | boolean | Adds the value to the Collection. Returns boolean indicating whether the value was newly added. |
clear( | Removes all values from the Collection. | |
concat( | Collection | Creates a new Collection, and adds or overwrites the keys with the other given Collections. |
filter( | Collection | Builds a new Collection with only the positive results from the predicate. |
forEach( | Iterates through all the values in the Collection. | |
has( | boolean | Returns a boolean asserting whether a value has been added to the Collection or not. |
remove( | boolean | Removes the value in the Collection. After such a call, Collection#has(key) will return false. |
toArray( | Array | Returns an Array with all the values from this Collection. |
toJSON( | Array | Creates an Array literal of this Collection. Values use their toJSON method (if present), NaNs are converted to nulls, and "undefined"s are not added. |
var object = new trakit.fleetfreedom.Dictionary(/** Object */ iterable);
Property | Type | Description |
---|---|---|
size | number | The number of key/value pairs in the Dictionary. |
Method | Returns | Description |
---|---|---|
addOrReplace( | Either adds the given key/value, or replaces the value for the given key. The updateValue is invoked only for replace operations. The updateValue function is invoked with the existing value, the replacement value, the key, and itself, and returns the value to be set. The method itself returns undefined. | |
clear( | Removes all key/value pairs from the Dictionary. | |
concat( | Dictionary | Creates a new Dictionary, and adds or overwrites the keys with the other given Dictionaries. |
copy( | Dictionary | Creates an exact copy of this Dictionary. |
every( | boolean | Checks each pair in the Dictionary and returns true only if all pairs match the predicate. |
filter( | Dictionary | Builds a new Dictionary with only the positive results from the predicate. |
forEach( | Iterates through all the pairs in the Dictionary. | |
get( | V | undefined | Returns the value associated to the key, or undefined if there is none. |
has( | boolean | Returns a boolean asserting whether a value has been associated to the key in the Dictionary or not. |
hasValue( | boolean | Returns a boolean asserting whether a value has been added to the Dictionary or not. |
keys( | Array.<K> | Gets an Array of keys within this Dictionary. |
order( | Dictionary | Returns a new Dictionary whose keys are sorted based on the given predicate. Sorting a Dictionary is similar to sorting an array using Array#sort. Your compareFunction returns a number (typically 1, 0, or -1), and takes two arguments. Each argument is a "pair", an object containing a key and value; { key: K, value: V }. |
remove( | boolean | Removes any value associated to the key. After such a call, Dictionary#has(key) will return false. |
set( | Sets the value for the key in the Dictionary. Returns undefined. | |
setOrReplace( | Either adds the given key/value, or replaces the value for the given key. The setValue is invoked only for add operations, and the updateValue is invoked only for replace operations. The setValue function is invoked with the key, and itself, and returns the value to be set. The updateValue function is invoked with the existing value, a reference to the setValue function, the key, and itself, and returns the value to be set. The method itself returns undefined. | |
some( | boolean | Checks each pair in the Dictionary and returns true if one pair matches the predicate. |
toArray( | Array.<?> | Builds an array out of the results of the predicate. |
toDictionary( | Dictionary | Builds a new Dictionary out of the results of the predicates. |
toJSON( | Object | Creates an Object literal of this Dictionary. Keys are set as strings. Values use their toJSON method (if present), NaNs are converted to nulls, and "undefined"s are not added. |
values( | Array.<V> | Gets the Array of values from this Dictionary. |
var object = new trakit.fleetfreedom.SearchPattern(/** string */ pattern);
Property | Type | Description |
---|---|---|
operators | Dictionary.<string, Array.<string>> | To help qualify matches, all operators must match for the search to be considered matched. Operators are formatted as "operator:terms". |
terms | Array.<string> | If any term matches, then the search should be considered matched. Terms are any string contained by single/double-quotes or not parsed as an operator. |
wildcard | boolean | True when this pattern will match all. |
Method | Returns | Description |
---|---|---|
copy( | SearchPattern | Returns a new, identical instance of the pattern. |
toString( | string | Returns a re-parseable string representation of the pattern. |
Method | Returns | Description |
---|---|---|
SearchPattern.parse( | Array.<SearchPattern> | Creates an array of SearchPatterns for easier matching. Used for doing OR matching. |
SearchPattern.stringify( | string | Creates a single string from the given array of SearchPatterns for easier serialization. |
var object = new trakit.fleetfreedom.TimeSpan(/** string | number */ duration);
Property | Type | Description |
---|---|---|
days | number | Days component of the time-span. |
hours | number | Hours component of the time-span. |
milliseconds | number | Millisecond component of the time-span. |
minutes | number | Minutes component of the time-span. |
seconds | number | Seconds component of the time-span. |
totalDays | number | Total time-span value in decimal days. |
totalHours | number | Total time-span value in decimal hours. |
totalMilliseconds | number | Total time-span value in milliseconds. |
totalMinutes | number | Total time-span value in decimal minutes. |
totalSeconds | number | Total time-span value in decimal seconds. |
Method | Returns | Description |
---|---|---|
add( | number | Adds the given value to the current time-span. |
subtract( | number | Subtracts the given value from the time-span. |
toString( | string | Parses the time-span into a serialized TimeSpan string. The format follows the trakit.json.duration definition. |
Method | Returns | Description |
---|---|---|
TimeSpan.fromDays( | TimeSpan | Constructs a new TimeSpan with the value specified in days. |
TimeSpan.fromHours( | TimeSpan | Constructs a new TimeSpan with the value specified in hours. |
TimeSpan.fromMilliseconds( | TimeSpan | Constructs a new TimeSpan with the value specified in milliseconds. |
TimeSpan.fromMinutes( | TimeSpan | Constructs a new TimeSpan with the value specified in minutes. |
TimeSpan.fromSeconds( | TimeSpan | Constructs a new TimeSpan with the value specified in seconds. |
var object = new trakit.fleetfreedom.Timezone(/** string */ code, /** string */ name, /** number */ offset, /** boolean */ dst);
Property | Type | Description |
---|---|---|
code | string | A short identification code for date/time conversion |
dst | boolean | Whether this timezone abides by daylight savings |
name | string | Full name of the timezone |
offset | number | The number of minutes offset from UTC |
Method | Returns | Description |
---|---|---|
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
var object = new trakit.fleetfreedom.Asset(/** Company */ company, /** trakit.json.Asset | trakit.json.AssetGeneral | trakit.json.AssetAdvanced */ object);
Property | Type | Description |
---|---|---|
attributes | Dictionary.<string, AssetAttribute> | A list of properties given to this asset by a Behaviour. The dictionary key is a codified version of the AssetAttribute#name. See utility#codify. |
cargo | Array.<Inventory> | Inventory carried by the asset. |
company | Company | The Company to which this asset belongs. |
dispatch | Dispatch | The list of current tasks and routes assigned to this asset. |
icon | Icon | The icon that represents this asset on the map and in lists. |
iconId | number | The unique identifier of the Icon for this asset. |
id | number | Unique identifier |
kind | AssetType | The type of asset. |
labels | Array.<string> | |
messages | Array.<Message> | Two way conversation Messages between the asset and Fleet Freedom. |
messagingAddress | string | The fall-back address which is used to send Messages. |
name | string | This thing's name. |
notes | string | Notes about it. |
odometer | number | The virtual odometer for this vehicle or trailer. |
pictureIds | Array.<number> | |
pictures | Array.<Picture> | A list of Pictures of this thing. |
places | Dictionary.<number, AssetPlaceStatus> | Known Places this asset has interacted with. |
position | Position | The last recorded GPS coordinates for this asset. |
providerIds | Array.<number> | The IDs of providers for this asset. |
providers | Array.<Provider> | The modems or phones providing GPS positions and other telemetry for this asset. |
reference | string | Getter/setter for the references field named "reference". |
references | Dictionary.<string, string> | Name/value collections of custom fields used to refer to external systems. |
relationshipIds | Array.<number> | The IDs of related assets. |
relationships | Array.<Asset> | The related assets like a vehicle for a driver, or a trailer for a vehicle. |
since | Date | A timestamp that indicates when the Asset was suspended or deleted. |
suspended | boolean | A flag to show that an asset is suspended from event procesing. |
tags | Array.<string> | |
version | Array.<number> | The version flags used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
createDispatchTask( | DispatchTask | Creates a new DispatchTask and adds it to the Dispatch#tasks array |
createMessage( | Message | |
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | Asset | Updates parameters for this Asset from the given JSON literal |
getDispatchJobById( | DispatchJob | Retrieves the DispatchJob with the given id or null if none found. |
getDispatchJobs( | Array.<DispatchJob> | Gets an array of DispatchJobs for this Asset. |
getDispatchTaskById( | DispatchTask | Retrieves the DispatchTask with the given id or null if none found. |
getDispatchTasks( | Array.<DispatchTask> | Gets an array of DispatchTasks for this Asset. |
getFormResults( | Array.<FormResult> | Gets an array of FormResults for this Asset. |
getHosEvents( | Array.<HosEvent> | Gets an array of HosEvents for this Asset. |
getHosInspections( | Array.<HosInspection> | Gets an array of HosInspections for this Asset. |
getMaintenanceJobs( | Array.<MaintenanceJob> | Gets an Array of Maintenance Jobs for this Asset. |
getMessageById( | Message | Retrieves the Message with the given id or null if none found. |
getMessages( | Array.<Message> | Gets an array of Messages for this Asset. |
getPictureIds( | Array.<number> | Gets an Array of Picture Ids for this Asset. |
getPictures( | Array.<Picture> | Gets an Array of Pictures for this Asset. |
getPlaces( | Array.<Place> | Gets a list of Places which are being interacted with by this asset. |
isMatch( | boolean | |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.AssetAttribute(/** string */ name, /** string */ simple, /** string */ complex, /** Object */ raw, /** string */ unit, /** Date */ dts, /** string */ provider, /** boolean */ global);
Property | Type | Description |
---|---|---|
complex | string | Parse-able/formatted string for complex display. |
dts | Date | The date/time when this value was set. |
global | boolean | When false, indicates that this attribute is used by an internal system and should be left untouched. |
name | string | Display name for the attribute. |
provider | string | A note from the Behaviour as to why this was set. |
raw | Object | Raw value. |
simple | string | Computed/contextual value from the Behaviour. |
unit | string | The value's unit. IE: kilometres, degrees Fahrenheit, etc... |
Method | Returns | Description |
---|---|---|
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
var object = new trakit.fleetfreedom.AssetPlaceStatus(/** string */ kind, /** string | Date */ enter, /** string | Date */ latest);
Property | Type | Description |
---|---|---|
enter | Date | The date/time stamp for when the Asset first began interacting with the Place |
kind | AssetPlaceStatusType | The kind of interaction |
latest | Date | The most recent date/time stamp for the interaction |
Method | Returns | Description |
---|---|---|
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
var object = new trakit.fleetfreedom.Person(/** Company */ company, /** trakit.json.Person | trakit.json.PersonGeneral | trakit.json.AssetAdvanced */ object);
Property | Type | Description |
---|---|---|
attributes | Dictionary.<string, AssetAttribute> | A list of properties given to this asset by a Behaviour. The dictionary key is a codified version of the AssetAttribute#name. See utility#codify. |
cargo | Array.<Inventory> | Inventory carried by the asset. |
company | Company | The Company to which this asset belongs. |
contact | Contact | The contact information of this Person |
dispatch | Dispatch | The list of current tasks and routes assigned to this asset. |
icon | Icon | The icon that represents this asset on the map and in lists. |
iconId | number | The unique identifier of the Icon for this asset. |
id | number | Unique identifier |
kind | AssetType | The type of asset. |
labels | Array.<string> | |
messages | Array.<Message> | Two way conversation Messages between the asset and Fleet Freedom. |
messagingAddress | string | The fall-back address which is used to send Messages. |
name | string | This thing's name. |
notes | string | Notes about it. |
odometer | number | The virtual odometer for this vehicle or trailer. |
pictureIds | Array.<number> | |
pictures | Array.<Picture> | A list of Pictures of this thing. |
places | Dictionary.<number, AssetPlaceStatus> | Known Places this asset has interacted with. |
position | Position | The last recorded GPS coordinates for this asset. |
providerIds | Array.<number> | The IDs of providers for this asset. |
providers | Array.<Provider> | The modems or phones providing GPS positions and other telemetry for this asset. |
reference | string | Getter/setter for the references field named "reference". |
references | Dictionary.<string, string> | Name/value collections of custom fields used to refer to external systems. |
relationshipIds | Array.<number> | The IDs of related assets. |
relationships | Array.<Asset> | The related assets like a vehicle for a driver, or a trailer for a vehicle. |
since | Date | A timestamp that indicates when the Asset was suspended or deleted. |
suspended | boolean | A flag to show that an asset is suspended from event procesing. |
tags | Array.<string> | |
trailer | Trailer | The Trailer being towed by this Person |
vehicle | Vehicle | The vehicle currently being driven by this Person |
version | Array.<number> | The version flags used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
createDispatchTask( | DispatchTask | Creates a new DispatchTask and adds it to the Dispatch#tasks array |
createMessage( | Message | |
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | Person | Updates parameters for this Person from the given JSON literal |
getDispatchJobById( | DispatchJob | Retrieves the DispatchJob with the given id or null if none found. |
getDispatchJobs( | Array.<DispatchJob> | Gets an array of DispatchJobs for this Asset. |
getDispatchTaskById( | DispatchTask | Retrieves the DispatchTask with the given id or null if none found. |
getDispatchTasks( | Array.<DispatchTask> | Gets an array of DispatchTasks for this Asset. |
getFormResults( | Array.<FormResult> | Gets an array of FormResults for this Asset. |
getHosEvents( | Array.<HosEvent> | Gets an array of HosEvents for this Asset. |
getHosInspections( | Array.<HosInspection> | Gets an array of HosInspections for this Asset. |
getMaintenanceJobs( | Array.<MaintenanceJob> | Gets an Array of Maintenance Jobs for this Asset. |
getMessageById( | Message | Retrieves the Message with the given id or null if none found. |
getMessages( | Array.<Message> | Gets an array of Messages for this Asset. |
getPictureIds( | Array.<number> | Gets an Array of Picture Ids for this Person. |
getPictures( | Array.<Picture> | Gets an Array of Pictures for this Person. |
getPlaces( | Array.<Place> | Gets a list of Places which are being interacted with by this asset. |
isMatch( | boolean | |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.Trailer(/** Company */ company, /** trakit.json.Trailer | trakit.json.TrailerGeneral | trakit.json.AssetAdvanced */ object);
Property | Type | Description |
---|---|---|
attributes | Dictionary.<string, AssetAttribute> | A list of properties given to this asset by a Behaviour. The dictionary key is a codified version of the AssetAttribute#name. See utility#codify. |
bin | InventoryContainer | The bin this trailer/chassis is hauling |
cargo | Array.<Inventory> | Inventory carried by the asset. |
colour | string | The main colour of this vehicle |
company | Company | The Company to which this asset belongs. |
dispatch | Dispatch | The list of current tasks and routes assigned to this asset. |
icon | Icon | The icon that represents this asset on the map and in lists. |
iconId | number | The unique identifier of the Icon for this asset. |
id | number | Unique identifier |
kind | AssetType | The type of asset. |
labels | Array.<string> | |
make | string | Name of manufacturer |
messages | Array.<Message> | Two way conversation Messages between the asset and Fleet Freedom. |
messagingAddress | string | The fall-back address which is used to send Messages. |
model | string | Manufacturer model name |
name | string | This thing's name. |
notes | string | Notes about it. |
odometer | number | The virtual odometer for this vehicle or trailer. |
person | Person | The person driving this trailer |
pictureIds | Array.<number> | |
pictures | Array.<Picture> | A list of Pictures of this thing. |
places | Dictionary.<number, AssetPlaceStatus> | Known Places this asset has interacted with. |
plate | string | The license plate |
position | Position | The last recorded GPS coordinates for this asset. |
providerIds | Array.<number> | The IDs of providers for this asset. |
providers | Array.<Provider> | The modems or phones providing GPS positions and other telemetry for this asset. |
reference | string | Getter/setter for the references field named "reference". |
references | Dictionary.<string, string> | Name/value collections of custom fields used to refer to external systems. |
relationshipIds | Array.<number> | The IDs of related assets. |
relationships | Array.<Asset> | The related assets like a vehicle for a driver, or a trailer for a vehicle. |
serial | string | The unique serial number on the trailer (for your reference) |
since | Date | A timestamp that indicates when the Asset was suspended or deleted. |
suspended | boolean | A flag to show that an asset is suspended from event procesing. |
tags | Array.<string> | |
vehicle | Vehicle | The vehicle currently towing this trailer |
version | Array.<number> | The version flags used to ensure sync operations are done in order. |
year | number | The year this vehicle was manufactured |
Method | Returns | Description |
---|---|---|
createDispatchTask( | DispatchTask | Creates a new DispatchTask and adds it to the Dispatch#tasks array |
createMessage( | Message | |
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | Trailer | Updates parameters for this Trailer from the given JSON literal. |
getDispatchJobById( | DispatchJob | Retrieves the DispatchJob with the given id or null if none found. |
getDispatchJobs( | Array.<DispatchJob> | Gets an array of DispatchJobs for this Asset. |
getDispatchTaskById( | DispatchTask | Retrieves the DispatchTask with the given id or null if none found. |
getDispatchTasks( | Array.<DispatchTask> | Gets an array of DispatchTasks for this Asset. |
getFormResults( | Array.<FormResult> | Gets an array of FormResults for this Asset. |
getHosEvents( | Array.<HosEvent> | Gets an array of HosEvents for this Asset. |
getHosInspections( | Array.<HosInspection> | Gets an array of HosInspections for this Asset. |
getMaintenanceJobs( | Array.<MaintenanceJob> | Gets an Array of Maintenance Jobs for this Asset. |
getMessageById( | Message | Retrieves the Message with the given id or null if none found. |
getMessages( | Array.<Message> | Gets an array of Messages for this Asset. |
getPictureIds( | Array.<number> | Gets an Array of Picture Ids for this Asset. |
getPictures( | Array.<Picture> | Gets an Array of Pictures for this Asset. |
getPlaces( | Array.<Place> | Gets a list of Places which are being interacted with by this asset. |
isMatch( | boolean | |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.Vehicle(/** Company */ company, /** trakit.json.Vehicle | trakit.json.VehicleGeneral | trakit.json.VehicleAdvanced */ object);
Property | Type | Description |
---|---|---|
attributes | Dictionary.<string, AssetAttribute> | A list of properties given to this asset by a Behaviour. The dictionary key is a codified version of the AssetAttribute#name. See utility#codify. |
cargo | Array.<Inventory> | Inventory carried by the asset. |
colour | string | The main colour of this vehicle |
company | Company | The Company to which this asset belongs. |
dispatch | Dispatch | The list of current tasks and routes assigned to this asset. |
engineHours | number | The number of hours the engine has been running |
icon | Icon | The icon that represents this asset on the map and in lists. |
iconId | number | The unique identifier of the Icon for this asset. |
id | number | Unique identifier |
kind | AssetType | The type of asset. |
labels | Array.<string> | |
make | string | Name of manufacturer |
messages | Array.<Message> | Two way conversation Messages between the asset and Fleet Freedom. |
messagingAddress | string | The fall-back address which is used to send Messages. |
model | string | Manufacturer model name |
name | string | This thing's name. |
notes | string | Notes about it. |
odometer | number | The virtual odometer for this vehicle or trailer. |
person | Person | The Person driving |
pictureIds | Array.<number> | |
pictures | Array.<Picture> | A list of Pictures of this thing. |
places | Dictionary.<number, AssetPlaceStatus> | Known Places this asset has interacted with. |
plate | string | The license plate |
position | Position | The last recorded GPS coordinates for this asset. |
providerIds | Array.<number> | The IDs of providers for this asset. |
providers | Array.<Provider> | The modems or phones providing GPS positions and other telemetry for this asset. |
reference | string | Getter/setter for the references field named "reference". |
references | Dictionary.<string, string> | Name/value collections of custom fields used to refer to external systems. |
relationshipIds | Array.<number> | The IDs of related assets. |
relationships | Array.<Asset> | The related assets like a vehicle for a driver, or a trailer for a vehicle. |
since | Date | A timestamp that indicates when the Asset was suspended or deleted. |
suspended | boolean | A flag to show that an asset is suspended from event procesing. |
tags | Array.<string> | |
trailer | Trailer | The Trailer being towed |
version | Array.<number> | The version flags used to ensure sync operations are done in order. |
vin | string | The unique Vehicle Identification Number |
year | number | The year this vehicle was manufactured |
Method | Returns | Description |
---|---|---|
createDispatchTask( | DispatchTask | Creates a new DispatchTask and adds it to the Dispatch#tasks array |
createMessage( | Message | |
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | Vehicle | Updates parameters for this Vehicle from the given JSON literal |
getDispatchJobById( | DispatchJob | Retrieves the DispatchJob with the given id or null if none found. |
getDispatchJobs( | Array.<DispatchJob> | Gets an array of DispatchJobs for this Asset. |
getDispatchTaskById( | DispatchTask | Retrieves the DispatchTask with the given id or null if none found. |
getDispatchTasks( | Array.<DispatchTask> | Gets an array of DispatchTasks for this Asset. |
getFormResults( | Array.<FormResult> | Gets an array of FormResults for this Asset. |
getHosEvents( | Array.<HosEvent> | Gets an array of HosEvents for this Asset. |
getHosInspections( | Array.<HosInspection> | Gets an array of HosInspections for this Asset. |
getMaintenanceJobs( | Array.<MaintenanceJob> | Gets an Array of Maintenance Jobs for this Asset. |
getMessageById( | Message | Retrieves the Message with the given id or null if none found. |
getMessages( | Array.<Message> | Gets an array of Messages for this Asset. |
getPictureIds( | Array.<number> | Gets an Array of Picture Ids for this Asset. |
getPictures( | Array.<Picture> | Gets an Array of Pictures for this Asset. |
getPlaces( | Array.<Place> | Gets a list of Places which are being interacted with by this asset. |
isMatch( | boolean | |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
Value | Description |
---|---|
enter | Occurs when an asset is outside a Place, then goes inside the boundary. |
exit | Occurs when an asset was inside the boundary of a Place, but then moves outside the boundary. |
inside | Occurs when the asset has was inside the boundary before, and is still inside the boundary now. |
Value | Description |
---|---|
asset | Anything being tracked which isn't one of the other types. |
person | Represents an actual person with contact information. |
trailer | Something pulled around by a vehicle. |
vehicle | A truck, car, bulldozer, motorcycle, star-ship, etc... |
var object = new trakit.fleetfreedom.Behaviour(/** Company */ company, /** trakit.json.Behaviour */ object);
Property | Type | Description |
---|---|---|
filters | string | A search pattern used to filter the providers which can implement this behaviour. |
id | number | Unique identifier |
messages | Array.<BehaviourLog> | A log of recent messages generated by the BehaviourScript's calling console functions. |
name | string | Name of this configuration |
notes | string | Notes about this configuration |
parameters | Object.<string, string> | Defined variable name/value pairs for the BehaviourScript used |
priority | number | The Behaviour's execution order |
script | BehaviourScript | The BehaviourScript to which these variables apply. |
scriptId | number | The unique identifier of the BehaviourScript to which these variables apply. |
targets | string | The search pattern used to target the assets which will embed this behaviour in their execution context. |
version | Array.<number> | The version flag used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
createLog( | BehaviourLog | |
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | Behaviour | Updates parameters for this Behaviour from the given JSON literal |
getLogById( | BehaviourLog | Retrieves the BehaviourLog with the given id or null if none found. |
isMatch( | boolean | Checks the given SearchPattern for a match to this behaviour. Used internally by Company#findBehaviours. |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.BehaviourLog(/** Company */ company, /** trakit.json.BehaviourLog */ object);
Property | Type | Description |
---|---|---|
asset | Asset | The Asset whose behaviours created this debug entry. |
assetId | number | The unique identifier of the Asset whose behaviours created this debug entry. |
behaviour | Behaviour | The configured Behaviour from which this debug message was invoked. |
behaviourId | number | The unique identifier of the Behaviour to which this debug belongs. |
character | number | Relevant character index if available |
company | Company | The Company to which the debug message's Behaviour and/or a BehaviourScript belongs. |
dts | Date | When the debug message was generated. |
id | number | Unique identifier of this debug message. |
kind | BehaviourLogType | Type of debug message that was generated. |
line | number | Relevant line number if available |
message | string | Message data saved to the debug message. |
script | BehaviourScript | The BehaviourScript in question which logged this message. |
scriptId | number | The unique identifier of the BehaviourScript to which this debug belongs. |
version | Array.<number> | The version flag used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
fromJSON( | ||
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
var object = new trakit.fleetfreedom.BehaviourParameter(/** BehaviourParameterType */ type, /** string */ value, /** string */ notes, /** string */ context);
Property | Type | Description |
---|---|---|
context | string | Gives a hint to the client on the best UI to use for editing. For example, "checkbox" is a good UI hint for boolean parameter types. |
notes | string | Usage notes. |
type | BehaviourParameterType | Simple type information for the compiler. |
value | string | The value is given as a string, but parsed into native type when compiled. |
Method | Returns | Description |
---|---|---|
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
var object = new trakit.fleetfreedom.BehaviourScript(/** Company */ company, /** trakit.json.BehaviourScript */ object);
Property | Type | Description |
---|---|---|
compiles | boolean | A flag set by the compiler if this code compiles |
fill | string | The colour filling the background of the display icon. |
filters | string | Default expression(s) used as a hint for configured Behaviours. |
global | boolean | When true, this script is available to all child Companys. |
graphic | string | The name of the icon used for display purposes. |
id | number | Unique identifier of this script |
messages | Array.<BehaviourLog> | List of warnings and errors while trying to compile this script. |
name | string | Name for this script |
notes | string | Usage notes |
parameters | Dictionary.<string, BehaviourParameter> | Arguments given to this script. |
source | string | The raw source code |
stroke | string | The colour of the outline for the display icon. |
version | Array.<number> | The version flag used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
createLog( | BehaviourLog | |
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | BehaviourScript | Updates parameters for this BehaviourScript from the given JSON literal |
getBehaviours( | Array.<Behaviour> | Retrieves the Behaviours using this script. |
getLogById( | BehaviourLog | Retrieves the BehaviourLog with the given id or null if none found. |
isMatch( | boolean | Checks the given SearchPattern for a match to this script. Used internally by Company#findBehaviourScripts. |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
Value | Description |
---|---|
err | Exception message |
info | Higher importance message |
log | Regular log message |
warn | Warning message |
Value | Description |
---|---|
boolean | True or false. |
json | Object or array literal. |
number | Numeric value (signed double-precision floating point number). |
string | Text. |
var object = new trakit.fleetfreedom.Company(/** trakit.json.Company | trakit.json.CompanyGeneral | trakit.json.CompanyStyles | trakit.json.CompanyPolicies | trakit.json.CompanyReseller */ object);
Property | Type | Description |
---|---|---|
assets | Array.<Asset> | List or virtual assets, persons, vehicles, and trailers |
behaviourLogs | Array.<BehaviourLog> | Logs for the Behaviours of this company. |
behaviours | Array.<Behaviour> | Configured Behaviour Scripts. |
behaviourScripts | Array.<BehaviourScript> | Behaviours authored by a company user. |
billing | CompanyBilling | Billing contacts, rules, limits, and notes |
contacts | Array.<Contact> | Business contacts |
directory | Dictionary.<string, Array.<Contact>> | Directory of Contacts for various business reasons |
dispatchJobs | Array.<DispatchJob> | All of the jobs both assigned to Assetss, and not yet assigned. |
dispatchTasks | Array.<DispatchTask> | All of the tasks assigned to Assetss. |
dispatchTemplates | Array.<DispatchTemplate> | The templates to use when creating new dispatches. |
documents | Array.<Document> | Temporarily hosted documents for this Company |
formResults | Array.<FormResult> | The completed or pending forms for all Assets in this company. |
formTemplates | Array.<FormTemplate> | The templates to use when creating and assigning forms. |
hos | CompanyHoS | Hours of Service carriers, daily log, and trip inspections |
icons | Array.<Icon> | Icons belonging to objects for this Company as well as global Icons |
id | number | Unique identifier of a company (value is NaN for unsaved Company) |
labels | Dictionary.<string, LabelStyle> | Labels for categorizing things within this Company |
machines | Array.<Machine> | List of Service Acounts |
maintenanceJobs | Array.<MaintenanceJob> | Historical maintenance for Assets |
maintenanceSchedules | Array.<MaintenanceSchedule> | Recurring maintenance rules for Assets |
messages | Array.<Message> | A list of all messages between an Asset and Fleet Freedom. |
name | string | Operating name of the organization |
notes | string | A text field used to add miscellaneous notes to a Company object |
parent | number | |
passwordPolicy | CompanyPasswords | Policy for passwords requirements and expiration |
pictures | Array.<Picture> | Photos belonging to objects for this Company |
places | Array.<Place> | List of saved locations |
providerConfigs | Array.<ProviderConfig> | Configured ProviderScripts for this company's providers. |
providerConfigurations | Array.<ProviderConfiguration> | Configured ProviderConfigurations for this company's providers. |
providerRegistrations | Array.<ProviderRegistration> | Providers that are being provisioned, but have not yet been added to the syste. |
providers | Array.<Provider> | Company owned modems, apps, and other event providers |
providerScripts | Array.<ProviderScript> | The list of provider logics for this company. |
references | Dictionary.<string, string> | Name/value collections of custom fields used to refer to external systems. |
reportResults | Array.<ReportResult> | Results from run templates which are saved or expiring |
reportSchedules | Array.<ReportSchedule> | Schedules to automatically run reports overnight |
reportTemplates | Array.<ReportTemplate> | Report templates |
reseller | CompanyReseller | White-labelling details for this company. |
sessionPolicy | CompanySessions | Policy regarding session expiration |
sessions | Array.<Session> | Active and idling sessions for this Company |
tags | Dictionary.<string, LabelStyle> | Status tag styles for Assets |
userGroups | Array.<UserGroup> | List of user permission groups |
users | Array.<User> | List of system users |
version | Array.<number> | The version flag used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
createAsset( | Asset | |
createBehaviour( | Behaviour | |
createBehaviourLog( | BehaviourLog | |
createBehaviourScript( | BehaviourScript | |
createContact( | Contact | |
createDispatchJob( | DispatchJob | |
createDispatchTask( | DispatchTask | |
createDispatchTemplate( | DispatchTemplate | |
createDocument( | Document | |
createFormResult( | FormResult | |
createFormTemplate( | FormTemplate | |
createHosCarrier( | HosCarrier | |
createHosEvent( | HosEvent | |
createHosInspection( | HosInspection | |
createIcon( | Icon | |
createLabel( | LabelStyle | |
createMachine( | Machine | |
createMaintenanceJob( | MaintenanceJob | |
createMaintenanceSchedule( | MaintenanceSchedule | |
createMessage( | Message | |
createPerson( | Person | |
createPicture( | Picture | |
createPlace( | Place | |
createProvider( | Provider | |
createProviderConfig( | ProviderConfig | |
createProviderConfiguration( | ProviderConfiguration | |
createProviderRegistration( | ProviderRegistration | |
createProviderScript( | ProviderScript | |
createReportResult( | ReportResult | |
createReportSchedule( | ReportSchedule | |
createReportTemplate( | ReportTemplate | |
createSession( | Session | |
createTrailer( | Trailer | |
createUser( | User | |
createUserGroup( | UserGroup | |
createVehicle( | Vehicle | |
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
findAssets( | Array.<Asset> | |
findBehaviourLogs( | Array.<BehaviourLog> | Finds all the BehaviourLogs that match the given search expression. Internally, this method invokes BehaviourLog#isMatch. |
findBehaviours( | Array.<Behaviour> | |
findBehaviourScripts( | Array.<BehaviourScript> | Finds all the BehaviourScripts that match the given search expression. Internally, this method invokes BehaviourScript#isMatch. |
findContacts( | Array.<Contact> | |
findDispatchJobs( | Array.<DispatchJob> | Finds all the DispatchJobs that match the given search expression. Internally, this method invokes DispatchJob#isMatch. |
findDispatchTasks( | Array.<DispatchTask> | Finds all the DispatchTasks that match the given search expression. Internally, this method invokes DispatchTask#isMatch. |
findDispatchTemplates( | Array.<DispatchTemplate> | Finds all the DispatchTemplates that match the given search expression. Internally, this method invokes DispatchTemplate#isMatch. |
findDocuments( | Array.<Document> | |
findFormResults( | Array.<FormResult> | Finds all the FormResults that match the given search expression. Internally, this method invokes FormResult#isMatch. |
findFormTemplates( | Array.<FormTemplate> | Finds all the FormTemplates that match the given search expression. Internally, this method invokes FormTemplate#isMatch. |
findIcons( | Array.<Icon> | |
findMachines( | Array.<Machine> | |
findMaintenanceJobs( | Array.<MaintenanceJob> | Finds all the MaintenanceJobs that match the given search expression. Internally, this method invokes MaintenanceJob#isMatch. |
findMaintenanceSchedules( | Array.<MaintenanceSchedule> | Finds all the MaintenanceSchedules that match the given search expression. Internally, this method invokes MaintenanceSchedule#isMatch. |
findMessages( | Array.<Message> | |
findPlaces( | Array.<Place> | |
findProviderConfigs( | Array.<ProviderConfig> | Finds all the ProviderConfigs that match the given search expression. Internally, this method invokes ProviderConfig#isMatch. |
findProviderConfigurations( | Array.<ProviderConfiguration> | Finds all the ProviderConfigurations that match the given search expression. Internally, this method invokes ProviderConfiguration#isMatch. |
findProviderRegistrations( | Array.<ProviderRegistration> | Finds all the ProviderRegistrations that match the given search expression. Internally, this method invokes ProviderRegistration#isMatch. |
findProviders( | Array.<Provider> | |
findProviderScripts( | Array.<ProviderScript> | Finds all the ProviderScripts that match the given search expression. Internally, this method invokes ProviderScript#isMatch. |
findReportResults( | Array.<ReportResult> | Finds all the ReportResults that match the given search expression. Internally, this method invokes ReportResult#isMatch. |
findReportSchedules( | Array.<ReportSchedule> | Finds all the ReportSchedules that match the given search expression. Internally, this method invokes ReportSchedule#isMatch. |
findReportTemplates( | Array.<ReportTemplate> | Finds all the ReportTemplates that match the given search expression. Internally, this method invokes ReportTemplate#isMatch. |
findUserGroups( | Array.<UserGroup> | |
findUsers( | Array.<User> | |
fire( | MVCEvent | |
fromJSON( | Company | Updates parameters for this Company from the given JSON literal |
getAssetById( | Asset | Retrieves the Asset with the given id or null if none found |
getBehaviourById( | Behaviour | Retrieves the Behaviour with the given id or null if none found. |
getBehaviourLogById( | BehaviourLog | Retrieves the BehaviourLog with the given id or null if none found. |
getBehaviourScriptById( | BehaviourScript | Retrieves the BehaviourScript with the given id or null if none found. |
getContactById( | Contact | Retrieves the Contact with the given id or null if none found |
getDispatchJobById( | DispatchJob | Searches the assets for the DispatchJob with the given id or null if none found. |
getDispatchTaskById( | DispatchTask | Searches the assets for the DispatchTask with the given id or null if none found. |
getDispatchTemplateById( | DispatchTemplate | Searches the assets for the DispatchTemplate with the given id or null if none found. |
getDocumentById( | Document | Retrieves the Document with the given id or null if none found |
getFormResultById( | FormResult | Retrieves the FormResult with the given id or null if none found |
getFormTemplateById( | FormTemplate | Retrieves the FormTemplate with the given id or null if none found |
getGenerics( | Array.<Asset> | Filters the assets collection by kind |
getHosCarrierById( | HosCarrier | Retrieves the HosCarrier with the given id or null if none found |
getHosEventById( | HosEvent | Retrieves the HosEvent with the given id or null if none found |
getHosInspectionById( | HosInspection | Retrieves the HosInspection with the given id or null if none found |
getIconById( | Icon | Retrieves the Icon with the given id or null if none found |
getMachineById( | Machine | Retrieves the Machine with the given id or null if none found |
getMaintenanceJobById( | MaintenanceJob | Retrieves the MaintenanceJob with the given id or null if none found |
getMaintenanceScheduleById( | MaintenanceSchedule | Retrieves the MaintenanceSchedule with the given id or null if none found |
getMessageById( | Message | Searches the assets for the Message with the given id or null if none found. |
getPersons( | Array.<Person> | Filters the assets collection by kind |
getPictureById( | Picture | Retrieves the Picture with the given id or null if none found |
getPlaceById( | Place | Retrieves the Place with the given id or null if none found |
getProviderById( | Provider | Retrieves the Provider with the given id or null if none found |
getProviderConfigById( | ProviderConfig | Retrieves the ProviderConfig with the given id or null if none found |
getProviderConfigurationById( | ProviderConfiguration | Retrieves the ProviderConfiguration with the given id or null if none found |
getProviderRegistrationById( | ProviderRegistration | Retrieves the ProviderRegistration with the given id or null if none found |
getProviderScriptById( | ProviderScript | Retrieves the ProviderScript with the given id or null if none found |
getReportResultById( | ReportResult | Retrieves the ReportResult with the given id or null if none found |
getReportScheduleById( | ReportSchedule | Retrieves the ReportSchedule with the given id or null if none found |
getReportTemplateById( | ReportTemplate | Retrieves the ReportTemplate with the given id or null if none found |
getSessionById( | Session | Retrieves the Session with the given handle or null if none found. |
getTrailers( | Array.<Trailer> | Filters the assets collection by kind |
getUserById( | User | Retrieves the User with the given login or null if none found |
getUserGroupById( | UserGroup | Retrieves the UserGroup with the given id or null if none found |
getVehicles( | Array.<Vehicle> | Filters the assets collection by kind |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
removeAsset( | Asset | |
removeBehaviour( | Behaviour | |
removeBehaviourLog( | BehaviourLog | |
removeBehaviourScript( | BehaviourScript | |
removeContact( | Contact | |
removeDispatchJob( | DispatchJob | |
removeDispatchTask( | DispatchTask | |
removeDispatchTemplate( | DispatchTemplate | |
removeDocument( | Document | |
removeFormResult( | FormResult | |
removeFormTemplate( | FormTemplate | |
removeHosCarrier( | HosCarrier | |
removeHosEvent( | HosEvent | |
removeHosInspection( | HosInspection | |
removeIcon( | Icon | |
removeLabel( | LabelStyle | |
removeMachine( | Machine | |
removeMaintenanceJob( | MaintenanceJob | |
removeMaintenanceSchedule( | MaintenanceSchedule | |
removeMessage( | Message | |
removePicture( | Picture | |
removePlace( | Place | |
removeProvider( | Provider | |
removeProviderConfig( | ProviderConfig | |
removeProviderConfiguration( | ProviderConfiguration | |
removeProviderRegistration( | ProviderRegistration | |
removeProviderScript( | ProviderScript | |
removeReportResult( | ReportResult | |
removeReportSchedule( | ReportSchedule | |
removeReportTemplate( | ReportTemplate | |
removeSession( | Session | |
removeUser( | User | |
removeUserGroup( | UserGroup | |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = /** Company */ companyInstance.fromJSON(/** trakit.json.Company | trakit.json.CompanyGeneral | trakit.json.CompanyStyles | trakit.json.CompanyPolicies | trakit.json.CompanyReseller */ json, /** boolean */ silent);
Property | Type | Description |
---|---|---|
bundles | Array.<BillingBundle> | List of application identifiers for which Users are allowed. |
company | Company | The Company to which this object belongs |
policy | Array.<BillingRule> | Ranges of IPv4 addresses (using Cisco notation) to limit session creation to certain IPs. |
Method | Returns | Description |
---|---|---|
fromJSON( | CompanyBilling | Updates parameters for this CompanyBilling from the given JSON literal |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
var object = /** Company */ companyInstance.fromJSON(/** trakit.json.Company | trakit.json.CompanyGeneral | trakit.json.CompanyStyles | trakit.json.CompanyPolicies | trakit.json.CompanyReseller */ json, /** boolean */ silent);
Property | Type | Description |
---|---|---|
carriers | Array.<HosCarrier> | A list of carriers under which this company operates |
company | Company | The Company to which this object belongs |
events | Array.<HosEvent> | The daily log for assets in this company |
inspections | Array.<HosInspection> | Trip inspections logged for drivers and tractors of one of this company's carriers. |
Method | Returns | Description |
---|---|---|
fromJSON( | CompanyHoS | Updates parameters for this CompanyHoS from the given JSON literal |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
var object = /** Company */ companyInstance.fromJSON(/** trakit.json.Company | trakit.json.CompanyGeneral | trakit.json.CompanyStyles | trakit.json.CompanyPolicies | trakit.json.CompanyReseller */ json, /** boolean */ silent);
Property | Type | Description |
---|---|---|
company | Company | The Company to which this policy relates |
expireMode | CompanyPasswordExpiryMode | Determines how the system will expire User passwords. |
expireThreshold | number | Specified in days; minimum values is 14. |
includeLetters | boolean | Alphabet characters required in passwords. |
includeNumbers | boolean | Numeric characters are required. |
includeSpecial | boolean | Require non-alphanumeric characters. |
includeUpperLower | boolean | Big and small letters required. |
minimumLength | number | Minimum length for a password (System restricted to minimum of 8) |
Method | Returns | Description |
---|---|---|
fromJSON( | CompanyPasswords | Updates parameters for this CompanyPasswords from the given JSON literal |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
var object = /** Company */ companyInstance.fromJSON(/** trakit.json.Company | trakit.json.CompanyGeneral | trakit.json.CompanyStyles | trakit.json.CompanyPolicies | trakit.json.CompanyReseller */ json, /** boolean */ silent);
Property | Type | Description |
---|---|---|
applications | Array.<string> | List of application identifiers for which Users are allowed. |
company | Company | The Company to which this object belongs |
expireTimeout | number | The absolute duration a session can last (in minutes). This value has no effect if idleAllowed is false. Maximum value is two weeks. |
idleAllowed | boolean | If false, sessions are invalidated as soon as the user disconnects. |
ipv4Ranges | Array.<string> | Ranges of IPv4 addresses (using Cisco notation) to limit session creation to certain IPs. |
maxSessions | number | The maximum number of simultaneous sessions allowed per User. |
multiUser | CompanyMultiUser | Defines how to handle multiple concurrent session from a single user. |
Method | Returns | Description |
---|---|---|
fromJSON( | CompanySessions | Updates parameters for this CompanySessions from the given JSON literal |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
var object = /** Company */ companyInstance.createLabel(/** trakit.json.LabelStyle */ json);
Property | Type | Description |
---|---|---|
code | string | |
company | Company | The Company to which this contact relates. |
fill | string | Hex colour value for fills and backgrounds. |
graphic | string | Short string with an icon-code for display purposes. |
name | string | The un-codifed name with special characters and upper-case/lower-case preserved. |
notes | string | Notes for label uses. |
stroke | string | Hex colour value for text and outlines. |
Method | Returns | Description |
---|---|---|
copy( | LabelStyle | Creates a duplicate of this LabelStyle |
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
equals( | boolean | Compares this LatLng to another to see if they are equal |
fire( | MVCEvent | |
fromJSON( | LabelStyle | Updates parameters for this LabelStyle from the given JSON literal |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
Value | Description |
---|---|
allow | Allow multiple concurrent sessions per user |
deny | Disallow new sessions if a user already has an active session |
replace | If a user has an active session, it is cancelled and the new session takes over as the only active session |
Value | Description |
---|---|
days | Disable passwords every X number of days |
never | Passwords never expire |
sessions | Disable passwords every X number of sign-ins |
var object = new trakit.fleetfreedom.Provider(/** Company */ company, /** trakit.json.Provider */ object);
Property | Type | Description |
---|---|---|
asset | Asset | The Asset for which this hardware generates data. |
assetId | number | |
attributes | Dictionary.<!string, Dictionary.<string, ProviderAttribute>> | A list of constantly changing values given by the hardware as GPS, wiring, power, and other factors change. |
company | Company | The Company to which this Provider belongs |
config | ProviderConfiguration | Current programmed configuration. |
firmware | string | Firmware version information. |
geofenceLast | Date | A timestamp from when the geofence list was successfully updated on the provider. |
geofenceStatus | ProvisioningStatus | Geofence programming status set by the Provisioner. |
id | string | Unique identifier. The unique value the modem uses to identify itself. |
information | Dictionary.<string, string> | A list of read-only values given by the hardware. |
isDashcam | boolean | When true, it means this provider has a camera that takes images and videos. |
kind | ProviderType | The manufacturer and class of device. |
name | string | Nickname given to the hardware. |
notes | string | Notes about the hardware. |
password | string | For security, most hardware platforms can be programmed with a unique password so that only authorized applications can make changes. |
phoneNumber | number | Programmed phone number |
pnd | string | The kind of Personal Navigation Device attached to the modem. Supported devices are Magellan and Garmin. |
scriptLast | Date | A timestamp from when the script successfully updated on the provider. |
scriptStatus | ProvisioningStatus | Configuration script programming status set by the Provisioner. |
sim | string | ICCID of the SIM card currently installed. |
since | Date | A timestamp that indicates when the Provider was suspended or deleted. |
suspended | boolean | Indicates whether this Provider is suspended from event processing. |
version | Array.<number> | The version flag used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
dashcamCount( | number | Returns the number of cameras this provider has. |
debug( | boolean | |
decodePassword( | string | Decodes this Provider's password to a human readable version. |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
encodePassword( | string | Encodes a new password for this Provider. |
fire( | MVCEvent | |
fromJSON( | Provider | Updates parameters for this Provider from the given JSON literal |
isMatch( | boolean | Checks the given SearchPattern for a match to this provider. Used internally by Company#findProviders. |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.ProviderAttribute(/** Object */ value, /** string */ unit, /** Date */ dts);
Property | Type | Description |
---|---|---|
dts | Date | The date/time when this value was set. |
unit | string | The units used for this value. IE: knots, hectometres per hour, miles per gallon, etc... |
value | Object | The raw value; usually numeric. |
Method | Returns | Description |
---|---|---|
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
var object = new trakit.fleetfreedom.ProviderConfig(/** Company */ company, /** trakit.json.ProviderConfig */ object);
Property | Type | Description |
---|---|---|
company | Company | The company to which this configuration belongs. |
geofences | Array.<SearchPattern> | A search pattern used to filter which Places' geometry are used as geofences. Use null to disable. Use "*" to match all the Places the Provider's Asset can match. Or use "#123456" or "label:term" like other Place search patterns. |
id | number | Unique identifier of this configuration. |
name | string | The nickname given to this configuration |
notes | string | Simple details about how the providers are expected to behave. |
parameters | Dictionary.<string, string> | The list of defined variable name/value pairs that the script requires. |
script | ProviderScript | The ProviderScript which this configuration implements. |
scriptId | number | Unique identifier of the ProviderScript this config inmplements. |
version | Array.<number> | The version flag used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | ProviderConfig | Updates parameters for this ProviderConfig from the given JSON literal |
isMatch( | boolean | Checks the given SearchPattern for a match to this provider. Used internally by Company#findProviders. |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.ProviderConfiguration(/** Company */ company, /** trakit.json.ProviderConfiguration */ object);
Property | Type | Description |
---|---|---|
company | Company | The Company to which this ProviderConfiguration belongs |
geofenceIds | Array.<number> | |
geofences | Array.<Place> | List of configured geofences (taken from known Places). |
id | number | Unique identifier |
name | string | Nickname given to the config. |
notes | string | Details about which Providers should be using this config. |
scriptParameters | Dictionary.<string, Object> | List of configured options. |
templateId | number | The identifier of the logic used by the modem or phone. |
version | Array.<number> | The version flag used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | ProviderConfiguration | Updates parameters for this ProviderConfiguration from the given JSON literal |
isMatch( | boolean | Checks the given SearchPattern for a match to this configuration. Used internally by Company#findProviderConfigurations. |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.ProviderConfigurationNode(/** string */ id, /** string */ notes, /** boolean */ isAdvanced, /** string */ type);
Property | Type | Description |
---|---|---|
max | Object | Maximum value which can be configured. |
min | Object | Minimum value which can be configured. |
nodes | Dictionary.<string, ProviderConfigurationNode> | List of child-config nodes. |
unit | string | The unit used for configuration. |
value | Object | The configured value. |
var object = new trakit.fleetfreedom.ProviderConfigurationType(/** trakit.json.ProviderConfigurationType */ object);
Property | Type | Description |
---|---|---|
geofencesTypes | Array.<PlaceShapeTypes> | Supported geofence types. |
id | number | Unique identifier |
maxGeofences | number | Maximum number of geofences allowed. |
minGeofences | number | Minimum number of geofences required by the script. |
name | string | Nickname given to the modem. |
notes | string | Details about the value setting. |
providerType | ProviderType | Type of providers this config can be applied to. |
scriptOptions | Dictionary.<string, ProviderConfigurationNode> | List of options to be configured. |
version | Array.<number> | The version flag used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | ProviderConfigurationType | Updates parameters for this ProviderConfigurationType from the given JSON literal |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.ProviderRegistration(/** Company */ company, /** trakit.json.ProviderRegistration */ object);
Property | Type | Description |
---|---|---|
asset | Asset | The Asset for which this device will provide data. |
assetId | number | The unique identifier of the Asset for which this device will provide data. |
code | string | Unique identifier of this registration. |
company | Company | The company to which this registration belongs. |
completed | Date | Date/time stamp of when this registration ended successfully. |
config | ProviderConfig | ProviderConfiguration | The predefined configuration this device will use. |
configId | number | Unique identifier of the configuration this device will use. |
expires | Date | The expiry date for this registration. |
identifier | string | The unique identifier of the device that completed this registration. |
kind | ProviderType | The kind of protocol this device supports. |
login | string | The unique identifier the user who generated this registration. |
name | string | A nickname given to the device once it has been provisioned. |
notes | string | Notes! |
password | string | The password programmed on the device used to ensure the system is the only client authorized to make changes. |
phone | number | The phone number of the device being provisioned. |
since | Date | Date/time stamp of when this registration began. |
user | User | The user who generated this registration. |
Method | Returns | Description |
---|---|---|
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | ProviderRegistration | Updates parameters for this ProviderRegistration from the given JSON literal |
isMatch( | boolean | Checks the given SearchPattern for a match to this provider. Used internally by Company#findProviderRegistration. |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.ProviderScript(/** Company */ company, /** trakit.json.ProviderScript */ object);
Property | Type | Description |
---|---|---|
blocks | Array.<ProviderScriptBlock> | Blocks of file data which are (optionally) included in the script data file. |
company | Company | The Company to which this ProviderScript belongs |
fill | string | Hex colour value for fills and backgrounds. |
global | boolean | When true, this script is available to all child Companys. |
graphic | string | Short string with an icon-code for display purposes. |
id | number | Unique identifier. The unique value the modem uses to identify itself. |
kind | ProviderType | The manufacturer and class of device. |
name | string | Nickname given to the hardware. |
notes | string | Notes about the hardware. |
parameters | Dictionary.<string, ProviderScriptParameter> | Parameter definitions for this script, including type-hints and default values. Since the gateways use case insensitive parameter matching, the keys are all converted to lower-case. |
stroke | string | Hex colour value for text and outlines. |
version | Array.<number> | The version flag used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | ProviderScript | Updates parameters for this ProviderScript from the given JSON literal |
isMatch( | boolean | Checks the given SearchPattern for a match to this provider. Used internally by Company#findProviders. |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.ProviderScriptBlock(/** string */ content, /** string */ replace, /** string */ condition, /** string */ validate);
Property | Type | Description |
---|---|---|
condition | string | When defined, this condition matches a ProviderScriptParameter defined in the ProviderConfig to include or exclude this chunk from the script. |
content | string | A chunk of the file loaded onto a provider with it's variables replaced with configurable variables. Trailing or leading whitespace should be included here, so when blocks are merged, so too is the newline characters. |
replace | RegExp | A regular expression used to match variables in the content. RegExp is case insensitive and multiline. |
validate | string | Used in conjunction with condition, this value must match the given ProviderScriptParameter value to have the chunk included. |
Method | Returns | Description |
---|---|---|
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
var object = new trakit.fleetfreedom.ProviderScriptParameter(/** ProviderScriptParameterType */ type, /** string */ value, /** string */ notes, /** string */ context, /** boolean */ advanced);
Property | Type | Description |
---|---|---|
advanced | boolean | Used as a hint that this parameter controls an advanced script option and should only be set if you really know what you're doing. |
context | string | Gives a hint to the client on the best UI to use for editing. For example, "checkbox" is a good UI hint for boolean parameter types. |
notes | string | Usage notes. |
type | ProviderScriptParameterType | Simple type information for the gateway to process. |
value | string | The value is given as a string, but parsed into native type when used by the gateway. |
Method | Returns | Description |
---|---|---|
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
Value | Description |
---|---|
boolean | True or false. |
number | Numeric value (double-precision floating point number). |
text | Text. |
Value | Description |
---|---|
atrack | ATrack Technology AX9 and AK11 modems |
bewhere | BeWhere asset trackers |
calamp | CalAmp series modems |
datatrans | TachWest DT series modems |
enfora | Novatel series modems (Enfora) |
genx | GenX Mobile GNX series modems |
json | Fleet Freedom JSON protocol |
lbs | Bell Mobility user-plane LBS compatible phones |
mobile | Android, iOS, and Blackberry apps |
smartwitness | SmartWitness dashcam formats |
teltonika | Teltonika device protocols |
titan | Certified Tracking Solutions Titan series modems |
unknown | Undefined type |
xirgo | Xirgo modems |
Value | Description |
---|---|
cancelled | Sending of the new configuration was halted by a user. |
completed | New configuration successfully sent to provider. |
created | The new configuration has been created, but not yet sent to the provider. |
error | Something went wrong while trying to send configuration. |
inProgress | Currently sending configuration over-the-air to the provider. |
maxRetries | The maximum number of retries were attempted before giving up. |
otaSent | A message was sent to the provider asking it to check in. |
partial | Only a partial configuration was sent to the provider. |
pending | Provider is notified of new configuration, but has not yet checked in. |
unknown | Your guess is as good as mine. It should never be this. |
var object = new trakit.fleetfreedom.AssetDispatch(/** Asset */ asset, /** trakit.json.AssetDispatch */ object);
Property | Type | Description |
---|---|---|
asset | Asset | The Asset to which th jobs are assigned. |
directions | Array.<DispatchDirection> | Instructions on how to travel between jobs. |
jobIds | Array.<number> | Identifier of the jobs. |
jobs | Array.<DispatchJob> | List of jobs to perform during this dispatch. |
lastDispatched | Date | Timestamp from the last update to this AssetDispatch by a User, Machine, trakit.json.Asset, or an assigned DispatchJob. |
tasks | Array.<DispatchTask> | List of tasks to perform during this dispatch. |
Method | Returns | Description |
---|---|---|
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | AssetDispatch | Updates parameters for this Dispatch from the given JSON literal |
getBounds( | LatLngBounds | Gets a latlng bounding box for the tasks (and optional directions) |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.DispatchDirection(/** trakit.json.DispatchDirection */ json);
Property | Type | Description |
---|---|---|
directions | Array.<DispatchDirection> | For complex routes, the sub-directions provide a breakdown or additional details. |
distance | number | The total distance of these directions (including sub-directions if applicable). |
duration | TimeSpan | The total duration of these directions (including sub-directions if applicable). |
instructions | string | Text hint for the driver for the action to perform. |
path | Array.<LatLng> | A route path to display on a map. |
Method | Returns | Description |
---|---|---|
getBounds( | LatLngBounds | Gets a latlng bounding box for the path and sub-directions. |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
var object = new trakit.fleetfreedom.DispatchJob(/** Company */ company, /** trakit.json.DispatchJob */ object);
Property | Type | Description |
---|---|---|
asset | Asset | The Asset to which this object relates. |
assetId | number | Identifier of the asset assigned to this job. |
attachmentIds | Array.<number> | |
attachments | Array.<Document> | A list of Documents attached to this job. |
created | Date | When this job was first assigned. |
driver | string | Name entered by the driver when they clock-in on the ProviderType.mobile app. |
formIds | Array.<number> | A list of FormResult#ids attached to this job. |
forms | Array.<FormResult> | A list of FormResults attached to this job. |
id | number | Unique identifier |
instructions | string | Details about how to go about performing this job. |
labels | Array.<string> | Codified label names used to relate (unassigned) jobs to Assets. |
name | string | Short description of this job. |
priority | DispatchJobPriority | The importance of this job when scheduling for an Asset. |
references | Dictionary.<string, string> | Name/value collections of custom fields used to refer to external systems. |
status | DispatchStepStatus | The status of the most recent DispatchStep based on the progression of states. |
steps | Array.<DispatchStep> | A list of coordinates to visit in order to carry out the work for this job. |
tags | Array.<string> | The codified status tag names reflecting the conditions of this job. |
updated | Date | Timestamp from the lastest DispatchStep status update. |
version | Array.<number> | The version flags used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
areAllStatuses( | boolean | Will return true if all the DispatchStep#statuses match the given status. |
areAllStepsScheduled( | boolean | |
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | DispatchJob | Updates parameters for this DispatchJob from the given JSON literal |
getActiveStep( | DispatchStep | Returns the DispatchStep in the sequence that is currently being worked on, or returns null. This method ofter returns the same result as DispatchJob#getNextStep because it will find. |
getBounds( | LatLngBounds | Returns a LatLngBounds which encloses all the steps. |
getLastStep( | DispatchStep | Returns the most recent DispatchStep in the sequence that has been updated, or null. |
getNextStep( | DispatchStep | Returns the first DispatchStep in the sequence that is not completed, or returns null. |
isMatch( | boolean | Checks the given SearchPattern for a match to this asset. Used internally by Company#findDispatchJobs. |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.DispatchStep(/** DispatchJob | DispatchTemplateJob */ job, /** trakit.json.DispatchJob */ json);
Property | Type | Description |
---|---|---|
address | string | The street address of where the step must be completed. |
duration | TimeSpan | The expected time-on-site (in seconds; affects ETAs for other jobs in a Dispatch). |
eta | Date | The optional estimated time of arrival for the asset. |
id | number | Identifier for this step. The value is unique per DispatchJob, but is not unique system-wide. |
latlng | LatLng | GPS coordinates of this step. |
name | string | Short description of this step. |
notes | string | Notes filled out by field-employee. |
place | Place | The Place related to this step if applicable. |
placeId | number | |
signatory | string | The name of the person who signed the step's completion. |
signature | boolean | Indicates whether the step has a signature. |
states | Dictionary.<DispatchStepStatus, DispatchStepState> | The progress of this step. |
status | DispatchStepStatus | The status of the step based on the progression of states. |
timeOnSite | number | The total number of seconds in the DispatchJob#duration. |
updated | Date | Timestamp from the lastest DispatchStep status update. |
Method | Returns | Description |
---|---|---|
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
var object = new trakit.fleetfreedom.DispatchStepState(/** trakit.json.DispatchStepState */ json);
Property | Type | Description |
---|---|---|
latlng | LatLng | The coordinates from the Asset when the update happened. |
updated | Date | A timestamp from when the lifetime was updated. |
Method | Returns | Description |
---|---|---|
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
var object = new trakit.fleetfreedom.DispatchTask(/** Company */ company, /** trakit.json.DispatchTask */ object);
Property | Type | Description |
---|---|---|
address | string | The address of the task's location. |
arrived | Date | A flag set by the system if the Asset has arrived at this task's location. |
asset | Asset | The Asset to which this object relates |
assetId | number | Unique identifier of this task's Asset. |
attachmentIds | Array.<number> | |
attachments | Array.<Document> | A list of Documents attached to this task. |
completed | Date | Flag set by the system when the task is completed (usually behaviour and mobile provider working together). |
created | Date | When this task was first assigned. |
duration | TimeSpan | The expected time-on-site (in seconds; affects ETAs for other tasks in a Dispatch). |
eta | Date | Expected Time of Arrival. |
formIds | Array.<number> | A list of FormResult#ids attached to this task. |
forms | Array.<FormResult> | A list of FormResults attached to this task. |
id | number | Unique identifier |
instructions | string | Details about how to go about performing this task. |
latlng | LatLng | GPS coordinates of this task. |
name | string | Short description of this task. |
notes | string | Notes filled out by field-employee. |
place | Place | The Place related to this task if applicable. |
placeId | number | |
reference | string | Getter/setter for the references field named "reference". |
references | Dictionary.<string, string> | Name/value collections of custom fields used to refer to external systems. |
signatory | string | The name filled out by the person who signed. |
signature | boolean | When true, a signature was captured and can be retrieved using the Pictures API. |
status | TaskStatus | The status of this task. See TaskStatus for details. |
timeOnSite | number | The total number of seconds in the DispatchTask#duration. |
updated | string | Timestamp from the last change made to this task. |
updater | string | Either the login of the user or the identifier of the provider that changed this task. |
version | Array.<number> | The version flags used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | DispatchTask | Updates parameters for this DispatchTask from the given JSON literal |
isMatch( | boolean | Checks the given SearchPattern for a match to this asset. Used internally by Company#findDispatchTasks. |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.DispatchTemplate(/** Company */ company, /** trakit.json.DispatchTemplate */ object);
Property | Type | Description |
---|---|---|
asset | Asset | The Asset to which the created DispatchJobs would be assigned. |
assetId | number | The identifier of the asset for which this template is the default. |
company | Company | The Company which owns this DispatchTemplate. |
directions | Array.<DispatchDirection> | Driving directions and route path details. |
id | number | Unique identifier |
jobs | Array.<DispatchTemplateJob> | The list of jobs to create when deploying this template. |
labels | Array.<string> | Codified label names used to target applicable Assets for this dispatch. |
name | string | The name of this template. |
notes | string | Notes about this template. |
references | Dictionary.<string, string> | Name/value collections of custom fields used to refer to external systems. |
version | Array.<number> | The version flags used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | DispatchTemplate | Updates parameters for this DispatchJob from the given JSON literal |
getBounds( | LatLngBounds | Gets a latlng bounding box for the path and sub-directions. |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.DispatchTemplateJob(/** Company */ company, /** trakit.json.DispatchTemplateJob */ json);
Property | Type | Description |
---|---|---|
attachmentIds | Array.<number> | |
attachments | Array.<Document> | A list of Documents attached to this job. |
formIds | Array.<number> | A list of FormResult#ids attached to this job. |
forms | Array.<FormResult> | A list of FormResults attached to this job. |
instructions | string | Instructions (filled out by dispatcher) for the field-employee to help them completed the job. |
name | string | The name of this template or the work needed to be performed. |
priority | DispatchJobPriority | The importance of this job when scheduling for an asset. |
references | Dictionary.<string, string> | Name/value collections of custom fields used to refer to external systems. |
steps | Array.<DispatchStep> | A list of coordinates to visit in order to carry out the work for this job. |
Value | Description |
---|---|
high | More important job that will be routed to first unless the next high importance job is much farther away. |
low | Low priority jobs are assigned towards the end of a dispatch, unless they are in very close proximity to another job. |
medium | A normal job that will be done at the first opportunity. |
standby | Will be done last, after all others, if at all. |
urgent | Must be done first, before all others. |
Value | Description |
---|---|
arrived | The asset has arrived at the DispatchStep's location. |
completed | The DispatchStep is done (or the asset has departed the location). |
onRoute | The asset is on the way to the DispatchStep's location next. |
pending | The DispatchStep has not yet been started. |
Value | Description |
---|---|
arrived | The Asset has arrived at the destination. |
cancelled | The DispatchTask has been cancelled either by the driver or the dispatcher. |
completed | The DispatchTask has been completed (and signature captured). |
created | The DispatchTask has been created, but not yet delivered to the remote device. |
damaged | An item associated with this DispatchTask is damaged. |
droppedOff | An item was dropped-off for this DispatchTask. |
onRoute | The Asset is now on its way to the destination. |
pickedUp | An item was picked-up for this DispatchTask. |
queued | The DispatchTask has been delivered to the remote device, or was created on the remote device. |
unsuccessful | The DispatchTask couldn't be completed by the Asset. |
waiting | The Asset is waiting and can't complete the DispatchTask. |
var value = trakit.fleetfreedom.drawing.member;
/* or */
var result = trakit.fleetfreedom.drawing.member(...params);
Method | Returns | Description |
---|---|---|
pathLength( | number | Calculates the total length of the given path |
pathReduce( | Array.<Point> | Performs a Douglas-Peucker path reduction based on the given tolerance. |
pointAngle( | number | Calculates the starting angle (in degrees) between two Points using the top as zero. Does not return negative values. |
pointDistance( | number | Calculates the distance between two points using Pythagorean theorem. |
pointOrthogonal( | Calculates the orthogonal height of a triangle. The orthogonal height is calculated by drawing a line between the firstPoint and lastPoint, then getting the length of a line drawn up from the line to the midPoint at a 90 degree angle. | |
pointPythagora( | number | Calculates the Pythagorean length of a triangle given the length of the other two sides. |
pointVector( | Point | Calculates the vector which can be used to find the point based on the given direction and distance |
polyArea( | number | Calculates the total area occupied by the given path. Treats non-closed paths as closed paths. |
polyContains( | boolean | A utility function to determine if a given point is inside the given polygon path. |
polyReduce( | Array.<Point> | Performs a Douglas-Peucker path reduction on a polygon for the given tolerance. The start/end points are variable and the end point is trimmed from the result. |
polyWrapper( | Array.<Point> | Wraps the given points into a polygonal path. The given points do not need to be a path. The returned path is not closed. |
radialArea( | number | Calculates the area of a circle based on the given radius. |
radialCircumference( | number | Calculates the circumference of a circle based on the given radius. |
radialSmallest( | Radial | Solves the Minimum Enclosing Circle problem using Badoiu Clarkson's algorithm. |
var object = new trakit.fleetfreedom.Point(/** number */ x, /** number */ y);
Property | Type | Description |
---|---|---|
x | number | Left coordinate |
y | number | Top coordinate |
Method | Returns | Description |
---|---|---|
angleTo( | number | Calculates the angle (in degrees) to the given point |
distanceTo( | number | Calculates the distance between two points |
equals( | boolean | Compares this Point to another to see if they are equal |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
toOffset( | Point | Creates a new Point based on the given offset |
toString( | string | Returns a string representation |
toTranslated( | Point | Creates a new Point at the given angle and distance |
var object = new trakit.fleetfreedom.Radial(/** number */ x, /** number */ y, /** number */ radius);
Property | Type | Description |
---|---|---|
r | number | The radial distance |
x | number | Left coordinate |
y | number | Top coordinate |
Method | Returns | Description |
---|---|---|
contains( | boolean | Determines if the given Point is contained by this Radial |
copy( | Radial | Creates a duplicate of this Radial |
equals( | boolean | Compares this Point to another to see if they are equal |
extend( | Radial | Extends the boundary to envelop the given point(s) |
getCentre( | Point | Returns the centre point representation |
getSize( | Size | Returns the centre point representation |
grow( | Radial | Increases the boundary radius |
overlaps( | boolean | Determines if the given Radial is overlaps this Radial in any way |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
toOffset( | Radial | Moves the Radial by the given offset |
toRectangle( | Rectangle | Converts this radial boundary into a square boundary |
toString( | string | Returns a string representation |
toTranslated( | Radial | Moves the Radial by the given angle and distance |
var object = new trakit.fleetfreedom.Rectangle(/** Point | Rectangle | Object */ topleft, /** Point | Rectangle | Object */ bottomright);
Property | Type | Description |
---|---|---|
bottom | number | The bottom-most coordinate |
height | number | The absolute height of this Rectangle |
left | number | The left-most coordinate |
right | number | The right-most coordinate |
top | number | The top-most coordinate |
width | number | The absolute width of this Rectangle |
Method | Returns | Description |
---|---|---|
contains( | boolean | Determines if the given Point is contained by this Rectangle |
copy( | Rectangle | Validates the boundary and creates a duplicate of this Rectangle |
equals( | boolean | Compares this Rectangle to another to see if they are equal |
expand( | Rectangle | Extends the boundary to envelop the given point(s) but does not automatically validate. This comes in efficient when doing many operations on a single Rectangle |
extend( | Rectangle | Extends the boundary to envelop the given point(s) and automatically validates |
getBottomLeft( | Point | Returns the Point at the bottom-most/left-most corner. |
getBottomRight( | Point | Returns the Point at the bottom-most/right-most corner. |
getCentre( | Point | Returns the Point at the centre. |
getSize( | Size | Validates the boundary and creates a Size representation |
getTopLeft( | Point | Returns the Point at the top-most/left-most corner. |
getTopRight( | Point | Returns the Point at the top-most/right-most corner. |
grow( | Rectangle | Increases the size of the boundary by the given width and height |
isEmpty( | boolean | Checks to see if the bounds are valid, and that the corners are different coordinates. |
isValid( | boolean | Checks to see if the bounds are valid (not inside-out). |
overlaps( | boolean | Determines if the given Rectangle is overlaps this Rectangle in any way |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
toOffset( | Rectangle | Creates a new Rectangle at the given angle and distance |
toRadial( | Radial | Validates the boundary and returns a Radial |
toString( | string | Validates the boundary and returns a string representation |
toTranslated( | Shape | Creates a new Rectangle at the given angle and distance |
validate( | Rectangle | Validates the boundary by ensuring the top value is less than the bottom value, and the left value is less than the right value. Also adjusts the width and height values |
var object = new trakit.fleetfreedom.Size(/** number */ width, /** number */ height);
Property | Type | Description |
---|---|---|
height | number | |
width | number |
Method | Returns | Description |
---|---|---|
equals( | boolean | Compares this Size to another to see if they are equal |
resize( | Size | Returns a new instance of a Size where the width and height are adjusted to the given ratios. If the second ratio is not given, then the first value is used for both. The ratios are given as a percentage between 0 and 1. To double the size of the Size, give a ratio of 2, and to shrink it to half size use 0.5. |
resizeToHeight( | Size | Returns a new Size where the height is the same as the given value, and the width is resized to preserve aspect ratio. |
resizeToWidth( | Size | Returns a new Size where the width is the same as the given value, and the height is resized to preserve aspect ratio. |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
toString( | string | Returns a string representation |
var object = new trakit.fleetfreedom.FormFieldAttachments(/** number */ id, /** string */ name, /** FormFieldType */ kind, /** number */ minimum, /** number */ maximum, /** string */ notes, /** boolean */ required, /** string */ value, /** boolean */ editable);
Property | Type | Description |
---|---|---|
editable | boolean | When false, this field's value is treated as read-only. |
kind | FormFieldType | Either FormFieldType.files or FormFieldType.pictures. |
maximum | number | |
minimum | number | |
name | string | Name of the field. |
notes | string | Notes or special instructions for this control. |
required | boolean | When true, a valid value must be given for this field. |
supported | Array.<FormFieldType> | A list of supported FormFieldTypes that this class supports. |
value | string |
Method | Returns | Description |
---|---|---|
isValid( | boolean | Returns true when the given value is a list of number concatenated with a comma, and a minimum number of files is not set or the given value has that many or more, and a maximum number of files is not set or the given value has that many or fewer. |
var object = new trakit.fleetfreedom.FormFieldBase(/** number */ id, /** string */ name, /** FormFieldType */ kind, /** string */ notes, /** boolean */ required, /** string */ value, /** boolean */ editable);
Property | Type | Description |
---|---|---|
editable | boolean | When false, this field's value is treated as read-only. |
kind | FormFieldType | The type of interface control that should be presented to the user. |
name | string | Name of the field. |
notes | string | Notes or special instructions for this control. |
required | boolean | When true, a valid value must be given for this field. |
supported | Array.<FormFieldType> | A list of supported FormFieldTypes that this class supports. |
value | string | The default value for the field in the template. |
Method | Returns | Description |
---|---|---|
isValid( | boolean | Returns true if the value can be parsed by the field type. |
Method | Returns | Description |
---|---|---|
FormFieldBase.fromJSON( | FormFieldBase | Instantiates a form field based on the kind property in the given trakit.json object. |
var object = new trakit.fleetfreedom.FormFieldBoolean(/** number */ id, /** string */ name, /** Array.<string> */ choices, /** FormFieldType */ kind, /** string */ notes, /** boolean */ required, /** string */ value, /** boolean */ editable);
Property | Type | Description |
---|---|---|
choices | Array.<string> | The list of three choices available representing the checked, unchecked, and indeterminate values. |
editable | boolean | When false, this field's value is treated as read-only. |
kind | FormFieldType | Either FormFieldType.checkbox or FormFieldType.toggle. |
name | string | Name of the field. |
notes | string | Notes or special instructions for this control. |
required | boolean | When true, a valid value must be given for this field. |
supported | Array.<FormFieldType> | A list of supported FormFieldTypes that this class supports. |
value | string | Use a comma to separate values. Use a second comma to define a default (normally false). Leave blank to use "false,true". Examples: "off,on", "off,on,on" to default on. |
Method | Returns | Description |
---|---|---|
isValid( | boolean | Returns true if the value can be parsed as a boolean. |
var object = new trakit.fleetfreedom.FormFieldChoice(/** number */ id, /** string */ name, /** Object.<string, string> */ choices, /** FormFieldType */ kind, /** number */ minimum, /** number */ maximum, /** string */ notes, /** boolean */ required, /** string */ value, /** boolean */ editable);
Property | Type | Description |
---|---|---|
choices | Dictionary.<string, string> | The list of choices available and their values. |
editable | boolean | When false, this field's value is treated as read-only. |
kind | FormFieldType | Either FormFieldType.choice or FormFieldType.dropdown. |
maximum | number | Maximum number of choices that must be selected. |
minimum | number | Minimum number of choices that must be selected. |
name | string | Name of the field. |
notes | string | Notes or special instructions for this control. |
required | boolean | When true, a valid value must be given for this field. |
supported | Array.<FormFieldType> | A list of supported FormFieldTypes that this class supports. |
value | string | List defaults using a comma to separate choice values. |
Method | Returns | Description |
---|---|---|
isValid( | boolean | Returns true if there is no minimum number of selections, or that number is met, and if there is no maximum number of selections, or the selctions to not exceedd that number. |
var object = new trakit.fleetfreedom.FormFieldDate(/** number */ id, /** string */ name, /** FormFieldType */ kind, /** string | number | Date */ minimum, /** string | number | Date */ maximum, /** string */ notes, /** boolean */ required, /** string */ value, /** boolean */ editable);
Property | Type | Description |
---|---|---|
editable | boolean | When false, this field's value is treated as read-only. |
kind | FormFieldType | Either FormFieldType.date or FormFieldType.datetime. |
maximum | Date | The latest date or date/time. |
minimum | Date | The earliest date or date/time. |
name | string | Name of the field. |
notes | string | Notes or special instructions for this control. |
required | boolean | When true, a valid value must be given for this field. |
supported | Array.<FormFieldType> | A list of supported FormFieldTypes that this class supports. |
value | string | The default value for the field in the template. |
Method | Returns | Description |
---|---|---|
isValid( | boolean | Returns true when the given value can be parsed into a date/time, and a minimum date/time is not set, or the given value is that early or is later, and a maximum date/time is not set, or the given value is that late or is earlier. |
var object = new trakit.fleetfreedom.FormFieldNumeric(/** number */ id, /** string */ name, /** FormFieldType */ kind, /** FormFieldNumericSize */ size, /** number */ precision, /** number */ step, /** string */ units, /** number */ minimum, /** number */ maximum, /** string */ notes, /** boolean */ required, /** string */ value, /** boolean */ editable);
Property | Type | Description |
---|---|---|
editable | boolean | When false, this field's value is treated as read-only. |
kind | FormFieldType | One of the values from FormFieldNumeric#supported. |
maximum | number | The (optional) maximum value. |
minimum | number | The (optional) minimum value. |
name | string | Name of the field. |
notes | string | Notes or special instructions for this control. |
precision | number | Number of decimal places of accuracy are required. |
required | boolean | When true, a valid value must be given for this field. |
size | FormFieldNumericSize | A context hint for the kind of numeric size for this field. Used only for FormFieldType.distance, FormFieldType.weight, FormFieldType.volume, and FormFieldType.speed. |
step | number | The numeric value increments by this amount. |
supported | Array.<FormFieldType> | A list of supported FormFieldTypes that this class supports. |
units | string | An optional suffix (prefix for FormFieldType.currency) for this numeric value. Does not apply to FormFieldType.distance, FormFieldType.weight, FormFieldType.volume, FormFieldType.speed, and FormFieldType.area field types. |
value | string | The default value for the field in the template. |
Method | Returns | Description |
---|---|---|
isValid( | boolean | Returns true if the given value is a number, and it's not infinity, and a minimum value is not set, or the given value is that small or is larger, and a maximum value is not set, or the given value is that large or is smaller. |
var object = new trakit.fleetfreedom.FormFieldSignature(/** number */ id, /** string */ name, /** string */ notes, /** boolean */ required, /** boolean */ editable);
Property | Type | Description |
---|---|---|
editable | boolean | When false, this field's value is treated as read-only. |
kind | FormFieldType | Always FormFieldType.signature. |
name | string | Name of the field. |
notes | string | Notes or special instructions for this control. |
required | boolean | When true, a valid value must be given for this field. |
supported | Array.<FormFieldType> | A list of supported FormFieldTypes that this class supports. |
value | string | The default value for the field in the template. |
Method | Returns | Description |
---|---|---|
isValid( | boolean | Returns true if the given input s a known timezone. |
var object = new trakit.fleetfreedom.FormFieldText(/** number */ id, /** string */ name, /** number */ rows, /** number */ minimum, /** number */ maximum, /** string */ notes, /** boolean */ required, /** string */ value, /** boolean */ editable);
Property | Type | Description |
---|---|---|
editable | boolean | When false, this field's value is treated as read-only. |
kind | FormFieldType | Always FormFieldType.text. |
maximum | number | Maximum length of entered text to make it a valid entry. |
minimum | number | Minimum length of entered text to make it a valid entry. |
name | string | Name of the field. |
notes | string | Notes or special instructions for this control. |
required | boolean | When true, a valid value must be given for this field. |
rows | number | The number of rows of text to display. |
supported | Array.<FormFieldType> | A list of supported FormFieldTypes that this class supports. |
value | string | The default value for the field in the template. |
Method | Returns | Description |
---|---|---|
isValid( | boolean | Returns true if a non-white-space value is entered, and there is no minimum length or the value is that long or longer, and there is no maximum length or the value is that long or shorter. |
var object = new trakit.fleetfreedom.FormFieldTime(/** number */ id, /** string */ name, /** FormFieldType */ kind, /** string | number | TimeSpan */ minimum, /** string | number | TimeSpan */ maximum, /** string */ notes, /** boolean */ required, /** string */ value, /** boolean */ editable);
Property | Type | Description |
---|---|---|
editable | boolean | When false, this field's value is treated as read-only. |
kind | FormFieldType | Either FormFieldType.duration or FormFieldType.time. |
maximum | TimeSpan | The maximum duration or latest time-of-day. |
minimum | TimeSpan | The minimum duration or earliest time-of-day. |
name | string | Name of the field. |
notes | string | Notes or special instructions for this control. |
required | boolean | When true, a valid value must be given for this field. |
supported | Array.<FormFieldType> | A list of supported FormFieldTypes that this class supports. |
value | string | The default value for the field in the template. |
Method | Returns | Description |
---|---|---|
isValid( | boolean | Returns true when the given input can be parsed as a time, and a minimum time is not set, or the given value is that early or is later, and a maximum time is not set, or the given value is that late or is earlier. |
var object = new trakit.fleetfreedom.FormFieldTimezone(/** number */ id, /** string */ name, /** string */ notes, /** boolean */ required, /** string */ value, /** boolean */ editable);
Property | Type | Description |
---|---|---|
editable | boolean | When false, this field's value is treated as read-only. |
kind | FormFieldType | Always FormFieldType..timezone. |
name | string | Name of the field. |
notes | string | Notes or special instructions for this control. |
required | boolean | When true, a valid value must be given for this field. |
supported | Array.<FormFieldType> | A list of supported FormFieldTypes that this class supports. |
value | string | The default value for the field in the template. |
Method | Returns | Description |
---|---|---|
isValid( | boolean | Returns true if the given input s a known timezone. |
var object = new trakit.fleetfreedom.FormResult(/** Asset */ asset, /** trakit.json.FormResult */ object);
Property | Type | Description |
---|---|---|
asset | Asset | The Asset to which this form belongs. |
assetId | number | Unique identifier of the Asset to which this form belongs. |
company | Company | The Company to which this form belongs. |
completed | Date | |
driver | string | Name entered by the driver when they clock-in on the ProviderType.mobile app. |
fields | Dictionary.<number, string> | All the values for fillable fields by name. |
id | number | Unique identifier |
labels | Array.<string> | Codified label names used to relate forms to Assets. |
latlng | LatLng | |
name | string | Name of this form. |
notes | string | Notes! |
template | FormTemplate | The FormTemplate to which this form belongs. |
templateId | number | Unique identifier of the FormTemplate to which this form belongs. |
version | Array.<number> | The version flags used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | FormResult | Updates parameters for this FormResult from the given JSON literal |
getDispatchJobs( | Array.<DispatchJob> | Returns an array of DispatchJobs to which this form is attached. |
isMatch( | boolean | Checks the given SearchPattern for a match to this form. Used internally by Company#findFormResults. |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.FormTemplate(/** Company */ company, /** trakit.json.FormTemplate */ object);
Property | Type | Description |
---|---|---|
company | Company | The Company to which this form belongs. |
fields | Array.<FormFieldBase> | All the user fillable fields by name. |
fill | string | The fill/background colour of the icon. |
graphic | string | The name of the symbol for this template. |
id | number | Unique identifier of this form. |
labels | Array.<string> | Codified label names used to relate forms to Assets. |
name | string | Name for this form. |
notes | string | Notes! |
stroke | string | Outline and graphic colour. |
version | Array.<number> | The version flag used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | FormTemplate | Updates parameters for this form from the given JSON literal. |
isMatch( | boolean | Checks the given SearchPattern for a match to this template. Used internally by Company#findFormTemplates. |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
Value | Description |
---|---|
large | A large measurement. For FormFieldType.distance: km/mi. For FormFieldType.weight: t/ton. For FormFieldType.volume: ml/oz. For FormFieldType.speed: kph/mph. For FormFieldType.area: ha/ac. |
medium | A medium measurement. For FormFieldType.distance: m/ft. For FormFieldType.weight: kg/lbs. For FormFieldType.volume: l/gal. For FormFieldType.speed: mps/ftps. For FormFieldType.area: sqkm/sqmi. |
small | A small measurement. For FormFieldType.distance: cm/in. For FormFieldType.weight: g/oz. For FormFieldType.volume: same as FormFieldNumericSize.medium. For FormFieldType.speed: cmps/inps. For FormFieldType.area: sqm/sqft |
Value | Description |
---|---|
area | A numeric value of area (for easy conversion between UserMeasurementPreference.metric and UserMeasurementPreference.standard). |
checkbox | A check mark to represent a boolean value. |
choice | A choice of one (or more) values defined. |
currency | A numeric value representing an amount of money. |
date | A calendar/date picker. |
datetime | A date and time picker. |
distance | A numeric value of distance (for easy conversion between UserMeasurementPreference.metric and UserMeasurementPreference.standard). |
dropdown | A drop-down or fly-out UI for choosing a single value. Works better than FormFieldType.choice when there are a lot of values. ie; country or province list. |
duration | A duration picker. Different than FormFieldType.time because a duration can be negative, or longer than 24 hours. |
files | A browser of Documents that can be attached. |
fuelEconomy | A numeric value of fuel economy (for easy conversion between UserMeasurementPreference.metric and UserMeasurementPreference.standard). |
numeric | Numeric (optionally decimal) input. |
pictures | A browser of Pictures that can be attached. |
pressure | A numeric value of pressure (for easy conversion between UserMeasurementPreference.metric and UserMeasurementPreference.standard). |
range | A slider bar to choose a numeric value between a given high and low value. |
signature | Area to capture a signature bitmap. |
speed | A numeric value of speed (for easy conversion between UserMeasurementPreference.metric and UserMeasurementPreference.standard). |
temperature | A numeric value of temperature (for easy conversion between UserMeasurementPreference.metric and UserMeasurementPreference.standard). |
text | Any text input. |
time | A clock/time picker. |
timezone | A list of Timezones. |
toggle | A toggle box to represent one of two possible values (optionally defined). |
volume | A numeric value of volume (for easy conversion between UserMeasurementPreference.metric and UserMeasurementPreference.standard). |
weight | A numeric value of weight (for easy conversion between UserMeasurementPreference.metric and UserMeasurementPreference.standard). |
var object = new trakit.fleetfreedom.DashcamData(/** Company */ company, /** trakit.json.DashcamData */ json);
Property | Type | Description |
---|---|---|
altitude | number | Altitude of the coordinates at the start of the dachcam data. |
asset | Asset | The asset tied to the provider at the time. |
assetId | number | Unique identifier of the asset tied to the provider at the time. |
camera | number | Number assigned to the camera that took the image/video. |
company | Company | The Company to which this data belongs. |
end | Date | Timestamp of when this dachcam data ended. For images, the start and end and the same. |
guid | string | Unique identifier |
heading | number | Bearing of the coordinates at the start of the dachcam data. |
kind | DashcamDataType | The type of data being hosted. |
latlng | LatLng | Coordinates of the start of the dachcam data. |
provider | Provider | The provider that sent the data. |
providerId | string | Unique identifier of the provider that sent the data. |
speed | number | Speed of the coordinates at the start of the dachcam data. |
start | Date | Timestamp of when this dachcam data started. For images, the start and end and the same. |
Method | Returns | Description |
---|---|---|
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
isMatch( | boolean | Checks the given SearchPattern for a match to this dashcam data. Used internally by Company#findDashcamDatas. |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.Document(/** Company */ company, /** trakit.json.Document */ object);
Property | Type | Description |
---|---|---|
bytes | number | The file's size on the disk. |
company | Company | The Company to which this Document belongs. |
expiry | Date | The date and time this file will be automatically purged from our system. |
id | number | Unique identifier |
mime | string | MIME type of this file. |
name | string | The filename or a nickname given to this file. |
notes | string | Miscellaneous notes for file. |
references | Dictionary.<string, string> | Name/value collections of custom fields used to refer to external systems. |
src | string | The relative path used to retrieve this file. |
version | Array.<number> | The version flag used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.Icon(/** Company */ company, /** trakit.json.Icon */ object);
Property | Type | Description |
---|---|---|
badge | IconLabel | Definition for the on-map badge. |
category | string | The category of icon like "Truck" or "Building". |
company | Company | The Company to which this icon relates. |
global | boolean | Indicates that the icon can be used, and is available to child companies. |
glyphs | Array.<IconGlyph> | The glyphs used to show detail on this icon. |
id | number | Unique identifier of an Icon (value is NaN for unsaved). |
label | IconLabel | Definition for the on-map label. |
name | string | Descriptive name of the icon. |
notes | string | Notes about this icon or uses. |
usage | Array.<string> | Tag-style list of objects this icon should be used for. |
version | Array.<number> | The version flag used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
copy( | Icon | Creates a duplicate of this Icon |
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
equals( | boolean | Compares this Icon to another to see if they are equal |
fire( | MVCEvent | |
fromJSON( | Icon | Updates parameters for this Icon from the given JSON literal |
getBaseGlyph( | IconGlyph | Gets the first glyph to use as the standard icon. |
getGlyphs( | Array.<IconGlyph> | Compares this Icon to another to see if they are equal |
isMatch( | boolean | |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.IconGlyph(/** Icon */ icon, /** Array.<string> */ tags, /** string */ src, /** Size */ size, /** Point */ anchor, /** IconLayer */ layer, /** number */ zIndex, /** boolean */ rotates);
Property | Type | Description |
---|---|---|
anchor | Point | The offset from the LatLng in pixels |
icon | Icon | The Icon to which this glyph relates. |
layer | IconLayer | Mapped icons are layered, on which layer does this glyph display. |
rotates | boolean | When true, the icon should be rotated to match the direction of travel for the position it represents. |
size | Size | Size of the glyph in pixels |
src | string | URL for the image using the Pictures API for icons. |
tags | Array.<string> | Tags which must be present to use this glyph. |
zIndex | number | The z-order of this glyph compared to other glyphs for the same layer. |
Method | Returns | Description |
---|---|---|
copy( | IconGlyph | Creates a duplicate of this IconGlyph |
equals( | boolean | Compares this IconGlyph to another to see if they are equal |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
var object = new trakit.fleetfreedom.IconLabel(/** Icon */ icon, /** string */ align, /** Point */ anchor, /** string */ colour);
Property | Type | Description |
---|---|---|
align | string | Determines which corner the label is attached with |
anchor | Point | The offset from the LatLng in pixels |
colour | string | Background colour of the label (foreground calculated automatically) |
icon | Icon | The Icon to which this label relates |
Method | Returns | Description |
---|---|---|
copy( | IconLabel | Creates a duplicate of this IconLabel |
equals( | boolean | Compares this IconLabel to another to see if they are equal |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
var object = new trakit.fleetfreedom.Picture(/** Company */ company, /** trakit.json.Picture */ object);
Property | Type | Description |
---|---|---|
bytes | number | The image's filesize on the disk. |
company | Company | The Company to which this contact relates |
focals | Array.<Rectangle> | A list of focal points like faces. |
id | number | Unique identifier |
name | string | The name of the picture or its contents. |
notes | string | Notes about the picture or contents. |
size | Size | The size in pixels of this image. |
src | string | URL for the image using the Pictures API. |
uses | number | The number of items (assets, contact, tasks, etc) using this image. (updated hourly) |
version | Array.<number> | The version flag used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
copy( | Picture | Creates a duplicate of this Picture |
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
equals( | boolean | Compares this Picture to another to see if they are equal |
fire( | MVCEvent | |
fromJSON( | Picture | Updates parameters for this Picture from the given JSON literal |
isMatch( | boolean | Checks the given SearchPattern for a match to this picture. Used internally by Company#findPictures. |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
prettySize( | string | Creates a more human readable string representation of the filesize. |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
Value | Description |
---|---|
image | Image |
unknown | Unknown or other. |
video | Video |
Value | Description |
---|---|
fills | |
labels | HTML layer for all marker labels. |
markers | HTML layer for all marker images. |
outlines | |
shadows | HTML layer for shadows from all markers. Fleet Freedom automatically sets any element applied here to 40% opacity. |
var value = trakit.fleetfreedom.geography.member;
/* or */
var result = trakit.fleetfreedom.geography.member(...params);
Property | Type | Default | Description |
---|---|---|---|
earthRadius | number | 6378137 | The radius of the Earth in meters taken from the GRS-80, NAD83, and WGS-84 standards. |
Method | Returns | Description |
---|---|---|
clampLat( | number | Normalizes a latitude value between +/- 90. Values of greater than 90 are returned as 90, and values less than -90 are returned as -90. |
clampLng( | number | Normalizes a longitude value between +/- 180. Values of greater than 180 are returned as a negative difference of 360, and values less than -180 are returned as a positive difference of 360. |
pathDecode( | Array.<LatLng> | An implementation of Google's Decoded Polyline Algorithm format. https://developers.google.com/maps/documentation/utilities/polylinealgorithm |
pathEncode( | string | An implementation of Google's Encoded Polyline Algorithm format. https://developers.google.com/maps/documentation/utilities/polylinealgorithm |
pathLength( | number | Calculates the length of the given route. |
pathReduce( | Array.<LatLng> | Performs a Douglas-Peucker path reduction based on the given tolerance. |
pointAngle( | number | Bearing from coordinate A to coordinate B in degrees from North |
pointDistance( | number | Calculates the distance between two coordinates on a sphere. |
pointMiddle( Throws Error "Either latitude or longitude is NaN". | LatLng | Calculates the mid-point between to given coordinate |
pointOrthogonal( | number | Calculates the orthogonal height of a triangle. The orthogonal height is calculated by drawing a line between the coordinate A and coordinate B, then getting the length of a line drawn up from the line to the mid coordinate at a 90 degree angle. |
pointTranslate( Throws Error "Either latitude or longitude is NaN". | LatLng | Calculates the final coordinate based on the given starting coordinate and vector |
pointVincenty( | number | Calculates the distance between two coordinates on a Bessel 1841 ellipsoid. |
polyArea( Throws Error "Not enough coordinates". | number | Calculates the total area occupied by the given geofence. |
polyContains( | boolean | A utility function to determine if a given coordinate is inside the given geofence. |
polyReduce( | Array.<LatLng> | Performs a Douglas-Peucker path reduction on a polygon for the given tolerance. The start/end coordinates are variable and the end coordinate is trimmed from the result. |
polyWidest( | Array.<number> | Finds the widest section of the given route. This is useful for path reduction and reorientation. |
radialArea( | number | Calculates the spherical-cap area occupied by the given radial distance. |
var value = trakit.fleetfreedom.mercator.member;
/* or */
var result = trakit.fleetfreedom.mercator.member(...params);
Property | Type | Default | Description |
---|---|---|---|
majorRadius | number | 6378137 | The radius of the Earth in meters taken from the GRS-80, NAD83, and WGS-84 standards. |
minorRadius | number | ~6356752.3142 | The minor axis radius of an ellipsoid Earth as per WGS-84. |
Method | Returns | Description |
---|---|---|
latlngToPixel( | Point | Converts a LatLng into a pixel coordinate at a specified level of detail. |
metresPerPixel( | number | Returns the number of meters per pixel at the given latitude and zoom level. |
pixelToBounds( | LatLngBounds | Converts pixel coordinates of a tile into a lat/lng boundary. |
pixelToLatlng( | LatLng | Converts a pixel coordinate into a LatLng at a specified level of detail. |
pixelToTile( | Point | Converts pixel coordinates into tile coordinates of the tile containing the specified pixel. |
tileMapSize( | number | Determines the map width and height (in pixels) at a specified level of detail. |
tileToBounds( | LatLngBounds | Converts tile coordinates into a lat/lng boundary representing a complete tile. |
tileToLatlng( | LatLng | |
tileToPixel( | Point | Converts tile coordinates into pixel coordinates of the upper-left pixel of the specified tile. |
var object = new trakit.fleetfreedom.LatLng(/** number */ lat, /** number */ lng);
Property | Type | Description |
---|---|---|
lat | number | Latitude (normalized between -180 and +180) |
lng | number | Longitude (normalized between -90 and +90) |
Method | Returns | Description |
---|---|---|
bearingTo( | number | Bearing from this LatLng to the given position in degrees from North |
distanceTo( | number | Returns the distance to the given LatLng in meters |
equals( | boolean | Compares this LatLng to another to see if they are equivalent. |
toBetween( | LatLng | Returns a new LatLng at the half-way point between this and the given LatLng. |
toBounds( | LatLngBounds | Creates a square LatLngBounds centred around this LatLng. |
toJSON( | Object | null | Creates a literal of this object. Used internally by JSON.stringify. |
toRadians( | Point | Creates a Point based on the given magnifier |
toString( | string | Creates string representation of this coordinate |
toTranslated( | LatLng | Returns a new LatLng based on the given distance and bearing from the this position |
Method | Returns | Description |
---|---|---|
LatLng.parse( | LatLng | Creates a LatLng from the given string. |
var object = new trakit.fleetfreedom.LatLngBounds(/** LatLng | LatLngBounds | Array.<LatLng> | Array.<LatLngBounds>= */ ne, /** LatLng | LatLngBounds | Array.<LatLng> | Array.<LatLngBounds>= */ sw);
Property | Type | Description |
---|---|---|
east | number | Eastern edge |
north | number | Latitude at the Northern corners; not necessarily the Northern-most value. |
south | number | Latitude at the Southern corners; not necessarily the Southern-most value. |
west | number | Western edge |
Method | Returns | Description |
---|---|---|
contains( | boolean | Checks if a LatLng is contained within this boundary. |
copy( | LatLngBounds | Creates a duplicate of this LatLngBounds |
encloses( | boolean | Checks if a LatLngBounds is contained within this boundary. |
equals( | boolean | Compares this LatLngBounds to another to see if they are equal |
expand( | LatLngBounds | Extends the boundary to envelop the given point(s) but does not automatically validate. This comes in efficient when doing many operations on a single PointBounds |
extend( | LatLngBounds | Extends the boundary to envelop the given point(s) and automatically validates |
getCentre( | LatLng | Returns the centre point of the boundary. |
getDiagonalDistance( | number | The distance in meters between the north-east corner and the south-west corner. |
getEastMiddle( | LatLng | The mid-point coordinate between the north east and north west corners. |
getLatitudinalDistance( | number | The distance in meters between the north-most border and the south-most border. |
getLongitudinalDistance( | number | The distance in meters between the east-most and the west-most points along the border closest to the equator. |
getNorthEast( | LatLng | The coordinate of the north east corner. |
getNorthMiddle( | LatLng | The mid-point coordinate between the north east and north west corners. |
getNorthWest( | LatLng | The coordinate of the north west corner. |
getSouthEast( | LatLng | The coordinate of the south east corner. |
getSouthMiddle( | LatLng | The mid-point coordinate between the south east and south west corners. |
getSouthWest( | LatLng | The coordinate of the south west corner. |
getWestMiddle( | LatLng | The mid-point coordinate between the south east and south west corners. |
isEmpty( | boolean | Checks to see if the bounds are valid, and that the corners are different coordinates. |
isValid( | boolean | Checks to see if the bounds are valid (not inside-out and lat/lngs are normalized). |
overlaps( | boolean | Checks if a LatLngBounds overlaps this boundary. Also returns true if either boundary's LatLngBounds#encloses returns true. |
toJSON( | Object | null | Creates a literal of this object. Used internally by JSON.stringify. |
toString( | string | Creates string representation of this coordinate |
validate( | LatLngBounds | Validates the boundary by ensuring the top value is less than the bottom value, and the left value is less than the right value. Also adjusts the width and height values |
var object = new trakit.fleetfreedom.Position(/** number */ lat, /** number */ lng, /** number */ speed, /** number */ bearing, /** number */ accuracy, /** string | Date */ dts, /** string */ address, /** number */ limit, /** number */ altitude, /** StreetAddress */ street);
Property | Type | Description |
---|---|---|
accuracy | number | Estimated accuracy for this GPS fix |
address | string | Approximate street address |
altitude | number | Altitude (in meters above sea level) |
bearing | number | Bearing (in degrees from north) |
date | Date | Data/time of this GPS fix |
lat | number | Latitude (normalized between -180 and +180) |
lng | number | Longitude (normalized between -90 and +90) |
radius | number | Equatorial radius of the planet; value is geography.earthRadius |
speed | number | Speed (in Km/h) |
speedLimit | number | Speed limit in Km/h |
street | StreetAddress | A reverse-geocoded breakdown of all geographic information available at the lat/long coordinates. |
Method | Returns | Description |
---|---|---|
bearingTo( | number | Bearing from this LatLng to the given position in degrees from North |
distanceTo( | number | Returns the distance to the given LatLng in meters |
equals( | boolean | Compares this Position to another to see if they are equal |
predictNext( | LatLng | Predicts a new Position based on current location and speed added by the given seconds |
toBetween( | LatLng | Returns a new LatLng at the half-way point between this and the given LatLng. |
toBounds( | LatLngBounds | Creates a square LatLngBounds centred around this LatLng. |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
toLatLng( | LatLng | Returns a new LatLng using this position's coordinates. |
toRadians( | Point | Creates a Point based on the given magnifier |
toString( | string | Creates JSON-string representation of this coordinate |
toTranslated( | LatLng | Returns a new LatLng based on the given distance and bearing from the this position |
var object = new trakit.fleetfreedom.StreetAddress(/** string */ number, /** string */ street, /** string */ city, /** string */ region, /** string */ province, /** string */ country, /** string */ postal, /** boolean */ toll);
Property | Type | Description |
---|---|---|
city | string | City name |
country | string | Country code |
number | string | House number |
postal | string | Postal or zip code |
province | string | Province or state code |
region | string | Region name |
street | string | Full street name |
toll | boolean | Indicates that there is a toll for the current road segment |
Method | Returns | Description |
---|---|---|
toString( | string | Creates string representation of this address. |
Method | Returns | Description |
---|---|---|
StreetAddress.parse( | StreetAddress | Creates a StreetAddress out of a trakit.json.StreetAddress. |
var object = new trakit.fleetfreedom.HosCarrier(/** Company */ company, /** trakit.json.HosCarrier */ object);
Property | Type | Description |
---|---|---|
address | StreetAddress | The carrier's physical or incorporated address. |
codes | Dictionary.<string, string> | Identity codes supplied by a regulatory/government body such as DOT ID. |
company | Company | The Company to which this asset belongs. |
contact | Contact | Main contact information |
contactId | number | |
id | number | Unique identifier |
logo | Picture | Carrier logo (appears on trip inspection logs) |
logoId | number | |
name | string | |
notes | string | Notes. |
shiftCycle | HosCycle | Default shift cycle used by the drivers. |
timezone | string | The local timezone of the carrier's address. |
version | Array.<number> | The version flags used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | HosCarrier | Updates parameters for this HosCarrier from the given JSON literal |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.HosEvent(/** Company */ company, /** trakit.json.HosEvent */ object);
Property | Type | Description |
---|---|---|
address | StreetAddress | Geolocation/Written address by driver of where the event took place |
carrier | HosCarrier | The carrier information to which this event belongs. |
carrierId | number | Unique identifier of the carrier information |
certificationDate | Date | Date of the records being certified or re-certified by the driver |
code | HosEventCode | This code is used in conjunction with the type to determine the specific event |
company | Company | The Company to which this asset belongs. |
diagnosticCode | HosDiagnosticCode | Data Diagnostic Event Code |
diagnosticStatus | boolean | Data Diagnostic Event Indicator Status |
distanceSinceGPSFix | string | Distance since last valid coordinates. An integer value between 0 and 6 |
dts | Date | When the event took place |
engineHours | number | Engine hours of the tractor at the time of the event |
id | number | Unique Identifier |
isCoDriver | boolean | Driver status - Primary/Co-driver |
latitude | string | Single character 'X', single character 'M', single character 'E', or 2-decimal point precision value between -90.00 and 90.00 |
longitude | string | Single character 'X', single character 'M', single character 'E', or 2-decimal point precision value between -179.99 and 180.00 |
malfunctionCode | HosMalfunctionCode | Malfunction Indicator Code |
malfunctionStatus | boolean | Malfunction Indicator Status |
notes | string | Comments/Annotations entered by the driver/user |
odometer | number | Odometer reading of the tractor at the time of the event |
origin | HosEventOrigin | Event Record origin |
person | Person | Driver associated with this event |
personId | number | Unique identifier of the driver |
seqNo | string | Event Sequence Id Number |
shiftCycle | HosCycle | Driver's shift cycle |
status | HosEventStatus | Event Record status |
type | HosEventType | Event type used to determine the record type |
vehicle | number | Vehicle associated with this event |
vehicleId | Vehicle | Unique identifier of the vehicle |
version | Array.<number> | The version flags used to ensure sync operations are done in order. |
violationStatus | boolean | Violation Status |
violationType | HosViolationType | Type of violation |
Method | Returns | Description |
---|---|---|
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | HosEvent | Updates parameters for this HosEvent from the given JSON literal |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.HosInspection(/** Company */ company, /** trakit.json.HosInspection */ object);
Property | Type | Description |
---|---|---|
address | StreetAddress | Street address where the inspection took place |
carrier | HosCarrier | The carrier information to which this inspection report belongs. |
carrierId | number | Unique identifier of the carrier information |
company | Company | The Company which logged this inspection report. |
defects | Array.<HosInspectionDefect> | List of all defects |
id | number | Unique identifier |
inspectedOn | Date | Timestamp from when the inspection took place. |
latlng | LatLng | Coordinates where the inspection took place |
odometer | number | Recorded odometer at time of inspection |
person | Person | Driver who conducted the inspection |
personId | number | Unique identifier of the driver |
status | HosDefectStatus | Status of all defects |
technician | string | Name of the (optional) mechanic/technician who performed repairs or inspection. |
techSigned | Date | Timestamp from when a mechanic/technician (optionally) signed off on the inspection. |
trailers | Array.<Trailer> | Between 0 and 2 trailers being inspected |
vehicle | Vehicle | Tractor being inspected |
vehicleId | Vehicle | Unique identifier of the vehicle |
version | Array.<number> | The version flag used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | HosInspection | Updates parameters for this HosInspection from the given JSON literal |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.HosInspectionDefect(/** HosDefectArea */ area, /** string */ category, /** string */ description, /** Array.<string> */ major, /** Array.<string> */ minor);
Property | Type | Description |
---|---|---|
area | HosDefectArea | Shows where a defect was located on the rig. |
category | string | The kind of defect |
description | string | A text description of the defect. |
major | Array.<string> | A list of major flaws as noted for Canadian standards |
minor | Array.<string> | A list of minor flaws as noted for Canadian standards |
Method | Returns | Description |
---|---|---|
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
Value | Description |
---|---|
canada120h14d | Canada South 120 hour / 14 day (Cycle 2) |
canada120h14dN | Canada North 120 hour / 14 day (Cycle 2) |
canada70h7d | Canada South 70 hour / 7 day (Cycle 1) |
canada80h7d | Canada North 80 hour / 7 days (Cycle 1) |
canadaOilGas | Canada Oil and Gas |
usa60h7d | USA Federal 60 hour / 7 days |
usa60h7d_p | USA Federal 60 hour / 7 days (passenger) |
usa70h8d | USA Federal 70 hour / 8 days |
usa70h8d_p | USA Federal 70 hour / 8 days (passenger) |
usaAlaska70h7d | USA Alaska 70 hour / 7 days |
usaAlaska70h7d_p | USA Alaska 70 hour / 7 days (passenger) |
usaAlaska80h8d | USA Alaska 80 hour / 8 days |
usaAlaska80h8d_p | USA Alaska 80 hour / 8 days (passenger) |
usaCalifornia112h8d | USA California 112 hours / 8 days (farm products) |
usaCalifornia112h8d_p | USA California 112 hours / 8 days (passenger) |
usaCalifornia80h8d | USA California 80 hour / 8 days |
usaCalifornia80h8d_p | USA California 80 hour / 8 days (passenger) |
usaTexas70h7d | USA Texas 70 hour / 7 day |
Value | Description |
---|---|
canadaEmail | MTO via Email |
usaEmail | FMCSA via Email |
usaWebservice | FMCSA via Webservice portal |
Value | Description |
---|---|
tractor | Defect on the vehicle. |
trailer | Defect on one of the trailers. |
Value | Description |
---|---|
corrected | Issue fixed or resolved |
harmless | Issue does not affect operation |
satisfactory | No correction required |
Value | Description |
---|---|
day1 | Hours deferred from Day 1. |
day2 | Hours deferred from Day 2. |
none | Hours have not been defefred. |
Value | Description |
---|---|
dataTransfer | Data transfer data diagnostic event |
engine | Engine synchronization data diagnostic event |
missingData | Missing required data elements data diagnostic event |
other | Other ELD identified diagnostic event |
power | Power data diagnostic event |
unidentified | Unidentified driving records data diagnostic event |
Value | Description |
---|---|
diagnosticCleared | Diagnostic: An data diagnostic event cleared. |
diagnosticLogged | Diagnostic: A data diagnostic event logged. |
driving | Duty Status: Driver's duty status changed to "Driving". |
intermediateConventional | Intermediate: log with conventional location precision. |
intermediateReduced | Intermediate: log with reduced location precision. |
login | Login: Authenticated driver's ELD login activity. |
logout | Login: Authenticated driver's ELD logout activity. |
malfunctionCleared | Diagnostic: An ELD malfunction cleared. |
malfunctionLogged | Engine Power: An ELD malfunction logged. |
none | Other: Driver indication for PC, YM and WT cleared. |
offDuty | Duty Status: Driver's duty status changed to "Off-duty". |
onDuty | Duty Status: Driver's duty status changed to "On-duty not driving". |
personalConveyance | Other: Driver indicates "Authorized Personal use of CMV". |
powerupConventional | Engine Power: Engine power-up with conventional location precision. |
powerupReduced | Engine Power: Engine power-up with reduced location precision. |
shutdownConventional | Engine Power: Engine shut-down with conventional location precision. |
shutdownReduced | Engine Power: Engine shut-down with reduced location precision. |
sleeperBerth | Duty Status: Driver's duty status changed to "Sleeper Berth". |
waiting | Duty Status: Waiting status is an Off-duty for some cases in Oil and Gas cycle. |
yardMoves | Other: Driver indicates "Yard moves". |
Value | Description |
---|---|
automatic | Automatically recorded by ELD |
driver | Entered or edited by driver |
unidentified | Assumed from unidentified driver profile |
user | Edit requested by an authenticated user other than driver |
Value | Description |
---|---|
active | Active |
inactiveChanged | Inactive - changed |
inactiveChangeRejected | Inactive - change rejected |
inactiveChangeRequested | Inactive - change requested |
Value | Description |
---|---|
certification | A driver's certification/re-certification of records |
cycleChanged | Canadian cycle changed. |
deferredHours | Canadian cycle off-duty hours deferred. |
diagnostic | A malfunction or data diagnostic detection occurence |
dutyStatus | A change in driver's duty-status |
enginePower | CMV's engine power up/shutdown activity |
extraHours | Canadian cycle additional hours not recorded. |
intermediate | An intermediate log |
login | A driver's login/logout activity |
other | A change in driver's indication of authorized personal use of CMV or yard moves |
unknown | Unknown |
zoneChanged | Canadian cycle operating zone changed. |
Value | Description |
---|---|
dataRecording | Data recording compliance malfunction |
dataTransfer | Data transfer compliance malfunction |
engine | Engine synchronization compliance malfunction |
other | Other ELD detected malfunction |
position | Positioning compliance malfunction |
power | Power compliance malfunction |
timing | Timing compliance malfunction |
Value | Description |
---|---|
break_24 | 24 Hour Break Required |
break_30 | 30 Minute Break Required |
consecutive_off_8 | Daily 8 Consecutive Hours Off Duty Required |
cycle_120 | 120 Hour Cycle Limit |
cycle_60 | 60 Hour Cycle Limit |
cycle_70 | 70 Hour Cycle Limit |
cycle_switching_36 | 36 Hours Break Required for Cycle Switching |
cycle_switching_72 | 72 Hours Break Required for Cycle Switching |
daily_break_10 | Daily 10 Hour Off-Duty Required |
daily_break_8 | Daily 8 Hour Off-Duty Required |
daily_driving_13 | Daily 13 Hour Driving Limit |
daily_duty_14 | Daily 14 Hour On-Duty Limit |
deferred_break_10 | 10 Consecutive Hours Off Duty Required on Day 2 |
deferred_break_12 | Off Duty Time Insufficient on Day 2 |
driving_10 | 10 Hour Driving Limit |
driving_11 | 11 Hour Driving Limit |
driving_13 | 13 Hour Driving Limit |
duty_14 | 14 Hour Shift Limit |
duty_15 | 15 Hour On-Duty Limit |
duty_16 | 16 Hour Shift Limit |
none | No violation |
oil_break_24 | 3 periods of 24 Hour Break Required |
var value = trakit.fleetfreedom.socket.member;
/* or */
var result = trakit.fleetfreedom.socket.member(...params);
Property | Type | Description |
---|---|---|
lastRequest | Date | A date/time stamp from the last moment a command was sent from the client. |
lastResponse | Date | A date/time stamp from the last moment a message was received by the client. |
policies | Object | |
policies.passwords | CompanyPasswords | The CompanyPasswords informs you on password requirements for changing passwords. |
policies.sessions | CompanySessions | The CompanySessions provides behaviour information for maintaining a session. |
session | Session | A JSON equivalent Session for the current connection. |
state | SocketState | The WebScoket's current connection state. |
Method | Returns | Description |
---|---|---|
close( | boolean | Closes the WebSocket connection. |
dispose( | Closes the WebSocket connection, unbinds all event handlers, and prepares the object for the garbage collector. | |
open( | boolean | Opens a WebSocket connection to the Fleet Freedom service. |
send( | number | Sends a command an parameters object. |
debug( | boolean | |
fire( | MVCEvent | |
mapper( | ||
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.SocketRequest(/** number */ reqId);
Property | Type | Description |
---|---|---|
reqId | number |
var object = new trakit.fleetfreedom.SocketResponse(/** number */ errorCode, /** string */ message, /** number */ reqId);
Property | Type | Description |
---|---|---|
errorCode | number | |
message | string | |
reqId | number |
Value | Description |
---|---|
closed | The connection is closed. This is the initial state. |
closing | The underlying TCP connection may still be open, but the server is no longer accepting commands. |
open | The connection to the server is open and ready. |
opening | The underlying TCP connection is open, but the server has not yet identified that it is ready. |
unknown | Your guess is as good as mine. It should never be this. |
var object = new trakit.fleetfreedom.MaintenanceInterval(/** MaintenanceSchedule */ schedule, /** number */ assetId, /** Date */ date, /** number */ odometer, /** number */ engineHours, /** number */ lastJobId);
Property | Type | Description |
---|---|---|
asset | Asset | |
assetId | number | Unique identifier of the asset being used for this schedule |
date | Date | Initial date to use for the schedule's Date Recurrence pattern |
engineHours | number | Initial engine hours value (in decimal hours) for the schedule's Engine Hours Recurrence pattern |
lastJob | number | The most recent completed job for the asset using the schedule. |
lastJobId | number | Unique identifier of the last completed job for the asset. |
odometer | number | Initial odometer value (in Km) for the schedule's Odometer Recurrence pattern |
schedule | MaintenanceSchedule | The Maintenance Schedule to which this recurrence definition refers |
Method | Returns | Description |
---|---|---|
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
predict( | Date | Tries to predict the next lapse for this interval. |
predictByDate( | Date | Tries to predict the next lapse for this interval based on the date. |
predictByEngineHours( | Date | Tries to predict the next lapse for this interval by averaging the engine hours. |
predictByOdometer( | Date | Tries to predict the next lapse for this interval by averaging the odometer. |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.MaintenanceJob(/** Company */ company, /** trakit.json.MaintenanceJob */ object);
Property | Type | Description |
---|---|---|
asset | Asset | The Asset to which this Job relates. |
assetId | number | |
company | Company | The Company to which the Job's Asset relates. |
completed | Date | Time-stamp from the Job's status change (or creation). |
cost | number | Estimated cost for these jobs. |
created | Date | The time-stamp from this Job's creation. |
duration | TimeSpan | The amount of time spent performing the work. |
engineHours | number | The recorded engine hours reading from the vehicle at the time of doing the work. |
garage | string | The Service Centre used for these jobs. |
id | number | Unique identifier |
name | string | Repair or service task. |
notes | string | Instructions for these jobs. |
odometer | number | The recorded odometer reading from the vehicle at the time of doing the work. |
pictures | Array.<Picture> | Images taken while performing the work. |
reference | string | Reference code used to track these jobs. |
schedule | MaintenanceSchedule | MaintenanceSchedule to which this Job relates. |
scheduleId | number | MaintenanceSchedule#id to which this Job relates. |
status | MaintenanceJobStatus | The progress on the service work. |
technician | string | The mechanic who performed the work. |
version | Array.<number> | The version flag used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | MaintenanceJob | Updates parameters for this MaintenanceJob from the given JSON literal |
isMatch( | boolean | Checks the given SearchPattern for a match to this job. Used internally by Company#findMaintenanceJobs. |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.MaintenanceSchedule(/** Company */ company, /** trakit.json.MaintenanceSchedule */ object);
Property | Type | Description |
---|---|---|
company | Company | The Company to which this MaintenanceSchedule relates |
cost | number | Estimated cost for these jobs |
duration | TimeSpan | Estimated amount of time to complete the work. |
fill | string | Hex colour value for fills and backgrounds. |
garage | string | The Service Centre used for these jobs |
graphic | string | Short string with an icon-code for display purposes. |
id | number | Unique identifier |
intervals | Dictionary.<number, MaintenanceInterval> | The per-asset details calculated by the system to help predict the creation of Maintenance Jobs. |
name | string | Repair or service task |
notes | string | Instructions for these jobs |
notify | Array.<string> | |
predictionDays | number | The number of days in advance to predict a job will become pending. |
recurDays | number | The maximum number of days between service stops |
recurDistance | number | The minimum distance (in Km) between service stops |
recurEngineHours | number | The minimum running engine hours (in decimal hours) between service stops |
reference | string | Reference code used to track these jobs |
stroke | string | Hex colour value for text and outlines. |
targets | string | Targeting expression for selecting Vehicle and Trailer type assets. |
version | Array.<number> | The version flag used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | MaintenanceSchedule | Updates parameters for this MaintenanceSchedule from the given JSON literal |
isMatch( | boolean | Checks the given SearchPattern for a match to this schedule. Used internally by Company#findMaintenanceSchedules. |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
Value | Description |
---|---|
cancelled | The work was not done, and the job has been cancelled. |
completed | The work was done. |
pastdue | The job needs to be done as soon as possible. |
pending | The job has to be done within the next two weeks. |
var object = new trakit.fleetfreedom.Message(/** Company */ company, /** trakit.json.AssetMessage */ object);
Property | Type | Description |
---|---|---|
asset | Asset | The Asset to which this message relates. |
assetId | number | The identifier of the Asset to which this message belongs. |
body | string | Message text |
delivered | Date | When the message was received or sent by the system. |
folder | string | Can be "Inbox" and "Archive" |
from | string | Sender's address; either email or phone number |
id | number | Unique identifier of the message. |
incoming | boolean | True when message was received by Fleet Freedom, and False when sent by Fleet Freedom. |
kind | string | MessageTypes used are SMS and Email. |
processed | Date | When the message was processed by the system. |
readBy | string | The User who read this message. Blank if unread. |
status | MessageStatus | Shows message processing status. |
subject | string | Email subject. For SMS messages, this is left blank. |
to | string | Recipient's address; either email or phone number |
user | User | The User who sent or received the message. |
userLogin | string | |
version | Array.<number> | The version flags used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | Message | Updates parameters for this Message from the given JSON literal |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
Value | Description |
---|---|
acknowledged | Sent and has been responded to or acknowledged by the recipient. |
bounceback | Sent but returned with error (applies to MessageType.email). |
created | Created, but not yet sent to the recipient. |
failed | Failed to send. |
processed | Sent or received without error. |
throttled | Failed to send because too many messages sent to the specified recipient. |
Value | Description |
---|---|
apn | iOS App Message |
By email | |
gcm | Android App Message |
pnd | Personal Navigation Device (Garmin/Magellan/etc) |
sms | By phone |
socket | WebSocket alert message |
unknown | If the type of memo has not yet been determined, or there was an error determining its type. |
var object = /** MVCObject */ mvcobjectInstance.fire(/** string */ type, /** ? */ detail);
Property | Type | Description |
---|---|---|
detail | ? | An optional value or object used for custom extensions (read-only) |
fired | boolean | Indicates whether this event was fired or not |
stopped | boolean | Indicates whether this event is being stopped |
target | MVCObject | The object from which this event is fired (read-only) |
type | string | The event type name (read-only) |
Method | Returns | Description |
---|---|---|
stop( | boolean | Stops/prevents default action for this event |
var object = new trakit.fleetfreedom.MVCObject();
Method | Returns | Description |
---|---|---|
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.Place(/** Company */ company, /** trakit.json.PlaceGeneral */ object);
/* or */
var object = /** Company */ companyInstance.createPlace(/** trakit.json.PlaceGeneral */ json);
Property | Type | Description |
---|---|---|
address | string | The full street address. |
anchor | LatLng | The centre coordinate. |
colour | string | Hex colour for this place's area |
company | Company | The Company to which this asset belongs. |
detail | string | Alias for {@Place#address}. |
icon | Icon | The icon used to mark the centre coordinate. |
iconId | number | The unique identifier of the Icon for this place. |
id | number | Unique identifier. |
kind | PlaceShapeType | The type of shape to draw around the centre coordinate. |
labels | Array.<string> | |
name | string | Friendly searchable name. |
notes | string | Any area specific notes |
pictureIds | Array.<number> | |
pictures | Array.<Picture> | Pictures taken for this location. |
radius | number | When drawing a PlaceShapeType.radial, this specifies how large the circle must be in meters. |
reference | string | Customizable field used to refer this place an external system. |
shape | Array.<LatLng> | When drawing a PlaceShapeType.polygon or PlaceShapeType.rectangle, the coordinates given represent the outlined shape. |
version | Array.<number> | The version flag used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | Place | Updates parameters for this Place from the given JSON literal |
getAssets( | Array.<Asset> | Gets a list of Assets which are interacting with this place. |
getBounds( | LatLngBounds | Returns a valid LatLngBounds that contains the shape of this place. |
isMatch( | boolean | |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
Value | Description |
---|---|
point | |
polygon | |
radial | |
rectangle | A LatLngBounds, not a true "rectangle". When an Asset is contained, it will interact with the Place. |
var value = trakit.fleetfreedom.reports.member;
/* or */
var result = trakit.fleetfreedom.reports.member(...params);
Property | Type | Default | Description |
---|---|---|---|
types | Array.<ReportType> | undefined | Array of supported ReportTypes |
var object = new trakit.fleetfreedom.ReportNotifications(/** Array.<string> */ users, /** string */ assets);
Property | Type | Description |
---|---|---|
assets | string | Targeting expressions for sending report results to targeted assets (only about themselves). |
users | Array.<string> | List of users from the target company who will receive report results (via email only) for scheduled reports. |
Method | Returns | Description |
---|---|---|
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
var object = new trakit.fleetfreedom.ReportOptions(/** string */ targets, /** Array.<ReportParameter> */ parameters, /** ReportFilterMode */ filtering, /** string */ places, /** Array.<string> */ regions, /** ReportScorecardRules */ scorecardRules);
Property | Type | Description |
---|---|---|
filtering | ReportFilterMode | The method by which results will be filtered |
parameters | Array.<ReportParameter> | Configured values used to execute the results. |
places | string | The SearchPattern used to filter results based on Places. |
regions | Array.<string> | Configured values used to execute the results. |
scorecardRules | ReportScorecardRules | Rules used to generate scorecard for this report. |
targets | string | The SearchPattern used to target the results. |
Method | Returns | Description |
---|---|---|
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
var object = new trakit.fleetfreedom.ReportParameter(/** ReportParameterType */ type, /** string */ value);
Property | Type | Description |
---|---|---|
type | ReportParameterType | The kind of parameter. |
value | string | The value given to the report processor. |
Method | Returns | Description |
---|---|---|
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
var object = new trakit.fleetfreedom.ReportRecurrence(/** trakit.json.ReportRecurrence */ object);
Property | Type | Description |
---|---|---|
end | Date | Local date/time on which the recurring pattern ends (not UTC). |
iterations | number | The number of times this schedule has been invoked to generate results. |
kind | ReportRecurrenceType | Pattern used to re-create ReportResults. |
lastEndDate | Date | Last start date/time range of the schedule. |
lastResult | number | Unique identifier of the most recent ReportResult for this schedule's template. |
lastStartDate | Date | Last start date/time range of the schedule. |
nextEndDate | Date | Ending date/time range predicted for the next occurrence. |
nextStartDate | Date | Starting date/time range predicted for the next occurrence. |
start | Date | Local date/time from which the recurring pattern begins (not UTC). |
timezone | string | The local timezone used to calculate recurring date/time ranges. |
weekday | number | A number between 0 and 6 representing the day of the week starting with Sunday. |
weekdays | Array.<boolean> | Seven (7) booleans which denote the applicable days of the week starting with Sunday. |
Method | Returns | Description |
---|---|---|
calculateNextRange( | Array.<Date> | Calculates the next recurring date range for the schedule. Returns an array of zero or two Dates. If the schedule will not allow the template to run again, the array is empty. Otherwise, the first element is the next starting date, and the second element is the ending date. |
fromJSON( | ReportRecurrence | Updates parameters for this ReportRecurrence from the given JSON literal |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
var object = new trakit.fleetfreedom.ReportResult(/** Company */ company, /** trakit.json.ReportResult */ object);
Property | Type | Description |
---|---|---|
archive | boolean | A flag to show whether the ReportResult has been archived. |
bounds | LatLngBounds | The boundary containing the results of this report. |
company | Company | The Company to which this object belongs |
completed | Date | The date/time when the results were done processing. |
created | Date | When the results were originally requested from the report processor. |
error | string | A message to describe why the report failed. |
filtered | Array.<Place> | Collection of Places that were used for filtering the results. |
filterIds | Array.<number> | |
id | number | Unique identifier |
name | string | Saved name of the results |
notes | string | Saved notes for the results, and possibly the appended error message if the ReportResult#status is ReportStatus.failed |
options | ReportOptions | The list of options and parameters for processing. |
progress | number | The progress in running and saving the results. |
runBy | string | The User who originally created these results. |
schedule | ReportSchedule | If created on a nightly schedule, this will be the ReportSchedule that created the report result. |
scheduleId | number | The ReportSchedule#id used to create this report result. |
scorecards | Array.<ReportScorecard> | Scorecards for all the targeted assets based on the scorecard rules. |
status | ReportStatus | Processing status. See ReportStatus for details. |
targeted | Array.<Asset> | Collection of targeted Assets that were used to calculate the results. |
targetIds | Array.<number> | |
template | ReportTemplate | An optional template to fill in any missing options. |
templateId | number | The ReportTemplate#id used to create this report result. |
timezone | string | The assumed timezone under which the dates are calculated. |
totals | Array.<ReportTotal> | A summed list of totals for the results. |
type | ReportType | The kind of logic used to process the results. |
version | Array.<number> | The version flag used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | ReportResult | Updates parameters for this ReportResult from the given JSON literal |
isMatch( | boolean | Checks the given SearchPattern for a match to this report. Used internally by Company#findReportResults. |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.ReportSchedule(/** Company */ company, /** trakit.json.ReportSchedule */ object);
Property | Type | Description |
---|---|---|
company | Company | The Company to which this object belongs |
id | number | Unique identifier |
name | string | Saved name of the schedule |
notes | string | Saved notes for the schedule |
notify | ReportNotifications | A group of users and targeted assets which also receive report notifications |
options | ReportOptions | The list of options and parameters for processing |
schedule | ReportRecurrence | A pattern for automatically re-running the report template |
template | ReportTemplate | The report template for which this schedule runs |
templateId | number | ID of the report template for which this schedule runs |
version | Array.<number> | The version flag used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
fromJSON( | ReportSchedule | Updates parameters for this ReportSchedule from the given JSON literal |
getNotifyAssets( | Array.<Asset> | Returns a list of assets who will receive notification of new report results (for themselves only) from this schedule. |
getNotifyUsers( | Array.<User> | Returns a list of users who will receive notification of new report results from this schedule. |
getOwner( | User | Returns the User who owns this schedule. When results are generated, this user's permissions and settings are used. |
isMatch( | boolean | Checks the given SearchPattern for a match to this schedule. Used internally by Company#findReportSchedules. |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
var object = new trakit.fleetfreedom.ReportScorecard(/** Object */ json);
Property | Type | Description |
---|---|---|
condition | string | Type of exception, example speeding, idling, etc... |
duration | TimeSpan | Threshold per instance. If the threshold is 0, each instance is used in the calculation. |
points | number | Points applied against the base score per instance. |
Method | Returns | Description |
---|---|---|
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
var object = new trakit.fleetfreedom.ReportScorecardParameter(/** string */ condition, /** string | number | TimeSpan */ duration, /** number */ points);
Property | Type | Description |
---|---|---|
condition | string | Type of exception, example speeding, idling, etc... |
duration | TimeSpan | Threshold per instance. If the threshold is 0, each instance is used in the calculation. |
points | number | Points applied against the base score per instance. |
Method | Returns | Description |
---|---|---|
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
var object = new trakit.fleetfreedom.ReportScorecardRules(/** number */ baseScore, /** Array.<ReportScorecardParameter> */ parameters);
Property | Type | Description |
---|---|---|
baseScore | number | Base score for the scorecard. |
parameters | Array.<ReportScorecardParameter> | Infraction parameters used to generate the final score. |
Method | Returns | Description |
---|---|---|
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
var object = new trakit.fleetfreedom.ReportTemplate(/** Company */ company, /** trakit.json.ReportTemplate */ object);
Property | Type | Description |
---|---|---|
company | Company | The Company to which this object belongs |
fill | string | The colour filling the background of the display icon. |
graphic | string | The name of the icon used for display purposes. |
id | number | Unique identifier |
name | string | Saved name of the template |
notes | string | Saved notes for the template |
options | ReportOptions | The list of options and parameters for processing. |
stroke | string | The colour of the outline for the display icon. |
type | ReportType | The kind of logic used to process the results. |
version | Array.<number> | The version flag used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | ReportTemplate | Updates parameters for this ReportTemplate from the given JSON literal |
getReportResults( | Array.<ReportResult> | Retrieves the ReportResults using this template. |
getReportSchedules( | Array.<ReportSchedule> | Retrieves the ReportSchedules for this template. |
isMatch( | boolean | Checks the given SearchPattern for a match to this template. Used internally by Company#findReportTemplates. |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.ReportTotal(/** ReportResult */ result, /** trakit.json.ReportTotal */ json);
Property | Type | Description |
---|---|---|
asset | Asset | The Asset to which this total refers. |
assetId | number | Asset's Unique identifier |
distance | number | The total distance travelled of all summary instances. |
duration | TimeSpan | The total duration of all summary instances. |
result | ReportResult | The ReportResult to which this total belongs. |
stateDetail | string | Unique code given to the report total. |
summaryCount | number | The number of summary instances included in this total. |
value | number | The total value of all summary instances. |
valueType | string | The type of totalled value. |
Method | Returns | Description |
---|---|---|
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
var object = /** ReportTemplate */ reporttemplateInstance.type();
Property | Type | Description |
---|---|---|
id | string | Constant identifier. One of the ReportType values. |
name | string | Name of this logic type. |
notes | string | Notes about this type of report logic. |
optional | Array.<ReportParameterType> | Optionally available parameters when creating results. |
parameters | Array.<ReportParameterType> | List of mandatory and optional parameters available. |
required | Array.<ReportParameterType> | Mandatory parameters when creating results. |
template | Array.<ReportParameterType> | Parameters available for creating a ReportTemplate. |
Value | Description |
---|---|
exclusive | Exclude all results except those whose filters match. |
inclusive | Include any results for those whose filters match. |
none | Filtering is not enabled for the report. |
Value | Description |
---|---|
attributes | A list of attribute names an Asset must have to be included in the results. Should be a comma separated string of codified tag names. |
collate | A choice in the method used to calculate a Summary Instance's values. For an attribute report, the possible values are "instance" where if the attribute is present it is included, and "value" where each attribute's simple value becomes it's own summary instance. For a Tag Summary report, the possible values are "inclusive" where any of the given tags must match, and "exclusive" where all the given tags must match. |
distance | A number of seconds representing the minimum distance travelled in a Summary Instance before it is included in the results. |
duration | A number of seconds representing the minimum amount of time for a Summary Instance before it is included in the results. |
endDate | Ending date/time for the historical data range. The date should be a valid ISO-8601 string. |
prolonged | A number of meters representing the maximum amount of time in a Summary Instance before it is split into two and the latter marked as an exception in the results. |
rubicon | A number of meters representing the maximum distance travelled in a Summary Instance before it is split into two and the latter marked as an exception in the results. |
startDate | Starting date/time for the historical data range. The date should be a valid ISO-8601 string. |
tags | The list of tags an Asset must have to be included in the results. Should be a comma separated string of codified tag names. |
timeOfDay | Time-span processed on each day. Only data within the time-span is included in the results. The times should be 2 space separated duration strings; see utility.parseTime for an example. |
Value | Description |
---|---|
annually | Yearly based on the ReportRecurrence#start. |
daily | Runs once a day at midnight in the local timezone for the previous day. |
monthly | Runs once per month in the local timezone for the previous month. |
once | Run only once. This type is used for large reports which need to run overnight. |
quarterly | Per quarter on the date specified. Used in conjunction with the ReportRecurrence#start to determine which months are included. |
weekly | Runs on Sunday at midnight in the local timezone for the previous 7 days. |
Value | Description |
---|---|
completed | The ReportResult is completed and ready to view. |
created | The ReportResult has been created, but not yet begun processing. |
failed | There was a failure during processing. See ReportResult#notes for details. |
queued | The system is waiting for resources before processing the report. |
running | The report processor has begun processing the results. |
saving | Processing of the results is completed and is now being saved for viewing. |
var value = trakit.fleetfreedom.authorizer.member;
/* or */
var result = trakit.fleetfreedom.authorizer.member(...params);
Property | Type | Description |
---|---|---|
complex | Array.<PermissionType> | The PermissionTypes which are calculated using labels. |
implied | Array.<PermissionType> | A list of PermissionTypes which are implied for each user's own company. |
simple | Array.<PermissionType> | PermissionTypes which do not use labels to calculate access. |
Method | Returns | Description |
---|---|---|
compute( | Array.<UserPermission> | Creates a well ordered array of UserPermissions which can be used to further calculate a user's permissions for the target company. |
computeAll( | Dictionary.<number, Array.<UserPermission>> | Creates a Dictionary where the key is a Company#id and the values are well ordered arrays of UserPermissions which can be used to further calculate a user's permissions. |
computeAllComplex( | Dictionary.<number, Array.<UserPermission>> | Creates a Dictionary where the key is a Company#id and the values are well ordered arrays of complex UserPermissions which can be used to further calculate a user's permissions. |
computeAllSimple( | Dictionary.<number, Array.<UserPermission>> | Creates a Dictionary where the key is a Company#id and the values are well ordered arrays of simple UserPermissions which can be used to further calculate a user's permissions. |
computeComplex( | Array.<UserPermission> | Creates a well ordered array of complex UserPermissions which can be used to further calculate a user's permissions. |
computeSimple( | Array.<UserPermission> | Creates a well ordered array of simple UserPermissions which can be used to further calculate a user's permissions. |
computeSimpleLevels( | Dictionary.<PermissionType, PermissionLevel> | |
findAllEscalations( | Dictionary.<number, Array.<PermissionEscalation>> | Generates a Dictionary (company identifier as the key) of permissions being escalated between two computed permission states. |
findAnyComplex( | boolean | Checks a specific complex permission type, level, but not the labels, and returns true if access is granted. This method can be used as a short-circuit to diving deeper into check label specific permissions. |
findComplex( | boolean | Checks a specific complex permission type, level, and labels from a pre-computed array of permissions, and returns true if access is granted. |
findComplexLevel( | PermissionLevel | undefined | Retrieves the specified complex permission level from a pre-computed array of permissions. If the permission type specified is not found, undefined is returned instead. |
findEscalations( | Array.<PermissionEscalation> | Generates an array of permissions being escalated between two computed permission states for a target company. |
findSimple( | boolean | Checks a specific simple permission type and level from a pre-computed array of permissions, and returns true if access is granted. |
findSimpleLevel( | PermissionLevel | undefined | Retrieves the specified simple permission level from a pre-computed array of permissions. If the permission type specified is not found, undefined is returned instead. |
getComplexLevel( | PermissionLevel | undefined | Gets the permission level of the given complex permission type. If the permission type specified is not found, undefined is returned instead. |
getSimpleLevel( | PermissionLevel | undefined | Gets the permission level of the given simple permission type. If the permission type specified is not found, undefined is returned instead. |
hasAnyComplex( | boolean | Checks a specific complex permission type, level, but not the labels, and returns true if access is granted. This method can be used as a short-circuit to diving deeper into check label specific permissions. |
hasComplex( | boolean | Checks a specific complex permission type, level, and labels, and returns true if access is granted. |
hasSimple( | boolean | Checks a specific simple permission type and level, and returns true if access is granted. |
var object = new trakit.fleetfreedom.Contact(/** Company */ company, /** trakit.json.Contact */ object);
Property | Type | Description |
---|---|---|
address | string | A physical mail location. |
addresses | Dictionary.<string, string> | Mailing addresses for this contact. |
company | Company | The Company which employs this contact |
dates | Dictionary.<string, Date> | Inportant contact dates like birthdays. |
string | Primary email address. | |
emails | Dictionary.<string, string> | Email addresses used for this contact. |
fax | number | Why can't we get rid of these damn machines? |
id | number | Unique identifier |
mobile | number | A cellular phone number. |
name | string | This person's name. |
notes | string | Miscellaneous notes for this person. |
office | number | A workplace landline phone number. |
options | Dictionary.<string, string> | Additional information not easily categorized. |
otherNames | Dictionary.<string, string> | Other names for this contact. |
phones | Dictionary.<string, number> | Phone numbers for this contact including cell, office, home, fax, etc. |
pictureIds | Array.<number> | |
pictures | Array.<Picture> | A list of Pictures of this person. |
roles | Array.<string> | The types of jobs this person performs for this company |
url | string | Website. |
urls | Dictionary.<string, string> | Websites and online resources of this contact. |
version | Array.<number> | The version flag used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | Contact | Updates parameters for this Contact from the given JSON literal |
isMatch( | boolean | Checks the given SearchPattern for a match to this contact. Used internally by Company#findContacts. |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.EscalationState(/** PermissionLevel */ level, /** Array.<string> */ labels);
Property | Type | Description |
---|---|---|
labels | Array.<string> | |
level | PermissionLevel | The amount of access granted. |
Property | Type | Description |
---|---|---|
company | Company | The Company which employs this Machine account. |
enabled | boolean | Ability to disable this Machine account. Affects ability to use Fleet Freedom services. |
formats | Dictionary.<string, string> | The format strings defining the preferred way to display ambiguous values. |
groups | Array.<UserGroup> | Groups of which this Machine account is a member |
insecure | boolean | |
ipRanges | Array.<string> | Optional ranges of IP address ranges (using CIDR notation) to limit access to certain IPs. Currently, we only support IPv4. |
key | string | The unique identifier used by this Machine account. |
language | string | API credentials' preferred region and language |
measurements | Dictionary.<string, UserMeasurementPreference> | Preferred way of displaying ambiguous numbers in the context of measurements. |
nickname | string | Friendly search-able name for this Machine account. |
notAfter | Date | An optional timestamp that restricts this Machine account from being used after the given date. |
notBefore | Date | An optional timestamp that restricts this Machine account from being used before the given date. |
notes | string | Notes about this Machine account. |
options | Dictionary.<string, string> | Additional options which do not fit in with the formats or measurements preferences. |
permissions | Array.<UserPermission> | Permissions assigned to this Machine account. |
referrers | Array.<string> | Optional list of your managed domains from which this Machine account can be used. |
secret | string | A token used for encoding or validating requests. |
services | Array.<string> | List of Fleet Freedom service URIs that this Machine account is permitted to access. |
timezone | string | API credentials' native Timezone |
version | Array.<number> | The version flag used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | Machine | Updates parameters for this servce account from the given JSON literal |
getName( | string | Get's the best choice for display name. |
getUserGroups( | Array.<UserGroup> | Gets an Array of UserGroups to which these API credentials belongs. |
isAllowed( | boolean | Returns true when these API credentials is enabled, can access a Fleet Freedom service, and has a valid operating dates. |
isBetween( | boolean | Returns true when the current date/time is after the notBefore value (or it is null) and before the notAfter value (or it is null). |
isMatch( | boolean | Checks the given SearchPattern for a match to these API credentials. Used internally by Company#findMachines. |
isRestricted( | boolean | Returns true when the machine has been restricted by secret, HTTP header, or IP range. |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.PermissionEscalation(/** number */ company, /** PermissionType */ kind, /** EscalationType */ direction, /** PermissionLevel */ levelAfter, /** Array.<string> */ labelsAfter, /** PermissionLevel */ levelBefore, /** Array.<string> */ labelsBefore);
Property | Type | Description |
---|---|---|
after | EscalationState | Effective permission after the proposed change. |
before | EscalationState | Effective permission before the proposed change. |
company | number | The Company which employs to which this escalation applies. |
direction | EscalationType | Gets the direction of the escalation. |
kind | PermissionType | The type of permission. |
var object = /** Company */ companyInstance.getSessions,();
Property | Type | Description |
---|---|---|
active | boolean | True when an active WebSocket connection exists. |
company | Company | The Company which employs the User for this Session. |
created | Date | The time-stamp from this session's first login. |
handle | string | A unique key to identify this Session. This is not the SessionID. |
ipAddress | string | Client's IP address. |
lastActivity | Date | The time-stamp of the last command executed by this session. |
lastCommand | string | The last socket command or RESTful route invoked by the session. |
sockets | number | The number of active WebSocket connections in use by this session. |
user | User | The User associated with this Session. |
userAgent | string | The client software identification string. |
var object = /** Company */ companyInstance.createUser(/** trakit.json.UserGeneral | trakit.json.UserAdvanced */ json);
Property | Type | Description |
---|---|---|
company | Company | The Company which employs the User for this Session |
contact | Contact | The full Contact details of this User. |
contactId | number | The ID of the contact with the full details for this User. |
enabled | boolean | Ability to disable this User. Affects ability to login and notifications. |
formatDate | string | |
formats | Dictionary.<string, string> | The format strings defining the preferred way to display ambiguous values. |
formatTime | string | |
groupIds | Array.<number> | |
groups | Array.<UserGroup> | Groups of which this User is a member |
language | string | User's preferred region and language |
login | string | The unique username used to login |
measureDistance | UserMeasurementPreference | Preferred method of displaying distances and speed. (Deprecated; use User#measurements["distance"] instead) |
measurements | Dictionary.<string, UserMeasurementPreference> | Preferred way of displaying ambiguous numbers in the context of measurements. |
measureVolume | UserMeasurementPreference | Preferred method of displaying volumes. (Deprecated; use User#measurements["volume"] instead) |
nickname | string | Friendly search-able name for this user. |
notifications | Array.<UserNotifications> | Notification schedule preferences. |
notify | UserNotifications | First notification schedule preferences (Deprecated; use User#notifications[0] instead). |
options | Dictionary.<string, string> | Additional options which do not fit in with the formats or measurements preferences. |
passwordExpired | boolean | Flags if the user needs to change their password on the next login. |
permissions | Array.<UserPermission> | Individual permissions assigned to this User |
timezone | string | User's native Timezone |
version | Array.<number> | The version flag used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | User | Updates parameters for this User from the given JSON literal |
getName( | string | Get's the best choice for display name. |
getPictures( | Array.<Picture> | Gets an Array of Pictures for this User. |
getSessions( | Array.<Session> | Gets an Array of Sessions which this User has created. |
getUserGroups( | Array.<UserGroup> | Gets an Array of UserGroups to which this User belongs. |
isMatch( | boolean | |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = /** Company */ companyInstance.createUserGroup(/** trakit.json.UserGroup */ json);
Property | Type | Description |
---|---|---|
id | number | Unique identifier. |
name | string | Easily identifiable name for this group of permissions. |
notes | string | Detailed notes about which type of Users should be granted access to this group. |
permissions | Array.<UserPermission> | Permissions assigned to Users in this group. |
version | Array.<number> | The version flags used to ensure sync operations are done in order. |
Method | Returns | Description |
---|---|---|
debug( | boolean | |
dispose( | Unbinds all event handlers and prepares the object for disposal by the garbage collector | |
fire( | MVCEvent | |
fromJSON( | UserGroup | Updates parameters for this UserGroup from the given JSON literal |
getUsers( | Array.<User> | Returns a list of Users that belong to this group. |
isMatch( | boolean | Checks the given SearchPattern for a match to this group. Used internally by Company#findUserGroups. |
off( | boolean | Removes an event handler |
on( | boolean | Adds an event handler |
once( | boolean | Adds an event handler that fires once, then unbinds itself |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
trace( | boolean | |
uses( | boolean | Checks to see if the given type/handler is bound for this object |
var object = new trakit.fleetfreedom.UserNotifications(/** string */ name, /** boolean */ enabled, /** Array.<boolean> */ weekdays, /** string */ start, /** string */ end, /** string */ email, /** number */ sms, /** Array.<UserNotificationsMethod> */ online, /** Array.<UserNotificationsMethod> */ offline);
Property | Type | Description |
---|---|---|
string | ||
enabled | boolean | Flags whether this schedule is in use. |
end | TimeSpan | Time-stamp to denote when notifications should no longer be sent. |
name | string | Nickname for this schedule |
offline | Array.<UserNotificationsMethod> | The types of notifications to send while this User's session is inactive. |
online | Array.<UserNotificationsMethod> | The types of notifications to send while this User's session has an active WebSocket connection. |
sms | number | |
start | TimeSpan | Starting time-stamp for when notifications should be sent. |
weekdays | Array.<boolean> | A seven item, boolean array identifying the days of the weeks for which notifications should be sent. |
Method | Returns | Description |
---|---|---|
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
var object = new trakit.fleetfreedom.UserPermission(/** number */ company, /** PermissionMethod */ method, /** PermissionType */ kind, /** PermissionLevel */ level, /** Array.<string> */ labels);
Property | Type | Description |
---|---|---|
company | number | The unique identifier of the company for which this permission applies. |
kind | PermissionType | The kind of permission assigned. Please see the permissions documentation. |
labels | Array.<string> | The Company#labels names used to apply this permission. So far, this only applies to assetGeneral, assetAdvanced, and placeGeneral. |
level | PermissionLevel | The amount of access granted or revoked. |
method | PermissionMethod | Whether the permission is given or taken away. |
Method | Returns | Description |
---|---|---|
equals( | boolean | Compares this UserPermission to another to see if they are equivalent. |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
Value | Description |
---|---|
horizontal | Increase in access to an object. |
vertical | Increase in privileges. |
Value | Description |
---|---|
full | Read, update, and create/delete. |
read | Read-only access. |
update | Read and update access; does not allow for create or delete. |
Value | Description |
---|---|
grant | Give access |
revoke | Take access away |
Value | Description |
---|---|
assetAdvanced | Assets' advanced properties such as position, attributes, and status tags. |
assetDispatch | Asset's dispatchJobs, turn by turn directions, and required route. |
assetGeneral | Assets' general properties such as name, icon, and labels. |
assetMessage | Messages from assets and Alerts to the session user. |
behaviour | Configured behaviours. |
behaviourLog | View and clear the log of debug messages for a behaviour or script. |
behaviourScript | Behaviour script logic. |
billingDiscount | Discount rule for assets. |
billingHosting | Billing rule for assets. |
billingLicense | Hardware License for providers. |
billingProfile | Profile used to generate billable orders for a customer. |
billingReport | Generated bill for a customer. |
companyCreate | Access to add a new child company. |
companyGeneral | Basic information about the company. This permissions is required to have access to other aspects of the company. |
companyLabels | Company's label and tag styles. |
companyPolicies | Company's SessionPolicy and PasswordPolicy. |
companyReseller | Reseller and white-labeler specific settings. |
contact | Contact information. |
dispatchJob | Some work that needs to be completed by an Asset. Like a multi-step DispatchTask. |
dispatchTask | Assets' tasks information. |
dispatchTemplate | Pre-set routes, lists of DispatchJobs, and driving directions. |
document | Hosted document information. |
formResult | Filled out forms. |
formTemplate | Custom forms to be filled. |
hosCarrier | Hours of Service Carriers. |
hosEvent | Driver's E-log event records. |
hosInspection | Driver vehicle inspection reports. |
icon | Icon information. |
machine | Service Account information and permissions. |
maintenanceJob | Historical vehicle and trailer maintenance work. |
maintenanceSchedule | Recurring maintenance work for vehicles and trailers. |
picture | Picture information. |
placeGeneral | Place information. |
providerAdvanced | Raw provider (device) data like GPS coordinates and parsed ODB-II values. |
providerConfigType | Allows read-only access to the logic types for provider configuration. |
providerConfiguration | Provider (device) configurations. |
providerGeneral | Provider (device) information like name, notes, and selected asset. |
providerScript | Allows access to Provider (device) logic scripts. |
reportResult | Historical asset details like breadcrumb trails. |
reportSchedule | Schedules used to automatically create report results overnight. |
reportTemplate | Report configurations. |
session | Access to retrieve a list of active sessions and kill sessions. |
userAdvanced | User information such as permissions and group membership. |
userGeneral | General user information such as name, contact information, and preferences. |
userGroup | Group information for easy access control. |
Value | Description |
---|---|
british | Use British Standard always. |
metric | Use metric always. |
native | Show the measurements in the local format. |
standard | Use US Standard always. |
Value | Description |
---|---|
Send an Email | |
popup | Show a pop-up message in the Fleet Freedom UI |
sms | Send an SMS message |
var object = new trakit.fleetfreedom.ColourStyle(/** string */ fill, /** string */ stroke);
Property | Type | Description |
---|---|---|
fill | string | Hex colour value for fills and backgrounds. |
stroke | string | Hex colour value for text and outlines. |
Method | Returns | Description |
---|---|---|
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
var object = /** Company */ companyInstance.fromJSON(/** trakit.json.Company | trakit.json.CompanyGeneral | trakit.json.CompanyStyles | trakit.json.CompanyPolicies | trakit.json.CompanyReseller */ json, /** boolean */ silent);
Property | Type | Description |
---|---|---|
company | Company | The Company that is the reseller. |
contactInfo | Dictionary.<string, number> | A list of Contacts for company specific things like Technical Support, Billing, etc... |
domain | string | The domain to the instance of v4. It does not contain the protocol because all instances are required to be HTTPS. |
favourite | string | The name of the image uploaded as the icon (for bookmarks). |
gamut | Dictionary.<string, ColourStyle> | Colours used as templates for status tags, labels, and places. |
graphics | Dictionary.<string, string> | A list of symbol names and their corresponding FontAwesome icon names. |
icon | string | The name of the image uploaded as the logo (for mobile). |
languages | Array.<string> | A list of supported languages for your customers. |
logo | string | The name of the image uploaded as the logo. |
notifyEmail | NotificationServerEmail | The server used for notification and conversational email messages sent and received by the system. |
notifySms | NotificationServerSms | Definition for load-balanced outbound SMS numbers for the reseller. |
recoverBody | string | The body of the email sent to a user requesting a password reset. |
recoverIsHtml | string | When true, sends the password reset email as an HTML email instead of plain text. |
recoverSubject | string | The subject of the email sent to a user requesting a password reset. |
serviceName | string | The name of the branded service being provided to the seller's customers. |
termsPreamble | string | A preamble to the general terms and conditions offered by Fleet Freedom. |
termsUpdated | Date | The date and time when the terms were updated. This will promt users who are logging-in to re-agree to the new terms |
version | Array.<number> | The version flag used to ensure sync operations are done in order. |
website | Dictionary.<string, string> | Themed colours used in the web-based UI. |
Method | Returns | Description |
---|---|---|
fromJSON( | CompanyReseller | Updates parameters for this CompanyReseller from the given JSON literal |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
var object = /** CompanyReseller */ companyresellerInstance.fromJSON(/** trakit.json.CompanyReseller */ json);
Property | Type | Description |
---|---|---|
incomingAddress | string | The domain or IP address of the incoming email server. |
incomingLogin | string | The username used to login to the incoming email server. |
incomingMessageNumber | number | IMAP message sequence number so only recent messages are retrieved. |
incomingPort | number | The port number of the incoming email server. |
incomingSecure | boolean | Is the incoming email server using a secure SSL/TLS connection (it should). |
incomingType | IncomingEmailServerType | The type of incoming protocol to use (IMAP or POP3). |
outgoingAddress | string | The domain or IP address of the outgoing email server. |
outgoingLogin | string | The username used to login to the outgoing email server. |
outgoingPort | number | The port number of the outgoing email server. |
outgoingReplyTo | string | An optional field which can be set as the "sent from" and/or "reply-to" address. |
outgoingSecure | boolean | Is the outgoing email server using a secure SSL/TLS connection (it should). |
outgoingType | OutgoingEmailServerType | The type of outgoing protocol to use (only SMTP). |
reseller | CompanyReseller | The CompanyReseller to which this object belongs |
Method | Returns | Description |
---|---|---|
fromJSON( | NotificationServerEmail | Updates parameters for this NotificationServerEmail from the given JSON literal |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
var object = /** CompanyReseller */ companyresellerInstance.fromJSON(/** trakit.json.CompanyReseller */ json);
Property | Type | Description |
---|---|---|
notifyLimit | CompanyReseller | A per-number/per-day limit on the amount of Notifications sent. |
phoneNumbers | Dictionary.<string, Array> | All phone numbers listed by the country (using two-digit ISO 3166-1 alpha-2 country codes) they each serve. |
reseller | CompanyReseller | The CompanyReseller to which this object belongs |
Method | Returns | Description |
---|---|---|
fromJSON( | NotificationServerSms | Updates parameters for this NotificationServerSms from the given JSON literal |
toJSON( | Object | Creates a literal of this object. Used internally by JSON.stringify. |
Value | Description |
---|---|
IMAP | Internet Message Access Protocol (default) |
POP3 | Post Office Protocol v3 |
Value | Description |
---|---|
SMTP | Simple Mail Transfer Protocol |