@nerdjs/sales-kit 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities/accessorial/accessorial.d.ts +12 -0
- package/dist/entities/accessorial/accessorial.js +41 -0
- package/dist/entities/accessorial/accessorial.js.map +1 -0
- package/dist/entities/accessorial/helper.d.ts +5 -0
- package/dist/entities/accessorial/helper.js +16 -0
- package/dist/entities/accessorial/helper.js.map +1 -0
- package/dist/entities/accessorial/index.d.ts +2 -0
- package/dist/entities/accessorial/index.js +3 -0
- package/dist/entities/accessorial/index.js.map +1 -0
- package/dist/entities/accessorials/accessorials.d.ts +7 -0
- package/dist/entities/accessorials/accessorials.js +29 -0
- package/dist/entities/accessorials/accessorials.js.map +1 -0
- package/dist/entities/accessorials/helper.d.ts +5 -0
- package/dist/entities/accessorials/helper.js +16 -0
- package/dist/entities/accessorials/helper.js.map +1 -0
- package/dist/entities/accessorials/index.d.ts +2 -0
- package/dist/entities/accessorials/index.js +3 -0
- package/dist/entities/accessorials/index.js.map +1 -0
- package/dist/{cjs/entities → entities}/customer/customer.d.ts +16 -16
- package/dist/entities/customer/customer.js +63 -0
- package/dist/entities/customer/customer.js.map +1 -0
- package/dist/{cjs/entities → entities}/customer/helper.d.ts +5 -5
- package/dist/entities/customer/helper.js +16 -0
- package/dist/entities/customer/helper.js.map +1 -0
- package/dist/{cjs/entities → entities}/customer/index.d.ts +1 -1
- package/dist/entities/customer/index.js +2 -0
- package/dist/entities/customer/index.js.map +1 -0
- package/dist/entities/holiday/helper.d.ts +5 -0
- package/dist/entities/holiday/helper.js +16 -0
- package/dist/entities/holiday/helper.js.map +1 -0
- package/dist/entities/holiday/holiday.d.ts +7 -0
- package/dist/entities/holiday/holiday.js +31 -0
- package/dist/entities/holiday/holiday.js.map +1 -0
- package/dist/entities/holiday/index.d.ts +2 -0
- package/dist/entities/holiday/index.js +3 -0
- package/dist/entities/holiday/index.js.map +1 -0
- package/dist/entities/index.d.ts +12 -0
- package/dist/entities/index.js +13 -0
- package/dist/entities/index.js.map +1 -0
- package/dist/entities/load/helper.d.ts +6 -0
- package/dist/entities/load/helper.js +28 -0
- package/dist/entities/load/helper.js.map +1 -0
- package/dist/entities/load/index.d.ts +2 -0
- package/dist/entities/load/index.js +3 -0
- package/dist/entities/load/index.js.map +1 -0
- package/dist/entities/load/load.d.ts +102 -0
- package/dist/entities/load/load.js +224 -0
- package/dist/entities/load/load.js.map +1 -0
- package/dist/entities/loadAdjustment/helper.d.ts +5 -0
- package/dist/entities/loadAdjustment/helper.js +16 -0
- package/dist/entities/loadAdjustment/helper.js.map +1 -0
- package/dist/entities/loadAdjustment/index.d.ts +2 -0
- package/dist/entities/loadAdjustment/index.js +3 -0
- package/dist/entities/loadAdjustment/index.js.map +1 -0
- package/dist/entities/loadAdjustment/loadAdjustment.d.ts +15 -0
- package/dist/entities/loadAdjustment/loadAdjustment.js +48 -0
- package/dist/entities/loadAdjustment/loadAdjustment.js.map +1 -0
- package/dist/{cjs/entities → entities}/location/helper.d.ts +5 -5
- package/dist/entities/location/helper.js +16 -0
- package/dist/entities/location/helper.js.map +1 -0
- package/dist/{cjs/entities → entities}/location/index.d.ts +2 -2
- package/dist/entities/location/index.js +3 -0
- package/dist/entities/location/index.js.map +1 -0
- package/dist/{cjs/entities → entities}/location/location.d.ts +33 -32
- package/dist/entities/location/location.js +47 -0
- package/dist/entities/location/location.js.map +1 -0
- package/dist/{cjs/entities → entities}/marketCosts/helper.d.ts +5 -5
- package/dist/entities/marketCosts/helper.js +16 -0
- package/dist/entities/marketCosts/helper.js.map +1 -0
- package/dist/{cjs/entities → entities}/marketCosts/index.d.ts +2 -2
- package/dist/entities/marketCosts/index.js +3 -0
- package/dist/entities/marketCosts/index.js.map +1 -0
- package/dist/{cjs/entities → entities}/marketCosts/marketCosts.d.ts +22 -22
- package/dist/entities/marketCosts/marketCosts.js +60 -0
- package/dist/entities/marketCosts/marketCosts.js.map +1 -0
- package/dist/{cjs/entities → entities}/quote/helper.d.ts +5 -5
- package/dist/entities/quote/helper.js +16 -0
- package/dist/entities/quote/helper.js.map +1 -0
- package/dist/{cjs/entities → entities}/quote/index.d.ts +2 -2
- package/dist/entities/quote/index.js +3 -0
- package/dist/entities/quote/index.js.map +1 -0
- package/dist/entities/quote/quote.d.ts +76 -0
- package/dist/entities/quote/quote.js +46 -0
- package/dist/entities/quote/quote.js.map +1 -0
- package/dist/entities/quoteAccessorial/helper.d.ts +5 -0
- package/dist/entities/quoteAccessorial/helper.js +16 -0
- package/dist/entities/quoteAccessorial/helper.js.map +1 -0
- package/dist/entities/quoteAccessorial/index.d.ts +2 -0
- package/dist/entities/quoteAccessorial/index.js +3 -0
- package/dist/entities/quoteAccessorial/index.js.map +1 -0
- package/dist/entities/quoteAccessorial/quoteAccessorial.d.ts +29 -0
- package/dist/entities/quoteAccessorial/quoteAccessorial.js +77 -0
- package/dist/entities/quoteAccessorial/quoteAccessorial.js.map +1 -0
- package/dist/entities/quoteResponse/helper.d.ts +5 -0
- package/dist/entities/quoteResponse/helper.js +16 -0
- package/dist/entities/quoteResponse/helper.js.map +1 -0
- package/dist/entities/quoteResponse/index.d.ts +2 -0
- package/dist/entities/quoteResponse/index.js +3 -0
- package/dist/entities/quoteResponse/index.js.map +1 -0
- package/dist/entities/quoteResponse/quoteResponse.d.ts +72 -0
- package/dist/entities/quoteResponse/quoteResponse.js +67 -0
- package/dist/entities/quoteResponse/quoteResponse.js.map +1 -0
- package/dist/entities/shipcon/helper.d.ts +6 -0
- package/dist/entities/shipcon/helper.js +20 -0
- package/dist/entities/shipcon/helper.js.map +1 -0
- package/dist/entities/shipcon/index.d.ts +2 -0
- package/dist/entities/shipcon/index.js +3 -0
- package/dist/entities/shipcon/index.js.map +1 -0
- package/dist/entities/shipcon/shipcon.d.ts +27 -0
- package/dist/entities/shipcon/shipcon.js +74 -0
- package/dist/entities/shipcon/shipcon.js.map +1 -0
- package/dist/helpers.d.ts +18 -0
- package/dist/helpers.js +29 -0
- package/dist/helpers.js.map +1 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +3 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/locationsForm/index.d.ts +1 -0
- package/dist/hooks/locationsForm/index.js +2 -0
- package/dist/hooks/locationsForm/index.js.map +1 -0
- package/dist/hooks/locationsForm/locationsForm.d.ts +2 -0
- package/dist/hooks/locationsForm/locationsForm.js +35 -0
- package/dist/hooks/locationsForm/locationsForm.js.map +1 -0
- package/dist/hooks/quote/constants.d.ts +187 -0
- package/dist/hooks/quote/constants.js +137 -0
- package/dist/hooks/quote/constants.js.map +1 -0
- package/dist/hooks/quote/form.d.ts +7 -0
- package/dist/hooks/quote/form.js +203 -0
- package/dist/hooks/quote/form.js.map +1 -0
- package/dist/hooks/quote/helpers.d.ts +39 -0
- package/dist/hooks/quote/helpers.js +366 -0
- package/dist/hooks/quote/helpers.js.map +1 -0
- package/dist/hooks/quote/index.d.ts +5 -0
- package/dist/hooks/quote/index.js +6 -0
- package/dist/hooks/quote/index.js.map +1 -0
- package/dist/hooks/quote/result.d.ts +7 -0
- package/dist/hooks/quote/result.js +196 -0
- package/dist/hooks/quote/result.js.map +1 -0
- package/dist/hooks/quote/template.d.ts +7 -0
- package/dist/hooks/quote/template.js +113 -0
- package/dist/hooks/quote/template.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/redux/appState.d.ts +4 -0
- package/dist/redux/appState.js +2 -0
- package/dist/redux/appState.js.map +1 -0
- package/dist/redux/customer/customerActions.d.ts +97 -0
- package/dist/redux/customer/customerActions.js +210 -0
- package/dist/redux/customer/customerActions.js.map +1 -0
- package/dist/redux/customer/customerReducer.d.ts +2 -0
- package/dist/redux/customer/customerReducer.js +42 -0
- package/dist/redux/customer/customerReducer.js.map +1 -0
- package/dist/redux/customer/customerSelector.d.ts +27 -0
- package/dist/redux/customer/customerSelector.js +38 -0
- package/dist/redux/customer/customerSelector.js.map +1 -0
- package/dist/redux/customer/customerState.d.ts +11 -0
- package/dist/redux/customer/customerState.js +2 -0
- package/dist/redux/customer/customerState.js.map +1 -0
- package/dist/redux/customer/index.d.ts +4 -0
- package/dist/redux/customer/index.js +5 -0
- package/dist/redux/customer/index.js.map +1 -0
- package/dist/redux/index.d.ts +8 -0
- package/dist/redux/index.js +9 -0
- package/dist/redux/index.js.map +1 -0
- package/dist/redux/load/index.d.ts +4 -0
- package/dist/redux/load/index.js +5 -0
- package/dist/redux/load/index.js.map +1 -0
- package/dist/redux/load/loadActions.d.ts +80 -0
- package/dist/redux/load/loadActions.js +172 -0
- package/dist/redux/load/loadActions.js.map +1 -0
- package/dist/redux/load/loadReducer.d.ts +2 -0
- package/dist/redux/load/loadReducer.js +35 -0
- package/dist/redux/load/loadReducer.js.map +1 -0
- package/dist/redux/load/loadSelector.d.ts +27 -0
- package/dist/redux/load/loadSelector.js +19 -0
- package/dist/redux/load/loadSelector.js.map +1 -0
- package/dist/redux/load/loadState.d.ts +8 -0
- package/dist/redux/load/loadState.js +2 -0
- package/dist/redux/load/loadState.js.map +1 -0
- package/dist/redux/loadAdjustment/index.d.ts +4 -0
- package/dist/redux/loadAdjustment/index.js +5 -0
- package/dist/redux/loadAdjustment/index.js.map +1 -0
- package/dist/redux/loadAdjustment/loadAdjustmentActions.d.ts +80 -0
- package/dist/redux/loadAdjustment/loadAdjustmentActions.js +172 -0
- package/dist/redux/loadAdjustment/loadAdjustmentActions.js.map +1 -0
- package/dist/redux/loadAdjustment/loadAdjustmentReducer.d.ts +2 -0
- package/dist/redux/loadAdjustment/loadAdjustmentReducer.js +35 -0
- package/dist/redux/loadAdjustment/loadAdjustmentReducer.js.map +1 -0
- package/dist/redux/loadAdjustment/loadAdjustmentSelector.d.ts +15 -0
- package/dist/redux/loadAdjustment/loadAdjustmentSelector.js +12 -0
- package/dist/redux/loadAdjustment/loadAdjustmentSelector.js.map +1 -0
- package/dist/redux/loadAdjustment/loadAdjustmentState.d.ts +8 -0
- package/dist/redux/loadAdjustment/loadAdjustmentState.js +2 -0
- package/dist/redux/loadAdjustment/loadAdjustmentState.js.map +1 -0
- package/dist/redux/location/index.d.ts +4 -0
- package/dist/redux/location/index.js +5 -0
- package/dist/redux/location/index.js.map +1 -0
- package/dist/redux/location/locationActions.d.ts +101 -0
- package/dist/redux/location/locationActions.js +218 -0
- package/dist/redux/location/locationActions.js.map +1 -0
- package/dist/redux/location/locationReducer.d.ts +2 -0
- package/dist/redux/location/locationReducer.js +54 -0
- package/dist/redux/location/locationReducer.js.map +1 -0
- package/dist/redux/location/locationSelector.d.ts +53 -0
- package/dist/redux/location/locationSelector.js +32 -0
- package/dist/redux/location/locationSelector.js.map +1 -0
- package/dist/redux/location/locationState.d.ts +15 -0
- package/dist/redux/location/locationState.js +2 -0
- package/dist/redux/location/locationState.js.map +1 -0
- package/dist/{cjs/redux → redux}/quote/index.d.ts +5 -4
- package/dist/redux/quote/index.js +6 -0
- package/dist/redux/quote/index.js.map +1 -0
- package/dist/redux/quote/quoteAction.d.ts +177 -0
- package/dist/redux/quote/quoteAction.js +351 -0
- package/dist/redux/quote/quoteAction.js.map +1 -0
- package/dist/redux/quote/quoteMiddleware.d.ts +2 -0
- package/dist/redux/quote/quoteMiddleware.js +31 -0
- package/dist/redux/quote/quoteMiddleware.js.map +1 -0
- package/dist/redux/quote/quoteReducer.d.ts +27 -0
- package/dist/redux/quote/quoteReducer.js +207 -0
- package/dist/redux/quote/quoteReducer.js.map +1 -0
- package/dist/redux/quote/quoteSelector.d.ts +199 -0
- package/dist/redux/quote/quoteSelector.js +141 -0
- package/dist/redux/quote/quoteSelector.js.map +1 -0
- package/dist/redux/quote/quoteState.d.ts +9 -0
- package/dist/redux/quote/quoteState.js +2 -0
- package/dist/redux/quote/quoteState.js.map +1 -0
- package/dist/redux/quoteAccessorial/index.d.ts +3 -0
- package/dist/redux/quoteAccessorial/index.js +4 -0
- package/dist/redux/quoteAccessorial/index.js.map +1 -0
- package/dist/redux/quoteAccessorial/quoteAccessorialActions.d.ts +70 -0
- package/dist/redux/quoteAccessorial/quoteAccessorialActions.js +149 -0
- package/dist/redux/quoteAccessorial/quoteAccessorialActions.js.map +1 -0
- package/dist/redux/quoteAccessorial/quoteAccessorialReducer.d.ts +2 -0
- package/dist/redux/quoteAccessorial/quoteAccessorialReducer.js +29 -0
- package/dist/redux/quoteAccessorial/quoteAccessorialReducer.js.map +1 -0
- package/dist/redux/quoteAccessorial/quoteAccessorialState.d.ts +8 -0
- package/dist/redux/quoteAccessorial/quoteAccessorialState.js +2 -0
- package/dist/redux/quoteAccessorial/quoteAccessorialState.js.map +1 -0
- package/dist/redux/salesKitReducer.d.ts +25 -0
- package/dist/redux/salesKitReducer.js +18 -0
- package/dist/redux/salesKitReducer.js.map +1 -0
- package/dist/redux/shipcon/index.d.ts +4 -0
- package/dist/redux/shipcon/index.js +5 -0
- package/dist/redux/shipcon/index.js.map +1 -0
- package/dist/redux/shipcon/shipconActions.d.ts +80 -0
- package/dist/redux/shipcon/shipconActions.js +172 -0
- package/dist/redux/shipcon/shipconActions.js.map +1 -0
- package/dist/redux/shipcon/shipconReducer.d.ts +2 -0
- package/dist/redux/shipcon/shipconReducer.js +35 -0
- package/dist/redux/shipcon/shipconReducer.js.map +1 -0
- package/dist/redux/shipcon/shipconSelector.d.ts +22 -0
- package/dist/redux/shipcon/shipconSelector.js +19 -0
- package/dist/redux/shipcon/shipconSelector.js.map +1 -0
- package/dist/redux/shipcon/shipconState.d.ts +8 -0
- package/dist/redux/shipcon/shipconState.js +2 -0
- package/dist/redux/shipcon/shipconState.js.map +1 -0
- package/package.json +40 -71
- package/dist/cjs/components/calendar/calendar.d.ts +0 -5
- package/dist/cjs/components/calendar/day/day.d.ts +0 -8
- package/dist/cjs/components/calendar/day/index.d.ts +0 -1
- package/dist/cjs/components/calendar/day/typings.d.ts +0 -16
- package/dist/cjs/components/calendar/index.d.ts +0 -2
- package/dist/cjs/components/calendar/typings.d.ts +0 -27
- package/dist/cjs/components/customerFinder/customerFinder.d.ts +0 -11
- package/dist/cjs/components/customerFinder/index.d.ts +0 -2
- package/dist/cjs/components/customerFinder/optionTemplate.d.ts +0 -6
- package/dist/cjs/components/index.d.ts +0 -4
- package/dist/cjs/components/locationFinder/editLocation.d.ts +0 -15
- package/dist/cjs/components/locationFinder/index.d.ts +0 -1
- package/dist/cjs/components/locationFinder/locationByAddress.d.ts +0 -18
- package/dist/cjs/components/locationFinder/locationFinder.d.ts +0 -7
- package/dist/cjs/components/locationFinder/locationsFound.d.ts +0 -12
- package/dist/cjs/components/locationFinder/newLocationForm.d.ts +0 -20
- package/dist/cjs/components/locationFinder/optionTemplate.d.ts +0 -8
- package/dist/cjs/components/locationFinder/typings.d.ts +0 -23
- package/dist/cjs/components/salesQuote/components/aboutQuote/aboutQuote.d.ts +0 -5
- package/dist/cjs/components/salesQuote/components/aboutQuote/commodityDescription.d.ts +0 -16
- package/dist/cjs/components/salesQuote/components/aboutQuote/index.d.ts +0 -2
- package/dist/cjs/components/salesQuote/components/aboutQuote/quoteCheck.d.ts +0 -6
- package/dist/cjs/components/salesQuote/components/pallet/editPallet.d.ts +0 -11
- package/dist/cjs/components/salesQuote/components/pallet/palletChecker.d.ts +0 -15
- package/dist/cjs/components/salesQuote/components/pallet/palletCount.d.ts +0 -13
- package/dist/cjs/components/salesQuote/components/quoteCalendar/quoteCalendar.d.ts +0 -24
- package/dist/cjs/components/salesQuote/components/quoteResultAccordion/costBreakdown.d.ts +0 -14
- package/dist/cjs/components/salesQuote/components/quoteResultAccordion/marketCosts.d.ts +0 -7
- package/dist/cjs/components/salesQuote/components/quoteResultAccordion/quoteResultAccessorials.d.ts +0 -13
- package/dist/cjs/components/salesQuote/components/quoteResultAccordion/quoteResultAccordion.d.ts +0 -17
- package/dist/cjs/components/salesQuote/components/quoteSelect.d.ts +0 -4
- package/dist/cjs/components/salesQuote/components/quoteSummary/quoteSummary.d.ts +0 -4
- package/dist/cjs/components/salesQuote/components/quoteSummary/quoteSummaryBody.d.ts +0 -12
- package/dist/cjs/components/salesQuote/components/quoteSummary/quoteSummaryHeader.d.ts +0 -10
- package/dist/cjs/components/salesQuote/components/quoteSummary/typings.d.ts +0 -47
- package/dist/cjs/components/salesQuote/index.d.ts +0 -4
- package/dist/cjs/components/salesQuote/salesQuote.d.ts +0 -17
- package/dist/cjs/components/salesQuote/typings.d.ts +0 -156
- package/dist/cjs/components/shared/bootstrapDialogTitle/bootstrapDialogTitle.d.ts +0 -11
- package/dist/cjs/components/shared/bootstrapDialogTitle/index.d.ts +0 -1
- package/dist/cjs/components/shared/index.d.ts +0 -2
- package/dist/cjs/components/shared/loading/index.d.ts +0 -1
- package/dist/cjs/components/shared/loading/loading.d.ts +0 -6
- package/dist/cjs/components/stop/index.d.ts +0 -2
- package/dist/cjs/components/stop/menuAccessorials.d.ts +0 -27
- package/dist/cjs/components/stop/stop.d.ts +0 -4
- package/dist/cjs/components/stop/stopDetail.d.ts +0 -5
- package/dist/cjs/components/stop/stopDetailHeader.d.ts +0 -6
- package/dist/cjs/entities/index.d.ts +0 -4
- package/dist/cjs/entities/quote/quote.d.ts +0 -80
- package/dist/cjs/index.d.ts +0 -4
- package/dist/cjs/index.js +0 -3170
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/redux/calendar/calendarSlice.d.ts +0 -12
- package/dist/cjs/redux/calendar/index.d.ts +0 -1
- package/dist/cjs/redux/index.d.ts +0 -3
- package/dist/cjs/redux/nerdSalesKitReducer.d.ts +0 -10
- package/dist/cjs/redux/quote/quoteAction.d.ts +0 -125
- package/dist/cjs/redux/quote/quoteReducer.d.ts +0 -28
- package/dist/cjs/redux/quote/quoteSelector.d.ts +0 -22
- package/dist/cjs/redux/quote/quoteState.d.ts +0 -124
- package/dist/cjs/utils/constants.d.ts +0 -5
- package/dist/cjs/utils/helpers.d.ts +0 -17
- package/dist/cjs/utils/index.d.ts +0 -2
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Market Costs type guard.
|
|
3
|
+
*
|
|
4
|
+
* @param {any} marketCostsJSON Quote object from API
|
|
5
|
+
* @returns {boolean} Return true if type is MarketCosts_Entity
|
|
6
|
+
*/
|
|
7
|
+
function isMarketCosts_Entity(marketCostsJSON) {
|
|
8
|
+
if (typeof marketCostsJSON === "object" && marketCostsJSON != null) {
|
|
9
|
+
MarketCosts_Entity.requiredFields.forEach((element) => {
|
|
10
|
+
if (!Object.keys(marketCostsJSON).includes(element))
|
|
11
|
+
throw new Error(`Field ${element} is null or undefined`);
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
export default class MarketCosts_Entity {
|
|
17
|
+
static requiredFields = [
|
|
18
|
+
"id",
|
|
19
|
+
"total_cost",
|
|
20
|
+
"total_cost_with_margin",
|
|
21
|
+
"margin",
|
|
22
|
+
"otr_miles",
|
|
23
|
+
"fuel_cost",
|
|
24
|
+
"linehaul_cost",
|
|
25
|
+
"truckload_total_cost",
|
|
26
|
+
"ltl_pallet_percentage",
|
|
27
|
+
"stop_fees",
|
|
28
|
+
"market_data",
|
|
29
|
+
];
|
|
30
|
+
constructor(marketCostsJSON) {
|
|
31
|
+
if (isMarketCosts_Entity(marketCostsJSON)) {
|
|
32
|
+
this.id = marketCostsJSON.id;
|
|
33
|
+
this.total_cost = marketCostsJSON.total_cost;
|
|
34
|
+
this.total_cost_with_margin = marketCostsJSON.total_cost_with_margin;
|
|
35
|
+
this.margin = marketCostsJSON.margin;
|
|
36
|
+
this.otr_miles = marketCostsJSON.otr_miles;
|
|
37
|
+
this.fuel_cost = marketCostsJSON.fuel_cost;
|
|
38
|
+
this.linehaul_cost = marketCostsJSON.linehaul_cost;
|
|
39
|
+
this.truckload_total_cost = marketCostsJSON.truckload_total_cost;
|
|
40
|
+
this.ltl_pallet_percentage = marketCostsJSON.ltl_pallet_percentage;
|
|
41
|
+
this.stop_fees = marketCostsJSON.stop_fees;
|
|
42
|
+
this.market_data = marketCostsJSON.market_data;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
throw new Error(`Failed to create new instance of ${MarketCosts_Entity.name}`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
id;
|
|
49
|
+
total_cost;
|
|
50
|
+
total_cost_with_margin;
|
|
51
|
+
margin;
|
|
52
|
+
otr_miles;
|
|
53
|
+
fuel_cost;
|
|
54
|
+
linehaul_cost;
|
|
55
|
+
truckload_total_cost;
|
|
56
|
+
ltl_pallet_percentage;
|
|
57
|
+
stop_fees;
|
|
58
|
+
market_data;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=marketCosts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marketCosts.js","sourceRoot":"","sources":["../../../src/entities/marketCosts/marketCosts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,SAAS,oBAAoB,CAC3B,eAAwB;IAExB,IAAI,OAAO,eAAe,KAAK,QAAQ,IAAI,eAAe,IAAI,IAAI,EAAE;QAClE,kBAAkB,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YACpD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;gBACjD,MAAM,IAAI,KAAK,CAAC,SAAS,OAAO,uBAAuB,CAAC,CAAC;QAC7D,CAAC,CAAC,CAAC;KACJ;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,CAAC,OAAO,OAAO,kBAAkB;IACrC,MAAM,CAAC,cAAc,GAAG;QACtB,IAAI;QACJ,YAAY;QACZ,wBAAwB;QACxB,QAAQ;QACR,WAAW;QACX,WAAW;QACX,eAAe;QACf,sBAAsB;QACtB,uBAAuB;QACvB,WAAW;QACX,aAAa;KACd,CAAC;IAEF,YAAY,eAAwB;QAClC,IAAI,oBAAoB,CAAC,eAAe,CAAC,EAAE;YACzC,IAAI,CAAC,EAAE,GAAG,eAAe,CAAC,EAAE,CAAC;YAC7B,IAAI,CAAC,UAAU,GAAG,eAAe,CAAC,UAAU,CAAC;YAC7C,IAAI,CAAC,sBAAsB,GAAG,eAAe,CAAC,sBAAsB,CAAC;YACrE,IAAI,CAAC,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC;YACrC,IAAI,CAAC,SAAS,GAAG,eAAe,CAAC,SAAS,CAAC;YAC3C,IAAI,CAAC,SAAS,GAAG,eAAe,CAAC,SAAS,CAAC;YAC3C,IAAI,CAAC,aAAa,GAAG,eAAe,CAAC,aAAa,CAAC;YACnD,IAAI,CAAC,oBAAoB,GAAG,eAAe,CAAC,oBAAoB,CAAC;YACjE,IAAI,CAAC,qBAAqB,GAAG,eAAe,CAAC,qBAAqB,CAAC;YACnE,IAAI,CAAC,SAAS,GAAG,eAAe,CAAC,SAAS,CAAC;YAC3C,IAAI,CAAC,WAAW,GAAG,eAAe,CAAC,WAAW,CAAC;SAChD;aAAM;YACL,MAAM,IAAI,KAAK,CACb,oCAAoC,kBAAkB,CAAC,IAAI,EAAE,CAC9D,CAAC;SACH;IACH,CAAC;IAED,EAAE,CAAS;IACX,UAAU,CAAS;IACnB,sBAAsB,CAAS;IAC/B,MAAM,CAAS;IACf,SAAS,CAAS;IAClB,SAAS,CAAS;IAClB,aAAa,CAAS;IACtB,oBAAoB,CAAS;IAC7B,qBAAqB,CAAS;IAC9B,SAAS,CAAS;IAClB,WAAW,CAOT"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Quote_Entity from "./quote";
|
|
2
|
-
export default class QuoteRequest extends Quote_Entity {
|
|
3
|
-
static fromList(quoteJSON: unknown): Array<QuoteRequest>;
|
|
4
|
-
toJson(): string;
|
|
5
|
-
}
|
|
1
|
+
import Quote_Entity from "./quote";
|
|
2
|
+
export default class QuoteRequest extends Quote_Entity {
|
|
3
|
+
static fromList(quoteJSON: unknown): Array<QuoteRequest>;
|
|
4
|
+
toJson(): string;
|
|
5
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Quote_Entity from "./quote";
|
|
2
|
+
export default class QuoteRequest extends Quote_Entity {
|
|
3
|
+
static fromList(quoteJSON) {
|
|
4
|
+
const quotes = [];
|
|
5
|
+
if (quoteJSON)
|
|
6
|
+
Array.isArray(quoteJSON) &&
|
|
7
|
+
quoteJSON.forEach((quoteJSON) => {
|
|
8
|
+
quotes.push(new QuoteRequest(quoteJSON));
|
|
9
|
+
});
|
|
10
|
+
return quotes;
|
|
11
|
+
}
|
|
12
|
+
toJson() {
|
|
13
|
+
return JSON.stringify(this);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../src/entities/quote/helper.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,SAAS,CAAC;AAEnC,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,YAAY;IACpD,MAAM,CAAC,QAAQ,CAAC,SAAkB;QAChC,MAAM,MAAM,GAAmB,EAAE,CAAC;QAClC,IAAI,SAAS;YACX,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;gBACtB,SAAS,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;oBAC9B,MAAM,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC;gBAC3C,CAAC,CAAC,CAAC;QACP,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./quote";
|
|
2
|
-
export * from "./helper";
|
|
1
|
+
export * from "./quote";
|
|
2
|
+
export * from "./helper";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/quote/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export default class Quote_Entity {
|
|
2
|
+
static requiredFields: never[];
|
|
3
|
+
constructor(quoteJson: unknown);
|
|
4
|
+
service: string;
|
|
5
|
+
commodityDescriptionId: number;
|
|
6
|
+
freightClass: string;
|
|
7
|
+
mode: string;
|
|
8
|
+
dryVanOnly: boolean;
|
|
9
|
+
shippers: Stop_Entity[];
|
|
10
|
+
consignees: Stop_Entity[];
|
|
11
|
+
units: Unit_Entity;
|
|
12
|
+
reefer: Reefer_Entity;
|
|
13
|
+
customerId: number;
|
|
14
|
+
}
|
|
15
|
+
export type Stop_Entity = {
|
|
16
|
+
zip: string;
|
|
17
|
+
accessorialIds: number[];
|
|
18
|
+
date?: string;
|
|
19
|
+
locationId?: number;
|
|
20
|
+
key: number;
|
|
21
|
+
};
|
|
22
|
+
export type Reefer_Entity = {
|
|
23
|
+
reeferTemp?: string;
|
|
24
|
+
reeferCont?: boolean;
|
|
25
|
+
};
|
|
26
|
+
export type Unit_Entity = {
|
|
27
|
+
palletDimensions?: PalletDimensions_Entity[];
|
|
28
|
+
totalDimensions?: TotalDimension_Entity;
|
|
29
|
+
};
|
|
30
|
+
export type TotalDimension_Entity = {
|
|
31
|
+
totalWeight?: string;
|
|
32
|
+
};
|
|
33
|
+
export type PalletDimensions_Entity = {
|
|
34
|
+
units: string;
|
|
35
|
+
length: number;
|
|
36
|
+
width: number;
|
|
37
|
+
height: number;
|
|
38
|
+
count: number;
|
|
39
|
+
stackable: boolean;
|
|
40
|
+
key: number;
|
|
41
|
+
weight?: number;
|
|
42
|
+
};
|
|
43
|
+
export interface CheckPallet_Entity {
|
|
44
|
+
feet: number;
|
|
45
|
+
height: number;
|
|
46
|
+
palletPositions: number;
|
|
47
|
+
pallets: number;
|
|
48
|
+
pieces: number;
|
|
49
|
+
weight: number;
|
|
50
|
+
}
|
|
51
|
+
export interface CostBreakdown_Entity {
|
|
52
|
+
cost_amount: number;
|
|
53
|
+
description: string;
|
|
54
|
+
group: string;
|
|
55
|
+
service_level: string;
|
|
56
|
+
total?: number;
|
|
57
|
+
}
|
|
58
|
+
export interface MarketCost_Entity {
|
|
59
|
+
fuel_cost: number;
|
|
60
|
+
linehaul_cost: number;
|
|
61
|
+
ltl_pallet_percentage: number;
|
|
62
|
+
margin: number;
|
|
63
|
+
otr_miles: number;
|
|
64
|
+
stop_fees: number;
|
|
65
|
+
total_cost: number;
|
|
66
|
+
total_cost_with_margin: number;
|
|
67
|
+
truckload_total_cost: number;
|
|
68
|
+
market_data: {
|
|
69
|
+
fuel_rate: number;
|
|
70
|
+
linehaul_rate: number;
|
|
71
|
+
linehaul_total: number;
|
|
72
|
+
market_days: number;
|
|
73
|
+
market_lane: string;
|
|
74
|
+
market_type: string;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Quote type guard.
|
|
3
|
+
*
|
|
4
|
+
* @param {any} quoteJson Quote object from API
|
|
5
|
+
* @returns {boolean} Return true if type is Quote_Entity
|
|
6
|
+
*/
|
|
7
|
+
function isQuote_Entity(quoteJson) {
|
|
8
|
+
if (typeof quoteJson === "object" && quoteJson != null) {
|
|
9
|
+
Quote_Entity.requiredFields.forEach((element) => {
|
|
10
|
+
if (!Object.keys(quoteJson).includes(element))
|
|
11
|
+
console.log(`Field ${element} is null or undefined`);
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
export default class Quote_Entity {
|
|
17
|
+
static requiredFields = [];
|
|
18
|
+
constructor(quoteJson) {
|
|
19
|
+
if (isQuote_Entity(quoteJson)) {
|
|
20
|
+
this.service = quoteJson.service;
|
|
21
|
+
this.commodityDescriptionId = quoteJson.commodityDescriptionId;
|
|
22
|
+
this.freightClass = quoteJson.freightClass;
|
|
23
|
+
this.mode = quoteJson.mode;
|
|
24
|
+
this.dryVanOnly = quoteJson.dryVanOnly;
|
|
25
|
+
this.shippers = quoteJson.shippers;
|
|
26
|
+
this.consignees = quoteJson.consignees;
|
|
27
|
+
this.units = quoteJson.units;
|
|
28
|
+
this.reefer = quoteJson.reefer;
|
|
29
|
+
this.customerId = quoteJson.customerId;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
throw new Error(`Failed to create new instance of ${Quote_Entity.name}`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
service;
|
|
36
|
+
commodityDescriptionId;
|
|
37
|
+
freightClass;
|
|
38
|
+
mode;
|
|
39
|
+
dryVanOnly;
|
|
40
|
+
shippers;
|
|
41
|
+
consignees;
|
|
42
|
+
units;
|
|
43
|
+
reefer;
|
|
44
|
+
customerId;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=quote.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quote.js","sourceRoot":"","sources":["../../../src/entities/quote/quote.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,SAAS,cAAc,CAAC,SAAkB;IACxC,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,IAAI,IAAI,EAAE;QACtD,YAAY,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC9C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;gBAC3C,OAAO,CAAC,GAAG,CAAC,SAAS,OAAO,uBAAuB,CAAC,CAAC;QACzD,CAAC,CAAC,CAAC;KACJ;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,CAAC,OAAO,OAAO,YAAY;IAC/B,MAAM,CAAC,cAAc,GAAG,EAAE,CAAC;IAE3B,YAAY,SAAkB;QAC5B,IAAI,cAAc,CAAC,SAAS,CAAC,EAAE;YAC7B,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC;YACjC,IAAI,CAAC,sBAAsB,GAAG,SAAS,CAAC,sBAAsB,CAAC;YAC/D,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC,YAAY,CAAC;YAC3C,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC;YAC3B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC,UAAU,CAAC;YACvC,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;YACnC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC,UAAU,CAAC;YACvC,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC;YAC7B,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC;YAC/B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC,UAAU,CAAC;SACxC;aAAM;YACL,MAAM,IAAI,KAAK,CAAC,oCAAoC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC;SAC1E;IACH,CAAC;IAED,OAAO,CAAS;IAChB,sBAAsB,CAAS;IAC/B,YAAY,CAAS;IACrB,IAAI,CAAS;IACb,UAAU,CAAU;IACpB,QAAQ,CAAgB;IACxB,UAAU,CAAgB;IAC1B,KAAK,CAAc;IACnB,MAAM,CAAgB;IACtB,UAAU,CAAS"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import QuoteAccessorial_Entity from "./quoteAccessorial";
|
|
2
|
+
export default class QuoteAccessorial extends QuoteAccessorial_Entity {
|
|
3
|
+
static fromList(quoteAccessorialsJSON) {
|
|
4
|
+
const quoteAccessorials = [];
|
|
5
|
+
if (quoteAccessorialsJSON)
|
|
6
|
+
Array.isArray(quoteAccessorialsJSON) &&
|
|
7
|
+
quoteAccessorialsJSON.forEach((quoteAccessorialJSON) => {
|
|
8
|
+
quoteAccessorials.push(new QuoteAccessorial(quoteAccessorialJSON));
|
|
9
|
+
});
|
|
10
|
+
return quoteAccessorials;
|
|
11
|
+
}
|
|
12
|
+
toJson() {
|
|
13
|
+
return JSON.stringify(this);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../src/entities/quoteAccessorial/helper.ts"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,MAAM,oBAAoB,CAAC;AACzD,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,uBAAuB;IACnE,MAAM,CAAC,QAAQ,CAAC,qBAA8B;QAC5C,MAAM,iBAAiB,GAAuB,EAAE,CAAC;QACjD,IAAI,qBAAqB;YACvB,KAAK,CAAC,OAAO,CAAC,qBAAqB,CAAC;gBAClC,qBAAqB,CAAC,OAAO,CAAC,CAAC,oBAAoB,EAAE,EAAE;oBACrD,iBAAiB,CAAC,IAAI,CAAC,IAAI,gBAAgB,CAAC,oBAAoB,CAAC,CAAC,CAAC;gBACrE,CAAC,CAAC,CAAC;QACP,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/quoteAccessorial/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export default class QuoteAccessorial_Entity {
|
|
2
|
+
static requiredFields: never[];
|
|
3
|
+
constructor(quoteAccessorialJson: unknown);
|
|
4
|
+
id: number;
|
|
5
|
+
quoteID?: number;
|
|
6
|
+
accessorialID?: number;
|
|
7
|
+
name?: string;
|
|
8
|
+
costAmount?: number;
|
|
9
|
+
referenceCode?: string;
|
|
10
|
+
notes?: string;
|
|
11
|
+
hasComCheck?: boolean;
|
|
12
|
+
comCheckNumber?: string;
|
|
13
|
+
personID?: number;
|
|
14
|
+
createdAt?: string;
|
|
15
|
+
updatedAt?: string;
|
|
16
|
+
startTime?: string;
|
|
17
|
+
endTime?: string;
|
|
18
|
+
shipConID?: number;
|
|
19
|
+
drop?: boolean;
|
|
20
|
+
billable?: boolean;
|
|
21
|
+
calculatedCost?: number;
|
|
22
|
+
adjustment?: boolean;
|
|
23
|
+
manualRate?: boolean;
|
|
24
|
+
downtimeMinutes?: number;
|
|
25
|
+
adjustmentReason?: string;
|
|
26
|
+
resolved?: boolean;
|
|
27
|
+
defaultContract?: boolean;
|
|
28
|
+
locationID?: number;
|
|
29
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QuoteAccessorial_Entity type guard.
|
|
3
|
+
*
|
|
4
|
+
* @param {any} quoteAccessorialJson QuoteAccessorial object from API
|
|
5
|
+
* @returns {boolean} Return true if type is QuoteAccessorial_Entity
|
|
6
|
+
*/
|
|
7
|
+
function validator(quoteAccessorialJson) {
|
|
8
|
+
if (typeof quoteAccessorialJson === "object" &&
|
|
9
|
+
quoteAccessorialJson != null) {
|
|
10
|
+
QuoteAccessorial_Entity.requiredFields.forEach((element) => {
|
|
11
|
+
if (!Object.keys(quoteAccessorialJson).includes(element))
|
|
12
|
+
console.log("Field ${element} is null or undefined");
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
return true;
|
|
16
|
+
}
|
|
17
|
+
export default class QuoteAccessorial_Entity {
|
|
18
|
+
static requiredFields = [];
|
|
19
|
+
constructor(quoteAccessorialJson) {
|
|
20
|
+
if (validator(quoteAccessorialJson)) {
|
|
21
|
+
this.id = quoteAccessorialJson.id;
|
|
22
|
+
this.quoteID = quoteAccessorialJson.quoteID;
|
|
23
|
+
this.accessorialID = quoteAccessorialJson.accessorialID;
|
|
24
|
+
this.name = quoteAccessorialJson.name;
|
|
25
|
+
this.costAmount = quoteAccessorialJson.costAmount;
|
|
26
|
+
this.referenceCode = quoteAccessorialJson.referenceCode;
|
|
27
|
+
this.notes = quoteAccessorialJson.notes;
|
|
28
|
+
this.hasComCheck = quoteAccessorialJson.hasComCheck;
|
|
29
|
+
this.comCheckNumber = quoteAccessorialJson.comCheckNumber;
|
|
30
|
+
this.personID = quoteAccessorialJson.personID;
|
|
31
|
+
this.createdAt = quoteAccessorialJson.createdAt;
|
|
32
|
+
this.updatedAt = quoteAccessorialJson.updatedAt;
|
|
33
|
+
this.startTime = quoteAccessorialJson.startTime;
|
|
34
|
+
this.endTime = quoteAccessorialJson.endTime;
|
|
35
|
+
this.shipConID = quoteAccessorialJson.shipConID;
|
|
36
|
+
this.drop = quoteAccessorialJson.drop;
|
|
37
|
+
this.billable = quoteAccessorialJson.billable;
|
|
38
|
+
this.calculatedCost = quoteAccessorialJson.calculatedCost;
|
|
39
|
+
this.adjustment = quoteAccessorialJson.adjustment;
|
|
40
|
+
this.manualRate = quoteAccessorialJson.manualRate;
|
|
41
|
+
this.downtimeMinutes = quoteAccessorialJson.downtimeMinutes;
|
|
42
|
+
this.adjustmentReason = quoteAccessorialJson.adjustmentReason;
|
|
43
|
+
this.resolved = quoteAccessorialJson.resolved;
|
|
44
|
+
this.defaultContract = quoteAccessorialJson.defaultContract;
|
|
45
|
+
this.locationID = quoteAccessorialJson.locationID;
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
throw new Error("Failed to create new instance of ${ QuoteAccessorial_Entity.name }: ${e}");
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
id;
|
|
52
|
+
quoteID;
|
|
53
|
+
accessorialID;
|
|
54
|
+
name;
|
|
55
|
+
costAmount;
|
|
56
|
+
referenceCode;
|
|
57
|
+
notes;
|
|
58
|
+
hasComCheck;
|
|
59
|
+
comCheckNumber;
|
|
60
|
+
personID;
|
|
61
|
+
createdAt;
|
|
62
|
+
updatedAt;
|
|
63
|
+
startTime;
|
|
64
|
+
endTime;
|
|
65
|
+
shipConID;
|
|
66
|
+
drop;
|
|
67
|
+
billable;
|
|
68
|
+
calculatedCost;
|
|
69
|
+
adjustment;
|
|
70
|
+
manualRate;
|
|
71
|
+
downtimeMinutes;
|
|
72
|
+
adjustmentReason;
|
|
73
|
+
resolved;
|
|
74
|
+
defaultContract;
|
|
75
|
+
locationID;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=quoteAccessorial.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quoteAccessorial.js","sourceRoot":"","sources":["../../../src/entities/quoteAccessorial/quoteAccessorial.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import QuoteResponse_Entity from "./quoteResponse";
|
|
2
|
+
export default class QuoteResponse extends QuoteResponse_Entity {
|
|
3
|
+
static fromList(quoteResponsesJSON) {
|
|
4
|
+
const quoteResponses = [];
|
|
5
|
+
if (quoteResponsesJSON)
|
|
6
|
+
Array.isArray(quoteResponsesJSON) &&
|
|
7
|
+
quoteResponsesJSON.forEach((quoteResponseJSON) => {
|
|
8
|
+
quoteResponses.push(new QuoteResponse(quoteResponseJSON));
|
|
9
|
+
});
|
|
10
|
+
return quoteResponses;
|
|
11
|
+
}
|
|
12
|
+
toJson() {
|
|
13
|
+
return JSON.stringify(this);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../src/entities/quoteResponse/helper.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,MAAM,iBAAiB,CAAC;AACnD,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,oBAAoB;IAC7D,MAAM,CAAC,QAAQ,CAAC,kBAA2B;QACzC,MAAM,cAAc,GAAoB,EAAE,CAAC;QAC3C,IAAI,kBAAkB;YACpB,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC;gBAC/B,kBAAkB,CAAC,OAAO,CAAC,CAAC,iBAAiB,EAAE,EAAE;oBAC/C,cAAc,CAAC,IAAI,CAAC,IAAI,aAAa,CAAC,iBAAiB,CAAC,CAAC,CAAC;gBAC5D,CAAC,CAAC,CAAC;QACP,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/quoteResponse/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export default class QuoteResponse_Entity {
|
|
2
|
+
static requiredFields: string[];
|
|
3
|
+
constructor(quoteResponseJson: unknown);
|
|
4
|
+
id: number;
|
|
5
|
+
customerId: number;
|
|
6
|
+
customerName: string;
|
|
7
|
+
createdAt: string;
|
|
8
|
+
commodityDescription: string;
|
|
9
|
+
commodityDescriptionId: number;
|
|
10
|
+
totalMiles: number;
|
|
11
|
+
pallets: number;
|
|
12
|
+
pieces: number;
|
|
13
|
+
freightClass: string;
|
|
14
|
+
dryVanOnly: boolean;
|
|
15
|
+
feet: number;
|
|
16
|
+
weight: number;
|
|
17
|
+
type: string;
|
|
18
|
+
stops: {
|
|
19
|
+
id: number;
|
|
20
|
+
name: string;
|
|
21
|
+
type: string;
|
|
22
|
+
date?: string | null;
|
|
23
|
+
city: string;
|
|
24
|
+
state: string;
|
|
25
|
+
zip: string;
|
|
26
|
+
address: {
|
|
27
|
+
locationId?: number | null;
|
|
28
|
+
line1?: string | null;
|
|
29
|
+
city: string;
|
|
30
|
+
state: string;
|
|
31
|
+
zip: string;
|
|
32
|
+
latitude: number;
|
|
33
|
+
longitude: number;
|
|
34
|
+
};
|
|
35
|
+
}[];
|
|
36
|
+
transitTime: number;
|
|
37
|
+
serviceLevels: ServiceLevel_Entity[];
|
|
38
|
+
accessorials: {
|
|
39
|
+
costAmount: number;
|
|
40
|
+
name: string;
|
|
41
|
+
accessorialId: number;
|
|
42
|
+
stopId: number;
|
|
43
|
+
stopName: string;
|
|
44
|
+
}[];
|
|
45
|
+
units: {
|
|
46
|
+
palletDimensions: {
|
|
47
|
+
units: string;
|
|
48
|
+
length: number;
|
|
49
|
+
width: number;
|
|
50
|
+
height: number;
|
|
51
|
+
weight: number;
|
|
52
|
+
count: number;
|
|
53
|
+
}[];
|
|
54
|
+
totalDimensions: {
|
|
55
|
+
totalWeight: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
api: string;
|
|
59
|
+
version: number;
|
|
60
|
+
}
|
|
61
|
+
export type ServiceLevel_Entity = {
|
|
62
|
+
id: string;
|
|
63
|
+
description: string;
|
|
64
|
+
serviceLevel: string;
|
|
65
|
+
baseRate: number;
|
|
66
|
+
extra: number;
|
|
67
|
+
fuelRate: number;
|
|
68
|
+
totalRate: number;
|
|
69
|
+
flexible: boolean;
|
|
70
|
+
from: string;
|
|
71
|
+
to: string;
|
|
72
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QuoteResponse_Entity type guard.
|
|
3
|
+
*
|
|
4
|
+
* @param {any} quoteResponseJson QuoteResponse object from API
|
|
5
|
+
* @returns {boolean} Return true if type is QuoteResponse_Entity
|
|
6
|
+
*/
|
|
7
|
+
function validator(quoteResponseJson) {
|
|
8
|
+
if (typeof quoteResponseJson === "object" && quoteResponseJson != null) {
|
|
9
|
+
QuoteResponse_Entity.requiredFields.forEach((element) => {
|
|
10
|
+
if (!Object.keys(quoteResponseJson).includes(element))
|
|
11
|
+
throw new Error(`Field ${element} is null or undefined`);
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
export default class QuoteResponse_Entity {
|
|
17
|
+
static requiredFields = ["id"];
|
|
18
|
+
constructor(quoteResponseJson) {
|
|
19
|
+
if (validator(quoteResponseJson)) {
|
|
20
|
+
this.id = quoteResponseJson.id;
|
|
21
|
+
this.customerId = quoteResponseJson.customerId;
|
|
22
|
+
this.customerName = quoteResponseJson.customerName;
|
|
23
|
+
this.createdAt = quoteResponseJson.createdAt;
|
|
24
|
+
this.commodityDescription = quoteResponseJson.commodityDescription;
|
|
25
|
+
this.commodityDescriptionId = quoteResponseJson.commodityDescriptionId;
|
|
26
|
+
this.totalMiles = quoteResponseJson.totalMiles;
|
|
27
|
+
this.pallets = quoteResponseJson.pallets;
|
|
28
|
+
this.pieces = quoteResponseJson.pieces;
|
|
29
|
+
this.freightClass = quoteResponseJson.freightClass;
|
|
30
|
+
this.dryVanOnly = quoteResponseJson.dryVanOnly;
|
|
31
|
+
this.feet = quoteResponseJson.feet;
|
|
32
|
+
this.weight = quoteResponseJson.weight;
|
|
33
|
+
this.type = quoteResponseJson.type;
|
|
34
|
+
this.stops = quoteResponseJson.stops;
|
|
35
|
+
this.transitTime = quoteResponseJson.transitTime;
|
|
36
|
+
this.serviceLevels = quoteResponseJson.serviceLevels;
|
|
37
|
+
this.accessorials = quoteResponseJson.accessorials;
|
|
38
|
+
this.units = quoteResponseJson.units;
|
|
39
|
+
this.api = quoteResponseJson.api;
|
|
40
|
+
this.version = quoteResponseJson.version;
|
|
41
|
+
}
|
|
42
|
+
else
|
|
43
|
+
throw new Error(`Failed to create new instance of ${QuoteResponse_Entity.name}`);
|
|
44
|
+
}
|
|
45
|
+
id;
|
|
46
|
+
customerId;
|
|
47
|
+
customerName;
|
|
48
|
+
createdAt;
|
|
49
|
+
commodityDescription;
|
|
50
|
+
commodityDescriptionId;
|
|
51
|
+
totalMiles;
|
|
52
|
+
pallets;
|
|
53
|
+
pieces;
|
|
54
|
+
freightClass;
|
|
55
|
+
dryVanOnly;
|
|
56
|
+
feet;
|
|
57
|
+
weight;
|
|
58
|
+
type;
|
|
59
|
+
stops;
|
|
60
|
+
transitTime;
|
|
61
|
+
serviceLevels;
|
|
62
|
+
accessorials;
|
|
63
|
+
units;
|
|
64
|
+
api;
|
|
65
|
+
version;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=quoteResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quoteResponse.js","sourceRoot":"","sources":["../../../src/entities/quoteResponse/quoteResponse.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,SAAS,SAAS,CAChB,iBAA0B;IAE1B,IAAI,OAAO,iBAAiB,KAAK,QAAQ,IAAI,iBAAiB,IAAI,IAAI,EAAE;QACtE,oBAAoB,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YACtD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;gBACnD,MAAM,IAAI,KAAK,CAAC,SAAS,OAAO,uBAAuB,CAAC,CAAC;QAC7D,CAAC,CAAC,CAAC;KACJ;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,CAAC,OAAO,OAAO,oBAAoB;IACvC,MAAM,CAAC,cAAc,GAAG,CAAC,IAAI,CAAC,CAAC;IAE/B,YAAY,iBAA0B;QACpC,IAAI,SAAS,CAAC,iBAAiB,CAAC,EAAE;YAChC,IAAI,CAAC,EAAE,GAAG,iBAAiB,CAAC,EAAE,CAAC;YAC/B,IAAI,CAAC,UAAU,GAAG,iBAAiB,CAAC,UAAU,CAAC;YAC/C,IAAI,CAAC,YAAY,GAAG,iBAAiB,CAAC,YAAY,CAAC;YACnD,IAAI,CAAC,SAAS,GAAG,iBAAiB,CAAC,SAAS,CAAC;YAC7C,IAAI,CAAC,oBAAoB,GAAG,iBAAiB,CAAC,oBAAoB,CAAC;YACnE,IAAI,CAAC,sBAAsB,GAAG,iBAAiB,CAAC,sBAAsB,CAAC;YACvE,IAAI,CAAC,UAAU,GAAG,iBAAiB,CAAC,UAAU,CAAC;YAC/C,IAAI,CAAC,OAAO,GAAG,iBAAiB,CAAC,OAAO,CAAC;YACzC,IAAI,CAAC,MAAM,GAAG,iBAAiB,CAAC,MAAM,CAAC;YACvC,IAAI,CAAC,YAAY,GAAG,iBAAiB,CAAC,YAAY,CAAC;YACnD,IAAI,CAAC,UAAU,GAAG,iBAAiB,CAAC,UAAU,CAAC;YAC/C,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC,IAAI,CAAC;YACnC,IAAI,CAAC,MAAM,GAAG,iBAAiB,CAAC,MAAM,CAAC;YACvC,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC,IAAI,CAAC;YACnC,IAAI,CAAC,KAAK,GAAG,iBAAiB,CAAC,KAAK,CAAC;YACrC,IAAI,CAAC,WAAW,GAAG,iBAAiB,CAAC,WAAW,CAAC;YACjD,IAAI,CAAC,aAAa,GAAG,iBAAiB,CAAC,aAAa,CAAC;YACrD,IAAI,CAAC,YAAY,GAAG,iBAAiB,CAAC,YAAY,CAAC;YACnD,IAAI,CAAC,KAAK,GAAG,iBAAiB,CAAC,KAAK,CAAC;YACrC,IAAI,CAAC,GAAG,GAAG,iBAAiB,CAAC,GAAG,CAAC;YACjC,IAAI,CAAC,OAAO,GAAG,iBAAiB,CAAC,OAAO,CAAC;SAC1C;;YACC,MAAM,IAAI,KAAK,CACb,oCAAoC,oBAAoB,CAAC,IAAI,EAAE,CAChE,CAAC;IACN,CAAC;IAED,EAAE,CAAS;IACX,UAAU,CAAS;IACnB,YAAY,CAAS;IACrB,SAAS,CAAS;IAClB,oBAAoB,CAAS;IAC7B,sBAAsB,CAAS;IAC/B,UAAU,CAAS;IACnB,OAAO,CAAS;IAChB,MAAM,CAAS;IACf,YAAY,CAAS;IACrB,UAAU,CAAU;IACpB,IAAI,CAAS;IACb,MAAM,CAAS;IACf,IAAI,CAAS;IACb,KAAK,CAiBD;IACJ,WAAW,CAAS;IACpB,aAAa,CAAwB;IACrC,YAAY,CAMR;IACJ,KAAK,CAYH;IACF,GAAG,CAAS;IACZ,OAAO,CAAS"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import moment from "moment";
|
|
2
|
+
import Shipcon_Entity from "./shipcon";
|
|
3
|
+
export default class Shipcon extends Shipcon_Entity {
|
|
4
|
+
static fromList(shipconsJSON) {
|
|
5
|
+
const shipcons = [];
|
|
6
|
+
if (shipconsJSON)
|
|
7
|
+
Array.isArray(shipconsJSON) &&
|
|
8
|
+
shipconsJSON.forEach((shipconJSON) => {
|
|
9
|
+
shipcons.push(new Shipcon(shipconJSON));
|
|
10
|
+
});
|
|
11
|
+
return shipcons;
|
|
12
|
+
}
|
|
13
|
+
toJson() {
|
|
14
|
+
return JSON.stringify(this);
|
|
15
|
+
}
|
|
16
|
+
stopDateFormat() {
|
|
17
|
+
return moment(this.stopDate).format("MM/DD");
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../src/entities/shipcon/helper.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,cAAc,MAAM,WAAW,CAAC;AACvC,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,cAAc;IACjD,MAAM,CAAC,QAAQ,CAAC,YAAqB;QACnC,MAAM,QAAQ,GAAc,EAAE,CAAC;QAC/B,IAAI,YAAY;YACd,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC;gBACzB,YAAY,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE;oBACnC,QAAQ,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;gBAC1C,CAAC,CAAC,CAAC;QACP,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED,cAAc;QACZ,OAAO,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/shipcon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,WAAW,CAAC"}
|