@nerdjs/sales-kit 2.0.46 → 2.0.48

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 (114) hide show
  1. package/dist/entities/claim/claim.d.ts +43 -0
  2. package/dist/entities/claim/claim.js +103 -0
  3. package/dist/entities/claim/claim.js.map +1 -0
  4. package/dist/entities/claim/helper.d.ts +5 -0
  5. package/dist/entities/claim/helper.js +16 -0
  6. package/dist/entities/claim/helper.js.map +1 -0
  7. package/dist/entities/claim/index.d.ts +2 -0
  8. package/dist/entities/claim/index.js +3 -0
  9. package/dist/entities/claim/index.js.map +1 -0
  10. package/dist/entities/claimResponse/claimResponse.d.ts +14 -0
  11. package/dist/entities/claimResponse/claimResponse.js +45 -0
  12. package/dist/entities/claimResponse/claimResponse.js.map +1 -0
  13. package/dist/entities/claimResponse/helper.d.ts +5 -0
  14. package/dist/entities/claimResponse/helper.js +16 -0
  15. package/dist/entities/claimResponse/helper.js.map +1 -0
  16. package/dist/entities/claimResponse/index.d.ts +2 -0
  17. package/dist/entities/claimResponse/index.js +3 -0
  18. package/dist/entities/claimResponse/index.js.map +1 -0
  19. package/dist/entities/claimStatus/claimStatus.d.ts +6 -0
  20. package/dist/entities/claimStatus/claimStatus.js +29 -0
  21. package/dist/entities/claimStatus/claimStatus.js.map +1 -0
  22. package/dist/entities/claimStatus/helper.d.ts +5 -0
  23. package/dist/entities/claimStatus/helper.js +16 -0
  24. package/dist/entities/claimStatus/helper.js.map +1 -0
  25. package/dist/entities/claimStatus/index.d.ts +2 -0
  26. package/dist/entities/claimStatus/index.js +3 -0
  27. package/dist/entities/claimStatus/index.js.map +1 -0
  28. package/dist/entities/index.d.ts +4 -0
  29. package/dist/entities/index.js +4 -0
  30. package/dist/entities/index.js.map +1 -1
  31. package/dist/entities/userNotification/helper.d.ts +5 -0
  32. package/dist/entities/userNotification/helper.js +16 -0
  33. package/dist/entities/userNotification/helper.js.map +1 -0
  34. package/dist/entities/userNotification/index.d.ts +2 -0
  35. package/dist/entities/userNotification/index.js +3 -0
  36. package/dist/entities/userNotification/index.js.map +1 -0
  37. package/dist/entities/userNotification/userNotification.d.ts +17 -0
  38. package/dist/entities/userNotification/userNotification.js +52 -0
  39. package/dist/entities/userNotification/userNotification.js.map +1 -0
  40. package/dist/hooks/locationsForm/locationsFormSales.js +2 -2
  41. package/dist/hooks/locationsForm/locationsFormSales.js.map +1 -1
  42. package/dist/hooks/quote/form.js +13 -3
  43. package/dist/hooks/quote/form.js.map +1 -1
  44. package/dist/hooks/quote/helpers.d.ts +1 -1
  45. package/dist/hooks/quote/helpers.js +15 -5
  46. package/dist/hooks/quote/helpers.js.map +1 -1
  47. package/dist/hooks/quote/result.d.ts +2 -1
  48. package/dist/hooks/quote/result.js +1 -1
  49. package/dist/hooks/quote/result.js.map +1 -1
  50. package/dist/hooks/quote/template.d.ts +2 -1
  51. package/dist/hooks/quote/template.js.map +1 -1
  52. package/dist/redux/api/salesApi.d.ts +1 -1
  53. package/dist/redux/api/salesApi.js +3 -0
  54. package/dist/redux/api/salesApi.js.map +1 -1
  55. package/dist/redux/appointmentIssue/appointmentIssueEndpoints.d.ts +10 -10
  56. package/dist/redux/appointmentIssueCategory/appointmentIssueCategoryEndpoints.d.ts +11 -11
  57. package/dist/redux/appointmentIssueSubcategory/appointmentIssueSubcategoryEndpoints.d.ts +10 -10
  58. package/dist/redux/appointmentNote/appointmentNoteEndpoints.d.ts +10 -10
  59. package/dist/redux/appointmentNoteType/appointmentNoteTypeEndpoints.d.ts +10 -10
  60. package/dist/redux/archerFile/archerFileEndpoints.d.ts +13 -13
  61. package/dist/redux/carrierName/carrierNameEndpoints.d.ts +10 -10
  62. package/dist/redux/claim/claimEndpoints.d.ts +50 -0
  63. package/dist/redux/claim/claimEndpoints.js +90 -0
  64. package/dist/redux/claim/claimEndpoints.js.map +1 -0
  65. package/dist/redux/claim/index.d.ts +2 -0
  66. package/dist/redux/claim/index.js +3 -0
  67. package/dist/redux/claim/index.js.map +1 -0
  68. package/dist/redux/claimStatus/claimStatusEndpoints.d.ts +24 -0
  69. package/dist/redux/claimStatus/claimStatusEndpoints.js +64 -0
  70. package/dist/redux/claimStatus/claimStatusEndpoints.js.map +1 -0
  71. package/dist/redux/claimStatus/index.d.ts +2 -0
  72. package/dist/redux/claimStatus/index.js +3 -0
  73. package/dist/redux/claimStatus/index.js.map +1 -0
  74. package/dist/redux/commodityV1/commodityV1Endpoints.d.ts +11 -11
  75. package/dist/redux/contact/contactEndpoints.d.ts +10 -10
  76. package/dist/redux/customer/customerEndpoints.d.ts +16 -16
  77. package/dist/redux/customersAccessorial/customersAccessorialEndpoints.d.ts +9 -9
  78. package/dist/redux/dispatch/dispatchEndpoints.d.ts +10 -10
  79. package/dist/redux/driverName/driverNameEndpoints.d.ts +9 -9
  80. package/dist/redux/flag/flagEndpoints.d.ts +9 -9
  81. package/dist/redux/genericTender/genericTenderEndpoints.d.ts +10 -10
  82. package/dist/redux/holiday/holidayEndpoints.d.ts +10 -10
  83. package/dist/redux/index.d.ts +2 -0
  84. package/dist/redux/index.js +2 -0
  85. package/dist/redux/index.js.map +1 -1
  86. package/dist/redux/load/loadEndpoints.d.ts +11 -11
  87. package/dist/redux/loadAdjustment/loadAdjustmentEndpoints.d.ts +10 -10
  88. package/dist/redux/loadAdjustmentV1/loadAdjustmentV1Endpoints.d.ts +10 -10
  89. package/dist/redux/loadTender/loadTenderEndpoints.d.ts +12 -12
  90. package/dist/redux/loadV1/loadV1Endpoints.d.ts +61 -51
  91. package/dist/redux/loadV1/loadV1Endpoints.js +11 -5
  92. package/dist/redux/loadV1/loadV1Endpoints.js.map +1 -1
  93. package/dist/redux/location/locationEndpoints.d.ts +14 -14
  94. package/dist/redux/locationV1/locationV1Endpoints.d.ts +19 -19
  95. package/dist/redux/nmfcClass/nmfcClassEndpoints.d.ts +9 -9
  96. package/dist/redux/nodeName/nodeNameEndpoints.d.ts +10 -10
  97. package/dist/redux/notification/notificationEndpoints.d.ts +14 -13
  98. package/dist/redux/notification/notificationEndpoints.js +8 -1
  99. package/dist/redux/notification/notificationEndpoints.js.map +1 -1
  100. package/dist/redux/person/personEndpoints.d.ts +11 -11
  101. package/dist/redux/personName/personNameEndpoints.d.ts +10 -10
  102. package/dist/redux/quote/quoteEndpoints.d.ts +22 -22
  103. package/dist/redux/quote/quoteHooks.d.ts +2 -2
  104. package/dist/redux/quoteAccessorial/quoteAccessorialEndpoints.d.ts +9 -9
  105. package/dist/redux/quoteAccessorialV1/quoteAccessorialV1Endpoints.d.ts +10 -10
  106. package/dist/redux/rateReview/rateReviewEndpoints.d.ts +10 -10
  107. package/dist/redux/shipcon/shipconEndpoints.d.ts +10 -10
  108. package/dist/redux/shipconV1/shipconV1Endpoints.d.ts +16 -16
  109. package/dist/redux/tender/tenderEndpoints.d.ts +9 -9
  110. package/dist/redux/trailerAvailability/customerEndpoints.d.ts +4 -4
  111. package/dist/redux/types.d.ts +2 -2
  112. package/dist/redux/unitV1/unitV1Endpoints.d.ts +9 -9
  113. package/dist/redux/userNoteV1/userNoteV1Endpoints.d.ts +10 -10
  114. package/package.json +1 -1
