@nerdjs/sales-kit 2.1.0 → 2.1.2

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 (128) hide show
  1. package/dist/entities/index.d.ts +3 -0
  2. package/dist/entities/index.js +3 -0
  3. package/dist/entities/index.js.map +1 -1
  4. package/dist/entities/otrDispatch/helper.d.ts +2 -1
  5. package/dist/entities/otrDispatch/helper.js +25 -11
  6. package/dist/entities/otrDispatch/helper.js.map +1 -1
  7. package/dist/entities/otrDispatchV1/helper.d.ts +7 -0
  8. package/dist/entities/otrDispatchV1/helper.js +53 -0
  9. package/dist/entities/otrDispatchV1/helper.js.map +1 -0
  10. package/dist/entities/otrDispatchV1/index.d.ts +2 -0
  11. package/dist/entities/otrDispatchV1/index.js +3 -0
  12. package/dist/entities/otrDispatchV1/index.js.map +1 -0
  13. package/dist/entities/otrDispatchV1/otrDispatchV1.d.ts +79 -0
  14. package/dist/entities/otrDispatchV1/otrDispatchV1.js +178 -0
  15. package/dist/entities/otrDispatchV1/otrDispatchV1.js.map +1 -0
  16. package/dist/entities/personV1/helper.d.ts +5 -0
  17. package/dist/entities/personV1/helper.js +16 -0
  18. package/dist/entities/personV1/helper.js.map +1 -0
  19. package/dist/entities/personV1/index.d.ts +2 -0
  20. package/dist/entities/personV1/index.js +3 -0
  21. package/dist/entities/personV1/index.js.map +1 -0
  22. package/dist/entities/personV1/personV1.d.ts +44 -0
  23. package/dist/entities/personV1/personV1.js +106 -0
  24. package/dist/entities/personV1/personV1.js.map +1 -0
  25. package/dist/entities/shipConDispatch/helper.d.ts +5 -0
  26. package/dist/entities/shipConDispatch/helper.js +16 -0
  27. package/dist/entities/shipConDispatch/helper.js.map +1 -0
  28. package/dist/entities/shipConDispatch/index.d.ts +2 -0
  29. package/dist/entities/shipConDispatch/index.js +3 -0
  30. package/dist/entities/shipConDispatch/index.js.map +1 -0
  31. package/dist/entities/shipConDispatch/shipConDispatch.d.ts +248 -0
  32. package/dist/entities/shipConDispatch/shipConDispatch.js +539 -0
  33. package/dist/entities/shipConDispatch/shipConDispatch.js.map +1 -0
  34. package/dist/redux/api/salesApi.d.ts +1 -1
  35. package/dist/redux/api/salesApi.js +2 -0
  36. package/dist/redux/api/salesApi.js.map +1 -1
  37. package/dist/redux/apiTender/apiTenderEndpoints.d.ts +10 -10
  38. package/dist/redux/appointmentArrival/appointmentArrivalEndpoints.d.ts +21 -13
  39. package/dist/redux/appointmentArrival/appointmentArrivalEndpoints.js.map +1 -1
  40. package/dist/redux/appointmentIssue/appointmentIssueEndpoints.d.ts +10 -10
  41. package/dist/redux/appointmentIssueCategory/appointmentIssueCategoryEndpoints.d.ts +11 -11
  42. package/dist/redux/appointmentIssueSubcategory/appointmentIssueSubcategoryEndpoints.d.ts +10 -10
  43. package/dist/redux/appointmentNote/appointmentNoteEndpoints.d.ts +10 -10
  44. package/dist/redux/appointmentNoteType/appointmentNoteTypeEndpoints.d.ts +10 -10
  45. package/dist/redux/appointmentTrip/appointmentTripEndpoints.d.ts +10 -10
  46. package/dist/redux/archerFile/archerFileEndpoints.d.ts +13 -13
  47. package/dist/redux/asset/assetEndpoints.d.ts +12 -12
  48. package/dist/redux/billingKickback/billingKickbackEndpoints.d.ts +11 -11
  49. package/dist/redux/billingKickbackResponse/billingKickbackResponseEndpoints.d.ts +10 -10
  50. package/dist/redux/billingKickbackResponseAccessorial/billingKickbackResponseAccessorialEndpoints.d.ts +10 -10
  51. package/dist/redux/billingMessage/billingMessageEndpoints.d.ts +9 -9
  52. package/dist/redux/billingNote/billingNoteEndpoints.d.ts +10 -10
  53. package/dist/redux/cargoConsolidation/cargoConsolidationEndpoints.d.ts +19 -19
  54. package/dist/redux/cargoConsolidationCommodityPiece/cargoConsolidationCommodityPieceEndpoints.d.ts +10 -10
  55. package/dist/redux/carrierName/carrierNameEndpoints.d.ts +13 -13
  56. package/dist/redux/carrierPayContract/carrierPayContractEndpoints.d.ts +10 -10
  57. package/dist/redux/carrierTender/carrierTenderEndpoints.d.ts +14 -14
  58. package/dist/redux/carrierTenderAccessorial/carrierTenderAccessorialEndpoints.d.ts +10 -10
  59. package/dist/redux/carrierTenderDeduction/carrierTenderDeductionEndpoints.d.ts +10 -10
  60. package/dist/redux/carrierTenderEdge/carrierTenderEdgeEndpoints.d.ts +9 -9
  61. package/dist/redux/claim/claimEndpoints.d.ts +16 -16
  62. package/dist/redux/claimStatus/claimStatusEndpoints.d.ts +9 -9
  63. package/dist/redux/commodity/commodityEndpoints.d.ts +10 -10
  64. package/dist/redux/commodityV1/commodityV1Endpoints.d.ts +11 -11
  65. package/dist/redux/companyLocation/companyLocationEndpoints.d.ts +10 -10
  66. package/dist/redux/contact/contactEndpoints.d.ts +10 -10
  67. package/dist/redux/customer/customerEndpoints.d.ts +17 -17
  68. package/dist/redux/customer/customerEndpoints.js +1 -0
  69. package/dist/redux/customer/customerEndpoints.js.map +1 -1
  70. package/dist/redux/customersAccessorial/customersAccessorialEndpoints.d.ts +9 -9
  71. package/dist/redux/deduction/deductionEndpoints.d.ts +9 -9
  72. package/dist/redux/departmentPhone/departmentPhoneEndpoints.d.ts +10 -10
  73. package/dist/redux/dispatch/dispatchEndpoints.d.ts +10 -10
  74. package/dist/redux/driver/driverEndpoints.d.ts +9 -9
  75. package/dist/redux/driverName/driverNameEndpoints.d.ts +9 -9
  76. package/dist/redux/employeeName/employeeNameEndpoints.d.ts +9 -9
  77. package/dist/redux/flag/flagEndpoints.d.ts +9 -9
  78. package/dist/redux/generalLedgerAccount/generalLedgerAccountEndpoints.d.ts +10 -10
  79. package/dist/redux/genericTender/genericTenderEndpoints.d.ts +10 -10
  80. package/dist/redux/holiday/holidayEndpoints.d.ts +10 -10
  81. package/dist/redux/index.d.ts +1 -0
  82. package/dist/redux/index.js +1 -0
  83. package/dist/redux/index.js.map +1 -1
  84. package/dist/redux/invoice/invoiceEndpoints.d.ts +10 -10
  85. package/dist/redux/invoiceAdjustment/invoiceAdjustmentEndpoints.d.ts +10 -10
  86. package/dist/redux/invoiceV1/invoiceV1Endpoints.d.ts +11 -11
  87. package/dist/redux/load/loadEndpoints.d.ts +12 -12
  88. package/dist/redux/loadAdjustment/loadAdjustmentEndpoints.d.ts +10 -10
  89. package/dist/redux/loadAdjustmentV1/loadAdjustmentV1Endpoints.d.ts +10 -10
  90. package/dist/redux/loadTender/loadTenderEndpoints.d.ts +12 -12
  91. package/dist/redux/loadV1/loadV1Endpoints.d.ts +65 -56
  92. package/dist/redux/loadV1/loadV1Endpoints.js +25 -1
  93. package/dist/redux/loadV1/loadV1Endpoints.js.map +1 -1
  94. package/dist/redux/location/locationEndpoints.d.ts +15 -15
  95. package/dist/redux/locationV1/locationV1Endpoints.d.ts +19 -19
  96. package/dist/redux/manualCheckCall/manualCheckCallEndpoints.d.ts +10 -10
  97. package/dist/redux/nmfcClass/nmfcClassEndpoints.d.ts +9 -9
  98. package/dist/redux/nodeName/nodeNameEndpoints.d.ts +10 -10
  99. package/dist/redux/notification/notificationEndpoints.d.ts +13 -13
  100. package/dist/redux/otrDispatch/otrDispatchEndpoints.d.ts +40 -16
  101. package/dist/redux/otrDispatch/otrDispatchEndpoints.js +29 -2
  102. package/dist/redux/otrDispatch/otrDispatchEndpoints.js.map +1 -1
  103. package/dist/redux/person/personEndpoints.d.ts +17 -17
  104. package/dist/redux/person/personEndpoints.js +2 -1
  105. package/dist/redux/person/personEndpoints.js.map +1 -1
  106. package/dist/redux/personName/personNameEndpoints.d.ts +10 -10
  107. package/dist/redux/position/positionEndpoints.d.ts +10 -10
  108. package/dist/redux/possibleIssueItem/possibleIssueItemEndpoints.d.ts +9 -9
  109. package/dist/redux/quote/quoteEndpoints.d.ts +21 -21
  110. package/dist/redux/quote/quoteHooks.d.ts +2 -2
  111. package/dist/redux/quoteAccessorial/quoteAccessorialEndpoints.d.ts +9 -9
  112. package/dist/redux/quoteAccessorialV1/quoteAccessorialV1Endpoints.d.ts +10 -10
  113. package/dist/redux/rateReview/rateReviewEndpoints.d.ts +10 -10
  114. package/dist/redux/relayCode/relayCodeEndpoints.d.ts +11 -11
  115. package/dist/redux/shipConDispatch/index.d.ts +2 -0
  116. package/dist/redux/shipConDispatch/index.js +3 -0
  117. package/dist/redux/shipConDispatch/index.js.map +1 -0
  118. package/dist/redux/shipConDispatch/shipConDispatchEndpoints.d.ts +33 -0
  119. package/dist/redux/shipConDispatch/shipConDispatchEndpoints.js +66 -0
  120. package/dist/redux/shipConDispatch/shipConDispatchEndpoints.js.map +1 -0
  121. package/dist/redux/shipcon/shipconEndpoints.d.ts +11 -11
  122. package/dist/redux/shipconV1/shipconV1Endpoints.d.ts +16 -16
  123. package/dist/redux/tender/tenderEndpoints.d.ts +9 -9
  124. package/dist/redux/trailerAvailability/customerEndpoints.d.ts +4 -4
  125. package/dist/redux/trailerCode/trailerCodeEndpoints.d.ts +9 -9
  126. package/dist/redux/unitV1/unitV1Endpoints.d.ts +9 -9
  127. package/dist/redux/userNoteV1/userNoteV1Endpoints.d.ts +10 -10
  128. package/package.json +1 -1
