@servicelabsco/nestjs-utility-services 1.2.14 → 1.2.16
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/app.controller.js +1 -5
- package/dist/app.controller.js.map +1 -1
- package/dist/auth/controllers/index.js.map +1 -1
- package/dist/auth/dtos/index.js.map +1 -1
- package/dist/auth/entities/index.js.map +1 -1
- package/dist/auth/es6.classes.d.ts +5 -4
- package/dist/auth/es6.classes.js +2 -1
- package/dist/auth/es6.classes.js.map +1 -1
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/middlewares/client.connect.middleware.d.ts +10 -0
- package/dist/auth/middlewares/client.connect.middleware.js +45 -0
- package/dist/auth/middlewares/client.connect.middleware.js.map +1 -0
- package/dist/auth/middlewares/index.d.ts +1 -0
- package/dist/auth/middlewares/index.js +1 -0
- package/dist/auth/middlewares/index.js.map +1 -1
- package/dist/auth/services/access.manager.d.ts +1 -0
- package/dist/auth/services/access.manager.js +10 -0
- package/dist/auth/services/access.manager.js.map +1 -1
- package/dist/auth/services/index.js.map +1 -1
- package/dist/auth/services/user.service.js +5 -5
- package/dist/auth/services/user.service.js.map +1 -1
- package/dist/common/adapters/index.js.map +1 -1
- package/dist/common/dtos/database.event.dto.d.ts +1 -1
- package/dist/common/dtos/index.js.map +1 -1
- package/dist/common/dtos/report.data.manager.dto.d.ts +1 -1
- package/dist/common/dtos/report.data.manager.dto.js.map +1 -1
- package/dist/common/es6.classes.d.ts +1 -1
- package/dist/common/exceptions/index.js.map +1 -1
- package/dist/common/index.js.map +1 -1
- package/dist/common/libraries/common.job.d.ts +1 -1
- package/dist/common/libraries/common.job.js.map +1 -1
- package/dist/common/libraries/index.js.map +1 -1
- package/dist/common/libraries/platform.utility.d.ts +1 -1
- package/dist/common/libraries/platform.utility.js.map +1 -1
- package/dist/config/entity.constants.d.ts +6 -0
- package/dist/config/entity.constants.js +6 -0
- package/dist/config/entity.constants.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/migrations/1619296224563-AddMasterSeedersDataSeederTable.d.ts +8 -0
- package/dist/migrations/1619296224563-AddMasterSeedersDataSeederTable.js +59 -0
- package/dist/migrations/1619296224563-AddMasterSeedersDataSeederTable.js.map +1 -0
- package/dist/migrations/1662188562840-AddAttemptsSysUsersTable.ts.d.ts +1 -1
- package/dist/migrations/1662188562840-AddAttemptsSysUsersTable.ts.js +2 -2
- package/dist/migrations/1662188562840-AddAttemptsSysUsersTable.ts.js.map +1 -1
- package/dist/migrations/1669970181143-CreateDynamoTableTable.d.ts +1 -1
- package/dist/migrations/1669970181143-CreateDynamoTableTable.js +2 -2
- package/dist/migrations/1669970181143-CreateDynamoTableTable.js.map +1 -1
- package/dist/migrations/1675176639864-AddReportFilterTableSysReportFiltersTable.ts.d.ts +1 -1
- package/dist/migrations/1675176639864-AddReportFilterTableSysReportFiltersTable.ts.js +2 -2
- package/dist/migrations/1675176639864-AddReportFilterTableSysReportFiltersTable.ts.js.map +1 -1
- package/dist/migrations/1675876187420-AddIsEncryptedSysPropertiesTable.ts.d.ts +1 -1
- package/dist/migrations/1675876187420-AddIsEncryptedSysPropertiesTable.ts.js +2 -2
- package/dist/migrations/1675876187420-AddIsEncryptedSysPropertiesTable.ts.js.map +1 -1
- package/dist/migrations/1678730411972-CreatePendingBullJobTable.d.ts +1 -1
- package/dist/migrations/1678730411972-CreatePendingBullJobTable.js +2 -2
- package/dist/migrations/1678730411972-CreatePendingBullJobTable.js.map +1 -1
- package/dist/migrations/1697532611670-CreateClientTable.d.ts +5 -0
- package/dist/migrations/1697532611670-CreateClientTable.js +19 -0
- package/dist/migrations/1697532611670-CreateClientTable.js.map +1 -0
- package/dist/migrations/1697536293283-CreateClientCredentialTable.d.ts +5 -0
- package/dist/migrations/1697536293283-CreateClientCredentialTable.js +23 -0
- package/dist/migrations/1697536293283-CreateClientCredentialTable.js.map +1 -0
- package/dist/migrations/1697536852083-CreateCredentialIpTable.d.ts +5 -0
- package/dist/migrations/1697536852083-CreateCredentialIpTable.js +19 -0
- package/dist/migrations/1697536852083-CreateCredentialIpTable.js.map +1 -0
- package/dist/platformUtility/commands/index.js.map +1 -1
- package/dist/platformUtility/commands/sync.class.command.js +2 -2
- package/dist/platformUtility/commands/sync.class.command.js.map +1 -1
- package/dist/platformUtility/consumers/index.js.map +1 -1
- package/dist/platformUtility/controllers/index.js.map +1 -1
- package/dist/platformUtility/dtos/index.js.map +1 -1
- package/dist/platformUtility/entities/index.js.map +1 -1
- package/dist/platformUtility/es6.classes.d.ts +5 -5
- package/dist/platformUtility/index.js.map +1 -1
- package/dist/platformUtility/jobs/index.js.map +1 -1
- package/dist/platformUtility/jobs/test.job.js +2 -2
- package/dist/platformUtility/jobs/test.job.js.map +1 -1
- package/dist/platformUtility/libraries/index.js.map +1 -1
- package/dist/platformUtility/libraries/process.kaleyra.sms.js +5 -4
- package/dist/platformUtility/libraries/process.kaleyra.sms.js.map +1 -1
- package/dist/platformUtility/middlewares/index.js.map +1 -1
- package/dist/platformUtility/services/aws.config.service.js +2 -2
- package/dist/platformUtility/services/aws.config.service.js.map +1 -1
- package/dist/platformUtility/services/dynamo.service.js.map +1 -1
- package/dist/platformUtility/services/index.js.map +1 -1
- package/dist/platformUtility/services/shutdown.service.d.ts +0 -1
- package/dist/platformUtility/services/shutdown.service.js +2 -5
- package/dist/platformUtility/services/shutdown.service.js.map +1 -1
- package/dist/platformUtility/services/sqs.service.js.map +1 -1
- package/dist/platformUtility/subscribers/index.js.map +1 -1
- package/dist/security/entities/index.js.map +1 -1
- package/dist/security/index.js.map +1 -1
- package/dist/seeders/sys_column_definitions.json +255 -0
- package/dist/seeders/sys_lookup_types.json +102 -0
- package/dist/seeders/sys_lookup_values.json +386 -0
- package/dist/seeders/sys_menu_details.json +622 -0
- package/dist/seeders/sys_menu_roles.json +202 -0
- package/dist/seeders/sys_module_details.json +26 -0
- package/dist/seeders/sys_module_menus.json +222 -0
- package/dist/seeders/sys_page_definitions.json +112 -0
- package/dist/seeders/sys_parent_menus.json +112 -0
- package/dist/seeders/sys_roles.json +50 -0
- package/dist/seeders/sys_security_rules.json +178 -0
- package/dist/seeders/sys_system_scripts.json +145 -0
- package/dist/seeders/sys_ui_actions.json +386 -0
- package/dist/seeders/sys_user_roles.json +12 -0
- package/dist/system/commands/db.scanner.command.js +2 -2
- package/dist/system/commands/db.scanner.command.js.map +1 -1
- package/dist/system/commands/index.js.map +1 -1
- package/dist/system/commands/sync.all.command.d.ts +1 -1
- package/dist/system/commands/sync.all.command.js +4 -4
- package/dist/system/commands/sync.all.command.js.map +1 -1
- package/dist/system/controllers/form.controller.d.ts +2 -2
- package/dist/system/controllers/form.controller.js +2 -2
- package/dist/system/controllers/form.controller.js.map +1 -1
- package/dist/system/controllers/index.js.map +1 -1
- package/dist/system/controllers/report.controller.d.ts +1 -1
- package/dist/system/controllers/report.controller.js +2 -2
- package/dist/system/controllers/report.controller.js.map +1 -1
- package/dist/system/dtos/client.attributes.dto.d.ts +3 -0
- package/dist/system/dtos/client.attributes.dto.js +8 -0
- package/dist/system/dtos/client.attributes.dto.js.map +1 -0
- package/dist/system/dtos/client.credential.attributes.dto.d.ts +3 -0
- package/dist/system/dtos/client.credential.attributes.dto.js +8 -0
- package/dist/system/dtos/client.credential.attributes.dto.js.map +1 -0
- package/dist/system/dtos/client.credential.dto.d.ts +5 -0
- package/dist/system/dtos/client.credential.dto.js +7 -0
- package/dist/system/dtos/client.credential.dto.js.map +1 -0
- package/dist/system/dtos/credential.ip.attributes.dto.d.ts +3 -0
- package/dist/system/dtos/credential.ip.attributes.dto.js +8 -0
- package/dist/system/dtos/credential.ip.attributes.dto.js.map +1 -0
- package/dist/system/dtos/index.d.ts +4 -0
- package/dist/system/dtos/index.js +4 -0
- package/dist/system/dtos/index.js.map +1 -1
- package/dist/system/dtos/model.allowed.column.dto.d.ts +1 -1
- package/dist/system/entities/client.credential.entity.d.ts +14 -0
- package/dist/system/entities/client.credential.entity.js +57 -0
- package/dist/system/entities/client.credential.entity.js.map +1 -0
- package/dist/system/entities/client.entity.d.ts +9 -0
- package/dist/system/entities/client.entity.js +39 -0
- package/dist/system/entities/client.entity.js.map +1 -0
- package/dist/system/entities/credential.ip.entity.d.ts +9 -0
- package/dist/system/entities/credential.ip.entity.js +40 -0
- package/dist/system/entities/credential.ip.entity.js.map +1 -0
- package/dist/system/entities/dynamo.table.entity.d.ts +1 -1
- package/dist/system/entities/dynamo.table.entity.js +2 -2
- package/dist/system/entities/dynamo.table.entity.js.map +1 -1
- package/dist/system/entities/index.d.ts +3 -0
- package/dist/system/entities/index.js +3 -0
- package/dist/system/entities/index.js.map +1 -1
- package/dist/system/es6.classes.d.ts +18 -7
- package/dist/system/es6.classes.js +28 -0
- package/dist/system/es6.classes.js.map +1 -1
- package/dist/system/index.js.map +1 -1
- package/dist/system/jobs/client.credential.job.d.ts +13 -0
- package/dist/system/jobs/client.credential.job.js +44 -0
- package/dist/system/jobs/client.credential.job.js.map +1 -0
- package/dist/system/jobs/client.job.d.ts +12 -0
- package/dist/system/jobs/client.job.js +43 -0
- package/dist/system/jobs/client.job.js.map +1 -0
- package/dist/system/jobs/column.mapper.job.js +2 -2
- package/dist/system/jobs/column.mapper.job.js.map +1 -1
- package/dist/system/jobs/comment.job.js +2 -2
- package/dist/system/jobs/comment.job.js.map +1 -1
- package/dist/system/jobs/credential.ip.job.d.ts +12 -0
- package/dist/system/jobs/credential.ip.job.js +40 -0
- package/dist/system/jobs/credential.ip.job.js.map +1 -0
- package/dist/system/jobs/document.job.js +2 -2
- package/dist/system/jobs/document.job.js.map +1 -1
- package/dist/system/jobs/index.d.ts +3 -0
- package/dist/system/jobs/index.js +3 -0
- package/dist/system/jobs/index.js.map +1 -1
- package/dist/system/jobs/model.scanner.job.js +3 -3
- package/dist/system/jobs/model.scanner.job.js.map +1 -1
- package/dist/system/jobs/property.job.d.ts +2 -1
- package/dist/system/jobs/property.job.js +2 -2
- package/dist/system/jobs/property.job.js.map +1 -1
- package/dist/system/jobs/user.group.role.job.d.ts +1 -1
- package/dist/system/jobs/user.group.role.job.js.map +1 -1
- package/dist/system/libraries/business.rule.query.evaluator.js +2 -2
- package/dist/system/libraries/business.rule.query.evaluator.js.map +1 -1
- package/dist/system/libraries/index.js.map +1 -1
- package/dist/system/libraries/model.sync.js +2 -2
- package/dist/system/libraries/model.sync.js.map +1 -1
- package/dist/system/modifiers/index.js.map +1 -1
- package/dist/system/services/business.rule.service.js +2 -2
- package/dist/system/services/business.rule.service.js.map +1 -1
- package/dist/system/services/client.credential.service.d.ts +14 -0
- package/dist/system/services/client.credential.service.js +63 -0
- package/dist/system/services/client.credential.service.js.map +1 -0
- package/dist/system/services/comment.service.d.ts +1 -1
- package/dist/system/services/comment.service.js.map +1 -1
- package/dist/system/services/document.service.js +4 -3
- package/dist/system/services/document.service.js.map +1 -1
- package/dist/system/services/es6.jobs.service.d.ts +7 -1
- package/dist/system/services/es6.jobs.service.js +13 -1
- package/dist/system/services/es6.jobs.service.js.map +1 -1
- package/dist/system/services/index.d.ts +1 -0
- package/dist/system/services/index.js +1 -0
- package/dist/system/services/index.js.map +1 -1
- package/dist/system/services/report.service.d.ts +1 -1
- package/dist/system/services/report.service.js +6 -4
- package/dist/system/services/report.service.js.map +1 -1
- package/dist/system/subscribers/client.credential.subscriber.d.ts +13 -0
- package/dist/system/subscribers/client.credential.subscriber.js +44 -0
- package/dist/system/subscribers/client.credential.subscriber.js.map +1 -0
- package/dist/system/subscribers/client.subscriber.d.ts +12 -0
- package/dist/system/subscribers/client.subscriber.js +40 -0
- package/dist/system/subscribers/client.subscriber.js.map +1 -0
- package/dist/system/subscribers/credential.ip.subscriber.d.ts +12 -0
- package/dist/system/subscribers/credential.ip.subscriber.js +40 -0
- package/dist/system/subscribers/credential.ip.subscriber.js.map +1 -0
- package/dist/system/subscribers/index.d.ts +3 -0
- package/dist/system/subscribers/index.js +3 -0
- package/dist/system/subscribers/index.js.map +1 -1
- package/dist/system/subscribers/property.subscriber.d.ts +2 -2
- package/dist/system/subscribers/property.subscriber.js +5 -5
- package/dist/system/subscribers/property.subscriber.js.map +1 -1
- package/dist/system/subscribers/user.group.member.subscriber.d.ts +1 -1
- package/dist/system/subscribers/user.group.member.subscriber.js +2 -2
- package/dist/system/subscribers/user.group.member.subscriber.js.map +1 -1
- package/dist/system/subscribers/user.group.permission.subscriber.d.ts +1 -1
- package/dist/system/subscribers/user.group.permission.subscriber.js +2 -2
- package/dist/system/subscribers/user.group.permission.subscriber.js.map +1 -1
- package/dist/system/subscribers/user.group.role.subscriber.d.ts +1 -1
- package/dist/system/subscribers/user.group.role.subscriber.js +2 -2
- package/dist/system/subscribers/user.group.role.subscriber.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -0,0 +1,63 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
+
};
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
exports.ClientCredentialService = void 0;
|
13
|
+
const common_1 = require("@nestjs/common");
|
14
|
+
const date_fns_1 = require("date-fns");
|
15
|
+
const hash_1 = require("../../common/libraries/hash");
|
16
|
+
const cache_service_1 = require("../../platformUtility/services/cache.service");
|
17
|
+
const client_credential_entity_1 = require("../entities/client.credential.entity");
|
18
|
+
let ClientCredentialService = class ClientCredentialService {
|
19
|
+
constructor(cacheService) {
|
20
|
+
this.cacheService = cacheService;
|
21
|
+
}
|
22
|
+
async validate(payload) {
|
23
|
+
const data = await this.getData(payload.client_id);
|
24
|
+
if (!data)
|
25
|
+
return;
|
26
|
+
const validated = hash_1.Hash.compare(payload.client_secret, data.credential);
|
27
|
+
if (!validated)
|
28
|
+
return;
|
29
|
+
if (!data.ips.length)
|
30
|
+
return data.client_id;
|
31
|
+
const isIpSet = data.ips.includes(payload.ip);
|
32
|
+
if (isIpSet)
|
33
|
+
return data.client_id;
|
34
|
+
}
|
35
|
+
async getData(key) {
|
36
|
+
const identifier = `client.identifier.${key}`;
|
37
|
+
const data = await this.cacheService.get(identifier, null);
|
38
|
+
if (data)
|
39
|
+
return data;
|
40
|
+
const credentials = await this.getClientDetails(key);
|
41
|
+
if (!credentials)
|
42
|
+
return;
|
43
|
+
await this.cacheService.set(identifier, credentials, (0, date_fns_1.addMinutes)(new Date(), 15));
|
44
|
+
return credentials;
|
45
|
+
}
|
46
|
+
async getClientDetails(key) {
|
47
|
+
const r = await client_credential_entity_1.ClientCredentialEntity.findOne({ where: { identifier: key, active: true }, relations: ['ips', 'client'] });
|
48
|
+
if (!r?.client?.active)
|
49
|
+
return this.dropKey(key);
|
50
|
+
const ips = r?.ips.map((item) => item.ip) || [];
|
51
|
+
return { credential: r.credential, client_id: r.client_id, ips };
|
52
|
+
}
|
53
|
+
async dropKey(key) {
|
54
|
+
const identifier = `client.identifier.${key}`;
|
55
|
+
await this.cacheService.delete(identifier);
|
56
|
+
}
|
57
|
+
};
|
58
|
+
exports.ClientCredentialService = ClientCredentialService;
|
59
|
+
exports.ClientCredentialService = ClientCredentialService = __decorate([
|
60
|
+
(0, common_1.Injectable)(),
|
61
|
+
__metadata("design:paramtypes", [cache_service_1.CacheService])
|
62
|
+
], ClientCredentialService);
|
63
|
+
//# sourceMappingURL=client.credential.service.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file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U,EAAC,IAAI,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;QAEjF,OAAO,WAAW,CAAC;IACvB,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,GAAW;QAC9B,MAAM,CAAC,GAAG,MAAM,iDAAsB,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC;QAE3H,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM;YAAE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAEjD,MAAM,GAAG,GAAa,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;QAE1D,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC,UAAU,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC;IACrE,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,GAAW;QACrB,MAAM,UAAU,GAAG,qBAAqB,GAAG,EAAE,CAAC;QAC9C,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAC/C,CAAC;CACJ,CAAA;AA5CY,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,mBAAU,GAAE;qCAEkC,4BAAY;GAD9C,uBAAuB,CA4CnC"}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { SourceColumnDto } from '../../platformUtility';
|
2
1
|
import { AddCommentDto } from '../dtos/add.comment.dto';
|
3
2
|
import { CommentEntity } from '../entities/comment.entity';
|
3
|
+
import { SourceColumnDto } from '../../platformUtility/dtos/source.column.dto';
|
4
4
|
export declare class CommentService {
|
5
5
|
getComments(query: {
|
6
6
|
source_type: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"comment.service.js","sourceRoot":"","sources":["../../../src/system/services/comment.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;
|
1
|
+
{"version":3,"file":"comment.service.js","sourceRoot":"","sources":["../../../src/system/services/comment.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAE5C,+DAA2D;AASpD,IAAM,cAAc,GAApB,MAAM,cAAc;IAQvB,KAAK,CAAC,WAAW,CAAC,KAAmF;QACjG,OAAO,8BAAa,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,IAAI,GAAG,EAAE,CAAC,CAAC;IAClG,CAAC;IASD,KAAK,CAAC,UAAU,CAAC,IAAmB,EAAE,MAAwB;QAC1D,IAAI,CAAC,IAAI,CAAC,QAAQ;YAAE,OAAO;QAE3B,IAAI,MAAM,GAAG,IAAI,8BAAa,EAAE,CAAC;QAEjC,IAAI,IAAI,CAAC,EAAE;YAAE,MAAM,GAAG,MAAM,8BAAa,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAEzD,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE;YACb,MAAM,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;YACxC,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;YAEpC,MAAM,CAAC,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,IAAI,KAAK,CAAC;SAClE;QAED,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAEhC,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;IACzB,CAAC;CACJ,CAAA;AArCY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,GAAE;GACA,cAAc,CAqC1B"}
|
@@ -9,8 +9,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.DocumentService = void 0;
|
10
10
|
const common_1 = require("@nestjs/common");
|
11
11
|
const typeorm_1 = require("typeorm");
|
12
|
-
const common_2 = require("../../common");
|
13
12
|
const document_entity_1 = require("../entities/document.entity");
|
13
|
+
const access_exception_1 = require("../../common/exceptions/access.exception");
|
14
|
+
const platform_utility_1 = require("../../common/libraries/platform.utility");
|
14
15
|
let DocumentService = class DocumentService {
|
15
16
|
async getDocuments(query) {
|
16
17
|
return document_entity_1.DocumentEntity.find({
|
@@ -22,13 +23,13 @@ let DocumentService = class DocumentService {
|
|
22
23
|
async setDocument(source, file) {
|
23
24
|
if (!file.document_url)
|
24
25
|
return;
|
25
|
-
if (!
|
26
|
+
if (!platform_utility_1.PlatformUtility.isValidUrl(file.document_url))
|
26
27
|
return;
|
27
28
|
let document = document_entity_1.DocumentEntity.create({ source_type: source.source_type, source_id: source.source_id });
|
28
29
|
if (file.id)
|
29
30
|
document = await document_entity_1.DocumentEntity.first(file.id);
|
30
31
|
if (!(document.source_type === source.source_type && document.source_id === source.source_id))
|
31
|
-
throw new
|
32
|
+
throw new access_exception_1.AccessException('you donot have access to this document');
|
32
33
|
if (!document?.id)
|
33
34
|
document.document_url = file.document_url;
|
34
35
|
if (!document?.id && file.type_id)
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"document.service.js","sourceRoot":"","sources":["../../../src/system/services/document.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAC5C,qCAAsC;
|
1
|
+
{"version":3,"file":"document.service.js","sourceRoot":"","sources":["../../../src/system/services/document.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAC5C,qCAAsC;AAGtC,iEAA6D;AAC7D,+EAA2E;AAC3E,8EAA0E;AAQnE,IAAM,eAAe,GAArB,MAAM,eAAe;IAQxB,KAAK,CAAC,YAAY,CAAC,KAAmF;QAClG,OAAO,gCAAc,CAAC,IAAI,CAAC;YACvB,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,YAAY,EAAE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AsB;QAC9D,IAAI,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC;YAAE,OAAO;QAEpD,MAAM,QAAQ,GAAG,EAAE,CAAC;QAEpB,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACnB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC;QAEH,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;YACtC,OAAO,GAAG,CAAC;QACf,CAAC,CAAC,CAAC;IACP,CAAC;CACJ,CAAA;AA9DY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;GACA,eAAe,CA8D3B"}
|
@@ -1,6 +1,9 @@
|
|
1
1
|
import { CleanScheduledEventJob } from '../jobs/clean.scheduled.event.job';
|
2
|
+
import { ClientCredentialJob } from '../jobs/client.credential.job';
|
3
|
+
import { ClientJob } from '../jobs/client.job';
|
2
4
|
import { ColumnMapperJob } from '../jobs/column.mapper.job';
|
3
5
|
import { CommentJob } from '../jobs/comment.job';
|
6
|
+
import { CredentialIpJob } from '../jobs/credential.ip.job';
|
4
7
|
import { DocumentJob } from '../jobs/document.job';
|
5
8
|
import { MailValidationJob } from '../jobs/mail.validation.job';
|
6
9
|
import { MobileValidationJob } from '../jobs/mobile.validation.job';
|
@@ -17,8 +20,11 @@ import { UserGroupPermissionJob } from '../jobs/user.group.permission.job';
|
|
17
20
|
import { UserGroupRoleJob } from '../jobs/user.group.role.job';
|
18
21
|
export declare class Es6JobsService {
|
19
22
|
private readonly cleanScheduledEventJob;
|
23
|
+
private readonly clientCredentialJob;
|
24
|
+
private readonly clientJob;
|
20
25
|
private readonly columnMapperJob;
|
21
26
|
private readonly commentJob;
|
27
|
+
private readonly credentialIpJob;
|
22
28
|
private readonly documentJob;
|
23
29
|
private readonly mailValidationJob;
|
24
30
|
private readonly mobileValidationJob;
|
@@ -34,7 +40,7 @@ export declare class Es6JobsService {
|
|
34
40
|
private readonly userGroupPermissionJob;
|
35
41
|
private readonly userGroupRoleJob;
|
36
42
|
private jobs;
|
37
|
-
constructor(cleanScheduledEventJob: CleanScheduledEventJob, columnMapperJob: ColumnMapperJob, commentJob: CommentJob, documentJob: DocumentJob, mailValidationJob: MailValidationJob, mobileValidationJob: MobileValidationJob, modelScannerJob: ModelScannerJob, propertyJob: PropertyJob, refreshPropertyCacheJob: RefreshPropertyCacheJob, relationshipMapperJob: RelationshipMapperJob, reportColumnSyncJob: ReportColumnSyncJob, scheduledEventJob: ScheduledEventJob, scheduledEventsJob: ScheduledEventsJob, smsMessageJob: SmsMessageJob, userGroupMemberJob: UserGroupMemberJob, userGroupPermissionJob: UserGroupPermissionJob, userGroupRoleJob: UserGroupRoleJob);
|
43
|
+
constructor(cleanScheduledEventJob: CleanScheduledEventJob, clientCredentialJob: ClientCredentialJob, clientJob: ClientJob, columnMapperJob: ColumnMapperJob, commentJob: CommentJob, credentialIpJob: CredentialIpJob, documentJob: DocumentJob, mailValidationJob: MailValidationJob, mobileValidationJob: MobileValidationJob, modelScannerJob: ModelScannerJob, propertyJob: PropertyJob, refreshPropertyCacheJob: RefreshPropertyCacheJob, relationshipMapperJob: RelationshipMapperJob, reportColumnSyncJob: ReportColumnSyncJob, scheduledEventJob: ScheduledEventJob, scheduledEventsJob: ScheduledEventsJob, smsMessageJob: SmsMessageJob, userGroupMemberJob: UserGroupMemberJob, userGroupPermissionJob: UserGroupPermissionJob, userGroupRoleJob: UserGroupRoleJob);
|
38
44
|
alignJobs(): void;
|
39
45
|
setJobs(): void;
|
40
46
|
}
|
@@ -12,8 +12,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Es6JobsService = void 0;
|
13
13
|
const common_1 = require("@nestjs/common");
|
14
14
|
const clean_scheduled_event_job_1 = require("../jobs/clean.scheduled.event.job");
|
15
|
+
const client_credential_job_1 = require("../jobs/client.credential.job");
|
16
|
+
const client_job_1 = require("../jobs/client.job");
|
15
17
|
const column_mapper_job_1 = require("../jobs/column.mapper.job");
|
16
18
|
const comment_job_1 = require("../jobs/comment.job");
|
19
|
+
const credential_ip_job_1 = require("../jobs/credential.ip.job");
|
17
20
|
const document_job_1 = require("../jobs/document.job");
|
18
21
|
const mail_validation_job_1 = require("../jobs/mail.validation.job");
|
19
22
|
const mobile_validation_job_1 = require("../jobs/mobile.validation.job");
|
@@ -30,10 +33,13 @@ const user_group_permission_job_1 = require("../jobs/user.group.permission.job")
|
|
30
33
|
const user_group_role_job_1 = require("../jobs/user.group.role.job");
|
31
34
|
const platform_utility_1 = require("../../common/libraries/platform.utility");
|
32
35
|
let Es6JobsService = class Es6JobsService {
|
33
|
-
constructor(cleanScheduledEventJob, columnMapperJob, commentJob, documentJob, mailValidationJob, mobileValidationJob, modelScannerJob, propertyJob, refreshPropertyCacheJob, relationshipMapperJob, reportColumnSyncJob, scheduledEventJob, scheduledEventsJob, smsMessageJob, userGroupMemberJob, userGroupPermissionJob, userGroupRoleJob) {
|
36
|
+
constructor(cleanScheduledEventJob, clientCredentialJob, clientJob, columnMapperJob, commentJob, credentialIpJob, documentJob, mailValidationJob, mobileValidationJob, modelScannerJob, propertyJob, refreshPropertyCacheJob, relationshipMapperJob, reportColumnSyncJob, scheduledEventJob, scheduledEventsJob, smsMessageJob, userGroupMemberJob, userGroupPermissionJob, userGroupRoleJob) {
|
34
37
|
this.cleanScheduledEventJob = cleanScheduledEventJob;
|
38
|
+
this.clientCredentialJob = clientCredentialJob;
|
39
|
+
this.clientJob = clientJob;
|
35
40
|
this.columnMapperJob = columnMapperJob;
|
36
41
|
this.commentJob = commentJob;
|
42
|
+
this.credentialIpJob = credentialIpJob;
|
37
43
|
this.documentJob = documentJob;
|
38
44
|
this.mailValidationJob = mailValidationJob;
|
39
45
|
this.mobileValidationJob = mobileValidationJob;
|
@@ -55,8 +61,11 @@ let Es6JobsService = class Es6JobsService {
|
|
55
61
|
alignJobs() {
|
56
62
|
this.jobs = {
|
57
63
|
'6ca64f0c0b9d1a082aa5e0182020ba5b': this.cleanScheduledEventJob,
|
64
|
+
'9eb95214fbbb66f7c32576de46c95d60': this.clientCredentialJob,
|
65
|
+
aec3ee6a7bb90aef7b99e2289f7c22d6: this.clientJob,
|
58
66
|
'7f6866a3bd3e6ab3f493425ed2f5cf2a': this.columnMapperJob,
|
59
67
|
b573ba7362b8f4b0da4483dfaaa73b25: this.commentJob,
|
68
|
+
d14e1d233ff74f0c86d160cc3ec9cbfb: this.credentialIpJob,
|
60
69
|
'64c1bbde8bd1bc6355f8fa2d86a171f1': this.documentJob,
|
61
70
|
'469fd6148687123ec4ef17ed0ad5ef87': this.mailValidationJob,
|
62
71
|
fc454d05d19747fdbb8510bbc00f67dd: this.mobileValidationJob,
|
@@ -81,8 +90,11 @@ exports.Es6JobsService = Es6JobsService;
|
|
81
90
|
exports.Es6JobsService = Es6JobsService = __decorate([
|
82
91
|
(0, common_1.Injectable)(),
|
83
92
|
__metadata("design:paramtypes", [clean_scheduled_event_job_1.CleanScheduledEventJob,
|
93
|
+
client_credential_job_1.ClientCredentialJob,
|
94
|
+
client_job_1.ClientJob,
|
84
95
|
column_mapper_job_1.ColumnMapperJob,
|
85
96
|
comment_job_1.CommentJob,
|
97
|
+
credential_ip_job_1.CredentialIpJob,
|
86
98
|
document_job_1.DocumentJob,
|
87
99
|
mail_validation_job_1.MailValidationJob,
|
88
100
|
mobile_validation_job_1.MobileValidationJob,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"es6.jobs.service.js","sourceRoot":"","sources":["../../../src/system/services/es6.jobs.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,iFAA2E;AAC3E,iEAA4D;AAC5D,qDAAiD;AACjD,uDAAmD;AACnD,qEAAgE;AAChE,yEAAoE;AACpE,iEAA4D;AAC5D,uDAAmD;AACnD,mFAA6E;AAC7E,6EAAwE;AACxE,2EAAqE;AACrE,qEAAgE;AAChE,uEAAkE;AAClE,6DAAwD;AACxD,yEAAmE;AACnE,iFAA2E;AAC3E,qEAA+D;AAC/D,8EAA0E;AAQnE,IAAM,cAAc,GAApB,MAAM,cAAc;IAGvB,YACqB,sBAA8C,EAC9C,eAAgC,EAChC,UAAsB,EACtB,WAAwB,EACxB,iBAAoC,EACpC,mBAAwC,EACxC,eAAgC,EAChC,WAAwB,EACxB,uBAAgD,EAChD,qBAA4C,EAC5C,mBAAwC,EACxC,iBAAoC,EACpC,kBAAsC,EACtC,aAA4B,EAC5B,kBAAsC,EACtC,sBAA8C,EAC9C,gBAAkC;
|
1
|
+
{"version":3,"file":"es6.jobs.service.js","sourceRoot":"","sources":["../../../src/system/services/es6.jobs.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,iFAA2E;AAC3E,yEAAoE;AACpE,mDAA+C;AAC/C,iEAA4D;AAC5D,qDAAiD;AACjD,iEAA4D;AAC5D,uDAAmD;AACnD,qEAAgE;AAChE,yEAAoE;AACpE,iEAA4D;AAC5D,uDAAmD;AACnD,mFAA6E;AAC7E,6EAAwE;AACxE,2EAAqE;AACrE,qEAAgE;AAChE,uEAAkE;AAClE,6DAAwD;AACxD,yEAAmE;AACnE,iFAA2E;AAC3E,qEAA+D;AAC/D,8EAA0E;AAQnE,IAAM,cAAc,GAApB,MAAM,cAAc;IAGvB,YACqB,sBAA8C,EAC9C,mBAAwC,EACxC,SAAoB,EACpB,eAAgC,EAChC,UAAsB,EACtB,eAAgC,EAChC,WAAwB,EACxB,iBAAoC,EACpC,mBAAwC,EACxC,eAAgC,EAChC,WAAwB,EACxB,uBAAgD,EAChD,qBAA4C,EAC5C,mBAAwC,EACxC,iBAAoC,EACpC,kBAAsC,EACtC,aAA4B,EAC5B,kBAAsC,EACtC,sBAA8C,EAC9C,gBAAkC;QAnBlC,2BAAsB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I,CAAC,eAAe;YACxD,kCAAkC,EAAE,IAAI,CAAC,WAAW;YACpD,gCAAgC,EAAE,IAAI,CAAC,uBAAuB;YAC9D,kCAAkC,EAAE,IAAI,CAAC,qBAAqB;YAC9D,kCAAkC,EAAE,IAAI,CAAC,mBAAmB;YAC5D,gCAAgC,EAAE,IAAI,CAAC,iBAAiB;YACxD,gCAAgC,EAAE,IAAI,CAAC,kBAAkB;YACzD,kCAAkC,EAAE,IAAI,CAAC,aAAa;YACtD,gCAAgC,EAAE,IAAI,CAAC,kBAAkB;YACzD,kCAAkC,EAAE,IAAI,CAAC,sBAAsB;YAC/D,kCAAkC,EAAE,IAAI,CAAC,gBAAgB;SAC5D,CAAC;IACN,CAAC;IAMD,OAAO;QACH,kCAAe,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;CACJ,CAAA;AAjEY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,GAAE;qCAKoC,kDAAsB;QACzB,2CAAmB;QAC7B,sBAAS;QACH,mCAAe;QACpB,wBAAU;QACL,mCAAe;QACnB,0BAAW;QACL,uCAAiB;QACf,2CAAmB;QACvB,mCAAe;QACnB,0BAAW;QACC,oDAAuB;QACzB,+CAAqB;QACvB,4CAAmB;QACrB,uCAAiB;QAChB,yCAAkB;QACvB,+BAAa;QACR,0CAAkB;QACd,kDAAsB;QAC5B,sCAAgB;GAvB9C,cAAc,CAiE1B"}
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
17
|
__exportStar(require("./aws.s3.service"), exports);
|
18
18
|
__exportStar(require("./business.rule.service"), exports);
|
19
|
+
__exportStar(require("./client.credential.service"), exports);
|
19
20
|
__exportStar(require("./client.script.service"), exports);
|
20
21
|
__exportStar(require("./column.service"), exports);
|
21
22
|
__exportStar(require("./comment.service"), exports);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/system/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/system/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AAAA,0DAAwC;AAAA,8DAA4C;AAAA,0DAAwC;AAAA,mDAAiC;AAAA,oDAAkC;AAAA,mDAAiC;AAAA,qDAAmC;AAAA,yDAAuC;AAAA,wDAAsC;AAAA,iDAA+B;AAAA,iDAA+B;AAAA,4DAA0C;AAAA,iDAA+B;AAAA,8DAA4C;AAAA,kDAAgC;AAAA,uDAAqC;AAAA,qDAAmC;AAAA,mDAAiC;AAAA,4DAA0C;AAAA,0DAAwC;AAAA,sDAAoC;AAAA,mDAAiC;AAAA,4DAAyC"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { AccessManager } from '../../auth/services/access.manager';
|
2
|
-
import { ReportEntity } from '../entities';
|
2
|
+
import { ReportEntity } from '../entities/report.entity';
|
3
3
|
import { PreferenceService } from './preference.service';
|
4
4
|
import { UiActionService } from './ui.action.service';
|
5
5
|
export declare class ReportService {
|
@@ -13,7 +13,9 @@ exports.ReportService = void 0;
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
14
14
|
const access_manager_1 = require("../../auth/services/access.manager");
|
15
15
|
const operation_exception_1 = require("../../common/exceptions/operation.exception");
|
16
|
-
const
|
16
|
+
const chart_entity_1 = require("../entities/chart.entity");
|
17
|
+
const report_entity_1 = require("../entities/report.entity");
|
18
|
+
const report_role_entity_1 = require("../entities/report.role.entity");
|
17
19
|
const preference_service_1 = require("./preference.service");
|
18
20
|
const ui_action_service_1 = require("./ui.action.service");
|
19
21
|
const ROLEMAPPING = require("../../config/role.mapping");
|
@@ -25,7 +27,7 @@ let ReportService = class ReportService {
|
|
25
27
|
this.uiActionService = uiActionService;
|
26
28
|
}
|
27
29
|
async hasAccess(id) {
|
28
|
-
const assignments = await
|
30
|
+
const assignments = await report_role_entity_1.ReportRoleEntity.find({
|
29
31
|
where: { report_id: id },
|
30
32
|
});
|
31
33
|
if (assignments.length === 0) {
|
@@ -34,12 +36,12 @@ let ReportService = class ReportService {
|
|
34
36
|
return this.accessManager.hasRoleAssignments(assignments);
|
35
37
|
}
|
36
38
|
async getReportDetails(id) {
|
37
|
-
const report = await
|
39
|
+
const report = await report_entity_1.ReportEntity.first(id, {
|
38
40
|
relations: ['params'],
|
39
41
|
});
|
40
42
|
if (!report)
|
41
43
|
throw new operation_exception_1.OperationException('Report doesnot exist');
|
42
|
-
report.charts = await
|
44
|
+
report.charts = await chart_entity_1.ChartEntity.find({
|
43
45
|
where: { source_type: SOURCEHASH.report, source_id: id },
|
44
46
|
relations: ['primary_axis', 'secondary_axis'],
|
45
47
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"report.service.js","sourceRoot":"","sources":["../../../src/system/services/report.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,uEAAmE;AACnE,qFAAiF;AACjF,
|
1
|
+
{"version":3,"file":"report.service.js","sourceRoot":"","sources":["../../../src/system/services/report.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,uEAAmE;AACnE,qFAAiF;AACjF,2DAAuD;AACvD,6DAAyD;AACzD,uEAAkE;AAClE,6DAAyD;AACzD,2DAAsD;AACtD,yDAA0D;AAC1D,uDAAwD;AAGjD,IAAM,aAAa,GAAnB,MAAM,aAAa;IACtB,YACqB,aAA4B,EAC5B,iBAAoC,EACpC,eAAgC;QAFhC,kBAAa,GAAb,aAAa,CAAe;QAC5B,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,oBAAe,GAAf,eAAe,CAAiB;IAClD,CAAC;IAEJ,KAAK,CAAC,SAAS,CAAC,EAAU;QACtB,MAAM,WAAW,GAAG,MAAM,qCAAgB,CAAC,IAAI,CAAC;YAC5C,KAAK,EAAE,E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vent, UpdateEvent } from 'typeorm';
|
2
|
+
import { CommonSubscriber } from '../../common/libraries/common.subscriber';
|
3
|
+
import { ClientCredentialEntity } from '../entities/client.credential.entity';
|
4
|
+
import { ClientCredentialJob } from '../jobs/client.credential.job';
|
5
|
+
export declare class ClientCredentialSubscriber extends CommonSubscriber<ClientCredentialEntity> {
|
6
|
+
private readonly dataSource;
|
7
|
+
private readonly clientCredentialJob;
|
8
|
+
constructor(dataSource: DataSource, clientCredentialJob: ClientCredentialJob);
|
9
|
+
listenTo(): typeof ClientCredentialEntity;
|
10
|
+
beforeInsert(event: InsertEvent<ClientCredentialEntity>): Promise<void>;
|
11
|
+
afterInsert(event: InsertEvent<ClientCredentialEntity>): Promise<void>;
|
12
|
+
afterUpdate(event: UpdateEvent<ClientCredentialEntity>): Promise<void>;
|
13
|
+
}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
+
};
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
exports.ClientCredentialSubscriber = void 0;
|
13
|
+
const typeorm_1 = require("typeorm");
|
14
|
+
const common_subscriber_1 = require("../../common/libraries/common.subscriber");
|
15
|
+
const hash_1 = require("../../common/libraries/hash");
|
16
|
+
const client_credential_entity_1 = require("../entities/client.credential.entity");
|
17
|
+
const client_credential_job_1 = require("../jobs/client.credential.job");
|
18
|
+
let ClientCredentialSubscriber = class ClientCredentialSubscriber extends common_subscriber_1.CommonSubscriber {
|
19
|
+
constructor(dataSource, clientCredentialJob) {
|
20
|
+
super();
|
21
|
+
this.dataSource = dataSource;
|
22
|
+
this.clientCredentialJob = clientCredentialJob;
|
23
|
+
dataSource.subscribers.push(this);
|
24
|
+
}
|
25
|
+
listenTo() {
|
26
|
+
return client_credential_entity_1.ClientCredentialEntity;
|
27
|
+
}
|
28
|
+
async beforeInsert(event) {
|
29
|
+
event.entity.credential = hash_1.Hash.hash(event.entity.credential);
|
30
|
+
}
|
31
|
+
async afterInsert(event) {
|
32
|
+
await this.clientCredentialJob.delayedDispatch(this.getEventData(event));
|
33
|
+
}
|
34
|
+
async afterUpdate(event) {
|
35
|
+
await this.clientCredentialJob.delayedDispatch(this.getEventData(event));
|
36
|
+
}
|
37
|
+
};
|
38
|
+
exports.ClientCredentialSubscriber = ClientCredentialSubscriber;
|
39
|
+
exports.ClientCredentialSubscriber = ClientCredentialSubscriber = __decorate([
|
40
|
+
(0, typeorm_1.EventSubscriber)(),
|
41
|
+
__metadata("design:paramtypes", [typeorm_1.DataSource,
|
42
|
+
client_credential_job_1.ClientCredentialJob])
|
43
|
+
], ClientCredentialSubscriber);
|
44
|
+
//# sourceMappingURL=client.credential.subscriber.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"client.credential.subscriber.js","sourceRoot":"","sources":["../../../src/system/subscribers/client.credential.subscriber.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgF;AAChF,gFAA4E;AAC5E,sDAAmD;AACnD,mFAA8E;AAC9E,yEAAoE;AAE7D,IAAM,0BAA0B,GAAhC,MAAM,0BAA2B,SAAQ,oCAAwC;IACpF,YACqB,UAAsB,EACtB,mBAAwC;QAEzD,KAAK,EAAE,CAAC;QAHS,eAAU,GAAV,UAAU,CAAY;QACtB,wBAAmB,GAAnB,mBAAmB,CAAqB;QAGzD,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IACD,QAAQ;QACJ,OAAO,iDAAsB,CAAC;IAClC,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,KAA0C;QACzD,KAAK,CAAC,MAAM,CAAC,UAAU,GAAG,WAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IACjE,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,KAA0C;QACxD,MAAM,IAAI,CAAC,mBAAmB,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7E,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,KAA0C;QACxD,MAAM,IAAI,CAAC,mBAAmB,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7E,CAAC;CACJ,CAAA;AAvBY,gEAA0B;qCAA1B,0BAA0B;IADtC,IAAA,yBAAe,GAAE;qCAGmB,oBAAU;QACD,2CAAmB;GAHpD,0BAA0B,CAuBtC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { DataSource, InsertEvent, UpdateEvent } from 'typeorm';
|
2
|
+
import { ClientEntity } from '../entities/client.entity';
|
3
|
+
import { ClientJob } from '../jobs/client.job';
|
4
|
+
import { CommonSubscriber } from '../../common/libraries/common.subscriber';
|
5
|
+
export declare class ClientSubscriber extends CommonSubscriber<ClientEntity> {
|
6
|
+
private readonly dataSource;
|
7
|
+
private readonly clientJob;
|
8
|
+
constructor(dataSource: DataSource, clientJob: ClientJob);
|
9
|
+
listenTo(): typeof ClientEntity;
|
10
|
+
afterInsert(event: InsertEvent<ClientEntity>): Promise<void>;
|
11
|
+
afterUpdate(event: UpdateEvent<ClientEntity>): Promise<void>;
|
12
|
+
}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
+
};
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
exports.ClientSubscriber = void 0;
|
13
|
+
const typeorm_1 = require("typeorm");
|
14
|
+
const client_entity_1 = require("../entities/client.entity");
|
15
|
+
const client_job_1 = require("../jobs/client.job");
|
16
|
+
const common_subscriber_1 = require("../../common/libraries/common.subscriber");
|
17
|
+
let ClientSubscriber = class ClientSubscriber extends common_subscriber_1.CommonSubscriber {
|
18
|
+
constructor(dataSource, clientJob) {
|
19
|
+
super();
|
20
|
+
this.dataSource = dataSource;
|
21
|
+
this.clientJob = clientJob;
|
22
|
+
dataSource.subscribers.push(this);
|
23
|
+
}
|
24
|
+
listenTo() {
|
25
|
+
return client_entity_1.ClientEntity;
|
26
|
+
}
|
27
|
+
async afterInsert(event) {
|
28
|
+
await this.clientJob.delayedDispatch(this.getEventData(event));
|
29
|
+
}
|
30
|
+
async afterUpdate(event) {
|
31
|
+
await this.clientJob.delayedDispatch(this.getEventData(event));
|
32
|
+
}
|
33
|
+
};
|
34
|
+
exports.ClientSubscriber = ClientSubscriber;
|
35
|
+
exports.ClientSubscriber = ClientSubscriber = __decorate([
|
36
|
+
(0, typeorm_1.EventSubscriber)(),
|
37
|
+
__metadata("design:paramtypes", [typeorm_1.DataSource,
|
38
|
+
client_job_1.ClientJob])
|
39
|
+
], ClientSubscriber);
|
40
|
+
//# sourceMappingURL=client.subscriber.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"client.subscriber.js","sourceRoot":"","sources":["../../../src/system/subscribers/client.subscriber.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgF;AAChF,6DAAyD;AACzD,mDAA+C;AAC/C,gFAA4E;AAGrE,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,oCAA8B;IAChE,YACqB,UAAsB,EACtB,SAAoB;QAErC,KAAK,EAAE,CAAC;QAHS,eAAU,GAAV,UAAU,CAAY;QACtB,cAAS,GAAT,SAAS,CAAW;QAGrC,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IACD,QAAQ;QACJ,OAAO,4BAAY,CAAC;IACxB,CAAC;IACD,KAAK,CAAC,WAAW,CAAC,KAAgC;QAC9C,MAAM,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;IACnE,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,KAAgC;QAC9C,MAAM,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;IACnE,CAAC;CACJ,CAAA;AAlBY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,yBAAe,GAAE;qCAGmB,oBAAU;QACX,sBAAS;GAHhC,gBAAgB,CAkB5B"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { DataSource, InsertEvent, UpdateEvent } from 'typeorm';
|
2
|
+
import { CredentialIpEntity } from '../entities/credential.ip.entity';
|
3
|
+
import { CredentialIpJob } from '../jobs/credential.ip.job';
|
4
|
+
import { CommonSubscriber } from '../../common/libraries/common.subscriber';
|
5
|
+
export declare class CredentialIpSubscriber extends CommonSubscriber<CredentialIpEntity> {
|
6
|
+
private readonly dataSource;
|
7
|
+
private readonly credentialIpJob;
|
8
|
+
constructor(dataSource: DataSource, credentialIpJob: CredentialIpJob);
|
9
|
+
listenTo(): typeof CredentialIpEntity;
|
10
|
+
afterInsert(event: InsertEvent<CredentialIpEntity>): Promise<void>;
|
11
|
+
afterUpdate(event: UpdateEvent<CredentialIpEntity>): Promise<void>;
|
12
|
+
}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
+
};
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
exports.CredentialIpSubscriber = void 0;
|
13
|
+
const typeorm_1 = require("typeorm");
|
14
|
+
const credential_ip_entity_1 = require("../entities/credential.ip.entity");
|
15
|
+
const credential_ip_job_1 = require("../jobs/credential.ip.job");
|
16
|
+
const common_subscriber_1 = require("../../common/libraries/common.subscriber");
|
17
|
+
let CredentialIpSubscriber = class CredentialIpSubscriber extends common_subscriber_1.CommonSubscriber {
|
18
|
+
constructor(dataSource, credentialIpJob) {
|
19
|
+
super();
|
20
|
+
this.dataSource = dataSource;
|
21
|
+
this.credentialIpJob = credentialIpJob;
|
22
|
+
dataSource.subscribers.push(this);
|
23
|
+
}
|
24
|
+
listenTo() {
|
25
|
+
return credential_ip_entity_1.CredentialIpEntity;
|
26
|
+
}
|
27
|
+
async afterInsert(event) {
|
28
|
+
await this.credentialIpJob.delayedDispatch(this.getEventData(event));
|
29
|
+
}
|
30
|
+
async afterUpdate(event) {
|
31
|
+
await this.credentialIpJob.delayedDispatch(this.getEventData(event));
|
32
|
+
}
|
33
|
+
};
|
34
|
+
exports.CredentialIpSubscriber = CredentialIpSubscriber;
|
35
|
+
exports.CredentialIpSubscriber = CredentialIpSubscriber = __decorate([
|
36
|
+
(0, typeorm_1.EventSubscriber)(),
|
37
|
+
__metadata("design:paramtypes", [typeorm_1.DataSource,
|
38
|
+
credential_ip_job_1.CredentialIpJob])
|
39
|
+
], CredentialIpSubscriber);
|
40
|
+
//# sourceMappingURL=credential.ip.subscriber.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"credential.ip.subscriber.js","sourceRoot":"","sources":["../../../src/system/subscribers/credential.ip.subscriber.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgF;AAChF,2EAAsE;AACtE,iEAA4D;AAC5D,gFAA4E;AAErE,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,oCAAoC;IAC5E,YACqB,UAAsB,EACtB,eAAgC;QAEjD,KAAK,EAAE,CAAC;QAHS,eAAU,GAAV,UAAU,CAAY;QACtB,oBAAe,GAAf,eAAe,CAAiB;QAGjD,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IACD,QAAQ;QACJ,OAAO,yCAAkB,CAAC;IAC9B,CAAC;IACD,KAAK,CAAC,WAAW,CAAC,KAAsC;QACpD,MAAM,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;IACzE,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,KAAsC;QACpD,MAAM,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;IACzE,CAAC;CACJ,CAAA;AAlBY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,yBAAe,GAAE;qCAGmB,oBAAU;QACL,mCAAe;GAH5C,sBAAsB,CAkBlC"}
|
@@ -1,5 +1,8 @@
|
|
1
|
+
export * from './client.credential.subscriber';
|
2
|
+
export * from './client.subscriber';
|
1
3
|
export * from './column.subscriber';
|
2
4
|
export * from './comment.subscriber';
|
5
|
+
export * from './credential.ip.subscriber';
|
3
6
|
export * from './document.subscriber';
|
4
7
|
export * from './mail.validation.subscriber';
|
5
8
|
export * from './mobile.validation.subscriber';
|
@@ -14,8 +14,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./client.credential.subscriber"), exports);
|
18
|
+
__exportStar(require("./client.subscriber"), exports);
|
17
19
|
__exportStar(require("./column.subscriber"), exports);
|
18
20
|
__exportStar(require("./comment.subscriber"), exports);
|
21
|
+
__exportStar(require("./credential.ip.subscriber"), exports);
|
19
22
|
__exportStar(require("./document.subscriber"), exports);
|
20
23
|
__exportStar(require("./mail.validation.subscriber"), exports);
|
21
24
|
__exportStar(require("./mobile.validation.subscriber"), exports);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/system/subscribers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/system/subscribers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iEAA+C;AAAA,sDAAoC;AAAA,sDAAoC;AAAA,uDAAqC;AAAA,6DAA2C;AAAA,wDAAsC;AAAA,+DAA6C;AAAA,iEAA+C;AAAA,wDAAsC;AAAA,4DAA0C;AAAA,+DAA6C;AAAA,2DAAyC;AAAA,iEAA+C;AAAA,qEAAmD;AAAA,+DAA4C"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { DataSource, InsertEvent, UpdateEvent } from 'typeorm';
|
2
|
-
import { CommonSubscriber } from '../../common';
|
3
|
-
import { PropertyEntity } from '../entities';
|
2
|
+
import { CommonSubscriber } from '../../common/libraries/common.subscriber';
|
3
|
+
import { PropertyEntity } from '../entities/property.entity';
|
4
4
|
import { PropertyJob } from '../jobs/property.job';
|
5
5
|
export declare class PropertySubscriber extends CommonSubscriber<PropertyEntity> {
|
6
6
|
private readonly dataSource;
|
@@ -11,11 +11,11 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
12
|
exports.PropertySubscriber = void 0;
|
13
13
|
const typeorm_1 = require("typeorm");
|
14
|
-
const
|
15
|
-
const entities_1 = require("../entities");
|
16
|
-
const property_job_1 = require("../jobs/property.job");
|
14
|
+
const common_subscriber_1 = require("../../common/libraries/common.subscriber");
|
17
15
|
const custom_crypt_1 = require("../../common/libraries/custom.crypt");
|
18
|
-
|
16
|
+
const property_entity_1 = require("../entities/property.entity");
|
17
|
+
const property_job_1 = require("../jobs/property.job");
|
18
|
+
let PropertySubscriber = class PropertySubscriber extends common_subscriber_1.CommonSubscriber {
|
19
19
|
constructor(dataSource, propertyJob) {
|
20
20
|
super();
|
21
21
|
this.dataSource = dataSource;
|
@@ -23,7 +23,7 @@ let PropertySubscriber = class PropertySubscriber extends common_1.CommonSubscri
|
|
23
23
|
dataSource.subscribers.push(this);
|
24
24
|
}
|
25
25
|
listenTo() {
|
26
|
-
return
|
26
|
+
return property_entity_1.PropertyEntity;
|
27
27
|
}
|
28
28
|
async beforeInsert(event) {
|
29
29
|
if (event.entity.is_encrypted)
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"property.subscriber.js","sourceRoot":"","sources":["../../../src/system/subscribers/property.subscriber.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgF;AAChF,
|
1
|
+
{"version":3,"file":"property.subscriber.js","sourceRoot":"","sources":["../../../src/system/subscribers/property.subscriber.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgF;AAChF,gFAA4E;AAC5E,sEAAkE;AAClE,iEAA6D;AAC7D,uDAAmD;AAE5C,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,oCAAgC;IACpE,YACqB,UAAsB,EACtB,WAAwB;QAEzC,KAAK,EAAE,CAAC;QAHS,eAAU,GAAV,UAAU,CAAY;QACtB,gBAAW,GAAX,WAAW,CAAa;QAGzC,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IACD,QAAQ;QACJ,OAAO,gCAAc,CAAC;IAC1B,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,KAAkC;QACjD,IAAI,KAAK,CAAC,MAAM,CAAC,YAAY;YAAE,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,0BAAW,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAChG,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,KAAkC;QAChD,OAAO,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC;IACrE,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,KAAkC;QACjD,IAAI,KAAK,CAAC,MAAM,CAAC,YAAY,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,KAAK,KAAK,CAAC,cAAc,CAAC,KAAK;YAC9E,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,0BAAW,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACrE,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,KAAkC;QAChD,OAAO,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC;IACrE,CAAC;CACJ,CAAA;AA5BY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,yBAAe,GAAE;qCAGmB,oBAAU;QACT,0BAAW;GAHpC,kBAAkB,CA4B9B"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { DataSource, InsertEvent, UpdateEvent } from 'typeorm';
|
2
|
-
import { CommonSubscriber } from '../../common';
|
3
2
|
import { UserGroupMemberEntity } from '../entities/user.group.member.entity';
|
4
3
|
import { UserGroupMemberJob } from '../jobs/user.group.member.job';
|
4
|
+
import { CommonSubscriber } from '../../common/libraries/common.subscriber';
|
5
5
|
export declare class UserGroupMemberSubscriber extends CommonSubscriber<UserGroupMemberEntity> {
|
6
6
|
private readonly dataSource;
|
7
7
|
private readonly userGroupMemberJob;
|
@@ -11,10 +11,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
12
|
exports.UserGroupMemberSubscriber = void 0;
|
13
13
|
const typeorm_1 = require("typeorm");
|
14
|
-
const common_1 = require("../../common");
|
15
14
|
const user_group_member_entity_1 = require("../entities/user.group.member.entity");
|
16
15
|
const user_group_member_job_1 = require("../jobs/user.group.member.job");
|
17
|
-
|
16
|
+
const common_subscriber_1 = require("../../common/libraries/common.subscriber");
|
17
|
+
let UserGroupMemberSubscriber = class UserGroupMemberSubscriber extends common_subscriber_1.CommonSubscriber {
|
18
18
|
constructor(dataSource, userGroupMemberJob) {
|
19
19
|
super();
|
20
20
|
this.dataSource = dataSource;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"user.group.member.subscriber.js","sourceRoot":"","sources":["../../../src/system/subscribers/user.group.member.subscriber.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgF;AAChF,
|
1
|
+
{"version":3,"file":"user.group.member.subscriber.js","sourceRoot":"","sources":["../../../src/system/subscribers/user.group.member.subscriber.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgF;AAChF,mFAA6E;AAC7E,yEAAmE;AACnE,gFAA4E;AAGrE,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,oCAAuC;IAClF,YACqB,UAAsB,EACtB,kBAAsC;QAEvD,KAAK,EAAE,CAAC;QAHS,eAAU,GAAV,UAAU,CAAY;QACtB,uBAAkB,GAAlB,kBAAkB,CAAoB;QAGvD,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IACD,QAAQ;QACJ,OAAO,gDAAqB,CAAC;IACjC,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,KAAyC;QACvD,MAAM,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACzD,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,KAAyC;QACvD,MAAM,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACzD,CAAC;CACJ,CAAA;AAnBY,8DAAyB;oCAAzB,yBAAyB;IADrC,IAAA,yBAAe,GAAE;qCAGmB,oBAAU;QACF,0CAAkB;GAHlD,yBAAyB,CAmBrC"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { DataSource, InsertEvent, UpdateEvent } from 'typeorm';
|
2
|
-
import { CommonSubscriber } from '../../common';
|
3
2
|
import { UserGroupPermissionEntity } from '../entities/user.group.permission.entity';
|
4
3
|
import { UserGroupPermissionJob } from '../jobs/user.group.permission.job';
|
4
|
+
import { CommonSubscriber } from '../../common/libraries/common.subscriber';
|
5
5
|
export declare class UserGroupPermissionSubscriber extends CommonSubscriber<UserGroupPermissionEntity> {
|
6
6
|
private readonly dataSource;
|
7
7
|
private readonly userGroupPermissionJob;
|