@nerdjs/sales-kit 2.0.38 → 2.0.40

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 (262) hide show
  1. package/dist/entities/appointmentArrival/appointmentArrival.d.ts +36 -0
  2. package/dist/entities/appointmentArrival/appointmentArrival.js +90 -0
  3. package/dist/entities/appointmentArrival/appointmentArrival.js.map +1 -0
  4. package/dist/entities/appointmentArrival/helper.d.ts +5 -0
  5. package/dist/entities/appointmentArrival/helper.js +16 -0
  6. package/dist/entities/appointmentArrival/helper.js.map +1 -0
  7. package/dist/entities/appointmentArrival/index.d.ts +2 -0
  8. package/dist/entities/appointmentArrival/index.js +3 -0
  9. package/dist/entities/appointmentArrival/index.js.map +1 -0
  10. package/dist/entities/carrierTender/carrierTender.d.ts +69 -0
  11. package/dist/entities/carrierTender/carrierTender.js +160 -0
  12. package/dist/entities/carrierTender/carrierTender.js.map +1 -0
  13. package/dist/entities/carrierTender/helper.d.ts +5 -0
  14. package/dist/entities/carrierTender/helper.js +16 -0
  15. package/dist/entities/carrierTender/helper.js.map +1 -0
  16. package/dist/entities/carrierTender/index.d.ts +2 -0
  17. package/dist/entities/carrierTender/index.js +3 -0
  18. package/dist/entities/carrierTender/index.js.map +1 -0
  19. package/dist/entities/company/company.d.ts +17 -0
  20. package/dist/entities/company/company.js +51 -0
  21. package/dist/entities/company/company.js.map +1 -0
  22. package/dist/entities/company/helper.d.ts +5 -0
  23. package/dist/entities/company/helper.js +16 -0
  24. package/dist/entities/company/helper.js.map +1 -0
  25. package/dist/entities/company/index.d.ts +2 -0
  26. package/dist/entities/company/index.js +3 -0
  27. package/dist/entities/company/index.js.map +1 -0
  28. package/dist/entities/contact/contact.d.ts +19 -0
  29. package/dist/entities/contact/contact.js +55 -0
  30. package/dist/entities/contact/contact.js.map +1 -0
  31. package/dist/entities/contact/helper.d.ts +5 -0
  32. package/dist/entities/contact/helper.js +16 -0
  33. package/dist/entities/contact/helper.js.map +1 -0
  34. package/dist/entities/contact/index.d.ts +2 -0
  35. package/dist/entities/contact/index.js +3 -0
  36. package/dist/entities/contact/index.js.map +1 -0
  37. package/dist/entities/customerV1/customerV1.d.ts +138 -0
  38. package/dist/entities/customerV1/customerV1.js +278 -0
  39. package/dist/entities/customerV1/customerV1.js.map +1 -0
  40. package/dist/entities/customerV1/helper.d.ts +5 -0
  41. package/dist/entities/customerV1/helper.js +16 -0
  42. package/dist/entities/customerV1/helper.js.map +1 -0
  43. package/dist/entities/customerV1/index.d.ts +2 -0
  44. package/dist/entities/customerV1/index.js +3 -0
  45. package/dist/entities/customerV1/index.js.map +1 -0
  46. package/dist/entities/customersAccessorial/customersAccessorial.d.ts +20 -0
  47. package/dist/entities/customersAccessorial/customersAccessorial.js +58 -0
  48. package/dist/entities/customersAccessorial/customersAccessorial.js.map +1 -0
  49. package/dist/entities/customersAccessorial/helper.d.ts +5 -0
  50. package/dist/entities/customersAccessorial/helper.js +16 -0
  51. package/dist/entities/customersAccessorial/helper.js.map +1 -0
  52. package/dist/entities/customersAccessorial/index.d.ts +2 -0
  53. package/dist/entities/customersAccessorial/index.js +3 -0
  54. package/dist/entities/customersAccessorial/index.js.map +1 -0
  55. package/dist/entities/flag/flag.d.ts +9 -0
  56. package/dist/entities/flag/flag.js +35 -0
  57. package/dist/entities/flag/flag.js.map +1 -0
  58. package/dist/entities/flag/helper.d.ts +5 -0
  59. package/dist/entities/flag/helper.js +16 -0
  60. package/dist/entities/flag/helper.js.map +1 -0
  61. package/dist/entities/flag/index.d.ts +2 -0
  62. package/dist/entities/flag/index.js +3 -0
  63. package/dist/entities/flag/index.js.map +1 -0
  64. package/dist/entities/hosLog/helper.d.ts +5 -0
  65. package/dist/entities/hosLog/helper.js +16 -0
  66. package/dist/entities/hosLog/helper.js.map +1 -0
  67. package/dist/entities/hosLog/hosLog.d.ts +38 -0
  68. package/dist/entities/hosLog/hosLog.js +93 -0
  69. package/dist/entities/hosLog/hosLog.js.map +1 -0
  70. package/dist/entities/hosLog/index.d.ts +2 -0
  71. package/dist/entities/hosLog/index.js +3 -0
  72. package/dist/entities/hosLog/index.js.map +1 -0
  73. package/dist/entities/index.d.ts +17 -0
  74. package/dist/entities/index.js +17 -0
  75. package/dist/entities/index.js.map +1 -1
  76. package/dist/entities/loadChange/helper.d.ts +5 -0
  77. package/dist/entities/loadChange/helper.js +16 -0
  78. package/dist/entities/loadChange/helper.js.map +1 -0
  79. package/dist/entities/loadChange/index.d.ts +2 -0
  80. package/dist/entities/loadChange/index.js +3 -0
  81. package/dist/entities/loadChange/index.js.map +1 -0
  82. package/dist/entities/loadChange/loadChange.d.ts +11 -0
  83. package/dist/entities/loadChange/loadChange.js +39 -0
  84. package/dist/entities/loadChange/loadChange.js.map +1 -0
  85. package/dist/entities/location/location.js +2 -2
  86. package/dist/entities/location/location.js.map +1 -1
  87. package/dist/entities/notification/helper.d.ts +5 -0
  88. package/dist/entities/notification/helper.js +16 -0
  89. package/dist/entities/notification/helper.js.map +1 -0
  90. package/dist/entities/notification/index.d.ts +2 -0
  91. package/dist/entities/notification/index.js +3 -0
  92. package/dist/entities/notification/index.js.map +1 -0
  93. package/dist/entities/notification/notification.d.ts +14 -0
  94. package/dist/entities/notification/notification.js +45 -0
  95. package/dist/entities/notification/notification.js.map +1 -0
  96. package/dist/entities/notificationSubscription/helper.d.ts +5 -0
  97. package/dist/entities/notificationSubscription/helper.js +16 -0
  98. package/dist/entities/notificationSubscription/helper.js.map +1 -0
  99. package/dist/entities/notificationSubscription/index.d.ts +2 -0
  100. package/dist/entities/notificationSubscription/index.js +3 -0
  101. package/dist/entities/notificationSubscription/index.js.map +1 -0
  102. package/dist/entities/notificationSubscription/notificationSubscription.d.ts +14 -0
  103. package/dist/entities/notificationSubscription/notificationSubscription.js +46 -0
  104. package/dist/entities/notificationSubscription/notificationSubscription.js.map +1 -0
  105. package/dist/entities/notificationUserSubscription/helper.d.ts +5 -0
  106. package/dist/entities/notificationUserSubscription/helper.js +16 -0
  107. package/dist/entities/notificationUserSubscription/helper.js.map +1 -0
  108. package/dist/entities/notificationUserSubscription/index.d.ts +2 -0
  109. package/dist/entities/notificationUserSubscription/index.js +3 -0
  110. package/dist/entities/notificationUserSubscription/index.js.map +1 -0
  111. package/dist/entities/notificationUserSubscription/notificationUserSubscription.d.ts +15 -0
  112. package/dist/entities/notificationUserSubscription/notificationUserSubscription.js +47 -0
  113. package/dist/entities/notificationUserSubscription/notificationUserSubscription.js.map +1 -0
  114. package/dist/entities/person/helper.d.ts +5 -0
  115. package/dist/entities/person/helper.js +16 -0
  116. package/dist/entities/person/helper.js.map +1 -0
  117. package/dist/entities/person/index.d.ts +2 -0
  118. package/dist/entities/person/index.js +3 -0
  119. package/dist/entities/person/index.js.map +1 -0
  120. package/dist/entities/person/person.d.ts +46 -0
  121. package/dist/entities/person/person.js +108 -0
  122. package/dist/entities/person/person.js.map +1 -0
  123. package/dist/entities/quoteRateRecord/helper.d.ts +5 -0
  124. package/dist/entities/quoteRateRecord/helper.js +16 -0
  125. package/dist/entities/quoteRateRecord/helper.js.map +1 -0
  126. package/dist/entities/quoteRateRecord/index.d.ts +2 -0
  127. package/dist/entities/quoteRateRecord/index.js +3 -0
  128. package/dist/entities/quoteRateRecord/index.js.map +1 -0
  129. package/dist/entities/quoteRateRecord/quoteRateRecord.d.ts +50 -0
  130. package/dist/entities/quoteRateRecord/quoteRateRecord.js +121 -0
  131. package/dist/entities/quoteRateRecord/quoteRateRecord.js.map +1 -0
  132. package/dist/entities/rateReview/helper.d.ts +5 -0
  133. package/dist/entities/rateReview/helper.js +16 -0
  134. package/dist/entities/rateReview/helper.js.map +1 -0
  135. package/dist/entities/rateReview/index.d.ts +2 -0
  136. package/dist/entities/rateReview/index.js +3 -0
  137. package/dist/entities/rateReview/index.js.map +1 -0
  138. package/dist/entities/rateReview/rateReview.d.ts +49 -0
  139. package/dist/entities/rateReview/rateReview.js +116 -0
  140. package/dist/entities/rateReview/rateReview.js.map +1 -0
  141. package/dist/entities/unitV1/helper.d.ts +5 -0
  142. package/dist/entities/unitV1/helper.js +16 -0
  143. package/dist/entities/unitV1/helper.js.map +1 -0
  144. package/dist/entities/unitV1/index.d.ts +2 -0
  145. package/dist/entities/unitV1/index.js +3 -0
  146. package/dist/entities/unitV1/index.js.map +1 -0
  147. package/dist/entities/unitV1/unit.d.ts +11 -0
  148. package/dist/entities/unitV1/unit.js +39 -0
  149. package/dist/entities/unitV1/unit.js.map +1 -0
  150. package/dist/entities/workflowEvent/helper.d.ts +5 -0
  151. package/dist/entities/workflowEvent/helper.js +16 -0
  152. package/dist/entities/workflowEvent/helper.js.map +1 -0
  153. package/dist/entities/workflowEvent/index.d.ts +2 -0
  154. package/dist/entities/workflowEvent/index.js +3 -0
  155. package/dist/entities/workflowEvent/index.js.map +1 -0
  156. package/dist/entities/workflowEvent/workflowEvent.d.ts +34 -0
  157. package/dist/entities/workflowEvent/workflowEvent.js +87 -0
  158. package/dist/entities/workflowEvent/workflowEvent.js.map +1 -0
  159. package/dist/hooks/customer/customerAutocomplete.d.ts +7 -7
  160. package/dist/hooks/customer/customerAutocomplete.js +12 -13
  161. package/dist/hooks/customer/customerAutocomplete.js.map +1 -1
  162. package/dist/hooks/locationsForm/locationsForm.js +11 -6
  163. package/dist/hooks/locationsForm/locationsForm.js.map +1 -1
  164. package/dist/hooks/locationsForm/locationsFormSales.js +17 -13
  165. package/dist/hooks/locationsForm/locationsFormSales.js.map +1 -1
  166. package/dist/hooks/quote/form.js +21 -8
  167. package/dist/hooks/quote/form.js.map +1 -1
  168. package/dist/hooks/quote/helpers.d.ts +21 -10
  169. package/dist/hooks/quote/helpers.js +29 -10
  170. package/dist/hooks/quote/helpers.js.map +1 -1
  171. package/dist/hooks/quote/result.js +1 -0
  172. package/dist/hooks/quote/result.js.map +1 -1
  173. package/dist/hooks/tender/form.js +11 -16
  174. package/dist/hooks/tender/form.js.map +1 -1
  175. package/dist/hooks/tender/helpers.d.ts +4 -4
  176. package/dist/hooks/tender/helpers.js +1 -1
  177. package/dist/hooks/tender/helpers.js.map +1 -1
  178. package/dist/redux/api/salesApi.d.ts +1 -1
  179. package/dist/redux/api/salesApi.js +9 -0
  180. package/dist/redux/api/salesApi.js.map +1 -1
  181. package/dist/redux/appointmentIssue/appointmentIssueEndpoints.d.ts +10 -10
  182. package/dist/redux/appointmentIssueCategory/appointmentIssueCategoryEndpoints.d.ts +11 -11
  183. package/dist/redux/appointmentIssueSubcategory/appointmentIssueSubcategoryEndpoints.d.ts +10 -10
  184. package/dist/redux/appointmentNote/appointmentNoteEndpoints.d.ts +10 -10
  185. package/dist/redux/appointmentNoteType/appointmentNoteTypeEndpoints.d.ts +10 -10
  186. package/dist/redux/archerFile/archerFileEndpoints.d.ts +20 -8
  187. package/dist/redux/archerFile/archerFileEndpoints.js +18 -3
  188. package/dist/redux/archerFile/archerFileEndpoints.js.map +1 -1
  189. package/dist/redux/carrierName/carrierNameEndpoints.d.ts +10 -10
  190. package/dist/redux/commodityV1/commodityV1Endpoints.d.ts +11 -11
  191. package/dist/redux/contact/contactEndpoints.d.ts +26 -0
  192. package/dist/redux/contact/contactEndpoints.js +54 -0
  193. package/dist/redux/contact/contactEndpoints.js.map +1 -0
  194. package/dist/redux/contact/index.d.ts +2 -0
  195. package/dist/redux/contact/index.js +3 -0
  196. package/dist/redux/contact/index.js.map +1 -0
  197. package/dist/redux/customer/customerEndpoints.d.ts +27 -19
  198. package/dist/redux/customer/customerEndpoints.js +7 -7
  199. package/dist/redux/customer/customerEndpoints.js.map +1 -1
  200. package/dist/redux/customersAccessorial/customersAccessorialEndpoints.d.ts +24 -0
  201. package/dist/redux/customersAccessorial/customersAccessorialEndpoints.js +56 -0
  202. package/dist/redux/customersAccessorial/customersAccessorialEndpoints.js.map +1 -0
  203. package/dist/redux/customersAccessorial/index.d.ts +2 -0
  204. package/dist/redux/customersAccessorial/index.js +3 -0
  205. package/dist/redux/customersAccessorial/index.js.map +1 -0
  206. package/dist/redux/driverName/driverNameEndpoints.d.ts +9 -9
  207. package/dist/redux/flag/flagEndpoints.d.ts +24 -0
  208. package/dist/redux/flag/flagEndpoints.js +64 -0
  209. package/dist/redux/flag/flagEndpoints.js.map +1 -0
  210. package/dist/redux/flag/index.d.ts +2 -0
  211. package/dist/redux/flag/index.js +3 -0
  212. package/dist/redux/flag/index.js.map +1 -0
  213. package/dist/redux/holiday/holidayEndpoints.d.ts +10 -10
  214. package/dist/redux/index.d.ts +8 -0
  215. package/dist/redux/index.js +8 -0
  216. package/dist/redux/index.js.map +1 -1
  217. package/dist/redux/load/loadEndpoints.d.ts +10 -10
  218. package/dist/redux/loadAdjustment/loadAdjustmentEndpoints.d.ts +10 -10
  219. package/dist/redux/loadAdjustmentV1/loadAdjustmentV1Endpoints.d.ts +10 -10
  220. package/dist/redux/loadV1/loadV1Endpoints.d.ts +79 -18
  221. package/dist/redux/loadV1/loadV1Endpoints.js +64 -1
  222. package/dist/redux/loadV1/loadV1Endpoints.js.map +1 -1
  223. package/dist/redux/location/locationEndpoints.d.ts +14 -14
  224. package/dist/redux/locationV1/locationV1Endpoints.d.ts +19 -19
  225. package/dist/redux/nmfcClass/nmfcClassEndpoints.d.ts +9 -9
  226. package/dist/redux/nodeName/nodeNameEndpoints.d.ts +10 -10
  227. package/dist/redux/notification/index.d.ts +2 -0
  228. package/dist/redux/notification/index.js +3 -0
  229. package/dist/redux/notification/index.js.map +1 -0
  230. package/dist/redux/notification/notificationEndpoints.d.ts +36 -0
  231. package/dist/redux/notification/notificationEndpoints.js +81 -0
  232. package/dist/redux/notification/notificationEndpoints.js.map +1 -0
  233. package/dist/redux/person/index.d.ts +2 -0
  234. package/dist/redux/person/index.js +3 -0
  235. package/dist/redux/person/index.js.map +1 -0
  236. package/dist/redux/person/personEndpoints.d.ts +34 -0
  237. package/dist/redux/person/personEndpoints.js +67 -0
  238. package/dist/redux/person/personEndpoints.js.map +1 -0
  239. package/dist/redux/personName/personNameEndpoints.d.ts +10 -10
  240. package/dist/redux/quote/quoteEndpoints.d.ts +19 -19
  241. package/dist/redux/quote/quoteHooks.d.ts +2 -2
  242. package/dist/redux/quoteAccessorial/quoteAccessorialEndpoints.d.ts +9 -9
  243. package/dist/redux/quoteAccessorialV1/quoteAccessorialV1Endpoints.d.ts +10 -10
  244. package/dist/redux/rateReview/index.d.ts +2 -0
  245. package/dist/redux/rateReview/index.js +3 -0
  246. package/dist/redux/rateReview/index.js.map +1 -0
  247. package/dist/redux/rateReview/rateReviewEndpoints.d.ts +32 -0
  248. package/dist/redux/rateReview/rateReviewEndpoints.js +65 -0
  249. package/dist/redux/rateReview/rateReviewEndpoints.js.map +1 -0
  250. package/dist/redux/shipcon/shipconEndpoints.d.ts +10 -10
  251. package/dist/redux/shipconV1/shipconV1Endpoints.d.ts +14 -14
  252. package/dist/redux/tender/tenderEndpoints.d.ts +9 -9
  253. package/dist/redux/trailerAvailability/customerEndpoints.d.ts +4 -4
  254. package/dist/redux/types.d.ts +2 -2
  255. package/dist/redux/unitV1/index.d.ts +2 -0
  256. package/dist/redux/unitV1/index.js +3 -0
  257. package/dist/redux/unitV1/index.js.map +1 -0
  258. package/dist/redux/unitV1/unitV1Endpoints.d.ts +24 -0
  259. package/dist/redux/unitV1/unitV1Endpoints.js +64 -0
  260. package/dist/redux/unitV1/unitV1Endpoints.js.map +1 -0
  261. package/dist/redux/userNoteV1/userNoteV1Endpoints.d.ts +10 -10
  262. package/package.json +2 -1
