turf-common 1.0.18-beta.3 → 1.0.18-beta.4

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.
@@ -0,0 +1,5 @@
1
+ export declare enum BookingFetchFilter {
2
+ PENDING_PAYMENT = "pending_payment",
3
+ PENDING_REFUND = "pending_refund",
4
+ FULL_REFUND = "full_refund"
5
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BookingFetchFilter = void 0;
4
+ var BookingFetchFilter;
5
+ (function (BookingFetchFilter) {
6
+ BookingFetchFilter["PENDING_PAYMENT"] = "pending_payment";
7
+ BookingFetchFilter["PENDING_REFUND"] = "pending_refund";
8
+ BookingFetchFilter["FULL_REFUND"] = "full_refund";
9
+ })(BookingFetchFilter || (exports.BookingFetchFilter = BookingFetchFilter = {}));
@@ -26,3 +26,14 @@ export interface IBookingByPitches {
26
26
  to: string;
27
27
  pitch: number[];
28
28
  }
29
+ export interface IBookingAvailabilityByPitchRequest {
30
+ slot: IBookingAvailabilitySlotRequest[];
31
+ bookingCode?: string;
32
+ }
33
+ export interface IBookingAvailabilitySlotRequest {
34
+ fromDate: number;
35
+ toDate: number;
36
+ weekdays: number[];
37
+ from: string;
38
+ to: string;
39
+ }
@@ -4,3 +4,14 @@ export interface ICancellationCharges {
4
4
  cancellationUnit: string;
5
5
  };
6
6
  }
7
+ export interface ICancellationChargesDtoRequest {
8
+ data?: {
9
+ [key: string]: string;
10
+ };
11
+ new_slot?: ICancellationChargesSlot;
12
+ }
13
+ export interface ICancellationChargesSlot {
14
+ date: number;
15
+ from: string;
16
+ to: string;
17
+ }
@@ -1,3 +1,12 @@
1
- import { ICancellationPolicyEntity } from '../../@type';
1
+ import { ICancellationPolicyEntity } from "../../@type";
2
2
  export interface ICreateCancellationPolicy extends Array<ICancellationPolicyEntity> {
3
3
  }
4
+ export interface ICreateCancellationPolicyDtoRequest {
5
+ adhocRefund: boolean;
6
+ cancellationPolicy?: ICancellationPolicyDetailsRequest[];
7
+ }
8
+ export interface ICancellationPolicyDetailsRequest {
9
+ from: number;
10
+ to: number;
11
+ charges: string;
12
+ }
@@ -1,3 +1,26 @@
1
- import { IBookingDetailsEntity } from '../../@type';
1
+ import { PaymentMode, BookingDetailsStatus } from "../../@enum";
2
+ import { IBookingDetailsEntity } from "../../@type";
2
3
  export interface ICreateRecurringSlotBooking extends IBookingDetailsEntity {
3
4
  }
5
+ export interface ICreateRecurringSlotsBookingDetailsResponse {
6
+ customerName: string;
7
+ contact: number;
8
+ email?: string | null;
9
+ paymentMode: PaymentMode;
10
+ couponCode?: string;
11
+ totalCost: number;
12
+ discountedCost: number;
13
+ amountPaid: number;
14
+ pitchId: number;
15
+ status: BookingDetailsStatus;
16
+ sport: string;
17
+ remarks?: string | null;
18
+ slot: IRecurringSlot[];
19
+ }
20
+ export declare class IRecurringSlot {
21
+ fromDate: number;
22
+ toDate: number;
23
+ weekdays: number[];
24
+ from: string;
25
+ to: string;
26
+ }
@@ -1,6 +1,7 @@
1
1
  import { ITurf } from "../../@type";
2
2
  import { IBookingDetailsWithBooking } from "../../types/bookingdetails-with-booking.type";
3
3
  import { UserType } from "../../enums/valid-type.enum";
4
+ import { BookingFetchFilter } from "../../enums/booking-fetch-filter.enum";
4
5
  export interface IGetBookingsByOrganizationId {
5
6
  turfs: {
6
7
  [turfId: number]: ITurf;
@@ -17,3 +18,6 @@ export interface IGetBookingsByOrganizationId {
17
18
  };
18
19
  };
19
20
  }
