fareye-service-time-predictor
v0.1.48
Published
Fareye SDK to identify the service Time
Maintainers
Readme
fareye-service-time-predictor
This npm package is used for calculating service time for each transaction.
Installation
npm install fareye-service-time-predictorPeer Dependencies
npm install "react-native-background-geolocation"For more information: https://www.npmjs.com/package/react-native-background-geolocation
npm install "react-native-sqlite-storage"For more information: https://www.npmjs.com/package/react-native-sqlite-storage
Usage
There are three main methods to use this SDK:
1.init- This method is used to iniatalize the SDK
import { Tracking } from "fareye-service-time-predictor";
Tracking.init()destroy- This method is to stop the SDK completley
import { Tracking } from "fareye-service-time-predictor";
Tracking.destroy()getServiceTime- This method will help you to calculate the service time
import { Tracking } from "fareye-service-time-predictor";
const inputData = {
id: 111,
uuid: "UX26892",
type: "Delivery",
extraData: "",
target: "Fareye",
latitude: 2.4,
longitude: 3.33,
addressLine1: "lane 29, Block a",
addressLine2: "bingo street, karnataka",
zipCode: "132001",
groupId: "X100",
weight: 25,
length: 32,
width: 100,
height: 250
}
Tracking.getServiceTime(inputData)Props
| Prop | Type | required | Remarks | Note
|---|---|---|---|---|
| id | long | yes | Unique identifier for a job. |
| UUID | string | yes | Unique identifier for a user. |
| type | string | no | "delivery" or "pickup" | send this data for better acuracy
| latitude | double | yes | Job latitude |
| longitude | double | yes | Job longitude |
| addressLine1 | string | no | Job address line 1 | send this data for better acuracy
| addressLine2 | string | no | Job address line 2 | send this data for better acuracy
| extraData | string | no | Any extra data that needs to be shared |
| zipCode | string | yes | Unique identifier for a job |
| groupId | string | no | Identifier for jobs completed in bulk |
| weight | long | no | Weight of the parcel | send this data for better acuracy
| length | long | no | Length of the parcel | send this data for better acuracy
| width | long | no | Width of the parcel | send this data for better acuracy
| height | long | no | Height of the parcel | send this data for better acuracy
API
getServiceTime - Call this function for calculating service time
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