@@ -92,3 +92,6 @@ export * from "./carrierTenderRateRecord";
92
92
  export * from "./employeeName";
93
93
  export * from "./possibleIssueItem";
94
94
  export * from "./manualCheckCall";
95
+ export * from "./otrDispatchV1";
96
+ export * from "./shipConDispatch";
97
+ export * from "./personV1";
@@ -92,4 +92,7 @@ export * from "./carrierTenderRateRecord";
92
92
  export * from "./employeeName";
93
93
  export * from "./possibleIssueItem";
94
94
  export * from "./manualCheckCall";
95
+ export * from "./otrDispatchV1";
96
+ export * from "./shipConDispatch";
97
+ export * from "./personV1";
95
98
  //# sourceMappingURL=index.js.map
@@ -1 +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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extends OtrDispatch_Entity {
3
- static fromList(otrDispatchsJSON: unknown): Array<OtrDispatch>;
3
+ static fromList(otrDispatchesJSON: unknown): Array<OtrDispatch>;
4
4
  toJson(): string;
5
5
  needsCheckCall(): boolean;
6
+ needsETA(): boolean;
6
7
  }
@@ -1,14 +1,14 @@
1
1
  import { DateTime } from "luxon";
2
2
  import OtrDispatch_Entity from "./otrDispatch";
