@servicelabsco/nestjs-utility-services 1.2.30 → 1.2.31

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.
Files changed (94) hide show
  1. package/dist/auth/middlewares/jwt.middleware.js +2 -1
  2. package/dist/auth/middlewares/jwt.middleware.js.map +1 -1
  3. package/dist/common/libraries/platform.utility.d.ts +2 -0
  4. package/dist/common/libraries/platform.utility.js +3 -0
  5. package/dist/common/libraries/platform.utility.js.map +1 -1
  6. package/dist/config/entity.constants.d.ts +4 -0
  7. package/dist/config/entity.constants.js +4 -0
  8. package/dist/config/entity.constants.js.map +1 -1
  9. package/dist/config/sentry.config.d.ts +7 -0
  10. package/dist/config/sentry.config.js +9 -0
  11. package/dist/config/sentry.config.js.map +1 -0
  12. package/dist/main.js +8 -0
  13. package/dist/main.js.map +1 -1
  14. package/dist/migrations/1700392547578-CreateMailRecipientTable.d.ts +5 -0
  15. package/dist/migrations/1700392547578-CreateMailRecipientTable.js +20 -0
  16. package/dist/migrations/1700392547578-CreateMailRecipientTable.js.map +1 -0
  17. package/dist/migrations/1700393526749-AddBodySysMailLogsTable.ts.d.ts +5 -0
  18. package/dist/migrations/1700393526749-AddBodySysMailLogsTable.ts.js +16 -0
  19. package/dist/migrations/1700393526749-AddBodySysMailLogsTable.ts.js.map +1 -0
  20. package/dist/migrations/1700394466332-CreateMailEventTable.d.ts +5 -0
  21. package/dist/migrations/1700394466332-CreateMailEventTable.js +22 -0
  22. package/dist/migrations/1700394466332-CreateMailEventTable.js.map +1 -0
  23. package/dist/migrations/1700401846961-RemoveToColumnSysMailLogsTable.ts.d.ts +5 -0
  24. package/dist/migrations/1700401846961-RemoveToColumnSysMailLogsTable.ts.js +15 -0
  25. package/dist/migrations/1700401846961-RemoveToColumnSysMailLogsTable.ts.js.map +1 -0
  26. package/dist/platformUtility/es6.classes.d.ts +1 -1
  27. package/dist/platformUtility/libraries/process.smtp.mail.d.ts +6 -1
  28. package/dist/platformUtility/libraries/process.smtp.mail.js +8 -7
  29. package/dist/platformUtility/libraries/process.smtp.mail.js.map +1 -1
  30. package/dist/platformUtility/services/mail.service.d.ts +6 -6
  31. package/dist/platformUtility/services/mail.service.js +33 -25
  32. package/dist/platformUtility/services/mail.service.js.map +1 -1
  33. package/dist/system/commands/index.d.ts +1 -0
  34. package/dist/system/commands/index.js +1 -0
  35. package/dist/system/commands/index.js.map +1 -1
  36. package/dist/system/commands/ses.event.tracking.command.d.ts +12 -0
  37. package/dist/system/commands/ses.event.tracking.command.js +70 -0
  38. package/dist/system/commands/ses.event.tracking.command.js.map +1 -0
  39. package/dist/system/dtos/index.d.ts +2 -0
  40. package/dist/system/dtos/index.js +2 -0
  41. package/dist/system/dtos/index.js.map +1 -1
  42. package/dist/system/dtos/mail.event.attributes.dto.d.ts +3 -0
  43. package/dist/system/dtos/mail.event.attributes.dto.js +8 -0
  44. package/dist/system/dtos/mail.event.attributes.dto.js.map +1 -0
  45. package/dist/system/dtos/mail.recipient.attributes.dto.d.ts +3 -0
  46. package/dist/system/dtos/mail.recipient.attributes.dto.js +8 -0
  47. package/dist/system/dtos/mail.recipient.attributes.dto.js.map +1 -0
  48. package/dist/system/entities/index.d.ts +2 -0
  49. package/dist/system/entities/index.js +2 -0
  50. package/dist/system/entities/index.js.map +1 -1
  51. package/dist/system/entities/mail.event.entity.d.ts +11 -0
  52. package/dist/system/entities/mail.event.entity.js +48 -0
  53. package/dist/system/entities/mail.event.entity.js.map +1 -0
  54. package/dist/system/entities/mail.log.entity.d.ts +2 -1
  55. package/dist/system/entities/mail.log.entity.js +6 -2
  56. package/dist/system/entities/mail.log.entity.js.map +1 -1
  57. package/dist/system/entities/mail.recipient.entity.d.ts +10 -0
  58. package/dist/system/entities/mail.recipient.entity.js +44 -0
  59. package/dist/system/entities/mail.recipient.entity.js.map +1 -0
  60. package/dist/system/es6.classes.d.ts +13 -4
  61. package/dist/system/es6.classes.js +20 -0
  62. package/dist/system/es6.classes.js.map +1 -1
  63. package/dist/system/index.d.ts +1 -0
  64. package/dist/system/index.js +1 -0
  65. package/dist/system/index.js.map +1 -1
  66. package/dist/system/interceptors/index.d.ts +1 -0
  67. package/dist/system/interceptors/index.js +18 -0
  68. package/dist/system/interceptors/index.js.map +1 -0
  69. package/dist/system/interceptors/sentry.interceptor.d.ts +5 -0
  70. package/dist/system/interceptors/sentry.interceptor.js +33 -0
  71. package/dist/system/interceptors/sentry.interceptor.js.map +1 -0
  72. package/dist/system/jobs/index.d.ts +2 -0
  73. package/dist/system/jobs/index.js +2 -0
  74. package/dist/system/jobs/index.js.map +1 -1
  75. package/dist/system/jobs/mail.event.job.d.ts +9 -0
  76. package/dist/system/jobs/mail.event.job.js +30 -0
  77. package/dist/system/jobs/mail.event.job.js.map +1 -0
  78. package/dist/system/jobs/mail.recipient.job.d.ts +9 -0
  79. package/dist/system/jobs/mail.recipient.job.js +30 -0
  80. package/dist/system/jobs/mail.recipient.job.js.map +1 -0
  81. package/dist/system/services/es6.jobs.service.d.ts +5 -1
  82. package/dist/system/services/es6.jobs.service.js +9 -1
  83. package/dist/system/services/es6.jobs.service.js.map +1 -1
  84. package/dist/system/subscribers/index.d.ts +2 -0
  85. package/dist/system/subscribers/index.js +2 -0
  86. package/dist/system/subscribers/index.js.map +1 -1
  87. package/dist/system/subscribers/mail.event.subscriber.d.ts +12 -0
  88. package/dist/system/subscribers/mail.event.subscriber.js +40 -0
  89. package/dist/system/subscribers/mail.event.subscriber.js.map +1 -0
  90. package/dist/system/subscribers/mail.recipient.subscriber.d.ts +12 -0
  91. package/dist/system/subscribers/mail.recipient.subscriber.js +40 -0
  92. package/dist/system/subscribers/mail.recipient.subscriber.js.map +1 -0
  93. package/dist/tsconfig.build.tsbuildinfo +1 -1
  94. package/package.json +3 -1
