turf-common 1.2.1-beta.67 → 1.2.1-beta.68

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,3 +1,4 @@
1
+ import { BookingDetailsStatus } from "../../@enum";
1
2
  import { BookingHistoryOperationType } from "../../enums/booking-history-operation-type.enum";
2
3
  import { PaymentMode } from "../../enums/payment-mode.enum";
3
4
  import { IEntityAuditColumn } from "./entity-audit-column.interface";
@@ -28,4 +29,7 @@ export interface IBookingHistoryEntity extends IEntityAuditColumn {
28
29
  amountPayable: number;
29
30
  refundPayable: number;
30
31
  totalRefundedAmount: number;
32
+ type: string | null;
33
+ totalBookingHours: number;
34
+ status: BookingDetailsStatus;
31
35
  }
@@ -70,6 +70,13 @@ export declare class BookingCode {
70
70
  }): string;
71
71
  static padBookingCode(bookingCodeWithoutTurfCode: string): string;
72
72
  static getInstance(turfId: number, bookingCodeWithoutTurfCode: string): BookingCode;
73
+ /**
74
+ * Extracts the numeric part of a bookingCode, excluding a predefined deleted slot separator.
75
+ *
76
+ * @param {string} bookingCode - The input bookingCode to extract from.
77
+ * @returns {string} The numeric part of the bookingCode.
78
+ */
79
+ static extractBookingCodeByDeletedSlotSeparator: (bookingCode: string) => string;
73
80
  getCost(): number;
74
81
  getTimeslot(): TimeSlot;
75
82
  static getIndianTimeZoneDate(bookingBufferOffsetHour?: number): Date;
@@ -556,6 +556,17 @@ var BookingCode = /** @class */ (function () {
556
556
  });
557
557
  return totalBookingHours;
558
558
  };
559
+ /**
560
+ * Extracts the numeric part of a bookingCode, excluding a predefined deleted slot separator.
561
+ *
562
+ * @param {string} bookingCode - The input bookingCode to extract from.
563
+ * @returns {string} The numeric part of the bookingCode.
564
+ */
565
+ BookingCode.extractBookingCodeByDeletedSlotSeparator = function (bookingCode) {
566
+ return bookingCode.startsWith(_utils_1.DELETED_SLOT_SEPARATOR)
567
+ ? bookingCode.slice(_utils_1.DELETED_SLOT_SEPARATOR.length)
568
+ : bookingCode;
569
+ };
559
570
  return BookingCode;
560
571
  }());
561
572
  exports.BookingCode = BookingCode;
@@ -1,2 +1,3 @@
1
1
  export declare const SUBSCRIPTION_RENEWAL_THRESHOLD_DAYS = 7;
2
2
  export declare const DEFAULT_PASSWORD = "turf@#123";
3
+ export declare const DELETED_SLOT_SEPARATOR = "d_";
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DEFAULT_PASSWORD = exports.SUBSCRIPTION_RENEWAL_THRESHOLD_DAYS = void 0;
3
+ exports.DELETED_SLOT_SEPARATOR = exports.DEFAULT_PASSWORD = exports.SUBSCRIPTION_RENEWAL_THRESHOLD_DAYS = void 0;
4
4
  exports.SUBSCRIPTION_RENEWAL_THRESHOLD_DAYS = 7;
5
5
  exports.DEFAULT_PASSWORD = "turf@#123";
6
+ exports.DELETED_SLOT_SEPARATOR = "d_";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "turf-common",
3
- "version": "1.2.1-beta.67",
3
+ "version": "1.2.1-beta.68",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",