3
3
  export default class OtrDispatch extends OtrDispatch_Entity {
4
- static fromList(otrDispatchsJSON) {
5
- const otrDispatchs = [];
6
- if (otrDispatchsJSON)
7
- Array.isArray(otrDispatchsJSON) &&
8
- otrDispatchsJSON.forEach((otrDispatchJSON) => {
9
- otrDispatchs.push(new OtrDispatch(otrDispatchJSON));
4
+ static fromList(otrDispatchesJSON) {
5
+ const otrDispatches = [];
6
+ if (otrDispatchesJSON)
7
+ Array.isArray(otrDispatchesJSON) &&
8
+ otrDispatchesJSON.forEach((otrDispatchJSON) => {
9
+ otrDispatches.push(new OtrDispatch(otrDispatchJSON));
10
10
  });
11
- return otrDispatchs;
11
+ return otrDispatches;
12
12
  }
13
13
  toJson() {
14
14
  return JSON.stringify(this);
@@ -17,7 +17,7 @@ export default class OtrDispatch extends OtrDispatch_Entity {
17
17
  const rDate = this.last_check_call_or_update_time
18
18
  ? DateTime.fromISO(this.last_check_call_or_update_time)
19
19
  : null;
20
- let toRet = false;
20
+ let needsCheckCall = false;
21
21
  if (this.order_record_id === 0)
22
22
  return false;
23
23
  if (this.at_location)
@@ -27,13 +27,27 @@ export default class OtrDispatch extends OtrDispatch_Entity {
27
27
  : null;
28
28
  if (startTime && startTime.isValid) {
29
29
  const now = DateTime.now().minus({ hour: 2 });
30
- toRet = startTime < now;
30
+ needsCheckCall = startTime < now;
31
31
  }
32
32
  if (rDate && rDate.isValid) {
33
33
  const now = DateTime.now().minus({ hour: 4 });
34
- toRet = rDate < now;
34
+ needsCheckCall = rDate < now;
35
35
  }
36
- return toRet;
36
+ return needsCheckCall;
37
+ }
38
+ needsETA() {
39
+ const rDate = this.ship_con_eta_reminder_time
40
+ ? DateTime.fromISO(this.ship_con_eta_reminder_time)
41
+ : null;
42
+ const now = DateTime.now();
43
+ let needsETA = false;
44
+ if (this.at_location)
45
+ return needsETA;
46
+ if (rDate)
47
+ needsETA = rDate < now;
48
+ else if (this.needs_ship_con_eta)
49
+ needsETA = true;
50
+ return needsETA;
37
51
  }
38
52
  }
39
53
  //# sourceMappingURL=helper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../src/entities/otrDispatch/helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,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;IAED,cAAc;QACZ,MAAM,KAAK,GAAG,IAAI,CAAC,8BAA8B;YAC/C,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,8BAA8B,CAAC;YACvD,CAAC,CAAC,IAAI,CAAC;QACT,IAAI,KAAK,GAAG,KAAK,CAAC;QAClB,IAAI,IAAI,CAAC,eAAe,KAAK,CAAC;YAAE,OAAO,KAAK,CAAC;QAC7C,IAAI,IAAI,CAAC,WAAW;YAAE,OAAO,KAAK,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AAK;YAAE,QAAQ,GAAG,KAAK,GAAG,GAAG,CAAC;aAC7B,IAAI,IAAI,CAAC,kBAAkB;YAAE,QAAQ,GAAG,IAAI,CAAC;QAClD,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF"}
@@ -0,0 +1,7 @@
1
+ import OtrDispatchV1_Entity from "./otrDispatchV1";
2
+ export default class OtrDispatchV1 extends OtrDispatchV1_Entity {
3
+ static fromList(otrDispatchV1sJSON: unknown): Array<OtrDispatchV1>;
4
+ toJson(): string;
5
+ needsCheckCall(): boolean;
6
+ needsETA(): boolean;
7
+ }
@@ -0,0 +1,53 @@
1
+ import { DateTime } from "luxon";
2
+ import OtrDispatchV1_Entity from "./otrDispatchV1";
3
+ export default class OtrDispatchV1 extends OtrDispatchV1_Entity {
4
+ static fromList(otrDispatchV1sJSON) {
5
+ const otrDispatchV1s = [];
6
+ if (otrDispatchV1sJSON)
7
+ Array.isArray(otrDispatchV1sJSON) &&
8
+ otrDispatchV1sJSON.forEach((otrDispatchV1JSON) => {
9
+ otrDispatchV1s.push(new OtrDispatchV1(otrDispatchV1JSON));
10
+ });
11
+ return otrDispatchV1s;
12
+ }
13
+ toJson() {
14
+ return JSON.stringify(this);
15
+ }
16
+ needsCheckCall() {
17
+ const rDate = this.last_check_call_or_update_time
18
+ ? DateTime.fromISO(this.last_check_call_or_update_time)
19
+ : null;
20
+ let needsCheckCall = false;
21
+ if (this.order_record_id === 0)
22
+ return false;
23
+ if (this.at_location)
24
+ return false;
25
+ const startTime = this.order_record_start_time
26
+ ? DateTime.fromISO(this.order_record_start_time)
27
+ : null;
28
+ if (startTime && startTime.isValid) {
29
+ const now = DateTime.now().minus({ hour: 2 });
30
+ needsCheckCall = startTime < now;
31
+ }
32
+ if (rDate && rDate.isValid) {
33
+ const now = DateTime.now().minus({ hour: 4 });
34
+ needsCheckCall = rDate < now;
35
+ }
36
+ return needsCheckCall;
37
+ }
38
+ needsETA() {
39
+ const rDate = this.ship_con_eta_reminder_time
40
+ ? DateTime.fromISO(this.ship_con_eta_reminder_time)
41
+ : null;
42
+ const now = DateTime.now();
43
+ let needsETA = false;
44
+ if (this.at_location)
45
+ return needsETA;
46
+ if (rDate)
47
+ needsETA = rDate < now;
48
+ else if (this.needs_ship_con_eta)
49
+ needsETA = true;
50
+ return needsETA;
51
+ }
52
+ }
53
+ //# sourceMappingURL=helper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../src/entities/otrDispatchV1/helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,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;IAED,cAAc;QACZ,MAAM,KAAK,GAAG,IAAI,CAAC,8BAA8B;YAC/C,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,8BAA8B,CAAC;YACvD,CAAC,CAAC,IAAI,CAAC;QACT,IAAI,cAAc,GAAG,KAAK,CAAC;QAC3B,IAAI,IAAI,CAAC,eAAe,KAAK,CAAC;YAAE,OAAO,KAAK,CAAC;QAC7C,IAAI,IAAI,CAAC,WAAW;YAAE,OAAO,KAAK,CAAC;QACnC,MAAM,SAAS,GAAG,IAAI,CAAC,uBAAuB;YAC5C,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,CAAC;YAChD,CAAC,CAAC,IAAI,CAAC;QACT,IAAI,SAAS,IAAI,SAAS,CAAC,OAAO,EAAE;YAClC,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;YAC9C,cAAc,GAAG,SAAS,GAAG,GAAG,CAAC;SAClC;QACD,IAAI,KAAK,IAAI,KAAK,CAAC,OAAO,EAAE;YAC1B,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;YAC9C,cAAc,GAAG,KAAK,GAAG,GAAG,CAAC;SAC9B;QACD,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,QAAQ;QACN,MAAM,KAAK,GAAG,IAAI,CAAC,0BAA0B;YAC3C,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,CAAC;YACnD,CAAC,CAAC,IAAI,CAAC;QACT,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC;QAC3B,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,IAAI,IAAI,CAAC,WAAW;YAAE,OAAO,QAAQ,CAAC;QACtC,IAAI,KAAK;YAAE,QAAQ,GAAG,KAAK,GAAG,GAAG,CAAC;aAC7B,IAAI,IAAI,CAAC,kBAAkB;YAAE,QAAQ,GAAG,IAAI,CAAC;QAClD,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export { default as OtrDispatchV1 } from "./helper";
2
+ export { default as OtrDispatchV1_Entity } from "./otrDispatchV1";
@@ -0,0 +1,3 @@
1
+ export { default as OtrDispatchV1 } from "./helper";
2
+ export { default as OtrDispatchV1_Entity } from "./otrDispatchV1";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/otrDispatchV1/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,79 @@
1
+ export default class OtrDispatchV1_Entity {
2
+ static requiredFields: string[];
3
+ constructor(otrDispatchV1Json: unknown);
4
+ id?: string;
5
+ dispatch_status?: string;
6
+ dispatch_path_edge_ids?: number[];
7
+ commodity_piece_edges_ids?: number[];
8
+ ship_con_id?: number;
9
+ stop_date?: string;
10
+ ship_cons_type?: string;
11
+ stop_number?: number;
12
+ item_order?: string;
13
+ name?: string;
14
+ city?: string;
15
+ state?: string;
16
+ zip?: string;
17
+ time_from?: string;
18
+ time_to?: string;
19
+ otr_shipper?: boolean;
20
+ location_id?: number;
21
+ appointment_arrival_id?: number;
22
+ departed?: boolean;
23
+ at_location?: boolean;
24
+ needs_ship_con_eta?: boolean;
25
+ ship_con_eta_local?: string;
26
+ ship_con_eta_reminder_time?: string;
27
+ relay_code?: string;
28
+ load_id?: number;
29
+ quote_id?: number;
30
+ service_level?: string;
31
+ load_type?: string;
32
+ last_location?: string;
33
+ quote_total?: number;
34
+ customer_id?: number;
35
+ customer_name?: string;
36
+ active?: boolean;
37
+ cancelled?: boolean;
38
+ requires_tracking?: boolean;
39
+ reefer_temp?: string;
40
+ last_user_note?: string;
41
+ commodity_id?: number;
42
+ shipper_id?: number;
43
+ consignee_id?: number;
44
+ pallets?: number;
45
+ feet?: number;
46
+ weight?: number;
47
+ commodity_piece_id?: number;
48
+ commodity_pieces?: Array<number>;
49
+ commodity_piece_ids?: Array<number>;
50
+ cargo_consolidation_id?: number;
51
+ carrier_id?: number;
52
+ consolidation_date?: string;
53
+ assigned_person_id?: number;
54
+ assigned_person?: string;
55
+ node_id?: number;
56
+ origin_node?: string;
57
+ next_node_id?: number;
58
+ pallet_manifest_id?: number;
59
+ otr_storage?: boolean;
60
+ loading_status?: string;
61
+ start_brokerage_rate?: number;
62
+ max_brokerage_rate?: number;
63
+ otr_posted?: boolean;
64
+ last_brokerage_note?: string;
65
+ contact_info?: string;
66
+ needs_check_call?: boolean;
67
+ last_check_call_time?: string;
68
+ last_check_call_or_update_time?: string;
69
+ carrier_tender_id?: number;
70
+ trip_type?: string;
71
+ trip_id?: number;
72
+ generated?: boolean;
73
+ approved?: boolean;
74
+ carrier_tender_cost?: number;
75
+ tracking_status?: string;
76
+ order_record_id?: number;
77
+ order_record_start_time?: string;
78
+ date?: string;
79
+ }
@@ -0,0 +1,178 @@
1
+ /**
2
+ * OtrDispatchV1_Entity type guard.
3
+ *
4
+ * @param {any} otrDispatchV1Json OtrDispatchV1 object from API
5
+ * @returns {boolean} Return true if type is OtrDispatchV1_Entity
6
+ */
7
+ function validator(otrDispatchV1Json) {
8
+ if (typeof otrDispatchV1Json === "object" && otrDispatchV1Json != null) {
9
+ OtrDispatchV1_Entity.requiredFields.forEach((element) => {
10
+ if (!Object.keys(otrDispatchV1Json).includes(element))
11
+ throw new Error(`Field ${element} is null or undefined`);
12
+ });
13
+ }
14
+ return true;
15
+ }
16
+ export default class OtrDispatchV1_Entity {
17
+ static requiredFields = ["id"];
18
+ constructor(otrDispatchV1Json) {
19
+ if (validator(otrDispatchV1Json)) {
20
+ this.id = otrDispatchV1Json.id;
21
+ this.commodity_piece_edges_ids =
22
+ otrDispatchV1Json.commodity_piece_edges_ids;
23
+ this.dispatch_path_edge_ids = otrDispatchV1Json.dispatch_path_edge_ids;
24
+ this.dispatch_status = otrDispatchV1Json.dispatch_status;
25
+ this.ship_con_id = otrDispatchV1Json.ship_con_id;
26
+ this.stop_date = otrDispatchV1Json.stop_date;
27
+ this.ship_cons_type = otrDispatchV1Json.ship_cons_type;
28
+ this.stop_number = otrDispatchV1Json.stop_number;
29
+ this.item_order = otrDispatchV1Json.item_order;
30
+ this.name = otrDispatchV1Json.name;
31
+ this.city = otrDispatchV1Json.city;
32
+ this.state = otrDispatchV1Json.state;
33
+ this.zip = otrDispatchV1Json.zip;
34
+ this.time_from = otrDispatchV1Json.time_from;
35
+ this.time_to = otrDispatchV1Json.time_to;
36
+ this.otr_shipper = otrDispatchV1Json.otr_shipper;
37
+ this.location_id = otrDispatchV1Json.location_id;
38
+ this.appointment_arrival_id = otrDispatchV1Json.appointment_arrival_id;
39
+ this.departed = otrDispatchV1Json.departed;
40
+ this.at_location = otrDispatchV1Json.at_location;
41
+ this.needs_ship_con_eta = otrDispatchV1Json.needs_ship_con_eta;
42
+ this.ship_con_eta_local = otrDispatchV1Json.ship_con_eta_local;
43
+ this.ship_con_eta_reminder_time =
44
+ otrDispatchV1Json.ship_con_eta_reminder_time;
45
+ this.relay_code = otrDispatchV1Json.relay_code;
46
+ this.load_id = otrDispatchV1Json.load_id;
47
+ this.quote_id = otrDispatchV1Json.quote_id;
48
+ this.service_level = otrDispatchV1Json.service_level;
49
+ this.load_type = otrDispatchV1Json.load_type;
50
+ this.last_location = otrDispatchV1Json.last_location;
51
+ this.quote_total = otrDispatchV1Json.quote_total;
52
+ this.customer_id = otrDispatchV1Json.customer_id;
53
+ this.customer_name = otrDispatchV1Json.customer_name;
54
+ this.active = otrDispatchV1Json.active;
55
+ this.cancelled = otrDispatchV1Json.cancelled;
56
+ this.requires_tracking = otrDispatchV1Json.requires_tracking;
57
+ this.reefer_temp = otrDispatchV1Json.reefer_temp;
58
+ this.last_user_note = otrDispatchV1Json.last_user_note;
59
+ this.commodity_id = otrDispatchV1Json.commodity_id;
60
+ this.shipper_id = otrDispatchV1Json.shipper_id;
61
+ this.consignee_id = otrDispatchV1Json.consignee_id;
62
+ this.pallets = otrDispatchV1Json.pallets;
63
+ this.feet = otrDispatchV1Json.feet;
64
+ this.weight = otrDispatchV1Json.weight;
65
+ this.commodity_piece_id = otrDispatchV1Json.commodity_piece_id;
66
+ this.commodity_pieces = otrDispatchV1Json.commodity_pieces;
67
+ this.commodity_piece_ids = otrDispatchV1Json.commodity_piece_ids;
68
+ this.cargo_consolidation_id = otrDispatchV1Json.cargo_consolidation_id;
69
+ this.carrier_id = otrDispatchV1Json.carrier_id;
70
+ this.consolidation_date = otrDispatchV1Json.consolidation_date;
71
+ this.assigned_person_id = otrDispatchV1Json.assigned_person_id;
72
+ this.assigned_person = otrDispatchV1Json.assigned_person;
73
+ this.node_id = otrDispatchV1Json.node_id;
74
+ this.origin_node = otrDispatchV1Json.origin_node;
75
+ this.next_node_id = otrDispatchV1Json.next_node_id;
76
+ this.pallet_manifest_id = otrDispatchV1Json.pallet_manifest_id;
77
+ this.otr_storage = otrDispatchV1Json.otr_storage;
78
+ this.loading_status = otrDispatchV1Json.loading_status;
79
+ this.start_brokerage_rate = otrDispatchV1Json.start_brokerage_rate;
80
+ this.max_brokerage_rate = otrDispatchV1Json.max_brokerage_rate;
81
+ this.otr_posted = otrDispatchV1Json.otr_posted;
82
+ this.last_brokerage_note = otrDispatchV1Json.last_brokerage_note;
83
+ this.contact_info = otrDispatchV1Json.contact_info;
84
+ this.needs_check_call = otrDispatchV1Json.needs_check_call;
85
+ this.last_check_call_time = otrDispatchV1Json.last_check_call_time;
86
+ this.last_check_call_or_update_time =
87
+ otrDispatchV1Json.last_check_call_or_update_time;
88
+ this.carrier_tender_id = otrDispatchV1Json.carrier_tender_id;
89
+ this.trip_type = otrDispatchV1Json.trip_type;
90
+ this.trip_id = otrDispatchV1Json.trip_id;
91
+ this.generated = otrDispatchV1Json.generated;
92
+ this.approved = otrDispatchV1Json.approved;
93
+ this.carrier_tender_cost = otrDispatchV1Json.carrier_tender_cost;
94
+ this.tracking_status = otrDispatchV1Json.tracking_status;
95
+ this.order_record_id = otrDispatchV1Json.order_record_id;
96
+ this.order_record_start_time = otrDispatchV1Json.order_record_start_time;
97
+ this.date = otrDispatchV1Json.date;
98
+ }
99
+ else
100
+ throw new Error(`Failed to create new instance of ${OtrDispatchV1_Entity.name}`);
101
+ }
102
+ id;
103
+ dispatch_status;
104
+ dispatch_path_edge_ids;
105
+ commodity_piece_edges_ids;
106
+ ship_con_id;
107
+ stop_date;
108
+ ship_cons_type;
109
+ stop_number;
110
+ item_order;
111
+ name;
112
+ city;
113
+ state;
114
+ zip;
115
+ time_from;
116
+ time_to;
117
+ otr_shipper;
118
+ location_id;
119
+ appointment_arrival_id;
120
+ departed;
121
+ at_location;
122
+ needs_ship_con_eta;
123
+ ship_con_eta_local;
124
+ ship_con_eta_reminder_time;
125
+ relay_code;
126
+ load_id;
127
+ quote_id;
128
+ service_level;
129
+ load_type;
130
+ last_location;
131
+ quote_total;
132
+ customer_id;
133
+ customer_name;
134
+ active;
135
+ cancelled;
136
+ requires_tracking;
137
+ reefer_temp;
138
+ last_user_note;
139
+ commodity_id;
140
+ shipper_id;
141
+ consignee_id;
142
+ pallets;
143
+ feet;
144
+ weight;
145
+ commodity_piece_id;
146
+ commodity_pieces;
147
+ commodity_piece_ids;
148
+ cargo_consolidation_id;
149
+ carrier_id;
150
+ consolidation_date;
151
+ assigned_person_id;
152
+ assigned_person;
153
+ node_id;
154
+ origin_node;
155
+ next_node_id;
156
+ pallet_manifest_id;
157
+ otr_storage;
158
+ loading_status;
159
+ start_brokerage_rate;
160
+ max_brokerage_rate;
161
+ otr_posted;
162
+ last_brokerage_note;
163
+ contact_info;
164
+ needs_check_call;
165
+ last_check_call_time;
166
+ last_check_call_or_update_time;
167
+ carrier_tender_id;
168
+ trip_type;
169
+ trip_id;
170
+ generated;
171
+ approved;
172
+ carrier_tender_cost;
173
+ tracking_status;
174
+ order_record_id;
175
+ order_record_start_time;
176
+ date;
177
+ }
178
+ //# sourceMappingURL=otrDispatchV1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"otrDispatchV1.js","sourceRoot":"","sources":["../../../src/entities/otrDispatchV1/otrDispatchV1.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,SAAS,SAAS,C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AmB,CAAU;IAC7B,YAAY,CAAU;IACtB,gBAAgB,CAAW;IAC3B,oBAAoB,CAAU;IAC9B,8BAA8B,CAAU;IACxC,iBAAiB,CAAU;IAC3B,SAAS,CAAU;IACnB,OAAO,CAAU;IACjB,SAAS,CAAW;IACpB,QAAQ,CAAW;IACnB,mBAAmB,CAAU;IAC7B,eAAe,CAAU;IACzB,eAAe,CAAU;IACzB,uBAAuB,CAAU;IACjC,IAAI,CAAU"}
@@ -0,0 +1,5 @@
1
+ import PersonV1_Entity from "./personV1";
2
+ export default class PersonV1 extends PersonV1_Entity {
3
+ static fromList(personV1sJSON: unknown): Array<PersonV1>;
4
+ toJson(): string;
5
+ }
@@ -0,0 +1,16 @@
1
+ import PersonV1_Entity from "./personV1";
2
+ export default class PersonV1 extends PersonV1_Entity {
3
+ static fromList(personV1sJSON) {
4
+ const personV1s = [];
5
+ if (personV1sJSON)
6
+ Array.isArray(personV1sJSON) &&
7
+ personV1sJSON.forEach((personV1JSON) => {
8
+ personV1s.push(new PersonV1(personV1JSON));
9
+ });
10
+ return personV1s;
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/personV1/helper.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,YAAY,CAAC;AACzC,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,YAAY,EAAE,EAAE;oBACrC,SAAS,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC;gBAC7C,CAAC,CAAC,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export { default as PersonV1 } from "./helper";
2
+ export { default as PersonV1_Entity } from "./personV1";
@@ -0,0 +1,3 @@
1
+ export { default as PersonV1 } from "./helper";
2
+ export { default as PersonV1_Entity } from "./personV1";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/personV1/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,44 @@
1
+ export default class PersonV1_Entity {
2
+ static requiredFields: string[];
3
+ constructor(personV1Json: unknown);
4
+ active?: boolean;
5
+ address_ids?: number[];
6
+ annotation_ids?: number[];
7
+ api_key?: string;
8
+ appointment_issue_category_ids?: number[];
9
+ area_ids?: number[];
10
+ company_id?: number;
11
+ created_at?: string;
12
+ customer_id?: number;
13
+ dashboard_ids?: number[];
14
+ days_between_votes?: number;
15
+ days_since_last_vote?: string;
16
+ driver_id?: number;
17
+ email?: string;
18
+ employee_id?: number;
19
+ first_name?: string;
20
+ flag_ids?: number[];
21
+ flags_object_ids?: number[];
22
+ id?: number;
23
+ last_name?: string;
24
+ last_rated?: string;
25
+ model_right_ids?: number[];
26
+ name?: string;
27
+ node_id?: number;
28
+ node_ids?: number[];
29
+ password?: string;
30
+ password_confirmation?: string;
31
+ people_rating_ids?: number[];
32
+ phone_number?: string;
33
+ reason_for_vote?: string;
34
+ reference_code?: string;
35
+ reset_password_sent_at?: string;
36
+ reset_password_token?: string;
37
+ role_ids?: number[];
38
+ role_names?: string[];
39
+ summary_panel_ids?: number[];
40
+ supervisor_id?: number;
41
+ updated_at?: string;
42
+ uuid?: string;
43
+ version_ids?: number[];
44
+ }
@@ -0,0 +1,106 @@
1
+ /**
2
+ * PersonV1_Entity type guard.
3
+ *
4
+ * @param {any} personV1Json PersonV1 object from API
5
+ * @returns {boolean} Return true if type is PersonV1_Entity
6
+ */
7
+ function validator(personV1Json) {
8
+ if (typeof personV1Json === "object" && personV1Json != null) {
9
+ PersonV1_Entity.requiredFields.forEach((element) => {
10
+ if (!Object.keys(personV1Json).includes(element))
11
+ throw new Error(`Field ${element} is null or undefined`);
12
+ });
13
+ }
14
+ return true;
15
+ }
16
+ export default class PersonV1_Entity {
17
+ static requiredFields = ["id"];
18
+ constructor(personV1Json) {
19
+ if (validator(personV1Json)) {
20
+ this.id = personV1Json.id;
21
+ this.active = personV1Json.active;
22
+ this.address_ids = personV1Json.address_ids;
23
+ this.annotation_ids = personV1Json.annotation_ids;
24
+ this.api_key = personV1Json.api_key;
25
+ this.appointment_issue_category_ids =
26
+ personV1Json.appointment_issue_category_ids;
27
+ this.area_ids = personV1Json.area_ids;
28
+ this.company_id = personV1Json.company_id;
29
+ this.created_at = personV1Json.created_at;
30
+ this.customer_id = personV1Json.customer_id;
31
+ this.dashboard_ids = personV1Json.dashboard_ids;
32
+ this.days_between_votes = personV1Json.days_between_votes;
33
+ this.days_since_last_vote = personV1Json.days_since_last_vote;
34
+ this.driver_id = personV1Json.driver_id;
35
+ this.email = personV1Json.email;
36
+ this.employee_id = personV1Json.employee_id;
37
+ this.first_name = personV1Json.first_name;
38
+ this.flag_ids = personV1Json.flag_ids;
39
+ this.flags_object_ids = personV1Json.flags_object_ids;
40
+ this.last_name = personV1Json.last_name;
41
+ this.last_rated = personV1Json.last_rated;
42
+ this.model_right_ids = personV1Json.model_right_ids;
43
+ this.name = personV1Json.name;
44
+ this.node_id = personV1Json.node_id;
45
+ this.node_ids = personV1Json.node_ids;
46
+ this.password = personV1Json.password;
47
+ this.password_confirmation = personV1Json.password_confirmation;
48
+ this.people_rating_ids = personV1Json.people_rating_ids;
49
+ this.phone_number = personV1Json.phone_number;
50
+ this.reason_for_vote = personV1Json.reason_for_vote;
51
+ this.reference_code = personV1Json.reference_code;
52
+ this.reset_password_sent_at = personV1Json.reset_password_sent_at;
53
+ this.reset_password_token = personV1Json.reset_password_token;
54
+ this.role_ids = personV1Json.role_ids;
55
+ this.role_names = personV1Json.role_names;
56
+ this.summary_panel_ids = personV1Json.summary_panel_ids;
57
+ this.supervisor_id = personV1Json.supervisor_id;
58
+ this.updated_at = personV1Json.updated_at;
59
+ this.uuid = personV1Json.uuid;
60
+ this.version_ids = personV1Json.version_ids;
61
+ }
62
+ else
63
+ throw new Error(`Failed to create new instance of ${PersonV1_Entity.name}`);
64
+ }
65
+ active;
66
+ address_ids;
67
+ annotation_ids;
68
+ api_key;
69
+ appointment_issue_category_ids;
70
+ area_ids;
71
+ company_id;
72
+ created_at;
73
+ customer_id;
74
+ dashboard_ids;
75
+ days_between_votes;
76
+ days_since_last_vote;
77
+ driver_id;
78
+ email;
79
+ employee_id;
80
+ first_name;
81
+ flag_ids;
82
+ flags_object_ids;
83
+ id;
84
+ last_name;
85
+ last_rated;
86
+ model_right_ids;
87
+ name;
88
+ node_id;
89
+ node_ids;
90
+ password;
91
+ password_confirmation;
92
+ people_rating_ids;
93
+ phone_number;
94
+ reason_for_vote;
95
+ reference_code;
96
+ reset_password_sent_at;
97
+ reset_password_token;
98
+ role_ids;
99
+ role_names;
100
+ summary_panel_ids;
101
+ supervisor_id;
102
+ updated_at;
103
+ uuid;
104
+ version_ids;
105
+ }
106
+ //# sourceMappingURL=personV1.js.map