ecrs-auth-core 1.0.106 → 1.0.108

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.
@@ -91,12 +91,12 @@ let AuthCustomerService = class AuthCustomerService {
91
91
  if (!Number.isFinite(moduleId))
92
92
  return false;
93
93
  try {
94
- const result = await this.moduleAccessRepo.query(`SELECT 1
95
- FROM tbl_c_users_customer_module_access_new
96
- WHERE customer_user_id = $1
97
- AND module_id = $2
98
- AND status = 1
99
- AND is_deleted = 0
94
+ const result = await this.moduleAccessRepo.query(`SELECT 1
95
+ FROM tbl_c_users_customer_module_access_new
96
+ WHERE customer_user_id = $1
97
+ AND module_id = $2
98
+ AND status = 1
99
+ AND is_deleted = 0
100
100
  LIMIT 1`, [userId, moduleId]);
101
101
  return result.length > 0;
102
102
  }
@@ -1,3 +1,8 @@
1
+ export declare enum CustomerEmployeeType {
2
+ BOTH = "BOTH",
3
+ SPOT = "SPOT",
4
+ ETS = "ETS"
5
+ }
1
6
  export declare class UserCustomer {
2
7
  id: number;
3
8
  firstName: string;
@@ -11,6 +16,7 @@ export declare class UserCustomer {
11
16
  parentId: number;
12
17
  referenceId: number;
13
18
  is_ecrs_employee: boolean;
19
+ is_employee_type: CustomerEmployeeType | null;
14
20
  userId: number;
15
21
  notificationToken: string;
16
22
  apiToken: string;
@@ -9,9 +9,15 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.UserCustomer = void 0;
12
+ exports.UserCustomer = exports.CustomerEmployeeType = void 0;
13
13
  // src/entities/user.entity.ts
14
14
  const typeorm_1 = require("typeorm");
15
+ var CustomerEmployeeType;
16
+ (function (CustomerEmployeeType) {
17
+ CustomerEmployeeType["BOTH"] = "BOTH";
18
+ CustomerEmployeeType["SPOT"] = "SPOT";
19
+ CustomerEmployeeType["ETS"] = "ETS";
20
+ })(CustomerEmployeeType || (exports.CustomerEmployeeType = CustomerEmployeeType = {}));
15
21
  let UserCustomer = class UserCustomer {
16
22
  };
17
23
  exports.UserCustomer = UserCustomer;
@@ -63,6 +69,15 @@ __decorate([
63
69
  (0, typeorm_1.Column)({ type: "boolean", default: false }),
64
70
  __metadata("design:type", Boolean)
65
71
  ], UserCustomer.prototype, "is_ecrs_employee", void 0);
72
+ __decorate([
73
+ (0, typeorm_1.Column)({
74
+ type: "enum",
75
+ enum: CustomerEmployeeType,
76
+ nullable: true,
77
+ default: CustomerEmployeeType.SPOT,
78
+ }),
79
+ __metadata("design:type", Object)
80
+ ], UserCustomer.prototype, "is_employee_type", void 0);
66
81
  __decorate([
67
82
  (0, typeorm_1.Column)({ type: "int", nullable: true }),
68
83
  __metadata("design:type", Number)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ecrs-auth-core",
3
- "version": "1.0.106",
3
+ "version": "1.0.108",
4
4
  "description": "Centralized authentication and authorization module for ECRS apps",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",