turf-common 1.0.14 → 1.0.16-beta.1

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 CHANGED
@@ -9,3 +9,12 @@
9
9
  ## 3 npm publish --access public
10
10
 
11
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
@@ -0,0 +1,12 @@
1
+ export declare enum PitchStatus {
2
+ ACTIVE = "active",
3
+ DELETE = "delete",
4
+ DEACTIVE = "deactive",
5
+ NEW = "new",
6
+ SETUP_INVALID = "setup_invalid",
7
+ PAYMENT_INVALID = "payment_invalid",
8
+ ACCOUNT_SUSPENDED = "account_suspended"
9
+ }
10
+ export type IPitchStatus = {
11
+ [key in PitchStatus]: number;
12
+ };
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PitchStatus = void 0;
4
+ var PitchStatus;
5
+ (function (PitchStatus) {
6
+ PitchStatus["ACTIVE"] = "active";
7
+ PitchStatus["DELETE"] = "delete";
8
+ PitchStatus["DEACTIVE"] = "deactive";
9
+ PitchStatus["NEW"] = "new";
10
+ PitchStatus["SETUP_INVALID"] = "setup_invalid";
11
+ PitchStatus["PAYMENT_INVALID"] = "payment_invalid";
12
+ PitchStatus["ACCOUNT_SUSPENDED"] = "account_suspended";
13
+ })(PitchStatus || (exports.PitchStatus = PitchStatus = {}));
@@ -1,7 +1,4 @@
1
1
  import { IAppBadRequestException } from "../types/app-badrequest-exception.type";
2
2
  export declare class AppBadRequestException extends Error {
3
- private _error;
4
- private key;
5
3
  constructor(appBadRequestException: IAppBadRequestException);
6
- get error(): string;
7
4
  }
@@ -21,17 +21,8 @@ var AppBadRequestException = /** @class */ (function (_super) {
21
21
  function AppBadRequestException(appBadRequestException) {
22
22
  var _this = _super.call(this) || this;
23
23
  _this.message = appBadRequestException.message.join(",");
24
- _this._error = appBadRequestException;
25
- _this.key = appBadRequestException.key;
26
24
  return _this;
27
25
  }
28
- Object.defineProperty(AppBadRequestException.prototype, "error", {
29
- get: function () {
30
- return this.key;
31
- },
32
- enumerable: false,
33
- configurable: true
34
- });
35
26
  return AppBadRequestException;
36
27
  }(Error));
37
28
  exports.AppBadRequestException = AppBadRequestException;
@@ -0,0 +1,27 @@
1
+ export interface ITurf {
2
+ id: number;
3
+ turfName: string;
4
+ numberOfPitches: number;
5
+ address: string;
6
+ createdOn: Date;
7
+ updatedOn: Date;
8
+ createdBy: number;
9
+ updatedBy: number;
10
+ org_id: number;
11
+ pitches: IPitch[];
12
+ }
13
+ export interface IPitch {
14
+ turf: number;
15
+ number: number;
16
+ name: string;
17
+ status: string;
18
+ sports: ISport[];
19
+ createdOn: Date;
20
+ updatedOn: Date;
21
+ createdBy: number;
22
+ updatedBy: number;
23
+ }
24
+ interface ISport {
25
+ name: string;
26
+ }
27
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ export type IEntityAuditColumn = {
2
+ createdOn: Date;
3
+ updatedOn: Date;
4
+ createdBy: number;
5
+ updatedBy: number;
6
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,19 @@
1
+ import { IPitchStatus } from "../../enums/pitch-status.enum";
2
+ import { ITurf } from "../../interface/get-turf-entity.interface";
3
+ import { IEntityAuditColumn } from "./entity-audit-column.type";
4
+ export type ITurfEntity = {
5
+ id: number;
6
+ turfName: string;
7
+ numberOfPitches: number;
8
+ address: string;
9
+ org_id: number;
10
+ adhocRefund: boolean;
11
+ getPitchStatusCount(): IPitchStatus;
12
+ getModifiedTurfEntity(): ITurf;
13
+ toMap(turfEntities: ITurfEntity[]): {
14
+ [key: number]: ITurf;
15
+ };
16
+ toKeyValue(turfEntities: ITurfEntity[]): {
17
+ [key: number]: ITurfEntity;
18
+ };
19
+ } & IEntityAuditColumn;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,27 +1,32 @@
1
- {
2
- "name": "turf-common",
3
- "version": "1.0.14",
4
- "description": "",
5
- "main": "./build/index.js",
6
- "types": "./build/index.d.ts",
7
- "files": [
8
- "build/**/*"
9
- ],
10
- "scripts": {
11
- "clean": "del build",
12
- "build": "npm run clean && tsc",
13
- "version:deploy": "npm version patch && git push && npm run build && npm publish",
14
- "test": "echo \"Error: no test specified\" && exit 1"
15
- },
16
- "repository": {
17
- "type": "git",
18
- "url": "github__bellex-dev__turf-common:bellex-dev/turf-common.git"
19
- },
20
- "keywords": [],
21
- "author": "",
22
- "license": "ISC",
23
- "devDependencies": {
24
- "del-cli": "^5.1.0",
25
- "typescript": "^5.2.2"
26
- }
27
- }
1
+ {
2
+ "name": "turf-common",
3
+ "version": "1.0.16-beta.1",
4
+ "description": "",
5
+ "main": "./build/index.js",
6
+ "types": "./build/index.d.ts",
7
+ "files": [
8
+ "build/**/*"
9
+ ],
10
+ "scripts": {
11
+ "clean": "del build",
12
+ "build": "npm run clean && tsc",
13
+ "version:deploy": "npm version patch && git push && npm run build && npm publish",
14
+ "test": "echo \"Error: no test specified\" && exit 1",
15
+ "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" 2>&1| tee eslint.log",
16
+ "lint:fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "github__bellex-dev__turf-common:bellex-dev/turf-common.git"
21
+ },
22
+ "keywords": [],
23
+ "author": "",
24
+ "license": "ISC",
25
+ "devDependencies": {
26
+ "@typescript-eslint/eslint-plugin": "^6.7.2",
27
+ "@typescript-eslint/parser": "^6.7.2",
28
+ "del-cli": "^5.1.0",
29
+ "eslint": "^8.50.0",
30
+ "typescript": "^5.2.2"
31
+ }
32
+ }