@@ -0,0 +1,43 @@
1
+ export default class Claim_Entity {
2
+ static requiredFields: never[];
3
+ constructor(claimJson: unknown);
4
+ id?: number;
5
+ load_id?: number;
6
+ claim_category_id?: number;
7
+ claim_type_id?: number;
8
+ bill_signed?: string;
9
+ incident_date?: string;
10
+ customer_claim_reference?: string;
11
+ driver_id?: number;
12
+ person_id?: number;
13
+ picture?: boolean;
14
+ product_location?: string;
15
+ notes?: string;
16
+ node_id?: number;
17
+ load_type?: string;
18
+ claim_status_id?: number;
19
+ created_at?: string;
20
+ customer_id?: number;
21
+ customer_name?: string;
22
+ customer_email?: string;
23
+ customer_phone?: string;
24
+ origin?: string;
25
+ destination?: string;
26
+ claim_value?: number;
27
+ claim_paid?: number;
28
+ days_left?: number;
29
+ reference_number?: number;
30
+ days_to_close?: number;
31
+ seven_day_update?: boolean;
32
+ days_since_last_update?: number;
33
+ has_picture?: boolean;
34
+ last_response_note?: string;
35
+ labels?: string;
36
+ last_response_date?: string;
37
+ node_name?: string;
38
+ type_name?: string;
39
+ claim_type_name?: string;
40
+ claim_status_name?: string;
41
+ customer_osd_notes?: string;
42
+ customer_osd_tms?: string;
43
+ }
@@ -0,0 +1,103 @@
1
+ /**
2
+ * Claim_Entity type guard.
3
+ *
4
+ * @param {any} claimJson Claim object from API
5
+ * @returns {boolean} Return true if type is Claim_Entity
6
+ */
7
+ function validator(claimJson) {
8
+ if (typeof claimJson === "object" && claimJson != null) {
9
+ Claim_Entity.requiredFields.forEach((element) => {
10
+ if (!Object.keys(claimJson).includes(element))
11
+ throw new Error(`Field ${element} is null or undefined`);
12
+ });
13
+ }
14
+ return true;
15
+ }
16
+ export default class Claim_Entity {
17
+ static requiredFields = [];
18
+ constructor(claimJson) {
19
+ if (validator(claimJson)) {
20
+ this.id = claimJson.id;
21
+ this.load_id = claimJson.load_id;
22
+ this.claim_category_id = claimJson.claim_category_id;
23
+ this.claim_type_id = claimJson.claim_type_id;
24
+ this.bill_signed = claimJson.bill_signed;
25
+ this.incident_date = claimJson.incident_date;
26
+ this.customer_claim_reference = claimJson.customer_claim_reference;
27
+ this.driver_id = claimJson.driver_id;
28
+ this.person_id = claimJson.person_id;
29
+ this.picture = claimJson.picture;
30
+ this.product_location = claimJson.product_location;
31
+ this.notes = claimJson.notes;
32
+ this.node_id = claimJson.node_id;
33
+ this.load_type = claimJson.load_type;
34
+ this.claim_status_id = claimJson.claim_status_id;
35
+ this.created_at = claimJson.created_at;
36
+ this.customer_id = claimJson.customer_id;
37
+ this.customer_name = claimJson.customer_name;
38
+ this.customer_email = claimJson.customer_email;
39
+ this.customer_phone = claimJson.customer_phone;
40
+ this.origin = claimJson.origin;
41
+ this.destination = claimJson.destination;
42
+ this.claim_value = claimJson.claim_value;
43
+ this.claim_paid = claimJson.claim_paid;
44
+ this.days_left = claimJson.days_left;
45
+ this.reference_number = claimJson.reference_number;
46
+ this.days_to_close = claimJson.days_to_close;
47
+ this.seven_day_update = claimJson.seven_day_update;
48
+ this.days_since_last_update = claimJson.days_since_last_update;
49
+ this.has_picture = claimJson.has_picture;
50
+ this.last_response_note = claimJson.last_response_note;
51
+ this.labels = claimJson.labels;
52
+ this.last_response_date = claimJson.last_response_date;
53
+ this.node_name = claimJson.node_name;
54
+ this.type_name = claimJson.type_name;
55
+ this.claim_type_name = claimJson.claim_type_name;
56
+ this.claim_status_name = claimJson.claim_status_name;
57
+ this.customer_osd_notes = claimJson.customer_osd_notes;
58
+ this.customer_osd_tms = claimJson.customer_osd_tms;
59
+ }
60
+ else
61
+ throw new Error(`Failed to create new instance of ${Claim_Entity.name}`);
62
+ }
63
+ id;
64
+ load_id;
65
+ claim_category_id;
66
+ claim_type_id;
67
+ bill_signed;
68
+ incident_date;
69
+ customer_claim_reference;
70
+ driver_id;
71
+ person_id;
72
+ picture;
73
+ product_location;
74
+ notes;
75
+ node_id;
76
+ load_type;
77
+ claim_status_id;
78
+ created_at;
79
+ customer_id;
80
+ customer_name;
81
+ customer_email;
82
+ customer_phone;
83
+ origin;
84
+ destination;
85
+ claim_value;
86
+ claim_paid;
87
+ days_left;
88
+ reference_number;
89
+ days_to_close;
90
+ seven_day_update;
91
+ days_since_last_update;
92
+ has_picture;
93
+ last_response_note;
94
+ labels;
95
+ last_response_date;
96
+ node_name;
97
+ type_name;
98
+ claim_type_name;
99
+ claim_status_name;
100
+ customer_osd_notes;
101
+ customer_osd_tms;
102
+ }
103
+ //# sourceMappingURL=claim.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claim.js","sourceRoot":"","sources":["../../../src/entities/claim/claim.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,SAAS,SAAS,CAAC,SAAkB;IACnC,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,IAAI,IAAI,EAAE;QACtD,YAAY,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC9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,CAAC;YACvD,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC,gBAAgB,CAAC;SACpD;;YACC,MAAM,IAAI,KAAK,CAAC,oCAAoC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED,EAAE,CAAU;IACZ,OAAO,CAAU;IACjB,iBAAiB,CAAU;IAC3B,aAAa,CAAU;IACvB,WAAW,CAAU;IACrB,aAAa,CAAU;IACvB,wBAAwB,CAAU;IAClC,SAAS,CAAU;IACnB,SAAS,CAAU;IACnB,OAAO,CAAW;IAClB,gBAAgB,CAAU;IAC1B,KAAK,CAAU;IACf,OAAO,CAAU;IACjB,SAAS,CAAU;IACnB,eAAe,CAAU;IACzB,UAAU,CAAU;IACpB,WAAW,CAAU;IACrB,aAAa,CAAU;IACvB,cAAc,CAAU;IACxB,cAAc,CAAU;IACxB,MAAM,CAAU;IAChB,WAAW,CAAU;IACrB,WAAW,CAAU;IACrB,UAAU,CAAU;IACpB,SAAS,CAAU;IACnB,gBAAgB,CAAU;IAC1B,aAAa,CAAU;IACvB,gBAAgB,CAAW;IAC3B,sBAAsB,CAAU;IAChC,WAAW,CAAW;IACtB,kBAAkB,CAAU;IAC5B,MAAM,CAAU;IAChB,kBAAkB,CAAU;IAC5B,SAAS,CAAU;IACnB,SAAS,CAAU;IACnB,eAAe,CAAU;IACzB,iBAAiB,CAAU;IAC3B,kBAAkB,CAAU;IAC5B,gBAAgB,CAAU"}
@@ -0,0 +1,5 @@
1
+ import Claim_Entity from "./claim";
2
+ export default class Claim extends Claim_Entity {
3
+ static fromList(claimsJSON: unknown): Array<Claim>;
4
+ toJson(): string;
5
+ }
@@ -0,0 +1,16 @@
1
+ import Claim_Entity from "./claim";
2
+ export default class Claim extends Claim_Entity {
3
+ static fromList(claimsJSON) {
4
+ const claims = [];
5
+ if (claimsJSON)
6
+ Array.isArray(claimsJSON) &&
7
+ claimsJSON.forEach((claimJSON) => {
8
+ claims.push(new Claim(claimJSON));
9
+ });
10
+ return claims;
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/claim/helper.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,SAAS,CAAC;AACnC,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,YAAY;IAC7C,MAAM,CAAC,QAAQ,CAAC,UAAmB;QACjC,MAAM,MAAM,GAAY,EAAE,CAAC;QAC3B,IAAI,UAAU;YACZ,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC;gBACvB,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;oBAC/B,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;gBACpC,CAAC,CAAC,CAAC;QACP,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export { default as Claim } from "./helper";
2
+ export { default as Claim_Entity } from "./claim";
@@ -0,0 +1,3 @@
1
+ export { default as Claim } from "./helper";
2
+ export { default as Claim_Entity } from "./claim";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/claim/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,14 @@
1
+ export default class ClaimResponse_Entity {
2
+ static requiredFields: never[];
3
+ constructor(claimResponseJson: unknown);
4
+ id?: number;
5
+ claim_id?: number;
6
+ response_date?: string;
7
+ person_id?: number;
8
+ claim_status_id?: number;
9
+ claim_value?: number;
10
+ claim_paid?: number;
11
+ notes?: string;
12
+ action?: string;
13
+ further_action?: string;
14
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * ClaimResponse_Entity type guard.
3
+ *
4
+ * @param {any} claimResponseJson ClaimResponse object from API
5
+ * @returns {boolean} Return true if type is ClaimResponse_Entity
6
+ */
7
+ function validator(claimResponseJson) {
8
+ if (typeof claimResponseJson === "object" && claimResponseJson != null) {
9
+ ClaimResponse_Entity.requiredFields.forEach((element) => {
10
+ if (!Object.keys(claimResponseJson).includes(element))
11
+ throw new Error(`Field ${element} is null or undefined`);
12
+ });
13
+ }
14
+ return true;
15
+ }
16
+ export default class ClaimResponse_Entity {
17
+ static requiredFields = [];
18
+ constructor(claimResponseJson) {
19
+ if (validator(claimResponseJson)) {
20
+ this.id = claimResponseJson.id;
21
+ this.claim_id = claimResponseJson.claim_id;
22
+ this.response_date = claimResponseJson.response_date;
23
+ this.person_id = claimResponseJson.person_id;
24
+ this.claim_status_id = claimResponseJson.claim_status_id;
25
+ this.claim_value = claimResponseJson.claim_value;
26
+ this.claim_paid = claimResponseJson.claim_paid;
27
+ this.notes = claimResponseJson.notes;
28
+ this.action = claimResponseJson.action;
29
+ this.further_action = claimResponseJson.further_action;
30
+ }
31
+ else
32
+ throw new Error(`Failed to create new instance of ${ClaimResponse_Entity.name}`);
33
+ }
34
+ id;
35
+ claim_id;
36
+ response_date;
37
+ person_id;
38
+ claim_status_id;
39
+ claim_value;
40
+ claim_paid;
41
+ notes;
42
+ action;
43
+ further_action;
44
+ }
45
+ //# sourceMappingURL=claimResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claimResponse.js","sourceRoot":"","sources":["../../../src/entities/claimResponse/claimResponse.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,SAAS,SAAS,CAChB,iBAA0B;IAE1B,IAAI,OAAO,iBAAiB,KAAK,QAAQ,IAAI,iBAAiB,IAAI,IAAI,EAAE;QACtE,oBAAoB,CAAC,cAAc,CAAC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cAAc,CAAU"}
@@ -0,0 +1,5 @@
1
+ import ClaimResponse_Entity from "./claimResponse";
2
+ export default class ClaimResponse extends ClaimResponse_Entity {
3
+ static fromList(claimResponsesJSON: unknown): Array<ClaimResponse>;
4
+ toJson(): string;
5
+ }
@@ -0,0 +1,16 @@
1
+ import ClaimResponse_Entity from "./claimResponse";
2
+ export default class ClaimResponse extends ClaimResponse_Entity {
3
+ static fromList(claimResponsesJSON) {
4
+ const claimResponses = [];
5
+ if (claimResponsesJSON)
6
+ Array.isArray(claimResponsesJSON) &&
7
+ claimResponsesJSON.forEach((claimResponseJSON) => {
8
+ claimResponses.push(new ClaimResponse(claimResponseJSON));
9
+ });
10
+ return claimResponses;
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/claimResponse/helper.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,MAAM,iBAAiB,CAAC;AACnD,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,oBAAoB;IAC7D,MAAM,CAAC,QAAQ,CAAC,kBAA2B;QACzC,MAAM,cAAc,GAAoB,EAAE,CAAC;QAC3C,IAAI,kBAAkB;YACpB,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC;gBAC/B,kBAAkB,CAAC,OAAO,CAAC,CAAC,iBAAiB,EAAE,EAAE;oBAC/C,cAAc,CAAC,IAAI,CAAC,IAAI,aAAa,CAAC,iBAAiB,CAAC,CAAC,CAAC;gBAC5D,CAAC,CAAC,CAAC;QACP,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export { default as ClaimResponse } from "./helper";
2
+ export { default as ClaimResponse_Entity } from "./claimResponse";
@@ -0,0 +1,3 @@
1
+ export { default as ClaimResponse } from "./helper";
2
+ export { default as ClaimResponse_Entity } from "./claimResponse";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/claimResponse/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,6 @@
1
+ export default class ClaimStatus_Entity {
2
+ static requiredFields: string[];
3
+ constructor(claimStatusJson: unknown);
4
+ id?: number;
5
+ name?: string;
6
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * ClaimStatus_Entity type guard.
3
+ *
4
+ * @param {any} claimStatusJson ClaimStatus object from API
5
+ * @returns {boolean} Return true if type is ClaimStatus_Entity
6
+ */
7
+ function validator(claimStatusJson) {
8
+ if (typeof claimStatusJson === "object" && claimStatusJson != null) {
9
+ ClaimStatus_Entity.requiredFields.forEach((element) => {
10
+ if (!Object.keys(claimStatusJson).includes(element))
11
+ throw new Error(`Field ${element} is null or undefined`);
12
+ });
13
+ }
14
+ return true;
15
+ }
16
+ export default class ClaimStatus_Entity {
17
+ static requiredFields = ["id"];
18
+ constructor(claimStatusJson) {
19
+ if (validator(claimStatusJson)) {
20
+ this.id = claimStatusJson.id;
21
+ this.name = claimStatusJson.name;
22
+ }
23
+ else
24
+ throw new Error(`Failed to create new instance of ${ClaimStatus_Entity.name}`);
25
+ }
26
+ id;
27
+ name;
28
+ }
29
+ //# sourceMappingURL=claimStatus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claimStatus.js","sourceRoot":"","sources":["../../../src/entities/claimStatus/claimStatus.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,MAAM,IAAI,KAAK,CAAC,SAAS,OAAO,uBAAuB,CAAC,CAAC;QAC7D,CAAC,CAAC,CAAC;KACJ;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,CAAC,OAAO,OAAO,kBAAkB;IACrC,MAAM,CAAC,cAAc,GAAG,CAAC,IAAI,CAAC,CAAC;IAE/B,YAAY,eAAwB;QAClC,IAAI,SAAS,CAAC,eAAe,CAAC,EAAE;YAC9B,IAAI,CAAC,EAAE,GAAG,eAAe,CAAC,EAAE,CAAC;YAC7B,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC;SAClC;;YACC,MAAM,IAAI,KAAK,CACb,oCAAoC,kBAAkB,CAAC,IAAI,EAAE,CAC9D,CAAC;IACN,CAAC;IAED,EAAE,CAAU;IACZ,IAAI,CAAU"}
@@ -0,0 +1,5 @@
1
+ import ClaimStatus_Entity from "./claimStatus";
2
+ export default class ClaimStatus extends ClaimStatus_Entity {
3
+ static fromList(claimStatussJSON: unknown): Array<ClaimStatus>;
4
+ toJson(): string;
5
+ }
@@ -0,0 +1,16 @@
1
+ import ClaimStatus_Entity from "./claimStatus";
2
+ export default class ClaimStatus extends ClaimStatus_Entity {
3
+ static fromList(claimStatussJSON) {
4
+ const claimStatuss = [];
5
+ if (claimStatussJSON)
6
+ Array.isArray(claimStatussJSON) &&
7
+ claimStatussJSON.forEach((claimStatusJSON) => {
8
+ claimStatuss.push(new ClaimStatus(claimStatusJSON));
9
+ });
10
+ return claimStatuss;
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/claimStatus/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 ClaimStatus } from "./helper";
2
+ export { default as ClaimStatus_Entity } from "./claimStatus";
@@ -0,0 +1,3 @@
1
+ export { default as ClaimStatus } from "./helper";
2
+ export { default as ClaimStatus_Entity } from "./claimStatus";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/claimStatus/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,eAAe,CAAC"}
@@ -54,3 +54,7 @@ export * from "./customerCredit";
54
54
  export * from "./dispatch";
55
55
  export * from "./cargoConsolidation";
56
56
  export * from "./ediTransaction";
57
+ export * from "./userNotification";
58
+ export * from "./claim";
59
+ export * from "./claimResponse";
60
+ export * from "./claimStatus";
@@ -54,4 +54,8 @@ export * from "./customerCredit";
54
54
  export * from "./dispatch";
55
55
  export * from "./cargoConsolidation";
56
56
  export * from "./ediTransaction";
57
+ export * from "./userNotification";
58
+ export * from "./claim";
59
+ export * from "./claimResponse";
60
+ export * from "./claimStatus";
57
61
  //# 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,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,UAAU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AAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC"}
@@ -0,0 +1,5 @@
1
+ import UserNotification_Entity from "./userNotification";
2
+ export default class UserNotification extends UserNotification_Entity {
3
+ static fromList(userNotificationsJSON: unknown): Array<UserNotification>;
4
+ toJson(): string;
5
+ }
@@ -0,0 +1,16 @@
1
+ import UserNotification_Entity from "./userNotification";
2
+ export default class UserNotification extends UserNotification_Entity {
3
+ static fromList(userNotificationsJSON) {
4
+ const userNotifications = [];
5
+ if (userNotificationsJSON)
6
+ Array.isArray(userNotificationsJSON) &&
7
+ userNotificationsJSON.forEach((userNotificationJSON) => {
8
+ userNotifications.push(new UserNotification(userNotificationJSON));
9
+ });
10
+ return userNotifications;
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/userNotification/helper.ts"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,MAAM,oBAAoB,CAAC;AACzD,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,uBAAuB;IACnE,MAAM,CAAC,QAAQ,CAAC,qBAA8B;QAC5C,MAAM,iBAAiB,GAAuB,EAAE,CAAC;QACjD,IAAI,qBAAqB;YACvB,KAAK,CAAC,OAAO,CAAC,qBAAqB,CAAC;gBAClC,qBAAqB,CAAC,OAAO,CAAC,CAAC,oBAAoB,EAAE,EAAE;oBACrD,iBAAiB,CAAC,IAAI,CAAC,IAAI,gBAAgB,CAAC,oBAAoB,CAAC,CAAC,CAAC;gBACrE,CAAC,CAAC,CAAC;QACP,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export { default as UserNotification } from "./helper";
2
+ export { default as UserNotification_Entity } from "./userNotification";
@@ -0,0 +1,3 @@
1
+ export { default as UserNotification } from "./helper";
2
+ export { default as UserNotification_Entity } from "./userNotification";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/userNotification/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,17 @@
1
+ export default class UserNotification_Entity {
2
+ static requiredFields: never[];
3
+ constructor(userNotificationJson: unknown);
4
+ id?: number;
5
+ notification_id?: number;
6
+ person_id?: number;
7
+ pushed?: boolean;
8
+ emailed?: boolean;
9
+ reported?: boolean;
10
+ created_at?: string;
11
+ read?: boolean;
12
+ email_sent?: string;
13
+ subscription_name?: string;
14
+ subject?: string;
15
+ message?: string;
16
+ full_name?: string;
17
+ }
@@ -0,0 +1,52 @@
1
+ /**
2
+ * UserNotification_Entity type guard.
3
+ *
4
+ * @param {any} userNotificationJson UserNotification object from API
5
+ * @returns {boolean} Return true if type is UserNotification_Entity
6
+ */
7
+ function validator(userNotificationJson) {
8
+ if (typeof userNotificationJson === "object" &&
9
+ userNotificationJson != null) {
10
+ UserNotification_Entity.requiredFields.forEach((element) => {
11
+ if (!Object.keys(userNotificationJson).includes(element))
12
+ throw new Error(`Field ${element} is null or undefined`);
13
+ });
14
+ }
15
+ return true;
16
+ }
17
+ export default class UserNotification_Entity {
18
+ static requiredFields = [];
19
+ constructor(userNotificationJson) {
20
+ if (validator(userNotificationJson)) {
21
+ this.id = userNotificationJson.id;
22
+ this.notification_id = userNotificationJson.notification_id;
23
+ this.person_id = userNotificationJson.person_id;
24
+ this.pushed = userNotificationJson.pushed;
25
+ this.emailed = userNotificationJson.emailed;
26
+ this.reported = userNotificationJson.reported;
27
+ this.created_at = userNotificationJson.created_at;
28
+ this.read = userNotificationJson.read;
29
+ this.email_sent = userNotificationJson.email_sent;
30
+ this.subscription_name = userNotificationJson.subscription_name;
31
+ this.subject = userNotificationJson.subject;
32
+ this.message = userNotificationJson.message;
33
+ this.full_name = userNotificationJson.full_name;
34
+ }
35
+ else
36
+ throw new Error(`Failed to create new instance of ${UserNotification_Entity.name}`);
37
+ }
38
+ id;
39
+ notification_id;
40
+ person_id;
41
+ pushed;
42
+ emailed;
43
+ reported;
44
+ created_at;
45
+ read;
46
+ email_sent;
47
+ subscription_name;
48
+ subject;
49
+ message;
50
+ full_name;
51
+ }
52
+ //# sourceMappingURL=userNotification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"userNotification.js","sourceRoot":"","sources":["../../../src/entities/userNotification/userNotification.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,SAAS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AAC,SAAS,GAAG,oBAAoB,CAAC,SAAS,CAAC;SACjD;;YACC,MAAM,IAAI,KAAK,CACb,oCAAoC,uBAAuB,CAAC,IAAI,EAAE,CACnE,CAAC;IACN,CAAC;IAED,EAAE,CAAU;IACZ,eAAe,CAAU;IACzB,SAAS,CAAU;IACnB,MAAM,CAAW;IACjB,OAAO,CAAW;IAClB,QAAQ,CAAW;IACnB,UAAU,CAAU;IACpB,IAAI,CAAW;IACf,UAAU,CAAU;IACpB,iBAAiB,CAAU;IAC3B,OAAO,CAAU;IACjB,OAAO,CAAU;IACjB,SAAS,CAAU"}
@@ -600,8 +600,8 @@ function LocationAccessoralsList({ locationID }) {
600
600
  event.defaultMuiPrevented = true;
601
601
  }
602
602
  };
603
- return (_jsx(DataGridPremium, { editMode: "row", density: "compact", rowModesModel: rowModesModel, processRowUpdate: processRowUpdate, onRowEditStop: handleRowEditStop, onRowModesModelChange: (v) => setRowModesModel(v), hideFooter: true, components: {
604
- Toolbar: CustomToolbar,
603
+ return (_jsx(DataGridPremium, { editMode: "row", density: "compact", rowModesModel: rowModesModel, processRowUpdate: processRowUpdate, onRowEditStop: handleRowEditStop, onRowModesModelChange: (v) => setRowModesModel(v), hideFooter: true, slots: {
604
+ toolbar: CustomToolbar,
605
605
  }, slotProps: {
606
606
  toolbar: { setRows, setRowModesModel, locationID },
607
607
  }, loading: isFetching, rows: rows || [], columns: [