@@ -0,0 +1,46 @@
1
+ /**
2
+ * NotificationSubscription_Entity type guard.
3
+ *
4
+ * @param {any} notificationSubscriptionJson NotificationSubscription object from API
5
+ * @returns {boolean} Return true if type is NotificationSubscription_Entity
6
+ */
7
+ function validator(notificationSubscriptionJson) {
8
+ if (typeof notificationSubscriptionJson === "object" &&
9
+ notificationSubscriptionJson != null) {
10
+ NotificationSubscription_Entity.requiredFields.forEach((element) => {
11
+ if (!Object.keys(notificationSubscriptionJson).includes(element))
12
+ throw new Error(`Field ${element} is null or undefined`);
13
+ });
14
+ }
15
+ return true;
16
+ }
17
+ export default class NotificationSubscription_Entity {
18
+ static requiredFields = ["id"];
19
+ constructor(notificationSubscriptionJson) {
20
+ if (validator(notificationSubscriptionJson)) {
21
+ this.id = notificationSubscriptionJson.id;
22
+ this.name = notificationSubscriptionJson.name;
23
+ this.description = notificationSubscriptionJson.description;
24
+ this.destination_id = notificationSubscriptionJson.destination_id;
25
+ this.code = notificationSubscriptionJson.code;
26
+ this.item_order = notificationSubscriptionJson.item_order;
27
+ this.cc_emails = notificationSubscriptionJson.cc_emails;
28
+ this.from_email = notificationSubscriptionJson.from_email;
29
+ this.icon_resource = notificationSubscriptionJson.icon_resource;
30
+ this.sync_notification = notificationSubscriptionJson.sync_notification;
31
+ }
32
+ else
33
+ throw new Error(`Failed to create new instance of ${NotificationSubscription_Entity.name}`);
34
+ }
35
+ id;
36
+ name;
37
+ description;
38
+ destination_id;
39
+ code;
40
+ item_order;
41
+ cc_emails;
42
+ from_email;
43
+ icon_resource;
44
+ sync_notification;
45
+ }
46
+ //# sourceMappingURL=notificationSubscription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notificationSubscription.js","sourceRoot":"","sources":["../../../src/entities/notificationSubscription/notificationSubscription.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,SAAS,SAAS,CAChB,4BAAqC;IAErC,IACE,OAAO,4BAA4B,KAAK,QAAQ;QAChD,4BAA4B,IAAI,IAAI,EACpC;QACA,+BAA+B,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YACjE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;gBAC9D,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,+BAA+B;IAClD,MAAM,CAAC,cAAc,GAAG,CAAC,IAAI,CAAC,CAAC;IAE/B,YAAY,4BAAqC;QAC/C,IAAI,SAAS,CAAC,4BAA4B,CAAC,EAAE;YAC3C,IAAI,CAAC,EAAE,GAAG,4BAA4B,CAAC,EAAE,CAAC;YAC1C,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAC,IAAI,CAAC;YAC9C,IAAI,CAAC,WAAW,GAAG,4BAA4B,CAAC,WAAW,CAAC;YAC5D,IAAI,CAAC,cAAc,GAAG,4BAA4B,CAAC,cAAc,CAAC;YAClE,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAC,IAAI,CAAC;YAC9C,IAAI,CAAC,UAAU,GAAG,4BAA4B,CAAC,UAAU,CAAC;YAC1D,IAAI,CAAC,SAAS,GAAG,4BAA4B,CAAC,SAAS,CAAC;YACxD,IAAI,CAAC,UAAU,GAAG,4BAA4B,CAAC,UAAU,CAAC;YAC1D,IAAI,CAAC,aAAa,GAAG,4BAA4B,CAAC,aAAa,CAAC;YAChE,IAAI,CAAC,iBAAiB,GAAG,4BAA4B,CAAC,iBAAiB,CAAC;SACzE;;YACC,MAAM,IAAI,KAAK,CACb,oCAAoC,+BAA+B,CAAC,IAAI,EAAE,CAC3E,CAAC;IACN,CAAC;IAED,EAAE,CAAS;IACX,IAAI,CAAU;IACd,WAAW,CAAU;IACrB,cAAc,CAAU;IACxB,IAAI,CAAU;IACd,UAAU,CAAU;IACpB,SAAS,CAAU;IACnB,UAAU,CAAU;IACpB,aAAa,CAAU;IACvB,iBAAiB,CAAW"}
@@ -0,0 +1,5 @@
1
+ import NotificationUserSubscription_Entity from "./notificationUserSubscription";
2
+ export default class NotificationUserSubscription extends NotificationUserSubscription_Entity {
3
+ static fromList(notificationUserSubscriptionsJSON: unknown): Array<NotificationUserSubscription>;
4
+ toJson(): string;
5
+ }
@@ -0,0 +1,16 @@
1
+ import NotificationUserSubscription_Entity from "./notificationUserSubscription";
2
+ export default class NotificationUserSubscription extends NotificationUserSubscription_Entity {
3
+ static fromList(notificationUserSubscriptionsJSON) {
4
+ const notificationUserSubscriptions = [];
5
+ if (notificationUserSubscriptionsJSON)
6
+ Array.isArray(notificationUserSubscriptionsJSON) &&
7
+ notificationUserSubscriptionsJSON.forEach((notificationUserSubscriptionJSON) => {
8
+ notificationUserSubscriptions.push(new NotificationUserSubscription(notificationUserSubscriptionJSON));
9
+ });
10
+ return notificationUserSubscriptions;
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/notificationUserSubscription/helper.ts"],"names":[],"mappings":"AAAA,OAAO,mCAAmC,MAAM,gCAAgC,CAAC;AACjF,MAAM,CAAC,OAAO,OAAO,4BAA6B,SAAQ,mCAAmC;IAC3F,MAAM,CAAC,QAAQ,CACb,iCAA0C;QAE1C,MAAM,6BAA6B,GAAmC,EAAE,CAAC;QACzE,IAAI,iCAAiC;YACnC,KAAK,CAAC,OAAO,CAAC,iCAAiC,CAAC;gBAC9C,iCAAiC,CAAC,OAAO,CACvC,CAAC,gCAAgC,EAAE,EAAE;oBACnC,6BAA6B,CAAC,IAAI,CAChC,IAAI,4BAA4B,CAAC,gCAAgC,CAAC,CACnE,CAAC;gBACJ,CAAC,CACF,CAAC;QACN,OAAO,6BAA6B,CAAC;IACvC,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export { default as NotificationUserSubscription } from "./helper";
2
+ export { default as NotificationUserSubscription_Entity } from "./notificationUserSubscription";
@@ -0,0 +1,3 @@
1
+ export { default as NotificationUserSubscription } from "./helper";
2
+ export { default as NotificationUserSubscription_Entity } from "./notificationUserSubscription";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/notificationUserSubscription/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,UAAU,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,mCAAmC,EAAE,MAAM,gCAAgC,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { NotificationSubscription_Entity } from "../notificationSubscription";
2
+ export default class NotificationUserSubscription_Entity {
3
+ static requiredFields: string[];
4
+ constructor(notificationUserSubscriptionJson?: unknown);
5
+ id: number;
6
+ subscription_id?: number;
7
+ person_id?: number;
8
+ push?: boolean;
9
+ email?: boolean;
10
+ report?: boolean;
11
+ unsubscribe_code?: string;
12
+ reminder?: boolean;
13
+ alternative_email?: string;
14
+ subscription?: NotificationSubscription_Entity;
15
+ }
@@ -0,0 +1,47 @@
1
+ /**
2
+ * NotificationUserSubscription_Entity type guard.
3
+ *
4
+ * @param {any} notificationUserSubscriptionJson NotificationUserSubscription object from API
5
+ * @returns {boolean} Return true if type is NotificationUserSubscription_Entity
6
+ */
7
+ function validator(notificationUserSubscriptionJson) {
8
+ if (typeof notificationUserSubscriptionJson === "object" &&
9
+ notificationUserSubscriptionJson != null) {
10
+ NotificationUserSubscription_Entity.requiredFields.forEach((element) => {
11
+ if (!Object.keys(notificationUserSubscriptionJson).includes(element))
12
+ throw new Error(`Field ${element} is null or undefined`);
13
+ });
14
+ }
15
+ return true;
16
+ }
17
+ export default class NotificationUserSubscription_Entity {
18
+ static requiredFields = ["id"];
19
+ constructor(notificationUserSubscriptionJson) {
20
+ if (validator(notificationUserSubscriptionJson)) {
21
+ this.id = notificationUserSubscriptionJson.id;
22
+ this.subscription_id = notificationUserSubscriptionJson.subscription_id;
23
+ this.person_id = notificationUserSubscriptionJson.person_id;
24
+ this.push = notificationUserSubscriptionJson.push;
25
+ this.email = notificationUserSubscriptionJson.email;
26
+ this.report = notificationUserSubscriptionJson.report;
27
+ this.unsubscribe_code = notificationUserSubscriptionJson.unsubscribe_code;
28
+ this.reminder = notificationUserSubscriptionJson.reminder;
29
+ this.alternative_email =
30
+ notificationUserSubscriptionJson.alternative_email;
31
+ this.subscription = notificationUserSubscriptionJson.subscription;
32
+ }
33
+ else
34
+ throw new Error(`Failed to create new instance of ${NotificationUserSubscription_Entity.name}`);
35
+ }
36
+ id;
37
+ subscription_id;
38
+ person_id;
39
+ push;
40
+ email;
41
+ report;
42
+ unsubscribe_code;
43
+ reminder;
44
+ alternative_email;
45
+ subscription;
46
+ }
47
+ //# sourceMappingURL=notificationUserSubscription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notificationUserSubscription.js","sourceRoot":"","sources":["../../../src/entities/notificationUserSubscription/notificationUserSubscription.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,SAAS,SAAS,CAChB,gCAAyC;IAEzC,IACE,OAAO,gCAAgC,KAAK,QAAQ;QACpD,gCAAgC,IAAI,IAAI,EACxC;QACA,mCAAmC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YACrE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;gBAClE,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,mCAAmC;IACtD,MAAM,CAAC,cAAc,GAAG,CAAC,IAAI,CAAC,CAAC;IAE/B,YAAY,gCAA0C;QACpD,IAAI,SAAS,CAAC,gCAAgC,CAAC,EAAE;YAC/C,IAAI,CAAC,EAAE,GAAG,gCAAgC,CAAC,EAAE,CAAC;YAC9C,IAAI,CAAC,eAAe,GAAG,gCAAgC,CAAC,eAAe,CAAC;YACxE,IAAI,CAAC,SAAS,GAAG,gCAAgC,CAAC,SAAS,CAAC;YAC5D,IAAI,CAAC,IAAI,GAAG,gCAAgC,CAAC,IAAI,CAAC;YAClD,IAAI,CAAC,KAAK,GAAG,gCAAgC,CAAC,KAAK,CAAC;YACpD,IAAI,CAAC,MAAM,GAAG,gCAAgC,CAAC,MAAM,CAAC;YACtD,IAAI,CAAC,gBAAgB,GAAG,gCAAgC,CAAC,gBAAgB,CAAC;YAC1E,IAAI,CAAC,QAAQ,GAAG,gCAAgC,CAAC,QAAQ,CAAC;YAC1D,IAAI,CAAC,iBAAiB;gBACpB,gCAAgC,CAAC,iBAAiB,CAAC;YACrD,IAAI,CAAC,YAAY,GAAG,gCAAgC,CAAC,YAAY,CAAC;SACnE;;YACC,MAAM,IAAI,KAAK,CACb,oCAAoC,mCAAmC,CAAC,IAAI,EAAE,CAC/E,CAAC;IACN,CAAC;IAED,EAAE,CAAS;IACX,eAAe,CAAU;IACzB,SAAS,CAAU;IACnB,IAAI,CAAW;IACf,KAAK,CAAW;IAChB,MAAM,CAAW;IACjB,gBAAgB,CAAU;IAC1B,QAAQ,CAAW;IACnB,iBAAiB,CAAU;IAC3B,YAAY,CAAmC"}
@@ -0,0 +1,5 @@
1
+ import Person_Entity from "./person";
2
+ export default class Person extends Person_Entity {
3
+ static fromList(personsJSON: unknown): Array<Person>;
4
+ toJson(): string;
5
+ }
@@ -0,0 +1,16 @@
1
+ import Person_Entity from "./person";
2
+ export default class Person extends Person_Entity {
3
+ static fromList(personsJSON) {
4
+ const persons = [];
5
+ if (personsJSON)
6
+ Array.isArray(personsJSON) &&
7
+ personsJSON.forEach((personJSON) => {
8
+ persons.push(new Person(personJSON));
9
+ });
10
+ return persons;
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/person/helper.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,UAAU,CAAC;AACrC,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,aAAa;IAC/C,MAAM,CAAC,QAAQ,CAAC,WAAoB;QAClC,MAAM,OAAO,GAAa,EAAE,CAAC;QAC7B,IAAI,WAAW;YACb,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC;gBACxB,WAAW,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;oBACjC,OAAO,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;gBACvC,CAAC,CAAC,CAAC;QACP,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export { default as Person } from "./helper";
2
+ export { default as Person_Entity } from "./person";
@@ -0,0 +1,3 @@
1
+ export { default as Person } from "./helper";
2
+ export { default as Person_Entity } from "./person";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/person/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,46 @@
1
+ import { Company_Entity } from "../company";
2
+ export default class Person_Entity {
3
+ static requiredFields: string[];
4
+ constructor(personJson?: unknown);
5
+ active?: boolean;
6
+ api_key?: string;
7
+ company_id?: number;
8
+ created_at?: string;
9
+ email?: string;
10
+ first_name?: string;
11
+ id: number;
12
+ last_name?: string;
13
+ node_id?: number;
14
+ phone_number?: string;
15
+ reference_code?: number;
16
+ reset_password_sent_at?: string;
17
+ reset_password_token?: string;
18
+ updated_at?: string;
19
+ uuid?: string;
20
+ company?: Company_Entity;
21
+ name?: string;
22
+ password?: string;
23
+ password_confirmation?: string;
24
+ employee_id?: number;
25
+ role_names?: string[];
26
+ last_rated?: string;
27
+ days_between_votes?: number;
28
+ days_since_last_vote?: number;
29
+ reason_for_vote?: string;
30
+ supervisor_id?: number;
31
+ customer_id?: number;
32
+ role_ids?: number[];
33
+ model_right_ids?: number[];
34
+ driver_id?: number;
35
+ flags_object_ids?: number[];
36
+ flag_ids?: number[];
37
+ people_rating_ids?: number[];
38
+ dashboard_ids?: number[];
39
+ summary_panel_ids?: number[];
40
+ node_ids?: number[];
41
+ area_ids?: number[];
42
+ appointment_issue_category_ids?: number[];
43
+ address_ids?: number[];
44
+ annotation_ids?: number[];
45
+ version_ids?: number[];
46
+ }
@@ -0,0 +1,108 @@
1
+ /**
2
+ * Person_Entity type guard.
3
+ *
4
+ * @param {any} personJson Person object from API
5
+ * @returns {boolean} Return true if type is Person_Entity
6
+ */
7
+ function validator(personJson) {
8
+ if (typeof personJson === "object" && personJson != null) {
9
+ Person_Entity.requiredFields.forEach((element) => {
10
+ if (!Object.keys(personJson).includes(element))
11
+ throw new Error(`Field ${element} is null or undefined`);
12
+ });
13
+ }
14
+ return true;
15
+ }
16
+ export default class Person_Entity {
17
+ static requiredFields = ["id"];
18
+ constructor(personJson) {
19
+ if (validator(personJson)) {
20
+ this.active = personJson.active;
21
+ this.api_key = personJson.api_key;
22
+ this.company_id = personJson.company_id;
23
+ this.created_at = personJson.created_at;
24
+ this.email = personJson.email;
25
+ this.first_name = personJson.first_name;
26
+ this.id = personJson.id;
27
+ this.last_name = personJson.last_name;
28
+ this.node_id = personJson.node_id;
29
+ this.phone_number = personJson.phone_number;
30
+ this.reference_code = personJson.reference_code;
31
+ this.reset_password_sent_at = personJson.reset_password_sent_at;
32
+ this.reset_password_token = personJson.reset_password_token;
33
+ this.updated_at = personJson.updated_at;
34
+ this.uuid = personJson.uuid;
35
+ this.company = personJson.company;
36
+ this.name = personJson.name;
37
+ this.password = personJson.password;
38
+ this.password_confirmation = personJson.password_confirmation;
39
+ this.employee_id = personJson.employee_id;
40
+ this.role_names = personJson.role_names;
41
+ this.last_rated = personJson.last_rated;
42
+ this.days_between_votes = personJson.days_between_votes;
43
+ this.days_since_last_vote = personJson.days_since_last_vote;
44
+ this.reason_for_vote = personJson.reason_for_vote;
45
+ this.supervisor_id = personJson.supervisor_id;
46
+ this.customer_id = personJson.customer_id;
47
+ this.role_ids = personJson.role_ids;
48
+ this.model_right_ids = personJson.model_right_ids;
49
+ this.driver_id = personJson.driver_id;
50
+ this.flags_object_ids = personJson.flags_object_ids;
51
+ this.flag_ids = personJson.flag_ids;
52
+ this.people_rating_ids = personJson.people_rating_ids;
53
+ this.dashboard_ids = personJson.dashboard_ids;
54
+ this.summary_panel_ids = personJson.summary_panel_ids;
55
+ this.node_ids = personJson.node_ids;
56
+ this.area_ids = personJson.area_ids;
57
+ this.appointment_issue_category_ids =
58
+ personJson.appointment_issue_category_ids;
59
+ this.address_ids = personJson.address_ids;
60
+ this.annotation_ids = personJson.annotation_ids;
61
+ this.version_ids = personJson.version_ids;
62
+ }
63
+ else
64
+ throw new Error(`Failed to create new instance of ${Person_Entity.name}`);
65
+ }
66
+ active;
67
+ api_key;
68
+ company_id;
69
+ created_at;
70
+ email;
71
+ first_name;
72
+ id;
73
+ last_name;
74
+ node_id;
75
+ phone_number;
76
+ reference_code;
77
+ reset_password_sent_at;
78
+ reset_password_token;
79
+ updated_at;
80
+ uuid;
81
+ company;
82
+ name;
83
+ password;
84
+ password_confirmation;
85
+ employee_id;
86
+ role_names;
87
+ last_rated;
88
+ days_between_votes;
89
+ days_since_last_vote;
90
+ reason_for_vote;
91
+ supervisor_id;
92
+ customer_id;
93
+ role_ids;
94
+ model_right_ids;
95
+ driver_id;
96
+ flags_object_ids;
97
+ flag_ids;
98
+ people_rating_ids;
99
+ dashboard_ids;
100
+ summary_panel_ids;
101
+ node_ids;
102
+ area_ids;
103
+ appointment_issue_category_ids;
104
+ address_ids;
105
+ annotation_ids;
106
+ version_ids;
107
+ }
108
+ //# sourceMappingURL=person.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"person.js","sourceRoot":"","sources":["../../../src/entities/person/person.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;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
@@ -0,0 +1,5 @@
1
+ import QuoteRateRecord_Entity from "./quoteRateRecord";
2
+ export default class QuoteRateRecord extends QuoteRateRecord_Entity {
3
+ static fromList(quoteRateRecordsJSON: unknown): Array<QuoteRateRecord>;
4
+ toJson(): string;
5
+ }
@@ -0,0 +1,16 @@
1
+ import QuoteRateRecord_Entity from "./quoteRateRecord";
2
+ export default class QuoteRateRecord extends QuoteRateRecord_Entity {
3
+ static fromList(quoteRateRecordsJSON) {
4
+ const quoteRateRecords = [];
5
+ if (quoteRateRecordsJSON)
6
+ Array.isArray(quoteRateRecordsJSON) &&
7
+ quoteRateRecordsJSON.forEach((quoteRateRecordJSON) => {
8
+ quoteRateRecords.push(new QuoteRateRecord(quoteRateRecordJSON));
9
+ });
10
+ return quoteRateRecords;
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/quoteRateRecord/helper.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,MAAM,mBAAmB,CAAC;AACvD,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,sBAAsB;IACjE,MAAM,CAAC,QAAQ,CAAC,oBAA6B;QAC3C,MAAM,gBAAgB,GAAsB,EAAE,CAAC;QAC/C,IAAI,oBAAoB;YACtB,KAAK,CAAC,OAAO,CAAC,oBAAoB,CAAC;gBACjC,oBAAoB,CAAC,OAAO,CAAC,CAAC,mBAAmB,EAAE,EAAE;oBACnD,gBAAgB,CAAC,IAAI,CAAC,IAAI,eAAe,CAAC,mBAAmB,CAAC,CAAC,CAAC;gBAClE,CAAC,CAAC,CAAC;QACP,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export { default as QuoteRateRecord } from "./helper";
2
+ export { default as QuoteRateRecord_Entity } from "./quoteRateRecord";
@@ -0,0 +1,3 @@
1
+ export { default as QuoteRateRecord } from "./helper";
2
+ export { default as QuoteRateRecord_Entity } from "./quoteRateRecord";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/quoteRateRecord/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,50 @@
1
+ export default class QuoteRateRecord_Entity {
2
+ static requiredFields: string[];
3
+ constructor(quoteRateRecordJson?: unknown);
4
+ id?: number;
5
+ quote_id?: number;
6
+ person_id?: number;
7
+ initial_calculation?: boolean;
8
+ cost_baserate?: number;
9
+ cost_fuel_surcharge?: number;
10
+ cost_total?: number;
11
+ market_baserate?: number;
12
+ market_fuel_surcharge?: number;
13
+ market_total?: number;
14
+ market_total_no_margin?: number;
15
+ contract_baserate?: number;
16
+ contract_fuel_surcharge?: number;
17
+ contract_total?: number;
18
+ quote_baserate?: number;
19
+ quote_fuel_surcharge?: number;
20
+ quote_total?: number;
21
+ market_lane?: string;
22
+ market_linehaul_rate?: number;
23
+ market_fuel_percent?: number;
24
+ total_miles?: number;
25
+ otr_miles?: number;
26
+ shipper_zips?: string;
27
+ consignee_zips?: string;
28
+ shipper_dates?: string;
29
+ consignee_dates?: string;
30
+ reefer_temp?: string;
31
+ pallets?: number;
32
+ weight?: number;
33
+ pieces?: number;
34
+ reefer_market_margin?: number;
35
+ tl_market_margin?: number;
36
+ ltl_market_margin?: number;
37
+ tl_profit_margin?: string;
38
+ ltl_profit_margin?: string;
39
+ created_at?: string;
40
+ tl_reefer_profit_margin?: string;
41
+ czarlite_baserate?: number;
42
+ czarlite_discount_percent?: number;
43
+ czarlite_fuel_surcharge?: number;
44
+ czarlite_total?: number;
45
+ czarlite_total_charge?: number;
46
+ tl_market_extra?: number;
47
+ ltl_market_extra?: number;
48
+ reefer_market_extra?: number;
49
+ csr_name?: string;
50
+ }
@@ -0,0 +1,121 @@
1
+ /**
2
+ * QuoteRateRecord_Entity type guard.
3
+ *
4
+ * @param {any} quoteRateRecordJson QuoteRateRecord object from API
5
+ * @returns {boolean} Return true if type is QuoteRateRecord_Entity
6
+ */
7
+ function validator(quoteRateRecordJson) {
8
+ if (typeof quoteRateRecordJson === "object" && quoteRateRecordJson != null) {
9
+ QuoteRateRecord_Entity.requiredFields.forEach((element) => {
10
+ if (!Object.keys(quoteRateRecordJson).includes(element))
11
+ throw new Error(`Field ${element} is null or undefined`);
12
+ });
13
+ }
14
+ return true;
15
+ }
16
+ export default class QuoteRateRecord_Entity {
17
+ static requiredFields = ["id"];
18
+ constructor(quoteRateRecordJson) {
19
+ if (validator(quoteRateRecordJson)) {
20
+ this.id = quoteRateRecordJson.id;
21
+ this.quote_id = quoteRateRecordJson.quote_id;
22
+ this.person_id = quoteRateRecordJson.person_id;
23
+ this.initial_calculation = quoteRateRecordJson.initial_calculation;
24
+ this.cost_baserate = quoteRateRecordJson.cost_baserate;
25
+ this.cost_fuel_surcharge = quoteRateRecordJson.cost_fuel_surcharge;
26
+ this.cost_total = quoteRateRecordJson.cost_total;
27
+ this.market_baserate = quoteRateRecordJson.market_baserate;
28
+ this.market_fuel_surcharge = quoteRateRecordJson.market_fuel_surcharge;
29
+ this.market_total = quoteRateRecordJson.market_total;
30
+ this.market_total_no_margin = quoteRateRecordJson.market_total_no_margin;
31
+ this.contract_baserate = quoteRateRecordJson.contract_baserate;
32
+ this.contract_fuel_surcharge =
33
+ quoteRateRecordJson.contract_fuel_surcharge;
34
+ this.contract_total = quoteRateRecordJson.contract_total;
35
+ this.quote_baserate = quoteRateRecordJson.quote_baserate;
36
+ this.quote_fuel_surcharge = quoteRateRecordJson.quote_fuel_surcharge;
37
+ this.quote_total = quoteRateRecordJson.quote_total;
38
+ this.market_lane = quoteRateRecordJson.market_lane;
39
+ this.market_linehaul_rate = quoteRateRecordJson.market_linehaul_rate;
40
+ this.market_fuel_percent = quoteRateRecordJson.market_fuel_percent;
41
+ this.total_miles = quoteRateRecordJson.total_miles;
42
+ this.otr_miles = quoteRateRecordJson.otr_miles;
43
+ this.shipper_zips = quoteRateRecordJson.shipper_zips;
44
+ this.consignee_zips = quoteRateRecordJson.consignee_zips;
45
+ this.shipper_dates = quoteRateRecordJson.shipper_dates;
46
+ this.consignee_dates = quoteRateRecordJson.consignee_dates;
47
+ this.reefer_temp = quoteRateRecordJson.reefer_temp;
48
+ this.pallets = quoteRateRecordJson.pallets;
49
+ this.weight = quoteRateRecordJson.weight;
50
+ this.pieces = quoteRateRecordJson.pieces;
51
+ this.reefer_market_margin = quoteRateRecordJson.reefer_market_margin;
52
+ this.tl_market_margin = quoteRateRecordJson.tl_market_margin;
53
+ this.ltl_market_margin = quoteRateRecordJson.ltl_market_margin;
54
+ this.tl_profit_margin = quoteRateRecordJson.tl_profit_margin;
55
+ this.ltl_profit_margin = quoteRateRecordJson.ltl_profit_margin;
56
+ this.created_at = quoteRateRecordJson.created_at;
57
+ this.tl_reefer_profit_margin =
58
+ quoteRateRecordJson.tl_reefer_profit_margin;
59
+ this.czarlite_baserate = quoteRateRecordJson.czarlite_baserate;
60
+ this.czarlite_discount_percent =
61
+ quoteRateRecordJson.czarlite_discount_percent;
62
+ this.czarlite_fuel_surcharge =
63
+ quoteRateRecordJson.czarlite_fuel_surcharge;
64
+ this.czarlite_total = quoteRateRecordJson.czarlite_total;
65
+ this.czarlite_total_charge = quoteRateRecordJson.czarlite_total_charge;
66
+ this.tl_market_extra = quoteRateRecordJson.tl_market_extra;
67
+ this.ltl_market_extra = quoteRateRecordJson.ltl_market_extra;
68
+ this.reefer_market_extra = quoteRateRecordJson.reefer_market_extra;
69
+ this.csr_name = quoteRateRecordJson.csr_name;
70
+ }
71
+ else
72
+ throw new Error(`Failed to create new instance of ${QuoteRateRecord_Entity.name}`);
73
+ }
74
+ id;
75
+ quote_id;
76
+ person_id;
77
+ initial_calculation;
78
+ cost_baserate;
79
+ cost_fuel_surcharge;
80
+ cost_total;
81
+ market_baserate;
82
+ market_fuel_surcharge;
83
+ market_total;
84
+ market_total_no_margin;
85
+ contract_baserate;
86
+ contract_fuel_surcharge;
87
+ contract_total;
88
+ quote_baserate;
89
+ quote_fuel_surcharge;
90
+ quote_total;
91
+ market_lane;
92
+ market_linehaul_rate;
93
+ market_fuel_percent;
94
+ total_miles;
95
+ otr_miles;
96
+ shipper_zips;
97
+ consignee_zips;
98
+ shipper_dates;
99
+ consignee_dates;
100
+ reefer_temp;
101
+ pallets;
102
+ weight;
103
+ pieces;
104
+ reefer_market_margin;
105
+ tl_market_margin;
106
+ ltl_market_margin;
107
+ tl_profit_margin;
108
+ ltl_profit_margin;
109
+ created_at;
110
+ tl_reefer_profit_margin;
111
+ czarlite_baserate;
112
+ czarlite_discount_percent;
113
+ czarlite_fuel_surcharge;
114
+ czarlite_total;
115
+ czarlite_total_charge;
116
+ tl_market_extra;
117
+ ltl_market_extra;
118
+ reefer_market_extra;
119
+ csr_name;
120
+ }
121
+ //# sourceMappingURL=quoteRateRecord.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quoteRateRecord.js","sourceRoot":"","sources":["../../../src/entities/quoteRateRecord/quoteRateRecord.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,SAAS,SAAS,CAChB,mBAA4B;IAE5B,IAAI,OAAO,mBAAmB,KAAK,QAAQ,IAAI,mBAAmB,IAAI,IAAI,EAAE;QAC1E,sBAAsB,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YACxD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;gBACrD,MAAM,IAAI,KAAK,CAAC,SAAS,OAAO,uBAAuB,CAAC,CAAC;QAC7D,C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CAAU;IAC1B,iBAAiB,CAAU;IAC3B,UAAU,CAAU;IACpB,uBAAuB,CAAU;IACjC,iBAAiB,CAAU;IAC3B,yBAAyB,CAAU;IACnC,uBAAuB,CAAU;IACjC,cAAc,CAAU;IACxB,qBAAqB,CAAU;IAC/B,eAAe,CAAU;IACzB,gBAAgB,CAAU;IAC1B,mBAAmB,CAAU;IAC7B,QAAQ,CAAU"}
@@ -0,0 +1,5 @@
1
+ import RateReview_Entity from "./rateReview";
2
+ export default class RateReview extends RateReview_Entity {
3
+ static fromList(rateReviewsJSON: unknown): Array<RateReview>;
4
+ toJson(): string;
5
+ }
@@ -0,0 +1,16 @@
1
+ import RateReview_Entity from "./rateReview";
2
+ export default class RateReview extends RateReview_Entity {
3
+ static fromList(rateReviewsJSON) {
4
+ const rateReviews = [];
5
+ if (rateReviewsJSON)
6
+ Array.isArray(rateReviewsJSON) &&
7
+ rateReviewsJSON.forEach((rateReviewJSON) => {
8
+ rateReviews.push(new RateReview(rateReviewJSON));
9
+ });
10
+ return rateReviews;
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/rateReview/helper.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,cAAc,CAAC;AAC7C,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,iBAAiB;IACvD,MAAM,CAAC,QAAQ,CAAC,eAAwB;QACtC,MAAM,WAAW,GAAiB,EAAE,CAAC;QACrC,IAAI,eAAe;YACjB,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC;gBAC5B,eAAe,CAAC,OAAO,CAAC,CAAC,cAAc,EAAE,EAAE;oBACzC,WAAW,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC;gBACnD,CAAC,CAAC,CAAC;QACP,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export { default as RateReview } from "./helper";
2
+ export { default as RateReview_Entity } from "./rateReview";
@@ -0,0 +1,3 @@
1
+ export { default as RateReview } from "./helper";
2
+ export { default as RateReview_Entity } from "./rateReview";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/rateReview/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,cAAc,CAAC"}