@@ -0,0 +1,33 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.SentryInterceptor = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ const Sentry = require("@sentry/core");
12
+ const operators_1 = require("rxjs/operators");
13
+ const auth_1 = require("../../common/libraries/auth");
14
+ let SentryInterceptor = class SentryInterceptor {
15
+ intercept(context, next) {
16
+ return next.handle().pipe((0, operators_1.tap)(null, (exception) => {
17
+ if (exception.status < 500)
18
+ return;
19
+ Sentry.withScope((scope) => {
20
+ const req = context.switchToHttp().getRequest();
21
+ scope.setSDKProcessingMetadata({ request: req });
22
+ Sentry.captureException(exception, {
23
+ user: auth_1.Auth.user(),
24
+ });
25
+ });
26
+ }));
27
+ }
28
+ };
29
+ exports.SentryInterceptor = SentryInterceptor;
30
+ exports.SentryInterceptor = SentryInterceptor = __decorate([
31
+ (0, common_1.Injectable)()
32
+ ], SentryInterceptor);
33
+ //# sourceMappingURL=sentry.interceptor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sentry.interceptor.js","sourceRoot":"","sources":["../../../src/system/interceptors/sentry.interceptor.ts"],"names":[],"mappings":";;;;;;;;;AACA,2CAA4F;AAC5F,uCAAuC;AAEvC,8CAAqC;AACrC,sDAAmD;AAG5C,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC1B,SAAS,CAAC,OAAyB,EAAE,IAAiB;QAClD,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,CACrB,IAAA,eAAG,EAAC,IAAI,EAAE,CAAC,SAAS,EAAE,EAAE;YACpB,IAAI,SAAS,CAAC,MAAM,GAAG,GAAG;gBAAE,OAAO;YAEnC,MAAM,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE;gBACvB,MAAM,GAAG,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,UAAU,EAAE,CAAC;gBAChD,KAAK,CAAC,wBAAwB,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;gBAEjD,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE;oBAC/B,IAAI,EAAE,WAAI,CAAC,IAAI,EAAE;iBACpB,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CACL,CAAC;IACN,CAAC;CACJ,CAAA;AAjBY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;GACA,iBAAiB,CAiB7B"}
@@ -5,6 +5,8 @@ export * from './column.mapper.job';
5
5
  export * from './comment.job';
