turf-common 1.1.1-beta.37 → 1.1.1-beta.39
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/booking-details-status.enum.d.ts +1 -1
- package/build/enums/booking-fetch-filter.enum.d.ts +1 -1
- package/build/enums/booking-history-operation-type.enum.d.ts +1 -1
- package/build/enums/booking-history-operation-type.enum.js +3 -3
- package/build/enums/configuration-description.enum.d.ts +1 -1
- package/build/enums/configuration-key.enum.js +4 -3
- package/build/enums/configuration-text.enum.d.ts +1 -1
- package/build/enums/cron-jobs-name.enum.d.ts +1 -1
- package/build/enums/cron-jobs-status.enum.d.ts +1 -1
- package/build/enums/faqs-status.enum.d.ts +1 -1
- package/build/enums/modification-discount-policy.enum.d.ts +1 -1
- package/build/enums/payment-mode.enum.d.ts +1 -1
- package/build/enums/pitch-operation.enum.d.ts +1 -1
- package/build/enums/pitch-sports.enum.d.ts +1 -1
- package/build/enums/pricing-plan-status.enum.d.ts +1 -1
- package/build/enums/registration-status-enum.d.ts +1 -1
- package/build/enums/socket-io-booking-operation.enum.d.ts +1 -1
- package/build/enums/timezone.enum.d.ts +1 -1
- package/build/enums/transaction-type.enum.d.ts +1 -1
- package/build/enums/user-status.enum.d.ts +1 -1
- package/build/enums/valid-coupon-type.enum.d.ts +1 -1
- package/build/enums/valid-type.enum.d.ts +1 -1
- package/build/models/charge-model.js +5 -4
- package/build/models/entity/booking-payment-history-model.js +3 -2
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@ var BookingHistoryOperationType;
|
|
|
12
12
|
BookingHistoryOperationType["PAYMENT"] = "payment";
|
|
13
13
|
})(BookingHistoryOperationType || (exports.BookingHistoryOperationType = BookingHistoryOperationType = {}));
|
|
14
14
|
exports.operationTypes = [
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
BookingHistoryOperationType.DELETE,
|
|
16
|
+
BookingHistoryOperationType.REFUND,
|
|
17
|
+
BookingHistoryOperationType.PAYMENT,
|
|
18
18
|
];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare enum ConfigurationDescription {
|
|
2
2
|
SEND_DAILY_COLLECTION = "Daily payment collection will be sent by email to the owner",
|
|
3
3
|
SUBSCRIPTION_REMINDER = "Send reminder to owners",
|
|
4
4
|
SUBSCRIPTION_ACTIVATION = "subscription_activation"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ConfigurationKey = void 0;
|
|
4
|
+
var cron_jobs_name_enum_1 = require("./cron-jobs-name.enum");
|
|
4
5
|
var ConfigurationKey;
|
|
5
6
|
(function (ConfigurationKey) {
|
|
6
7
|
ConfigurationKey["SEND_DAILY_COLLECTION"] = "send_daily_collection";
|
|
@@ -18,9 +19,9 @@ var ConfigurationKey;
|
|
|
18
19
|
function getCronJobName(configurationKey) {
|
|
19
20
|
var _a;
|
|
20
21
|
var cronJobConfigurationKeyMapping = (_a = {},
|
|
21
|
-
_a[ConfigurationKey.SEND_DAILY_COLLECTION] =
|
|
22
|
-
_a[ConfigurationKey.SUBSCRIPTION_REMINDER] =
|
|
23
|
-
_a[ConfigurationKey.SUBSCRIPTION_ACTIVATION] =
|
|
22
|
+
_a[ConfigurationKey.SEND_DAILY_COLLECTION] = cron_jobs_name_enum_1.CronJobsNames.SEND_DAILY_COLLECTION,
|
|
23
|
+
_a[ConfigurationKey.SUBSCRIPTION_REMINDER] = cron_jobs_name_enum_1.CronJobsNames.SUBSCRIPTION_REMINDER,
|
|
24
|
+
_a[ConfigurationKey.SUBSCRIPTION_ACTIVATION] = cron_jobs_name_enum_1.CronJobsNames.SUBSCRIPTION_ACTIVATION,
|
|
24
25
|
_a);
|
|
25
26
|
return cronJobConfigurationKeyMapping[configurationKey];
|
|
26
27
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare enum ConfigurationText {
|
|
2
2
|
SEND_DAILY_COLLECTION = "A daily payment collection email will be sent to the owner",
|
|
3
3
|
SUBSCRIPTION_REMINDER = "Send reminder to owners on specific days",
|
|
4
4
|
SUBSCRIPTION_ACTIVATION = "subscription_activation"
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ChargesModel = void 0;
|
|
4
4
|
var app_badrequest_exception_1 = require("../exceptions/app-badrequest.exception");
|
|
5
|
+
var modification_discount_policy_enum_1 = require("../enums/modification-discount-policy.enum");
|
|
5
6
|
var ChargesModel = /** @class */ (function () {
|
|
6
7
|
function ChargesModel(initialGrossAmount, paidAmount, couponCode, discountPolicy) {
|
|
7
8
|
this.initialBookingGrossAmount = initialGrossAmount;
|
|
@@ -26,8 +27,8 @@ var ChargesModel = /** @class */ (function () {
|
|
|
26
27
|
};
|
|
27
28
|
ChargesModel.prototype.getDiscountAmount = function () {
|
|
28
29
|
if ([
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
modification_discount_policy_enum_1.ModificationDiscountPolicy.DISCOUNT_CONDITIONAL,
|
|
31
|
+
modification_discount_policy_enum_1.ModificationDiscountPolicy.DISCOUNT_RECALL,
|
|
31
32
|
].includes(this.discountPolicy) &&
|
|
32
33
|
this.cancelledBookingGrossAmount > 0) {
|
|
33
34
|
this.couponCode = "";
|
|
@@ -185,13 +186,13 @@ var ChargesModel = /** @class */ (function () {
|
|
|
185
186
|
return newChargeModel;
|
|
186
187
|
};
|
|
187
188
|
ChargesModel.getInstanceByInterface = function (bookingDetailsEntity, discountPolicy) {
|
|
188
|
-
if (discountPolicy === void 0) { discountPolicy =
|
|
189
|
+
if (discountPolicy === void 0) { discountPolicy = modification_discount_policy_enum_1.ModificationDiscountPolicy.DISCOUNT_CONDITIONAL; }
|
|
189
190
|
var chargesModel = new ChargesModel(bookingDetailsEntity.initialBookingGrossAmount, bookingDetailsEntity.amountPaid, bookingDetailsEntity.couponCode, discountPolicy);
|
|
190
191
|
Object.assign(chargesModel, bookingDetailsEntity);
|
|
191
192
|
return chargesModel;
|
|
192
193
|
};
|
|
193
194
|
ChargesModel.assignByInterface = function (bookingDetailsEntity, discountPolicy) {
|
|
194
|
-
if (discountPolicy === void 0) { discountPolicy =
|
|
195
|
+
if (discountPolicy === void 0) { discountPolicy = modification_discount_policy_enum_1.ModificationDiscountPolicy.DISCOUNT_CONDITIONAL; }
|
|
195
196
|
var newChargeModel = new ChargesModel(bookingDetailsEntity.initialBookingGrossAmount, bookingDetailsEntity.amountPaid, bookingDetailsEntity.couponCode, discountPolicy);
|
|
196
197
|
newChargeModel.additionalBookingGrossAmount =
|
|
197
198
|
bookingDetailsEntity.additionalBookingGrossAmount;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BookingPaymentHistoryModel = void 0;
|
|
4
|
+
var payment_mode_enum_1 = require("../../enums/payment-mode.enum");
|
|
4
5
|
var booking_code_model_1 = require("../booking-code-model");
|
|
5
6
|
var BookingPaymentHistoryModel = /** @class */ (function () {
|
|
6
7
|
function BookingPaymentHistoryModel(data) {
|
|
@@ -21,9 +22,9 @@ var BookingPaymentHistoryModel = /** @class */ (function () {
|
|
|
21
22
|
upiTotal: 0,
|
|
22
23
|
total: 0,
|
|
23
24
|
};
|
|
24
|
-
if (type ===
|
|
25
|
+
if (type === payment_mode_enum_1.PaymentMode.CASH)
|
|
25
26
|
turfWisePaymentData.cashTotal += amount;
|
|
26
|
-
else if (type ===
|
|
27
|
+
else if (type === payment_mode_enum_1.PaymentMode.UPI)
|
|
27
28
|
turfWisePaymentData.upiTotal += amount;
|
|
28
29
|
turfWisePaymentData.total =
|
|
29
30
|
turfWisePaymentData.cashTotal + turfWisePaymentData.upiTotal;
|