@servicelabsco/nestjs-utility-services 1.2.29 → 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 (143) hide show
  1. package/dist/app.controller.d.ts +1 -1
  2. package/dist/app.controller.js +8 -8
  3. package/dist/app.controller.js.map +1 -1
  4. package/dist/auth/middlewares/jwt.middleware.js +2 -1
  5. package/dist/auth/middlewares/jwt.middleware.js.map +1 -1
  6. package/dist/common/libraries/date.util.js +6 -6
  7. package/dist/common/libraries/date.util.js.map +1 -1
  8. package/dist/common/libraries/list.manager.js +2 -2
  9. package/dist/common/libraries/platform.utility.d.ts +3 -0
  10. package/dist/common/libraries/platform.utility.js +6 -0
  11. package/dist/common/libraries/platform.utility.js.map +1 -1
  12. package/dist/common/libraries/record.manager.js +4 -4
  13. package/dist/common/libraries/report.data.manager.js +2 -2
  14. package/dist/common/libraries/report.list.manager.js +2 -2
  15. package/dist/config/entity.constants.d.ts +4 -0
  16. package/dist/config/entity.constants.js +4 -0
  17. package/dist/config/entity.constants.js.map +1 -1
  18. package/dist/config/sentry.config.d.ts +7 -0
  19. package/dist/config/sentry.config.js +9 -0
  20. package/dist/config/sentry.config.js.map +1 -0
  21. package/dist/config/source.hash.d.ts +2 -2
  22. package/dist/config/source.hash.js +2 -2
  23. package/dist/main.js +8 -0
  24. package/dist/main.js.map +1 -1
  25. package/dist/migrations/1699364212491-AddSchemaValidationDataSeederTable.d.ts +5 -0
  26. package/dist/migrations/1699364212491-AddSchemaValidationDataSeederTable.js +21 -0
  27. package/dist/migrations/1699364212491-AddSchemaValidationDataSeederTable.js.map +1 -0
  28. package/dist/migrations/1700392547578-CreateMailRecipientTable.d.ts +5 -0
  29. package/dist/migrations/1700392547578-CreateMailRecipientTable.js +20 -0
  30. package/dist/migrations/1700392547578-CreateMailRecipientTable.js.map +1 -0
  31. package/dist/migrations/1700393526749-AddBodySysMailLogsTable.ts.d.ts +5 -0
  32. package/dist/migrations/1700393526749-AddBodySysMailLogsTable.ts.js +16 -0
  33. package/dist/migrations/1700393526749-AddBodySysMailLogsTable.ts.js.map +1 -0
  34. package/dist/migrations/1700394466332-CreateMailEventTable.d.ts +5 -0
  35. package/dist/migrations/1700394466332-CreateMailEventTable.js +22 -0
  36. package/dist/migrations/1700394466332-CreateMailEventTable.js.map +1 -0
  37. package/dist/migrations/1700401846961-RemoveToColumnSysMailLogsTable.ts.d.ts +5 -0
  38. package/dist/migrations/1700401846961-RemoveToColumnSysMailLogsTable.ts.js +15 -0
  39. package/dist/migrations/1700401846961-RemoveToColumnSysMailLogsTable.ts.js.map +1 -0
  40. package/dist/platformUtility/consumers/job.consumer.js.map +1 -1
  41. package/dist/platformUtility/es6.classes.d.ts +1 -1
  42. package/dist/platformUtility/libraries/process.audit.log.data.js +2 -2
  43. package/dist/platformUtility/libraries/process.smtp.mail.d.ts +6 -1
  44. package/dist/platformUtility/libraries/process.smtp.mail.js +8 -7
  45. package/dist/platformUtility/libraries/process.smtp.mail.js.map +1 -1
  46. package/dist/platformUtility/services/mail.service.d.ts +6 -6
  47. package/dist/platformUtility/services/mail.service.js +33 -25
  48. package/dist/platformUtility/services/mail.service.js.map +1 -1
  49. package/dist/system/commands/db.scanner.command.js +6 -6
  50. package/dist/system/commands/index.d.ts +1 -0
  51. package/dist/system/commands/index.js +1 -0
  52. package/dist/system/commands/index.js.map +1 -1
  53. package/dist/system/commands/ses.event.tracking.command.d.ts +12 -0
  54. package/dist/system/commands/ses.event.tracking.command.js +70 -0
  55. package/dist/system/commands/ses.event.tracking.command.js.map +1 -0
  56. package/dist/system/controllers/form.controller.js +3 -3
  57. package/dist/system/controllers/preference.controller.js +4 -4
  58. package/dist/system/controllers/report.controller.js +2 -2
  59. package/dist/system/dtos/index.d.ts +2 -0
  60. package/dist/system/dtos/index.js +2 -0
  61. package/dist/system/dtos/index.js.map +1 -1
  62. package/dist/system/dtos/mail.event.attributes.dto.d.ts +3 -0
  63. package/dist/system/dtos/mail.event.attributes.dto.js +8 -0
  64. package/dist/system/dtos/mail.event.attributes.dto.js.map +1 -0
  65. package/dist/system/dtos/mail.recipient.attributes.dto.d.ts +3 -0
  66. package/dist/system/dtos/mail.recipient.attributes.dto.js +8 -0
  67. package/dist/system/dtos/mail.recipient.attributes.dto.js.map +1 -0
  68. package/dist/system/entities/index.d.ts +2 -0
  69. package/dist/system/entities/index.js +2 -0
  70. package/dist/system/entities/index.js.map +1 -1
  71. package/dist/system/entities/mail.event.entity.d.ts +11 -0
  72. package/dist/system/entities/mail.event.entity.js +48 -0
  73. package/dist/system/entities/mail.event.entity.js.map +1 -0
  74. package/dist/system/entities/mail.log.entity.d.ts +2 -1
  75. package/dist/system/entities/mail.log.entity.js +6 -2
  76. package/dist/system/entities/mail.log.entity.js.map +1 -1
  77. package/dist/system/entities/mail.recipient.entity.d.ts +10 -0
  78. package/dist/system/entities/mail.recipient.entity.js +44 -0
  79. package/dist/system/entities/mail.recipient.entity.js.map +1 -0
  80. package/dist/system/es6.classes.d.ts +14 -5
  81. package/dist/system/es6.classes.js +22 -2
  82. package/dist/system/es6.classes.js.map +1 -1
  83. package/dist/system/index.d.ts +1 -0
  84. package/dist/system/index.js +1 -0
  85. package/dist/system/index.js.map +1 -1
  86. package/dist/system/interceptors/index.d.ts +1 -0
  87. package/dist/system/interceptors/index.js +18 -0
  88. package/dist/system/interceptors/index.js.map +1 -0
  89. package/dist/system/interceptors/sentry.interceptor.d.ts +5 -0
  90. package/dist/system/interceptors/sentry.interceptor.js +33 -0
  91. package/dist/system/interceptors/sentry.interceptor.js.map +1 -0
  92. package/dist/system/jobs/clean.scheduled.event.job.d.ts +4 -5
  93. package/dist/system/jobs/clean.scheduled.event.job.js +7 -7
  94. package/dist/system/jobs/clean.scheduled.event.job.js.map +1 -1
  95. package/dist/system/jobs/index.d.ts +3 -1
  96. package/dist/system/jobs/index.js +3 -1
  97. package/dist/system/jobs/index.js.map +1 -1
  98. package/dist/system/jobs/mail.event.job.d.ts +9 -0
  99. package/dist/system/jobs/mail.event.job.js +30 -0
  100. package/dist/system/jobs/mail.event.job.js.map +1 -0
  101. package/dist/system/jobs/mail.recipient.job.d.ts +9 -0
  102. package/dist/system/jobs/mail.recipient.job.js +30 -0
  103. package/dist/system/jobs/mail.recipient.job.js.map +1 -0
  104. package/dist/system/jobs/model.scanner.job.js +6 -6
  105. package/dist/system/jobs/report.column.sync.job.js +3 -3
  106. package/dist/system/jobs/scheduled.event.job.d.ts +9 -5
  107. package/dist/system/jobs/scheduled.event.job.js +22 -21
  108. package/dist/system/jobs/scheduled.event.job.js.map +1 -1
  109. package/dist/system/jobs/{scheduled.events.job.d.ts → set.scheduled.event.job.d.ts} +3 -3
  110. package/dist/system/jobs/{scheduled.events.job.js → set.scheduled.event.job.js} +20 -19
  111. package/dist/system/jobs/set.scheduled.event.job.js.map +1 -0
  112. package/dist/system/jobs/user.group.member.job.js +5 -5
  113. package/dist/system/jobs/user.group.permission.job.js +3 -3
  114. package/dist/system/jobs/user.group.role.job.js +3 -3
  115. package/dist/system/libraries/model.sync.js +2 -2
  116. package/dist/system/services/column.service.js +2 -2
  117. package/dist/system/services/es6.jobs.service.d.ts +7 -3
  118. package/dist/system/services/es6.jobs.service.js +13 -5
  119. package/dist/system/services/es6.jobs.service.js.map +1 -1
  120. package/dist/system/services/form.service.js +2 -2
  121. package/dist/system/services/menu.service.js +2 -2
  122. package/dist/system/services/model.service.js +3 -3
  123. package/dist/system/services/preference.service.js +5 -5
  124. package/dist/system/services/report.service.js +4 -4
  125. package/dist/system/services/scheduled.event.service.d.ts +8 -2
  126. package/dist/system/services/scheduled.event.service.js +46 -21
  127. package/dist/system/services/scheduled.event.service.js.map +1 -1
  128. package/dist/system/services/security.rule.service.js +3 -3
  129. package/dist/system/subscribers/index.d.ts +2 -0
  130. package/dist/system/subscribers/index.js +2 -0
  131. package/dist/system/subscribers/index.js.map +1 -1
  132. package/dist/system/subscribers/mail.event.subscriber.d.ts +12 -0
  133. package/dist/system/subscribers/mail.event.subscriber.js +40 -0
  134. package/dist/system/subscribers/mail.event.subscriber.js.map +1 -0
  135. package/dist/system/subscribers/mail.recipient.subscriber.d.ts +12 -0
  136. package/dist/system/subscribers/mail.recipient.subscriber.js +40 -0
  137. package/dist/system/subscribers/mail.recipient.subscriber.js.map +1 -0
  138. package/dist/system/subscribers/scheduled.event.subscriber.d.ts +2 -3
  139. package/dist/system/subscribers/scheduled.event.subscriber.js +10 -9
  140. package/dist/system/subscribers/scheduled.event.subscriber.js.map +1 -1
  141. package/dist/tsconfig.build.tsbuildinfo +1 -1
  142. package/package.json +3 -1
  143. package/dist/system/jobs/scheduled.events.job.js.map +0 -1