21
+ export interface IGetBookingsByOrganizationIdRequest {
22
+ fetch: BookingFetchFilter[];
23
+ }
@@ -0,0 +1,10 @@
1
+ export type IGetPriceEntity = {
2
+ [date: string]: {
3
+ [time: string]: number;
4
+ };
5
+ };
6
+ export interface IGetPriceEntityRequest {
7
+ turfId: number;
8
+ weekdays: number[];
9
+ months: number[];
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,4 @@
1
+ import { ISetPriceRequest } from "./set-price.interface";
1
2
  export interface IGetPriceQuery {
2
3
  [turfId: string]: {
3
4
  [code: string]: {
@@ -5,3 +6,5 @@ export interface IGetPriceQuery {
5
6
  };
6
7
  };
7
8
  }
9
+ export interface IGetPriceQueryRequest extends ISetPriceRequest {
10
+ }
@@ -27,7 +27,7 @@ export * from "./get-cron-job-by-date-range-name-status.interface";
27
27
  export * from "./get-current-subscription.interface";
28
28
  export * from "./get-organization-by-orgid.interface";
29
29
  export * from "./get-price-by-organization-response.interface";
30
- export * from "./get-price-entity.types";
30
+ export * from "./get-price-entity.interface";
31
31
  export * from "./get-price-query.interface";
32
32
  export * from "./get-pricing-plan-by-date-response.interface";
33
33
  export * from "./get-pricing-plan-by-id.interface";
@@ -63,3 +63,4 @@ export * from "./delete-booking-by-codes-response.interface";
63
63
  export * from "./update-booking-by-code-response.interface";
64
64
  export * from "./login-response.interface";
65
65
  export * from "./create-turf.interface";
66
+ export * from "./set-price.interface";
@@ -43,7 +43,7 @@ __exportStar(require("./get-cron-job-by-date-range-name-status.interface"), expo
43
43
  __exportStar(require("./get-current-subscription.interface"), exports);
44
44
  __exportStar(require("./get-organization-by-orgid.interface"), exports);
45
45
  __exportStar(require("./get-price-by-organization-response.interface"), exports);
46
- __exportStar(require("./get-price-entity.types"), exports);
46
+ __exportStar(require("./get-price-entity.interface"), exports);
47
47
  __exportStar(require("./get-price-query.interface"), exports);
48
48
  __exportStar(require("./get-pricing-plan-by-date-response.interface"), exports);
49
49
  __exportStar(require("./get-pricing-plan-by-id.interface"), exports);
@@ -81,3 +81,4 @@ __exportStar(require("./delete-booking-by-codes-response.interface"), exports);
81
81
  __exportStar(require("./update-booking-by-code-response.interface"), exports);
82
82
  __exportStar(require("./login-response.interface"), exports);
83
83
  __exportStar(require("./create-turf.interface"), exports);
84
+ __exportStar(require("./set-price.interface"), exports);
@@ -1,3 +1,24 @@
1
+ import { PaymentMode, BookingDetailsStatus } from "../../@enum";
1
2
  import { IBookingDetailsEntity } from "../../@type";
2
3
  export interface IOneSlotBooking extends IBookingDetailsEntity {
3
4
  }
5
+ export interface ICreateOneSlotBookingDetailsRequest {
6
+ customerName: string;
7
+ contact: number;
8
+ email?: string | null;
9
+ paymentMode: PaymentMode;
10
+ couponCode: string;
11
+ totalCost?: number;
12
+ discountedCost: number;
13
+ amountPaid: number;
14
+ pitchId: number;
15
+ status: BookingDetailsStatus;
16
+ sport: string;
17
+ remarks?: string | null;
18
+ slot: ICreateOneSlot[];
19
+ }
20
+ export interface ICreateOneSlot {
21
+ date: number;
22
+ from: string;
23
+ to: string;
24
+ }
@@ -0,0 +1,6 @@
1
+ export interface ISetPriceRequest {
2
+ from: string;
3
+ to: string;
4
+ monthWeekDays: number[];
5
+ price: number;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -5,5 +5,5 @@ export interface IUpdateConfiguration extends Array<IConfigurationsEntity> {
5
5
  export interface IUpdateConfigurationRequest {
6
6
  key: ConfigurationKey;
7
7
  value: string;
8
- description: string;
8
+ description?: string;
9
9
  }
@@ -1,4 +1,4 @@
1
- import { BookingDetailsStatus } from "../../@enum";
1
+ import { BookingDetailsStatus, PaymentMode } from "../../@enum";
2
2
  import { IBookingDetailsEntity } from "../../@type";
3
3
  import { IDeleteBookingByCodesDto } from "../dto/delete-booking-by-codes-dto.interface";
4
4
  import { IUpdateBookingByCodesDto } from "../dto/update-booking-by-code-dto.interface";
@@ -35,3 +35,18 @@ export interface IUpdateRecurringBooking extends IBookingDetailsEntity {
35
35
  delete_slot?: IDeleteBookingByCodesDto;
36
36
  update_slot?: IUpdateBookingByCodesDto;
37
37
  }
38
+ export interface IUpdateRecurringSlotBookingDetailsRequest {
39
+ customerName?: string;
40
+ contact?: number;
41
+ email?: string;
42
+ paymentMode?: PaymentMode;
43
+ couponCode?: string;
44
+ amountPaid?: number;
45
+ status?: BookingDetailsStatus;
46
+ advancePayment?: number;
47
+ refundedAmount?: number;
48
+ refundedMode?: PaymentMode;
49
+ delete_slot?: IDeleteBookingByCodesDto;
50
+ update_slot?: IUpdateBookingByCodesDto;
51
+ remarks?: string | null;
52
+ }
@@ -4,16 +4,16 @@ import { PitchSports } from "../../enums/pitch-sports.enum";
4
4
  export interface UpdateTurfTransactionOutput extends ITurfEntity {
5
5
  }
6
6
  export interface UpdateTurfDetailsRequest {
7
- turfName: string;
8
- pitches: IUpdatePitches[];
9
- address: string;
7
+ turfName?: string;
8
+ pitches?: IUpdatePitches[];
9
+ address?: string;
10
10
  }
11
11
  export interface IUpdatePitches {
12
- number: number;
13
- name: string;
14
- operations: PitchOperations;
15
- status: string;
16
- sports: IUpdateSports[];
12
+ number?: number;
13
+ name?: string;
14
+ operations?: PitchOperations;
15
+ status?: string;
16
+ sports?: IUpdateSports[];
17
17
  }
18
18
  export interface IUpdateSports {
19
19
  name: PitchSports;
@@ -5,11 +5,9 @@ export interface IUpdateBookingByCodesDto {
5
5
  refund_amount: number;
6
6
  refund_mode: PaymentMode;
7
7
  pitchId: number;
8
- slot: [
9
- {
10
- date: number;
11
- from: string;
12
- to: string;
13
- }
14
- ];
8
+ slot: {
9
+ date: number;
10
+ from: string;
11
+ to: string;
12
+ }[];
15
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "turf-common",
3
- "version": "1.0.18-beta.3",
3
+ "version": "1.0.18-beta.4",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",