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.
@@ -1,4 +1,4 @@
1
- export declare const enum BookingDetailsStatus {
1
+ export declare enum BookingDetailsStatus {
2
2
  BOOKED = "booked",
3
3
  BLOCKED = "blocked"
4
4
  }
@@ -1,4 +1,4 @@
1
- export declare const enum BookingFetchFilter {
1
+ export declare enum BookingFetchFilter {
2
2
  PENDING_PAYMENT = "pending_payment",
3
3
  PENDING_REFUND = "pending_refund",
4
4
  FULL_REFUND = "full_refund"
@@ -1,4 +1,4 @@
1
- export declare const enum BookingHistoryOperationType {
1
+ export declare enum BookingHistoryOperationType {
2
2
  DELETE = "delete",
3
3
  UPDATE = "update",
4
4
  INSERT = "insert",
@@ -12,7 +12,7 @@ var BookingHistoryOperationType;
12
12
  BookingHistoryOperationType["PAYMENT"] = "payment";
13
13
  })(BookingHistoryOperationType || (exports.BookingHistoryOperationType = BookingHistoryOperationType = {}));
14
14
  exports.operationTypes = [
15
- "delete" /* BookingHistoryOperationType.DELETE */,
16
- "refund" /* BookingHistoryOperationType.REFUND */,
17
- "payment" /* BookingHistoryOperationType.PAYMENT */,
15
+ BookingHistoryOperationType.DELETE,
16
+ BookingHistoryOperationType.REFUND,
17
+ BookingHistoryOperationType.PAYMENT,
18
18
  ];
@@ -1,4 +1,4 @@
1
- export declare const enum ConfigurationDescription {
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] = "send_daily_collection" /* CronJobsNames.SEND_DAILY_COLLECTION */,
22
- _a[ConfigurationKey.SUBSCRIPTION_REMINDER] = "subscription_reminder" /* CronJobsNames.SUBSCRIPTION_REMINDER */,
23
- _a[ConfigurationKey.SUBSCRIPTION_ACTIVATION] = "subscription_activation" /* CronJobsNames.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 const enum ConfigurationText {
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"
@@ -1,4 +1,4 @@
1
- export declare const enum CronJobsNames {
1
+ export declare enum CronJobsNames {
2
2
  SEND_DAILY_COLLECTION = "send_daily_collection",
3
3
  SUBSCRIPTION_REMINDER = "subscription_reminder",
4
4
  SUBSCRIPTION_ACTIVATION = "subscription_activation"
@@ -1,4 +1,4 @@
1
- export declare const enum CronJobsStatus {
1
+ export declare enum CronJobsStatus {
2
2
  RUNNING = "running",
3
3
  FAILED = "failed",
4
4
  SUCCESS = "success"
@@ -1,3 +1,3 @@
1
- export declare const enum FaqsStatus {
1
+ export declare enum FaqsStatus {
2
2
  ACTIVE = "active"
3
3
  }
@@ -1,4 +1,4 @@
1
- export declare const enum ModificationDiscountPolicy {
1
+ export declare enum ModificationDiscountPolicy {
2
2
  DISCOUNT_RECALL = "discount_recall",
3
3
  DISCOUNT_RELATIVE = "discount_relative",
4
4
  DISCOUNT_CONDITIONAL = "discount_conditional"
@@ -1,4 +1,4 @@
1
- export declare const enum PaymentMode {
1
+ export declare enum PaymentMode {
2
2
  UPI = "upi",
3
3
  CASH = "cash"
4
4
  }
@@ -1,4 +1,4 @@
1
- export declare const enum PitchOperations {
1
+ export declare enum PitchOperations {
2
2
  DELETE = "delete",
3
3
  UPDATE = "update",
4
4
  CREATE = "create"
@@ -1,4 +1,4 @@
1
- export declare const enum PitchSports {
1
+ export declare enum PitchSports {
2
2
  CRICKET = "cricket",
3
3
  FOOTBALL = "football",
4
4
  HOCKEY = "hockey",
@@ -1,4 +1,4 @@
1
- export declare const enum PricingPlanStatus {
1
+ export declare enum PricingPlanStatus {
2
2
  ACTIVE = "active",
3
3
  DEACTIVE = "deactive"
4
4
  }
@@ -1,4 +1,4 @@
1
- export declare const enum RegistrationStatus {
1
+ export declare enum RegistrationStatus {
2
2
  REGISTRATION = "registration",
3
3
  REGISTRATION_INVALID = "registration_invalid",
4
4
  REGISTRATION_APPROVED = "registration_approved",
@@ -1,4 +1,4 @@
1
- export declare const enum BookingOperations {
1
+ export declare enum BookingOperations {
2
2
  BOOKED = "booked",
3
3
  BLOCKED = "blocked",
4
4
  DELETE = "delete",
@@ -1,3 +1,3 @@
1
- export declare const enum Timezone {
1
+ export declare enum Timezone {
2
2
  ASIA_KOLKATA = "Asia/Kolkata"
3
3
  }
@@ -1,4 +1,4 @@
1
- export declare const enum BookingPaymentTransactionType {
1
+ export declare enum BookingPaymentTransactionType {
2
2
  CUSTOMER_PAYMENT = "customer_payment",
3
3
  CUSTOMER_REFUND = "customer_refund",
4
4
  CUSTOMER_REFUND_INPROCESS = "customer_refund_inprocess",
@@ -1,4 +1,4 @@
1
- export declare const enum UserStatus {
1
+ export declare enum UserStatus {
2
2
  ACTIVE = "active",
3
3
  DEACTIVE = "deactive",
4
4
  SUSPENDED = "suspended",
@@ -1,4 +1,4 @@
1
- export declare const enum ValidCouponType {
1
+ export declare enum ValidCouponType {
2
2
  PERCENTAGE = "percentage",
3
3
  UNIT = "unit"
4
4
  }
@@ -1,4 +1,4 @@
1
- export declare const enum UserType {
1
+ export declare enum UserType {
2
2
  STAFF = "staff",
3
3
  OWNER = "owner",
4
4
  SUPERADMIN = "superadmin",
@@ -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
- "discount_conditional" /* ModificationDiscountPolicy.DISCOUNT_CONDITIONAL */,
30
- "discount_recall" /* ModificationDiscountPolicy.DISCOUNT_RECALL */,
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 = "discount_conditional" /* ModificationDiscountPolicy.DISCOUNT_CONDITIONAL */; }
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 = "discount_conditional" /* ModificationDiscountPolicy.DISCOUNT_CONDITIONAL */; }
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 === "cash" /* PaymentMode.CASH */)
25
+ if (type === payment_mode_enum_1.PaymentMode.CASH)
25
26
  turfWisePaymentData.cashTotal += amount;
26
- else if (type === "upi" /* PaymentMode.UPI */)
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "turf-common",
3
- "version": "1.1.1-beta.37",
3
+ "version": "1.1.1-beta.39",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",