turf-common 1.4.2-beta.41 → 1.4.2-beta.42

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.
@@ -9,6 +9,7 @@ export declare enum BookingHistoryOperationType {
9
9
  MERGED = "merged",
10
10
  DELETE_SLOT_EVENT = "delete_slot_event",
11
11
  EXTENSION = "extension",
12
- PAYMENT_WRITEOFF = "payment_writeoff"
12
+ PAYMENT_WRITEOFF = "payment_writeoff",
13
+ EXTENSION_MERGED = "extension_merged"
13
14
  }
14
15
  export declare const OPERATION_TYPES: BookingHistoryOperationType[];
@@ -14,6 +14,7 @@ var BookingHistoryOperationType;
14
14
  BookingHistoryOperationType["DELETE_SLOT_EVENT"] = "delete_slot_event";
15
15
  BookingHistoryOperationType["EXTENSION"] = "extension";
16
16
  BookingHistoryOperationType["PAYMENT_WRITEOFF"] = "payment_writeoff";
17
+ BookingHistoryOperationType["EXTENSION_MERGED"] = "extension_merged";
17
18
  })(BookingHistoryOperationType || (exports.BookingHistoryOperationType = BookingHistoryOperationType = {}));
18
19
  exports.OPERATION_TYPES = [
19
20
  BookingHistoryOperationType.DELETE,
@@ -145,4 +145,5 @@ export declare class BookingCode {
145
145
  */
146
146
  isAdjacentBookingCode(nextBookingCode: BookingCode): boolean;
147
147
  static getInstanceByComponents(turfId: number, pitchCode: number, dateCode: number, fromTimeCode: string, toTimeCode: string, priceCsv: string): BookingCode;
148
+ isTimeSlotContinuous(that: BookingCode): boolean;
148
149
  }
@@ -618,6 +618,12 @@ var BookingCode = /** @class */ (function () {
618
618
  BookingCode.getInstanceByComponents = function (turfId, pitchCode, dateCode, fromTimeCode, toTimeCode, priceCsv) {
619
619
  return new BookingCode("".concat(turfId.toString().padStart(4, "0")).concat(dateCode.toString().padStart(6, "0")).concat(fromTimeCode).concat(toTimeCode).concat(pitchCode.toString().padStart(2, "0")), priceCsv);
620
620
  };
621
+ BookingCode.prototype.isTimeSlotContinuous = function (that) {
622
+ return this.toTimeCode == that.fromTimeCode &&
623
+ this.pitchNumber == that.pitchNumber &&
624
+ this.turfId == that.turfId &&
625
+ this.dateCode == that.dateCode;
626
+ };
621
627
  /**
622
628
  * Extracts the numeric part of a bookingCode, excluding a predefined deleted slot separator.
623
629
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "turf-common",
3
- "version": "1.4.2-beta.41",
3
+ "version": "1.4.2-beta.42",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",