@servicelabsco/nestjs-utility-services 1.0.144 → 1.0.148

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 (62) hide show
  1. package/dist/app.controller.d.ts +2 -6
  2. package/dist/app.controller.js +5 -10
  3. package/dist/app.controller.js.map +1 -1
  4. package/dist/common/libraries/common.job.d.ts +1 -0
  5. package/dist/common/libraries/common.job.js +17 -2
  6. package/dist/common/libraries/common.job.js.map +1 -1
  7. package/dist/config/entity.constants.d.ts +2 -0
  8. package/dist/config/entity.constants.js +2 -0
  9. package/dist/config/entity.constants.js.map +1 -1
  10. package/dist/migrations/1643398296090-CreateMailLogTable.d.ts +5 -0
  11. package/dist/migrations/1643398296090-CreateMailLogTable.js +25 -0
  12. package/dist/migrations/1643398296090-CreateMailLogTable.js.map +1 -0
  13. package/dist/platformUtility/commands/index.d.ts +1 -0
  14. package/dist/platformUtility/commands/index.js +1 -0
  15. package/dist/platformUtility/commands/index.js.map +1 -1
  16. package/dist/platformUtility/commands/sqs.worker.command.d.ts +15 -0
  17. package/dist/platformUtility/commands/sqs.worker.command.js +111 -0
  18. package/dist/platformUtility/commands/sqs.worker.command.js.map +1 -0
  19. package/dist/platformUtility/dtos/index.d.ts +1 -0
  20. package/dist/platformUtility/dtos/index.js +1 -0
  21. package/dist/platformUtility/dtos/index.js.map +1 -1
  22. package/dist/platformUtility/dtos/mail.options.dto.d.ts +13 -0
  23. package/dist/platformUtility/dtos/mail.options.dto.js +59 -0
  24. package/dist/platformUtility/dtos/mail.options.dto.js.map +1 -0
  25. package/dist/platformUtility/es6.classes.d.ts +8 -4
  26. package/dist/platformUtility/es6.classes.js +8 -3
  27. package/dist/platformUtility/es6.classes.js.map +1 -1
  28. package/dist/platformUtility/jobs/index.d.ts +1 -0
  29. package/dist/platformUtility/jobs/index.js +1 -0
  30. package/dist/platformUtility/jobs/index.js.map +1 -1
  31. package/dist/platformUtility/jobs/test.job.d.ts +8 -0
  32. package/dist/platformUtility/jobs/test.job.js +42 -0
  33. package/dist/platformUtility/jobs/test.job.js.map +1 -0
  34. package/dist/platformUtility/services/dynamo.service.js +4 -4
  35. package/dist/platformUtility/services/dynamo.service.js.map +1 -1
  36. package/dist/platformUtility/services/es6.jobs.service.d.ts +3 -1
  37. package/dist/platformUtility/services/es6.jobs.service.js +7 -2
  38. package/dist/platformUtility/services/es6.jobs.service.js.map +1 -1
  39. package/dist/platformUtility/services/index.d.ts +2 -0
  40. package/dist/platformUtility/services/index.js +2 -0
  41. package/dist/platformUtility/services/index.js.map +1 -1
  42. package/dist/platformUtility/services/mail.service.d.ts +12 -1
  43. package/dist/platformUtility/services/mail.service.js +89 -2
  44. package/dist/platformUtility/services/mail.service.js.map +1 -1
  45. package/dist/platformUtility/services/queue.service.d.ts +7 -4
  46. package/dist/platformUtility/services/queue.service.js +23 -10
  47. package/dist/platformUtility/services/queue.service.js.map +1 -1
  48. package/dist/platformUtility/services/sqs.service.d.ts +8 -0
  49. package/dist/platformUtility/services/sqs.service.js +86 -0
  50. package/dist/platformUtility/services/sqs.service.js.map +1 -0
  51. package/dist/system/commands/vaccine.command.js +0 -10
  52. package/dist/system/commands/vaccine.command.js.map +1 -1
  53. package/dist/system/entities/index.d.ts +1 -0
  54. package/dist/system/entities/index.js +1 -0
  55. package/dist/system/entities/index.js.map +1 -1
  56. package/dist/system/entities/mail.log.entity.d.ts +12 -0
  57. package/dist/system/entities/mail.log.entity.js +57 -0
  58. package/dist/system/entities/mail.log.entity.js.map +1 -0
  59. package/dist/system/es6.classes.d.ts +4 -3
  60. package/dist/system/es6.classes.js +2 -0
  61. package/dist/system/es6.classes.js.map +1 -1
  62. package/package.json +2 -1
@@ -1,16 +1,12 @@
1
1
  import { AppService } from './app.service';
2
2
  import { QueueService } from './platformUtility/services/queue.service';
3
- import { ModelScannerJob } from './system/jobs/model.scanner.job';
4
- import { UploadService } from './system/services/upload.service';
5
3
  export declare class AppController {
6
4
  private readonly appService;
7
5
  private readonly queueService;
8
- private readonly modelScannerJob;
9
- private readonly uploadService;
10
- constructor(appService: AppService, queueService: QueueService, modelScannerJob: ModelScannerJob, uploadService: UploadService);
6
+ constructor(appService: AppService, queueService: QueueService);
11
7
  get(): Promise<{
12
8
  message: string;
13
9
  }>;
14
10
  getUserAuthObject(): Promise<any>;
15
- set(): Promise<void>;
11
+ set(): Promise<any>;
16
12
  }
@@ -23,14 +23,10 @@ const common_1 = require("@nestjs/common");
23
23
  const app_service_1 = require("./app.service");
24
24
  const auth_1 = require("./common/libraries/auth");
25
25
  const queue_service_1 = require("./platformUtility/services/queue.service");
