b2m-utils 0.0.83 → 0.0.85
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/build/enums/FeeCalculationTypeEnum.d.ts +13 -0
- package/build/enums/FeeCategoryEnum.d.ts +11 -0
- package/build/enums/index.d.ts +2 -0
- package/build/functions/formatDateString.d.ts +1 -0
- package/build/functions/index.d.ts +1 -0
- package/build/index.esm.js +54 -1
- package/build/index.esm.js.gz +0 -0
- package/build/index.esm.js.map +1 -1
- package/build/index.js +54 -0
- package/build/index.js.gz +0 -0
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var formatDateString = function (dateString, staticTime) {
|
|
6
|
+
if (staticTime === void 0) { staticTime = false; }
|
|
7
|
+
if (dateString.includes('.000Z')) {
|
|
8
|
+
var firstSplit = dateString === null || dateString === void 0 ? void 0 : dateString.split('.000Z')[0];
|
|
9
|
+
var secondSplit = firstSplit === null || firstSplit === void 0 ? void 0 : firstSplit.split('T');
|
|
10
|
+
if (secondSplit === null || secondSplit === void 0 ? void 0 : secondSplit.length) {
|
|
11
|
+
if (staticTime) {
|
|
12
|
+
return "".concat(secondSplit[0], " 12:00:00");
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
return "".concat(secondSplit[0], " ").concat(secondSplit[1]);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
else if (dateString.includes(' ')) {
|
|
20
|
+
if (staticTime) {
|
|
21
|
+
return "".concat(dateString.split(' ')[0], " 12:00:00");
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
return dateString;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return '';
|
|
28
|
+
};
|
|
29
|
+
|
|
5
30
|
function getConfigurationFromDomain(domainConfigurations, configurationName) {
|
|
6
31
|
return domainConfigurations.find(function (i) { return i.name === configurationName; });
|
|
7
32
|
}
|
|
@@ -66,6 +91,34 @@ exports.DomainTypeEnum = void 0;
|
|
|
66
91
|
DomainTypeEnum[DomainTypeEnum["B2M_CLIENT"] = 6] = "B2M_CLIENT";
|
|
67
92
|
})(exports.DomainTypeEnum || (exports.DomainTypeEnum = {}));
|
|
68
93
|
|
|
94
|
+
exports.FeeCalculationTypeEnum = void 0;
|
|
95
|
+
(function (FeeCalculationTypeEnum) {
|
|
96
|
+
FeeCalculationTypeEnum[FeeCalculationTypeEnum["FIXED"] = 1] = "FIXED";
|
|
97
|
+
FeeCalculationTypeEnum[FeeCalculationTypeEnum["TAXED_WEIGHT"] = 2] = "TAXED_WEIGHT";
|
|
98
|
+
FeeCalculationTypeEnum[FeeCalculationTypeEnum["INTERNATIONAL_CHARGE"] = 3] = "INTERNATIONAL_CHARGE";
|
|
99
|
+
FeeCalculationTypeEnum[FeeCalculationTypeEnum["CONVERSION_TAX"] = 4] = "CONVERSION_TAX";
|
|
100
|
+
FeeCalculationTypeEnum[FeeCalculationTypeEnum["CUBED_WEIGHT"] = 5] = "CUBED_WEIGHT";
|
|
101
|
+
FeeCalculationTypeEnum[FeeCalculationTypeEnum["COMMODITY_VALUE"] = 6] = "COMMODITY_VALUE";
|
|
102
|
+
FeeCalculationTypeEnum[FeeCalculationTypeEnum["FRACTIONED"] = 7] = "FRACTIONED";
|
|
103
|
+
FeeCalculationTypeEnum[FeeCalculationTypeEnum["FREIGHT"] = 8] = "FREIGHT";
|
|
104
|
+
FeeCalculationTypeEnum[FeeCalculationTypeEnum["TOTAL_PERCENTAGE"] = 9] = "TOTAL_PERCENTAGE";
|
|
105
|
+
FeeCalculationTypeEnum[FeeCalculationTypeEnum["MIN_VALUE"] = 10] = "MIN_VALUE";
|
|
106
|
+
FeeCalculationTypeEnum[FeeCalculationTypeEnum["SUM_CONTAINERS"] = 11] = "SUM_CONTAINERS";
|
|
107
|
+
})(exports.FeeCalculationTypeEnum || (exports.FeeCalculationTypeEnum = {}));
|
|
108
|
+
|
|
109
|
+
exports.FeeCategoryEnum = void 0;
|
|
110
|
+
(function (FeeCategoryEnum) {
|
|
111
|
+
FeeCategoryEnum[FeeCategoryEnum["ORIGIN"] = 1] = "ORIGIN";
|
|
112
|
+
FeeCategoryEnum[FeeCategoryEnum["INTERNATIONAL"] = 2] = "INTERNATIONAL";
|
|
113
|
+
FeeCategoryEnum[FeeCategoryEnum["DESTINATION"] = 3] = "DESTINATION";
|
|
114
|
+
FeeCategoryEnum[FeeCategoryEnum["DELIVERY"] = 4] = "DELIVERY";
|
|
115
|
+
FeeCategoryEnum[FeeCategoryEnum["ADDITIONAL"] = 5] = "ADDITIONAL";
|
|
116
|
+
FeeCategoryEnum[FeeCategoryEnum["PICKUP"] = 6] = "PICKUP";
|
|
117
|
+
FeeCategoryEnum[FeeCategoryEnum["FREIGHT"] = 7] = "FREIGHT";
|
|
118
|
+
FeeCategoryEnum[FeeCategoryEnum["FEES"] = 8] = "FEES";
|
|
119
|
+
FeeCategoryEnum[FeeCategoryEnum["TAXES"] = 9] = "TAXES";
|
|
120
|
+
})(exports.FeeCategoryEnum || (exports.FeeCategoryEnum = {}));
|
|
121
|
+
|
|
69
122
|
exports.ModalEnum = void 0;
|
|
70
123
|
(function (ModalEnum) {
|
|
71
124
|
ModalEnum[ModalEnum["AIR"] = 1] = "AIR";
|
|
@@ -6150,6 +6203,7 @@ var setFormattedDatesInObjects = function (objectFormat) { return __awaiter(void
|
|
|
6150
6203
|
});
|
|
6151
6204
|
}); };
|
|
6152
6205
|
|
|
6206
|
+
exports.formatDateString = formatDateString;
|
|
6153
6207
|
exports.getConfigurationFromDomain = getConfigurationFromDomain;
|
|
6154
6208
|
exports.getCookies = getCookies;
|
|
6155
6209
|
exports.getDataFromToken = getDataFromToken;
|
package/build/index.js.gz
CHANGED
|
Binary file
|