@nerdjs/sales-kit 1.0.2 → 1.0.4

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.
Files changed (329) hide show
  1. package/dist/entities/accessorial/accessorial.d.ts +12 -0
  2. package/dist/entities/accessorial/accessorial.js +41 -0
  3. package/dist/entities/accessorial/accessorial.js.map +1 -0
  4. package/dist/entities/accessorial/helper.d.ts +5 -0
  5. package/dist/entities/accessorial/helper.js +16 -0
  6. package/dist/entities/accessorial/helper.js.map +1 -0
  7. package/dist/entities/accessorial/index.d.ts +2 -0
  8. package/dist/entities/accessorial/index.js +3 -0
  9. package/dist/entities/accessorial/index.js.map +1 -0
  10. package/dist/entities/accessorials/accessorials.d.ts +7 -0
  11. package/dist/entities/accessorials/accessorials.js +29 -0
  12. package/dist/entities/accessorials/accessorials.js.map +1 -0
  13. package/dist/entities/accessorials/helper.d.ts +5 -0
  14. package/dist/entities/accessorials/helper.js +16 -0
  15. package/dist/entities/accessorials/helper.js.map +1 -0
  16. package/dist/entities/accessorials/index.d.ts +2 -0
  17. package/dist/entities/accessorials/index.js +3 -0
  18. package/dist/entities/accessorials/index.js.map +1 -0
  19. package/dist/{cjs/entities → entities}/customer/customer.d.ts +16 -16
  20. package/dist/entities/customer/customer.js +63 -0
  21. package/dist/entities/customer/customer.js.map +1 -0
  22. package/dist/{cjs/entities → entities}/customer/helper.d.ts +5 -5
  23. package/dist/entities/customer/helper.js +16 -0
  24. package/dist/entities/customer/helper.js.map +1 -0
  25. package/dist/{cjs/entities → entities}/customer/index.d.ts +1 -1
  26. package/dist/entities/customer/index.js +2 -0
  27. package/dist/entities/customer/index.js.map +1 -0
  28. package/dist/entities/holiday/helper.d.ts +5 -0
  29. package/dist/entities/holiday/helper.js +16 -0
  30. package/dist/entities/holiday/helper.js.map +1 -0
  31. package/dist/entities/holiday/holiday.d.ts +7 -0
  32. package/dist/entities/holiday/holiday.js +31 -0
  33. package/dist/entities/holiday/holiday.js.map +1 -0
  34. package/dist/entities/holiday/index.d.ts +2 -0
  35. package/dist/entities/holiday/index.js +3 -0
  36. package/dist/entities/holiday/index.js.map +1 -0
  37. package/dist/entities/index.d.ts +12 -0
  38. package/dist/entities/index.js +13 -0
  39. package/dist/entities/index.js.map +1 -0
  40. package/dist/entities/load/helper.d.ts +6 -0
  41. package/dist/entities/load/helper.js +28 -0
  42. package/dist/entities/load/helper.js.map +1 -0
  43. package/dist/entities/load/index.d.ts +2 -0
  44. package/dist/entities/load/index.js +3 -0
  45. package/dist/entities/load/index.js.map +1 -0
  46. package/dist/entities/load/load.d.ts +102 -0
  47. package/dist/entities/load/load.js +224 -0
  48. package/dist/entities/load/load.js.map +1 -0
  49. package/dist/entities/loadAdjustment/helper.d.ts +5 -0
  50. package/dist/entities/loadAdjustment/helper.js +16 -0
  51. package/dist/entities/loadAdjustment/helper.js.map +1 -0
  52. package/dist/entities/loadAdjustment/index.d.ts +2 -0
  53. package/dist/entities/loadAdjustment/index.js +3 -0
  54. package/dist/entities/loadAdjustment/index.js.map +1 -0
  55. package/dist/entities/loadAdjustment/loadAdjustment.d.ts +15 -0
  56. package/dist/entities/loadAdjustment/loadAdjustment.js +48 -0
  57. package/dist/entities/loadAdjustment/loadAdjustment.js.map +1 -0
  58. package/dist/{cjs/entities → entities}/location/helper.d.ts +5 -5
  59. package/dist/entities/location/helper.js +16 -0
  60. package/dist/entities/location/helper.js.map +1 -0
  61. package/dist/{cjs/entities → entities}/location/index.d.ts +2 -2
  62. package/dist/entities/location/index.js +3 -0
  63. package/dist/entities/location/index.js.map +1 -0
  64. package/dist/{cjs/entities → entities}/location/location.d.ts +33 -32
  65. package/dist/entities/location/location.js +47 -0
  66. package/dist/entities/location/location.js.map +1 -0
  67. package/dist/{cjs/entities → entities}/marketCosts/helper.d.ts +5 -5
  68. package/dist/entities/marketCosts/helper.js +16 -0
  69. package/dist/entities/marketCosts/helper.js.map +1 -0
  70. package/dist/{cjs/entities → entities}/marketCosts/index.d.ts +2 -2
  71. package/dist/entities/marketCosts/index.js +3 -0
  72. package/dist/entities/marketCosts/index.js.map +1 -0
  73. package/dist/{cjs/entities → entities}/marketCosts/marketCosts.d.ts +22 -22
  74. package/dist/entities/marketCosts/marketCosts.js +60 -0
  75. package/dist/entities/marketCosts/marketCosts.js.map +1 -0
  76. package/dist/{cjs/entities → entities}/quote/helper.d.ts +5 -5
  77. package/dist/entities/quote/helper.js +16 -0
  78. package/dist/entities/quote/helper.js.map +1 -0
  79. package/dist/{cjs/entities → entities}/quote/index.d.ts +2 -2
  80. package/dist/entities/quote/index.js +3 -0
  81. package/dist/entities/quote/index.js.map +1 -0
  82. package/dist/entities/quote/quote.d.ts +76 -0
  83. package/dist/entities/quote/quote.js +46 -0
  84. package/dist/entities/quote/quote.js.map +1 -0
  85. package/dist/entities/quoteAccessorial/helper.d.ts +5 -0
  86. package/dist/entities/quoteAccessorial/helper.js +16 -0
  87. package/dist/entities/quoteAccessorial/helper.js.map +1 -0
  88. package/dist/entities/quoteAccessorial/index.d.ts +2 -0
  89. package/dist/entities/quoteAccessorial/index.js +3 -0
  90. package/dist/entities/quoteAccessorial/index.js.map +1 -0
  91. package/dist/entities/quoteAccessorial/quoteAccessorial.d.ts +29 -0
  92. package/dist/entities/quoteAccessorial/quoteAccessorial.js +77 -0
  93. package/dist/entities/quoteAccessorial/quoteAccessorial.js.map +1 -0
  94. package/dist/entities/quoteResponse/helper.d.ts +5 -0
  95. package/dist/entities/quoteResponse/helper.js +16 -0
  96. package/dist/entities/quoteResponse/helper.js.map +1 -0
  97. package/dist/entities/quoteResponse/index.d.ts +2 -0
  98. package/dist/entities/quoteResponse/index.js +3 -0
  99. package/dist/entities/quoteResponse/index.js.map +1 -0
  100. package/dist/entities/quoteResponse/quoteResponse.d.ts +72 -0
  101. package/dist/entities/quoteResponse/quoteResponse.js +67 -0
  102. package/dist/entities/quoteResponse/quoteResponse.js.map +1 -0
  103. package/dist/entities/shipcon/helper.d.ts +6 -0
  104. package/dist/entities/shipcon/helper.js +20 -0
  105. package/dist/entities/shipcon/helper.js.map +1 -0
  106. package/dist/entities/shipcon/index.d.ts +2 -0
  107. package/dist/entities/shipcon/index.js +3 -0
  108. package/dist/entities/shipcon/index.js.map +1 -0
  109. package/dist/entities/shipcon/shipcon.d.ts +27 -0
  110. package/dist/entities/shipcon/shipcon.js +74 -0
  111. package/dist/entities/shipcon/shipcon.js.map +1 -0
  112. package/dist/helpers.d.ts +18 -0
  113. package/dist/helpers.js +29 -0
  114. package/dist/helpers.js.map +1 -0
  115. package/dist/hooks/index.d.ts +2 -0
  116. package/dist/hooks/index.js +3 -0
  117. package/dist/hooks/index.js.map +1 -0
  118. package/dist/hooks/locationsForm/index.d.ts +1 -0
  119. package/dist/hooks/locationsForm/index.js +2 -0
  120. package/dist/hooks/locationsForm/index.js.map +1 -0
  121. package/dist/hooks/locationsForm/locationsForm.d.ts +2 -0
  122. package/dist/hooks/locationsForm/locationsForm.js +35 -0
  123. package/dist/hooks/locationsForm/locationsForm.js.map +1 -0
  124. package/dist/hooks/quote/constants.d.ts +184 -0
  125. package/dist/hooks/quote/constants.js +140 -0
  126. package/dist/hooks/quote/constants.js.map +1 -0
  127. package/dist/hooks/quote/form.d.ts +9 -0
  128. package/dist/hooks/quote/form.js +203 -0
  129. package/dist/hooks/quote/form.js.map +1 -0
  130. package/dist/hooks/quote/helpers.d.ts +39 -0
  131. package/dist/hooks/quote/helpers.js +366 -0
  132. package/dist/hooks/quote/helpers.js.map +1 -0
  133. package/dist/hooks/quote/index.d.ts +5 -0
  134. package/dist/hooks/quote/index.js +6 -0
  135. package/dist/hooks/quote/index.js.map +1 -0
  136. package/dist/hooks/quote/result.d.ts +7 -0
  137. package/dist/hooks/quote/result.js +196 -0
  138. package/dist/hooks/quote/result.js.map +1 -0
  139. package/dist/hooks/quote/template.d.ts +9 -0
  140. package/dist/hooks/quote/template.js +113 -0
  141. package/dist/hooks/quote/template.js.map +1 -0
  142. package/dist/index.d.ts +4 -0
  143. package/dist/index.js +5 -0
  144. package/dist/index.js.map +1 -0
  145. package/dist/locales/index.d.ts +1 -0
  146. package/dist/locales/index.js +2 -0
  147. package/dist/locales/index.js.map +1 -0
  148. package/dist/locales/salesKitEn.d.ts +59 -0
  149. package/dist/locales/salesKitEn.js +60 -0
  150. package/dist/locales/salesKitEn.js.map +1 -0
  151. package/dist/redux/appState.d.ts +4 -0
  152. package/dist/redux/appState.js +2 -0
  153. package/dist/redux/appState.js.map +1 -0
  154. package/dist/redux/customer/customerActions.d.ts +97 -0
  155. package/dist/redux/customer/customerActions.js +210 -0
  156. package/dist/redux/customer/customerActions.js.map +1 -0
  157. package/dist/redux/customer/customerReducer.d.ts +2 -0
  158. package/dist/redux/customer/customerReducer.js +42 -0
  159. package/dist/redux/customer/customerReducer.js.map +1 -0
  160. package/dist/redux/customer/customerSelector.d.ts +27 -0
  161. package/dist/redux/customer/customerSelector.js +38 -0
  162. package/dist/redux/customer/customerSelector.js.map +1 -0
  163. package/dist/redux/customer/customerState.d.ts +11 -0
  164. package/dist/redux/customer/customerState.js +2 -0
  165. package/dist/redux/customer/customerState.js.map +1 -0
  166. package/dist/redux/customer/index.d.ts +4 -0
  167. package/dist/redux/customer/index.js +5 -0
  168. package/dist/redux/customer/index.js.map +1 -0
  169. package/dist/redux/index.d.ts +8 -0
  170. package/dist/redux/index.js +9 -0
  171. package/dist/redux/index.js.map +1 -0
  172. package/dist/redux/load/index.d.ts +4 -0
  173. package/dist/redux/load/index.js +5 -0
  174. package/dist/redux/load/index.js.map +1 -0
  175. package/dist/redux/load/loadActions.d.ts +80 -0
  176. package/dist/redux/load/loadActions.js +172 -0
  177. package/dist/redux/load/loadActions.js.map +1 -0
  178. package/dist/redux/load/loadReducer.d.ts +2 -0
  179. package/dist/redux/load/loadReducer.js +35 -0
  180. package/dist/redux/load/loadReducer.js.map +1 -0
  181. package/dist/redux/load/loadSelector.d.ts +27 -0
  182. package/dist/redux/load/loadSelector.js +19 -0
  183. package/dist/redux/load/loadSelector.js.map +1 -0
  184. package/dist/redux/load/loadState.d.ts +8 -0
  185. package/dist/redux/load/loadState.js +2 -0
  186. package/dist/redux/load/loadState.js.map +1 -0
  187. package/dist/redux/loadAdjustment/index.d.ts +4 -0
  188. package/dist/redux/loadAdjustment/index.js +5 -0
  189. package/dist/redux/loadAdjustment/index.js.map +1 -0
  190. package/dist/redux/loadAdjustment/loadAdjustmentActions.d.ts +80 -0
  191. package/dist/redux/loadAdjustment/loadAdjustmentActions.js +172 -0
  192. package/dist/redux/loadAdjustment/loadAdjustmentActions.js.map +1 -0
  193. package/dist/redux/loadAdjustment/loadAdjustmentReducer.d.ts +2 -0
  194. package/dist/redux/loadAdjustment/loadAdjustmentReducer.js +35 -0
  195. package/dist/redux/loadAdjustment/loadAdjustmentReducer.js.map +1 -0
  196. package/dist/redux/loadAdjustment/loadAdjustmentSelector.d.ts +15 -0
  197. package/dist/redux/loadAdjustment/loadAdjustmentSelector.js +12 -0
  198. package/dist/redux/loadAdjustment/loadAdjustmentSelector.js.map +1 -0
  199. package/dist/redux/loadAdjustment/loadAdjustmentState.d.ts +8 -0
  200. package/dist/redux/loadAdjustment/loadAdjustmentState.js +2 -0
  201. package/dist/redux/loadAdjustment/loadAdjustmentState.js.map +1 -0
  202. package/dist/redux/location/index.d.ts +4 -0
  203. package/dist/redux/location/index.js +5 -0
  204. package/dist/redux/location/index.js.map +1 -0
  205. package/dist/redux/location/locationActions.d.ts +101 -0
  206. package/dist/redux/location/locationActions.js +218 -0
  207. package/dist/redux/location/locationActions.js.map +1 -0
  208. package/dist/redux/location/locationReducer.d.ts +2 -0
  209. package/dist/redux/location/locationReducer.js +54 -0
  210. package/dist/redux/location/locationReducer.js.map +1 -0
  211. package/dist/redux/location/locationSelector.d.ts +53 -0
  212. package/dist/redux/location/locationSelector.js +32 -0
  213. package/dist/redux/location/locationSelector.js.map +1 -0
  214. package/dist/redux/location/locationState.d.ts +15 -0
  215. package/dist/redux/location/locationState.js +2 -0
  216. package/dist/redux/location/locationState.js.map +1 -0
  217. package/dist/{cjs/redux → redux}/quote/index.d.ts +5 -4
  218. package/dist/redux/quote/index.js +6 -0
  219. package/dist/redux/quote/index.js.map +1 -0
  220. package/dist/redux/quote/quoteAction.d.ts +177 -0
  221. package/dist/redux/quote/quoteAction.js +351 -0
  222. package/dist/redux/quote/quoteAction.js.map +1 -0
  223. package/dist/redux/quote/quoteMiddleware.d.ts +2 -0
  224. package/dist/redux/quote/quoteMiddleware.js +31 -0
  225. package/dist/redux/quote/quoteMiddleware.js.map +1 -0
  226. package/dist/redux/quote/quoteReducer.d.ts +27 -0
  227. package/dist/redux/quote/quoteReducer.js +207 -0
  228. package/dist/redux/quote/quoteReducer.js.map +1 -0
  229. package/dist/redux/quote/quoteSelector.d.ts +199 -0
  230. package/dist/redux/quote/quoteSelector.js +141 -0
  231. package/dist/redux/quote/quoteSelector.js.map +1 -0
  232. package/dist/redux/quote/quoteState.d.ts +9 -0
  233. package/dist/redux/quote/quoteState.js +2 -0
  234. package/dist/redux/quote/quoteState.js.map +1 -0
  235. package/dist/redux/quoteAccessorial/index.d.ts +3 -0
  236. package/dist/redux/quoteAccessorial/index.js +4 -0
  237. package/dist/redux/quoteAccessorial/index.js.map +1 -0
  238. package/dist/redux/quoteAccessorial/quoteAccessorialActions.d.ts +70 -0
  239. package/dist/redux/quoteAccessorial/quoteAccessorialActions.js +149 -0
  240. package/dist/redux/quoteAccessorial/quoteAccessorialActions.js.map +1 -0
  241. package/dist/redux/quoteAccessorial/quoteAccessorialReducer.d.ts +2 -0
  242. package/dist/redux/quoteAccessorial/quoteAccessorialReducer.js +29 -0
  243. package/dist/redux/quoteAccessorial/quoteAccessorialReducer.js.map +1 -0
  244. package/dist/redux/quoteAccessorial/quoteAccessorialState.d.ts +8 -0
  245. package/dist/redux/quoteAccessorial/quoteAccessorialState.js +2 -0
  246. package/dist/redux/quoteAccessorial/quoteAccessorialState.js.map +1 -0
  247. package/dist/redux/salesKitReducer.d.ts +25 -0
  248. package/dist/redux/salesKitReducer.js +18 -0
  249. package/dist/redux/salesKitReducer.js.map +1 -0
  250. package/dist/redux/shipcon/index.d.ts +4 -0
  251. package/dist/redux/shipcon/index.js +5 -0
  252. package/dist/redux/shipcon/index.js.map +1 -0
  253. package/dist/redux/shipcon/shipconActions.d.ts +80 -0
  254. package/dist/redux/shipcon/shipconActions.js +172 -0
  255. package/dist/redux/shipcon/shipconActions.js.map +1 -0
  256. package/dist/redux/shipcon/shipconReducer.d.ts +2 -0
  257. package/dist/redux/shipcon/shipconReducer.js +35 -0
  258. package/dist/redux/shipcon/shipconReducer.js.map +1 -0
  259. package/dist/redux/shipcon/shipconSelector.d.ts +22 -0
  260. package/dist/redux/shipcon/shipconSelector.js +19 -0
  261. package/dist/redux/shipcon/shipconSelector.js.map +1 -0
  262. package/dist/redux/shipcon/shipconState.d.ts +8 -0
  263. package/dist/redux/shipcon/shipconState.js +2 -0
  264. package/dist/redux/shipcon/shipconState.js.map +1 -0
  265. package/package.json +41 -70
  266. package/dist/cjs/components/calendar/calendar.d.ts +0 -5
  267. package/dist/cjs/components/calendar/day/day.d.ts +0 -8
  268. package/dist/cjs/components/calendar/day/index.d.ts +0 -1
  269. package/dist/cjs/components/calendar/day/typings.d.ts +0 -16
  270. package/dist/cjs/components/calendar/index.d.ts +0 -2
  271. package/dist/cjs/components/calendar/typings.d.ts +0 -27
  272. package/dist/cjs/components/customerFinder/customerFinder.d.ts +0 -11
  273. package/dist/cjs/components/customerFinder/index.d.ts +0 -2
  274. package/dist/cjs/components/customerFinder/optionTemplate.d.ts +0 -6
  275. package/dist/cjs/components/index.d.ts +0 -4
  276. package/dist/cjs/components/locationFinder/editLocation.d.ts +0 -15
  277. package/dist/cjs/components/locationFinder/index.d.ts +0 -1
  278. package/dist/cjs/components/locationFinder/locationByAddress.d.ts +0 -18
  279. package/dist/cjs/components/locationFinder/locationFinder.d.ts +0 -7
  280. package/dist/cjs/components/locationFinder/locationsFound.d.ts +0 -12
  281. package/dist/cjs/components/locationFinder/newLocationForm.d.ts +0 -20
  282. package/dist/cjs/components/locationFinder/optionTemplate.d.ts +0 -8
  283. package/dist/cjs/components/locationFinder/typings.d.ts +0 -23
  284. package/dist/cjs/components/salesQuote/components/aboutQuote/aboutQuote.d.ts +0 -5
  285. package/dist/cjs/components/salesQuote/components/aboutQuote/commodityDescription.d.ts +0 -16
  286. package/dist/cjs/components/salesQuote/components/aboutQuote/index.d.ts +0 -2
  287. package/dist/cjs/components/salesQuote/components/aboutQuote/quoteCheck.d.ts +0 -6
  288. package/dist/cjs/components/salesQuote/components/pallet/editPallet.d.ts +0 -11
  289. package/dist/cjs/components/salesQuote/components/pallet/palletChecker.d.ts +0 -15
  290. package/dist/cjs/components/salesQuote/components/pallet/palletCount.d.ts +0 -13
  291. package/dist/cjs/components/salesQuote/components/quoteCalendar/quoteCalendar.d.ts +0 -24
  292. package/dist/cjs/components/salesQuote/components/quoteResultAccordion/costBreakdown.d.ts +0 -14
  293. package/dist/cjs/components/salesQuote/components/quoteResultAccordion/marketCosts.d.ts +0 -7
  294. package/dist/cjs/components/salesQuote/components/quoteResultAccordion/quoteResultAccessorials.d.ts +0 -13
  295. package/dist/cjs/components/salesQuote/components/quoteResultAccordion/quoteResultAccordion.d.ts +0 -17
  296. package/dist/cjs/components/salesQuote/components/quoteSelect.d.ts +0 -4
  297. package/dist/cjs/components/salesQuote/components/quoteSummary/quoteSummary.d.ts +0 -4
  298. package/dist/cjs/components/salesQuote/components/quoteSummary/quoteSummaryBody.d.ts +0 -12
  299. package/dist/cjs/components/salesQuote/components/quoteSummary/quoteSummaryHeader.d.ts +0 -10
  300. package/dist/cjs/components/salesQuote/components/quoteSummary/typings.d.ts +0 -47
  301. package/dist/cjs/components/salesQuote/index.d.ts +0 -4
  302. package/dist/cjs/components/salesQuote/salesQuote.d.ts +0 -17
  303. package/dist/cjs/components/salesQuote/typings.d.ts +0 -156
  304. package/dist/cjs/components/shared/bootstrapDialogTitle/bootstrapDialogTitle.d.ts +0 -11
  305. package/dist/cjs/components/shared/bootstrapDialogTitle/index.d.ts +0 -1
  306. package/dist/cjs/components/shared/index.d.ts +0 -2
  307. package/dist/cjs/components/shared/loading/index.d.ts +0 -1
  308. package/dist/cjs/components/shared/loading/loading.d.ts +0 -6
  309. package/dist/cjs/components/stop/index.d.ts +0 -2
  310. package/dist/cjs/components/stop/menuAccessorials.d.ts +0 -27
  311. package/dist/cjs/components/stop/stop.d.ts +0 -4
  312. package/dist/cjs/components/stop/stopDetail.d.ts +0 -5
  313. package/dist/cjs/components/stop/stopDetailHeader.d.ts +0 -6
  314. package/dist/cjs/entities/index.d.ts +0 -4
  315. package/dist/cjs/entities/quote/quote.d.ts +0 -80
  316. package/dist/cjs/index.d.ts +0 -4
  317. package/dist/cjs/index.js +0 -3169
  318. package/dist/cjs/index.js.map +0 -1
  319. package/dist/cjs/redux/calendar/calendarSlice.d.ts +0 -12
  320. package/dist/cjs/redux/calendar/index.d.ts +0 -1
  321. package/dist/cjs/redux/index.d.ts +0 -3
  322. package/dist/cjs/redux/nerdSalesKitReducer.d.ts +0 -10
  323. package/dist/cjs/redux/quote/quoteAction.d.ts +0 -125
  324. package/dist/cjs/redux/quote/quoteReducer.d.ts +0 -28
  325. package/dist/cjs/redux/quote/quoteSelector.d.ts +0 -22
  326. package/dist/cjs/redux/quote/quoteState.d.ts +0 -124
  327. package/dist/cjs/utils/constants.d.ts +0 -5
  328. package/dist/cjs/utils/helpers.d.ts +0 -17
  329. package/dist/cjs/utils/index.d.ts +0 -2
