turf-common 1.2.1-beta.26 → 1.2.1-beta.28

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/build/@enum.d.ts CHANGED
@@ -23,3 +23,4 @@ export * from "./enums/timezone.enum";
23
23
  export * from "./enums/bookings-status.enum";
24
24
  export * from "./enums/organization-type.enum";
25
25
  export * from "./enums/environment.enum";
26
+ export * from "./enums/availability-view.enum";
package/build/@enum.js CHANGED
@@ -39,3 +39,4 @@ __exportStar(require("./enums/timezone.enum"), exports);
39
39
  __exportStar(require("./enums/bookings-status.enum"), exports);
40
40
  __exportStar(require("./enums/organization-type.enum"), exports);
41
41
  __exportStar(require("./enums/environment.enum"), exports);
42
+ __exportStar(require("./enums/availability-view.enum"), exports);
@@ -0,0 +1,4 @@
1
+ export declare enum AvailabilityView {
2
+ NORMAL = "normal",
3
+ MERGED = "merged"
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AvailabilityView = void 0;
4
+ var AvailabilityView;
5
+ (function (AvailabilityView) {
6
+ AvailabilityView["NORMAL"] = "normal";
7
+ AvailabilityView["MERGED"] = "merged";
8
+ })(AvailabilityView || (exports.AvailabilityView = AvailabilityView = {}));
@@ -0,0 +1,26 @@
1
+ import { BookingDetailsStatus } from "../../@enum";
2
+ import { AvailabilityView } from "../../enums/availability-view.enum";
3
+ export interface IGetAvailabilityByTurfRequest {
4
+ dateRange: string;
5
+ timeRange?: string;
6
+ pitch: string;
7
+ view: AvailabilityView;
8
+ }
9
+ export interface IGetAvailabilityByTurf {
10
+ [dateCode: string]: IAvailabilityData;
11
+ }
12
+ export interface ITurfAvailabilityDetails {
13
+ [pitchId: string]: {
14
+ bookingId?: number;
15
+ status?: BookingDetailsStatus;
16
+ price: number;
17
+ priceSlot?: string;
18
+ };
19
+ }
20
+ export interface IAvailabilityData {
21
+ [timeSlot: string]: {
22
+ available: number[];
23
+ notavailable: number[];
24
+ details: ITurfAvailabilityDetails;
25
+ };
26
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -73,3 +73,4 @@ export * from "./get-cancelled-booking.interface";
73
73
  export * from "./get-sports.interface";
74
74
  export * from "../entity/sports-entity.interface";
75
75
  export * from "../api/update-sports-interface";
76
+ export * from "./get-availability-by-turf.interface";
@@ -91,3 +91,4 @@ __exportStar(require("./get-cancelled-booking.interface"), exports);
91
91
  __exportStar(require("./get-sports.interface"), exports);
92
92
  __exportStar(require("../entity/sports-entity.interface"), exports);
93
93
  __exportStar(require("../api/update-sports-interface"), exports);
94
+ __exportStar(require("./get-availability-by-turf.interface"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "turf-common",
3
- "version": "1.2.1-beta.26",
3
+ "version": "1.2.1-beta.28",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",