@servicelabsco/nestjs-utility-services 1.2.133 → 1.2.135
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.d.ts +2 -3
- package/dist/app.controller.js +7 -31
- package/dist/app.controller.js.map +1 -1
- package/dist/app.module.js +2 -0
- package/dist/app.module.js.map +1 -1
- package/dist/auth/auth.module.js +1 -1
- package/dist/auth/auth.module.js.map +1 -1
- package/dist/auth/services/access.service.d.ts +3 -1
- package/dist/auth/services/access.service.js +6 -1
- package/dist/auth/services/access.service.js.map +1 -1
- package/dist/auth/services/auth.service.d.ts +3 -1
- package/dist/auth/services/auth.service.js +4 -1
- package/dist/auth/services/auth.service.js.map +1 -1
- package/dist/auth/services/es6.service.d.ts +1 -7
- package/dist/auth/services/es6.service.js +1 -13
- package/dist/auth/services/es6.service.js.map +1 -1
- package/dist/auth/services/user.service.d.ts +3 -1
- package/dist/auth/services/user.service.js +4 -1
- package/dist/auth/services/user.service.js.map +1 -1
- package/dist/common/es6.classes.js +2 -0
- package/dist/common/es6.classes.js.map +1 -1
- package/dist/common/libraries/common.mongo.entity.d.ts +2 -1
- package/dist/common/libraries/common.mongo.entity.js +3 -2
- package/dist/common/libraries/common.mongo.entity.js.map +1 -1
- package/dist/common/libraries/common.service.d.ts +3 -0
- package/dist/common/libraries/common.service.js +10 -0
- package/dist/common/libraries/common.service.js.map +1 -0
- package/dist/common/libraries/common.subscriber.d.ts +2 -0
- package/dist/common/libraries/common.subscriber.js +15 -5
- package/dist/common/libraries/common.subscriber.js.map +1 -1
- package/dist/common/libraries/index.d.ts +1 -0
- package/dist/common/libraries/index.js +1 -0
- package/dist/common/libraries/index.js.map +1 -1
- package/dist/config/mongo.config.js +3 -6
- package/dist/config/mongo.config.js.map +1 -1
- package/dist/platformUtility/es6.classes.d.ts +2 -2
- package/dist/platformUtility/platform.utility.module.js +2 -0
- package/dist/platformUtility/platform.utility.module.js.map +1 -1
- package/dist/platformUtility/services/cache.service.d.ts +3 -1
- package/dist/platformUtility/services/cache.service.js +4 -1
- package/dist/platformUtility/services/cache.service.js.map +1 -1
- package/dist/platformUtility/services/es6.service.d.ts +1 -27
- package/dist/platformUtility/services/es6.service.js +3 -55
- package/dist/platformUtility/services/es6.service.js.map +1 -1
- package/dist/platformUtility/services/queue.service.d.ts +3 -1
- package/dist/platformUtility/services/queue.service.js +4 -1
- package/dist/platformUtility/services/queue.service.js.map +1 -1
- package/dist/platformUtility/services/remote.request.service.d.ts +3 -1
- package/dist/platformUtility/services/remote.request.service.js +4 -1
- package/dist/platformUtility/services/remote.request.service.js.map +1 -1
- package/dist/platformUtility/services/sql.service.d.ts +3 -1
- package/dist/platformUtility/services/sql.service.js +4 -1
- package/dist/platformUtility/services/sql.service.js.map +1 -1
- package/dist/platformUtility/services/sqs.service.d.ts +2 -0
- package/dist/platformUtility/services/sqs.service.js +25 -0
- package/dist/platformUtility/services/sqs.service.js.map +1 -1
- package/dist/system/es6.classes.d.ts +7 -14
- package/dist/system/es6.classes.js +6 -22
- package/dist/system/es6.classes.js.map +1 -1
- package/dist/system/index.d.ts +1 -1
- package/dist/system/index.js +1 -1
- package/dist/system/index.js.map +1 -1
- package/dist/system/jobs/index.d.ts +1 -0
- package/dist/system/jobs/index.js +1 -0
- package/dist/system/jobs/index.js.map +1 -1
- package/dist/system/jobs/sync.all.code.job.d.ts +2 -2
- package/dist/system/jobs/sync.all.code.job.js +2 -3
- package/dist/system/jobs/sync.all.code.job.js.map +1 -1
- package/dist/system/jobs/test.mongo.job.d.ts +9 -0
- package/dist/system/jobs/test.mongo.job.js +30 -0
- package/dist/system/jobs/test.mongo.job.js.map +1 -0
- package/dist/system/libraries/business.rule.query.evaluator.d.ts +2 -2
- package/dist/system/libraries/business.rule.query.evaluator.js.map +1 -1
- package/dist/system/mentities/index.d.ts +1 -0
- package/dist/system/{commands → mentities}/index.js +1 -9
- package/dist/system/mentities/index.js.map +1 -0
- package/dist/system/mentities/test.mentity.d.ts +7 -0
- package/dist/system/mentities/test.mentity.js +37 -0
- package/dist/system/mentities/test.mentity.js.map +1 -0
- package/dist/system/services/{common.service.d.ts → base.service.d.ts} +2 -2
- package/dist/system/services/{common.service.js → base.service.js} +7 -7
- package/dist/system/services/base.service.js.map +1 -0
- package/dist/system/services/business.rule.service.d.ts +5 -3
- package/dist/system/services/business.rule.service.js +6 -3
- package/dist/system/services/business.rule.service.js.map +1 -1
- package/dist/system/services/comment.service.d.ts +3 -1
- package/dist/system/services/comment.service.js +4 -1
- package/dist/system/services/comment.service.js.map +1 -1
- package/dist/system/services/document.service.d.ts +3 -1
- package/dist/system/services/document.service.js +6 -1
- package/dist/system/services/document.service.js.map +1 -1
- package/dist/system/services/es6.jobs.service.d.ts +3 -1
- package/dist/system/services/es6.jobs.service.js +5 -1
- package/dist/system/services/es6.jobs.service.js.map +1 -1
- package/dist/system/services/es6.service.d.ts +1 -41
- package/dist/system/services/es6.service.js +3 -83
- package/dist/system/services/es6.service.js.map +1 -1
- package/dist/system/services/index.d.ts +1 -1
- package/dist/system/services/index.js +1 -1
- package/dist/system/services/index.js.map +1 -1
- package/dist/system/services/property.service.d.ts +3 -1
- package/dist/system/services/property.service.js +4 -1
- package/dist/system/services/property.service.js.map +1 -1
- package/dist/system/services/upload.service.d.ts +3 -1
- package/dist/system/services/upload.service.js +4 -1
- package/dist/system/services/upload.service.js.map +1 -1
- package/dist/system/subscribers/index.d.ts +1 -0
- package/dist/system/subscribers/index.js +1 -0
- package/dist/system/subscribers/index.js.map +1 -1
- package/dist/system/subscribers/test.mongo.subscriber.d.ts +6 -0
- package/dist/system/subscribers/test.mongo.subscriber.js +26 -0
- package/dist/system/subscribers/test.mongo.subscriber.js.map +1 -0
- package/dist/system/system.module.js +2 -2
- package/dist/system/system.module.js.map +1 -1
- package/package.json +2 -1
- package/dist/system/commands/db.scanner.command.d.ts +0 -30
- package/dist/system/commands/db.scanner.command.js +0 -286
- package/dist/system/commands/db.scanner.command.js.map +0 -1
- package/dist/system/commands/dynamo.scanner.command.d.ts +0 -8
- package/dist/system/commands/dynamo.scanner.command.js +0 -43
- package/dist/system/commands/dynamo.scanner.command.js.map +0 -1
- package/dist/system/commands/event.queue.command.d.ts +0 -16
- package/dist/system/commands/event.queue.command.js +0 -91
- package/dist/system/commands/event.queue.command.js.map +0 -1
- package/dist/system/commands/index.d.ts +0 -9
- package/dist/system/commands/index.js.map +0 -1
- package/dist/system/commands/jobs.scanner.command.d.ts +0 -8
- package/dist/system/commands/jobs.scanner.command.js +0 -47
- package/dist/system/commands/jobs.scanner.command.js.map +0 -1
- package/dist/system/commands/model.scanner.command.d.ts +0 -10
- package/dist/system/commands/model.scanner.command.js +0 -59
- package/dist/system/commands/model.scanner.command.js.map +0 -1
- package/dist/system/commands/report.scanner.command.d.ts +0 -8
- package/dist/system/commands/report.scanner.command.js +0 -50
- package/dist/system/commands/report.scanner.command.js.map +0 -1
- package/dist/system/commands/service.scanner.command.d.ts +0 -9
- package/dist/system/commands/service.scanner.command.js +0 -48
- package/dist/system/commands/service.scanner.command.js.map +0 -1
- package/dist/system/commands/ses.event.tracking.command.d.ts +0 -14
- package/dist/system/commands/ses.event.tracking.command.js +0 -75
- package/dist/system/commands/ses.event.tracking.command.js.map +0 -1
- package/dist/system/commands/sync.all.command.d.ts +0 -18
- package/dist/system/commands/sync.all.command.js +0 -76
- package/dist/system/commands/sync.all.command.js.map +0 -1
- package/dist/system/services/common.service.js.map +0 -1
@@ -1,50 +0,0 @@
|
|
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.ReportScannerCommand = void 0;
|
13
|
-
const common_1 = require("@nestjs/common");
|
14
|
-
const nestjs_command_1 = require("nestjs-command");
|
15
|
-
const queue_service_1 = require("../../platformUtility/services/queue.service");
|
16
|
-
const report_entity_1 = require("../entities/report.entity");
|
17
|
-
const report_column_sync_job_1 = require("../jobs/report.column.sync.job");
|
18
|
-
let ReportScannerCommand = class ReportScannerCommand {
|
19
|
-
constructor(queueService, reportColumnSyncJob) {
|
20
|
-
this.queueService = queueService;
|
21
|
-
this.reportColumnSyncJob = reportColumnSyncJob;
|
22
|
-
}
|
23
|
-
async process() {
|
24
|
-
await this.queueService.pause();
|
25
|
-
const reports = await report_entity_1.ReportEntity.find();
|
26
|
-
const promises = [];
|
27
|
-
reports.forEach((report) => {
|
28
|
-
promises.push(this.reportColumnSyncJob.dispatch(report.id));
|
29
|
-
});
|
30
|
-
return Promise.all(promises).then((res) => {
|
31
|
-
return res;
|
32
|
-
});
|
33
|
-
}
|
34
|
-
};
|
35
|
-
exports.ReportScannerCommand = ReportScannerCommand;
|
36
|
-
__decorate([
|
37
|
-
(0, nestjs_command_1.Command)({
|
38
|
-
command: 'sync:report',
|
39
|
-
describe: 'sync up report columns and relationships',
|
40
|
-
}),
|
41
|
-
__metadata("design:type", Function),
|
42
|
-
__metadata("design:paramtypes", []),
|
43
|
-
__metadata("design:returntype", Promise)
|
44
|
-
], ReportScannerCommand.prototype, "process", null);
|
45
|
-
exports.ReportScannerCommand = ReportScannerCommand = __decorate([
|
46
|
-
(0, common_1.Injectable)(),
|
47
|
-
__metadata("design:paramtypes", [queue_service_1.QueueService,
|
48
|
-
report_column_sync_job_1.ReportColumnSyncJob])
|
49
|
-
], ReportScannerCommand);
|
50
|
-
//# sourceMappingURL=report.scanner.command.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"report.scanner.command.js","sourceRoot":"","sources":["../../../src/system/commands/report.scanner.command.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,mDAAyC;AACzC,gFAA4E;AAC5E,6DAAyD;AACzD,2EAAqE;AAG9D,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAM7B,YACqB,YAA0B,EAC1B,mBAAwC;QADxC,iBAAY,GAAZ,YAAY,CAAc;QAC1B,wBAAmB,GAAnB,mBAAmB,CAAqB;IAC1D,CAAC;IAME,AAAN,KAAK,CAAC,OAAO;QACT,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;QAEhC,MAAM,OAAO,GAAG,MAAM,4BAAY,CAAC,IAAI,EAAE,CAAC;QAC1C,MAAM,QAAQ,GAAG,EAAE,CAAC;QAEpB,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YACvB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;QAChE,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;AA7BY,oDAAoB;AAevB;IAJL,IAAA,wBAAO,EAAC;QACL,OAAO,EAAE,aAAa;QACtB,QAAQ,EAAE,0CAA0C;KACvD,CAAC;;;;mDAcD;+BA5BQ,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAQ0B,4BAAY;QACL,4CAAmB;GARpD,oBAAoB,CA6BhC"}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import { QueueService } from '../../platformUtility/services/queue.service';
|
2
|
-
import { CommonService } from '../services/common.service';
|
3
|
-
export declare class ServiceScannerCommand {
|
4
|
-
private readonly queueService;
|
5
|
-
private readonly commonService;
|
6
|
-
private logger;
|
7
|
-
constructor(queueService: QueueService, commonService: CommonService);
|
8
|
-
process(): Promise<void>;
|
9
|
-
}
|
@@ -1,48 +0,0 @@
|
|
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.ServiceScannerCommand = void 0;
|
13
|
-
const common_1 = require("@nestjs/common");
|
14
|
-
const nestjs_command_1 = require("nestjs-command");
|
15
|
-
const platform_constants_1 = require("../../config/platform.constants");
|
16
|
-
const queue_service_1 = require("../../platformUtility/services/queue.service");
|
17
|
-
const common_service_1 = require("../services/common.service");
|
18
|
-
let ServiceScannerCommand = class ServiceScannerCommand {
|
19
|
-
constructor(queueService, commonService) {
|
20
|
-
this.queueService = queueService;
|
21
|
-
this.commonService = commonService;
|
22
|
-
this.logger = new common_1.Logger('ConsoleCommand');
|
23
|
-
}
|
24
|
-
async process() {
|
25
|
-
await this.queueService.pause();
|
26
|
-
const services = platform_constants_1.default.services;
|
27
|
-
for (const key of Object.keys(services)) {
|
28
|
-
const entity = await this.commonService.checkOrSetRecord(key);
|
29
|
-
this.logger.log(`processed service : ${entity.name}`);
|
30
|
-
}
|
31
|
-
}
|
32
|
-
};
|
33
|
-
exports.ServiceScannerCommand = ServiceScannerCommand;
|
34
|
-
__decorate([
|
35
|
-
(0, nestjs_command_1.Command)({
|
36
|
-
command: 'sync:service',
|
37
|
-
describe: 'sync up all the services defined in the system',
|
38
|
-
}),
|
39
|
-
__metadata("design:type", Function),
|
40
|
-
__metadata("design:paramtypes", []),
|
41
|
-
__metadata("design:returntype", Promise)
|
42
|
-
], ServiceScannerCommand.prototype, "process", null);
|
43
|
-
exports.ServiceScannerCommand = ServiceScannerCommand = __decorate([
|
44
|
-
(0, common_1.Injectable)(),
|
45
|
-
__metadata("design:paramtypes", [queue_service_1.QueueService,
|
46
|
-
common_service_1.CommonService])
|
47
|
-
], ServiceScannerCommand);
|
48
|
-
//# sourceMappingURL=service.scanner.command.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"service.scanner.command.js","sourceRoot":"","sources":["../../../src/system/commands/service.scanner.command.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAoD;AACpD,mDAAyC;AACzC,wEAAgE;AAChE,gFAA4E;AAC5E,+DAA2D;AAQpD,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAe9B,YACqB,YAA0B,EAC1B,aAA4B;QAD5B,iBAAY,GAAZ,YAAY,CAAc;QAC1B,kBAAa,GAAb,aAAa,CAAe;QAVzC,WAAM,GAAW,IAAI,eAAM,CAAC,gBAAgB,CAAC,CAAC;IAWnD,CAAC;IAME,AAAN,KAAK,CAAC,OAAO;QACT,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;QAEhC,MAAM,QAAQ,GAAG,4BAAiB,CAAC,QAAQ,CAAC;QAE5C,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;YACtC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;YAE9D,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,uBAAuB,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;QAC1D,CAAC;IACL,CAAC;CACJ,CAAA;AAnCY,sDAAqB;AAwBxB;IAJL,IAAA,wBAAO,EAAC;QACL,OAAO,EAAE,cAAc;QACvB,QAAQ,EAAE,gDAAgD;KAC7D,CAAC;;;;oDAWD;gCAlCQ,qBAAqB;IADjC,IAAA,mBAAU,GAAE;qCAiB0B,4BAAY;QACX,8BAAa;GAjBxC,qBAAqB,CAmCjC"}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import { CommonSqsPolling } from '../../platformUtility/libraries/common.sqs.polling';
|
2
|
-
import { MaintenanceService } from '../../platformUtility/services/maintenance.service';
|
3
|
-
import { QueueService } from '../../platformUtility/services/queue.service';
|
4
|
-
import { SqsService } from '../../platformUtility/services/sqs.service';
|
5
|
-
import { PropertyService } from '../services/property.service';
|
6
|
-
export declare class SesEventTrackingCommand extends CommonSqsPolling {
|
7
|
-
private readonly queueService;
|
8
|
-
protected readonly maintenanceService: MaintenanceService;
|
9
|
-
private readonly propertyService;
|
10
|
-
protected readonly sqsService: SqsService;
|
11
|
-
constructor(queueService: QueueService, maintenanceService: MaintenanceService, propertyService: PropertyService, sqsService: SqsService);
|
12
|
-
process(): Promise<void>;
|
13
|
-
private processJob;
|
14
|
-
}
|
@@ -1,75 +0,0 @@
|
|
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.SesEventTrackingCommand = void 0;
|
13
|
-
const common_1 = require("@nestjs/common");
|
14
|
-
const nestjs_command_1 = require("nestjs-command");
|
15
|
-
const operation_exception_1 = require("../../common/exceptions/operation.exception");
|
16
|
-
const common_sqs_polling_1 = require("../../platformUtility/libraries/common.sqs.polling");
|
17
|
-
const maintenance_service_1 = require("../../platformUtility/services/maintenance.service");
|
18
|
-
const queue_service_1 = require("../../platformUtility/services/queue.service");
|
19
|
-
const sqs_service_1 = require("../../platformUtility/services/sqs.service");
|
20
|
-
const mail_event_entity_1 = require("../entities/mail.event.entity");
|
21
|
-
const mail_log_entity_1 = require("../entities/mail.log.entity");
|
22
|
-
const property_service_1 = require("../services/property.service");
|
23
|
-
let SesEventTrackingCommand = class SesEventTrackingCommand extends common_sqs_polling_1.CommonSqsPolling {
|
24
|
-
constructor(queueService, maintenanceService, propertyService, sqsService) {
|
25
|
-
super();
|
26
|
-
this.queueService = queueService;
|
27
|
-
this.maintenanceService = maintenanceService;
|
28
|
-
this.propertyService = propertyService;
|
29
|
-
this.sqsService = sqsService;
|
30
|
-
this.callingFunction = this.processJob;
|
31
|
-
}
|
32
|
-
async process() {
|
33
|
-
await this.queueService.pause();
|
34
|
-
this.callingScopeThis = this;
|
35
|
-
this.logger = new common_1.Logger('SqsWorker Mail');
|
36
|
-
this.sqsQueue = await this.propertyService.get('sqs.ses.event.url');
|
37
|
-
if (!this.sqsQueue)
|
38
|
-
throw new operation_exception_1.OperationException(`Given queue is not defined`);
|
39
|
-
this.logger.log(`logging queue ${this.sqsQueue}`);
|
40
|
-
await this.handle();
|
41
|
-
}
|
42
|
-
async processJob(data) {
|
43
|
-
const event = data.eventType || data.notificationType;
|
44
|
-
const type = event.toLowerCase();
|
45
|
-
const identifier = data.mail.messageId;
|
46
|
-
const r = mail_event_entity_1.MailEventEntity.create({ type });
|
47
|
-
r.identifier = identifier;
|
48
|
-
const mail = await mail_log_entity_1.MailLogEntity.findOne({ where: { identifier } });
|
49
|
-
if (mail)
|
50
|
-
r.mail_id = mail.id;
|
51
|
-
const time = data[type]?.timestamp;
|
52
|
-
if (time)
|
53
|
-
r.activity_at = new Date(time);
|
54
|
-
r.attributes = data;
|
55
|
-
await r.save();
|
56
|
-
}
|
57
|
-
};
|
58
|
-
exports.SesEventTrackingCommand = SesEventTrackingCommand;
|
59
|
-
__decorate([
|
60
|
-
(0, nestjs_command_1.Command)({
|
61
|
-
command: 'queue:ses-event',
|
62
|
-
describe: 'run worker through incoming email event queue',
|
63
|
-
}),
|
64
|
-
__metadata("design:type", Function),
|
65
|
-
__metadata("design:paramtypes", []),
|
66
|
-
__metadata("design:returntype", Promise)
|
67
|
-
], SesEventTrackingCommand.prototype, "process", null);
|
68
|
-
exports.SesEventTrackingCommand = SesEventTrackingCommand = __decorate([
|
69
|
-
(0, common_1.Injectable)(),
|
70
|
-
__metadata("design:paramtypes", [queue_service_1.QueueService,
|
71
|
-
maintenance_service_1.MaintenanceService,
|
72
|
-
property_service_1.PropertyService,
|
73
|
-
sqs_service_1.SqsService])
|
74
|
-
], SesEventTrackingCommand);
|
75
|
-
//# sourceMappingURL=ses.event.tracking.command.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ses.event.tracking.command.js","sourceRoot":"","sources":["../../../src/system/commands/ses.event.tracking.command.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAoD;AACpD,mDAAyC;AACzC,qFAAiF;AACjF,2FAAsF;AACtF,4FAAwF;AACxF,gFAA4E;AAC5E,4EAAwE;AACxE,qEAAgE;AAChE,iEAA4D;AAC5D,mEAA+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B,MAAM,IAAI,GAAG,MAAM,+BAAa,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC;QAEpE,IAAI,IAAI;YAAE,CAAC,CAAC,OAAO,GAAG,IAAI,CAAC,EAAE,CAAC;QAE9B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC;QACnC,IAAI,IAAI;YAAE,CAAC,CAAC,WAAW,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;QAEzC,CAAC,CAAC,UAAU,GAAG,IAAI,CAAC;QAEpB,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;IACnB,CAAC;CACJ,CAAA;AAvDY,0DAAuB;AAe1B;IAJL,IAAA,wBAAO,EAAC;QACL,OAAO,EAAE,iBAAiB;QAC1B,QAAQ,EAAE,+CAA+C;KAC5D,CAAC;;;;sDAcD;kCA5BQ,uBAAuB;IADnC,IAAA,mBAAU,GAAE;qCAG0B,4BAAY;QACJ,wCAAkB;QACvB,kCAAe;QAClB,wBAAU;GALpC,uBAAuB,CAuDnC"}
|
@@ -1,18 +0,0 @@
|
|
1
|
-
import { QueueService } from '../../platformUtility/services/queue.service';
|
2
|
-
import { EventDetailService } from '../services/event.detail.service';
|
3
|
-
import { SqlService } from './../../platformUtility/services/sql.service';
|
4
|
-
import { ModelScannerJob } from './../jobs/model.scanner.job';
|
5
|
-
import { ReportColumnSyncJob } from './../jobs/report.column.sync.job';
|
6
|
-
import { CommonService } from './../services/common.service';
|
7
|
-
import { DynamoService } from '../../platformUtility/services/dynamo.service';
|
8
|
-
export declare class SyncAllCommand {
|
9
|
-
private readonly eventDetailService;
|
10
|
-
private readonly queueService;
|
11
|
-
private readonly sqlService;
|
12
|
-
private readonly modelScannerJob;
|
13
|
-
private readonly reportColumnSyncJob;
|
14
|
-
private readonly commonService;
|
15
|
-
private readonly dynamoService;
|
16
|
-
constructor(eventDetailService: EventDetailService, queueService: QueueService, sqlService: SqlService, modelScannerJob: ModelScannerJob, reportColumnSyncJob: ReportColumnSyncJob, commonService: CommonService, dynamoService: DynamoService);
|
17
|
-
handle(): Promise<void>;
|
18
|
-
}
|
@@ -1,76 +0,0 @@
|
|
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.SyncAllCommand = void 0;
|
13
|
-
const common_1 = require("@nestjs/common");
|
14
|
-
const nestjs_command_1 = require("nestjs-command");
|
15
|
-
const queue_service_1 = require("../../platformUtility/services/queue.service");
|
16
|
-
const event_detail_service_1 = require("../services/event.detail.service");
|
17
|
-
const sql_service_1 = require("./../../platformUtility/services/sql.service");
|
18
|
-
const model_scanner_job_1 = require("./../jobs/model.scanner.job");
|
19
|
-
const report_column_sync_job_1 = require("./../jobs/report.column.sync.job");
|
20
|
-
const common_service_1 = require("./../services/common.service");
|
21
|
-
const dynamo_scanner_command_1 = require("./dynamo.scanner.command");
|
22
|
-
const jobs_scanner_command_1 = require("./jobs.scanner.command");
|
23
|
-
const model_scanner_command_1 = require("./model.scanner.command");
|
24
|
-
const report_scanner_command_1 = require("./report.scanner.command");
|
25
|
-
const service_scanner_command_1 = require("./service.scanner.command");
|
26
|
-
const process = require("process");
|
27
|
-
const dynamo_service_1 = require("../../platformUtility/services/dynamo.service");
|
28
|
-
const db_scanner_command_1 = require("./db.scanner.command");
|
29
|
-
let SyncAllCommand = class SyncAllCommand {
|
30
|
-
constructor(eventDetailService, queueService, sqlService, modelScannerJob, reportColumnSyncJob, commonService, dynamoService) {
|
31
|
-
this.eventDetailService = eventDetailService;
|
32
|
-
this.queueService = queueService;
|
33
|
-
this.sqlService = sqlService;
|
34
|
-
this.modelScannerJob = modelScannerJob;
|
35
|
-
this.reportColumnSyncJob = reportColumnSyncJob;
|
36
|
-
this.commonService = commonService;
|
37
|
-
this.dynamoService = dynamoService;
|
38
|
-
}
|
39
|
-
async handle() {
|
40
|
-
await this.queueService.pause();
|
41
|
-
global.console.log('Processing Model Scanner Command');
|
42
|
-
await new model_scanner_command_1.ModelScannerCommand(this.queueService, this.modelScannerJob).process();
|
43
|
-
global.console.log('Processing Job Scanner Command');
|
44
|
-
await new jobs_scanner_command_1.JobsScannerCommand(this.eventDetailService, this.queueService).process();
|
45
|
-
global.console.log('Processing report Scanner Command');
|
46
|
-
await new report_scanner_command_1.ReportScannerCommand(this.queueService, this.reportColumnSyncJob).process();
|
47
|
-
global.console.log('Processing service Scanner Command');
|
48
|
-
await new service_scanner_command_1.ServiceScannerCommand(this.queueService, this.commonService).process();
|
49
|
-
global.console.log('Processing DB Scanner Command');
|
50
|
-
await new db_scanner_command_1.DbScannerCommand(this.queueService, this.sqlService).process();
|
51
|
-
global.console.log('Processing DB Scanner Command');
|
52
|
-
await new dynamo_scanner_command_1.DynamoScannerCommand(this.queueService, this.dynamoService).process();
|
53
|
-
process.exit(1);
|
54
|
-
}
|
55
|
-
};
|
56
|
-
exports.SyncAllCommand = SyncAllCommand;
|
57
|
-
__decorate([
|
58
|
-
(0, nestjs_command_1.Command)({
|
59
|
-
command: 'sync:all',
|
60
|
-
describe: 'this would find all the jobs / services / entities defined in the system and set it up in our database',
|
61
|
-
}),
|
62
|
-
__metadata("design:type", Function),
|
63
|
-
__metadata("design:paramtypes", []),
|
64
|
-
__metadata("design:returntype", Promise)
|
65
|
-
], SyncAllCommand.prototype, "handle", null);
|
66
|
-
exports.SyncAllCommand = SyncAllCommand = __decorate([
|
67
|
-
(0, common_1.Injectable)(),
|
68
|
-
__metadata("design:paramtypes", [event_detail_service_1.EventDetailService,
|
69
|
-
queue_service_1.QueueService,
|
70
|
-
sql_service_1.SqlService,
|
71
|
-
model_scanner_job_1.ModelScannerJob,
|
72
|
-
report_column_sync_job_1.ReportColumnSyncJob,
|
73
|
-
common_service_1.CommonService,
|
74
|
-
dynamo_service_1.DynamoService])
|
75
|
-
], SyncAllCommand);
|
76
|
-
//# sourceMappingURL=sync.all.command.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"sync.all.command.js","sourceRoot":"","sources":["../../../src/system/commands/sync.all.command.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,mDAAyC;AACzC,gFAA4E;AAC5E,2EAAsE;AACtE,8EAA0E;AAC1E,mEAA8D;AAC9D,6EAAuE;AACvE,iEAA6D;AAC7D,qEAAgE;AAChE,iEAA4D;AAC5D,mEAA8D;AAC9D,qEAAgE;AAChE,uEAAkE;AAClE,mCAAoC;AACpC,kFAA8E;AAC9E,6DAAwD;AAQjD,IAAM,cAAc,GAApB,MAAM,cAAc;IAOvB,YACqB,kBAAsC,EACtC,YAA0B,EAC1B,UAAsB,EACtB,eAAgC,EAChC,mBAAwC,EACxC,aAA4B,EAC5B,aAA4B;QAN5B,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,iBAAY,GAAZ,YAAY,CAAc;QAC1B,eAAU,GAAV,UAAU,CAAY;QACtB,oBAAe,GAAf,eAAe,CAAiB;QAChC,wBAAmB,GAAnB,mBAAmB,CAAqB;QACxC,kBAAa,GAAb,aAAa,CAAe;QAC5B,kBAAa,GAAb,aAAa,CAAe;IAC9C,CAAC;IAUE,AAAN,KAAK,CAAC,MAAM;QACR,MAAM,I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