turf-common 1.4.2-beta.8 → 3.0.0
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/README.md +20 -20
- package/build/jest.config.js +2 -1
- package/build/src/@model.d.ts +1 -0
- package/build/src/@model.js +1 -0
- package/build/src/enums/booking-history-operation-type.enum.d.ts +4 -1
- package/build/src/enums/booking-history-operation-type.enum.js +3 -0
- package/build/src/enums/organization-status.enum.d.ts +4 -0
- package/build/src/enums/organization-status.enum.js +6 -1
- package/build/src/enums/transaction-type.enum.d.ts +2 -1
- package/build/src/enums/transaction-type.enum.js +1 -0
- package/build/src/interface/api/booking-availablity-by-pitch.interface.d.ts +1 -0
- package/build/src/interface/api/booking-pending-payment-writeoff.interface.d.ts +10 -0
- package/build/src/interface/api/booking-pending-payment-writeoff.interface.js +2 -0
- package/build/src/interface/api/create-recurring-slot-booking.interface.d.ts +4 -1
- package/build/src/interface/api/create-user.interface.d.ts +1 -1
- package/build/src/interface/api/get-availability-by-turf.interface.d.ts +1 -0
- package/build/src/interface/api/get-booking-by-organization-id.interface.d.ts +1 -1
- package/build/src/interface/api/get-booking-history.interface.d.ts +1 -0
- package/build/src/interface/api/get-collection.interface.d.ts +1 -1
- package/build/src/interface/api/get-organization-configuration.interface.d.ts +8 -0
- package/build/src/interface/api/get-organization-configuration.interface.js +2 -0
- package/build/src/interface/api/index.d.ts +3 -0
- package/build/src/interface/api/index.js +3 -0
- package/build/src/interface/api/login-response.interface.d.ts +4 -1
- package/build/src/interface/api/one-slot-booking.interface.d.ts +2 -0
- package/build/src/interface/api/staff-member-list.interface.d.ts +1 -1
- package/build/src/interface/api/update-organization-configuration.interface.d.ts +6 -0
- package/build/src/interface/api/update-organization-configuration.interface.js +2 -0
- package/build/src/interface/api/update-recurring-booking.interface.d.ts +1 -0
- package/build/src/interface/api/update-staff-member.interface.d.ts +1 -1
- package/build/src/interface/entity/organization-entity.interface.d.ts +15 -3
- package/build/src/interface/entity/user-entity.interface.d.ts +6 -6
- package/build/src/interface/get-booking-by-id.interface.d.ts +2 -2
- package/build/src/interface/model/booking-details-model.interface.d.ts +8 -0
- package/build/src/interface/user-entity-essential-info.interface.d.ts +1 -1
- package/build/src/models/booking-code-model.d.ts +16 -2
- package/build/src/models/booking-code-model.js +83 -40
- package/build/src/models/charge-model.d.ts +2 -0
- package/build/src/models/charge-model.js +41 -11
- package/build/src/models/entity/booking-details-model.d.ts +2 -1
- package/build/src/models/entity/booking-details-model.js +19 -0
- package/build/src/models/entity/booking-entity-model.d.ts +1 -0
- package/build/src/models/entity/booking-entity-model.js +3 -0
- package/build/src/models/entity/user-model.d.ts +6 -6
- package/build/src/models/time-slot-model.d.ts +1 -0
- package/build/src/models/time-slot-model.js +3 -0
- package/build/src/models/turf-availability-model.d.ts +18 -3
- package/build/src/models/turf-availability-model.js +60 -3
- package/build/src/models/weekday-time-slot-model.d.ts +12 -0
- package/build/src/models/weekday-time-slot-model.js +30 -0
- package/build/src/utils/constant.d.ts +3 -0
- package/build/src/utils/constant.js +4 -1
- package/build/src/utils/date-util.d.ts +8 -1
- package/build/src/utils/date-util.js +22 -3
- package/build/tests/booking-code/method.spec.d.ts +1 -0
- package/build/tests/booking-code/method.spec.js +11 -0
- package/build/tests/unit/charges/discount-relative/basic.spec.d.ts +1 -0
- package/build/tests/unit/charges/discount-relative/basic.spec.js +209 -0
- package/build/tests/unit/charges/extension/basic.amount-fully-paid.spec.d.ts +1 -0
- package/build/tests/unit/charges/extension/basic.amount-fully-paid.spec.js +208 -0
- package/build/tests/unit/charges/extension/basic.spec.d.ts +1 -0
- package/build/tests/unit/charges/extension/basic.spec.js +215 -0
- package/build/tests/unit/pricing-plan/basic-scenario.spec.js +1 -1
- package/package.json +17 -6
package/README.md
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
## 1 npm init -y
|
|
2
|
-
|
|
3
|
-
## 2 npm login
|
|
4
|
-
|
|
5
|
-
## 3 npm version patch
|
|
6
|
-
|
|
7
|
-
# //it increase version
|
|
8
|
-
|
|
9
|
-
## 3 npm publish --access public
|
|
10
|
-
|
|
11
|
-
# //npm publish by default --access public
|
|
12
|
-
|
|
13
|
-
## 4 npm run version:deploy
|
|
14
|
-
|
|
15
|
-
### deploy version
|
|
16
|
-
|
|
17
|
-
## Client side
|
|
18
|
-
|
|
19
|
-
update package command <br />
|
|
20
|
-
npm update turf-comman
|
|
1
|
+
## 1 npm init -y
|
|
2
|
+
|
|
3
|
+
## 2 npm login
|
|
4
|
+
|
|
5
|
+
## 3 npm version patch
|
|
6
|
+
|
|
7
|
+
# //it increase version
|
|
8
|
+
|
|
9
|
+
## 3 npm publish --access public
|
|
10
|
+
|
|
11
|
+
# //npm publish by default --access public
|
|
12
|
+
|
|
13
|
+
## 4 npm run version:deploy
|
|
14
|
+
|
|
15
|
+
### deploy version
|
|
16
|
+
|
|
17
|
+
## Client side
|
|
18
|
+
|
|
19
|
+
update package command <br />
|
|
20
|
+
npm update turf-comman
|
package/build/jest.config.js
CHANGED
package/build/src/@model.d.ts
CHANGED
package/build/src/@model.js
CHANGED
|
@@ -23,3 +23,4 @@ __exportStar(require("./models/pricing-plan-model"), exports);
|
|
|
23
23
|
__exportStar(require("./models/subscribed-pricing-plan-model"), exports);
|
|
24
24
|
__exportStar(require("./models/entity"), exports);
|
|
25
25
|
__exportStar(require("./models/turf-availability-model"), exports);
|
|
26
|
+
__exportStar(require("./models/weekday-time-slot-model"), exports);
|
|
@@ -7,6 +7,9 @@ export declare enum BookingHistoryOperationType {
|
|
|
7
7
|
REFUND = "refund",
|
|
8
8
|
PAYMENT = "payment",
|
|
9
9
|
MERGED = "merged",
|
|
10
|
-
DELETE_SLOT_EVENT = "delete_slot_event"
|
|
10
|
+
DELETE_SLOT_EVENT = "delete_slot_event",
|
|
11
|
+
EXTENSION = "extension",
|
|
12
|
+
PAYMENT_WRITEOFF = "payment_writeoff",
|
|
13
|
+
EXTENSION_MERGED = "extension_merged"
|
|
11
14
|
}
|
|
12
15
|
export declare const OPERATION_TYPES: BookingHistoryOperationType[];
|
|
@@ -12,6 +12,9 @@ var BookingHistoryOperationType;
|
|
|
12
12
|
BookingHistoryOperationType["PAYMENT"] = "payment";
|
|
13
13
|
BookingHistoryOperationType["MERGED"] = "merged";
|
|
14
14
|
BookingHistoryOperationType["DELETE_SLOT_EVENT"] = "delete_slot_event";
|
|
15
|
+
BookingHistoryOperationType["EXTENSION"] = "extension";
|
|
16
|
+
BookingHistoryOperationType["PAYMENT_WRITEOFF"] = "payment_writeoff";
|
|
17
|
+
BookingHistoryOperationType["EXTENSION_MERGED"] = "extension_merged";
|
|
15
18
|
})(BookingHistoryOperationType || (exports.BookingHistoryOperationType = BookingHistoryOperationType = {}));
|
|
16
19
|
exports.OPERATION_TYPES = [
|
|
17
20
|
BookingHistoryOperationType.DELETE,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OrganizationStatus = void 0;
|
|
3
|
+
exports.AllowManualBookingDiscount = exports.OrganizationStatus = void 0;
|
|
4
4
|
var OrganizationStatus;
|
|
5
5
|
(function (OrganizationStatus) {
|
|
6
6
|
OrganizationStatus["REGISTRATION"] = "registration";
|
|
@@ -29,3 +29,8 @@ var OrganizationStatus;
|
|
|
29
29
|
}
|
|
30
30
|
OrganizationStatus.allowPermissionOwner = allowPermissionOwner;
|
|
31
31
|
})(OrganizationStatus || (exports.OrganizationStatus = OrganizationStatus = {}));
|
|
32
|
+
var AllowManualBookingDiscount;
|
|
33
|
+
(function (AllowManualBookingDiscount) {
|
|
34
|
+
AllowManualBookingDiscount["YES"] = "yes";
|
|
35
|
+
AllowManualBookingDiscount["NO"] = "no";
|
|
36
|
+
})(AllowManualBookingDiscount || (exports.AllowManualBookingDiscount = AllowManualBookingDiscount = {}));
|
|
@@ -3,5 +3,6 @@ export declare enum BookingPaymentTransactionType {
|
|
|
3
3
|
CUSTOMER_REFUND = "customer_refund",
|
|
4
4
|
CUSTOMER_REFUND_INPROCESS = "customer_refund_inprocess",
|
|
5
5
|
CUSTOMER_REFUND_REJECT = "customer_refund_reject",
|
|
6
|
-
CUSTOMER_CANCELLATION = "customer_cancellation"
|
|
6
|
+
CUSTOMER_CANCELLATION = "customer_cancellation",
|
|
7
|
+
PAYMENT_WRITEOFF = "payment_writeoff"
|
|
7
8
|
}
|
|
@@ -8,4 +8,5 @@ var BookingPaymentTransactionType;
|
|
|
8
8
|
BookingPaymentTransactionType["CUSTOMER_REFUND_INPROCESS"] = "customer_refund_inprocess";
|
|
9
9
|
BookingPaymentTransactionType["CUSTOMER_REFUND_REJECT"] = "customer_refund_reject";
|
|
10
10
|
BookingPaymentTransactionType["CUSTOMER_CANCELLATION"] = "customer_cancellation";
|
|
11
|
+
BookingPaymentTransactionType["PAYMENT_WRITEOFF"] = "payment_writeoff";
|
|
11
12
|
})(BookingPaymentTransactionType || (exports.BookingPaymentTransactionType = BookingPaymentTransactionType = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface BookingPendingPaymentWriteoffRequest {
|
|
2
|
+
bookingDetailIds: number[];
|
|
3
|
+
totalWriteoffAmount: number;
|
|
4
|
+
remark: string;
|
|
5
|
+
}
|
|
6
|
+
export interface BookingPendingPaymentWriteoffResponse {
|
|
7
|
+
bookingDetailIds: number[];
|
|
8
|
+
totalWriteoffAmount: number;
|
|
9
|
+
remark: string;
|
|
10
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PaymentMode, BookingDetailsStatus } from "../../@enum";
|
|
2
|
-
import { IBookingDetailsEntity, IGetAvailabilityByTurf, IModifyEntity } from "../../@type";
|
|
2
|
+
import { IBookingDetailsEntity, IGetAvailabilityByTurf, IGetAvailabilityByTurfRequest, IModifyEntity } from "../../@type";
|
|
3
3
|
export interface ICreateRecurringSlotBookingResponse extends IModifyEntity<IBookingDetailsEntity> {
|
|
4
4
|
}
|
|
5
5
|
export interface ICreateRecurringSlotsBookingDetailsRequest {
|
|
@@ -18,7 +18,9 @@ export interface ICreateRecurringSlotsBookingDetailsRequest {
|
|
|
18
18
|
slot: IRecurringSlot[];
|
|
19
19
|
turf_slot?: {
|
|
20
20
|
availability_details: IGetAvailabilityByTurf;
|
|
21
|
+
apiRequestModel?: IGetAvailabilityByTurfRequest;
|
|
21
22
|
};
|
|
23
|
+
deleteIntermediateBookings: boolean;
|
|
22
24
|
}
|
|
23
25
|
export declare class IRecurringSlot {
|
|
24
26
|
fromDate: number;
|
|
@@ -26,4 +28,5 @@ export declare class IRecurringSlot {
|
|
|
26
28
|
weekdays: number[];
|
|
27
29
|
from: string;
|
|
28
30
|
to: string;
|
|
31
|
+
pitchNo: number;
|
|
29
32
|
}
|
|
@@ -8,7 +8,7 @@ export interface IGetCollectionResponse {
|
|
|
8
8
|
}>;
|
|
9
9
|
};
|
|
10
10
|
users: {
|
|
11
|
-
[key: number]: Pick<IUserEntity, "id" | "
|
|
11
|
+
[key: number]: Pick<IUserEntity, "id" | "name" | "phone" | "email" | "type">;
|
|
12
12
|
};
|
|
13
13
|
total: IDateWisePaymentHistoryData;
|
|
14
14
|
payments: Modify<IBookingPaymentHistoryEntity, {
|
|
@@ -76,3 +76,6 @@ export * from "../api/update-sports-interface";
|
|
|
76
76
|
export * from "./get-availability-by-turf.interface";
|
|
77
77
|
export * from "./get-tournament.interface";
|
|
78
78
|
export * from "./get-booking-history.interface";
|
|
79
|
+
export * from "./booking-pending-payment-writeoff.interface";
|
|
80
|
+
export * from "./get-organization-configuration.interface";
|
|
81
|
+
export * from "./update-organization-configuration.interface";
|
|
@@ -94,3 +94,6 @@ __exportStar(require("../api/update-sports-interface"), exports);
|
|
|
94
94
|
__exportStar(require("./get-availability-by-turf.interface"), exports);
|
|
95
95
|
__exportStar(require("./get-tournament.interface"), exports);
|
|
96
96
|
__exportStar(require("./get-booking-history.interface"), exports);
|
|
97
|
+
__exportStar(require("./booking-pending-payment-writeoff.interface"), exports);
|
|
98
|
+
__exportStar(require("./get-organization-configuration.interface"), exports);
|
|
99
|
+
__exportStar(require("./update-organization-configuration.interface"), exports);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { IOrganizationConfig } from "../entity";
|
|
1
2
|
export interface ILoginResponse {
|
|
2
3
|
UIMessage: string;
|
|
3
4
|
tokenType: string;
|
|
4
5
|
accessToken: string;
|
|
5
6
|
id: string;
|
|
6
|
-
|
|
7
|
+
name: string;
|
|
7
8
|
status: string;
|
|
8
9
|
requireNewPassword: boolean;
|
|
9
10
|
userId: number;
|
|
@@ -15,6 +16,8 @@ export interface ILoginResponse {
|
|
|
15
16
|
organizationId: number;
|
|
16
17
|
subscriptionStatus: string | null;
|
|
17
18
|
contact: string;
|
|
19
|
+
orgConfig: IOrganizationConfig;
|
|
20
|
+
registrationFlowVersion?: number | null;
|
|
18
21
|
}
|
|
19
22
|
export interface ILoginRequest {
|
|
20
23
|
username: string;
|
|
@@ -12,6 +12,7 @@ export interface ICreateOneSlotBookingDetailsRequest {
|
|
|
12
12
|
discountedCost: number;
|
|
13
13
|
amountPaid: number;
|
|
14
14
|
pitchId: number;
|
|
15
|
+
pitchIds?: number[];
|
|
15
16
|
status: BookingDetailsStatus;
|
|
16
17
|
sport: string;
|
|
17
18
|
remarks?: string | null;
|
|
@@ -21,4 +22,5 @@ export interface ICreateOneSlot {
|
|
|
21
22
|
date: number;
|
|
22
23
|
from: string;
|
|
23
24
|
to: string;
|
|
25
|
+
pitchNo: number;
|
|
24
26
|
}
|
|
@@ -34,6 +34,7 @@ export interface IUpdateRecurringBookingResponse extends IModifyEntity<IBookingD
|
|
|
34
34
|
discountPolicy?: string;
|
|
35
35
|
delete_slot?: IDeleteBookingByCodesDto;
|
|
36
36
|
update_slot?: IUpdateBookingByCodesDto;
|
|
37
|
+
extension_booking_codes?: string[];
|
|
37
38
|
}
|
|
38
39
|
export interface IUpdateRecurringSlotBookingDetailsRequest {
|
|
39
40
|
customerName?: string;
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
import { OrganizationType } from "../../@enum";
|
|
2
|
-
import { OrganizationStatus } from "../../enums/organization-status.enum";
|
|
1
|
+
import { ModificationDiscountPolicy, OrganizationType } from "../../@enum";
|
|
2
|
+
import { AllowManualBookingDiscount, OrganizationStatus } from "../../enums/organization-status.enum";
|
|
3
3
|
import { ICouponEntity } from "./coupon.entity.interface";
|
|
4
4
|
import { IEntityAuditColumn } from "./entity-audit-column.interface";
|
|
5
5
|
import { ITurfEntity } from "./turf-entity.interface";
|
|
6
|
-
export interface
|
|
6
|
+
export interface IOrganizationConfig {
|
|
7
|
+
allowManualBookingDiscount: AllowManualBookingDiscount;
|
|
8
|
+
bookingCreationDelay: number;
|
|
9
|
+
bookingModificationDelay: number;
|
|
10
|
+
bookingCancellationDelay: number;
|
|
11
|
+
modificationDiscountPolicy: ModificationDiscountPolicy;
|
|
12
|
+
}
|
|
13
|
+
export interface IOrganizationEntity extends IEntityAuditColumn, IOrganizationEntityRel, IOrganizationConfig {
|
|
7
14
|
id: number;
|
|
8
15
|
name: string;
|
|
9
16
|
email: string | null;
|
|
@@ -17,6 +24,11 @@ export interface IOrganizationEntity extends IEntityAuditColumn, IOrganizationEn
|
|
|
17
24
|
deed_file_path: string | null;
|
|
18
25
|
status: OrganizationStatus;
|
|
19
26
|
registrationId: number;
|
|
27
|
+
allowManualBookingDiscount: AllowManualBookingDiscount;
|
|
28
|
+
bookingCreationDelay: number;
|
|
29
|
+
bookingModificationDelay: number;
|
|
30
|
+
bookingCancellationDelay: number;
|
|
31
|
+
modificationDiscountPolicy: ModificationDiscountPolicy;
|
|
20
32
|
}
|
|
21
33
|
export interface IOrganizationEntityRel {
|
|
22
34
|
turfs: ITurfEntity[];
|
|
@@ -4,16 +4,16 @@ import { UserType } from "../../enums/valid-type.enum";
|
|
|
4
4
|
import { ITurfEntity } from "./turf-entity.interface";
|
|
5
5
|
export interface IUserEntity extends IEntityAuditColumn, IUserEntityRel {
|
|
6
6
|
id: number;
|
|
7
|
-
|
|
7
|
+
name: string;
|
|
8
8
|
phone: string;
|
|
9
9
|
password: string;
|
|
10
10
|
email: string;
|
|
11
11
|
status: UserStatus;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
isEmailVerified: boolean;
|
|
13
|
+
isMobileVerified: boolean;
|
|
14
|
+
isAccountVerified: boolean;
|
|
15
|
+
requireNewPassword: boolean;
|
|
16
|
+
organizationId: number;
|
|
17
17
|
type: UserType;
|
|
18
18
|
registrationId: number;
|
|
19
19
|
comments: string | null;
|
|
@@ -10,12 +10,12 @@ export interface IGetBookingById extends Omit<IBookingDetailsEntity, "createdBy"
|
|
|
10
10
|
discountedCost: number;
|
|
11
11
|
amountPaid: number;
|
|
12
12
|
createdBy: {
|
|
13
|
-
|
|
13
|
+
name: string;
|
|
14
14
|
type: UserType;
|
|
15
15
|
id: number;
|
|
16
16
|
};
|
|
17
17
|
updatedBy: {
|
|
18
|
-
|
|
18
|
+
name: string;
|
|
19
19
|
type: UserType;
|
|
20
20
|
id: number;
|
|
21
21
|
};
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
+
import { WeekdayTimeSlot } from "../../@model";
|
|
1
2
|
import { ChargesModel } from "../../models/charge-model";
|
|
2
3
|
import { IBookingDetailsEntity } from "../entity/booking-details-entity.interface";
|
|
4
|
+
export interface IEventBookingDetails {
|
|
5
|
+
startDateCode: number;
|
|
6
|
+
endDateCode: number;
|
|
7
|
+
weekdaySlots: WeekdayTimeSlot[];
|
|
8
|
+
pitchIds: number[];
|
|
9
|
+
}
|
|
3
10
|
export interface IBookingDetailsModel extends IBookingDetailsEntity {
|
|
4
11
|
assignCharges(chargeModel: ChargesModel): void;
|
|
12
|
+
getEventDetails(): IEventBookingDetails;
|
|
5
13
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { IUserEntity } from "./entity";
|
|
2
|
-
export interface IUserEntityEssentialInfo extends Pick<IUserEntity, "id" | "
|
|
2
|
+
export interface IUserEntityEssentialInfo extends Pick<IUserEntity, "id" | "name" | "phone" | "email" | "type"> {
|
|
3
3
|
}
|
|
@@ -20,7 +20,7 @@ export declare class BookingCode {
|
|
|
20
20
|
getHalfHourTimeCodes(): string[];
|
|
21
21
|
/**
|
|
22
22
|
*
|
|
23
|
-
* @returns
|
|
23
|
+
* @returns ['00000030','00300100','01000130']: string[] - List of half hour time slot codes between start time & end time inclusive
|
|
24
24
|
* @example fromTime: 0000; toTime: 0130
|
|
25
25
|
* // returns ['00000030','00300100','01000130']
|
|
26
26
|
*/
|
|
@@ -30,7 +30,18 @@ export declare class BookingCode {
|
|
|
30
30
|
getWeekday(): number;
|
|
31
31
|
getMonthCode(): string;
|
|
32
32
|
getDateWithFromTimeCode(): string;
|
|
33
|
+
getDateWithToTimeCode(): string;
|
|
33
34
|
getCodeWithoutTurfCode(): string;
|
|
35
|
+
getPriceByPriceEntities(priceEntities?: {
|
|
36
|
+
[date: string]: {
|
|
37
|
+
[time: string]: number;
|
|
38
|
+
};
|
|
39
|
+
}): number;
|
|
40
|
+
getToDate(): Date;
|
|
41
|
+
isAcrossDate(): boolean;
|
|
42
|
+
isModificationAllowed(delayInMinutes?: number): boolean;
|
|
43
|
+
isDeletionAllowed(delayInMinutes?: number): boolean;
|
|
44
|
+
isCreationAllowed(delayInMinutes?: number): boolean;
|
|
34
45
|
static sortByCode(bookingCodes: BookingCode[]): void;
|
|
35
46
|
static getOneSlotBookingCode(turfId: string, bookingDate: string, fhfm: string, thtm: string, pitchCode: string): string;
|
|
36
47
|
static getDiscountedCost(couponCode: string, totalCost: number, validationApply?: boolean, totalBookingHours?: number): number;
|
|
@@ -40,12 +51,13 @@ export declare class BookingCode {
|
|
|
40
51
|
static getWeekday(dateCode: number): number;
|
|
41
52
|
static convertToDate(str: string): Date;
|
|
42
53
|
static previousDateChecker(fromDate: number, index: number, errorKey?: string): void;
|
|
43
|
-
static previousTimeChecker(fromTime: string, fromDate: number, index: number): void;
|
|
54
|
+
static previousTimeChecker(fromTime: string, fromDate: number, index: number, bookingDelayInMinutes?: number, date?: Date): void;
|
|
44
55
|
static getDateCodesByWeek(fromDate: number, toDate: number, selectedWeekday: number): string[];
|
|
45
56
|
static getDatesByWeek(fromDate: number, toDate: number, selectedWeekday: number): Date[];
|
|
46
57
|
static isValidTimeRange(timeSlot: string): boolean;
|
|
47
58
|
static dateFormat(dates: Array<Date>): Array<string>;
|
|
48
59
|
static getDateCode(date: Date): string;
|
|
60
|
+
static getMonthCode(date: Date): number;
|
|
49
61
|
/**
|
|
50
62
|
* Returns list of month codes (YYMM) in the Date range inclusive
|
|
51
63
|
* @param {Date} from - Start Date
|
|
@@ -136,4 +148,6 @@ export declare class BookingCode {
|
|
|
136
148
|
* Additionally, the pitch number and turf ID must match between the two codes.
|
|
137
149
|
*/
|
|
138
150
|
isAdjacentBookingCode(nextBookingCode: BookingCode): boolean;
|
|
151
|
+
static getInstanceByComponents(turfId: number, pitchCode: number, dateCode: number, fromTimeCode: string, toTimeCode: string, priceCsv: string): BookingCode;
|
|
152
|
+
isTimeSlotContinuous(that: BookingCode): boolean;
|
|
139
153
|
}
|