turf-common 1.0.16-beta.27 → 1.0.16-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.
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PricingPlanModel = void 0;
4
- var common_1 = require("@nestjs/common");
5
4
  var pitch_slab_model_1 = require("./pitch-slab-model");
6
5
  var billing_cycle_model_1 = require("./billing-cycle-model");
6
+ var app_badrequest_exception_1 = require("../exceptions/app-badrequest.exception");
7
7
  var PricingPlanModel = /** @class */ (function () {
8
8
  function PricingPlanModel(data) {
9
9
  var _this = this;
@@ -49,7 +49,7 @@ var PricingPlanModel = /** @class */ (function () {
49
49
  };
50
50
  PricingPlanModel.prototype.validateBillingCycleKey = function (billingCycleKey) {
51
51
  if (!this.getBillingCycleKeys().includes(billingCycleKey)) {
52
- throw new common_1.BadRequestException({
52
+ throw new app_badrequest_exception_1.AppBadRequestException({
53
53
  key: "type",
54
54
  message: ["pricing plan type:'".concat(billingCycleKey, "' is not found")],
55
55
  });
@@ -1,7 +1,7 @@
1
1
  import { IPitchStatus } from "../enums/pitch-status.enum";
2
2
  import { ITurf } from "../interface/get-turf-entity.interface";
3
3
  import { ITurfModel } from "../interface/turf-model.interface";
4
- import { IOrganizationEntity, IOrganizationRel } from "../types/entity/organization-entity.type";
4
+ import { IOrganizationEntity, IOrganizationEntityRel } from "../types/entity/organization-entity.type";
5
5
  import { IPitchEntity } from "../types/entity/pitch-entity.type";
6
6
  import { ISubscriptionPitchMappingEntity } from "../types/entity/subscription-pitch-mapping.type";
7
7
  import { ITurfEntity, ITurfEntityRel } from "../types/entity/turf-entity.type";
@@ -18,7 +18,7 @@ export declare class TurfModel implements ITurfModel {
18
18
  createdBy: number;
19
19
  updatedBy: number;
20
20
  pitches: IPitchEntity[];
21
- organization: IOrganizationEntity & IOrganizationRel;
21
+ organization: IOrganizationEntity & IOrganizationEntityRel;
22
22
  Users: IUserEntityRel[];
23
23
  constructor(data: ITurfEntity);
24
24
  getPitchStatusCount(): IPitchStatus;
@@ -1,5 +1,5 @@
1
1
  import { IEntityAuditColumn } from "./entity-audit-column.type";
2
- export type IBankDetailsEntity = IEntityAuditColumn & {
2
+ export interface IBankDetailsEntity extends IEntityAuditColumn {
3
3
  id: number;
4
4
  bankName: string;
5
5
  accountNo: string;
@@ -9,4 +9,4 @@ export type IBankDetailsEntity = IEntityAuditColumn & {
9
9
  bankAddress: string;
10
10
  branch: string;
11
11
  accountName: string;
12
- };
12
+ }
@@ -1,7 +1,7 @@
1
1
  import { IEntityAuditColumn } from "./entity-audit-column.type";
2
2
  import { BookingHistoryOperationType } from "../../enums/booking-history-operation-type.enum";
3
3
  import { PaymentMode } from "../../enums/payment-mode.enum";
4
- export type IBookingCancellationEntity = IEntityAuditColumn & {
4
+ export interface IBookingCancellationEntity extends IEntityAuditColumn {
5
5
  id: number;
6
6
  bookingDetailsId: number;
7
7
  turfId: number;
@@ -29,4 +29,4 @@ export type IBookingCancellationEntity = IEntityAuditColumn & {
29
29
  netTotal: number;
30
30
  amountPayable: number;
31
31
  refundPayable: number;
32
- };
32
+ }
@@ -1,8 +1,8 @@
1
1
  import { IEntityAuditColumn } from "./entity-audit-column.type";
2
- export type IBookingCustomerEntity = IEntityAuditColumn & {
2
+ export interface IBookingCustomerEntity extends IEntityAuditColumn {
3
3
  contactNo: string;
4
4
  turfId: number;
5
5
  name: string;
6
6
  email: string;
7
7
  pitchNo: number;
8
- };
8
+ }
@@ -1,6 +1,6 @@
1
1
  import { IEntityAuditColumn } from "./entity-audit-column.type";
2
2
  import { BookingDetailsStatus } from "../../enums/booking-details-status.enum";
3
- export type IBookingDetailsEntity = IEntityAuditColumn & {
3
+ export interface IBookingDetailsEntity extends IEntityAuditColumn {
4
4
  id: number;
5
5
  turfId: number;
6
6
  pitchId: number;
@@ -24,4 +24,4 @@ export type IBookingDetailsEntity = IEntityAuditColumn & {
24
24
  amountPayable: number;
25
25
  refundPayable: number;
26
26
  totalRefundedAmount: number;
27
- };
27
+ }
@@ -1,6 +1,6 @@
1
1
  import { IEntityAuditColumn } from "./entity-audit-column.type";
2
- export type IBookingsEntity = IEntityAuditColumn & {
2
+ export interface IBookingsEntity extends IEntityAuditColumn {
3
3
  bookingDetailsId: number;
4
4
  code: string;
5
5
  cost: string;
6
- };
6
+ }
@@ -1,8 +1,8 @@
1
1
  import { IEntityAuditColumn } from "./entity-audit-column.type";
2
- export type ICancellationPolicyEntity = IEntityAuditColumn & {
2
+ export interface ICancellationPolicyEntity extends IEntityAuditColumn {
3
3
  id: number;
4
4
  turfId: number;
5
5
  from: number;
6
6
  to: number;
7
7
  charges: string;
8
- };
8
+ }
@@ -1,10 +1,10 @@
1
1
  import { IEntityAuditColumn } from "./entity-audit-column.type";
2
- import { IOrganizationRel } from "./organization-entity.type";
3
- export type ICouponEntity = IEntityAuditColumn & {
2
+ import { IOrganizationEntityRel } from "./organization-entity.type";
3
+ export interface ICouponEntity extends IEntityAuditColumn {
4
4
  id: number;
5
5
  code: string;
6
6
  org_id: number;
7
- };
8
- export type ICouponEntityRel = ICouponEntity & {
9
- organization: IOrganizationRel;
10
- };
7
+ }
8
+ export interface ICouponEntityRel extends ICouponEntity {
9
+ organization: IOrganizationEntityRel;
10
+ }
@@ -1,9 +1,9 @@
1
- export type IEntityAuditColumn = {
1
+ export interface IEntityAuditColumn {
2
2
  createdOn: Date;
3
3
  updatedOn: Date;
4
4
  createdBy: number;
5
5
  updatedBy: number;
6
- };
6
+ }
7
7
  export declare class EntityAuditColumnModel implements IEntityAuditColumn {
8
8
  createdOn: Date;
9
9
  updatedOn: Date;
@@ -1,10 +1,10 @@
1
1
  import { FaqsStatus } from "../../enums/faqs-status.enum";
2
2
  import { IEntityAuditColumn } from "./entity-audit-column.type";
3
- export type IFaqsEntity = IEntityAuditColumn & {
3
+ export interface IFaqsEntity extends IEntityAuditColumn {
4
4
  id: number;
5
5
  index: number;
6
6
  status: FaqsStatus;
7
7
  module: string;
8
8
  question: string;
9
9
  steps: string;
10
- };
10
+ }
@@ -2,7 +2,7 @@ import { OrganizationStatus } from "../../enums/organization-status.enum";
2
2
  import { ICouponEntityRel } from "./coupon.entity.type";
3
3
  import { IEntityAuditColumn } from "./entity-audit-column.type";
4
4
  import { ITurfEntityRel } from "./turf-entity.type";
5
- export type IOrganizationEntity = IEntityAuditColumn & {
5
+ export interface IOrganizationEntity extends IEntityAuditColumn {
6
6
  id: number;
7
7
  name: string;
8
8
  email: string;
@@ -16,8 +16,8 @@ export type IOrganizationEntity = IEntityAuditColumn & {
16
16
  deed_file_path: string;
17
17
  status: OrganizationStatus;
18
18
  registrationId: number;
19
- };
20
- export type IOrganizationRel = IOrganizationEntity & {
19
+ }
20
+ export interface IOrganizationEntityRel extends IOrganizationEntity {
21
21
  turfs: ITurfEntityRel[];
22
22
  coupon: ICouponEntityRel[];
23
- };
23
+ }
@@ -1,9 +1,9 @@
1
1
  import { IEntityAuditColumn } from "./entity-audit-column.type";
2
2
  import { ITurfEntityRel } from "./turf-entity.type";
3
- export type IPitchEntity = IEntityAuditColumn & {
3
+ export interface IPitchEntity extends IEntityAuditColumn {
4
4
  turf: ITurfEntityRel;
5
5
  number: number;
6
6
  name: string;
7
7
  status: string;
8
8
  sports: string;
9
- };
9
+ }
@@ -1,5 +1,5 @@
1
1
  import { IEntityAuditColumn } from "./entity-audit-column.type";
2
- export type IPriceEntity = IEntityAuditColumn & {
2
+ export interface IPriceEntity extends IEntityAuditColumn {
3
3
  id: string;
4
4
  price: number;
5
- };
5
+ }
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ ;
@@ -1,6 +1,6 @@
1
1
  import { IEntityAuditColumn } from "./entity-audit-column.type";
2
2
  import { PricingPlanStatus } from "../../enums/pricing-plan-status.enum copy";
3
- export type IPricingPlanEntity = IEntityAuditColumn & {
3
+ export interface IPricingPlanEntity extends IEntityAuditColumn {
4
4
  id: number;
5
5
  effectiveFrom: Date;
6
6
  effectiveTo: Date;
@@ -13,4 +13,4 @@ export type IPricingPlanEntity = IEntityAuditColumn & {
13
13
  basePrice: number;
14
14
  billingCycle: string;
15
15
  unit: string;
16
- };
16
+ }
@@ -1,6 +1,6 @@
1
1
  import { RegistrationStatus } from "../../enums/registration-status-enum";
2
2
  import { IEntityAuditColumn } from "./entity-audit-column.type";
3
- export type IRegistrationEntity = IEntityAuditColumn & {
3
+ export interface IRegistrationEntity extends IEntityAuditColumn {
4
4
  id: number;
5
5
  name: string;
6
6
  contact: string;
@@ -9,4 +9,4 @@ export type IRegistrationEntity = IEntityAuditColumn & {
9
9
  status: RegistrationStatus;
10
10
  comments: string;
11
11
  token: string;
12
- };
12
+ }
@@ -1,6 +1,6 @@
1
1
  import { SubscriptionStatus } from "../../interface/subscription-status.interface";
2
2
  import { IEntityAuditColumn } from "./entity-audit-column.type";
3
- export type ISubscriptionEntity = IEntityAuditColumn & {
3
+ export interface ISubscriptionEntity extends IEntityAuditColumn {
4
4
  id: number;
5
5
  organizationId: number;
6
6
  from: Date;
@@ -16,5 +16,5 @@ export type ISubscriptionEntity = IEntityAuditColumn & {
16
16
  registrationId: number;
17
17
  pricingPlanId: number;
18
18
  previousSubscriptionIds: string;
19
- };
19
+ }
20
20
  export type ISubscriptionModel = ISubscriptionEntity;
@@ -1,7 +1,7 @@
1
- export type ISubscriptionPitchMappingEntity = {
1
+ export interface ISubscriptionPitchMappingEntity {
2
2
  pitchId: number;
3
3
  turfId: number;
4
4
  subscriptionId: number;
5
5
  status: string;
6
6
  organizationId: number;
7
- };
7
+ }
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ ;
@@ -1,15 +1,15 @@
1
1
  import { IEntityAuditColumn } from "./entity-audit-column.type";
2
- import { IOrganizationRel as IOrganizationEntityRel } from "./organization-entity.type";
2
+ import { IOrganizationEntityRel as IOrganizationEntityRel } from "./organization-entity.type";
3
3
  import { IPitchEntity } from "./pitch-entity.type";
4
4
  import { IUserEntityRel } from "./user-entity.type";
5
- export type ITurfEntity = IEntityAuditColumn & {
5
+ export interface ITurfEntity extends IEntityAuditColumn {
6
6
  id: number;
7
7
  turfName: string;
8
8
  numberOfPitches: number;
9
9
  address: string;
10
10
  org_id: number;
11
11
  adhocRefund: boolean;
12
- };
12
+ }
13
13
  export type ITurfEntityRel = ITurfEntity & {
14
14
  pitches: IPitchEntity[];
15
15
  organization: IOrganizationEntityRel;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "turf-common",
3
- "version": "1.0.16-beta.27",
3
+ "version": "1.0.16-beta.28",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",