turf-common 1.2.1-beta.7 → 1.2.1-beta.9
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/@enum.d.ts +1 -0
- package/build/@enum.js +1 -0
- package/build/enums/environment.enum.d.ts +5 -0
- package/build/enums/environment.enum.js +9 -0
- package/build/models/charge-model.d.ts +0 -1
- package/build/models/charge-model.js +26 -19
- package/build/utils/string-utils.d.ts +1 -0
- package/build/utils/string-utils.js +31 -0
- package/package.json +1 -1
- package/build/utils/format-string-with-hyphens.d.ts +0 -1
- package/build/utils/format-string-with-hyphens.js +0 -7
package/build/@enum.d.ts
CHANGED
package/build/@enum.js
CHANGED
|
@@ -38,3 +38,4 @@ __exportStar(require("./enums/booking-fetch-filter.enum"), exports);
|
|
|
38
38
|
__exportStar(require("./enums/timezone.enum"), exports);
|
|
39
39
|
__exportStar(require("./enums/bookings-status.enum"), exports);
|
|
40
40
|
__exportStar(require("./enums/organization-type.enum"), exports);
|
|
41
|
+
__exportStar(require("./enums/environment.enum"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Environment = void 0;
|
|
4
|
+
var Environment;
|
|
5
|
+
(function (Environment) {
|
|
6
|
+
Environment["DEVELOPMENT"] = "development";
|
|
7
|
+
Environment["PRODUCTION"] = "production";
|
|
8
|
+
Environment["TEST"] = "test";
|
|
9
|
+
})(Environment || (exports.Environment = Environment = {}));
|
|
@@ -27,7 +27,6 @@ export declare class ChargesModel implements IChargeModel {
|
|
|
27
27
|
clone(): ChargesModel;
|
|
28
28
|
private modifyDelete;
|
|
29
29
|
static getInstance(chargeData: IChargeModel, discountPolicy?: ModificationDiscountPolicy): ChargesModel;
|
|
30
|
-
static assignByInterface(chargeData: IChargeModel, discountPolicy?: ModificationDiscountPolicy): ChargesModel;
|
|
31
30
|
getTotalAmount(): number;
|
|
32
31
|
getPaymentStatus(): "Refund" | "Paid" | "Pending";
|
|
33
32
|
getTotalNetAmount(): number;
|
|
@@ -191,25 +191,32 @@ var ChargesModel = /** @class */ (function () {
|
|
|
191
191
|
Object.assign(chargesModel, chargeData);
|
|
192
192
|
return chargesModel;
|
|
193
193
|
};
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
194
|
+
// static assignByInterface(
|
|
195
|
+
// chargeData: IChargeModel,
|
|
196
|
+
// discountPolicy: ModificationDiscountPolicy = ModificationDiscountPolicy.DISCOUNT_CONDITIONAL
|
|
197
|
+
// ): ChargesModel {
|
|
198
|
+
// const newChargeModel = new ChargesModel(
|
|
199
|
+
// chargeData.initialBookingGrossAmount,
|
|
200
|
+
// chargeData.amountPaid,
|
|
201
|
+
// chargeData.couponCode,
|
|
202
|
+
// discountPolicy
|
|
203
|
+
// );
|
|
204
|
+
// newChargeModel.additionalBookingGrossAmount =
|
|
205
|
+
// chargeData.additionalBookingGrossAmount;
|
|
206
|
+
// newChargeModel.initialBookingGrossAmount =
|
|
207
|
+
// chargeData.initialBookingGrossAmount;
|
|
208
|
+
// newChargeModel.cancelledBookingGrossAmount =
|
|
209
|
+
// chargeData.cancelledBookingGrossAmount;
|
|
210
|
+
// newChargeModel.refundPayable = chargeData.refundPayable;
|
|
211
|
+
// newChargeModel.totalRefundedAmount = chargeData.totalRefundedAmount;
|
|
212
|
+
// newChargeModel.amountPaid = chargeData.amountPaid;
|
|
213
|
+
// newChargeModel.totalCancellationCharges =
|
|
214
|
+
// chargeData.totalCancellationCharges;
|
|
215
|
+
// newChargeModel.netTotal = chargeData.netTotal;
|
|
216
|
+
// newChargeModel.couponCode = chargeData.couponCode;
|
|
217
|
+
// newChargeModel.amountPayable = chargeData.amountPayable;
|
|
218
|
+
// return newChargeModel;
|
|
219
|
+
// }
|
|
213
220
|
ChargesModel.prototype.getTotalAmount = function () {
|
|
214
221
|
return this.getNetAmount() + this.totalCancellationCharges;
|
|
215
222
|
};
|
|
@@ -24,6 +24,37 @@ var StringUtil = /** @class */ (function () {
|
|
|
24
24
|
// Convert the input string to lowercase and replace spaces with hyphens
|
|
25
25
|
return inputString.toLowerCase().replace(/\s+/g, "-");
|
|
26
26
|
};
|
|
27
|
+
StringUtil.prototype.generateRandomPassword = function () {
|
|
28
|
+
var _a;
|
|
29
|
+
var alphabets = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
30
|
+
var numbers = "0123456789";
|
|
31
|
+
var specialChars = "!@#$%^&*?+";
|
|
32
|
+
function getRandomCharacter(characters) {
|
|
33
|
+
return characters[Math.floor(Math.random() * characters.length)];
|
|
34
|
+
}
|
|
35
|
+
var randomAlphabet = getRandomCharacter(alphabets);
|
|
36
|
+
var randomNumber = getRandomCharacter(numbers);
|
|
37
|
+
var randomSpecialChar = getRandomCharacter(specialChars);
|
|
38
|
+
var remainingCharacters = alphabets + alphabets.toLowerCase();
|
|
39
|
+
var randomRemainingChars = Array.from({ length: 3 }, function () {
|
|
40
|
+
return getRandomCharacter(remainingCharacters);
|
|
41
|
+
}).join("");
|
|
42
|
+
var passwordArray = [
|
|
43
|
+
randomAlphabet,
|
|
44
|
+
randomNumber,
|
|
45
|
+
randomSpecialChar,
|
|
46
|
+
randomRemainingChars,
|
|
47
|
+
];
|
|
48
|
+
// Shuffle the password array
|
|
49
|
+
for (var i = passwordArray.length - 1; i > 0; i--) {
|
|
50
|
+
var j = Math.floor(Math.random() * (i + 1));
|
|
51
|
+
_a = [
|
|
52
|
+
passwordArray[j],
|
|
53
|
+
passwordArray[i],
|
|
54
|
+
], passwordArray[i] = _a[0], passwordArray[j] = _a[1];
|
|
55
|
+
}
|
|
56
|
+
return passwordArray.join("");
|
|
57
|
+
};
|
|
27
58
|
return StringUtil;
|
|
28
59
|
}());
|
|
29
60
|
exports.stringUtil = new StringUtil();
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function FormatStringWithHyphens(inputString: string): string;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FormatStringWithHyphens = void 0;
|
|
4
|
-
function FormatStringWithHyphens(inputString) {
|
|
5
|
-
return inputString.toLowerCase().replace(/\s+/g, "-");
|
|
6
|
-
}
|
|
7
|
-
exports.FormatStringWithHyphens = FormatStringWithHyphens;
|