@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.
- package/dist/entities/appointmentArrival/appointmentArrival.d.ts +36 -0
- package/dist/entities/appointmentArrival/appointmentArrival.js +90 -0
- package/dist/entities/appointmentArrival/appointmentArrival.js.map +1 -0
- package/dist/entities/appointmentArrival/helper.d.ts +5 -0
- package/dist/entities/appointmentArrival/helper.js +16 -0
- package/dist/entities/appointmentArrival/helper.js.map +1 -0
- package/dist/entities/appointmentArrival/index.d.ts +2 -0
- package/dist/entities/appointmentArrival/index.js +3 -0
- package/dist/entities/appointmentArrival/index.js.map +1 -0
- package/dist/entities/carrierTender/carrierTender.d.ts +69 -0
- package/dist/entities/carrierTender/carrierTender.js +160 -0
- package/dist/entities/carrierTender/carrierTender.js.map +1 -0
- package/dist/entities/carrierTender/helper.d.ts +5 -0
- package/dist/entities/carrierTender/helper.js +16 -0
- package/dist/entities/carrierTender/helper.js.map +1 -0
- package/dist/entities/carrierTender/index.d.ts +2 -0
- package/dist/entities/carrierTender/index.js +3 -0
- package/dist/entities/carrierTender/index.js.map +1 -0
- package/dist/entities/company/company.d.ts +17 -0
- package/dist/entities/company/company.js +51 -0
- package/dist/entities/company/company.js.map +1 -0
- package/dist/entities/company/helper.d.ts +5 -0
- package/dist/entities/company/helper.js +16 -0
- package/dist/entities/company/helper.js.map +1 -0
- package/dist/entities/company/index.d.ts +2 -0
- package/dist/entities/company/index.js +3 -0
- package/dist/entities/company/index.js.map +1 -0
- package/dist/entities/contact/contact.d.ts +19 -0
- package/dist/entities/contact/contact.js +55 -0
- package/dist/entities/contact/contact.js.map +1 -0
- package/dist/entities/contact/helper.d.ts +5 -0
- package/dist/entities/contact/helper.js +16 -0
- package/dist/entities/contact/helper.js.map +1 -0
- package/dist/entities/contact/index.d.ts +2 -0
- package/dist/entities/contact/index.js +3 -0
- package/dist/entities/contact/index.js.map +1 -0
- package/dist/entities/customerV1/customerV1.d.ts +138 -0
- package/dist/entities/customerV1/customerV1.js +278 -0
- package/dist/entities/customerV1/customerV1.js.map +1 -0
- package/dist/entities/customerV1/helper.d.ts +5 -0
- package/dist/entities/customerV1/helper.js +16 -0
- package/dist/entities/customerV1/helper.js.map +1 -0
- package/dist/entities/customerV1/index.d.ts +2 -0
- package/dist/entities/customerV1/index.js +3 -0
- package/dist/entities/customerV1/index.js.map +1 -0
- package/dist/entities/customersAccessorial/customersAccessorial.d.ts +20 -0
- package/dist/entities/customersAccessorial/customersAccessorial.js +58 -0
- package/dist/entities/customersAccessorial/customersAccessorial.js.map +1 -0
- package/dist/entities/customersAccessorial/helper.d.ts +5 -0
- package/dist/entities/customersAccessorial/helper.js +16 -0
- package/dist/entities/customersAccessorial/helper.js.map +1 -0
- package/dist/entities/customersAccessorial/index.d.ts +2 -0
- package/dist/entities/customersAccessorial/index.js +3 -0
- package/dist/entities/customersAccessorial/index.js.map +1 -0
- package/dist/entities/flag/flag.d.ts +9 -0
- package/dist/entities/flag/flag.js +35 -0
- package/dist/entities/flag/flag.js.map +1 -0
- package/dist/entities/flag/helper.d.ts +5 -0
- package/dist/entities/flag/helper.js +16 -0
- package/dist/entities/flag/helper.js.map +1 -0
- package/dist/entities/flag/index.d.ts +2 -0
- package/dist/entities/flag/index.js +3 -0
- package/dist/entities/flag/index.js.map +1 -0
- package/dist/entities/hosLog/helper.d.ts +5 -0
- package/dist/entities/hosLog/helper.js +16 -0
- package/dist/entities/hosLog/helper.js.map +1 -0
- package/dist/entities/hosLog/hosLog.d.ts +38 -0
- package/dist/entities/hosLog/hosLog.js +93 -0
- package/dist/entities/hosLog/hosLog.js.map +1 -0
- package/dist/entities/hosLog/index.d.ts +2 -0
- package/dist/entities/hosLog/index.js +3 -0
- package/dist/entities/hosLog/index.js.map +1 -0
- package/dist/entities/index.d.ts +17 -0
- package/dist/entities/index.js +17 -0
- package/dist/entities/index.js.map +1 -1
- package/dist/entities/loadChange/helper.d.ts +5 -0
- package/dist/entities/loadChange/helper.js +16 -0
- package/dist/entities/loadChange/helper.js.map +1 -0
- package/dist/entities/loadChange/index.d.ts +2 -0
- package/dist/entities/loadChange/index.js +3 -0
- package/dist/entities/loadChange/index.js.map +1 -0
- package/dist/entities/loadChange/loadChange.d.ts +11 -0
- package/dist/entities/loadChange/loadChange.js +39 -0
- package/dist/entities/loadChange/loadChange.js.map +1 -0
- package/dist/entities/location/location.js +2 -2
- package/dist/entities/location/location.js.map +1 -1
- package/dist/entities/notification/helper.d.ts +5 -0
- package/dist/entities/notification/helper.js +16 -0
- package/dist/entities/notification/helper.js.map +1 -0
- package/dist/entities/notification/index.d.ts +2 -0
- package/dist/entities/notification/index.js +3 -0
- package/dist/entities/notification/index.js.map +1 -0
- package/dist/entities/notification/notification.d.ts +14 -0
- package/dist/entities/notification/notification.js +45 -0
- package/dist/entities/notification/notification.js.map +1 -0
- package/dist/entities/notificationSubscription/helper.d.ts +5 -0
- package/dist/entities/notificationSubscription/helper.js +16 -0
- package/dist/entities/notificationSubscription/helper.js.map +1 -0
- package/dist/entities/notificationSubscription/index.d.ts +2 -0
- package/dist/entities/notificationSubscription/index.js +3 -0
- package/dist/entities/notificationSubscription/index.js.map +1 -0
- package/dist/entities/notificationSubscription/notificationSubscription.d.ts +14 -0
- package/dist/entities/notificationSubscription/notificationSubscription.js +46 -0
- package/dist/entities/notificationSubscription/notificationSubscription.js.map +1 -0
- package/dist/entities/notificationUserSubscription/helper.d.ts +5 -0
- package/dist/entities/notificationUserSubscription/helper.js +16 -0
- package/dist/entities/notificationUserSubscription/helper.js.map +1 -0
- package/dist/entities/notificationUserSubscription/index.d.ts +2 -0
- package/dist/entities/notificationUserSubscription/index.js +3 -0
- package/dist/entities/notificationUserSubscription/index.js.map +1 -0
- package/dist/entities/notificationUserSubscription/notificationUserSubscription.d.ts +15 -0
- package/dist/entities/notificationUserSubscription/notificationUserSubscription.js +47 -0
- package/dist/entities/notificationUserSubscription/notificationUserSubscription.js.map +1 -0
- package/dist/entities/person/helper.d.ts +5 -0
- package/dist/entities/person/helper.js +16 -0
- package/dist/entities/person/helper.js.map +1 -0
- package/dist/entities/person/index.d.ts +2 -0
- package/dist/entities/person/index.js +3 -0
- package/dist/entities/person/index.js.map +1 -0
- package/dist/entities/person/person.d.ts +46 -0
- package/dist/entities/person/person.js +108 -0
- package/dist/entities/person/person.js.map +1 -0
- package/dist/entities/quoteRateRecord/helper.d.ts +5 -0
- package/dist/entities/quoteRateRecord/helper.js +16 -0
- package/dist/entities/quoteRateRecord/helper.js.map +1 -0
- package/dist/entities/quoteRateRecord/index.d.ts +2 -0
- package/dist/entities/quoteRateRecord/index.js +3 -0
- package/dist/entities/quoteRateRecord/index.js.map +1 -0
- package/dist/entities/quoteRateRecord/quoteRateRecord.d.ts +50 -0
- package/dist/entities/quoteRateRecord/quoteRateRecord.js +121 -0
- package/dist/entities/quoteRateRecord/quoteRateRecord.js.map +1 -0
- package/dist/entities/rateReview/helper.d.ts +5 -0
- package/dist/entities/rateReview/helper.js +16 -0
- package/dist/entities/rateReview/helper.js.map +1 -0
- package/dist/entities/rateReview/index.d.ts +2 -0
- package/dist/entities/rateReview/index.js +3 -0
- package/dist/entities/rateReview/index.js.map +1 -0
- package/dist/entities/rateReview/rateReview.d.ts +49 -0
- package/dist/entities/rateReview/rateReview.js +116 -0
- package/dist/entities/rateReview/rateReview.js.map +1 -0
- package/dist/entities/unitV1/helper.d.ts +5 -0
- package/dist/entities/unitV1/helper.js +16 -0
- package/dist/entities/unitV1/helper.js.map +1 -0
- package/dist/entities/unitV1/index.d.ts +2 -0
- package/dist/entities/unitV1/index.js +3 -0
- package/dist/entities/unitV1/index.js.map +1 -0
- package/dist/entities/unitV1/unit.d.ts +11 -0
- package/dist/entities/unitV1/unit.js +39 -0
- package/dist/entities/unitV1/unit.js.map +1 -0
- package/dist/entities/workflowEvent/helper.d.ts +5 -0
- package/dist/entities/workflowEvent/helper.js +16 -0
- package/dist/entities/workflowEvent/helper.js.map +1 -0
- package/dist/entities/workflowEvent/index.d.ts +2 -0
- package/dist/entities/workflowEvent/index.js +3 -0
- package/dist/entities/workflowEvent/index.js.map +1 -0
- package/dist/entities/workflowEvent/workflowEvent.d.ts +34 -0
- package/dist/entities/workflowEvent/workflowEvent.js +87 -0
- package/dist/entities/workflowEvent/workflowEvent.js.map +1 -0
- package/dist/hooks/customer/customerAutocomplete.d.ts +7 -7
- package/dist/hooks/customer/customerAutocomplete.js +12 -13
- package/dist/hooks/customer/customerAutocomplete.js.map +1 -1
- package/dist/hooks/locationsForm/locationsForm.js +11 -6
- package/dist/hooks/locationsForm/locationsForm.js.map +1 -1
- package/dist/hooks/locationsForm/locationsFormSales.js +17 -13
- package/dist/hooks/locationsForm/locationsFormSales.js.map +1 -1
- package/dist/hooks/quote/form.js +21 -8
- package/dist/hooks/quote/form.js.map +1 -1
- package/dist/hooks/quote/helpers.d.ts +21 -10
- package/dist/hooks/quote/helpers.js +29 -10
- package/dist/hooks/quote/helpers.js.map +1 -1
- package/dist/hooks/quote/result.js +1 -0
- package/dist/hooks/quote/result.js.map +1 -1
- package/dist/hooks/tender/form.js +11 -16
- package/dist/hooks/tender/form.js.map +1 -1
- package/dist/hooks/tender/helpers.d.ts +4 -4
- package/dist/hooks/tender/helpers.js +1 -1
- package/dist/hooks/tender/helpers.js.map +1 -1
- package/dist/redux/api/salesApi.d.ts +1 -1
- package/dist/redux/api/salesApi.js +9 -0
- package/dist/redux/api/salesApi.js.map +1 -1
- package/dist/redux/appointmentIssue/appointmentIssueEndpoints.d.ts +10 -10
- package/dist/redux/appointmentIssueCategory/appointmentIssueCategoryEndpoints.d.ts +11 -11
- package/dist/redux/appointmentIssueSubcategory/appointmentIssueSubcategoryEndpoints.d.ts +10 -10
- package/dist/redux/appointmentNote/appointmentNoteEndpoints.d.ts +10 -10
- package/dist/redux/appointmentNoteType/appointmentNoteTypeEndpoints.d.ts +10 -10
- package/dist/redux/archerFile/archerFileEndpoints.d.ts +20 -8
- package/dist/redux/archerFile/archerFileEndpoints.js +18 -3
- package/dist/redux/archerFile/archerFileEndpoints.js.map +1 -1
- package/dist/redux/carrierName/carrierNameEndpoints.d.ts +10 -10
- package/dist/redux/commodityV1/commodityV1Endpoints.d.ts +11 -11
- package/dist/redux/contact/contactEndpoints.d.ts +26 -0
- package/dist/redux/contact/contactEndpoints.js +54 -0
- package/dist/redux/contact/contactEndpoints.js.map +1 -0
- package/dist/redux/contact/index.d.ts +2 -0
- package/dist/redux/contact/index.js +3 -0
- package/dist/redux/contact/index.js.map +1 -0
- package/dist/redux/customer/customerEndpoints.d.ts +27 -19
- package/dist/redux/customer/customerEndpoints.js +7 -7
- package/dist/redux/customer/customerEndpoints.js.map +1 -1
- package/dist/redux/customersAccessorial/customersAccessorialEndpoints.d.ts +24 -0
- package/dist/redux/customersAccessorial/customersAccessorialEndpoints.js +56 -0
- package/dist/redux/customersAccessorial/customersAccessorialEndpoints.js.map +1 -0
- package/dist/redux/customersAccessorial/index.d.ts +2 -0
- package/dist/redux/customersAccessorial/index.js +3 -0
- package/dist/redux/customersAccessorial/index.js.map +1 -0
- package/dist/redux/driverName/driverNameEndpoints.d.ts +9 -9
- package/dist/redux/flag/flagEndpoints.d.ts +24 -0
- package/dist/redux/flag/flagEndpoints.js +64 -0
- package/dist/redux/flag/flagEndpoints.js.map +1 -0
- package/dist/redux/flag/index.d.ts +2 -0
- package/dist/redux/flag/index.js +3 -0
- package/dist/redux/flag/index.js.map +1 -0
- package/dist/redux/holiday/holidayEndpoints.d.ts +10 -10
- package/dist/redux/index.d.ts +8 -0
- package/dist/redux/index.js +8 -0
- package/dist/redux/index.js.map +1 -1
- package/dist/redux/load/loadEndpoints.d.ts +10 -10
- package/dist/redux/loadAdjustment/loadAdjustmentEndpoints.d.ts +10 -10
- package/dist/redux/loadAdjustmentV1/loadAdjustmentV1Endpoints.d.ts +10 -10
- package/dist/redux/loadV1/loadV1Endpoints.d.ts +79 -18
- package/dist/redux/loadV1/loadV1Endpoints.js +64 -1
- package/dist/redux/loadV1/loadV1Endpoints.js.map +1 -1
- package/dist/redux/location/locationEndpoints.d.ts +14 -14
- package/dist/redux/locationV1/locationV1Endpoints.d.ts +19 -19
- package/dist/redux/nmfcClass/nmfcClassEndpoints.d.ts +9 -9
- package/dist/redux/nodeName/nodeNameEndpoints.d.ts +10 -10
- package/dist/redux/notification/index.d.ts +2 -0
- package/dist/redux/notification/index.js +3 -0
- package/dist/redux/notification/index.js.map +1 -0
- package/dist/redux/notification/notificationEndpoints.d.ts +36 -0
- package/dist/redux/notification/notificationEndpoints.js +81 -0
- package/dist/redux/notification/notificationEndpoints.js.map +1 -0
- package/dist/redux/person/index.d.ts +2 -0
- package/dist/redux/person/index.js +3 -0
- package/dist/redux/person/index.js.map +1 -0
- package/dist/redux/person/personEndpoints.d.ts +34 -0
- package/dist/redux/person/personEndpoints.js +67 -0
- package/dist/redux/person/personEndpoints.js.map +1 -0
- package/dist/redux/personName/personNameEndpoints.d.ts +10 -10
- package/dist/redux/quote/quoteEndpoints.d.ts +19 -19
- package/dist/redux/quote/quoteHooks.d.ts +2 -2
- package/dist/redux/quoteAccessorial/quoteAccessorialEndpoints.d.ts +9 -9
- package/dist/redux/quoteAccessorialV1/quoteAccessorialV1Endpoints.d.ts +10 -10
- package/dist/redux/rateReview/index.d.ts +2 -0
- package/dist/redux/rateReview/index.js +3 -0
- package/dist/redux/rateReview/index.js.map +1 -0
- package/dist/redux/rateReview/rateReviewEndpoints.d.ts +32 -0
- package/dist/redux/rateReview/rateReviewEndpoints.js +65 -0
- package/dist/redux/rateReview/rateReviewEndpoints.js.map +1 -0
- package/dist/redux/shipcon/shipconEndpoints.d.ts +10 -10
- package/dist/redux/shipconV1/shipconV1Endpoints.d.ts +14 -14
- package/dist/redux/tender/tenderEndpoints.d.ts +9 -9
- package/dist/redux/trailerAvailability/customerEndpoints.d.ts +4 -4
- package/dist/redux/types.d.ts +2 -2
- package/dist/redux/unitV1/index.d.ts +2 -0
- package/dist/redux/unitV1/index.js +3 -0
- package/dist/redux/unitV1/index.js.map +1 -0
- package/dist/redux/unitV1/unitV1Endpoints.d.ts +24 -0
- package/dist/redux/unitV1/unitV1Endpoints.js +64 -0
- package/dist/redux/unitV1/unitV1Endpoints.js.map +1 -0
- package/dist/redux/userNoteV1/userNoteV1Endpoints.d.ts +10 -10
- package/package.json +2 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flag_Entity type guard.
|
|
3
|
+
*
|
|
4
|
+
* @param {any} flagJson Flag object from API
|
|
5
|
+
* @returns {boolean} Return true if type is Flag_Entity
|
|
6
|
+
*/
|
|
7
|
+
function validator(flagJson) {
|
|
8
|
+
if (typeof flagJson === "object" && flagJson != null) {
|
|
9
|
+
Flag_Entity.requiredFields.forEach((element) => {
|
|
10
|
+
if (!Object.keys(flagJson).includes(element))
|
|
11
|
+
throw new Error(`Field ${element} is null or undefined`);
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
export default class Flag_Entity {
|
|
17
|
+
static requiredFields = ["id"];
|
|
18
|
+
constructor(flagJson) {
|
|
19
|
+
if (validator(flagJson)) {
|
|
20
|
+
this.id = flagJson.id;
|
|
21
|
+
this.flag_area_ids = flagJson.flag_area_ids;
|
|
22
|
+
this.is_area_flag = flagJson.is_area_flag;
|
|
23
|
+
this.name = flagJson.name;
|
|
24
|
+
this.network = flagJson.network;
|
|
25
|
+
}
|
|
26
|
+
else
|
|
27
|
+
throw new Error(`Failed to create new instance of ${Flag_Entity.name}`);
|
|
28
|
+
}
|
|
29
|
+
flag_area_ids;
|
|
30
|
+
id;
|
|
31
|
+
is_area_flag;
|
|
32
|
+
name;
|
|
33
|
+
network;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=flag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flag.js","sourceRoot":"","sources":["../../../src/entities/flag/flag.ts"],"names":[],"mappings":"A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.forEach((flagJSON) => {
|
|
8
|
+
flags.push(new Flag(flagJSON));
|
|
9
|
+
});
|
|
10
|
+
return flags;
|
|
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/flag/helper.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,QAAQ,CAAC;AACjC,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,WAAW;IAC3C,MAAM,CAAC,QAAQ,CAAC,SAAkB;QAChC,MAAM,KAAK,GAAW,EAAE,CAAC;QACzB,IAAI,SAAS;YACX,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;gBACtB,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;oBAC7B,KAAK,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACjC,CAAC,CAAC,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/flag/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import HosLog_Entity from "./hosLog";
|
|
2
|
+
export default class HosLog extends HosLog_Entity {
|
|
3
|
+
static fromList(hosLogsJSON) {
|
|
4
|
+
const hosLogs = [];
|
|
5
|
+
if (hosLogsJSON)
|
|
6
|
+
Array.isArray(hosLogsJSON) &&
|
|
7
|
+
hosLogsJSON.forEach((hosLogJSON) => {
|
|
8
|
+
hosLogs.push(new HosLog(hosLogJSON));
|
|
9
|
+
});
|
|
10
|
+
return hosLogs;
|
|
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/hosLog/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,38 @@
|
|
|
1
|
+
export default class HosLog_Entity {
|
|
2
|
+
static requiredFields: string[];
|
|
3
|
+
constructor(hosLogJson?: unknown);
|
|
4
|
+
id?: number;
|
|
5
|
+
index?: number;
|
|
6
|
+
lmcs_driver_key?: number;
|
|
7
|
+
start_date?: string;
|
|
8
|
+
node_id?: number;
|
|
9
|
+
driver_id?: number;
|
|
10
|
+
co_driver_id?: number;
|
|
11
|
+
drive_time?: number;
|
|
12
|
+
off_duty?: number;
|
|
13
|
+
on_duty?: number;
|
|
14
|
+
total_miles?: number;
|
|
15
|
+
utc_offset?: number;
|
|
16
|
+
certified?: boolean;
|
|
17
|
+
load_number?: number;
|
|
18
|
+
dot_number?: string;
|
|
19
|
+
has16hr_rule_applied?: boolean;
|
|
20
|
+
bill_of_lading_id?: number;
|
|
21
|
+
revision_id?: number;
|
|
22
|
+
extra_ptpt_approved?: boolean;
|
|
23
|
+
explanation?: string;
|
|
24
|
+
notes?: string;
|
|
25
|
+
created_at?: string;
|
|
26
|
+
updated_at?: string;
|
|
27
|
+
has_report_time?: boolean;
|
|
28
|
+
composed_on?: string;
|
|
29
|
+
cache_pre?: number;
|
|
30
|
+
cache_post?: number;
|
|
31
|
+
ptpt_total?: number;
|
|
32
|
+
asset_id?: number;
|
|
33
|
+
hours_drive_time?: number;
|
|
34
|
+
ship_con_name?: string;
|
|
35
|
+
hours_on_duty_time?: number;
|
|
36
|
+
hours_off_duty_time?: number;
|
|
37
|
+
archer_file_ids?: number[];
|
|
38
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HosLog_Entity type guard.
|
|
3
|
+
*
|
|
4
|
+
* @param {any} hosLogJson HosLog object from API
|
|
5
|
+
* @returns {boolean} Return true if type is HosLog_Entity
|
|
6
|
+
*/
|
|
7
|
+
function validator(hosLogJson) {
|
|
8
|
+
if (typeof hosLogJson === "object" && hosLogJson != null) {
|
|
9
|
+
HosLog_Entity.requiredFields.forEach((element) => {
|
|
10
|
+
if (!Object.keys(hosLogJson).includes(element))
|
|
11
|
+
throw new Error(`Field ${element} is null or undefined`);
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
export default class HosLog_Entity {
|
|
17
|
+
static requiredFields = ["id"];
|
|
18
|
+
constructor(hosLogJson) {
|
|
19
|
+
if (validator(hosLogJson)) {
|
|
20
|
+
this.id = hosLogJson.id;
|
|
21
|
+
this.index = hosLogJson.index;
|
|
22
|
+
this.lmcs_driver_key = hosLogJson.lmcs_driver_key;
|
|
23
|
+
this.start_date = hosLogJson.start_date;
|
|
24
|
+
this.node_id = hosLogJson.node_id;
|
|
25
|
+
this.driver_id = hosLogJson.driver_id;
|
|
26
|
+
this.co_driver_id = hosLogJson.co_driver_id;
|
|
27
|
+
this.drive_time = hosLogJson.drive_time;
|
|
28
|
+
this.off_duty = hosLogJson.off_duty;
|
|
29
|
+
this.on_duty = hosLogJson.on_duty;
|
|
30
|
+
this.total_miles = hosLogJson.total_miles;
|
|
31
|
+
this.utc_offset = hosLogJson.utc_offset;
|
|
32
|
+
this.certified = hosLogJson.certified;
|
|
33
|
+
this.load_number = hosLogJson.load_number;
|
|
34
|
+
this.dot_number = hosLogJson.dot_number;
|
|
35
|
+
this.has16hr_rule_applied = hosLogJson.has16hr_rule_applied;
|
|
36
|
+
this.bill_of_lading_id = hosLogJson.bill_of_lading_id;
|
|
37
|
+
this.revision_id = hosLogJson.revision_id;
|
|
38
|
+
this.extra_ptpt_approved = hosLogJson.extra_ptpt_approved;
|
|
39
|
+
this.explanation = hosLogJson.explanation;
|
|
40
|
+
this.notes = hosLogJson.notes;
|
|
41
|
+
this.created_at = hosLogJson.created_at;
|
|
42
|
+
this.updated_at = hosLogJson.updated_at;
|
|
43
|
+
this.has_report_time = hosLogJson.has_report_time;
|
|
44
|
+
this.composed_on = hosLogJson.composed_on;
|
|
45
|
+
this.cache_pre = hosLogJson.cache_pre;
|
|
46
|
+
this.cache_post = hosLogJson.cache_post;
|
|
47
|
+
this.ptpt_total = hosLogJson.ptpt_total;
|
|
48
|
+
this.asset_id = hosLogJson.asset_id;
|
|
49
|
+
this.hours_drive_time = hosLogJson.hours_drive_time;
|
|
50
|
+
this.ship_con_name = hosLogJson.ship_con_name;
|
|
51
|
+
this.hours_on_duty_time = hosLogJson.hours_on_duty_time;
|
|
52
|
+
this.hours_off_duty_time = hosLogJson.hours_off_duty_time;
|
|
53
|
+
this.archer_file_ids = hosLogJson.archer_file_ids;
|
|
54
|
+
}
|
|
55
|
+
else
|
|
56
|
+
throw new Error(`Failed to create new instance of ${HosLog_Entity.name}`);
|
|
57
|
+
}
|
|
58
|
+
id;
|
|
59
|
+
index;
|
|
60
|
+
lmcs_driver_key;
|
|
61
|
+
start_date;
|
|
62
|
+
node_id;
|
|
63
|
+
driver_id;
|
|
64
|
+
co_driver_id;
|
|
65
|
+
drive_time;
|
|
66
|
+
off_duty;
|
|
67
|
+
on_duty;
|
|
68
|
+
total_miles;
|
|
69
|
+
utc_offset;
|
|
70
|
+
certified;
|
|
71
|
+
load_number;
|
|
72
|
+
dot_number;
|
|
73
|
+
has16hr_rule_applied;
|
|
74
|
+
bill_of_lading_id;
|
|
75
|
+
revision_id;
|
|
76
|
+
extra_ptpt_approved;
|
|
77
|
+
explanation;
|
|
78
|
+
notes;
|
|
79
|
+
created_at;
|
|
80
|
+
updated_at;
|
|
81
|
+
has_report_time;
|
|
82
|
+
composed_on;
|
|
83
|
+
cache_pre;
|
|
84
|
+
cache_post;
|
|
85
|
+
ptpt_total;
|
|
86
|
+
asset_id;
|
|
87
|
+
hours_drive_time;
|
|
88
|
+
ship_con_name;
|
|
89
|
+
hours_on_duty_time;
|
|
90
|
+
hours_off_duty_time;
|
|
91
|
+
archer_file_ids;
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=hosLog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hosLog.js","sourceRoot":"","sources":["../../../src/entities/hosLog/hosLog.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,SAAS,SAAS,CAAC,UAAmB;IACpC,IAAI,OAAO,UAAU,KAAK,QAAQ,IAAI,UAAU,IAAI,IAAI,EAAE;QACxD,aAAa,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC/C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;gBAC5C,MAAM,IAAI,KAAK,CAAC,SAAS,OAAO,uBAAuB,CAA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B,UAAU,CAAU;IACpB,oBAAoB,CAAW;IAC/B,iBAAiB,CAAU;IAC3B,WAAW,CAAU;IACrB,mBAAmB,CAAW;IAC9B,WAAW,CAAU;IACrB,KAAK,CAAU;IACf,UAAU,CAAU;IACpB,UAAU,CAAU;IACpB,eAAe,CAAW;IAC1B,WAAW,CAAU;IACrB,SAAS,CAAU;IACnB,UAAU,CAAU;IACpB,UAAU,CAAU;IACpB,QAAQ,CAAU;IAClB,gBAAgB,CAAU;IAC1B,aAAa,CAAU;IACvB,kBAAkB,CAAU;IAC5B,mBAAmB,CAAU;IAC7B,eAAe,CAAY"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/hosLog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/entities/index.d.ts
CHANGED
|
@@ -32,3 +32,20 @@ export * from "./commodityV1";
|
|
|
32
32
|
export * from "./quoteAccessorialV1";
|
|
33
33
|
export * from "./loadAdjustmentV1";
|
|
34
34
|
export * from "./userNoteV1";
|
|
35
|
+
export * from "./customerV1";
|
|
36
|
+
export * from "./customersAccessorial";
|
|
37
|
+
export * from "./unitV1";
|
|
38
|
+
export * from "./notification";
|
|
39
|
+
export * from "./notificationSubscription";
|
|
40
|
+
export * from "./notificationUserSubscription";
|
|
41
|
+
export * from "./person";
|
|
42
|
+
export * from "./company";
|
|
43
|
+
export * from "./contact";
|
|
44
|
+
export * from "./flag";
|
|
45
|
+
export * from "./rateReview";
|
|
46
|
+
export * from "./carrierTender";
|
|
47
|
+
export * from "./hosLog";
|
|
48
|
+
export * from "./workflowEvent";
|
|
49
|
+
export * from "./appointmentArrival";
|
|
50
|
+
export * from "./quoteRateRecord";
|
|
51
|
+
export * from "./loadChange";
|
package/dist/entities/index.js
CHANGED
|
@@ -32,4 +32,21 @@ export * from "./commodityV1";
|
|
|
32
32
|
export * from "./quoteAccessorialV1";
|
|
33
33
|
export * from "./loadAdjustmentV1";
|
|
34
34
|
export * from "./userNoteV1";
|
|
35
|
+
export * from "./customerV1";
|
|
36
|
+
export * from "./customersAccessorial";
|
|
37
|
+
export * from "./unitV1";
|
|
38
|
+
export * from "./notification";
|
|
39
|
+
export * from "./notificationSubscription";
|
|
40
|
+
export * from "./notificationUserSubscription";
|
|
41
|
+
export * from "./person";
|
|
42
|
+
export * from "./company";
|
|
43
|
+
export * from "./contact";
|
|
44
|
+
export * from "./flag";
|
|
45
|
+
export * from "./rateReview";
|
|
46
|
+
export * from "./carrierTender";
|
|
47
|
+
export * from "./hosLog";
|
|
48
|
+
export * from "./workflowEvent";
|
|
49
|
+
export * from "./appointmentArrival";
|
|
50
|
+
export * from "./quoteRateRecord";
|
|
51
|
+
export * from "./loadChange";
|
|
35
52
|
//# 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,a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c,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"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import LoadChange_Entity from "./loadChange";
|
|
2
|
+
export default class LoadChange extends LoadChange_Entity {
|
|
3
|
+
static fromList(loadChangesJSON) {
|
|
4
|
+
const loadChanges = [];
|
|
5
|
+
if (loadChangesJSON)
|
|
6
|
+
Array.isArray(loadChangesJSON) &&
|
|
7
|
+
loadChangesJSON.forEach((loadChangeJSON) => {
|
|
8
|
+
loadChanges.push(new LoadChange(loadChangeJSON));
|
|
9
|
+
});
|
|
10
|
+
return loadChanges;
|
|
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/loadChange/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 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/loadChange/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export default class LoadChange_Entity {
|
|
2
|
+
static requiredFields: string[];
|
|
3
|
+
constructor(loadChangeJson: unknown);
|
|
4
|
+
id?: number;
|
|
5
|
+
load_id?: number;
|
|
6
|
+
change_date?: string;
|
|
7
|
+
person_name?: string;
|
|
8
|
+
object_type?: string;
|
|
9
|
+
object_identifier?: string;
|
|
10
|
+
changes?: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LoadChange_Entity type guard.
|
|
3
|
+
*
|
|
4
|
+
* @param {any} loadChangeJson LoadChange object from API
|
|
5
|
+
* @returns {boolean} Return true if type is LoadChange_Entity
|
|
6
|
+
*/
|
|
7
|
+
function validator(loadChangeJson) {
|
|
8
|
+
if (typeof loadChangeJson === "object" && loadChangeJson != null) {
|
|
9
|
+
LoadChange_Entity.requiredFields.forEach((element) => {
|
|
10
|
+
if (!Object.keys(loadChangeJson).includes(element))
|
|
11
|
+
throw new Error(`Field ${element} is null or undefined`);
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
export default class LoadChange_Entity {
|
|
17
|
+
static requiredFields = ["id"];
|
|
18
|
+
constructor(loadChangeJson) {
|
|
19
|
+
if (validator(loadChangeJson)) {
|
|
20
|
+
this.id = loadChangeJson.id;
|
|
21
|
+
this.load_id = loadChangeJson.load_id;
|
|
22
|
+
this.change_date = loadChangeJson.change_date;
|
|
23
|
+
this.person_name = loadChangeJson.person_name;
|
|
24
|
+
this.object_type = loadChangeJson.object_type;
|
|
25
|
+
this.object_identifier = loadChangeJson.object_identifier;
|
|
26
|
+
this.changes = loadChangeJson.changes;
|
|
27
|
+
}
|
|
28
|
+
else
|
|
29
|
+
throw new Error(`Failed to create new instance of ${LoadChange_Entity.name}`);
|
|
30
|
+
}
|
|
31
|
+
id;
|
|
32
|
+
load_id;
|
|
33
|
+
change_date;
|
|
34
|
+
person_name;
|
|
35
|
+
object_type;
|
|
36
|
+
object_identifier;
|
|
37
|
+
changes;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=loadChange.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadChange.js","sourceRoot":"","sources":["../../../src/entities/loadChange/loadChange.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,SAAS,SAAS,CAChB,cAAuB;IAEvB,IAAI,OAAO,cAAc,KAAK,QAAQ,IAAI,cAAc,IAAI,IAAI,EAAE;QAChE,iBAAiB,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YACnD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;gBAChD,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,iBAAiB;IACpC,MAAM,CAAC,cAAc,GAAG,CAAC,IAAI,CAAC,CAAC;IAE/B,YAAY,cAAuB;QACjC,IAAI,SAAS,CAAC,cAAc,CAAC,EAAE;YAC7B,IAAI,CAAC,EAAE,GAAG,cAAc,CAAC,EAAE,CAAC;YAC5B,IAAI,CAAC,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC;YACtC,IAAI,CAAC,WAAW,GAAG,cAAc,CAAC,WAAW,CAAC;YAC9C,IAAI,CAAC,WAAW,GAAG,cAAc,CAAC,WAAW,CAAC;YAC9C,IAAI,CAAC,WAAW,GAAG,cAAc,CAAC,WAAW,CAAC;YAC9C,IAAI,CAAC,iBAAiB,GAAG,cAAc,CAAC,iBAAiB,CAAC;YAC1D,IAAI,CAAC,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC;SACvC;;YACC,MAAM,IAAI,KAAK,CACb,oCAAoC,iBAAiB,CAAC,IAAI,EAAE,CAC7D,CAAC;IACN,CAAC;IAED,EAAE,CAAU;IACZ,OAAO,CAAU;IACjB,WAAW,CAAU;IACrB,WAAW,CAAU;IACrB,WAAW,CAAU;IACrB,iBAAiB,CAAU;IAC3B,OAAO,CAAU"}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export function locationEntityTypeGuard(locationJson) {
|
|
7
7
|
if (typeof locationJson == "object" && locationJson !== null)
|
|
8
|
-
return locationJson.name &&
|
|
9
|
-
locationJson.address
|
|
8
|
+
return locationJson.name !== undefined &&
|
|
9
|
+
locationJson.address !== undefined
|
|
10
10
|
? true
|
|
11
11
|
: false;
|
|
12
12
|
else
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"location.js","sourceRoot":"","sources":["../../../src/entities/location/location.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CACrC,YAAqB;IAErB,IAAI,OAAO,YAAY,IAAI,QAAQ,IAAI,YAAY,KAAK,IAAI;QAC1D,OAAQ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AK,GAAG,YAAY,CAAC,KAAK,CAAC;YAChC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC,YAAY,CAAC;YAC9C,IAAI,CAAC,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC;SACrC;aAAM;YACL,MAAM,IAAI,KAAK,CACb,oCAAoC,eAAe,CAAC,IAAI,EAAE,CAC3D,CAAC;SACH;IACH,CAAC;IAED,EAAE,CAAS;IACX,IAAI,CAAS;IACb,OAAO,CAAS;IAChB,KAAK,CAAS;IACd,eAAe,CAAW;IAC1B,YAAY,CAQV;IACF,OAAO,CAcL"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Notification_Entity from "./notification";
|
|
2
|
+
export default class Notification extends Notification_Entity {
|
|
3
|
+
static fromList(notificationsJSON) {
|
|
4
|
+
const notifications = [];
|
|
5
|
+
if (notificationsJSON)
|
|
6
|
+
Array.isArray(notificationsJSON) &&
|
|
7
|
+
notificationsJSON.forEach((notificationJSON) => {
|
|
8
|
+
notifications.push(new Notification(notificationJSON));
|
|
9
|
+
});
|
|
10
|
+
return notifications;
|
|
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/notification/helper.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,MAAM,gBAAgB,CAAC;AACjD,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,mBAAmB;IAC3D,MAAM,CAAC,QAAQ,CAAC,iBAA0B;QACxC,MAAM,aAAa,GAAmB,EAAE,CAAC;QACzC,IAAI,iBAAiB;YACnB,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC;gBAC9B,iBAAiB,CAAC,OAAO,CAAC,CAAC,gBAAgB,EAAE,EAAE;oBAC7C,aAAa,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,gBAAgB,CAAC,CAAC,CAAC;gBACzD,CAAC,CAAC,CAAC;QACP,OAAO,aAAa,CAAC;IACvB,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/notification/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export default class Notification_Entity {
|
|
2
|
+
static requiredFields: string[];
|
|
3
|
+
constructor(notificationJson?: unknown);
|
|
4
|
+
id: number;
|
|
5
|
+
subscription_id?: number;
|
|
6
|
+
load_id?: number;
|
|
7
|
+
email_subject?: string;
|
|
8
|
+
email_message?: string;
|
|
9
|
+
push_data?: string;
|
|
10
|
+
notifiable_type?: string;
|
|
11
|
+
notifiable_id?: number;
|
|
12
|
+
cc_email?: string;
|
|
13
|
+
created_at?: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notification_Entity type guard.
|
|
3
|
+
*
|
|
4
|
+
* @param {any} notificationJson Notification object from API
|
|
5
|
+
* @returns {boolean} Return true if type is Notification_Entity
|
|
6
|
+
*/
|
|
7
|
+
function validator(notificationJson) {
|
|
8
|
+
if (typeof notificationJson === "object" && notificationJson != null) {
|
|
9
|
+
Notification_Entity.requiredFields.forEach((element) => {
|
|
10
|
+
if (!Object.keys(notificationJson).includes(element))
|
|
11
|
+
throw new Error(`Field ${element} is null or undefined`);
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
export default class Notification_Entity {
|
|
17
|
+
static requiredFields = ["id"];
|
|
18
|
+
constructor(notificationJson) {
|
|
19
|
+
if (validator(notificationJson)) {
|
|
20
|
+
this.id = notificationJson.id;
|
|
21
|
+
this.subscription_id = notificationJson.subscription_id;
|
|
22
|
+
this.load_id = notificationJson.load_id;
|
|
23
|
+
this.email_subject = notificationJson.email_subject;
|
|
24
|
+
this.email_message = notificationJson.email_message;
|
|
25
|
+
this.push_data = notificationJson.push_data;
|
|
26
|
+
this.notifiable_type = notificationJson.notifiable_type;
|
|
27
|
+
this.notifiable_id = notificationJson.notifiable_id;
|
|
28
|
+
this.cc_email = notificationJson.cc_email;
|
|
29
|
+
this.created_at = notificationJson.created_at;
|
|
30
|
+
}
|
|
31
|
+
else
|
|
32
|
+
throw new Error(`Failed to create new instance of ${Notification_Entity.name}`);
|
|
33
|
+
}
|
|
34
|
+
id;
|
|
35
|
+
subscription_id;
|
|
36
|
+
load_id;
|
|
37
|
+
email_subject;
|
|
38
|
+
email_message;
|
|
39
|
+
push_data;
|
|
40
|
+
notifiable_type;
|
|
41
|
+
notifiable_id;
|
|
42
|
+
cc_email;
|
|
43
|
+
created_at;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=notification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification.js","sourceRoot":"","sources":["../../../src/entities/notification/notification.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,SAAS,SAAS,CAChB,gBAAyB;IAEzB,IAAI,OAAO,gBAAgB,KAAK,QAAQ,IAAI,gBAAgB,IAAI,IAAI,EAAE;QACpE,mBAAmB,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YACrD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;gBAClD,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,mBAAmB;IACtC,MAAM,CAAC,cAAc,GAAG,CAAC,IAAI,CAAC,CAAC;IAE/B,YAAY,gBAA0B;QACpC,IAAI,SAAS,CAAC,gBAAgB,CAAC,EAAE;YAC/B,IAAI,CAAC,EAAE,GAAG,gBAAgB,CAAC,EAAE,CAAC;YAC9B,IAAI,CAAC,eAAe,GAAG,gBAAgB,CAAC,eAAe,CAAC;YACxD,IAAI,CAAC,OAAO,GAAG,gBAAgB,CAAC,OAAO,CAAC;YACxC,IAAI,CAAC,aAAa,GAAG,gBAAgB,CAAC,aAAa,CAAC;YACpD,IAAI,CAAC,aAAa,GAAG,gBAAgB,CAAC,aAAa,CAAC;YACpD,IAAI,CAAC,SAAS,GAAG,gBAAgB,CAAC,SAAS,CAAC;YAC5C,IAAI,CAAC,eAAe,GAAG,gBAAgB,CAAC,eAAe,CAAC;YACxD,IAAI,CAAC,aAAa,GAAG,gBAAgB,CAAC,aAAa,CAAC;YACpD,IAAI,CAAC,QAAQ,GAAG,gBAAgB,CAAC,QAAQ,CAAC;YAC1C,IAAI,CAAC,UAAU,GAAG,gBAAgB,CAAC,UAAU,CAAC;SAC/C;;YACC,MAAM,IAAI,KAAK,CACb,oCAAoC,mBAAmB,CAAC,IAAI,EAAE,CAC/D,CAAC;IACN,CAAC;IAED,EAAE,CAAS;IACX,eAAe,CAAU;IACzB,OAAO,CAAU;IACjB,aAAa,CAAU;IACvB,aAAa,CAAU;IACvB,SAAS,CAAU;IACnB,eAAe,CAAU;IACzB,aAAa,CAAU;IACvB,QAAQ,CAAU;IAClB,UAAU,CAAU"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import NotificationSubscription_Entity from "./notificationSubscription";
|
|
2
|
+
export default class NotificationSubscription extends NotificationSubscription_Entity {
|
|
3
|
+
static fromList(notificationSubscriptionsJSON: unknown): Array<NotificationSubscription>;
|
|
4
|
+
toJson(): string;
|
|
5
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import NotificationSubscription_Entity from "./notificationSubscription";
|
|
2
|
+
export default class NotificationSubscription extends NotificationSubscription_Entity {
|
|
3
|
+
static fromList(notificationSubscriptionsJSON) {
|
|
4
|
+
const notificationSubscriptions = [];
|
|
5
|
+
if (notificationSubscriptionsJSON)
|
|
6
|
+
Array.isArray(notificationSubscriptionsJSON) &&
|
|
7
|
+
notificationSubscriptionsJSON.forEach((notificationSubscriptionJSON) => {
|
|
8
|
+
notificationSubscriptions.push(new NotificationSubscription(notificationSubscriptionJSON));
|
|
9
|
+
});
|
|
10
|
+
return notificationSubscriptions;
|
|
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/notificationSubscription/helper.ts"],"names":[],"mappings":"AAAA,OAAO,+BAA+B,MAAM,4BAA4B,CAAC;AACzE,MAAM,CAAC,OAAO,OAAO,wBAAyB,SAAQ,+BAA+B;IACnF,MAAM,CAAC,QAAQ,CACb,6BAAsC;QAEtC,MAAM,yBAAyB,GAA+B,EAAE,CAAC;QACjE,IAAI,6BAA6B;YAC/B,KAAK,CAAC,OAAO,CAAC,6BAA6B,CAAC;gBAC1C,6BAA6B,CAAC,OAAO,CACnC,CAAC,4BAA4B,EAAE,EAAE;oBAC/B,yBAAyB,CAAC,IAAI,CAC5B,IAAI,wBAAwB,CAAC,4BAA4B,CAAC,CAC3D,CAAC;gBACJ,CAAC,CACF,CAAC;QACN,OAAO,yBAAyB,CAAC;IACnC,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/notificationSubscription/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,+BAA+B,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export default class NotificationSubscription_Entity {
|
|
2
|
+
static requiredFields: string[];
|
|
3
|
+
constructor(notificationSubscriptionJson: unknown);
|
|
4
|
+
id: number;
|
|
5
|
+
name?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
destination_id?: number;
|
|
8
|
+
code?: string;
|
|
9
|
+
item_order?: number;
|
|
10
|
+
cc_emails?: string;
|
|
11
|
+
from_email?: string;
|
|
12
|
+
icon_resource?: string;
|
|
13
|
+
sync_notification?: boolean;
|
|
14
|
+
}
|