@tomei/sso 0.2.0 → 0.2.2
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-history/login-history.repository.spec.d.ts +1 -0
- package/dist/__tests__/unit/components/login-history/login-history.repository.spec.js +99 -0
- package/dist/__tests__/unit/components/login-history/login-history.repository.spec.js.map +1 -0
- package/dist/__tests__/unit/components/login-user/user.repository.spec.d.ts +1 -0
- package/dist/__tests__/unit/components/login-user/user.repository.spec.js +78 -0
- package/dist/__tests__/unit/components/login-user/user.repository.spec.js.map +1 -0
- package/dist/__tests__/unit/components/password-hash/password-hash.service.spec.d.ts +1 -0
- package/dist/__tests__/unit/components/password-hash/password-hash.service.spec.js +38 -0
- package/dist/__tests__/unit/components/password-hash/password-hash.service.spec.js.map +1 -0
- package/dist/__tests__/unit/components/system/system.repository.spec.d.ts +1 -0
- package/dist/__tests__/unit/components/system/system.repository.spec.js +85 -0
- package/dist/__tests__/unit/components/system/system.repository.spec.js.map +1 -0
- package/dist/__tests__/unit/components/system-access/system-access.repository.spec.d.ts +1 -0
- package/dist/__tests__/unit/components/system-access/system-access.repository.spec.js +75 -0
- package/dist/__tests__/unit/components/system-access/system-access.repository.spec.js.map +1 -0
- package/dist/__tests__/unit/redis-client/redis.service.spec.d.ts +1 -0
- package/dist/__tests__/unit/redis-client/redis.service.spec.js +32 -0
- package/dist/__tests__/unit/redis-client/redis.service.spec.js.map +1 -0
- package/dist/__tests__/unit/session/session.service.spec.d.ts +1 -0
- package/dist/__tests__/unit/session/session.service.spec.js +36 -0
- package/dist/__tests__/unit/session/session.service.spec.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/src/components/index.d.ts +7 -0
- package/dist/src/components/index.js +24 -0
- package/dist/src/components/index.js.map +1 -0
- package/dist/src/components/login-history/index.d.ts +1 -0
- package/dist/src/components/login-history/index.js +18 -0
- package/dist/src/components/login-history/index.js.map +1 -0
- package/dist/src/components/login-history/login-history.repository.d.ts +9 -0
- package/dist/src/components/login-history/login-history.repository.js +50 -0
- package/dist/src/components/login-history/login-history.repository.js.map +1 -0
- package/dist/src/components/login-user/index.d.ts +3 -0
- package/dist/src/components/login-user/index.js +20 -0
- package/dist/src/components/login-user/index.js.map +1 -0
- package/dist/src/components/login-user/interfaces/index.d.ts +1 -0
- package/dist/src/components/login-user/interfaces/index.js +18 -0
- package/dist/src/components/login-user/interfaces/index.js.map +1 -0
- package/dist/src/components/login-user/interfaces/user-info.interface.d.ts +9 -0
- package/dist/src/components/login-user/interfaces/user-info.interface.js +3 -0
- package/dist/src/components/login-user/interfaces/user-info.interface.js.map +1 -0
- package/dist/src/components/login-user/login-user.d.ts +41 -0
- package/dist/src/components/login-user/login-user.js +333 -0
- package/dist/src/components/login-user/login-user.js.map +1 -0
- package/dist/src/components/login-user/user.repository.d.ts +9 -0
- package/dist/src/components/login-user/user.repository.js +50 -0
- package/dist/src/components/login-user/user.repository.js.map +1 -0
- package/dist/src/components/password-hash/index.d.ts +2 -0
- package/dist/src/components/password-hash/index.js +19 -0
- package/dist/src/components/password-hash/index.js.map +1 -0
- package/dist/src/components/password-hash/interfaces/index.d.ts +1 -0
- package/dist/src/components/password-hash/interfaces/index.js +18 -0
- package/dist/src/components/password-hash/interfaces/index.js.map +1 -0
- package/dist/src/components/password-hash/interfaces/password-hash-service.interface.d.ts +4 -0
- package/dist/src/components/password-hash/interfaces/password-hash-service.interface.js +3 -0
- package/dist/src/components/password-hash/interfaces/password-hash-service.interface.js.map +1 -0
- package/dist/src/components/password-hash/password-hash.service.d.ts +6 -0
- package/dist/src/components/password-hash/password-hash.service.js +28 -0
- package/dist/src/components/password-hash/password-hash.service.js.map +1 -0
- package/dist/src/components/system/index.d.ts +1 -0
- package/dist/src/components/system/index.js +18 -0
- package/dist/src/components/system/index.js.map +1 -0
- package/dist/src/components/system/system.repository.d.ts +9 -0
- package/dist/src/components/system/system.repository.js +50 -0
- package/dist/src/components/system/system.repository.js.map +1 -0
- package/dist/src/components/system-access/index.d.ts +1 -0
- package/dist/src/components/system-access/index.js +18 -0
- package/dist/src/components/system-access/index.js.map +1 -0
- package/dist/src/components/system-access/system-access.repository.d.ts +9 -0
- package/dist/src/components/system-access/system-access.repository.js +50 -0
- package/dist/src/components/system-access/system-access.repository.js.map +1 -0
- package/dist/src/components/user-group/index.d.ts +1 -0
- package/dist/src/components/user-group/index.js +18 -0
- package/dist/src/components/user-group/index.js.map +1 -0
- package/dist/src/components/user-group/user-group.repository.d.ts +9 -0
- package/dist/src/components/user-group/user-group.repository.js +50 -0
- package/dist/src/components/user-group/user-group.repository.js.map +1 -0
- package/dist/src/components/user-user-group/index.d.ts +1 -0
- package/dist/src/components/user-user-group/index.js +18 -0
- package/dist/src/components/user-user-group/index.js.map +1 -0
- package/dist/src/components/user-user-group/user-user-group.repository.d.ts +9 -0
- package/dist/src/components/user-user-group/user-user-group.repository.js +50 -0
- package/dist/src/components/user-user-group/user-user-group.repository.js.map +1 -0
- package/dist/src/index.d.ts +6 -0
- package/dist/src/index.js +24 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/interfaces/index.d.ts +2 -0
- package/dist/src/interfaces/index.js +19 -0
- package/dist/src/interfaces/index.js.map +1 -0
- package/dist/src/interfaces/system-login.interface.d.ts +6 -0
- package/dist/src/interfaces/system-login.interface.js +3 -0
- package/dist/src/interfaces/system-login.interface.js.map +1 -0
- package/dist/src/interfaces/user-session.interface.d.ts +4 -0
- package/dist/src/interfaces/user-session.interface.js +3 -0
- package/dist/src/interfaces/user-session.interface.js.map +1 -0
- package/dist/src/mail/index.d.ts +2 -0
- package/dist/src/mail/index.js +19 -0
- package/dist/src/mail/index.js.map +1 -0
- package/dist/src/mail/interfaces/index.d.ts +2 -0
- package/dist/src/mail/interfaces/index.js +19 -0
- package/dist/src/mail/interfaces/index.js.map +1 -0
- package/dist/src/mail/interfaces/send-mail.interface.d.ts +8 -0
- package/dist/src/mail/interfaces/send-mail.interface.js +3 -0
- package/dist/src/mail/interfaces/send-mail.interface.js.map +1 -0
- package/dist/src/mail/interfaces/send-new-login-alert.interface.d.ts +6 -0
- package/dist/src/mail/interfaces/send-new-login-alert.interface.js +3 -0
- package/dist/src/mail/interfaces/send-new-login-alert.interface.js.map +1 -0
- package/dist/src/mail/mail.d.ts +7 -0
- package/dist/src/mail/mail.js +49 -0
- package/dist/src/mail/mail.js.map +1 -0
- package/dist/src/mail/mail.service.d.ts +7 -0
- package/dist/src/mail/mail.service.js +42 -0
- package/dist/src/mail/mail.service.js.map +1 -0
- package/dist/src/prisma-client/__mocks__/prisma.d.ts +3 -0
- package/dist/src/prisma-client/__mocks__/prisma.js +14 -0
- package/dist/src/prisma-client/__mocks__/prisma.js.map +1 -0
- package/dist/src/prisma-client/client.d.ts +3 -0
- package/dist/src/prisma-client/client.js +6 -0
- package/dist/src/prisma-client/client.js.map +1 -0
- package/dist/src/prisma-client/index.d.ts +1 -0
- package/dist/src/prisma-client/index.js +18 -0
- package/dist/src/prisma-client/index.js.map +1 -0
- package/dist/src/redis-client/__mocks__/jest-initial-setup.d.ts +1 -0
- package/dist/src/redis-client/__mocks__/jest-initial-setup.js +5 -0
- package/dist/src/redis-client/__mocks__/jest-initial-setup.js.map +1 -0
- package/dist/src/redis-client/__mocks__/redis-mock.d.ts +2 -0
- package/dist/src/redis-client/__mocks__/redis-mock.js +23 -0
- package/dist/src/redis-client/__mocks__/redis-mock.js.map +1 -0
- package/dist/src/redis-client/index.d.ts +1 -0
- package/dist/src/redis-client/index.js +18 -0
- package/dist/src/redis-client/index.js.map +1 -0
- package/dist/src/redis-client/redis.service.d.ts +7 -0
- package/dist/src/redis-client/redis.service.js +56 -0
- package/dist/src/redis-client/redis.service.js.map +1 -0
- package/dist/src/session/index.d.ts +2 -0
- package/dist/src/session/index.js +19 -0
- package/dist/src/session/index.js.map +1 -0
- package/dist/src/session/interfaces/index.d.ts +1 -0
- package/dist/src/session/interfaces/index.js +18 -0
- package/dist/src/session/interfaces/index.js.map +1 -0
- package/dist/src/session/interfaces/session-service.interface.d.ts +5 -0
- package/dist/src/session/interfaces/session-service.interface.js +3 -0
- package/dist/src/session/interfaces/session-service.interface.js.map +1 -0
- package/dist/src/session/session.service.d.ts +9 -0
- package/dist/src/session/session.service.js +52 -0
- package/dist/src/session/session.service.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/index.ts +1 -0
- package/package.json +1 -1
- package/src/components/login-user/login-user.ts +4 -1
- package/tsconfig.build.json +2 -1
- package/tsconfig.json +2 -5
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"password-hash-service.interface.js","sourceRoot":"","sources":["../../../../../src/components/password-hash/interfaces/password-hash-service.interface.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { IPasswordHashService } from './interfaces/password-hash-service.interface';
|
2
|
+
export declare class PasswordHashService implements IPasswordHashService {
|
3
|
+
constructor();
|
4
|
+
hashPassword(password: string): Promise<string>;
|
5
|
+
verify(password: string, hash: string): Promise<boolean>;
|
6
|
+
}
|
@@ -0,0 +1,28 @@
|
|
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.PasswordHashService = void 0;
|
13
|
+
const argon2 = require("argon2");
|
14
|
+
class PasswordHashService {
|
15
|
+
constructor() { }
|
16
|
+
hashPassword(password) {
|
17
|
+
return __awaiter(this, void 0, void 0, function* () {
|
18
|
+
return yield argon2.hash(password);
|
19
|
+
});
|
20
|
+
}
|
21
|
+
verify(password, hash) {
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
23
|
+
return yield argon2.verify(hash, password);
|
24
|
+
});
|
25
|
+
}
|
26
|
+
}
|
27
|
+
exports.PasswordHashService = PasswordHashService;
|
28
|
+
//# sourceMappingURL=password-hash.service.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"password-hash.service.js","sourceRoot":"","sources":["../../../../src/components/password-hash/password-hash.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iCAAiC;AAGjC,MAAa,mBAAmB;IAC9B,gBAAe,CAAC;IAEV,YAAY,CAAC,QAAgB;;YACjC,OAAO,MAAM,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrC,CAAC;KAAA;IAEK,MAAM,CAAC,QAAgB,EAAE,IAAY;;YACzC,OAAO,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAC7C,CAAC;KAAA;CACF;AAVD,kDAUC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './system.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("./system.repository"), exports);
|
18
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/system/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export declare class SystemRepository {
|
2
|
+
private _prisma;
|
3
|
+
constructor(client?: any);
|
4
|
+
create(data: any): Promise<any>;
|
5
|
+
findAll(options: any): Promise<any[]>;
|
6
|
+
findOne(options: any): Promise<any>;
|
7
|
+
update(where: any, data: any): Promise<any>;
|
8
|
+
delete(where: any): Promise<any>;
|
9
|
+
}
|
@@ -0,0 +1,50 @@
|
|
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.SystemRepository = void 0;
|
13
|
+
const client_1 = require("../../prisma-client/client");
|
14
|
+
class SystemRepository {
|
15
|
+
constructor(client) {
|
16
|
+
if (client) {
|
17
|
+
this._prisma = client;
|
18
|
+
}
|
19
|
+
else {
|
20
|
+
this._prisma = client_1.default;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
create(data) {
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
25
|
+
return yield this._prisma.system.create(data);
|
26
|
+
});
|
27
|
+
}
|
28
|
+
findAll(options) {
|
29
|
+
return __awaiter(this, void 0, void 0, function* () {
|
30
|
+
return yield this._prisma.system.findMany(options);
|
31
|
+
});
|
32
|
+
}
|
33
|
+
findOne(options) {
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
35
|
+
return yield this._prisma.system.findFirst(options);
|
36
|
+
});
|
37
|
+
}
|
38
|
+
update(where, data) {
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
40
|
+
return yield this._prisma.system.update(where, data);
|
41
|
+
});
|
42
|
+
}
|
43
|
+
delete(where) {
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
45
|
+
return yield this._prisma.system.delete(where);
|
46
|
+
});
|
47
|
+
}
|
48
|
+
}
|
49
|
+
exports.SystemRepository = SystemRepository;
|
50
|
+
//# sourceMappingURL=system.repository.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"system.repository.js","sourceRoot":"","sources":["../../../../src/components/system/system.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uDAAgD;AAEhD,MAAa,gBAAgB;IAG3B,YAAY,MAAY;QACtB,IAAI,MAAM,EAAE;YACV,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;SACvB;aAAM;YACL,IAAI,CAAC,OAAO,GAAG,gBAAM,CAAC;SACvB;IACH,CAAC;IAEY,MAAM,CAAC,IAAS;;YAC3B,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAChD,CAAC;KAAA;IAEY,OAAO,CAAC,OAAY;;YAC/B,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACrD,CAAC;KAAA;IAEY,OAAO,CAAC,OAAY;;YAC/B,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACtD,CAAC;KAAA;IAEY,MAAM,CAAC,KAAU,EAAE,IAAS;;YACvC,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QACvD,CAAC;KAAA;IAEY,MAAM,CAAC,KAAU;;YAC5B,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACjD,CAAC;KAAA;CACF;AA9BD,4CA8BC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './system-access.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("./system-access.repository"), exports);
|
18
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/system-access/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA2C"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export declare class SystemAccessRepository {
|
2
|
+
private _prisma;
|
3
|
+
constructor(client?: any);
|
4
|
+
create(data: any): Promise<any>;
|
5
|
+
findAll(options: any): Promise<any[]>;
|
6
|
+
findOne(options: any): Promise<any>;
|
7
|
+
update(where: any, data: any): Promise<any>;
|
8
|
+
delete(where: any): Promise<any>;
|
9
|
+
}
|
@@ -0,0 +1,50 @@
|
|
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.SystemAccessRepository = void 0;
|
13
|
+
const client_1 = require("../../prisma-client/client");
|
14
|
+
class SystemAccessRepository {
|
15
|
+
constructor(client) {
|
16
|
+
if (client) {
|
17
|
+
this._prisma = client;
|
18
|
+
}
|
19
|
+
else {
|
20
|
+
this._prisma = client_1.default;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
create(data) {
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
25
|
+
return yield this._prisma.systemAccess.create(data);
|
26
|
+
});
|
27
|
+
}
|
28
|
+
findAll(options) {
|
29
|
+
return __awaiter(this, void 0, void 0, function* () {
|
30
|
+
return yield this._prisma.systemAccess.findMany(options);
|
31
|
+
});
|
32
|
+
}
|
33
|
+
findOne(options) {
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
35
|
+
return yield this._prisma.systemAccess.findFirst(options);
|
36
|
+
});
|
37
|
+
}
|
38
|
+
update(where, data) {
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
40
|
+
return yield this._prisma.systemAccess.update(where, data);
|
41
|
+
});
|
42
|
+
}
|
43
|
+
delete(where) {
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
45
|
+
return yield this._prisma.systemAccess.delete(where);
|
46
|
+
});
|
47
|
+
}
|
48
|
+
}
|
49
|
+
exports.SystemAccessRepository = SystemAccessRepository;
|
50
|
+
//# sourceMappingURL=system-access.repository.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"system-access.repository.js","sourceRoot":"","sources":["../../../../src/components/system-access/system-access.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uDAAgD;AAEhD,MAAa,sBAAsB;IAGjC,YAAY,MAAY;QACtB,IAAI,MAAM,EAAE;YACV,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;SACvB;aAAM;YACL,IAAI,CAAC,OAAO,GAAG,gBAAM,CAAC;SACvB;IACH,CAAC;IAEY,MAAM,CAAC,IAAS;;YAC3B,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACtD,CAAC;KAAA;IAEY,OAAO,CAAC,OAAY;;YAC/B,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC3D,CAAC;KAAA;IAEY,OAAO,CAAC,OAAY;;YAC/B,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAC5D,CAAC;KAAA;IAEY,MAAM,CAAC,KAAU,EAAE,IAAS;;YACvC,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAC7D,CAAC;KAAA;IAEY,MAAM,CAAC,KAAU;;YAC5B,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvD,CAAC;KAAA;CACF;AA9BD,wDA8BC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './user-group.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("./user-group.repository"), exports);
|
18
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/user-group/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export declare class UserGroupRepository {
|
2
|
+
private _prisma;
|
3
|
+
constructor(client?: any);
|
4
|
+
create(data: any): Promise<any>;
|
5
|
+
findAll(options: any): Promise<any[]>;
|
6
|
+
findOne(options: any): Promise<any>;
|
7
|
+
update(where: any, data: any): Promise<any>;
|
8
|
+
delete(where: any): Promise<any>;
|
9
|
+
}
|
@@ -0,0 +1,50 @@
|
|
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.UserGroupRepository = void 0;
|
13
|
+
const client_1 = require("../../prisma-client/client");
|
14
|
+
class UserGroupRepository {
|
15
|
+
constructor(client) {
|
16
|
+
if (client) {
|
17
|
+
this._prisma = client;
|
18
|
+
}
|
19
|
+
else {
|
20
|
+
this._prisma = client_1.default;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
create(data) {
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
25
|
+
return yield this._prisma.userGroup.create(data);
|
26
|
+
});
|
27
|
+
}
|
28
|
+
findAll(options) {
|
29
|
+
return __awaiter(this, void 0, void 0, function* () {
|
30
|
+
return yield this._prisma.userGroup.findMany(options);
|
31
|
+
});
|
32
|
+
}
|
33
|
+
findOne(options) {
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
35
|
+
return yield this._prisma.userGroup.findFirst(options);
|
36
|
+
});
|
37
|
+
}
|
38
|
+
update(where, data) {
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
40
|
+
return yield this._prisma.userGroup.update(where, data);
|
41
|
+
});
|
42
|
+
}
|
43
|
+
delete(where) {
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
45
|
+
return yield this._prisma.userGroups.delete(where);
|
46
|
+
});
|
47
|
+
}
|
48
|
+
}
|
49
|
+
exports.UserGroupRepository = UserGroupRepository;
|
50
|
+
//# sourceMappingURL=user-group.repository.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"user-group.repository.js","sourceRoot":"","sources":["../../../../src/components/user-group/user-group.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uDAAgD;AAEhD,MAAa,mBAAmB;IAG9B,YAAY,MAAY;QACtB,IAAI,MAAM,EAAE;YACV,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;SACvB;aAAM;YACL,IAAI,CAAC,OAAO,GAAG,gBAAM,CAAC;SACvB;IACH,CAAC;IAEY,MAAM,CAAC,IAAS;;YAC3B,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACnD,CAAC;KAAA;IAEY,OAAO,CAAC,OAAY;;YAC/B,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACxD,CAAC;KAAA;IAEY,OAAO,CAAC,OAAY;;YAC/B,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACzD,CAAC;KAAA;IAEY,MAAM,CAAC,KAAU,EAAE,IAAS;;YACvC,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAC1D,CAAC;KAAA;IAEY,MAAM,CAAC,KAAU;;YAC5B,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACrD,CAAC;KAAA;CACF;AA9BD,kDA8BC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './user-user-group.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("./user-user-group.repository"), exports);
|
18
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/user-user-group/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAA6C"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export declare class UserUserGroupRepository {
|
2
|
+
private _prisma;
|
3
|
+
constructor(client?: any);
|
4
|
+
create(data: any): Promise<any>;
|
5
|
+
findAll(options: any): Promise<any[]>;
|
6
|
+
findOne(options: any): Promise<any>;
|
7
|
+
update(where: any, data: any): Promise<any>;
|
8
|
+
delete(where: any): Promise<any>;
|
9
|
+
}
|
@@ -0,0 +1,50 @@
|
|
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.UserUserGroupRepository = void 0;
|
13
|
+
const client_1 = require("../../prisma-client/client");
|
14
|
+
class UserUserGroupRepository {
|
15
|
+
constructor(client) {
|
16
|
+
if (client) {
|
17
|
+
this._prisma = client;
|
18
|
+
}
|
19
|
+
else {
|
20
|
+
this._prisma = client_1.default;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
create(data) {
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
25
|
+
return yield this._prisma.userUserGroup.create(data);
|
26
|
+
});
|
27
|
+
}
|
28
|
+
findAll(options) {
|
29
|
+
return __awaiter(this, void 0, void 0, function* () {
|
30
|
+
return yield this._prisma.userUserGroup.findMany(options);
|
31
|
+
});
|
32
|
+
}
|
33
|
+
findOne(options) {
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
35
|
+
return yield this._prisma.userUserGroup.findFirst(options);
|
36
|
+
});
|
37
|
+
}
|
38
|
+
update(where, data) {
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
40
|
+
return yield this._prisma.userUserGroup.update(where, data);
|
41
|
+
});
|
42
|
+
}
|
43
|
+
delete(where) {
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
45
|
+
return yield this._prisma.userUserGroup.delete(where);
|
46
|
+
});
|
47
|
+
}
|
48
|
+
}
|
49
|
+
exports.UserUserGroupRepository = UserUserGroupRepository;
|
50
|
+
//# sourceMappingURL=user-user-group.repository.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"user-user-group.repository.js","sourceRoot":"","sources":["../../../../src/components/user-user-group/user-user-group.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uDAAgD;AAEhD,MAAa,uBAAuB;IAGlC,YAAY,MAAY;QACtB,IAAI,MAAM,EAAE;YACV,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;SACvB;aAAM;YACL,IAAI,CAAC,OAAO,GAAG,gBAAM,CAAC;SACvB;IACH,CAAC;IAEY,MAAM,CAAC,IAAS;;YAC3B,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvD,CAAC;KAAA;IAEY,OAAO,CAAC,OAAY;;YAC/B,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC5D,CAAC;KAAA;IAEY,OAAO,CAAC,OAAY;;YAC/B,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAC7D,CAAC;KAAA;IAEY,MAAM,CAAC,KAAU,EAAE,IAAS;;YACvC,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAC9D,CAAC;KAAA;IAEY,MAAM,CAAC,KAAU;;YAC5B,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACxD,CAAC;KAAA;CACF;AA9BD,0DA8BC"}
|
@@ -0,0 +1,24 @@
|
|
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
|
+
require('dotenv').config();
|
18
|
+
__exportStar(require("./components"), exports);
|
19
|
+
__exportStar(require("./interfaces"), exports);
|
20
|
+
__exportStar(require("./redis-client"), exports);
|
21
|
+
__exportStar(require("./mail"), exports);
|
22
|
+
__exportStar(require("./prisma-client"), exports);
|
23
|
+
__exportStar(require("./session"), exports);
|
24
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,CAAC;AAC3B,+CAA6B;AAC7B,+CAA6B;AAC7B,iDAA+B;AAC/B,yCAAuB;AACvB,kDAAgC;AAChC,4CAA0B"}
|
@@ -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("./system-login.interface"), exports);
|
18
|
+
__exportStar(require("./user-session.interface"), exports);
|
19
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,2DAAyC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"system-login.interface.js","sourceRoot":"","sources":["../../../src/interfaces/system-login.interface.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"user-session.interface.js","sourceRoot":"","sources":["../../../src/interfaces/user-session.interface.ts"],"names":[],"mappings":""}
|
@@ -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("./mail.service"), exports);
|
18
|
+
__exportStar(require("./mail"), exports);
|
19
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mail/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,yCAAuB"}
|
@@ -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("./send-mail.interface"), exports);
|
18
|
+
__exportStar(require("./send-new-login-alert.interface"), exports);
|
19
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mail/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,mEAAiD"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"send-mail.interface.js","sourceRoot":"","sources":["../../../../src/mail/interfaces/send-mail.interface.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"send-new-login-alert.interface.js","sourceRoot":"","sources":["../../../../src/mail/interfaces/send-new-login-alert.interface.ts"],"names":[],"mappings":""}
|