6
6
  export * from './credential.ip.job';
7
7
  export * from './document.job';
8
+ export * from './mail.event.job';
9
+ export * from './mail.recipient.job';
8
10
  export * from './mail.validation.job';
9
11
  export * from './mobile.validation.job';
10
12
  export * from './model.scanner.job';
@@ -21,6 +21,8 @@ __exportStar(require("./column.mapper.job"), exports);
21
21
  __exportStar(require("./comment.job"), exports);
22
22
  __exportStar(require("./credential.ip.job"), exports);
23
23
  __exportStar(require("./document.job"), exports);
24
+ __exportStar(require("./mail.event.job"), exports);
25
+ __exportStar(require("./mail.recipient.job"), exports);
24
26
  __exportStar(require("./mail.validation.job"), exports);
25
27
  __exportStar(require("./mobile.validation.job"), exports);
26
28
  __exportStar(require("./model.scanner.job"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/system/jobs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAAA,0DAAwC;AAAA,+CAA6B;AAAA,sDAAoC;AAAA,gDAA8B;AAAA,sDAAoC;AAAA,iDAA+B;AAAA,wDAAsC;AAAA,0DAAwC;AAAA,sDAAoC;AAAA,iDAA+B;AAAA,+DAA6C;AAAA,4DAA0C;AAAA,2DAAyC;AAAA,wDAAsC;AAAA,4DAA0C;AAAA,oDAAkC;AAAA,0DAAwC;AAAA,8DAA4C;AAAA,wDAAqC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/system/jobs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAAA,0DAAwC;AAAA,+CAA6B;AAAA,sDAAoC;AAAA,gDAA8B;AAAA,sDAAoC;AAAA,iDAA+B;AAAA,mDAAiC;AAAA,uDAAqC;AAAA,wDAAsC;AAAA,0DAAwC;AAAA,sDAAoC;AAAA,iDAA+B;AAAA,+DAA6C;AAAA,4DAA0C;AAAA,2DAAyC;AAAA,wDAAsC;AAAA,4DAA0C;AAAA,oDAAkC;AAAA,0DAAwC;AAAA,8DAA4C;AAAA,wDAAqC"}
@@ -0,0 +1,9 @@
1
+ import { DatabaseEventDto } from '../../common/dtos/database.event.dto';
2
+ import { CommonJob } from '../../common/libraries/common.job';
3
+ import { QueueService } from '../../platformUtility/services/queue.service';
4
+ import { MailEventEntity } from '../entities/mail.event.entity';
5
+ export declare class MailEventJob extends CommonJob {
6
+ protected readonly queueService: QueueService;
7
+ constructor(queueService: QueueService);
8
+ handle(evt: DatabaseEventDto<MailEventEntity>): Promise<MailEventEntity>;
9
+ }
@@ -0,0 +1,30 @@
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.MailEventJob = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const common_job_1 = require("../../common/libraries/common.job");
15
+ const queue_service_1 = require("../../platformUtility/services/queue.service");
16
+ let MailEventJob = class MailEventJob extends common_job_1.CommonJob {
17
+ constructor(queueService) {
18
+ super('5cfb77227fad03adc54decf4465d2673');
19
+ this.queueService = queueService;
20
+ }
21
+ async handle(evt) {
22
+ return evt.entity;
23
+ }
24
+ };
25
+ exports.MailEventJob = MailEventJob;
26
+ exports.MailEventJob = MailEventJob = __decorate([
27
+ (0, common_1.Injectable)(),
28
+ __metadata("design:paramtypes", [queue_service_1.QueueService])
29
+ ], MailEventJob);
30
+ //# sourceMappingURL=mail.event.job.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mail.event.job.js","sourceRoot":"","sources":["../../../src/system/jobs/mail.event.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,kEAA8D;AAC9D,gFAA4E;AAGrE,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,sBAAS;IACvC,YAA+B,YAA0B;QACrD,KAAK,CAAC,kCAAkC,CAAC,CAAC;QADf,iBAAY,GAAZ,YAAY,CAAc;IAEzD,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,GAAsC;QAC/C,OAAO,GAAG,CAAC,MAAM,CAAC;IACtB,CAAC;CACJ,CAAA;AAPY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;qCAEoC,4BAAY;GADhD,YAAY,CAOxB"}
@@ -0,0 +1,9 @@
1
+ import { DatabaseEventDto } from '../../common/dtos/database.event.dto';
2
+ import { CommonJob } from '../../common/libraries/common.job';
3
+ import { QueueService } from '../../platformUtility/services/queue.service';
4
+ import { MailRecipientEntity } from '../entities/mail.recipient.entity';
5
+ export declare class MailRecipientJob extends CommonJob {
6
+ protected readonly queueService: QueueService;
7
+ constructor(queueService: QueueService);
8
+ handle(evt: DatabaseEventDto<MailRecipientEntity>): Promise<MailRecipientEntity>;
9
+ }
@@ -0,0 +1,30 @@
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.MailRecipientJob = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const common_job_1 = require("../../common/libraries/common.job");
15
+ const queue_service_1 = require("../../platformUtility/services/queue.service");
16
+ let MailRecipientJob = class MailRecipientJob extends common_job_1.CommonJob {
17
+ constructor(queueService) {
18
+ super('97aad20762421f5972396cc09411f139');
19
+ this.queueService = queueService;
20
+ }
21
+ async handle(evt) {
22
+ return evt.entity;
23
+ }
24
+ };
25
+ exports.MailRecipientJob = MailRecipientJob;
26
+ exports.MailRecipientJob = MailRecipientJob = __decorate([
27
+ (0, common_1.Injectable)(),
28
+ __metadata("design:paramtypes", [queue_service_1.QueueService])
29
+ ], MailRecipientJob);
30
+ //# sourceMappingURL=mail.recipient.job.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mail.recipient.job.js","sourceRoot":"","sources":["../../../src/system/jobs/mail.recipient.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,kEAA8D;AAC9D,gFAA4E;AAGrE,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,sBAAS;IAC3C,YAA+B,YAA0B;QACrD,KAAK,CAAC,kCAAkC,CAAC,CAAC;QADf,iBAAY,GAAZ,YAAY,CAAc;IAEzD,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,GAA0C;QACnD,OAAO,GAAG,CAAC,MAAM,CAAC;IACtB,CAAC;CACJ,CAAA;AAPY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;qCAEoC,4BAAY;GADhD,gBAAgB,CAO5B"}
@@ -5,6 +5,8 @@ import { ColumnMapperJob } from '../jobs/column.mapper.job';
5
5
  import { CommentJob } from '../jobs/comment.job';
6
6
  import { CredentialIpJob } from '../jobs/credential.ip.job';
7
7
  import { DocumentJob } from '../jobs/document.job';
8
+ import { MailEventJob } from '../jobs/mail.event.job';
9
+ import { MailRecipientJob } from '../jobs/mail.recipient.job';
8
10
  import { MailValidationJob } from '../jobs/mail.validation.job';
9
11
  import { MobileValidationJob } from '../jobs/mobile.validation.job';
10
12
  import { ModelScannerJob } from '../jobs/model.scanner.job';
@@ -26,6 +28,8 @@ export declare class Es6JobsService {
26
28
  private readonly commentJob;
27
29
  private readonly credentialIpJob;
28
30
  private readonly documentJob;
31
+ private readonly mailEventJob;
32
+ private readonly mailRecipientJob;
29
33
  private readonly mailValidationJob;
30
34
  private readonly mobileValidationJob;
31
35
  private readonly modelScannerJob;
@@ -40,7 +44,7 @@ export declare class Es6JobsService {
40
44
  private readonly userGroupPermissionJob;
41
45
  private readonly userGroupRoleJob;
42
46
  private jobs;
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, setScheduledEventJob: SetScheduledEventJob, smsMessageJob: SmsMessageJob, userGroupMemberJob: UserGroupMemberJob, userGroupPermissionJob: UserGroupPermissionJob, userGroupRoleJob: UserGroupRoleJob);
47
+ constructor(cleanScheduledEventJob: CleanScheduledEventJob, clientCredentialJob: ClientCredentialJob, clientJob: ClientJob, columnMapperJob: ColumnMapperJob, commentJob: CommentJob, credentialIpJob: CredentialIpJob, documentJob: DocumentJob, mailEventJob: MailEventJob, mailRecipientJob: MailRecipientJob, mailValidationJob: MailValidationJob, mobileValidationJob: MobileValidationJob, modelScannerJob: ModelScannerJob, propertyJob: PropertyJob, refreshPropertyCacheJob: RefreshPropertyCacheJob, relationshipMapperJob: RelationshipMapperJob, reportColumnSyncJob: ReportColumnSyncJob, scheduledEventJob: ScheduledEventJob, setScheduledEventJob: SetScheduledEventJob, smsMessageJob: SmsMessageJob, userGroupMemberJob: UserGroupMemberJob, userGroupPermissionJob: UserGroupPermissionJob, userGroupRoleJob: UserGroupRoleJob);
44
48
  alignJobs(): void;
45
49
  setJobs(): void;
46
50
  }
@@ -18,6 +18,8 @@ const column_mapper_job_1 = require("../jobs/column.mapper.job");
18
18
  const comment_job_1 = require("../jobs/comment.job");
19
19
  const credential_ip_job_1 = require("../jobs/credential.ip.job");
20
20
  const document_job_1 = require("../jobs/document.job");
21
+ const mail_event_job_1 = require("../jobs/mail.event.job");
22
+ const mail_recipient_job_1 = require("../jobs/mail.recipient.job");
21
23
  const mail_validation_job_1 = require("../jobs/mail.validation.job");
22
24
  const mobile_validation_job_1 = require("../jobs/mobile.validation.job");
23
25
  const model_scanner_job_1 = require("../jobs/model.scanner.job");
@@ -33,7 +35,7 @@ const user_group_permission_job_1 = require("../jobs/user.group.permission.job")
33
35
  const user_group_role_job_1 = require("../jobs/user.group.role.job");
34
36
  const platform_utility_1 = require("../../common/libraries/platform.utility");
35
37
  let Es6JobsService = class Es6JobsService {
36
- constructor(cleanScheduledEventJob, clientCredentialJob, clientJob, columnMapperJob, commentJob, credentialIpJob, documentJob, mailValidationJob, mobileValidationJob, modelScannerJob, propertyJob, refreshPropertyCacheJob, relationshipMapperJob, reportColumnSyncJob, scheduledEventJob, setScheduledEventJob, smsMessageJob, userGroupMemberJob, userGroupPermissionJob, userGroupRoleJob) {
38
+ constructor(cleanScheduledEventJob, clientCredentialJob, clientJob, columnMapperJob, commentJob, credentialIpJob, documentJob, mailEventJob, mailRecipientJob, mailValidationJob, mobileValidationJob, modelScannerJob, propertyJob, refreshPropertyCacheJob, relationshipMapperJob, reportColumnSyncJob, scheduledEventJob, setScheduledEventJob, smsMessageJob, userGroupMemberJob, userGroupPermissionJob, userGroupRoleJob) {
37
39
  this.cleanScheduledEventJob = cleanScheduledEventJob;
38
40
  this.clientCredentialJob = clientCredentialJob;
39
41
  this.clientJob = clientJob;
@@ -41,6 +43,8 @@ let Es6JobsService = class Es6JobsService {
41
43
  this.commentJob = commentJob;
42
44
  this.credentialIpJob = credentialIpJob;
43
45
  this.documentJob = documentJob;
46
+ this.mailEventJob = mailEventJob;
47
+ this.mailRecipientJob = mailRecipientJob;
44
48
  this.mailValidationJob = mailValidationJob;
45
49
  this.mobileValidationJob = mobileValidationJob;
46
50
  this.modelScannerJob = modelScannerJob;
@@ -67,6 +71,8 @@ let Es6JobsService = class Es6JobsService {
67
71
  b573ba7362b8f4b0da4483dfaaa73b25: this.commentJob,
68
72
  d14e1d233ff74f0c86d160cc3ec9cbfb: this.credentialIpJob,
69
73
  '64c1bbde8bd1bc6355f8fa2d86a171f1': this.documentJob,
74
+ '5cfb77227fad03adc54decf4465d2673': this.mailEventJob,
75
+ '97aad20762421f5972396cc09411f139': this.mailRecipientJob,
70
76
  '469fd6148687123ec4ef17ed0ad5ef87': this.mailValidationJob,
71
77
  fc454d05d19747fdbb8510bbc00f67dd: this.mobileValidationJob,
72
78
  '895d52ea29c17047f690ead67db80c9c': this.modelScannerJob,
@@ -96,6 +102,8 @@ exports.Es6JobsService = Es6JobsService = __decorate([
96
102
  comment_job_1.CommentJob,
97
103
  credential_ip_job_1.CredentialIpJob,
98
104
  document_job_1.DocumentJob,
105
+ mail_event_job_1.MailEventJob,
106
+ mail_recipient_job_1.MailRecipientJob,
99
107
  mail_validation_job_1.MailValidationJob,
100
108
  mobile_validation_job_1.MobileValidationJob,
101
109
  model_scanner_job_1.ModelScannerJob,
@@ -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,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,6EAAuE;AACvE,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,oBAA0C,EAC1C,aAA4B,EAC5B,kBAAsC,EACtC,sBAA8C,EAC9C,gBAAkC;QAnBlC,2BAAsB,GAAtB,sBAAsB,CAAwB;QAC9C,wBAAmB,GAAnB,mBAAmB,CAAqB;QACxC,cAAS,GAAT,SAAS,CAAW;QACpB,oBAAe,GAAf,eAAe,CAAiB;QAChC,eAAU,GAAV,UAAU,CAAY;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E,IAAI,CAAC,mBAAmB;YAC5D,gCAAgC,EAAE,IAAI,CAAC,iBAAiB;YACxD,kCAAkC,EAAE,IAAI,CAAC,oBAAoB;YAC7D,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;QACd,8CAAoB;QAC3B,+BAAa;QACR,0CAAkB;QACd,kDAAsB;QAC5B,sCAAgB;GAvB9C,cAAc,CAiE1B"}
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,2DAAsD;AACtD,mEAA8D;AAC9D,qEAAgE;AAChE,yEAAoE;AACpE,iEAA4D;AAC5D,uDAAmD;AACnD,mFAA6E;AAC7E,6EAAwE;AACxE,2EAAqE;AACrE,qEAAgE;AAChE,6EAAuE;AACvE,6DAAwD;AACxD,yEAAmE;AACnE,iFAA2E;AAC3E,qEAA+D;AAC/D,8EAA0E;AAQnE,IAAM,cAAc,GAApB,MAAM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2CAAmB;QACvB,mCAAe;QACnB,0BAAW;QACC,oDAAuB;QACzB,+CAAqB;QACvB,4CAAmB;QACrB,uCAAiB;QACd,8CAAoB;QAC3B,+BAAa;QACR,0CAAkB;QACd,kDAAsB;QAC5B,sCAAgB;GAzB9C,cAAc,CAqE1B"}
@@ -4,6 +4,8 @@ export * from './column.subscriber';
4
4
  export * from './comment.subscriber';
5
5
  export * from './credential.ip.subscriber';
6
6
  export * from './document.subscriber';
7
+ export * from './mail.event.subscriber';
8
+ export * from './mail.recipient.subscriber';
7
9
  export * from './mail.validation.subscriber';
8
10
  export * from './mobile.validation.subscriber';
9
11
  export * from './property.subscriber';
@@ -20,6 +20,8 @@ __exportStar(require("./column.subscriber"), exports);
20
20
  __exportStar(require("./comment.subscriber"), exports);
21
21
  __exportStar(require("./credential.ip.subscriber"), exports);
22
22
  __exportStar(require("./document.subscriber"), exports);
23
+ __exportStar(require("./mail.event.subscriber"), exports);
24
+ __exportStar(require("./mail.recipient.subscriber"), exports);
23
25
  __exportStar(require("./mail.validation.subscriber"), exports);
24
26
  __exportStar(require("./mobile.validation.subscriber"), exports);
25
27
  __exportStar(require("./property.subscriber"), exports);
@@ -1 +1 @@
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
+ {"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,0DAAwC;AAAA,8DAA4C;AAAA,+DAA6C;AAAA,iEAA+C;AAAA,wDAAsC;AAAA,4DAA0C;AAAA,+DAA6C;AAAA,2DAAyC;AAAA,iEAA+C;AAAA,qEAAmD;AAAA,+DAA4C"}
@@ -0,0 +1,12 @@
1
+ import { DataSource, InsertEvent, UpdateEvent } from 'typeorm';
2
+ import { MailEventEntity } from '../entities/mail.event.entity';
3
+ import { MailEventJob } from '../jobs/mail.event.job';
4
+ import { CommonSubscriber } from '../../common/libraries/common.subscriber';
5
+ export declare class MailEventSubscriber extends CommonSubscriber<MailEventEntity> {
6
+ private readonly dataSource;
7
+ private readonly mailEventJob;
8
+ constructor(dataSource: DataSource, mailEventJob: MailEventJob);
9
+ listenTo(): typeof MailEventEntity;
10
+ afterInsert(evt: InsertEvent<MailEventEntity>): Promise<void>;
11
+ afterUpdate(evt: UpdateEvent<MailEventEntity>): 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.MailEventSubscriber = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const mail_event_entity_1 = require("../entities/mail.event.entity");
15
+ const mail_event_job_1 = require("../jobs/mail.event.job");
16
+ const common_subscriber_1 = require("../../common/libraries/common.subscriber");
17
+ let MailEventSubscriber = class MailEventSubscriber extends common_subscriber_1.CommonSubscriber {
18
+ constructor(dataSource, mailEventJob) {
19
+ super();
20
+ this.dataSource = dataSource;
21
+ this.mailEventJob = mailEventJob;
22
+ dataSource.subscribers.push(this);
23
+ }
24
+ listenTo() {
25
+ return mail_event_entity_1.MailEventEntity;
26
+ }
27
+ async afterInsert(evt) {
28
+ await this.mailEventJob.delayedDispatch(this.getEventData(evt));
29
+ }
30
+ async afterUpdate(evt) {
31
+ await this.mailEventJob.delayedDispatch(this.getEventData(evt));
32
+ }
33
+ };
34
+ exports.MailEventSubscriber = MailEventSubscriber;
35
+ exports.MailEventSubscriber = MailEventSubscriber = __decorate([
36
+ (0, typeorm_1.EventSubscriber)(),
37
+ __metadata("design:paramtypes", [typeorm_1.DataSource,
38
+ mail_event_job_1.MailEventJob])
39
+ ], MailEventSubscriber);
40
+ //# sourceMappingURL=mail.event.subscriber.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mail.event.subscriber.js","sourceRoot":"","sources":["../../../src/system/subscribers/mail.event.subscriber.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgF;AAChF,qEAAgE;AAChE,2DAAsD;AACtD,gFAA4E;AAGrE,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,oCAAiC;IACtE,YACqB,UAAsB,EACtB,YAA0B;QAE3C,KAAK,EAAE,CAAC;QAHS,eAAU,GAAV,UAAU,CAAY;QACtB,iBAAY,GAAZ,YAAY,CAAc;QAG3C,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IACD,QAAQ;QACJ,OAAO,mCAAe,CAAC;IAC3B,CAAC;IACD,KAAK,CAAC,WAAW,CAAC,GAAiC;QAC/C,MAAM,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IACpE,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,GAAiC;QAC/C,MAAM,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IACpE,CAAC;CACJ,CAAA;AAlBY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,yBAAe,GAAE;qCAGmB,oBAAU;QACR,6BAAY;GAHtC,mBAAmB,CAkB/B"}
@@ -0,0 +1,12 @@
1
+ import { DataSource, InsertEvent, UpdateEvent } from 'typeorm';
2
+ import { CommonSubscriber } from '../../common/libraries/common.subscriber';
3
+ import { MailRecipientEntity } from '../entities/mail.recipient.entity';
4
+ import { MailRecipientJob } from '../jobs/mail.recipient.job';
5
+ export declare class MailRecipientSubscriber extends CommonSubscriber<MailRecipientEntity> {
6
+ private readonly dataSource;
7
+ private readonly mailRecipientJob;
8
+ constructor(dataSource: DataSource, mailRecipientJob: MailRecipientJob);
9
+ listenTo(): typeof MailRecipientEntity;
10
+ afterInsert(evt: InsertEvent<MailRecipientEntity>): Promise<void>;
11
+ afterUpdate(evt: UpdateEvent<MailRecipientEntity>): 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.MailRecipientSubscriber = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const common_subscriber_1 = require("../../common/libraries/common.subscriber");
15
+ const mail_recipient_entity_1 = require("../entities/mail.recipient.entity");
16
+ const mail_recipient_job_1 = require("../jobs/mail.recipient.job");
17
+ let MailRecipientSubscriber = class MailRecipientSubscriber extends common_subscriber_1.CommonSubscriber {
18
+ constructor(dataSource, mailRecipientJob) {
19
+ super();
20
+ this.dataSource = dataSource;
21
+ this.mailRecipientJob = mailRecipientJob;
22
+ dataSource.subscribers.push(this);
23
+ }
24
+ listenTo() {
25
+ return mail_recipient_entity_1.MailRecipientEntity;
26
+ }
27
+ async afterInsert(evt) {
28
+ await this.mailRecipientJob.delayedDispatch(this.getEventData(evt));
29
+ }
30
+ async afterUpdate(evt) {
31
+ await this.mailRecipientJob.delayedDispatch(this.getEventData(evt));
32
+ }
33
+ };
34
+ exports.MailRecipientSubscriber = MailRecipientSubscriber;
35
+ exports.MailRecipientSubscriber = MailRecipientSubscriber = __decorate([
36
+ (0, typeorm_1.EventSubscriber)(),
37
+ __metadata("design:paramtypes", [typeorm_1.DataSource,
38
+ mail_recipient_job_1.MailRecipientJob])
39
+ ], MailRecipientSubscriber);
40
+ //# sourceMappingURL=mail.recipient.subscriber.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mail.recipient.subscriber.js","sourceRoot":"","sources":["../../../src/system/subscribers/mail.recipient.subscriber.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgF;AAChF,gFAA4E;AAC5E,6EAAwE;AACxE,mEAA8D;AAGvD,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,oCAAqC;IAC9E,YACqB,UAAsB,EACtB,gBAAkC;QAEnD,KAAK,EAAE,CAAC;QAHS,eAAU,GAAV,UAAU,CAAY;QACtB,qBAAgB,GAAhB,gBAAgB,CAAkB;QAGnD,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IACD,QAAQ;QACJ,OAAO,2CAAmB,CAAC;IAC/B,CAAC;IACD,KAAK,CAAC,WAAW,CAAC,GAAqC;QACnD,MAAM,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IACxE,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,GAAqC;QACnD,MAAM,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IACxE,CAAC;CACJ,CAAA;AAlBY,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,yBAAe,GAAE;qCAGmB,oBAAU;QACJ,qCAAgB;GAH9C,uBAAuB,CAkBnC"}