@@ -66,7 +66,7 @@ declare const es6Classes: {
66
66
  dtos: (typeof JobPayloadDto | typeof QueueOptionsDto | typeof SourceColumnDto | typeof CommonAttributesDto | typeof AwsConfigDto | typeof RemoteRawResponseDto | typeof FcmResponseDto | typeof KaleyraCallbackPayloadDto | typeof MailOptionsDto | typeof PushNotificationResponseDto | typeof PushNotificationTemplateDto | typeof SetSmsPayloadDto | typeof SmsPayloadDto | typeof SmtpConfigDto | typeof StringSearchDto)[];
67
67
  entities: (typeof FailedBullJobEntity | typeof PendingBullJobEntity)[];
68
68
  jobs: (typeof LoadFailedBullJob | typeof RecordWatcherJob | typeof ReloadPendingBullJob | typeof TestJob)[];
69
- libraries: (typeof ProcessAuditLogData | typeof CommonSqsPolling | typeof FileSystemUtility | typeof CreateEs6ClassesFile | typeof CreateEs6JobsFile | typeof CreateEntityConstantsFile | typeof CreateEs6ServiceFile | typeof CreateIndexFile | typeof ProcessCommonMail | typeof ProcessKaleyraCallbackResponse | typeof ProcessKaleyraSms | typeof ProcessSmtpMail | typeof SetSmsMessage)[];
69
+ libraries: (typeof CommonSqsPolling | typeof ProcessAuditLogData | typeof FileSystemUtility | typeof CreateEs6ClassesFile | typeof CreateEs6JobsFile | typeof CreateEntityConstantsFile | typeof CreateEs6ServiceFile | typeof CreateIndexFile | typeof ProcessCommonMail | typeof ProcessKaleyraCallbackResponse | typeof ProcessKaleyraSms | typeof ProcessSmtpMail | typeof SetSmsMessage)[];
70
70
  middlewares: (typeof MaintenanceMiddleware | typeof TrimPipe)[];
71
71
  services: (typeof CacheService | typeof LocalPropertyService | typeof AwsConfigService | typeof SqsService | typeof QueueService | typeof SqlService | typeof DynamoService | typeof MaintenanceService | typeof AuditService | typeof RemoteRequestService | typeof AwsSecretService | typeof Es6JobsService | typeof FcmNotificationService | typeof MailService | typeof ShutdownService | typeof SmsService | typeof StartupService)[];
72
72
  subscribers: (typeof BaseSubscriber)[];
@@ -4,7 +4,7 @@ exports.ProcessAuditLogData = void 0;
4
4
  const creator_entity_1 = require("../../auth/entities/creator.entity");
5
5
  const platform_utility_1 = require("../../common/libraries/platform.utility");
6
6
  const column_entity_1 = require("../../system/entities/column.entity");
7
- const SOURCEHASH = require("../../config/source.hash");
7
+ const SourceHash = require("../../config/source.hash");
8
8
  class ProcessAuditLogData {
9
9
  constructor(model) {
10
10
  this.model = model;
@@ -26,7 +26,7 @@ class ProcessAuditLogData {
26
26
  if (!this.model?.id)
27
27
  return;
28
28
  this.columns = await column_entity_1.ColumnEntity.find({
29
- where: { source_type: SOURCEHASH.model, source_id: this.model.id },
29
+ where: { source_type: SourceHash.model, source_id: this.model.id },
30
30
  relations: ['reference_model'],
31
31
  });
32
32
  }
@@ -7,7 +7,12 @@ export declare class ProcessSmtpMail extends ProcessCommonMail {
7
7
  private refreshTime;
8
8
  private config;
9
9
  constructor(propertyService: PropertyService, options: MailOptionsDto);
10
- process(): Promise<string>;
10
+ process(): Promise<{
11
+ identifier: any;
12
+ attributes: {
13
+ ses: any;
14
+ };
15
+ }>;
11
16
  private send;
12
17
  private setAttachments;
13
18
  private getConfig;
@@ -13,7 +13,8 @@ class ProcessSmtpMail extends process_common_mail_1.ProcessCommonMail {
13
13
  }
14
14
  async process() {
15
15
  const response = await this.send();
16
- return response.MessageID;
16
+ const identifier = response.response.split(' ')[2];
17
+ return { identifier, attributes: { ses: response } };
17
18
  }
18
19
  async send() {
19
20
  const config = await this.getConfig();
@@ -23,7 +24,7 @@ class ProcessSmtpMail extends process_common_mail_1.ProcessCommonMail {
23
24
  }
24
25
  const transporter = nodemailer.createTransport({
25
26
  host: config.host,
26
- port: config.port,
27
+ port: +config.port,
27
28
  auth: {
28
29
  user: config.username,
29
30
  pass: config.password,
@@ -68,11 +69,11 @@ class ProcessSmtpMail extends process_common_mail_1.ProcessCommonMail {
68
69
  if (this.refreshTime && this.refreshTime > now)
69
70
  return this.config;
70
71
  this.refreshTime = (0, date_fns_1.addMinutes)(now, 15);
71
- const host = await this.propertyService.get('smtp.host.url', false);
72
- const port = await this.propertyService.get('smtp.host.port', false);
73
- const username = await this.propertyService.get('smtp.user.name', false);
74
- const password = await this.propertyService.get('smtp.user.password', false);
75
- const from = await this.propertyService.get('smtp.default.from', false);
72
+ const host = 'email-smtp.ap-south-1.amazonaws.com';
73
+ const port = '587';
74
+ const username = 'AKIASDGGJT64E2GVUGOO';
75
+ const password = 'BDmmaNX6lPtNDAPiUXjLn7FYeT+pVeGCkPQ2PMiO7Apv';
76
+ const from = 'no-reply@finnoto.in';
76
77
  if (!(host && port && username && password && from))
77
78
  return;
78
79
  this.config = { host, port, username, password, from };
@@ -1 +1 @@
1
- {"version":3,"file":"process.smtp.mail.js","sourceRoot":"","sources":["../../../src/platformUtility/libraries/process.smtp.mail.ts"],"names":[],"mappings":";;;AAAA,uCAAsC;AACtC,yCAAyC;AAIzC,+DAA0D;AAQ1D,MAAa,eAAgB,SAAQ,uCAAiB;IAsBlD,YACqB,eAAgC,EACzC,OAAuB;QAE/B,KAAK,EAAE,CAAC;QAHS,oBAAe,GAAf,eAAe,CAAiB;QACzC,YAAO,GAAP,OAAO,CAAgB;QAT3B,WAAM,GAAkB,IAAI,CAAC;IAYrC,CAAC;IAOD,KAAK,CAAC,OAAO;QACT,MAAM,QAAQ,GAAQ,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;QACxC,OAAO,QAA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
2
+ import { UploadService } from '../../system/services/upload.service';
2
3
  import { MailLogEntity } from './../../system/entities/mail.log.entity';
3
4
  import { MailOptionsDto } from './../dtos/mail.options.dto';
4
- import { DynamoService } from './dynamo.service';
5
5
  export declare class MailService {
6
- private readonly dynamoService;
7
6
  private readonly propertyService;
7
+ private readonly uploadService;
8
8
  private refreshTime;
9
- private entityTable;
10
9
  private gateway;
11
- constructor(dynamoService: DynamoService, propertyService: PropertyService);
10
+ constructor(propertyService: PropertyService, uploadService: UploadService);
12
11
  send(options: MailOptionsDto, metadata?: any): Promise<MailLogEntity>;
12
+ private getBody;
13
+ private setRecipients;
14
+ private setRecipient;
13
15
  private processMail;
14
- private saveToDynamo;
15
- private getEntityTable;
16
16
  private getDefaultGateway;
17
17
  }
@@ -13,49 +13,57 @@ exports.MailService = void 0;
13
13
  const common_1 = require("@nestjs/common");
14
14
  const class_transformer_1 = require("class-transformer");
15
15
  const date_fns_1 = require("date-fns");
16
+ const platform_utility_1 = require("../../common/libraries/platform.utility");
17
+ const mail_recipient_entity_1 = require("../../system/entities/mail.recipient.entity");
16
18
  const property_service_1 = require("../../system/services/property.service");
19
+ const upload_service_1 = require("../../system/services/upload.service");
17
20
  const process_smtp_mail_1 = require("../libraries/process.smtp.mail");
18
21
  const mail_log_entity_1 = require("./../../system/entities/mail.log.entity");
19
- const dynamo_service_1 = require("./dynamo.service");
20
- const SOURCEHASH = require("../../config/source.hash");
21
22
  let MailService = class MailService {
22
- constructor(dynamoService, propertyService) {
23
- this.dynamoService = dynamoService;
23
+ constructor(propertyService, uploadService) {
24
24
  this.propertyService = propertyService;
25
+ this.uploadService = uploadService;
25
26
  this.refreshTime = {};
26
- this.entityTable = null;
27
27
  this.gateway = null;
28
28
  }
29
29
  async send(options, metadata) {
30
- const identifier = await this.processMail(options);
30
+ const { identifier, attributes } = await this.processMail(options);
31
31
  const gateway = this.gateway;
32
- const body = { gateway, identifier, to: options.to };
32
+ const body = { gateway, identifier };
33
33
  const log = (0, class_transformer_1.plainToClass)(mail_log_entity_1.MailLogEntity, { ...body, ...metadata });
34
+ log.attributes = { ...attributes, attachments: options.files || {} };
35
+ log.processed_on = new Date();
36
+ log.body = await this.getBody(options);
37
+ log.subject = options.subject;
34
38
  await log.save();
35
- await this.saveToDynamo(log, options, identifier);
39
+ await this.setRecipients(log, options);
36
40
  return log;
37
41
  }
42
+ async getBody(options) {
43
+ const str = options.html || options.text;
44
+ const buffer = Buffer.from(str, 'utf-8');
45
+ return this.uploadService.upload({ buffer, originalname: `mail.body.${platform_utility_1.PlatformUtility.generateRandomAlpha(16)}.html` });
46
+ }
47
+ async setRecipients(mail, options) {
48
+ const nodes = ['cc', 'bcc', 'to'];
49
+ for (const node of nodes) {
50
+ if (options[node])
51
+ await this.setRecipient(mail, node, options[node]);
52
+ }
53
+ }
54
+ async setRecipient(mail, type, email) {
55
+ const emails = Array.isArray(email) ? email : [email];
56
+ for (const email of emails) {
57
+ const r = mail_recipient_entity_1.MailRecipientEntity.create({ mail_id: mail.id, type, email });
58
+ await r.save();
59
+ }
60
+ }
38
61
  async processMail(options) {
39
62
  const gateway = await this.getDefaultGateway();
40
63
  if (gateway === 'smtp')
41
64
  return new process_smtp_mail_1.ProcessSmtpMail(this.propertyService, options).process();
42
65
  global.console.log('No mail gateway defined in the system');
43
66
  }
44
- async saveToDynamo(log, options, identifier) {
45
- const entityTable = await this.getEntityTable();
46
- if (!entityTable)
47
- return;
48
- const dynamoItem = { entity_hash: SOURCEHASH.mailLog, entity_id: log.id, options, identifier };
49
- return this.dynamoService.setItem(entityTable, dynamoItem);
50
- }
51
- async getEntityTable() {
52
- const now = new Date();
53
- if (this.refreshTime.dynamoTable && this.refreshTime.dynamoTable > now)
54
- return this.entityTable;
55
- this.refreshTime.dynamoTable = (0, date_fns_1.addMinutes)(now, 15);
56
- this.entityTable = await this.propertyService.get('audit.table.name', false);
57
- return this.entityTable;
58
- }
59
67
  async getDefaultGateway() {
60
68
  const now = new Date();
61
69
  if (this.refreshTime.gateway && this.refreshTime.gateway > now)
@@ -68,7 +76,7 @@ let MailService = class MailService {
68
76
  exports.MailService = MailService;
69
77
  exports.MailService = MailService = __decorate([
70
78
  (0, common_1.Injectable)(),
71
- __metadata("design:paramtypes", [dynamo_service_1.DynamoService,
72
- property_service_1.PropertyService])
79
+ __metadata("design:paramtypes", [property_service_1.PropertyService,
80
+ upload_service_1.UploadService])
73
81
  ], MailService);
74
82
  //# sourceMappingURL=mail.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mail.service.js","sourceRoot":"","sources":["../../../src/platformUtility/services/mail.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,yDAAiD;AACjD,uCAAsC;AACtC,6EAAyE;AACzE,sEAAiE;AACjE,6EAAwE;AAExE,qDAAiD;AACjD,uDAAwD;AAQjD,IAAM,WAAW,GAAjB,MAAM,WAAW;IA2BpB,YACqB,aAA4B,EAC5B,eAAgC;QADhC,kBAAa,GAAb,aAAa,CAAe;QAC5B,oBAAe,GAAf,eAAe,CAAiB;QAvB7C,gBAAW,GAA2C,EAAE,CAAC;QAOzD,gBAAW,GAAG,IAAI,CAAC;QAOnB,YAAO,GAAG,IAAI,CAAC;IAUpB,CAAC;IASJ,KAAK,CAAC,IAAI,CAAC,OAAuB,EAAE,QAAc;QAC9C,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QACnD,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAE7B,MAAM,IAAI,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC;QACrD,MAAM,GAAG,GAAG,IAAA,gCAAY,EAAC,+BAAa,EAAE,EAAE,GAAG,IAAI,EAAE,GAAG,QAAQ,EAAE,CAAC,CAAC;QAElE,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;QACjB,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,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kCAAe;QACjB,8BAAa;GAvBxC,WAAW,CAoGvB"}
@@ -21,7 +21,7 @@ const column_definition_entity_1 = require("./../entities/column.definition.enti
21
21
  const column_entity_1 = require("./../entities/column.entity");
22
22
  const model_entity_1 = require("./../entities/model.entity");
23
23
  const relationship_entity_1 = require("./../entities/relationship.entity");
24
- const SOURCEHASH = require("../../config/source.hash");
24
+ const SourceHash = require("../../config/source.hash");
25
25
  const hash_1 = require("../../common/libraries/hash");
26
26
  let DbScannerCommand = class DbScannerCommand {
27
27
  constructor(queueService, sqlService) {
@@ -89,7 +89,7 @@ let DbScannerCommand = class DbScannerCommand {
89
89
  });
90
90
  }
91
91
  async setColumn(model, data) {
92
- const column = await column_entity_1.ColumnEntity.firstOrNew({ source_type: SOURCEHASH.model, source_id: model.id, name: data.column_name });
92
+ const column = await column_entity_1.ColumnEntity.firstOrNew({ source_type: SourceHash.model, source_id: model.id, name: data.column_name });
93
93
  column.ordinal_position = data.ordinal_position;
94
94
  if (column.id)
95
95
  return column.save();
@@ -135,18 +135,18 @@ let DbScannerCommand = class DbScannerCommand {
135
135
  else
136
136
  foreignColumn = await this.getColumn(foreignModel, data.foreign_column_name);
137
137
  const forwardRelationship = await relationship_entity_1.RelationshipEntity.firstOrNew({
138
- source_type: SOURCEHASH.model,
138
+ source_type: SourceHash.model,
139
139
  source_id: model.id,
140
140
  source_column_id: sourceColumn.id,
141
141
  });
142
142
  let reverseRelationship = await relationship_entity_1.RelationshipEntity.firstOrNew({
143
- source_type: SOURCEHASH.model,
143
+ source_type: SourceHash.model,
144
144
  source_id: foreignModel.id,
145
145
  alias_column_id: sourceColumn.id,
146
146
  });
147
147
  if (!reverseRelationship?.id) {
148
148
  reverseRelationship = await relationship_entity_1.RelationshipEntity.firstOrNew({
149
- source_type: SOURCEHASH.model,
149
+ source_type: SourceHash.model,
150
150
  source_id: foreignModel.id,
151
151
  alias_column_id: (0, typeorm_1.IsNull)(),
152
152
  });
@@ -193,7 +193,7 @@ let DbScannerCommand = class DbScannerCommand {
193
193
  await relationship.save();
194
194
  }
195
195
  async getColumn(model, columnName) {
196
- return column_entity_1.ColumnEntity.findOne({ where: { source_type: SOURCEHASH.model, source_id: model.id, name: columnName } });
196
+ return column_entity_1.ColumnEntity.findOne({ where: { source_type: SourceHash.model, source_id: model.id, name: columnName } });
197
197
  }
198
198
  async setUserTable() {
199
199
  const model = await model_entity_1.ModelEntity.firstOrNew({ table_name: 'sys_users' });
@@ -5,4 +5,5 @@ export * from './jobs.scanner.command';
5
5
  export * from './model.scanner.command';
6
6
  export * from './report.scanner.command';
7
7
  export * from './service.scanner.command';
8
+ export * from './ses.event.tracking.command';
8
9
  export * from './sync.all.command';
@@ -21,5 +21,6 @@ __exportStar(require("./jobs.scanner.command"), exports);
21
21
  __exportStar(require("./model.scanner.command"), exports);
22
22
  __exportStar(require("./report.scanner.command"), exports);
23
23
  __exportStar(require("./service.scanner.command"), exports);
24
+ __exportStar(require("./ses.event.tracking.command"), exports);
24
25
  __exportStar(require("./sync.all.command"), exports);
25
26
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/system/commands/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AAAA,2DAAyC;AAAA,wDAAsC;AAAA,yDAAuC;AAAA,0DAAwC;AAAA,2DAAyC;AAAA,4DAA0C;AAAA,qDAAkC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/system/commands/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AAAA,2DAAyC;AAAA,wDAAsC;AAAA,yDAAuC;AAAA,0DAAwC;AAAA,2DAAyC;AAAA,4DAA0C;AAAA,+DAA6C;AAAA,qDAAkC"}
@@ -0,0 +1,12 @@
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 { PropertyService } from '../services/property.service';
5
+ export declare class SesEventTrackingCommand extends CommonSqsPolling {
6
+ protected readonly queueService: QueueService;
7
+ protected readonly maintenanceService: MaintenanceService;
8
+ private readonly propertyService;
9
+ constructor(queueService: QueueService, maintenanceService: MaintenanceService, propertyService: PropertyService);
10
+ process(): Promise<void>;
11
+ private processJob;
12
+ }
@@ -0,0 +1,70 @@
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 mail_event_entity_1 = require("../entities/mail.event.entity");
20
+ const mail_log_entity_1 = require("../entities/mail.log.entity");
21
+ const property_service_1 = require("../services/property.service");
22
+ let SesEventTrackingCommand = class SesEventTrackingCommand extends common_sqs_polling_1.CommonSqsPolling {
23
+ constructor(queueService, maintenanceService, propertyService) {
24
+ super();
25
+ this.queueService = queueService;
26
+ this.maintenanceService = maintenanceService;
27
+ this.propertyService = propertyService;
28
+ }
29
+ async process() {
30
+ await this.queueService.pause();
31
+ this.logger = new common_1.Logger('SqsWorker Mail');
32
+ this.sqsQueue = await this.propertyService.get('sqs.ses.event.url');
33
+ if (!this.sqsQueue)
34
+ throw new operation_exception_1.OperationException(`Given queue is not defined`);
35
+ this.logger.log(`logging queue ${this.sqsQueue}`);
36
+ await this.handle(this.processJob);
37
+ }
38
+ async processJob(data) {
39
+ const event = data.eventType || data.notificationType;
40
+ const type = event.toLowerCase();
41
+ const identifier = data.mail.messageId;
42
+ const r = mail_event_entity_1.MailEventEntity.create({ type });
43
+ r.identifier = identifier;
44
+ const mail = await mail_log_entity_1.MailLogEntity.findOne({ where: { identifier } });
45
+ if (mail)
46
+ r.mail_id = mail.id;
47
+ const time = data[type]?.timestamp;
48
+ if (time)
49
+ r.activity_at = new Date(time);
50
+ r.attributes = data;
51
+ await r.save();
52
+ }
53
+ };
54
+ exports.SesEventTrackingCommand = SesEventTrackingCommand;
55
+ __decorate([
56
+ (0, nestjs_command_1.Command)({
57
+ command: 'queue:ses-event',
58
+ describe: 'run worker through incoming email event queue',
59
+ }),
60
+ __metadata("design:type", Function),
61
+ __metadata("design:paramtypes", []),
62
+ __metadata("design:returntype", Promise)
63
+ ], SesEventTrackingCommand.prototype, "process", null);
64
+ exports.SesEventTrackingCommand = SesEventTrackingCommand = __decorate([
65
+ (0, common_1.Injectable)(),
66
+ __metadata("design:paramtypes", [queue_service_1.QueueService,
67
+ maintenance_service_1.MaintenanceService,
68
+ property_service_1.PropertyService])
69
+ ], SesEventTrackingCommand);
70
+ //# sourceMappingURL=ses.event.tracking.command.js.map
@@ -0,0 +1 @@
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,qE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E,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;AAnDY,0DAAuB;AAa1B;IAJL,IAAA,wBAAO,EAAC;QACL,OAAO,EAAE,iBAAiB;QAC1B,QAAQ,EAAE,+CAA+C;KAC5D,CAAC;;;;sDAYD;kCAxBQ,uBAAuB;IADnC,IAAA,mBAAU,GAAE;qCAG4B,4BAAY;QACN,wCAAkB;QACvB,kCAAe;GAJ5C,uBAAuB,CAmDnC"}
@@ -17,7 +17,7 @@ const common_1 = require("@nestjs/common");
17
17
  const form_service_1 = require("../services/form.service");
18
18
  const preference_service_1 = require("../services/preference.service");
19
19
  const client_script_entity_1 = require("./../entities/client.script.entity");
20
- const SOURCEHASH = require("../../config/source.hash");
20
+ const SourceHash = require("../../config/source.hash");
21
21
  const form_entity_1 = require("../entities/form.entity");
22
22
  let FormController = class FormController {
23
23
  constructor(formService, preferenceService) {
@@ -28,9 +28,9 @@ let FormController = class FormController {
28
28
  const form = await form_entity_1.FormEntity.first(id);
29
29
  const dictionary = {};
30
30
  dictionary[form.identifier] = await this.formService.getDictionary(form);
31
- const form_layouts = await this.preferenceService.getFormPreferences(SOURCEHASH.form, form.id);
31
+ const form_layouts = await this.preferenceService.getFormPreferences(SourceHash.form, form.id);
32
32
  const client_scripts = await client_script_entity_1.ClientScriptEntity.find({
33
- where: { source_type: SOURCEHASH.form, source_id: form.id, active: true },
33
+ where: { source_type: SourceHash.form, source_id: form.id, active: true },
34
34
  relations: ['script'],
35
35
  });
36
36
  return { form, form_layouts, client_scripts, dictionary };
@@ -23,7 +23,7 @@ const model_form_preference_creation_dto_1 = require("../dtos/model.form.prefere
23
23
  const form_preference_entity_1 = require("../entities/form.preference.entity");
24
24
  const list_preference_entity_1 = require("../entities/list.preference.entity");
25
25
  const user_preference_service_1 = require("../services/user.preference.service");
26
- const SOURCEHASH = require("../../config/source.hash");
26
+ const SourceHash = require("../../config/source.hash");
27
27
  let PreferenceController = class PreferenceController {
28
28
  constructor(accessManager, userPreferenceService) {
29
29
  this.accessManager = accessManager;
@@ -46,7 +46,7 @@ let PreferenceController = class PreferenceController {
46
46
  async storeMenuListPreference(id, body) {
47
47
  const user = auth_1.Auth.user();
48
48
  const preference = await list_preference_entity_1.ListPreferenceEntity.firstOrNew({
49
- source_type: SOURCEHASH.menu,
49
+ source_type: SourceHash.menu,
50
50
  source_id: id,
51
51
  user_id: user.id,
52
52
  name: body.name,
@@ -57,7 +57,7 @@ let PreferenceController = class PreferenceController {
57
57
  }
58
58
  async storeModelFormPreference(id, body) {
59
59
  const preference = await form_preference_entity_1.FormPreferenceEntity.firstOrNew({
60
- source_type: SOURCEHASH.model,
60
+ source_type: SourceHash.model,
61
61
  source_id: id,
62
62
  name: body.name,
63
63
  });
@@ -66,7 +66,7 @@ let PreferenceController = class PreferenceController {
66
66
  return preference;
67
67
  }
68
68
  async storeFormPreference(body) {
69
- const source = body.source_type === SOURCEHASH.relationship ? SOURCEHASH.model : body.source_type;
69
+ const source = body.source_type === SourceHash.relationship ? SourceHash.model : body.source_type;
70
70
  const preference = await form_preference_entity_1.FormPreferenceEntity.firstOrNew({
71
71
  source_type: source,
72
72
  source_id: body.source_id,
@@ -17,7 +17,7 @@ const common_1 = require("@nestjs/common");
17
17
  const access_exception_1 = require("../../common/exceptions/access.exception");
18
18
  const report_body_parser_1 = require("../../common/libraries/report.body.parser");
19
19
  const report_list_manager_1 = require("../../common/libraries/report.list.manager");
20
- const SOURCEHASH = require("../../config/source.hash");
20
+ const SourceHash = require("../../config/source.hash");
21
21
  const sql_service_1 = require("../../platformUtility/services/sql.service");
22
22
  const chart_entity_1 = require("../entities/chart.entity");
23
23
  const report_entity_1 = require("../entities/report.entity");
@@ -48,7 +48,7 @@ let ReportController = class ReportController {
48
48
  }
49
49
  async getChartData(id, body) {
50
50
  const chart = await chart_entity_1.ChartEntity.first(id, {});
51
- if (!chart || chart.source_type !== SOURCEHASH.report)
51
+ if (!chart || chart.source_type !== SourceHash.report)
52
52
  throw new access_exception_1.AccessException('You dont have access to this chart');
53
53
  const hasAccess = await this.reportService.hasAccess(chart.source_id);
54
54
  if (!hasAccess)
@@ -10,6 +10,8 @@ export * from './file.upload.dto';
10
10
  export * from './file.upload.spec.dto';
11
11
  export * from './job.record.param.dto';
12
12
  export * from './local.file.s3.upload.dto';
13
+ export * from './mail.event.attributes.dto';
14
+ export * from './mail.recipient.attributes.dto';
13
15
  export * from './mail.validation.dto';
14
16
  export * from './menu.list.preference.creation.dto';
15
17
  export * from './mobile.validation.dto';
@@ -26,6 +26,8 @@ __exportStar(require("./file.upload.dto"), exports);
26
26
  __exportStar(require("./file.upload.spec.dto"), exports);
27
27
  __exportStar(require("./job.record.param.dto"), exports);
28
28
  __exportStar(require("./local.file.s3.upload.dto"), exports);
29
+ __exportStar(require("./mail.event.attributes.dto"), exports);
30
+ __exportStar(require("./mail.recipient.attributes.dto"), exports);
29
31
  __exportStar(require("./mail.validation.dto"), exports);
30
32
  __exportStar(require("./menu.list.preference.creation.dto"), exports);
31
33
  __exportStar(require("./mobile.validation.dto"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/system/dtos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAAA,wDAAsC;AAAA,0DAAwC;AAAA,qEAAmD;AAAA,0DAAwC;AAAA,2DAAyC;AAAA,iEAA+C;AAAA,4DAA0C;AAAA,oDAAkC;AAAA,yDAAuC;AAAA,yDAAuC;AAAA,6DAA2C;AAAA,wDAAsC;AAAA,sEAAoD;AAAA,0DAAwC;AAAA,6DAA2C;AAAA,uEAAqD;AAAA,uDAAqC;AAAA,uDAAqC;AAAA,0DAAwC;AAAA,+DAA6C;AAAA,iEAA+C;AAAA,2DAAwC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/system/dtos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAAA,wDAAsC;AAAA,0DAAwC;AAAA,qEAAmD;AAAA,0DAAwC;AAAA,2DAAyC;AAAA,iEAA+C;AAAA,4DAA0C;AAAA,oDAAkC;AAAA,yDAAuC;AAAA,yDAAuC;AAAA,6DAA2C;AAAA,8DAA4C;AAAA,kEAAgD;AAAA,wDAAsC;AAAA,sEAAoD;AAAA,0DAAwC;AAAA,6DAA2C;AAAA,uEAAqD;AAAA,uDAAqC;AAAA,uDAAqC;AAAA,0DAAwC;AAAA,+DAA6C;AAAA,iEAA+C;AAAA,2DAAwC"}
@@ -0,0 +1,3 @@
1
+ import { CommonAttributesDto } from '../../platformUtility/dtos/common.attributes.dto';
2
+ export declare class MailEventAttributesDto extends CommonAttributesDto {
3
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MailEventAttributesDto = void 0;
4
+ const common_attributes_dto_1 = require("../../platformUtility/dtos/common.attributes.dto");
5
+ class MailEventAttributesDto extends common_attributes_dto_1.CommonAttributesDto {
6
+ }
7
+ exports.MailEventAttributesDto = MailEventAttributesDto;
8
+ //# sourceMappingURL=mail.event.attributes.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mail.event.attributes.dto.js","sourceRoot":"","sources":["../../../src/system/dtos/mail.event.attributes.dto.ts"],"names":[],"mappings":";;;AAAA,4FAAuF;AAEvF,MAAa,sBAAuB,SAAQ,2CAAmB;CAAG;AAAlE,wDAAkE"}
@@ -0,0 +1,3 @@
1
+ import { CommonAttributesDto } from '../../platformUtility/dtos/common.attributes.dto';
2
+ export declare class MailRecipientAttributesDto extends CommonAttributesDto {
3
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MailRecipientAttributesDto = void 0;
4
+ const common_attributes_dto_1 = require("../../platformUtility/dtos/common.attributes.dto");
5
+ class MailRecipientAttributesDto extends common_attributes_dto_1.CommonAttributesDto {
6
+ }
7
+ exports.MailRecipientAttributesDto = MailRecipientAttributesDto;
8
+ //# sourceMappingURL=mail.recipient.attributes.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mail.recipient.attributes.dto.js","sourceRoot":"","sources":["../../../src/system/dtos/mail.recipient.attributes.dto.ts"],"names":[],"mappings":";;;AAAA,4FAAuF;AAEvF,MAAa,0BAA2B,SAAQ,2CAAmB;CAAG;AAAtE,gEAAsE"}
@@ -19,7 +19,9 @@ export * from './form.preference.entity';
19
19
  export * from './list.preference.entity';
20
20
  export * from './lookup.type.entity';
21
21
  export * from './lookup.value.entity';
22
+ export * from './mail.event.entity';
22
23
  export * from './mail.log.entity';
24
+ export * from './mail.recipient.entity';
23
25
  export * from './mail.validation.entity';
24
26
  export * from './menu.entity';
25
27
  export * from './menu.role.entity';
@@ -35,7 +35,9 @@ __exportStar(require("./form.preference.entity"), exports);
35
35
  __exportStar(require("./list.preference.entity"), exports);
36
36
  __exportStar(require("./lookup.type.entity"), exports);
37
37
  __exportStar(require("./lookup.value.entity"), exports);
38
+ __exportStar(require("./mail.event.entity"), exports);
38
39
  __exportStar(require("./mail.log.entity"), exports);
40
+ __exportStar(require("./mail.recipient.entity"), exports);
39
41
  __exportStar(require("./mail.validation.entity"), exports);
40
42
  __exportStar(require("./menu.entity"), exports);
41
43
  __exportStar(require("./menu.role.entity"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/system/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;A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AA,wDAAsC;AAAA,sDAAoC;AAAA,oDAAkC;AAAA,0DAAwC;AAAA,2DAAyC;AAAA,gDAA8B;AAAA,qDAAmC;AAAA,6DAA2C;AAAA,wDAAsC;AAAA,iDAA+B;AAAA,8DAA4C;AAAA,sDAAoC;AAAA,kDAAgC;AAAA,uDAAqC;AAAA,yDAAuC;AAAA,2DAAyC;AAAA,uDAAqC;AAAA,wDAAsC;AAAA,oDAAkC;AAAA,wDAAsC;AAAA,yDAAuC;AAAA,kDAAgC;AAAA,yDAAuC;AAAA,wDAAsC;AAAA,+DAA6C;AAAA,uDAAqC;AAAA,2DAAyC;AAAA,0DAAwC;AAAA,yDAAuC;AAAA,mDAAiC;AAAA,uDAAqC;AAAA,wDAAsC;AAAA,yDAAuC;AAAA,qDAAmC;AAAA,gEAA8C;AAAA,0DAAwC;AAAA,sDAAoC;AAAA,6DAA2C;AAAA,iEAA+C;AAAA,2DAAyC;AAAA,2DAAyC;AAAA,6DAA0C"}
@@ -0,0 +1,11 @@
1
+ import { CommonEntity } from '../../common/libraries/common.entity';
2
+ import { MailEventAttributesDto } from '../dtos/mail.event.attributes.dto';
3
+ import { MailLogEntity } from './mail.log.entity';
4
+ export declare class MailEventEntity extends CommonEntity {
5
+ mail_id: number;
6
+ identifier: string;
7
+ type: string;
8
+ activity_at: Date;
9
+ attributes: MailEventAttributesDto;
10
+ mail: MailLogEntity;
11
+ }