26
- const model_scanner_job_1 = require("./system/jobs/model.scanner.job");
27
- const upload_service_1 = require("./system/services/upload.service");
28
26
  let AppController = class AppController {
29
- constructor(appService, queueService, modelScannerJob, uploadService) {
27
+ constructor(appService, queueService) {
30
28
  this.appService = appService;
31
29
  this.queueService = queueService;
32
- this.modelScannerJob = modelScannerJob;
33
- this.uploadService = uploadService;
34
30
  }
35
31
  get() {
36
32
  return __awaiter(this, void 0, void 0, function* () {
@@ -43,7 +39,9 @@ let AppController = class AppController {
43
39
  });
44
40
  }
45
41
  set() {
46
- return __awaiter(this, void 0, void 0, function* () { });
42
+ return __awaiter(this, void 0, void 0, function* () {
43
+ return this.queueService.addJob('b20ed62e97fbef22a56c84c4908996a6', 123);
44
+ });
47
45
  }
48
46
  };
49
47
  __decorate([
@@ -66,10 +64,7 @@ __decorate([
66
64
  ], AppController.prototype, "set", null);
67
65
  AppController = __decorate([
68
66
  (0, common_1.Controller)(),
69
- __metadata("design:paramtypes", [app_service_1.AppService,
70
- queue_service_1.QueueService,
71
- model_scanner_job_1.ModelScannerJob,
72
- upload_service_1.UploadService])
67
+ __metadata("design:paramtypes", [app_service_1.AppService, queue_service_1.QueueService])
73
68
  ], AppController);
74
69
  exports.AppController = AppController;
75
70
  //# sourceMappingURL=app.controller.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../src/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,2CAAiD;AACjD,+CAA2C;AAC3C,kDAA+C;AAC/C,4EAAwE;AACxE,uEAAkE;AAClE,qEAAiE;AAGjE,IAAa,aAAa,GAA1B,MAAa,aAAa;IACtB,YACqB,UAAsB,EACtB,YAA0B,EAC1B,eAAgC,EAChC,aAA4B;QAH5B,eAAU,GAAV,UAAU,CAAY;QACtB,iBAAY,GAAZ,YAAY,CAAc;QAC1B,oBAAe,GAAf,eAAe,CAAiB;QAChC,kBAAa,GAAb,aAAa,CAAe;IAC9C,CAAC;IAGE,GAAG;;YACL,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;QACvC,CAAC;KAAA;IAQK,iBAAiB;;YACnB,OAAO,WAAI,CAAC,IAAI,EAAE,CAAC;QACvB,CAAC;KAAA;IAGK,GAAG;8DAAI,CAAC;KAAA;CACjB,CAAA;AAhBG;IADC,IAAA,YAAG,GAAE;;;;wCAGL;AAQD;IADC,IAAA,YAAG,EAAC,UAAU,CAAC;;;;sDAGf;AAGD;IADC,IAAA,YAAG,EAAC,KAAK,CAAC;;;;wCACG;AAxBL,aAAa;IADzB,IAAA,mBAAU,GAAE;qCAGwB,wBAAU;QACR,4BAAY;QACT,mCAAe;QACjB,8BAAa;GALxC,aAAa,CAyBzB;AAzBY,sCAAa"}
1
+ {"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../src/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,2CAAiD;AACjD,+CAA2C;AAC3C,kDAA+C;AAE/C,4EAAwE;AAGxE,IAAa,aAAa,GAA1B,MAAa,aAAa;IACtB,YAA6B,UAAsB,EAAmB,YAA0B;QAAnE,eAAU,GAAV,UAAU,CAAY;QAAmB,iBAAY,GAAZ,YAAY,CAAc;IAAG,CAAC;IAG9F,GAAG;;YACL,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;QACvC,CAAC;KAAA;IAQK,iBAAiB;;YACnB,OAAO,WAAI,CAAC,IAAI,EAAE,CAAC;QACvB,CAAC;KAAA;IAGK,GAAG;;YACL,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,kCAAkC,EAAE,GAAG,CAAC,CAAC;QAE7E,CAAC;KAAA;CACJ,CAAA;AAnBG;IADC,IAAA,YAAG,GAAE;;;;wCAGL;AAQD;IADC,IAAA,YAAG,EAAC,UAAU,CAAC;;;;sDAGf;AAGD;IADC,IAAA,YAAG,EAAC,KAAK,CAAC;;;;wCAIV;AAtBQ,aAAa;IADzB,IAAA,mBAAU,GAAE;qCAEgC,wBAAU,EAAiC,4BAAY;GADvF,aAAa,CAuBzB;AAvBY,sCAAa"}
@@ -3,6 +3,7 @@ import { QueueOptionsDto } from '../../platformUtility/dtos/queue.options.dto';
3
3
  import { QueueService } from '../../platformUtility/services/queue.service';
4
4
  import { BaseJobInterface } from './base.job.interface';
5
5
  export declare class CommonJob implements BaseJobInterface {
6
+ protected mode: string;
6
7
  protected queueService: QueueService;
7
8
  dispatch(data: any, options?: QueueOptionsDto): Promise<any>;
8
9
  delayedDispatch(data: any, options?: QueueOptionsDto): Promise<any>;
@@ -10,8 +10,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.CommonJob = void 0;
13
+ const operation_exception_1 = require("./../exceptions/operation.exception");
14
+ const config = require("config");
13
15
  const hash_1 = require("./hash");
14
16
  class CommonJob {
17
+ constructor() {
18
+ this.mode = 'redis';
19
+ }
15
20
  dispatch(data, options) {
16
21
  return __awaiter(this, void 0, void 0, function* () {
17
22
  const payload = {
@@ -20,7 +25,12 @@ class CommonJob {
20
25
  name: this.constructor.name,
21
26
  };
22
27
  options = options !== null && options !== void 0 ? options : {};
23
- yield this.queueService.add('generic.job.trigger', payload, options);
28
+ if (this.mode === 'redis')
29
+ return this.queueService.add('generic.job.trigger', payload, options);
30
+ const sqsQueue = config.get(`sqs.${this.mode}`);
31
+ if (!sqsQueue)
32
+ throw new operation_exception_1.OperationException(`Queue ${this.mode} is not defined in the system. please add is under sqs`);
33
+ return this.queueService.sqsService.add(sqsQueue, payload);
24
34
  });
25
35
  }
26
36
  delayedDispatch(data, options) {
@@ -32,7 +42,12 @@ class CommonJob {
32
42
  };
33
43
  options = options !== null && options !== void 0 ? options : {};
34
44
  options.delay = options.delay || 200;
35
- yield this.queueService.add('generic.job.trigger', payload, options);
45
+ if (this.mode === 'redis')
46
+ return this.queueService.add('generic.job.trigger', payload, options);
47
+ const sqsQueue = config.get(`sqs.${this.mode}`);
48
+ if (!sqsQueue)
49
+ throw new operation_exception_1.OperationException(`Queue ${this.mode} is not defined in the system. please add is under sqs`);
50
+ return this.queueService.sqsService.add(sqsQueue, payload);
36
51
  });
37
52
  }
38
53
  handle(data, job) {
@@ -1 +1 @@
1
- {"version":3,"file":"common.job.js","sourceRoot":"","sources":["../../../src/common/libraries/common.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAIA,iCAA8B;AAO9B,MAAa,SAAS;IAeZ,QAAQ,CAAC,IAAS,EAAE,OAAyB;;YAC/C,MAAM,OAAO,GAAG;gBACZ,GAAG,EAAE,WAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;gBACxC,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;aAC9B,CAAC;YAEF,OAAO,GAAG,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,CAAC;YAExB,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,qBAAqB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QACzE,CAAC;KAAA;IASK,eAAe,CAAC,IAAS,EAAE,OAAyB;;YACtD,MAAM,OAAO,GAAG;gBACZ,GAAG,EAAE,WAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;gBACx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AC,IAAI,wDAAwD,CAAC,CAAC;YAExH,OAAO,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC/D,CAAC;KAAA;IASK,eAAe,CAAC,IAAS,EAAE,OAAyB;;YACtD,MAAM,OAAO,GAAG;gBACZ,GAAG,EAAE,WAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;gBACxC,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;aAC9B,CAAC;YAEF,OAAO,GAAG,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,CAAC;YACxB,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,GAAG,CAAC;YAErC,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO;gBAAE,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,qBAAqB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAEjG,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;YAChD,IAAI,CAAC,QAAQ;gBAAE,MAAM,IAAI,wCAAkB,CAAC,SAAS,IAAI,CAAC,IAAI,wDAAwD,CAAC,CAAC;YAExH,OAAO,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC/D,CAAC;KAAA;IASK,MAAM,CAAC,IAAS,EAAE,GAAS;;YAC7B,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;CACJ;AA5ED,8BA4EC"}
@@ -24,6 +24,7 @@ import { FormPreferenceEntity } from '../system/entities/form.preference.entity'
24
24
  import { ListPreferenceEntity } from '../system/entities/list.preference.entity';
25
25
  import { LookupTypeEntity } from '../system/entities/lookup.type.entity';
26
26
  import { LookupValueEntity } from '../system/entities/lookup.value.entity';
27
+ import { MailLogEntity } from '../system/entities/mail.log.entity';
27
28
  import { MenuEntity } from '../system/entities/menu.entity';
28
29
  import { MenuRoleEntity } from '../system/entities/menu.role.entity';
29
30
  import { ModelColumnEntity } from '../system/entities/model.column.entity';
@@ -84,6 +85,7 @@ declare const entityConstants: {
84
85
  adb199a467c1d3df2eee56ef45adde17: typeof ListPreferenceEntity;
85
86
  '9efb14076dca6034ab4c3255c5c63aa2': typeof LookupTypeEntity;
86
87
  ca12043141c4bbc3b08a13bd8dfa9bc8: typeof LookupValueEntity;
88
+ a3da8b74348b592a71fe3667f5d92954: typeof MailLogEntity;
87
89
  '1ef387eee5c23a8d3c8f6a3130e1c397': typeof MenuEntity;
88
90
  '0357bfa9c9022c76f5302e2274e249fe': typeof MenuRoleEntity;
89
91
  e9e8c013efaa8c7456bc2384506d86df: typeof ModelColumnEntity;
@@ -25,6 +25,7 @@ const form_preference_entity_1 = require("../system/entities/form.preference.ent
25
25
  const list_preference_entity_1 = require("../system/entities/list.preference.entity");
26
26
  const lookup_type_entity_1 = require("../system/entities/lookup.type.entity");
27
27
  const lookup_value_entity_1 = require("../system/entities/lookup.value.entity");
28
+ const mail_log_entity_1 = require("../system/entities/mail.log.entity");
28
29
  const menu_entity_1 = require("../system/entities/menu.entity");
29
30
  const menu_role_entity_1 = require("../system/entities/menu.role.entity");
30
31
  const model_column_entity_1 = require("../system/entities/model.column.entity");
@@ -85,6 +86,7 @@ const entityConstants = {
85
86
  adb199a467c1d3df2eee56ef45adde17: list_preference_entity_1.ListPreferenceEntity,
86
87
  '9efb14076dca6034ab4c3255c5c63aa2': lookup_type_entity_1.LookupTypeEntity,
87
88
  ca12043141c4bbc3b08a13bd8dfa9bc8: lookup_value_entity_1.LookupValueEntity,
89
+ a3da8b74348b592a71fe3667f5d92954: mail_log_entity_1.MailLogEntity,
88
90
  '1ef387eee5c23a8d3c8f6a3130e1c397': menu_entity_1.MenuEntity,
89
91
  '0357bfa9c9022c76f5302e2274e249fe': menu_role_entity_1.MenuRoleEntity,
90
92
  e9e8c013efaa8c7456bc2384506d86df: model_column_entity_1.ModelColumnEntity,
@@ -1 +1 @@
1
- {"version":3,"file":"entity.constants.js","sourceRoot":"","sources":["../../src/config/entity.constants.ts"],"names":[],"mappings":";AAAA,oEAAgE;AAChE,oEAAgE;AAChE,8EAAyE;AACzE,gFAA2E;AAC3E,8DAA0D;AAC1D,gFAA2E;AAC3E,8EAA0E;AAC1E,kEAA8D;AAC9D,wFAAmF;AACnF,4EAAuE;AACvE,kFAA6E;AAC7E,4FAAsF;AACtF,kEAA8D;AAC9D,kFAA6E;AAC7E,0FAAqF;AACrF,oEAAgE;AAChE,sEAAkE;AAClE,wEAAoE;AACpE,gFAA2E;AAC3E,8EAAyE;AACzE,8EAAyE;AACzE,gEAA4D;AAC5D,sFAAiF;AACjF,sFAAiF;AACjF,8EAAyE;AACzE,gFAA2E;AAC3E,gEAA4D;AAC5D,0EAAqE;AACrE,gFAA2E;AAC3E,kEAA8D;AAC9D,4FAAuF;AACvF,4EAAuE;AACvE,oEAAgE;AAChE,8EAAyE;AACzE,kFAA6E;AAC7E,sFAAiF;AACjF,8EAAyE;AACzE,gFAA2E;AAC3E,wEAAoE;AACpE,gFAA4E;AAC5E,kFAA6E;AAC7E,oEAAgE;AAChE,gFAA2E;AAC3E,8FAAyF;AACzF,8EAAyE;AACzE,sFAAiF;AACjF,oFAA+E;AAC/E,kFAA6E;AAC7E,sEAAkE;AAClE,gFAA2E;AAC3E,kFAA6E;AAC7E,0EAAqE;AACrE,gGAA0F;AAC1F,oFAA8E;AAC9E,4EAAuE;AACvE,0FAAoF;AACpF,kGAA4F;AAC5F,sFAAgF;AAChF,sFAAiF;AAEjF,MAAM,eAAe,GAAG;IACpB,kCAAkC,EAAE,8BAAa;IACjD,kCAAkC,EAAE,8BAAa;IACjD,kCAAkC,EAAE,uCAAiB;IACrD,kCAAkC,EAAE,yCAAkB;IACtD,gCAAgC,EAAE,wBAAU;IAC5C,gCAAgC,EAAE,yCA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8BAAa;IACjD,kCAAkC,EAAE,uCAAiB;IACrD,kCAAkC,EAAE,yCAAkB;IACtD,kCAAkC,EAAE,iCAAc;IAClD,kCAAkC,EAAE,sDAAwB;IAC5D,kCAAkC,EAAE,0CAAkB;IACtD,kCAAkC,EAAE,mCAAe;IACnD,kCAAkC,EAAE,gDAAqB;IACzD,kCAAkC,EAAE,wDAAyB;IAC7D,kCAAkC,EAAE,4CAAmB;IACvD,gCAAgC,EAAE,6CAAoB;CACzD,CAAC;AAEF,iBAAS,eAAe,CAAC"}
1
+ {"version":3,"file":"entity.constants.js","sourceRoot":"","sources":["../../src/config/entity.constants.ts"],"names":[],"mappings":";AAAA,oEAAgE;AAChE,oEAAgE;AAChE,8EAAyE;AACzE,gFAA2E;AAC3E,8DAA0D;AAC1D,gFAA2E;AAC3E,8EAA0E;AAC1E,kEAA8D;AAC9D,wFAAmF;AACnF,4EAAuE;AACvE,kFAA6E;AAC7E,4FAAsF;AACtF,kEAA8D;AAC9D,kFAA6E;AAC7E,0FAAqF;AACrF,oEAAgE;AAChE,sEAAkE;AAClE,wEAAoE;AACpE,gFAA2E;AAC3E,8EAAyE;AACzE,8EAAyE;AACzE,gEAA4D;AAC5D,sFAAiF;AACjF,sFAAiF;AACjF,8EAAyE;AACzE,gFAA2E;AAC3E,wEAAmE;AACnE,gEAA4D;AAC5D,0EAAqE;AACrE,gFAA2E;AAC3E,kEAA8D;AAC9D,4FAAuF;AACvF,4EAAuE;AACvE,oEAAgE;AAChE,8EAAyE;AACzE,kFAA6E;AAC7E,sFAAiF;AACjF,8EAAyE;AACzE,gFAA2E;AAC3E,wEAAoE;AACpE,gFAA4E;AAC5E,kFAA6E;AAC7E,oEAAgE;AAChE,gFAA2E;AAC3E,8FAAyF;AACzF,8EAAyE;AACzE,sFAAiF;AACjF,oFAA+E;AAC/E,kFAA6E;AAC7E,sEAAkE;AAClE,gFAA2E;AAC3E,kFAA6E;AAC7E,0EAAqE;AACrE,gGAA0F;AAC1F,oFAA8E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,EAAE,gCAAc;IAClD,gCAAgC,EAAE,wCAAkB;IACpD,kCAAkC,EAAE,yCAAkB;IACtD,gCAAgC,EAAE,4BAAY;IAC9C,kCAAkC,EAAE,uCAAiB;IACrD,kCAAkC,EAAE,qDAAwB;IAC5D,gCAAgC,EAAE,qCAAgB;IAClD,gCAAgC,EAAE,6CAAoB;IACtD,kCAAkC,EAAE,2CAAmB;IACvD,gCAAgC,EAAE,yCAAkB;IACpD,kCAAkC,EAAE,8BAAa;IACjD,kCAAkC,EAAE,uCAAiB;IACrD,kCAAkC,EAAE,yCAAkB;IACtD,kCAAkC,EAAE,iCAAc;IAClD,kCAAkC,EAAE,sDAAwB;IAC5D,kCAAkC,EAAE,0CAAkB;IACtD,kCAAkC,EAAE,mCAAe;IACnD,kCAAkC,EAAE,gDAAqB;IACzD,kCAAkC,EAAE,wDAAyB;IAC7D,kCAAkC,EAAE,4CAAmB;IACvD,gCAAgC,EAAE,6CAAoB;CACzD,CAAC;AAEF,iBAAS,eAAe,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { MigrationUtility } from './../common/libraries/migration.utility';
2
+ export declare class CreateMailLogTable1643398296090 extends MigrationUtility {
3
+ constructor();
4
+ process(): void;
5
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateMailLogTable1643398296090 = void 0;
4
+ const migration_utility_1 = require("./../common/libraries/migration.utility");
5
+ class CreateMailLogTable1643398296090 extends migration_utility_1.MigrationUtility {
6
+ constructor() {
7
+ super('sys_mail_logs');
8
+ this.process();
9
+ }
10
+ process() {
11
+ this.primary();
12
+ this.source();
13
+ this.string('gateway');
14
+ this.string('identifier');
15
+ this.string('to');
16
+ this.dateTime('processed_on');
17
+ this.dateTime('delivered_on');
18
+ this.dateTime('opened_on');
19
+ this.json('attributes');
20
+ this.whoColumns();
21
+ this.index(['identifier']);
22
+ }
23
+ }
24
+ exports.CreateMailLogTable1643398296090 = CreateMailLogTable1643398296090;
25
+ //# sourceMappingURL=1643398296090-CreateMailLogTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1643398296090-CreateMailLogTable.js","sourceRoot":"","sources":["../../src/migrations/1643398296090-CreateMailLogTable.ts"],"names":[],"mappings":";;;AAAA,+EAA2E;AAE3E,MAAa,+BAAgC,SAAQ,oCAAgB;IACjE;QACI,KAAK,CAAC,eAAe,CAAC,CAAC;QACvB,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAED,OAAO;QACH,IAAI,CAAC,OAAO,EAAE,CAAC;QACf,IAAI,CAAC,MAAM,EAAE,CAAC;QAEd,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACvB,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QAE1B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAElB,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;QAC9B,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;QAC9B,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QAE3B,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAExB,IAAI,CAAC,UAAU,EAAE,CAAC;QAElB,IAAI,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;IAC/B,CAAC;CACJ;AAzBD,0EAyBC"}
@@ -1,3 +1,4 @@
1
1
  export * from './entity.generator.command';
2
2
  export * from './maintenance.command';
3
3
  export * from './sync.class.command';
4
+ export * from './sqs.worker.command';
@@ -13,4 +13,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./entity.generator.command"), exports);
14
14
  __exportStar(require("./maintenance.command"), exports);
15
15
  __exportStar(require("./sync.class.command"), exports);
16
+ __exportStar(require("./sqs.worker.command"), exports);
16
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/commands/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6DAA2C;AAC3C,wDAAsC;AACtC,uDAAqC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/commands/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6DAA2C;AAC3C,wDAAsC;AACtC,uDAAqC;AACrC,uDAAqC"}
@@ -0,0 +1,15 @@
1
+ import { ConsoleService } from 'nestjs-console';
2
+ import { QueueService } from '../../platformUtility/services/queue.service';
3
+ export declare class SqsWorkerCommand {
4
+ private readonly queueService;
5
+ private readonly consoleService;
6
+ private counter;
7
+ private start_time;
8
+ constructor(queueService: QueueService, consoleService: ConsoleService);
9
+ runWorker: () => Promise<never>;
10
+ private processMessage;
11
+ private dropMessage;
12
+ private fetchMessages;
13
+ private processMessages;
14
+ private checkForSystem;
15
+ }
@@ -0,0 +1,111 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13
+ return new (P || (P = Promise))(function (resolve, reject) {
14
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
15
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
16
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
17
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
18
+ });
19
+ };
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.SqsWorkerCommand = void 0;
22
+ const common_1 = require("@nestjs/common");
23
+ const config = require("config");
24
+ const nestjs_console_1 = require("nestjs-console");
25
+ const platform_constants_1 = require("../../config/platform.constants");
26
+ const queue_service_1 = require("../../platformUtility/services/queue.service");
27
+ const date_util_1 = require("./../../common/libraries/date.util");
28
+ const sqsQueue = config.get('sqs.fifo');
29
+ let SqsWorkerCommand = class SqsWorkerCommand {
30
+ constructor(queueService, consoleService) {
31
+ this.queueService = queueService;
32
+ this.consoleService = consoleService;
33
+ this.counter = 0;
34
+ this.start_time = date_util_1.DateUtil.getDateTimeInFormat();
35
+ this.runWorker = () => __awaiter(this, void 0, void 0, function* () {
36
+ while (true) {
37
+ yield this.queueService.pause();
38
+ yield this.checkForSystem();
39
+ let record;
40
+ try {
41
+ record = yield this.fetchMessages();
42
+ }
43
+ catch (error) {
44
+ global.console.log('error', error);
45
+ }
46
+ if (!(record === null || record === void 0 ? void 0 : record.Messages))
47
+ yield this.queueService.sleep(1000);
48
+ if ((record === null || record === void 0 ? void 0 : record.Messages) && Array.isArray(record.Messages)) {
49
+ yield this.processMessages(record.Messages);
50
+ }
51
+ global.console.log(`[sqs.fifo][events] ${this.start_time} : ${this.counter}`);
52
+ }
53
+ });
54
+ const cli = this.consoleService.getCli();
55
+ this.consoleService.createCommand({
56
+ command: 'queue:sqs',
57
+ description: 'sync all entities and their definitions defined within the system',
58
+ }, this.runWorker, cli);
59
+ }
60
+ processMessage(message) {
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ ++this.counter;
63
+ const data = JSON.parse(message.Body);
64
+ global.console.log(`[sqs.fifo][ Processing] ${message.MessageId} : ${data.name} `);
65
+ const startTime = date_util_1.DateUtil.now();
66
+ try {
67
+ yield platform_constants_1.default.jobs[data.job].handle(data.payload);
68
+ const timeTaken = date_util_1.DateUtil.now() - startTime;
69
+ global.console.log(`[sqs.fifo][ Processed] ${message.MessageId} : ${data.name} ${timeTaken} ms`);
70
+ }
71
+ catch (error) {
72
+ global.console.log(`[sqs.fifo][ failure] ${message.MessageId} : ${data.name} `);
73
+ global.console.log('failed-job', data);
74
+ global.console.log('error', error);
75
+ }
76
+ finally {
77
+ this.dropMessage(message.ReceiptHandle);
78
+ }
79
+ });
80
+ }
81
+ dropMessage(id) {
82
+ return __awaiter(this, void 0, void 0, function* () {
83
+ return this.queueService.sqsService.delete(sqsQueue, id);
84
+ });
85
+ }
86
+ fetchMessages() {
87
+ return __awaiter(this, void 0, void 0, function* () {
88
+ return this.queueService.sqsService.get(sqsQueue, 10);
89
+ });
90
+ }
91
+ processMessages(messages) {
92
+ return __awaiter(this, void 0, void 0, function* () {
93
+ for (const message of messages)
94
+ yield this.processMessage(message);
95
+ });
96
+ }
97
+ checkForSystem() {
98
+ return __awaiter(this, void 0, void 0, function* () {
99
+ yield this.queueService.checkForMaintenance();
100
+ if (yield this.queueService.hasRestartFlagChanged()) {
101
+ process.exit(0);
102
+ }
103
+ });
104
+ }
105
+ };
106
+ SqsWorkerCommand = __decorate([
107
+ (0, common_1.Injectable)(),
108
+ __metadata("design:paramtypes", [queue_service_1.QueueService, nestjs_console_1.ConsoleService])
109
+ ], SqsWorkerCommand);
110
+ exports.SqsWorkerCommand = SqsWorkerCommand;
111
+ //# sourceMappingURL=sqs.worker.command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqs.worker.command.js","sourceRoot":"","sources":["../../../src/platformUtility/commands/sqs.worker.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,iCAAiC;AACjC,mDAAgD;AAChD,wEAAgE;AAChE,gFAA4E;AAC5E,kEAA8D;AAG9D,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC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;YACvB,OAAO,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAC1D,CAAC;KAAA;IAEa,eAAe,CAAC,QAAe;;YACzC,KAAK,MAAM,OAAO,IAAI,QAAQ;gBAAE,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QACvE,CAAC;KAAA;IAQa,cAAc;;YACxB,MAAM,IAAI,CAAC,YAAY,CAAC,mBAAmB,EAAE,CAAC;YAE9C,IAAI,MAAM,IAAI,CAAC,YAAY,CAAC,qBAAqB,EAAE,EAAE;gBACjD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;aACnB;QACL,CAAC;KAAA;CACJ,CAAA;AAlHY,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;qCAWkC,4BAAY,EAAmC,+BAAc;GAV/F,gBAAgB,CAkH5B;AAlHY,4CAAgB"}
@@ -2,3 +2,4 @@ export * from './fcm.response.dto';
2
2
  export * from './push.notification.response.dto';
3
3
  export * from './push.notification.template.dto';
4
4
  export * from './queue.options.dto';
5
+ export * from './mail.options.dto';
@@ -14,4 +14,5 @@ __exportStar(require("./fcm.response.dto"), exports);
14
14
  __exportStar(require("./push.notification.response.dto"), exports);
15
15
  __exportStar(require("./push.notification.template.dto"), exports);
16
16
  __exportStar(require("./queue.options.dto"), exports);
17
+ __exportStar(require("./mail.options.dto"), exports);
17
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/dtos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmC;AACnC,mEAAiD;AACjD,mEAAiD;AACjD,sDAAoC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/dtos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmC;AACnC,mEAAiD;AACjD,mEAAiD;AACjD,sDAAoC;AACpC,qDAAmC"}
@@ -0,0 +1,13 @@
1
+ export declare class MailOptionsDto {
2
+ to?: string;
3
+ from?: string;
4
+ subject: string;
5
+ html?: string;
6
+ text?: string;
7
+ files?: {
8
+ file: string;
9
+ name?: string;
10
+ }[];
11
+ bcc?: string;
12
+ cc?: string;
13
+ }
@@ -0,0 +1,59 @@
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.MailOptionsDto = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ class MailOptionsDto {
16
+ }
17
+ __decorate([
18
+ (0, class_validator_1.IsOptional)(),
19
+ (0, class_transformer_1.Expose)(),
20
+ __metadata("design:type", String)
21
+ ], MailOptionsDto.prototype, "to", void 0);
22
+ __decorate([
23
+ (0, class_validator_1.IsOptional)(),
24
+ (0, class_transformer_1.Expose)(),
25
+ __metadata("design:type", String)
26
+ ], MailOptionsDto.prototype, "from", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsOptional)(),
29
+ (0, class_transformer_1.Expose)(),
30
+ __metadata("design:type", String)
31
+ ], MailOptionsDto.prototype, "subject", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsOptional)(),
34
+ (0, class_transformer_1.Expose)(),
35
+ __metadata("design:type", String)
36
+ ], MailOptionsDto.prototype, "html", void 0);
37
+ __decorate([
38
+ (0, class_validator_1.IsOptional)(),
39
+ (0, class_transformer_1.Expose)(),
40
+ __metadata("design:type", String)
41
+ ], MailOptionsDto.prototype, "text", void 0);
42
+ __decorate([
43
+ (0, class_validator_1.IsOptional)(),
44
+ (0, class_transformer_1.Expose)(),
45
+ (0, class_validator_1.IsArray)(),
46
+ __metadata("design:type", Array)
47
+ ], MailOptionsDto.prototype, "files", void 0);
48
+ __decorate([
49
+ (0, class_validator_1.IsOptional)(),
50
+ (0, class_transformer_1.Expose)(),
51
+ __metadata("design:type", String)
52
+ ], MailOptionsDto.prototype, "bcc", void 0);
53
+ __decorate([
54
+ (0, class_validator_1.IsOptional)(),
55
+ (0, class_transformer_1.Expose)(),
56
+ __metadata("design:type", String)
57
+ ], MailOptionsDto.prototype, "cc", void 0);
58
+ exports.MailOptionsDto = MailOptionsDto;
59
+ //# sourceMappingURL=mail.options.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mail.options.dto.js","sourceRoot":"","sources":["../../../src/platformUtility/dtos/mail.options.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA2C;AAC3C,qDAAsD;AACtD,MAAa,cAAc;CAiC1B;AA9BG;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAM,GAAE;;0CACG;AAIZ;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAM,GAAE;;4CACK;AAId;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAM,GAAE;;+CACO;AAIhB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAM,GAAE;;4CACK;AAId;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAM,GAAE;;4CACK;AAKd;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAM,GAAE;IACR,IAAA,yBAAO,GAAE;;6CACgC;AAI1C;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAM,GAAE;;2CACI;AAIb;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAM,GAAE;;0CACG;AAhChB,wCAiCC"}
@@ -1,13 +1,16 @@
1
1
  import { EntityGeneratorCommand } from './commands/entity.generator.command';
2
2
  import { MaintenanceCommand } from './commands/maintenance.command';
3
+ import { SqsWorkerCommand } from './commands/sqs.worker.command';
3
4
  import { SyncClassCommand } from './commands/sync.class.command';
4
5
  import { EventConsumer } from './consumers/event.consumer';
5
6
  import { JobConsumer } from './consumers/job.consumer';
6
7
  import { FcmResponseDto } from './dtos/fcm.response.dto';
8
+ import { MailOptionsDto } from './dtos/mail.options.dto';
7
9
  import { PushNotificationResponseDto } from './dtos/push.notification.response.dto';
8
10
  import { PushNotificationTemplateDto } from './dtos/push.notification.template.dto';
9
11
  import { QueueOptionsDto } from './dtos/queue.options.dto';
10
12
  import { RecordWatcherJob } from './jobs/record.watcher.job';
13
+ import { TestJob } from './jobs/test.job';
11
14
  import { CreateEntityConstantsFile } from './libraries/create.entity.constants.file';
12
15
  import { CreateEs6ClassesFile } from './libraries/create.es6.classes.file';
13
16
  import { CreateEs6JobsFile } from './libraries/create.es6.jobs.file';
@@ -28,16 +31,17 @@ import { QueueService } from './services/queue.service';
28
31
  import { RemoteRequestService } from './services/remote.request.service';
29
32
  import { ShutdownService } from './services/shutdown.service';
30
33
  import { SqlService } from './services/sql.service';
34
+ import { SqsService } from './services/sqs.service';
31
35
  import { StartupService } from './services/startup.service';
32
36
  import { BaseSubscriber } from './subscribers/base.subscriber';
33
37
  declare const es6Classes: {
34
- commands: (typeof EntityGeneratorCommand | typeof MaintenanceCommand | typeof SyncClassCommand)[];
38
+ commands: (typeof EntityGeneratorCommand | typeof MaintenanceCommand | typeof SqsWorkerCommand | typeof SyncClassCommand)[];
35
39
  consumers: (typeof EventConsumer | typeof JobConsumer)[];
36
- dtos: (typeof QueueOptionsDto | typeof FcmResponseDto | typeof PushNotificationResponseDto | typeof PushNotificationTemplateDto)[];
37
- jobs: (typeof RecordWatcherJob)[];
40
+ dtos: (typeof QueueOptionsDto | typeof MailOptionsDto | typeof FcmResponseDto | typeof PushNotificationResponseDto | typeof PushNotificationTemplateDto)[];
41
+ jobs: (typeof TestJob | typeof RecordWatcherJob)[];
38
42
  libraries: (typeof FileSystemUtility | typeof CreateIndexFile | typeof CreateEntityConstantsFile | typeof CreateEs6ClassesFile | typeof CreateEs6JobsFile | typeof CreateEs6ServiceFile)[];
39
43
  middlewares: (typeof MaintenanceMiddleware)[];
40
- services: (typeof LocalPropertyService | typeof MaintenanceService | typeof ShutdownService | typeof CacheService | typeof QueueService | typeof RemoteRequestService | typeof SqlService | typeof DynamoService | typeof AuditService | typeof Es6JobsService | typeof FcmNotificationService | typeof MailService | typeof StartupService | typeof Es6Service)[];
44
+ services: (typeof CacheService | typeof LocalPropertyService | typeof MaintenanceService | typeof ShutdownService | typeof SqsService | typeof QueueService | typeof RemoteRequestService | typeof SqlService | typeof DynamoService | typeof MailService | typeof AuditService | typeof FcmNotificationService | typeof StartupService | typeof Es6JobsService | typeof Es6Service)[];
41
45
  subscribers: (typeof BaseSubscriber)[];
42
46
  };
43
47
  export default es6Classes;
@@ -2,14 +2,17 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const entity_generator_command_1 = require("./commands/entity.generator.command");
4
4
  const maintenance_command_1 = require("./commands/maintenance.command");
5
+ const sqs_worker_command_1 = require("./commands/sqs.worker.command");
5
6
  const sync_class_command_1 = require("./commands/sync.class.command");
6
7
  const event_consumer_1 = require("./consumers/event.consumer");
7
8
  const job_consumer_1 = require("./consumers/job.consumer");
8
9
  const fcm_response_dto_1 = require("./dtos/fcm.response.dto");
10
+ const mail_options_dto_1 = require("./dtos/mail.options.dto");
9
11
  const push_notification_response_dto_1 = require("./dtos/push.notification.response.dto");
10
12
  const push_notification_template_dto_1 = require("./dtos/push.notification.template.dto");
11
13
  const queue_options_dto_1 = require("./dtos/queue.options.dto");
12
14
  const record_watcher_job_1 = require("./jobs/record.watcher.job");
15
+ const test_job_1 = require("./jobs/test.job");
13
16
  const create_entity_constants_file_1 = require("./libraries/create.entity.constants.file");
14
17
  const create_es6_classes_file_1 = require("./libraries/create.es6.classes.file");
15
18
  const create_es6_jobs_file_1 = require("./libraries/create.es6.jobs.file");
@@ -30,13 +33,14 @@ const queue_service_1 = require("./services/queue.service");
30
33
  const remote_request_service_1 = require("./services/remote.request.service");
31
34
  const shutdown_service_1 = require("./services/shutdown.service");
32
35
  const sql_service_1 = require("./services/sql.service");
36
+ const sqs_service_1 = require("./services/sqs.service");
33
37
  const startup_service_1 = require("./services/startup.service");
34
38
  const base_subscriber_1 = require("./subscribers/base.subscriber");
35
39
  const es6Classes = {
36
- commands: [entity_generator_command_1.EntityGeneratorCommand, maintenance_command_1.MaintenanceCommand, sync_class_command_1.SyncClassCommand],
40
+ commands: [entity_generator_command_1.EntityGeneratorCommand, maintenance_command_1.MaintenanceCommand, sqs_worker_command_1.SqsWorkerCommand, sync_class_command_1.SyncClassCommand],
37
41
  consumers: [event_consumer_1.EventConsumer, job_consumer_1.JobConsumer],
38
- dtos: [fcm_response_dto_1.FcmResponseDto, push_notification_response_dto_1.PushNotificationResponseDto, push_notification_template_dto_1.PushNotificationTemplateDto, queue_options_dto_1.QueueOptionsDto],
39
- jobs: [record_watcher_job_1.RecordWatcherJob],
42
+ dtos: [fcm_response_dto_1.FcmResponseDto, mail_options_dto_1.MailOptionsDto, push_notification_response_dto_1.PushNotificationResponseDto, push_notification_template_dto_1.PushNotificationTemplateDto, queue_options_dto_1.QueueOptionsDto],
43
+ jobs: [record_watcher_job_1.RecordWatcherJob, test_job_1.TestJob],
40
44
  libraries: [create_entity_constants_file_1.CreateEntityConstantsFile, create_es6_classes_file_1.CreateEs6ClassesFile, create_es6_jobs_file_1.CreateEs6JobsFile, create_es6_service_file_1.CreateEs6ServiceFile, create_index_file_1.CreateIndexFile, file_system_utility_1.FileSystemUtility],
41
45
  middlewares: [maintenance_middleware_1.MaintenanceMiddleware],
42
46
  services: [
@@ -53,6 +57,7 @@ const es6Classes = {
53
57
  remote_request_service_1.RemoteRequestService,
54
58
  shutdown_service_1.ShutdownService,
55
59
  sql_service_1.SqlService,
60
+ sqs_service_1.SqsService,
56
61
  startup_service_1.StartupService,
57
62
  ],
58
63
  subscribers: [base_subscriber_1.BaseSubscriber],
@@ -1 +1 @@
1
- {"version":3,"file":"es6.classes.js","sourceRoot":"","sources":["../../src/platformUtility/es6.classes.ts"],"names":[],"mappings":";;AAAA,kFAA6E;AAC7E,wEAAoE;AACpE,sEAAiE;AACjE,+DAA2D;AAC3D,2DAAuD;AACvD,8DAAyD;AACzD,0FAAoF;AACpF,0FAAoF;AACpF,gEAA2D;AAC3D,kEAA6D;AAC7D,2FAAqF;AACrF,iFAA2E;AAC3E,2EAAqE;AACrE,iFAA2E;AAC3E,qEAAgE;AAChE,yEAAoE;AACpE,iFAA6E;AAC7E,4DAAwD;AACxD,4DAAwD;AACxD,8DAA0D;AAC1D,kEAA6D;AAC7D,wDAAoD;AACpD,kFAA6E;AAC7E,8EAAyE;AACzE,0DAAsD;AACtD,wEAAoE;AACpE,4DAAwD;AACxD,8EAAyE;AACzE,kEAA8D;AAC9D,wDAAoD;AACpD,gEAA4D;AAC5D,mEAA+D;AAE/D,MAAM,UAAU,GAAG;IACf,QAAQ,EAAE,CAAC,iDAAsB,EAAE,wCAAkB,EAAE,qCAAgB,CAAC;IACxE,SAAS,EAAE,CAAC,8BAAa,EAAE,0BAAW,CAAC;IACvC,IAAI,EAAE,CAAC,iCAAc,EAAE,4DAA2B,EAAE,4DAA2B,EAAE,mCAAe,CAAC;IACjG,IAAI,EAAE,CAAC,qCAAgB,CAAC;IACxB,SAAS,EAAE,CAAC,wDAAyB,EAAE,8CAAoB,EAAE,wCAAiB,EAAE,8CAAoB,EAAE,mCAAe,EAAE,uCAAiB,CAAC;IACzI,WAAW,EAAE,CAAC,8CAAqB,CAAC;IACpC,QAAQ,EAAE;QACN,4BAAY;QACZ,4BAAY;QACZ,8BAAa;QACb,iCAAc;QACd,wBAAU;QACV,iDAAsB;QACtB,6CAAoB;QACpB,0BAAW;QACX,wCAAkB;QAClB,4BAAY;QACZ,6CAAoB;QACpB,kCAAe;QACf,wBAAU;QACV,gCAAc;KACjB;IACD,WAAW,EAAE,CAAC,gCAAc,CAAC;CAChC,CAAC;AAEF,kBAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"es6.classes.js","sourceRoot":"","sources":["../../src/platformUtility/es6.classes.ts"],"names":[],"mappings":";;AAAA,kFAA6E;AAC7E,wEAAoE;AACpE,sEAAiE;AACjE,sEAAiE;AACjE,+DAA2D;AAC3D,2DAAuD;AACvD,8DAAyD;AACzD,8DAAyD;AACzD,0FAAoF;AACpF,0FAAoF;AACpF,gEAA2D;AAC3D,kEAA6D;AAC7D,8CAA0C;AAC1C,2FAAqF;AACrF,iFAA2E;AAC3E,2EAAqE;AACrE,iFAA2E;AAC3E,qEAAgE;AAChE,yEAAoE;AACpE,iFAA6E;AAC7E,4DAAwD;AACxD,4DAAwD;AACxD,8DAA0D;AAC1D,kEAA6D;AAC7D,wDAAoD;AACpD,kFAA6E;AAC7E,8EAAyE;AACzE,0DAAsD;AACtD,wEAAoE;AACpE,4DAAwD;AACxD,8EAAyE;AACzE,kEAA8D;AAC9D,wDAAoD;AACpD,wDAAoD;AACpD,gEAA4D;AAC5D,mEAA+D;AAE/D,MAAM,UAAU,GAAG;IACf,QAAQ,EAAE,CAAC,iDAAsB,EAAE,wCAAkB,EAAE,qCAAgB,EAAE,qCAAgB,CAAC;IAC1F,SAAS,EAAE,CAAC,8BAAa,EAAE,0BAAW,CAAC;IACvC,IAAI,EAAE,CAAC,iCAAc,EAAE,iCAAc,EAAE,4DAA2B,EAAE,4DAA2B,EAAE,mCAAe,CAAC;IACjH,IAAI,EAAE,CAAC,qCAAgB,EAAE,kBAAO,CAAC;IACjC,SAAS,EAAE,CAAC,wDAAyB,EAAE,8CAAoB,EAAE,wCAAiB,EAAE,8CAAoB,EAAE,mCAAe,EAAE,uCAAiB,CAAC;IACzI,WAAW,EAAE,CAAC,8CAAqB,CAAC;IACpC,QAAQ,EAAE;QACN,4BAAY;QACZ,4BAAY;QACZ,8BAAa;QACb,iCAAc;QACd,wBAAU;QACV,iDAAsB;QACtB,6CAAoB;QACpB,0BAAW;QACX,wCAAkB;QAClB,4BAAY;QACZ,6CAAoB;QACpB,kCAAe;QACf,wBAAU;QACV,wBAAU;QACV,gCAAc;KACjB;IACD,WAAW,EAAE,CAAC,gCAAc,CAAC;CAChC,CAAC;AAEF,kBAAe,UAAU,CAAC"}
@@ -1 +1,2 @@
1
1
  export * from './record.watcher.job';
2
+ export * from './test.job';
@@ -11,4 +11,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./record.watcher.job"), exports);
14
+ __exportStar(require("./test.job"), exports);
14
15
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/jobs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uDAAqC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/jobs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uDAAqC;AACrC,6CAA2B"}
@@ -0,0 +1,8 @@
1
+ import { CommonJob } from './../../common/libraries/common.job';
2
+ import { QueueService } from './../services/queue.service';
3
+ export declare class TestJob extends CommonJob {
4
+ protected readonly queueService: QueueService;
5
+ protected mode: string;
6
+ constructor(queueService: QueueService);
7
+ handle(data: any): Promise<void>;
8
+ }