@@ -0,0 +1,12 @@
1
+ export default class Accessorial_Entity {
2
+ static requiredFields: string[];
3
+ constructor(accessorialJson: unknown);
4
+ accessorialId: number;
5
+ costAmount: number;
6
+ customerId: number;
7
+ defaultContract: boolean;
8
+ loadType: string;
9
+ name: string;
10
+ quoteVisible: boolean;
11
+ unitType: string;
12
+ }
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Accessorial_Entity type guard.
3
+ *
4
+ * @param {any} accessorialJson Accessorial object from API
5
+ * @returns {boolean} Return true if type is Accessorial_Entity
6
+ */
7
+ function validator(accessorialJson) {
8
+ if (typeof accessorialJson === "object" && accessorialJson != null) {
9
+ Accessorial_Entity.requiredFields.forEach((element) => {
10
+ if (!Object.keys(accessorialJson).includes(element))
11
+ console.log(`Field ${element} is null or undefined`);
12
+ });
13
+ }
14
+ return true;
15
+ }
16
+ export default class Accessorial_Entity {
17
+ static requiredFields = ["id"];
18
+ constructor(accessorialJson) {
19
+ if (validator(accessorialJson)) {
20
+ this.accessorialId = accessorialJson.accessorialId;
21
+ this.costAmount = accessorialJson.costAmount;
22
+ this.customerId = accessorialJson.customerId;
23
+ this.defaultContract = accessorialJson.defaultContract;
24
+ this.loadType = accessorialJson.loadType;
25
+ this.name = accessorialJson.name;
26
+ this.quoteVisible = accessorialJson.quoteVisible;
27
+ this.unitType = accessorialJson.unitType;
28
+ }
29
+ else
30
+ throw new Error(`Failed to create new instance of ${Accessorial_Entity.name}`);
31
+ }
32
+ accessorialId;
33
+ costAmount;
34
+ customerId;
35
+ defaultContract;
36
+ loadType;
37
+ name;
38
+ quoteVisible;
39
+ unitType;
40
+ }
41
+ //# sourceMappingURL=accessorial.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accessorial.js","sourceRoot":"","sources":["../../../src/entities/accessorial/accessorial.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,SAAS,SAAS,CAChB,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,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,kBAAkB;IACrC,MAAM,CAAC,cAAc,GAAG,CAAC,IAAI,CAAC,CAAC;IAE/B,YAAY,eAAwB;QAClC,IAAI,SAAS,CAAC,eAAe,CAAC,EAAE;YAC9B,IAAI,CAAC,aAAa,GAAG,eAAe,CAAC,aAAa,CAAC;YACnD,IAAI,CAAC,UAAU,GAAG,eAAe,CAAC,UAAU,CAAC;YAC7C,IAAI,CAAC,UAAU,GAAG,eAAe,CAAC,UAAU,CAAC;YAC7C,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC,eAAe,CAAC;YACvD,IAAI,CAAC,QAAQ,GAAG,eAAe,CAAC,QAAQ,CAAC;YACzC,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC;YACjC,IAAI,CAAC,YAAY,GAAG,eAAe,CAAC,YAAY,CAAC;YACjD,IAAI,CAAC,QAAQ,GAAG,eAAe,CAAC,QAAQ,CAAC;SAC1C;;YACC,MAAM,IAAI,KAAK,CACb,oCAAoC,kBAAkB,CAAC,IAAI,EAAE,CAC9D,CAAC;IACN,CAAC;IAED,aAAa,CAAS;IACtB,UAAU,CAAS;IACnB,UAAU,CAAS;IACnB,eAAe,CAAU;IACzB,QAAQ,CAAS;IACjB,IAAI,CAAS;IACb,YAAY,CAAU;IACtB,QAAQ,CAAS"}
@@ -0,0 +1,5 @@
1
+ import Accessorial_Entity from "./accessorial";
2
+ export default class Accessorial extends Accessorial_Entity {
3
+ static fromList(accessorialsJSON: unknown): Array<Accessorial>;
4
+ toJson(): string;
5
+ }
@@ -0,0 +1,16 @@
1
+ import Accessorial_Entity from "./accessorial";
2
+ export default class Accessorial extends Accessorial_Entity {
3
+ static fromList(accessorialsJSON) {
4
+ const accessorials = [];
5
+ if (accessorialsJSON)
6
+ Array.isArray(accessorialsJSON) &&
7
+ accessorialsJSON.forEach((accessorialJSON) => {
8
+ accessorials.push(new Accessorial(accessorialJSON));
9
+ });
10
+ return accessorials;
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/accessorial/helper.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,eAAe,CAAC;AAC/C,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,kBAAkB;IACzD,MAAM,CAAC,QAAQ,CAAC,gBAAyB;QACvC,MAAM,YAAY,GAAkB,EAAE,CAAC;QACvC,IAAI,gBAAgB;YAClB,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC;gBAC7B,gBAAgB,CAAC,OAAO,CAAC,CAAC,eAAe,EAAE,EAAE;oBAC3C,YAAY,CAAC,IAAI,CAAC,IAAI,WAAW,CAAC,eAAe,CAAC,CAAC,CAAC;gBACtD,CAAC,CAAC,CAAC;QACP,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export { default as Accessorial } from "./helper";
2
+ export { default as Accessorial_Entity } from "./accessorial";
@@ -0,0 +1,3 @@
1
+ export { default as Accessorial } from "./helper";
2
+ export { default as Accessorial_Entity } from "./accessorial";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/accessorial/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { Accessorial_Entity } from "../accessorial";
2
+ export default class Accessorials_Entity {
3
+ static requiredFields: never[];
4
+ constructor(accessorialsJson: unknown);
5
+ ltlAccessorials: Accessorial_Entity[];
6
+ tlAccessorials: Accessorial_Entity[];
7
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Accessorials_Entity type guard.
3
+ *
4
+ * @param {any} accessorialsJson Accessorials object from API
5
+ * @returns {boolean} Return true if type is Accessorials_Entity
6
+ */
7
+ function validator(accessorialsJson) {
8
+ if (typeof accessorialsJson === "object" && accessorialsJson != null) {
9
+ Accessorials_Entity.requiredFields.forEach((element) => {
10
+ if (!Object.keys(accessorialsJson).includes(element))
11
+ console.log(`Field ${element} is null or undefined`);
12
+ });
13
+ }
14
+ return true;
15
+ }
16
+ export default class Accessorials_Entity {
17
+ static requiredFields = [];
18
+ constructor(accessorialsJson) {
19
+ if (validator(accessorialsJson)) {
20
+ this.ltlAccessorials = accessorialsJson.ltlAccessorials;
21
+ this.tlAccessorials = accessorialsJson.tlAccessorials;
22
+ }
23
+ else
24
+ throw new Error(`Failed to create new instance of ${Accessorials_Entity.name}`);
25
+ }
26
+ ltlAccessorials;
27
+ tlAccessorials;
28
+ }
29
+ //# sourceMappingURL=accessorials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accessorials.js","sourceRoot":"","sources":["../../../src/entities/accessorials/accessorials.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,SAAS,SAAS,CAChB,gBAAyB;IAEzB,IAAI,OAAO,gBAAgB,KAAK,QAAQ,IAAI,gBAAgB,IAAI,IAAI,EAAE;QACpE,mBAAmB,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YACrD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;gBAClD,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,mBAAmB;IACtC,MAAM,CAAC,cAAc,GAAG,EAAE,CAAC;IAE3B,YAAY,gBAAyB;QACnC,IAAI,SAAS,CAAC,gBAAgB,CAAC,EAAE;YAC/B,IAAI,CAAC,eAAe,GAAG,gBAAgB,CAAC,eAAe,CAAC;YACxD,IAAI,CAAC,cAAc,GAAG,gBAAgB,CAAC,cAAc,CAAC;SACvD;;YACC,MAAM,IAAI,KAAK,CACb,oCAAoC,mBAAmB,CAAC,IAAI,EAAE,CAC/D,CAAC;IACN,CAAC;IAED,eAAe,CAAuB;IACtC,cAAc,CAAuB"}
@@ -0,0 +1,5 @@
1
+ import Accessorials_Entity from "./accessorials";
2
+ export default class Accessorials extends Accessorials_Entity {
3
+ static fromList(accessorialssJSON: unknown): Array<Accessorials>;
4
+ toJson(): string;
5
+ }
@@ -0,0 +1,16 @@
1
+ import Accessorials_Entity from "./accessorials";
2
+ export default class Accessorials extends Accessorials_Entity {
3
+ static fromList(accessorialssJSON) {
4
+ const accessorialss = [];
5
+ if (accessorialssJSON)
6
+ Array.isArray(accessorialssJSON) &&
7
+ accessorialssJSON.forEach((accessorialsJSON) => {
8
+ accessorialss.push(new Accessorials(accessorialsJSON));
9
+ });
10
+ return accessorialss;
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/accessorials/helper.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,MAAM,gBAAgB,CAAC;AACjD,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,mBAAmB;IAC3D,MAAM,CAAC,QAAQ,CAAC,iBAA0B;QACxC,MAAM,aAAa,GAAmB,EAAE,CAAC;QACzC,IAAI,iBAAiB;YACnB,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC;gBAC9B,iBAAiB,CAAC,OAAO,CAAC,CAAC,gBAAgB,EAAE,EAAE;oBAC7C,aAAa,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,gBAAgB,CAAC,CAAC,CAAC;gBACzD,CAAC,CAAC,CAAC;QACP,OAAO,aAAa,CAAC;IACvB,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export { default as Accessorials } from "./helper";
2
+ export { default as Accessorials_Entity } from "./accessorials";
@@ -0,0 +1,3 @@
1
+ export { default as Accessorials } from "./helper";
2
+ export { default as Accessorials_Entity } from "./accessorials";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/accessorials/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,16 +1,16 @@
1
- export default class Customer_Entity {
2
- static requiredFields: string[];
3
- constructor(customerJson: unknown);
4
- id: number;
5
- name: string;
6
- company_id: number;
7
- credit_on_hold: boolean;
8
- inactivity_hold: boolean;
9
- credit_term_id: number;
10
- line1: string;
11
- city: string;
12
- state: string;
13
- zip: string;
14
- is_active: boolean;
15
- credit_term_name: string;
16
- }
1
+ export default class Customer_Entity {
2
+ static requiredFields: string[];
3
+ constructor(customerJson: unknown);
4
+ id: number;
5
+ name: string;
6
+ company_id: number;
7
+ credit_on_hold: boolean;
8
+ inactivity_hold: boolean;
9
+ credit_term_id: number;
10
+ line1: string;
11
+ city: string;
12
+ state: string;
13
+ zip: string;
14
+ is_active: boolean;
15
+ credit_term_name: string;
16
+ }
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Customer type guard.
3
+ *
4
+ * @param {any} customerJson Customer object from API
5
+ * @returns {boolean} Return true if type is Customer_Entity
6
+ */
7
+ function isCustomer_Entity(customerJson) {
8
+ if (typeof customerJson === "object" && customerJson != null) {
9
+ Customer_Entity.requiredFields.forEach((element) => {
10
+ if (!Object.keys(customerJson).includes(element))
11
+ throw new Error(`Field ${element} is null or undefined`);
12
+ });
13
+ }
14
+ return true;
15
+ }
16
+ export default class Customer_Entity {
17
+ static requiredFields = [
18
+ "id",
19
+ "name",
20
+ "company_id",
21
+ "credit_on_hold",
22
+ "inactivity_hold",
23
+ "credit_term_id",
24
+ "line1",
25
+ "city",
26
+ "state",
27
+ "zip",
28
+ "is_active",
29
+ "credit_term_name",
30
+ ];
31
+ constructor(customerJson) {
32
+ if (isCustomer_Entity(customerJson)) {
33
+ this.id = customerJson.id;
34
+ this.name = customerJson.name;
35
+ this.company_id = customerJson.company_id;
36
+ this.credit_on_hold = customerJson.credit_on_hold;
37
+ this.inactivity_hold = customerJson.inactivity_hold;
38
+ this.credit_term_id = customerJson.credit_term_id;
39
+ this.line1 = customerJson.line1;
40
+ this.city = customerJson.city;
41
+ this.state = customerJson.state;
42
+ this.zip = customerJson.zip;
43
+ this.is_active = customerJson.is_active;
44
+ this.credit_term_name = customerJson.credit_term_name;
45
+ }
46
+ else {
47
+ throw new Error(`Failed to create new instance of ${Customer_Entity.name}`);
48
+ }
49
+ }
50
+ id;
51
+ name;
52
+ company_id;
53
+ credit_on_hold;
54
+ inactivity_hold;
55
+ credit_term_id;
56
+ line1;
57
+ city;
58
+ state;
59
+ zip;
60
+ is_active;
61
+ credit_term_name;
62
+ }
63
+ //# sourceMappingURL=customer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customer.js","sourceRoot":"","sources":["../../../src/entities/customer/customer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,SAAS,iBAAiB,CACxB,YAAqB;IAErB,IAAI,OAAO,YAAY,KAAK,QAAQ,IAAI,YAAY,IAAI,IAAI,EAAE;QAC5D,eAAe,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YACjD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;gBAC9C,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,eAAe;IAClC,MAAM,CAAC,cAAc,GAAG;QACtB,IAAI;QACJ,MAAM;QACN,YAAY;QACZ,gBAAgB;QAChB,iBAAiB;QACjB,gBAAgB;QAChB,OAAO;QACP,MAAM;QACN,OAAO;QACP,KAAK;QACL,WAAW;QACX,kBAAkB;KACnB,CAAC;IAEF,YAAY,YAAqB;QAC/B,IAAI,iBAAiB,CAAC,YAAY,CAAC,EAAE;YACnC,IAAI,CAAC,EAAE,GAAG,YAAY,CAAC,EAAE,CAAC;YAC1B,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;YAC9B,IAAI,CAAC,UAAU,GAAG,YAAY,CAAC,UAAU,CAAC;YAC1C,IAAI,CAAC,cAAc,GAAG,YAAY,CAAC,cAAc,CAAC;YAClD,IAAI,CAAC,eAAe,GAAG,YAAY,CAAC,eAAe,CAAC;YACpD,IAAI,CAAC,cAAc,GAAG,YAAY,CAAC,cAAc,CAAC;YAClD,IAAI,CAAC,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC;YAChC,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;YAC9B,IAAI,CAAC,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC;YAChC,IAAI,CAAC,GAAG,GAAG,YAAY,CAAC,GAAG,CAAC;YAC5B,IAAI,CAAC,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC;YACxC,IAAI,CAAC,gBAAgB,GAAG,YAAY,CAAC,gBAAgB,CAAC;SACvD;aAAM;YACL,MAAM,IAAI,KAAK,CACb,oCAAoC,eAAe,CAAC,IAAI,EAAE,CAC3D,CAAC;SACH;IACH,CAAC;IAED,EAAE,CAAS;IACX,IAAI,CAAS;IACb,UAAU,CAAS;IACnB,cAAc,CAAU;IACxB,eAAe,CAAU;IACzB,cAAc,CAAS;IACvB,KAAK,CAAS;IACd,IAAI,CAAS;IACb,KAAK,CAAS;IACd,GAAG,CAAS;IACZ,SAAS,CAAU;IACnB,gBAAgB,CAAS"}
@@ -1,5 +1,5 @@
1
- import Customer_Entity from "./customer";
2
- export default class Customer extends Customer_Entity {
3
- static fromList(customersJSON: unknown): Array<Customer>;
4
- toJson(): string;
5
- }
1
+ import Customer_Entity from "./customer";
2
+ export default class Customer extends Customer_Entity {
3
+ static fromList(customersJSON: unknown): Array<Customer>;
4
+ toJson(): string;
5
+ }
@@ -0,0 +1,16 @@
1
+ import Customer_Entity from "./customer";
2
+ export default class Customer extends Customer_Entity {
3
+ static fromList(customersJSON) {
4
+ const customers = [];
5
+ if (customersJSON)
6
+ Array.isArray(customersJSON) &&
7
+ customersJSON.forEach((userJSON) => {
8
+ customers.push(new Customer(userJSON));
9
+ });
10
+ return customers;
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/customer/helper.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,YAAY,CAAC;AAEzC,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,eAAe;IACnD,MAAM,CAAC,QAAQ,CAAC,aAAsB;QACpC,MAAM,SAAS,GAAe,EAAE,CAAC;QACjC,IAAI,aAAa;YACf,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC;gBAC1B,aAAa,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;oBACjC,SAAS,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACzC,CAAC,CAAC,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF"}
@@ -1 +1 @@
1
- export * from "./customer";
1
+ export * from "./customer";
@@ -0,0 +1,2 @@
1
+ export * from "./customer";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/customer/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -0,0 +1,5 @@
1
+ import Holiday_Entity from "./holiday";
2
+ export default class Holiday extends Holiday_Entity {
3
+ static fromList(holidaysJSON: unknown): Array<Holiday>;
4
+ toJson(): string;
5
+ }
@@ -0,0 +1,16 @@
1
+ import Holiday_Entity from "./holiday";
2
+ export default class Holiday extends Holiday_Entity {
3
+ static fromList(holidaysJSON) {
4
+ const holidays = [];
5
+ if (holidaysJSON)
6
+ Array.isArray(holidaysJSON) &&
7
+ holidaysJSON.forEach((holidayJSON) => {
8
+ holidays.push(new Holiday(holidayJSON));
9
+ });
10
+ return holidays;
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/holiday/helper.ts"],"names":[],"mappings":"AAAA,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;CACF"}
@@ -0,0 +1,7 @@
1
+ export default class Holiday_Entity {
2
+ static requiredFields: string[];
3
+ constructor(holidayJson: unknown);
4
+ id: number;
5
+ date: string;
6
+ name: string;
7
+ }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Holiday_Entity type guard.
3
+ *
4
+ * @param {any} holidayJson Holiday object from API
5
+ * @returns {boolean} Return true if type is Holiday_Entity
6
+ */
7
+ function validator(holidayJson) {
8
+ if (typeof holidayJson === "object" && holidayJson != null) {
9
+ Holiday_Entity.requiredFields.forEach((element) => {
10
+ if (!Object.keys(holidayJson).includes(element))
11
+ console.log(`Field ${element} is null or undefined`);
12
+ });
13
+ }
14
+ return true;
15
+ }
16
+ export default class Holiday_Entity {
17
+ static requiredFields = ["id"];
18
+ constructor(holidayJson) {
19
+ if (validator(holidayJson)) {
20
+ this.id = holidayJson.id;
21
+ this.date = holidayJson.date;
22
+ this.name = holidayJson.name;
23
+ }
24
+ else
25
+ throw new Error(`Failed to create new instance of ${Holiday_Entity.name}`);
26
+ }
27
+ id;
28
+ date;
29
+ name;
30
+ }
31
+ //# sourceMappingURL=holiday.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"holiday.js","sourceRoot":"","sources":["../../../src/entities/holiday/holiday.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,SAAS,SAAS,CAAC,WAAoB;IACrC,IAAI,OAAO,WAAW,KAAK,QAAQ,IAAI,WAAW,IAAI,IAAI,EAAE;QAC1D,cAAc,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAChD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;gBAC7C,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,cAAc;IACjC,MAAM,CAAC,cAAc,GAAG,CAAC,IAAI,CAAC,CAAC;IAE/B,YAAY,WAAoB;QAC9B,IAAI,SAAS,CAAC,WAAW,CAAC,EAAE;YAC1B,IAAI,CAAC,EAAE,GAAG,WAAW,CAAC,EAAE,CAAC;YACzB,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC;YAC7B,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC;SAC9B;;YACC,MAAM,IAAI,KAAK,CACb,oCAAoC,cAAc,CAAC,IAAI,EAAE,CAC1D,CAAC;IACN,CAAC;IAED,EAAE,CAAS;IACX,IAAI,CAAS;IACb,IAAI,CAAS"}
@@ -0,0 +1,2 @@
1
+ export { default as Holiday } from "./helper";
2
+ export { default as Holiday_Entity } from "./holiday";
@@ -0,0 +1,3 @@
1
+ export { default as Holiday } from "./helper";
2
+ export { default as Holiday_Entity } from "./holiday";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/holiday/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,12 @@
1
+ export * from "./accessorial";
2
+ export * from "./accessorials";
3
+ export * from "./customer";
4
+ export * from "./holiday";
5
+ export * from "./load";
6
+ export * from "./loadAdjustment";
7
+ export * from "./location";
8
+ export * from "./marketCosts";
9
+ export * from "./quote";
10
+ export * from "./quoteAccessorial";
11
+ export * from "./quoteResponse";
12
+ export * from "./shipcon";
@@ -0,0 +1,13 @@
1
+ export * from "./accessorial";
2
+ export * from "./accessorials";
3
+ export * from "./customer";
4
+ export * from "./holiday";
5
+ export * from "./load";
6
+ export * from "./loadAdjustment";
7
+ export * from "./location";
8
+ export * from "./marketCosts";
9
+ export * from "./quote";
10
+ export * from "./quoteAccessorial";
11
+ export * from "./quoteResponse";
12
+ export * from "./shipcon";
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC"}
@@ -0,0 +1,6 @@
1
+ import Load_Entity from "./load";
2
+ export default class Load extends Load_Entity {
3
+ static fromList(loadsJSON: unknown): Array<Load>;
4
+ toJson(): string;
5
+ appointmentDateAndTime(): string;
6
+ }
@@ -0,0 +1,28 @@
1
+ import moment from "moment";
2
+ import Load_Entity from "./load";
3
+ export default class Load extends Load_Entity {
4
+ static fromList(loadsJSON) {
5
+ const loads = [];
6
+ if (loadsJSON)
7
+ Array.isArray(loadsJSON) &&
8
+ loadsJSON.forEach((loadJSON) => {
9
+ loads.push(new Load(loadJSON));
10
+ });
11
+ return loads;
12
+ }
13
+ toJson() {
14
+ return JSON.stringify(this);
15
+ }
16
+ appointmentDateAndTime() {
17
+ const date = moment(this.pickupDate).format("MM/DD");
18
+ const time = [];
19
+ if (this.pickupTimeFrom) {
20
+ time.push(moment(this.pickupTimeFrom).utc().format("HH:mm"));
21
+ }
22
+ if (this.pickupTimeTo && this.pickupTimeFrom != this.pickupTimeTo) {
23
+ time.push(moment(this.pickupTimeTo).utc().format("HH:mm"));
24
+ }
25
+ return `${date} ${time.join("-")}`;
26
+ }
27
+ }
28
+ //# sourceMappingURL=helper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../src/entities/load/helper.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,WAAW,MAAM,QAAQ,CAAC;AACjC,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,WAAW;IAC3C,MAAM,CAAC,QAAQ,CAAC,SAAkB;QAChC,MAAM,KAAK,GAAW,EAAE,CAAC;QACzB,IAAI,SAAS;YACX,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;gBACtB,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;oBAC7B,KAAK,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACjC,CAAC,CAAC,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED,sBAAsB;QACpB,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACrD,MAAM,IAAI,GAAG,EAAE,CAAC;QAChB,IAAI,IAAI,CAAC,cAAc,EAAE;YACvB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;SAC9D;QACD,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,YAAY,EAAE;YACjE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;SAC5D;QAED,OAAO,GAAG,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IACrC,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export { default as Load } from "./helper";
2
+ export { default as Load_Entity } from "./load";
@@ -0,0 +1,3 @@
1
+ export { default as Load } from "./helper";
2
+ export { default as Load_Entity } from "./load";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/load/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAC"}
@@ -0,0 +1,102 @@
1
+ import { Shipcon } from "../shipcon";
2
+ export default class Load_Entity {
3
+ static requiredFields: string[];
4
+ constructor(loadJson: unknown);
5
+ id: number;
6
+ quoteID?: number;
7
+ referenceNumber?: string;
8
+ enteredDate?: string;
9
+ releasedDate?: string;
10
+ receivedDate?: string;
11
+ invoiceDate?: string;
12
+ customerID?: number;
13
+ customer?: string;
14
+ customerType?: string;
15
+ serviceLevel?: string;
16
+ loadType?: string;
17
+ commodityDescription?: string;
18
+ reeferTemp?: number;
19
+ weight?: number;
20
+ feet?: number;
21
+ pallets?: number;
22
+ baserate?: number;
23
+ accessorials?: number;
24
+ totalRate?: number;
25
+ realCost?: number;
26
+ projectedCost?: number;
27
+ projectedMargin?: number;
28
+ margin?: number;
29
+ projectedMarginPercent?: number;
30
+ marginPercent?: number;
31
+ heading?: string;
32
+ fuelCost?: number;
33
+ bookedBy?: string;
34
+ bookedByID?: number;
35
+ cancelled?: boolean;
36
+ arrived?: boolean;
37
+ pending?: boolean;
38
+ active?: boolean;
39
+ status?: string;
40
+ miles?: number;
41
+ contractRateRecordID?: number;
42
+ truckOrderNotUsed?: boolean;
43
+ seal?: string;
44
+ notes?: string;
45
+ carrierPay?: number;
46
+ carrierComment?: string;
47
+ carrierNotes?: string;
48
+ referenceCode?: number;
49
+ resync?: boolean;
50
+ contractPriceFinalized?: boolean;
51
+ dispatched?: boolean;
52
+ doNotBreakSeal?: boolean;
53
+ personID?: number;
54
+ weekNumber?: number;
55
+ delWeekNumber?: number;
56
+ masterBol?: string;
57
+ dryvanOnly?: boolean;
58
+ zeroCostApproved?: boolean;
59
+ codLoad?: boolean;
60
+ hotTag?: boolean;
61
+ hotTagDescription?: string;
62
+ localMove?: boolean;
63
+ loadPreferredCarrierType?: string;
64
+ noSplit?: boolean;
65
+ pickupDate?: string;
66
+ pickupTimeFrom?: string;
67
+ pickupTimeTo?: string;
68
+ deliveryDate?: string;
69
+ deliveryTimeFrom?: string;
70
+ deliveryTimeTo?: string;
71
+ shipperStopNumber?: number;
72
+ shipperAreaID?: number;
73
+ shipperName?: string;
74
+ shipperAreaName?: string;
75
+ shipperCity?: string;
76
+ shipperState?: string;
77
+ shipperZipcode?: string;
78
+ consigneeAreaID?: number;
79
+ consigneeName?: string;
80
+ consigneeAreaName?: string;
81
+ consigneeCity?: string;
82
+ consigneeState?: string;
83
+ consigneeZipcode?: string;
84
+ consigneeStopNumber?: number;
85
+ assetUpdateID?: number;
86
+ lastLocLatitude?: number;
87
+ lastLocLongitude?: number;
88
+ lastLocTransactionTimeUTC?: string;
89
+ lastLocTransactionTimeLocal?: string;
90
+ lastLocCity?: string;
91
+ lastLocState?: string;
92
+ LTLReferenceID?: string;
93
+ cargoValue?: string;
94
+ shipperSCID?: number;
95
+ consigneeSCID?: number;
96
+ brokered?: boolean;
97
+ rateType?: string;
98
+ shipcons: Array<Shipcon>;
99
+ railAssetPrefix?: string;
100
+ railAssetCode?: string;
101
+ railAssetType?: string;
102
+ }