@tomei/sso 0.13.0 → 0.15.0
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/dist/__tests__/unit/components/login-user/login-user.spec.d.ts +1 -1
- package/dist/__tests__/unit/components/login-user/login-user.spec.js +662 -662
- package/dist/__tests__/unit/components/password-hash/password-hash.service.spec.d.ts +1 -1
- package/dist/__tests__/unit/components/password-hash/password-hash.service.spec.js +37 -37
- package/dist/__tests__/unit/redis-client/redis.service.spec.d.ts +1 -1
- package/dist/__tests__/unit/redis-client/redis.service.spec.js +31 -31
- package/dist/__tests__/unit/session/session.service.spec.d.ts +1 -1
- package/dist/__tests__/unit/session/session.service.spec.js +54 -54
- package/dist/__tests__/unit/system-privilege/system-privilage.spec.js +5 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.js +17 -17
- package/dist/src/components/building/building.d.ts +39 -0
- package/dist/src/components/building/building.js +126 -0
- package/dist/src/components/building/building.js.map +1 -0
- package/dist/src/components/building/building.repository.d.ts +6 -0
- package/dist/src/components/building/building.repository.js +38 -0
- package/dist/src/components/building/building.repository.js.map +1 -0
- package/dist/src/components/building/index.d.ts +2 -0
- package/dist/src/components/building/index.js +19 -0
- package/dist/src/components/building/index.js.map +1 -0
- package/dist/src/components/building-type/building-type.repository.d.ts +5 -0
- package/dist/src/components/building-type/building-type.repository.js +12 -0
- package/dist/src/components/building-type/building-type.repository.js.map +1 -0
- package/dist/src/components/building-type/index.d.ts +1 -0
- package/dist/src/components/building-type/index.js +18 -0
- package/dist/src/components/building-type/index.js.map +1 -0
- package/dist/src/components/index.d.ts +9 -7
- package/dist/src/components/index.js +25 -23
- package/dist/src/components/index.js.map +1 -1
- package/dist/src/components/login-history/index.d.ts +1 -1
- package/dist/src/components/login-history/index.js +17 -17
- package/dist/src/components/login-history/login-history.repository.d.ts +5 -5
- package/dist/src/components/login-history/login-history.repository.js +11 -11
- package/dist/src/components/login-user/index.d.ts +3 -3
- package/dist/src/components/login-user/index.js +19 -19
- package/dist/src/components/login-user/interfaces/index.d.ts +1 -1
- package/dist/src/components/login-user/interfaces/index.js +17 -17
- package/dist/src/components/login-user/interfaces/user-info.interface.d.ts +9 -9
- package/dist/src/components/login-user/interfaces/user-info.interface.js +2 -2
- package/dist/src/components/login-user/login-user.d.ts +46 -46
- package/dist/src/components/login-user/login-user.js +430 -430
- package/dist/src/components/login-user/user.repository.d.ts +5 -5
- package/dist/src/components/login-user/user.repository.js +11 -11
- package/dist/src/components/password-hash/index.d.ts +2 -2
- package/dist/src/components/password-hash/index.js +18 -18
- package/dist/src/components/password-hash/interfaces/index.d.ts +1 -1
- package/dist/src/components/password-hash/interfaces/index.js +17 -17
- package/dist/src/components/password-hash/interfaces/password-hash-service.interface.d.ts +4 -4
- package/dist/src/components/password-hash/interfaces/password-hash-service.interface.js +2 -2
- package/dist/src/components/password-hash/password-hash.service.d.ts +6 -6
- package/dist/src/components/password-hash/password-hash.service.js +27 -27
- package/dist/src/components/system/index.d.ts +1 -1
- package/dist/src/components/system/index.js +17 -17
- package/dist/src/components/system/system.repository.d.ts +5 -5
- package/dist/src/components/system/system.repository.js +11 -11
- package/dist/src/components/system-access/index.d.ts +1 -1
- package/dist/src/components/system-access/index.js +17 -17
- package/dist/src/components/system-access/system-access.repository.d.ts +5 -5
- package/dist/src/components/system-access/system-access.repository.js +11 -11
- package/dist/src/components/system-privilege/privilege.d.ts +6 -6
- package/dist/src/components/system-privilege/privilege.js +76 -76
- package/dist/src/components/system-privilege/system-privilege.repository.d.ts +6 -6
- package/dist/src/components/system-privilege/system-privilege.repository.js +34 -34
- package/dist/src/components/user-group/index.d.ts +1 -1
- package/dist/src/components/user-group/index.js +17 -17
- package/dist/src/components/user-group/user-group.repository.d.ts +5 -5
- package/dist/src/components/user-group/user-group.repository.js +11 -11
- package/dist/src/components/user-user-group/index.d.ts +1 -1
- package/dist/src/components/user-user-group/index.js +17 -17
- package/dist/src/components/user-user-group/user-user-group.repository.d.ts +5 -5
- package/dist/src/components/user-user-group/user-user-group.repository.js +11 -11
- package/dist/src/database.d.ts +4 -4
- package/dist/src/database.js +14 -14
- package/dist/src/index.d.ts +5 -5
- package/dist/src/index.js +23 -23
- package/dist/src/interfaces/index.d.ts +2 -2
- package/dist/src/interfaces/index.js +18 -18
- package/dist/src/interfaces/system-login.interface.d.ts +6 -6
- package/dist/src/interfaces/system-login.interface.js +2 -2
- package/dist/src/interfaces/user-session.interface.d.ts +4 -4
- package/dist/src/interfaces/user-session.interface.js +2 -2
- package/dist/src/models/authorization-code.entity.d.ts +14 -14
- package/dist/src/models/authorization-code.entity.js +85 -85
- package/dist/src/models/bearer-token.entity.d.ts +11 -11
- package/dist/src/models/bearer-token.entity.js +71 -71
- package/dist/src/models/building-type.entity.d.ts +7 -7
- package/dist/src/models/building-type.entity.js +49 -49
- package/dist/src/models/building.entity.d.ts +39 -39
- package/dist/src/models/building.entity.js +250 -250
- package/dist/src/models/city.entity.d.ts +11 -11
- package/dist/src/models/city.entity.js +71 -71
- package/dist/src/models/company.entity.d.ts +18 -18
- package/dist/src/models/company.entity.js +113 -113
- package/dist/src/models/country.entity.d.ts +15 -15
- package/dist/src/models/country.entity.js +91 -91
- package/dist/src/models/department.entity.d.ts +19 -19
- package/dist/src/models/department.entity.js +111 -111
- package/dist/src/models/group-role-privilege.entity.d.ts +17 -17
- package/dist/src/models/group-role-privilege.entity.js +89 -89
- package/dist/src/models/group-system-access.entity.d.ts +11 -11
- package/dist/src/models/group-system-access.entity.js +61 -61
- package/dist/src/models/group-system-privilege.entity.d.ts +11 -11
- package/dist/src/models/group-system-privilege.entity.js +61 -61
- package/dist/src/models/group-system-role.entity.d.ts +11 -11
- package/dist/src/models/group-system-role.entity.js +61 -61
- package/dist/src/models/login-history.entity.d.ts +12 -12
- package/dist/src/models/login-history.entity.js +69 -69
- package/dist/src/models/oauth-token.entity.d.ts +14 -14
- package/dist/src/models/oauth-token.entity.js +85 -85
- package/dist/src/models/role.entity.d.ts +17 -17
- package/dist/src/models/role.entity.js +101 -101
- package/dist/src/models/staff-type.entity.d.ts +7 -7
- package/dist/src/models/staff-type.entity.js +49 -49
- package/dist/src/models/staff.entity.d.ts +39 -39
- package/dist/src/models/staff.entity.js +249 -249
- package/dist/src/models/state.entity.d.ts +10 -10
- package/dist/src/models/state.entity.js +63 -63
- package/dist/src/models/system-accesss.entity.d.ts +6 -6
- package/dist/src/models/system-accesss.entity.js +50 -50
- package/dist/src/models/system-privilege.entity.d.ts +16 -16
- package/dist/src/models/system-privilege.entity.js +89 -89
- package/dist/src/models/system-role-privilege.entity.d.ts +11 -11
- package/dist/src/models/system-role-privilege.entity.js +59 -59
- package/dist/src/models/system-role.entity.d.ts +11 -11
- package/dist/src/models/system-role.entity.js +82 -82
- package/dist/src/models/system.entity.d.ts +19 -19
- package/dist/src/models/system.entity.js +145 -145
- package/dist/src/models/user-group.entity.d.ts +23 -23
- package/dist/src/models/user-group.entity.js +139 -139
- package/dist/src/models/user-role.entity.d.ts +12 -12
- package/dist/src/models/user-role.entity.js +72 -72
- package/dist/src/models/user-system-privileges.entity.d.ts +13 -13
- package/dist/src/models/user-system-privileges.entity.js +88 -88
- package/dist/src/models/user-system-role.entity.d.ts +11 -11
- package/dist/src/models/user-system-role.entity.js +59 -59
- package/dist/src/models/user-user-group.entity.d.ts +14 -14
- package/dist/src/models/user-user-group.entity.js +72 -72
- package/dist/src/models/user.entity.d.ts +30 -30
- package/dist/src/models/user.entity.js +130 -130
- package/dist/src/redis-client/__mocks__/jest-initial-setup.d.ts +1 -1
- package/dist/src/redis-client/__mocks__/jest-initial-setup.js +4 -4
- package/dist/src/redis-client/__mocks__/redis-mock.d.ts +2 -2
- package/dist/src/redis-client/__mocks__/redis-mock.js +22 -22
- package/dist/src/redis-client/index.d.ts +1 -1
- package/dist/src/redis-client/index.js +17 -17
- package/dist/src/redis-client/redis.service.d.ts +7 -7
- package/dist/src/redis-client/redis.service.js +60 -60
- package/dist/src/session/index.d.ts +2 -2
- package/dist/src/session/index.js +18 -18
- package/dist/src/session/interfaces/index.d.ts +1 -1
- package/dist/src/session/interfaces/index.js +17 -17
- package/dist/src/session/interfaces/session-service.interface.d.ts +6 -6
- package/dist/src/session/interfaces/session-service.interface.js +2 -2
- package/dist/src/session/session.service.d.ts +10 -10
- package/dist/src/session/session.service.js +62 -62
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/components/building/building.repository.ts +27 -0
- package/src/components/building/building.ts +170 -0
- package/src/components/building/index.ts +3 -0
- package/src/components/building-type/building-type.repository.ts +11 -0
- package/src/components/building-type/index.ts +2 -0
- package/src/components/index.ts +2 -0
- package/src/models/building-type.entity.ts +1 -1
@@ -1 +1 @@
|
|
1
|
-
export {};
|
1
|
+
export {};
|
@@ -1,38 +1,38 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
-
});
|
10
|
-
};
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
const password_hash_service_1 = require("../../../../src/components/password-hash/password-hash.service");
|
13
|
-
jest.mock('argon2', () => {
|
14
|
-
return {
|
15
|
-
hash: jest.fn((passowrd) => {
|
16
|
-
return `hash${passowrd}`;
|
17
|
-
}),
|
18
|
-
verify: jest.fn().mockResolvedValue(true)
|
19
|
-
};
|
20
|
-
});
|
21
|
-
describe('password-hash.service', () => {
|
22
|
-
const passwordHashService = new password_hash_service_1.PasswordHashService();
|
23
|
-
afterEach(() => {
|
24
|
-
jest.clearAllMocks();
|
25
|
-
});
|
26
|
-
it('should return hash password', () => __awaiter(void 0, void 0, void 0, function* () {
|
27
|
-
const password = 'password';
|
28
|
-
const hash = yield passwordHashService.hashPassword(password);
|
29
|
-
expect(hash).toEqual('hashpassword');
|
30
|
-
}));
|
31
|
-
it('should return true when verify password', () => __awaiter(void 0, void 0, void 0, function* () {
|
32
|
-
const password = 'password';
|
33
|
-
const hash = 'hashpassword10';
|
34
|
-
const result = yield passwordHashService.verify(password, hash);
|
35
|
-
expect(result).toEqual(true);
|
36
|
-
}));
|
37
|
-
});
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
const password_hash_service_1 = require("../../../../src/components/password-hash/password-hash.service");
|
13
|
+
jest.mock('argon2', () => {
|
14
|
+
return {
|
15
|
+
hash: jest.fn((passowrd) => {
|
16
|
+
return `hash${passowrd}`;
|
17
|
+
}),
|
18
|
+
verify: jest.fn().mockResolvedValue(true)
|
19
|
+
};
|
20
|
+
});
|
21
|
+
describe('password-hash.service', () => {
|
22
|
+
const passwordHashService = new password_hash_service_1.PasswordHashService();
|
23
|
+
afterEach(() => {
|
24
|
+
jest.clearAllMocks();
|
25
|
+
});
|
26
|
+
it('should return hash password', () => __awaiter(void 0, void 0, void 0, function* () {
|
27
|
+
const password = 'password';
|
28
|
+
const hash = yield passwordHashService.hashPassword(password);
|
29
|
+
expect(hash).toEqual('hashpassword');
|
30
|
+
}));
|
31
|
+
it('should return true when verify password', () => __awaiter(void 0, void 0, void 0, function* () {
|
32
|
+
const password = 'password';
|
33
|
+
const hash = 'hashpassword10';
|
34
|
+
const result = yield passwordHashService.verify(password, hash);
|
35
|
+
expect(result).toEqual(true);
|
36
|
+
}));
|
37
|
+
});
|
38
38
|
//# sourceMappingURL=password-hash.service.spec.js.map
|
@@ -1 +1 @@
|
|
1
|
-
export {};
|
1
|
+
export {};
|
@@ -1,32 +1,32 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
-
});
|
10
|
-
};
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
const redis_service_1 = require("../../../src/redis-client/redis.service");
|
13
|
-
require('dotenv').config();
|
14
|
-
describe('redis.service', () => {
|
15
|
-
afterEach(() => {
|
16
|
-
jest.restoreAllMocks();
|
17
|
-
});
|
18
|
-
it('should return redis service when instansiated', () => __awaiter(void 0, void 0, void 0, function* () {
|
19
|
-
const redisService = yield redis_service_1.RedisService.init();
|
20
|
-
expect(redisService).toBeDefined();
|
21
|
-
}));
|
22
|
-
it('should able to write and read redis', () => __awaiter(void 0, void 0, void 0, function* () {
|
23
|
-
const data = {
|
24
|
-
test: 'test'
|
25
|
-
};
|
26
|
-
const redisService = yield redis_service_1.RedisService.init();
|
27
|
-
yield redisService.set("test", data, 60 * 60 * 24 * 1);
|
28
|
-
const result = yield redisService.get("test");
|
29
|
-
expect(result).toEqual(JSON.stringify(data));
|
30
|
-
}));
|
31
|
-
});
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
const redis_service_1 = require("../../../src/redis-client/redis.service");
|
13
|
+
require('dotenv').config();
|
14
|
+
describe('redis.service', () => {
|
15
|
+
afterEach(() => {
|
16
|
+
jest.restoreAllMocks();
|
17
|
+
});
|
18
|
+
it('should return redis service when instansiated', () => __awaiter(void 0, void 0, void 0, function* () {
|
19
|
+
const redisService = yield redis_service_1.RedisService.init();
|
20
|
+
expect(redisService).toBeDefined();
|
21
|
+
}));
|
22
|
+
it('should able to write and read redis', () => __awaiter(void 0, void 0, void 0, function* () {
|
23
|
+
const data = {
|
24
|
+
test: 'test'
|
25
|
+
};
|
26
|
+
const redisService = yield redis_service_1.RedisService.init();
|
27
|
+
yield redisService.set("test", data, 60 * 60 * 24 * 1);
|
28
|
+
const result = yield redisService.get("test");
|
29
|
+
expect(result).toEqual(JSON.stringify(data));
|
30
|
+
}));
|
31
|
+
});
|
32
32
|
//# sourceMappingURL=redis.service.spec.js.map
|
@@ -1 +1 @@
|
|
1
|
-
export {};
|
1
|
+
export {};
|
@@ -1,55 +1,55 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
-
});
|
10
|
-
};
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
const session_service_1 = require("../../../src/session/session.service");
|
13
|
-
require('dotenv').config();
|
14
|
-
describe('session.service', () => {
|
15
|
-
it('should return session service when instansiated', () => __awaiter(void 0, void 0, void 0, function* () {
|
16
|
-
const sessionService = yield session_service_1.SessionService.init();
|
17
|
-
expect(sessionService).toBeDefined();
|
18
|
-
}));
|
19
|
-
it('should able to write session data', () => __awaiter(void 0, void 0, void 0, function* () {
|
20
|
-
const data = {
|
21
|
-
systemLogins: [
|
22
|
-
{
|
23
|
-
id: '1',
|
24
|
-
code: 'EZC',
|
25
|
-
sessionId: 'test1',
|
26
|
-
privileges: ['PRIVILEGE1', 'PRIVILEGE2'],
|
27
|
-
},
|
28
|
-
],
|
29
|
-
};
|
30
|
-
const sessionService = yield session_service_1.SessionService.init();
|
31
|
-
yield sessionService.setUserSession("1", data);
|
32
|
-
const result = yield sessionService.retrieveUserSession("1");
|
33
|
-
expect(result).toEqual(data);
|
34
|
-
}));
|
35
|
-
it('should able to refresh session data', () => __awaiter(void 0, void 0, void 0, function* () {
|
36
|
-
const setUserSession = jest.spyOn(session_service_1.SessionService.prototype, 'setUserSession');
|
37
|
-
const retrieveUserSession = jest.spyOn(session_service_1.SessionService.prototype, 'retrieveUserSession');
|
38
|
-
const data = {
|
39
|
-
systemLogins: [
|
40
|
-
{
|
41
|
-
id: '1',
|
42
|
-
code: 'EZC',
|
43
|
-
sessionId: 'test1',
|
44
|
-
privileges: ['PRIVILEGE1', 'PRIVILEGE2'],
|
45
|
-
},
|
46
|
-
],
|
47
|
-
};
|
48
|
-
const sessionService = yield session_service_1.SessionService.init();
|
49
|
-
yield sessionService.setUserSession("1", data);
|
50
|
-
yield sessionService.refreshDuration("1");
|
51
|
-
expect(setUserSession).toBeCalledTimes(2);
|
52
|
-
expect(retrieveUserSession).toBeCalledTimes(1);
|
53
|
-
}));
|
54
|
-
});
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
const session_service_1 = require("../../../src/session/session.service");
|
13
|
+
require('dotenv').config();
|
14
|
+
describe('session.service', () => {
|
15
|
+
it('should return session service when instansiated', () => __awaiter(void 0, void 0, void 0, function* () {
|
16
|
+
const sessionService = yield session_service_1.SessionService.init();
|
17
|
+
expect(sessionService).toBeDefined();
|
18
|
+
}));
|
19
|
+
it('should able to write session data', () => __awaiter(void 0, void 0, void 0, function* () {
|
20
|
+
const data = {
|
21
|
+
systemLogins: [
|
22
|
+
{
|
23
|
+
id: '1',
|
24
|
+
code: 'EZC',
|
25
|
+
sessionId: 'test1',
|
26
|
+
privileges: ['PRIVILEGE1', 'PRIVILEGE2'],
|
27
|
+
},
|
28
|
+
],
|
29
|
+
};
|
30
|
+
const sessionService = yield session_service_1.SessionService.init();
|
31
|
+
yield sessionService.setUserSession("1", data);
|
32
|
+
const result = yield sessionService.retrieveUserSession("1");
|
33
|
+
expect(result).toEqual(data);
|
34
|
+
}));
|
35
|
+
it('should able to refresh session data', () => __awaiter(void 0, void 0, void 0, function* () {
|
36
|
+
const setUserSession = jest.spyOn(session_service_1.SessionService.prototype, 'setUserSession');
|
37
|
+
const retrieveUserSession = jest.spyOn(session_service_1.SessionService.prototype, 'retrieveUserSession');
|
38
|
+
const data = {
|
39
|
+
systemLogins: [
|
40
|
+
{
|
41
|
+
id: '1',
|
42
|
+
code: 'EZC',
|
43
|
+
sessionId: 'test1',
|
44
|
+
privileges: ['PRIVILEGE1', 'PRIVILEGE2'],
|
45
|
+
},
|
46
|
+
],
|
47
|
+
};
|
48
|
+
const sessionService = yield session_service_1.SessionService.init();
|
49
|
+
yield sessionService.setUserSession("1", data);
|
50
|
+
yield sessionService.refreshDuration("1");
|
51
|
+
expect(setUserSession).toBeCalledTimes(2);
|
52
|
+
expect(retrieveUserSession).toBeCalledTimes(1);
|
53
|
+
}));
|
54
|
+
});
|
55
55
|
//# sourceMappingURL=session.service.spec.js.map
|
@@ -1,6 +1,6 @@
|
|
1
|
-
describe('SystemPrivilege', () => {
|
2
|
-
it('should be true', () => {
|
3
|
-
expect(true).toBe(true);
|
4
|
-
});
|
5
|
-
});
|
1
|
+
describe('SystemPrivilege', () => {
|
2
|
+
it('should be true', () => {
|
3
|
+
expect(true).toBe(true);
|
4
|
+
});
|
5
|
+
});
|
6
6
|
//# sourceMappingURL=system-privilage.spec.js.map
|
package/dist/index.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export * from './src';
|
1
|
+
export * from './src';
|
package/dist/index.js
CHANGED
@@ -1,18 +1,18 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
-
};
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
__exportStar(require("./src"), exports);
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./src"), exports);
|
18
18
|
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { LoginUser } from '../../..';
|
2
|
+
export declare class Building {
|
3
|
+
id: number;
|
4
|
+
name: string;
|
5
|
+
code: string;
|
6
|
+
building_type_id: number;
|
7
|
+
status: string;
|
8
|
+
email: string;
|
9
|
+
mobile: string;
|
10
|
+
phone: string;
|
11
|
+
address: string;
|
12
|
+
postcode: string;
|
13
|
+
longitude: number;
|
14
|
+
latitude: number;
|
15
|
+
country_id: number;
|
16
|
+
state: string;
|
17
|
+
city: string;
|
18
|
+
brand: string;
|
19
|
+
area_staff_id: string;
|
20
|
+
opening_date: any;
|
21
|
+
ceased_date: any;
|
22
|
+
opening_hours: any;
|
23
|
+
image: string;
|
24
|
+
private _created_by_id;
|
25
|
+
private _updated_by_id;
|
26
|
+
private _created_at;
|
27
|
+
private _updated_at;
|
28
|
+
private _BuildingTypeId;
|
29
|
+
private _BuildingType;
|
30
|
+
private static _Repo;
|
31
|
+
private _RepoBuildingType;
|
32
|
+
private constructor();
|
33
|
+
static init(dbTransaction: any, code?: string): Promise<Building | undefined>;
|
34
|
+
getBuildingType(loginUser: LoginUser, dbTransaction?: any): Promise<{
|
35
|
+
BuildingTypeId: number;
|
36
|
+
BuildingType: string;
|
37
|
+
}>;
|
38
|
+
static findAll(loginUser: LoginUser, dbTransaction: any, page?: number, rows?: number, search?: {}): Promise<any>;
|
39
|
+
}
|
@@ -0,0 +1,126 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
exports.Building = void 0;
|
13
|
+
const building_type_repository_1 = require("../building-type/building-type.repository");
|
14
|
+
const building_repository_1 = require("./building.repository");
|
15
|
+
const config_1 = require("@tomei/config");
|
16
|
+
const sequelize_1 = require("sequelize");
|
17
|
+
class Building {
|
18
|
+
constructor(buildingInfo) {
|
19
|
+
this._RepoBuildingType = new building_type_repository_1.BuildingTypeRepository();
|
20
|
+
if (buildingInfo) {
|
21
|
+
this.id = buildingInfo.id;
|
22
|
+
this.name = buildingInfo.Name;
|
23
|
+
this.code = buildingInfo.Code;
|
24
|
+
this.building_type_id = buildingInfo.BuildingTypeId;
|
25
|
+
this.status = buildingInfo.Status;
|
26
|
+
this.email = buildingInfo.Email;
|
27
|
+
this.mobile = buildingInfo.Mobile;
|
28
|
+
this.phone = buildingInfo.Phone;
|
29
|
+
this.address = buildingInfo.Address;
|
30
|
+
this.postcode = buildingInfo.PostCode;
|
31
|
+
this.longitude = buildingInfo.Longitude;
|
32
|
+
this.latitude = buildingInfo.Latitude;
|
33
|
+
this.country_id = buildingInfo.CountryId;
|
34
|
+
this.state = buildingInfo.State;
|
35
|
+
this.city = buildingInfo.City;
|
36
|
+
this._created_by_id = buildingInfo.created_by_id;
|
37
|
+
this._updated_by_id = buildingInfo.updated_by_id;
|
38
|
+
this._created_at = buildingInfo.created_at;
|
39
|
+
this._updated_at = buildingInfo.updated_at;
|
40
|
+
this.brand = buildingInfo.Brand;
|
41
|
+
this.area_staff_id = buildingInfo.AreaStaffId;
|
42
|
+
this.opening_date = buildingInfo.OpeningDate;
|
43
|
+
this.ceased_date = buildingInfo.CeasedDate;
|
44
|
+
this.opening_hours = buildingInfo.OpeningHours;
|
45
|
+
this.image = buildingInfo.Image;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
static init(dbTransaction, code) {
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
50
|
+
if (code) {
|
51
|
+
const building = yield Building._Repo.findOne({
|
52
|
+
where: {
|
53
|
+
code: code,
|
54
|
+
},
|
55
|
+
});
|
56
|
+
if (!building) {
|
57
|
+
throw Error('Building not found.');
|
58
|
+
}
|
59
|
+
return new Building(building);
|
60
|
+
}
|
61
|
+
});
|
62
|
+
}
|
63
|
+
getBuildingType(loginUser, dbTransaction) {
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
65
|
+
const systemCode = config_1.ApplicationConfig.getComponentConfigValue('system-code');
|
66
|
+
const isPrivileged = yield loginUser.checkPrivileges(systemCode, 'Building - View');
|
67
|
+
if (!isPrivileged) {
|
68
|
+
throw new Error('You do not have permission to view Building.');
|
69
|
+
}
|
70
|
+
if (!this.building_type_id) {
|
71
|
+
throw new Error('building type is null.');
|
72
|
+
}
|
73
|
+
const buildingType = yield this._RepoBuildingType.findOne({
|
74
|
+
where: {
|
75
|
+
id: this.building_type_id,
|
76
|
+
},
|
77
|
+
});
|
78
|
+
if (!buildingType) {
|
79
|
+
throw new Error('building is not found.');
|
80
|
+
}
|
81
|
+
const { id, name } = buildingType;
|
82
|
+
this._BuildingType = name;
|
83
|
+
this._BuildingTypeId = id;
|
84
|
+
return {
|
85
|
+
BuildingTypeId: this._BuildingTypeId,
|
86
|
+
BuildingType: this._BuildingType,
|
87
|
+
};
|
88
|
+
});
|
89
|
+
}
|
90
|
+
static findAll(loginUser, dbTransaction, page, rows, search = {}) {
|
91
|
+
return __awaiter(this, void 0, void 0, function* () {
|
92
|
+
try {
|
93
|
+
const systemCode = config_1.ApplicationConfig.getComponentConfigValue('system-code');
|
94
|
+
const isPrivileged = yield loginUser.checkPrivileges(systemCode, 'Building - View');
|
95
|
+
if (!isPrivileged) {
|
96
|
+
throw new Error('You do not have permission to view Building.');
|
97
|
+
}
|
98
|
+
const whereObj = {};
|
99
|
+
Object.keys(search).forEach((key) => {
|
100
|
+
if (search[key]) {
|
101
|
+
whereObj[key] = {
|
102
|
+
[sequelize_1.Op.substring]: search[key],
|
103
|
+
};
|
104
|
+
}
|
105
|
+
});
|
106
|
+
let options = {
|
107
|
+
where: whereObj,
|
108
|
+
order: [['created_at', 'DESC']],
|
109
|
+
transaction: dbTransaction,
|
110
|
+
};
|
111
|
+
if (page && rows) {
|
112
|
+
const offset = rows * (page - 1);
|
113
|
+
options = Object.assign(Object.assign({}, options), { offset, limit: rows });
|
114
|
+
}
|
115
|
+
const result = yield Building._Repo.findAndCountAll(options);
|
116
|
+
return result;
|
117
|
+
}
|
118
|
+
catch (error) {
|
119
|
+
throw error;
|
120
|
+
}
|
121
|
+
});
|
122
|
+
}
|
123
|
+
}
|
124
|
+
exports.Building = Building;
|
125
|
+
Building._Repo = new building_repository_1.BuildingRepository();
|
126
|
+
//# sourceMappingURL=building.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"building.js","sourceRoot":"","sources":["../../../../src/components/building/building.ts"],"names":[],"mappings":"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"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import Building from '../../models/building.entity';
|
2
|
+
import { RepositoryBase, IRepositoryBase } from '@tomei/general';
|
3
|
+
export declare class BuildingRepository extends RepositoryBase<Building> implements IRepositoryBase<Building> {
|
4
|
+
constructor();
|
5
|
+
findAndCountAll(options?: any): Promise<any>;
|
6
|
+
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
exports.BuildingRepository = void 0;
|
13
|
+
const building_entity_1 = require("../../models/building.entity");
|
14
|
+
const general_1 = require("@tomei/general");
|
15
|
+
class BuildingRepository extends general_1.RepositoryBase {
|
16
|
+
constructor() {
|
17
|
+
super(building_entity_1.default);
|
18
|
+
}
|
19
|
+
findAndCountAll(options) {
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
21
|
+
try {
|
22
|
+
let buildings;
|
23
|
+
if (options) {
|
24
|
+
buildings = yield building_entity_1.default.findAndCountAll(options);
|
25
|
+
}
|
26
|
+
else {
|
27
|
+
buildings = yield building_entity_1.default.findAndCountAll();
|
28
|
+
}
|
29
|
+
return buildings;
|
30
|
+
}
|
31
|
+
catch (error) {
|
32
|
+
throw new Error(`An Error occured when retriving product collection: ${error.message}`);
|
33
|
+
}
|
34
|
+
});
|
35
|
+
}
|
36
|
+
}
|
37
|
+
exports.BuildingRepository = BuildingRepository;
|
38
|
+
//# sourceMappingURL=building.repository.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"building.repository.js","sourceRoot":"","sources":["../../../../src/components/building/building.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kEAAoD;AACpD,4CAAiE;AAEjE,MAAa,kBACX,SAAQ,wBAAwB;IAGhC;QACE,KAAK,CAAC,yBAAQ,CAAC,CAAC;IAClB,CAAC;IAEK,eAAe,CAAC,OAAa;;YACjC,IAAI;gBACF,IAAI,SAAc,CAAC;gBACnB,IAAI,OAAO,EAAE;oBACX,SAAS,GAAG,MAAM,yBAAQ,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;iBACrD;qBAAM;oBACL,SAAS,GAAG,MAAM,yBAAQ,CAAC,eAAe,EAAE,CAAC;iBAC9C;gBACD,OAAO,SAAS,CAAC;aAClB;YAAC,OAAO,KAAK,EAAE;gBACd,MAAM,IAAI,KAAK,CACb,uDAAuD,KAAK,CAAC,OAAO,EAAE,CACvE,CAAC;aACH;QACH,CAAC;KAAA;CACF;AAvBD,gDAuBC"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./building"), exports);
|
18
|
+
__exportStar(require("./building.repository"), exports);
|
19
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/building/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,6CAA2B;AAC3B,wDAAsC"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import BuildingType from '../../models/building-type.entity';
|
2
|
+
import { RepositoryBase, IRepositoryBase } from '@tomei/general';
|
3
|
+
export declare class BuildingTypeRepository extends RepositoryBase<BuildingType> implements IRepositoryBase<BuildingType> {
|
4
|
+
constructor();
|
5
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.BuildingTypeRepository = void 0;
|
4
|
+
const building_type_entity_1 = require("../../models/building-type.entity");
|
5
|
+
const general_1 = require("@tomei/general");
|
6
|
+
class BuildingTypeRepository extends general_1.RepositoryBase {
|
7
|
+
constructor() {
|
8
|
+
super(building_type_entity_1.default);
|
9
|
+
}
|
10
|
+
}
|
11
|
+
exports.BuildingTypeRepository = BuildingTypeRepository;
|
12
|
+
//# sourceMappingURL=building-type.repository.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"building-type.repository.js","sourceRoot":"","sources":["../../../../src/components/building-type/building-type.repository.ts"],"names":[],"mappings":";;;AAAA,4EAA6D;AAC7D,4CAAiE;AAEjE,MAAa,sBACX,SAAQ,wBAA4B;IAGpC;QACE,KAAK,CAAC,8BAAY,CAAC,CAAC;IACtB,CAAC;CACF;AAPD,wDAOC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './building-type.repository';
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./building-type.repository"), exports);
|
18
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/building-type/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,6DAA2C"}
|