@servicelabsco/nestjs-utility-services 1.1.102 → 1.1.104

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 (45) hide show
  1. package/dist/config/source.hash.d.ts +1 -0
  2. package/dist/config/source.hash.js +1 -0
  3. package/dist/config/source.hash.js.map +1 -1
  4. package/dist/platformUtility/dtos/index.d.ts +0 -6
  5. package/dist/platformUtility/dtos/index.js +0 -6
  6. package/dist/platformUtility/dtos/index.js.map +1 -1
  7. package/dist/platformUtility/es6.classes.d.ts +2 -10
  8. package/dist/platformUtility/es6.classes.js +0 -16
  9. package/dist/platformUtility/es6.classes.js.map +1 -1
  10. package/dist/platformUtility/libraries/index.d.ts +0 -2
  11. package/dist/platformUtility/libraries/index.js +0 -2
  12. package/dist/platformUtility/libraries/index.js.map +1 -1
  13. package/dist/platformUtility/services/audit.service.d.ts +5 -2
  14. package/dist/platformUtility/services/audit.service.js +19 -12
  15. package/dist/platformUtility/services/audit.service.js.map +1 -1
  16. package/dist/platformUtility/services/mail.service.d.ts +6 -1
  17. package/dist/platformUtility/services/mail.service.js +22 -8
  18. package/dist/platformUtility/services/mail.service.js.map +1 -1
  19. package/dist/system/dtos/add.comment.dto.d.ts +1 -1
  20. package/dist/system/dtos/add.comment.dto.js.map +1 -1
  21. package/package.json +1 -1
  22. package/dist/platformUtility/dtos/common.list.filter.dto.d.ts +0 -15
  23. package/dist/platformUtility/dtos/common.list.filter.dto.js +0 -83
  24. package/dist/platformUtility/dtos/common.list.filter.dto.js.map +0 -1
  25. package/dist/platformUtility/dtos/date.filter.dto.d.ts +0 -10
  26. package/dist/platformUtility/dtos/date.filter.dto.js +0 -57
  27. package/dist/platformUtility/dtos/date.filter.dto.js.map +0 -1
  28. package/dist/platformUtility/dtos/date.range.filter.dto.d.ts +0 -4
  29. package/dist/platformUtility/dtos/date.range.filter.dto.js +0 -29
  30. package/dist/platformUtility/dtos/date.range.filter.dto.js.map +0 -1
  31. package/dist/platformUtility/dtos/list.response.dto.d.ts +0 -14
  32. package/dist/platformUtility/dtos/list.response.dto.js +0 -7
  33. package/dist/platformUtility/dtos/list.response.dto.js.map +0 -1
  34. package/dist/platformUtility/dtos/list.response.format.dto.d.ts +0 -4
  35. package/dist/platformUtility/dtos/list.response.format.dto.js +0 -27
  36. package/dist/platformUtility/dtos/list.response.format.dto.js.map +0 -1
  37. package/dist/platformUtility/dtos/number.range.filter.dto.d.ts +0 -7
  38. package/dist/platformUtility/dtos/number.range.filter.dto.js +0 -45
  39. package/dist/platformUtility/dtos/number.range.filter.dto.js.map +0 -1
  40. package/dist/platformUtility/libraries/process.common.list.d.ts +0 -28
  41. package/dist/platformUtility/libraries/process.common.list.js +0 -90
  42. package/dist/platformUtility/libraries/process.common.list.js.map +0 -1
  43. package/dist/platformUtility/libraries/process.date.filter.d.ts +0 -14
  44. package/dist/platformUtility/libraries/process.date.filter.js +0 -61
  45. package/dist/platformUtility/libraries/process.date.filter.js.map +0 -1
@@ -9,5 +9,6 @@ declare const SOURCEHASH: {
9
9
  userGroup: string;
10
10
  relationship: string;
11
11
  mobileValidation: string;
12
+ mailLog: string;
12
13
  };
13
14
  export = SOURCEHASH;
@@ -10,6 +10,7 @@ const SOURCEHASH = {
10
10
  userGroup: '3354bd3a69f63e9e40f120547fcfe772',
11
11
  relationship: 'ca92f0ad887a73e9ffa448f5e4620c70',
12
12
  mobileValidation: 'fa2bfeba4f8c0f5c4ec5bf9ca6c03771',
13
+ mailLog: 'a3da8b74348b592a71fe3667f5d92954',
13
14
  };
14
15
  module.exports = SOURCEHASH;
15
16
  //# sourceMappingURL=source.hash.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"source.hash.js","sourceRoot":"","sources":["../../src/config/source.hash.ts"],"names":[],"mappings":";AAAA,MAAM,UAAU,GAAG;IACf,cAAc,EAAE,kCAAkC;IAClD,IAAI,EAAE,kCAAkC;IACxC,KAAK,EAAE,kCAAkC;IACzC,iBAAiB,EAAE,kCAAkC;IACrD,MAAM,EAAE,kCAAkC;IAC1C,MAAM,EAAE,kCAAkC;IAC1C,IAAI,EAAE,kCAAkC;IACxC,SAAS,EAAE,kCAAkC;IAC7C,YAAY,EAAE,kCAAkC;IAChD,gBAAgB,EAAE,kCAAkC;CACvD,CAAC;AAEF,iBAAS,UAAU,CAAC"}
1
+ {"version":3,"file":"source.hash.js","sourceRoot":"","sources":["../../src/config/source.hash.ts"],"names":[],"mappings":";AAAA,MAAM,UAAU,GAAG;IACf,cAAc,EAAE,kCAAkC;IAClD,IAAI,EAAE,kCAAkC;IACxC,KAAK,EAAE,kCAAkC;IACzC,iBAAiB,EAAE,kCAAkC;IACrD,MAAM,EAAE,kCAAkC;IAC1C,MAAM,EAAE,kCAAkC;IAC1C,IAAI,EAAE,kCAAkC;IACxC,SAAS,EAAE,kCAAkC;IAC7C,YAAY,EAAE,kCAAkC;IAChD,gBAAgB,EAAE,kCAAkC;IACpD,OAAO,EAAE,kCAAkC;CAC9C,CAAC;AAEF,iBAAS,UAAU,CAAC"}
@@ -1,14 +1,8 @@
1
1
  export * from './common.attributes.dto';
2
- export * from './common.list.filter.dto';
3
- export * from './date.filter.dto';
4
- export * from './date.range.filter.dto';
5
2
  export * from './failed.bull.job.attributes.dto';
6
3
  export * from './fcm.response.dto';
7
4
  export * from './job.payload.dto';
8
- export * from './list.response.dto';
9
- export * from './list.response.format.dto';
10
5
  export * from './mail.options.dto';
11
- export * from './number.range.filter.dto';
12
6
  export * from './pending.bull.job.attributes.dto';
13
7
  export * from './push.notification.response.dto';
14
8
  export * from './push.notification.template.dto';
@@ -15,16 +15,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./common.attributes.dto"), exports);
18
- __exportStar(require("./common.list.filter.dto"), exports);
19
- __exportStar(require("./date.filter.dto"), exports);
20
- __exportStar(require("./date.range.filter.dto"), exports);
21
18
  __exportStar(require("./failed.bull.job.attributes.dto"), exports);
22
19
  __exportStar(require("./fcm.response.dto"), exports);
23
20
  __exportStar(require("./job.payload.dto"), exports);
24
- __exportStar(require("./list.response.dto"), exports);
25
- __exportStar(require("./list.response.format.dto"), exports);
26
21
  __exportStar(require("./mail.options.dto"), exports);
27
- __exportStar(require("./number.range.filter.dto"), exports);
28
22
  __exportStar(require("./pending.bull.job.attributes.dto"), exports);
29
23
  __exportStar(require("./push.notification.response.dto"), exports);
30
24
  __exportStar(require("./push.notification.template.dto"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/dtos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,2DAAyC;AACzC,oDAAkC;AAClC,0DAAwC;AACxC,mEAAiD;AACjD,qDAAmC;AACnC,oDAAkC;AAClC,sDAAoC;AACpC,6DAA2C;AAC3C,qDAAmC;AACnC,4DAA0C;AAC1C,oEAAkD;AAClD,mEAAiD;AACjD,mEAAiD;AACjD,sDAAoC;AACpC,4DAA0C;AAC1C,oDAAkC;AAClC,sDAAoC;AACpC,sDAAoC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/dtos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,mEAAiD;AACjD,qDAAmC;AACnC,oDAAkC;AAClC,qDAAmC;AACnC,oEAAkD;AAClD,mEAAiD;AACjD,mEAAiD;AACjD,sDAAoC;AACpC,4DAA0C;AAC1C,oDAAkC;AAClC,sDAAoC;AACpC,sDAAoC"}
@@ -7,15 +7,9 @@ import { JobConsumer } from './consumers/job.consumer';
7
7
  import { BullJobController } from './controllers/bull.job.controller';
8
8
  import { QueueController } from './controllers/queue.controller';
9
9
  import { CommonAttributesDto } from './dtos/common.attributes.dto';
10
- import { CommonListFilterDto } from './dtos/common.list.filter.dto';
11
- import { DateFilterDto } from './dtos/date.filter.dto';
12
- import { DateRangeFilterDto } from './dtos/date.range.filter.dto';
13
10
  import { FcmResponseDto } from './dtos/fcm.response.dto';
14
11
  import { JobPayloadDto } from './dtos/job.payload.dto';
15
- import { ListResponseDto } from './dtos/list.response.dto';
16
- import { ListResponseFormatDto } from './dtos/list.response.format.dto';
17
12
  import { MailOptionsDto } from './dtos/mail.options.dto';
18
- import { NumberRangeFilterDto } from './dtos/number.range.filter.dto';
19
13
  import { PushNotificationResponseDto } from './dtos/push.notification.response.dto';
20
14
  import { PushNotificationTemplateDto } from './dtos/push.notification.template.dto';
21
15
  import { QueueOptionsDto } from './dtos/queue.options.dto';
@@ -37,9 +31,7 @@ import { CreateEs6ServiceFile } from './libraries/create.es6.service.file';
37
31
  import { CreateIndexFile } from './libraries/create.index.file';
38
32
  import { FileSystemUtility } from './libraries/file.system.utility';
39
33
  import { ProcessAuditLogData } from './libraries/process.audit.log.data';
40
- import { ProcessCommonList } from './libraries/process.common.list';
41
34
  import { ProcessCommonMail } from './libraries/process.common.mail';
42
- import { ProcessDateFilter } from './libraries/process.date.filter';
43
35
  import { ProcessKaleyraSms } from './libraries/process.kaleyra.sms';
44
36
  import { ProcessSmtpMail } from './libraries/process.smtp.mail';
45
37
  import { MaintenanceMiddleware } from './middlewares/maintenance.middleware';
@@ -64,10 +56,10 @@ declare const es6Classes: {
64
56
  commands: (typeof MaintenanceCommand | typeof SqsWorkerCommand | typeof SyncClassCommand | typeof EntityGeneratorCommand)[];
65
57
  consumers: (typeof EventConsumer | typeof JobConsumer)[];
66
58
  controllers: (typeof BullJobController | typeof QueueController)[];
67
- dtos: (typeof JobPayloadDto | typeof QueueOptionsDto | typeof RemoteRawResponseDto | typeof CommonAttributesDto | typeof SmsPayloadDto | typeof SourceColumnDto | typeof FcmResponseDto | typeof PushNotificationResponseDto | typeof PushNotificationTemplateDto | typeof MailOptionsDto | typeof DateRangeFilterDto | typeof DateFilterDto | typeof ListResponseFormatDto | typeof NumberRangeFilterDto | typeof CommonListFilterDto | typeof ListResponseDto | typeof StringSearchDto)[];
59
+ dtos: (typeof JobPayloadDto | typeof QueueOptionsDto | typeof RemoteRawResponseDto | typeof CommonAttributesDto | typeof SmsPayloadDto | typeof SourceColumnDto | typeof FcmResponseDto | typeof PushNotificationResponseDto | typeof PushNotificationTemplateDto | typeof MailOptionsDto | typeof StringSearchDto)[];
68
60
  entities: (typeof PendingBullJobEntity | typeof FailedBullJobEntity)[];
69
61
  jobs: (typeof LoadFailedBullJob | typeof RecordWatcherJob | typeof ReloadPendingBullJob | typeof TestJob)[];
70
- libraries: (typeof FileSystemUtility | typeof ProcessAuditLogData | typeof ProcessKaleyraSms | typeof ProcessCommonMail | typeof ProcessSmtpMail | typeof CommonSqsPolling | typeof CreateEntityConstantsFile | typeof CreateEs6ClassesFile | typeof CreateEs6JobsFile | typeof CreateEs6ServiceFile | typeof CreateIndexFile | typeof ProcessDateFilter | typeof ProcessCommonList)[];
62
+ libraries: (typeof FileSystemUtility | typeof ProcessAuditLogData | typeof ProcessKaleyraSms | typeof ProcessCommonMail | typeof ProcessSmtpMail | typeof CommonSqsPolling | typeof CreateEntityConstantsFile | typeof CreateEs6ClassesFile | typeof CreateEs6JobsFile | typeof CreateEs6ServiceFile | typeof CreateIndexFile)[];
71
63
  middlewares: (typeof MaintenanceMiddleware | typeof TrimPipe)[];
72
64
  services: (typeof CacheService | typeof RemoteRequestService | typeof DynamoService | typeof MaintenanceService | typeof SqlService | typeof AuditService | typeof SmsService | typeof FcmNotificationService | typeof MailService | typeof ShutdownService | typeof SqsService | typeof StartupService | typeof Es6JobsService | typeof LocalPropertyService | typeof QueueService)[];
73
65
  subscribers: (typeof BaseSubscriber)[];
@@ -9,16 +9,10 @@ const job_consumer_1 = require("./consumers/job.consumer");
9
9
  const bull_job_controller_1 = require("./controllers/bull.job.controller");
10
10
  const queue_controller_1 = require("./controllers/queue.controller");
11
11
  const common_attributes_dto_1 = require("./dtos/common.attributes.dto");
12
- const common_list_filter_dto_1 = require("./dtos/common.list.filter.dto");
13
- const date_filter_dto_1 = require("./dtos/date.filter.dto");
14
- const date_range_filter_dto_1 = require("./dtos/date.range.filter.dto");
15
12
  const failed_bull_job_attributes_dto_1 = require("./dtos/failed.bull.job.attributes.dto");
16
13
  const fcm_response_dto_1 = require("./dtos/fcm.response.dto");
17
14
  const job_payload_dto_1 = require("./dtos/job.payload.dto");
18
- const list_response_dto_1 = require("./dtos/list.response.dto");
19
- const list_response_format_dto_1 = require("./dtos/list.response.format.dto");
20
15
  const mail_options_dto_1 = require("./dtos/mail.options.dto");
21
- const number_range_filter_dto_1 = require("./dtos/number.range.filter.dto");
22
16
  const pending_bull_job_attributes_dto_1 = require("./dtos/pending.bull.job.attributes.dto");
23
17
  const push_notification_response_dto_1 = require("./dtos/push.notification.response.dto");
24
18
  const push_notification_template_dto_1 = require("./dtos/push.notification.template.dto");
@@ -41,9 +35,7 @@ const create_es6_service_file_1 = require("./libraries/create.es6.service.file")
41
35
  const create_index_file_1 = require("./libraries/create.index.file");
42
36
  const file_system_utility_1 = require("./libraries/file.system.utility");
43
37
  const process_audit_log_data_1 = require("./libraries/process.audit.log.data");
44
- const process_common_list_1 = require("./libraries/process.common.list");
45
38
  const process_common_mail_1 = require("./libraries/process.common.mail");
46
- const process_date_filter_1 = require("./libraries/process.date.filter");
47
39
  const process_kaleyra_sms_1 = require("./libraries/process.kaleyra.sms");
48
40
  const process_smtp_mail_1 = require("./libraries/process.smtp.mail");
49
41
  const maintenance_middleware_1 = require("./middlewares/maintenance.middleware");
@@ -70,16 +62,10 @@ const es6Classes = {
70
62
  controllers: [bull_job_controller_1.BullJobController, queue_controller_1.QueueController],
71
63
  dtos: [
72
64
  common_attributes_dto_1.CommonAttributesDto,
73
- common_list_filter_dto_1.CommonListFilterDto,
74
- date_filter_dto_1.DateFilterDto,
75
- date_range_filter_dto_1.DateRangeFilterDto,
76
65
  failed_bull_job_attributes_dto_1.FailedBullJobAttributesDto,
77
66
  fcm_response_dto_1.FcmResponseDto,
78
67
  job_payload_dto_1.JobPayloadDto,
79
- list_response_dto_1.ListResponseDto,
80
- list_response_format_dto_1.ListResponseFormatDto,
81
68
  mail_options_dto_1.MailOptionsDto,
82
- number_range_filter_dto_1.NumberRangeFilterDto,
83
69
  pending_bull_job_attributes_dto_1.PendingBullJobAttributesDto,
84
70
  push_notification_response_dto_1.PushNotificationResponseDto,
85
71
  push_notification_template_dto_1.PushNotificationTemplateDto,
@@ -100,9 +86,7 @@ const es6Classes = {
100
86
  create_index_file_1.CreateIndexFile,
101
87
  file_system_utility_1.FileSystemUtility,
102
88
  process_audit_log_data_1.ProcessAuditLogData,
103
- process_common_list_1.ProcessCommonList,
104
89
  process_common_mail_1.ProcessCommonMail,
105
- process_date_filter_1.ProcessDateFilter,
106
90
  process_kaleyra_sms_1.ProcessKaleyraSms,
107
91
  process_smtp_mail_1.ProcessSmtpMail,
108
92
  ],
@@ -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,sEAAiE;AACjE,+DAA2D;AAC3D,2DAAuD;AACvD,2EAAsE;AACtE,qEAAiE;AACjE,wEAAmE;AACnE,0EAAoE;AACpE,4DAAuD;AACvD,wEAAkE;AAClE,0FAAmF;AACnF,8DAAyD;AACzD,4DAAuD;AACvD,gEAA2D;AAC3D,8EAAwE;AACxE,8DAAyD;AACzD,4EAAsE;AACtE,4FAAqF;AACrF,0FAAoF;AACpF,0FAAoF;AACpF,gEAA2D;AAC3D,4EAAsE;AACtE,4DAAuD;AACvD,gEAA2D;AAC3D,gEAA2D;AAC3D,8EAAwE;AACxE,gFAA0E;AAC1E,sEAAgE;AAChE,kEAA6D;AAC7D,4EAAsE;AACtE,8CAA0C;AAC1C,uEAAkE;AAClE,2FAAqF;AACrF,iFAA2E;AAC3E,2EAAqE;AACrE,iFAA2E;AAC3E,qEAAgE;AAChE,yEAAoE;AACpE,+EAAyE;AACzE,yE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AAE;QACN,4BAAY;QACZ,4BAAY;QACZ,8BAAa;QACb,iCAAc;QACd,iDAAsB;QACtB,6CAAoB;QACpB,0BAAW;QACX,wCAAkB;QAClB,4BAAY;QACZ,6CAAoB;QACpB,kCAAe;QACf,wBAAU;QACV,wBAAU;QACV,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,2EAAsE;AACtE,qEAAiE;AACjE,wEAAmE;AACnE,0FAAmF;AACnF,8DAAyD;AACzD,4DAAuD;AACvD,8DAAyD;AACzD,4FAAqF;AACrF,0FAAoF;AACpF,0FAAoF;AACpF,gEAA2D;AAC3D,4EAAsE;AACtE,4DAAuD;AACvD,gEAA2D;AAC3D,gEAA2D;AAC3D,8EAAwE;AACxE,gFAA0E;AAC1E,sEAAgE;AAChE,kEAA6D;AAC7D,4EAAsE;AACtE,8CAA0C;AAC1C,uEAAkE;AAClE,2FAAqF;AACrF,iFAA2E;AAC3E,2EAAqE;AACrE,iFAA2E;AAC3E,qEAAgE;AAChE,yEAAoE;AACpE,+EAAyE;AACzE,yEAAoE;AACpE,yEAAoE;AACpE,qEAAgE;AAChE,iFAA6E;AAC7E,uDAAmD;AACnD,4DAAwD;AACxD,4DAAwD;AACxD,8DAA0D;AAC1D,kEAA6D;AAC7D,kFAA6E;AAC7E,8EAAyE;AACzE,0DAAsD;AACtD,wEAAoE;AACpE,4DAAwD;AACxD,8EAAyE;AACzE,kEAA8D;AAC9D,wDAAoD;AACpD,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,WAAW,EAAE,CAAC,uCAAiB,EAAE,kCAAe,CAAC;IACjD,IAAI,EAAE;QACF,2CAAmB;QACnB,2DAA0B;QAC1B,iCAAc;QACd,+BAAa;QACb,iCAAc;QACd,6DAA2B;QAC3B,4DAA2B;QAC3B,4DAA2B;QAC3B,mCAAe;QACf,8CAAoB;QACpB,+BAAa;QACb,mCAAe;QACf,mCAAe;KAClB;IACD,QAAQ,EAAE,CAAC,4CAAmB,EAAE,8CAAoB,CAAC;IACrD,IAAI,EAAE,CAAC,wCAAiB,EAAE,qCAAgB,EAAE,8CAAoB,EAAE,kBAAO,CAAC;IAC1E,SAAS,EAAE;QACP,qCAAgB;QAChB,wDAAyB;QACzB,8CAAoB;QACpB,wCAAiB;QACjB,8CAAoB;QACpB,mCAAe;QACf,uCAAiB;QACjB,4CAAmB;QACnB,uCAAiB;QACjB,uCAAiB;QACjB,mCAAe;KAClB;IACD,WAAW,EAAE,CAAC,8CAAqB,EAAE,oBAAQ,CAAC;IAC9C,QAAQ,EAAE;QACN,4BAAY;QACZ,4BAAY;QACZ,8BAAa;QACb,iCAAc;QACd,iDAAsB;QACtB,6CAAoB;QACpB,0BAAW;QACX,wCAAkB;QAClB,4BAAY;QACZ,6CAAoB;QACpB,kCAAe;QACf,wBAAU;QACV,wBAAU;QACV,wBAAU;QACV,gCAAc;KACjB;IACD,WAAW,EAAE,CAAC,gCAAc,CAAC;CAChC,CAAC;AAEF,kBAAe,UAAU,CAAC"}
@@ -6,8 +6,6 @@ export * from './create.es6.service.file';
6
6
  export * from './create.index.file';
7
7
  export * from './file.system.utility';
8
8
  export * from './process.audit.log.data';
9
- export * from './process.common.list';
10
9
  export * from './process.common.mail';
11
- export * from './process.date.filter';
12
10
  export * from './process.kaleyra.sms';
13
11
  export * from './process.smtp.mail';
@@ -22,9 +22,7 @@ __exportStar(require("./create.es6.service.file"), exports);
22
22
  __exportStar(require("./create.index.file"), exports);
23
23
  __exportStar(require("./file.system.utility"), exports);
24
24
  __exportStar(require("./process.audit.log.data"), exports);
25
- __exportStar(require("./process.common.list"), exports);
26
25
  __exportStar(require("./process.common.mail"), exports);
27
- __exportStar(require("./process.date.filter"), exports);
28
26
  __exportStar(require("./process.kaleyra.sms"), exports);
29
27
  __exportStar(require("./process.smtp.mail"), exports);
30
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/libraries/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,iEAA+C;AAC/C,4DAA0C;AAC1C,yDAAuC;AACvC,4DAA0C;AAC1C,sDAAoC;AACpC,wDAAsC;AACtC,2DAAyC;AACzC,wDAAsC;AACtC,wDAAsC;AACtC,wDAAsC;AACtC,wDAAsC;AACtC,sDAAoC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/libraries/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,iEAA+C;AAC/C,4DAA0C;AAC1C,yDAAuC;AACvC,4DAA0C;AAC1C,sDAAoC;AACpC,wDAAsC;AACtC,2DAAyC;AACzC,wDAAsC;AACtC,wDAAsC;AACtC,sDAAoC"}
@@ -1,14 +1,17 @@
1
1
  import { DatabaseEventDto } from '../../common/dtos/database.event.dto';
2
+ import { PropertyService } from '../../system/services/property.service';
2
3
  import { ModelEntity } from './../../system/entities/model.entity';
3
4
  import { DynamoService } from './dynamo.service';
4
5
  export declare class AuditService {
5
6
  private readonly dynamoService;
7
+ private readonly propertyService;
6
8
  private toIgnore;
9
+ private refreshTime;
7
10
  private auditTable;
8
- constructor(dynamoService: DynamoService);
11
+ constructor(dynamoService: DynamoService, propertyService: PropertyService);
9
12
  setAuditRecord(event: DatabaseEventDto<any>): Promise<any[]>;
10
13
  getAuditLogs(model: ModelEntity, id: number): Promise<any[]>;
11
14
  getSourceAuditLogs(sourcehash: string, id: number): Promise<any[]>;
12
15
  private getDataFromDynamo;
13
- private init;
16
+ private getAuditTable;
14
17
  }
@@ -11,22 +11,24 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.AuditService = void 0;
13
13
  const common_1 = require("@nestjs/common");
14
- const config = require("config");
14
+ const date_fns_1 = require("date-fns");
15
15
  const hash_1 = require("../../common/libraries/hash");
16
16
  const platform_utility_1 = require("../../common/libraries/platform.utility");
17
+ const property_service_1 = require("../../system/services/property.service");
18
+ const process_audit_log_data_1 = require("../libraries/process.audit.log.data");
17
19
  const operation_exception_1 = require("./../../common/exceptions/operation.exception");
18
20
  const model_entity_1 = require("./../../system/entities/model.entity");
19
21
  const dynamo_service_1 = require("./dynamo.service");
20
- const process_audit_log_data_1 = require("../libraries/process.audit.log.data");
21
22
  let AuditService = class AuditService {
22
- constructor(dynamoService) {
23
+ constructor(dynamoService, propertyService) {
23
24
  this.dynamoService = dynamoService;
25
+ this.propertyService = propertyService;
24
26
  this.toIgnore = ['created_at', 'updated_at', 'created_by', 'updated_by', 'attributes'];
25
27
  this.auditTable = null;
26
- this.init();
27
28
  }
28
29
  async setAuditRecord(event) {
29
- if (!this.auditTable)
30
+ const auditTable = await this.getAuditTable();
31
+ if (!auditTable)
30
32
  return;
31
33
  const promises = [];
32
34
  const source = hash_1.Hash.hashMD5(`${event.metadata.tableName}:${event.metadata.name}`);
@@ -44,7 +46,7 @@ let AuditService = class AuditService {
44
46
  user: event.user?.id ?? 2,
45
47
  ip: event.user?.req?.ip || null,
46
48
  };
47
- promises.push(this.dynamoService.setItem(this.auditTable, item));
49
+ promises.push(this.dynamoService.setItem(auditTable, item));
48
50
  });
49
51
  return Promise.all(promises).then((res) => {
50
52
  return res;
@@ -60,10 +62,11 @@ let AuditService = class AuditService {
60
62
  return new process_audit_log_data_1.ProcessAuditLogData(entity).process(items);
61
63
  }
62
64
  async getDataFromDynamo(sourceHash, id) {
63
- if (!this.auditTable)
65
+ const auditTable = await this.getAuditTable();
66
+ if (!auditTable)
64
67
  throw new operation_exception_1.OperationException('Audit table is not properly setup in configuration');
65
68
  const params = {
66
- TableName: this.auditTable,
69
+ TableName: auditTable,
67
70
  KeyConditionExpression: '#key = :identifier and #sort > :value',
68
71
  ExpressionAttributeNames: {
69
72
  '#key': 'identifier',
@@ -76,14 +79,18 @@ let AuditService = class AuditService {
76
79
  };
77
80
  return this.dynamoService.queryItem(params);
78
81
  }
79
- init() {
80
- if (config.has('audit.table'))
81
- this.auditTable = config.get('audit.table');
82
+ async getAuditTable() {
83
+ const now = new Date();
84
+ if (this.refreshTime && this.refreshTime > now)
85
+ return this.auditTable;
86
+ this.refreshTime = (0, date_fns_1.addMinutes)(now, 15);
87
+ this.auditTable = await this.propertyService.get('audit.table.name', false);
88
+ return this.auditTable;
82
89
  }
83
90
  };
84
91
  AuditService = __decorate([
85
92
  (0, common_1.Injectable)(),
86
- __metadata("design:paramtypes", [dynamo_service_1.DynamoService])
93
+ __metadata("design:paramtypes", [dynamo_service_1.DynamoService, property_service_1.PropertyService])
87
94
  ], AuditService);
88
95
  exports.AuditService = AuditService;
89
96
  //# sourceMappingURL=audit.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"audit.service.js","sourceRoot":"","sources":["../../../src/platformUtility/services/audit.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,iCAAiC;AAEjC,sDAAmD;AACnD,8EAA0E;AAC1E,uFAAmF;AACnF,uEAAmE;AACnE,qDAAiD;AACjD,gFAA0E;AAQnE,IAAM,YAAY,GAAlB,MAAM,YAAY;IAoBrB,YAA6B,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;QAdjD,aAAQ,GAAG,CAAC,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,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}
@@ -1,10 +1,15 @@
1
+ import { PropertyService } from '../../system/services/property.service';
1
2
  import { MailLogEntity } from './../../system/entities/mail.log.entity';
2
3
  import { MailOptionsDto } from './../dtos/mail.options.dto';
3
4
  import { DynamoService } from './dynamo.service';
4
5
  export declare class MailService {
5
6
  private readonly dynamoService;
6
- constructor(dynamoService: DynamoService);
7
+ private readonly propertyService;
8
+ private refreshTime;
9
+ private entityTable;
10
+ constructor(dynamoService: DynamoService, propertyService: PropertyService);
7
11
  send(options: MailOptionsDto, metadata?: any): Promise<MailLogEntity>;
8
12
  private processMail;
9
13
  private saveToDynamo;
14
+ private getEntityTable;
10
15
  }
@@ -13,14 +13,18 @@ exports.MailService = void 0;
13
13
  const common_1 = require("@nestjs/common");
14
14
  const class_transformer_1 = require("class-transformer");
15
15
  const config = require("config");
16
+ const date_fns_1 = require("date-fns");
17
+ const property_service_1 = require("../../system/services/property.service");
16
18
  const process_smtp_mail_1 = require("../libraries/process.smtp.mail");
17
19
  const mail_log_entity_1 = require("./../../system/entities/mail.log.entity");
18
20
  const dynamo_service_1 = require("./dynamo.service");
19
- const operation_exception_1 = require("../../common/exceptions/operation.exception");
21
+ const SOURCEHASH = require("../../config/source.hash");
20
22
  const mailConfig = config.get('mail');
21
23
  let MailService = class MailService {
22
- constructor(dynamoService) {
24
+ constructor(dynamoService, propertyService) {
23
25
  this.dynamoService = dynamoService;
26
+ this.propertyService = propertyService;
27
+ this.entityTable = null;
24
28
  }
25
29
  async send(options, metadata) {
26
30
  const identifier = await this.processMail(options);
@@ -33,19 +37,29 @@ let MailService = class MailService {
33
37
  }
34
38
  processMail(options) {
35
39
  const gateway = mailConfig.gateway;
36
- if (!gateway)
37
- throw new operation_exception_1.OperationException(`Default mail gateway is not configured`);
38
40
  if (gateway === 'smtp')
39
41
  return new process_smtp_mail_1.ProcessSmtpMail(options).process();
42
+ global.console.log('No mail gateway defined in the system');
40
43
  }
41
- saveToDynamo(log, options, identifier) {
42
- const dynamoItem = { entity_hash: 'a3da8b74348b592a71fe3667f5d92954', entity_id: log.id, options, identifier };
43
- return this.dynamoService.setItem('sk_entity_records', dynamoItem);
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 && this.refreshTime > now)
54
+ return this.entityTable;
55
+ this.refreshTime = (0, date_fns_1.addMinutes)(now, 15);
56
+ this.entityTable = await this.propertyService.get('audit.table.name', false);
57
+ return this.entityTable;
44
58
  }
45
59
  };
46
60
  MailService = __decorate([
47
61
  (0, common_1.Injectable)(),
48
- __metadata("design:paramtypes", [dynamo_service_1.DynamoService])
62
+ __metadata("design:paramtypes", [dynamo_service_1.DynamoService, property_service_1.PropertyService])
49
63
  ], MailService);
50
64
  exports.MailService = MailService;
51
65
  //# 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,iCAAiC;AACjC,sEAAiE;AACjE,6EAAwE;AAExE,qDAAiD;AACjD,qFAAiF;AAEjF,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAQ/B,IAAM,WAAW,GAAjB,MAAM,WAAW;IAMpB,YAA6B,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAS7D,KAAK,CAAC,IAAI,CAAC,OAAuB,EAAE,QAAc;QAC9C,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QACnD,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC;QAElC,MAAM,IAAI,GAAG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AAS,EAAE,GAAG,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;QAG/F,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IAC/D,CAAC;IAQO,KAAK,CAAC,cAAc;QACxB,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,GAAG,GAAG;YAAE,OAAO,IAAI,CAAC,WAAW,CAAC;QAExE,IAAI,CAAC,WAAW,GAAG,IAAA,qBAAU,EAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QAEvC,IAAI,CAAC,WAAW,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;QAE7E,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;CACJ,CAAA;AA7FY,WAAW;IADvB,IAAA,mBAAU,GAAE;qCAsBmC,8BAAa,EAAoC,kCAAe;GArBnG,WAAW,CA6FvB;AA7FY,kCAAW"}
@@ -2,5 +2,5 @@ export declare class AddCommentDto {
2
2
  id?: number;
3
3
  comments: string;
4
4
  type_id?: number;
5
- is_system_generated: boolean;
5
+ is_system_generated?: boolean;
6
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"add.comment.dto.js","sourceRoot":"","sources":["../../../src/system/dtos/add.comment.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA2C;AAC3C,qDAA8E;AAE9E,MAAa,aAAa;CAmBzB;AAlBG;IAAC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yCACD;AAEZ;IAAC,IAAA,0BAAM,GAAE;IACR,IAAA,4BAAU,GAAE;;+CACI;AAEjB;IAAC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;8CACI;AAEjB;IAAC,IAAA,0BAAM,GAAE;IACR,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;0DACgB;AAlBjC,sCAmBC"}
1
+ {"version":3,"file":"add.comment.dto.js","sourceRoot":"","sources":["../../../src/system/dtos/add.comment.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA2C;AAC3C,qDAA8E;AAE9E,MAAa,aAAa;CAmBzB;AAlBG;IAAC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yCACD;AAEZ;IAAC,IAAA,0BAAM,GAAE;IACR,IAAA,4BAAU,GAAE;;+CACI;AAEjB;IAAC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;8CACI;AAEjB;IAAC,IAAA,0BAAM,GAAE;IACR,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;0DACiB;AAlBlC,sCAmBC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servicelabsco/nestjs-utility-services",
3
- "version": "1.1.102",
3
+ "version": "1.1.104",
4
4
  "description": "NestJS generic packages to support development",
5
5
  "author": "Hemant Kumar Sah <hemantanshu@gmail.com>",
6
6
  "license": "MIT",
@@ -1,15 +0,0 @@
1
- import { DateFilterDto } from './date.filter.dto';
2
- import { ListResponseFormatDto } from './list.response.format.dto';
3
- import { NumberRangeFilterDto } from './number.range.filter.dto';
4
- export declare class CommonListFilterDto {
5
- search?: string;
6
- limit?: number;
7
- page?: number;
8
- stats?: boolean;
9
- no_metrics?: boolean;
10
- format?: ListResponseFormatDto;
11
- date?: DateFilterDto;
12
- amount?: NumberRangeFilterDto;
13
- aggregate?: Record<string, string>;
14
- filter_query?: string;
15
- }
@@ -1,83 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.CommonListFilterDto = void 0;
13
- const class_transformer_1 = require("class-transformer");
14
- const class_validator_1 = require("class-validator");
15
- const date_filter_dto_1 = require("./date.filter.dto");
16
- const list_response_format_dto_1 = require("./list.response.format.dto");
17
- const number_range_filter_dto_1 = require("./number.range.filter.dto");
18
- class CommonListFilterDto {
19
- }
20
- __decorate([
21
- (0, class_validator_1.IsOptional)(),
22
- (0, class_validator_1.IsString)(),
23
- (0, class_validator_1.MinLength)(3),
24
- (0, class_transformer_1.Expose)(),
25
- __metadata("design:type", String)
26
- ], CommonListFilterDto.prototype, "search", void 0);
27
- __decorate([
28
- (0, class_validator_1.IsOptional)(),
29
- (0, class_validator_1.IsNumber)(),
30
- (0, class_transformer_1.Expose)(),
31
- __metadata("design:type", Number)
32
- ], CommonListFilterDto.prototype, "limit", void 0);
33
- __decorate([
34
- (0, class_validator_1.IsOptional)(),
35
- (0, class_validator_1.IsNumber)(),
36
- (0, class_validator_1.Min)(1),
37
- (0, class_transformer_1.Expose)(),
38
- __metadata("design:type", Number)
39
- ], CommonListFilterDto.prototype, "page", void 0);
40
- __decorate([
41
- (0, class_validator_1.IsOptional)(),
42
- (0, class_validator_1.IsBoolean)(),
43
- (0, class_transformer_1.Expose)(),
44
- __metadata("design:type", Boolean)
45
- ], CommonListFilterDto.prototype, "stats", void 0);
46
- __decorate([
47
- (0, class_validator_1.IsOptional)(),
48
- (0, class_validator_1.IsBoolean)(),
49
- (0, class_transformer_1.Expose)(),
50
- __metadata("design:type", Boolean)
51
- ], CommonListFilterDto.prototype, "no_metrics", void 0);
52
- __decorate([
53
- (0, class_validator_1.IsOptional)(),
54
- (0, class_validator_1.ValidateNested)(),
55
- (0, class_transformer_1.Type)(() => list_response_format_dto_1.ListResponseFormatDto),
56
- __metadata("design:type", list_response_format_dto_1.ListResponseFormatDto)
57
- ], CommonListFilterDto.prototype, "format", void 0);
58
- __decorate([
59
- (0, class_validator_1.IsOptional)(),
60
- (0, class_validator_1.ValidateNested)(),
61
- (0, class_transformer_1.Type)(() => date_filter_dto_1.DateFilterDto),
62
- (0, class_transformer_1.Expose)(),
63
- __metadata("design:type", date_filter_dto_1.DateFilterDto)
64
- ], CommonListFilterDto.prototype, "date", void 0);
65
- __decorate([
66
- (0, class_validator_1.IsOptional)(),
67
- (0, class_validator_1.ValidateNested)(),
68
- (0, class_transformer_1.Type)(() => number_range_filter_dto_1.NumberRangeFilterDto),
69
- (0, class_transformer_1.Expose)(),
70
- __metadata("design:type", number_range_filter_dto_1.NumberRangeFilterDto)
71
- ], CommonListFilterDto.prototype, "amount", void 0);
72
- __decorate([
73
- (0, class_validator_1.IsOptional)(),
74
- (0, class_transformer_1.Expose)(),
75
- __metadata("design:type", Object)
76
- ], CommonListFilterDto.prototype, "aggregate", void 0);
77
- __decorate([
78
- (0, class_validator_1.IsOptional)(),
79
- (0, class_transformer_1.Expose)(),
80
- __metadata("design:type", String)
81
- ], CommonListFilterDto.prototype, "filter_query", void 0);
82
- exports.CommonListFilterDto = CommonListFilterDto;
83
- //# sourceMappingURL=common.list.filter.dto.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"common.list.filter.dto.js","sourceRoot":"","sources":["../../../src/platformUtility/dtos/common.list.filter.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAiD;AACjD,qDAA4G;AAC5G,uDAAkD;AAClD,yEAAmE;AACnE,uEAAiE;AAEjE,MAAa,mB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to {
4
- range?: DateRangeFilterDto;
5
- today?: boolean;
6
- week?: boolean;
7
- month?: boolean;
8
- year?: boolean;
9
- financial_year?: boolean;
10
- }
@@ -1,57 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.DateFilterDto = void 0;
13
- const class_transformer_1 = require("class-transformer");
14
- const class_validator_1 = require("class-validator");
15
- require("reflect-metadata");
16
- const date_range_filter_dto_1 = require("./date.range.filter.dto");
17
- class DateFilterDto {
18
- }
19
- __decorate([
20
- (0, class_validator_1.IsOptional)(),
21
- (0, class_validator_1.ValidateNested)(),
22
- (0, class_transformer_1.Type)(() => date_range_filter_dto_1.DateRangeFilterDto),
23
- (0, class_transformer_1.Expose)(),
24
- __metadata("design:type", date_range_filter_dto_1.DateRangeFilterDto)
25
- ], DateFilterDto.prototype, "range", void 0);
26
- __decorate([
27
- (0, class_validator_1.IsOptional)(),
28
- (0, class_validator_1.IsBoolean)(),
29
- (0, class_transformer_1.Expose)(),
30
- __metadata("design:type", Boolean)
31
- ], DateFilterDto.prototype, "today", void 0);
32
- __decorate([
33
- (0, class_validator_1.IsOptional)(),
34
- (0, class_validator_1.IsBoolean)(),
35
- (0, class_transformer_1.Expose)(),
36
- __metadata("design:type", Boolean)
37
- ], DateFilterDto.prototype, "week", void 0);
38
- __decorate([
39
- (0, class_validator_1.IsOptional)(),
40
- (0, class_validator_1.IsBoolean)(),
41
- (0, class_transformer_1.Expose)(),
42
- __metadata("design:type", Boolean)
43
- ], DateFilterDto.prototype, "month", void 0);
44
- __decorate([
45
- (0, class_validator_1.IsOptional)(),
46
- (0, class_validator_1.IsBoolean)(),
47
- (0, class_transformer_1.Expose)(),
48
- __metadata("design:type", Boolean)
49
- ], DateFilterDto.prototype, "year", void 0);
50
- __decorate([
51
- (0, class_validator_1.IsOptional)(),
52
- (0, class_validator_1.IsBoolean)(),
53
- (0, class_transformer_1.Expose)(),
54
- __metadata("design:type", Boolean)
55
- ], DateFilterDto.prototype, "financial_year", void 0);
56
- exports.DateFilterDto = DateFilterDto;
57
- //# sourceMappingURL=date.filter.dto.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"date.filter.dto.js","sourceRoot":"","sources":["../../../src/platformUtility/dtos/date.filter.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAiD;AACjD,qDAAwE;AACxE,4BAA0B;AAC1B,mEAA6D;AAE7D,MAAa,aAAa;CA+BzB;AA9BG;IAAC,IAAA,4BAAU,GAAE;IACZ,IAAA,gCAAc,GAAE;IAChB,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,0CAAkB,CAAC;IAC9B,IAAA,0BAAM,GAAE;8BACD,0CAAkB;4CAAC;AAE3B;IAAC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;IACX,IAAA,0BAAM,GAAE;;4CACO;AAEhB;IAAC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;IACX,IAAA,0BAAM,GAAE;;2CACM;AAEf;IAAC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;IACX,IAAA,0BAAM,GAAE;;4CACO;AAEhB;IAAC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;IACX,IAAA,0BAAM,GAAE;;2CACM;AAEf;IAAC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;IACX,IAAA,0BAAM,GAAE;;qDACgB;AA9B7B,sCA+BC"}
@@ -1,4 +0,0 @@
1
- export declare class DateRangeFilterDto {
2
- min: Date;
3
- max: Date;
4
- }
@@ -1,29 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.DateRangeFilterDto = void 0;
13
- const class_transformer_1 = require("class-transformer");
14
- const class_validator_1 = require("class-validator");
15
- class DateRangeFilterDto {
16
- }
17
- __decorate([
18
- (0, class_validator_1.IsNotEmpty)(),
19
- (0, class_transformer_1.Expose)(),
20
- __metadata("design:type", Date)
21
- ], DateRangeFilterDto.prototype, "min", void 0);
22
- __decorate([
23
- (0, class_validator_1.IsNotEmpty)(),
24
- (0, class_validator_1.IsISO8601)(),
25
- (0, class_transformer_1.Expose)(),
26
- __metadata("design:type", Date)
27
- ], DateRangeFilterDto.prototype, "max", void 0);
28
- exports.DateRangeFilterDto = DateRangeFilterDto;
29
- //# sourceMappingURL=date.range.filter.dto.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"date.range.filter.dto.js","sourceRoot":"","sources":["../../../src/platformUtility/dtos/date.range.filter.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA2C;AAC3C,qDAAwD;AAExD,MAAa,kBAAkB;CAS9B;AARG;IAAC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAM,GAAE;8BACJ,IAAI;+CAAC;AAEV;IAAC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;IACX,IAAA,0BAAM,GAAE;8BACJ,IAAI;+CAAC;AARd,gDASC"}
@@ -1,14 +0,0 @@
1
- export declare class ListResponseDto {
2
- stats?: {
3
- total?: number;
4
- page?: number;
5
- limit?: number;
6
- };
7
- metrics?: {
8
- [key: string]: number | {};
9
- };
10
- records?: any[];
11
- file?: string;
12
- headers?: any;
13
- aggregate?: number;
14
- }
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ListResponseDto = void 0;
4
- class ListResponseDto {
5
- }
6
- exports.ListResponseDto = ListResponseDto;
7
- //# sourceMappingURL=list.response.dto.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list.response.dto.js","sourceRoot":"","sources":["../../../src/platformUtility/dtos/list.response.dto.ts"],"names":[],"mappings":";;;AAAA,MAAa,eAAe;CAO3B;AAPD,0CAOC"}
@@ -1,4 +0,0 @@
1
- export declare class ListResponseFormatDto {
2
- json?: boolean;
3
- csv?: boolean;
4
- }
@@ -1,27 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.ListResponseFormatDto = void 0;
13
- const class_validator_1 = require("class-validator");
14
- class ListResponseFormatDto {
15
- }
16
- __decorate([
17
- (0, class_validator_1.IsOptional)(),
18
- (0, class_validator_1.IsBoolean)(),
19
- __metadata("design:type", Boolean)
20
- ], ListResponseFormatDto.prototype, "json", void 0);
21
- __decorate([
22
- (0, class_validator_1.IsOptional)(),
23
- (0, class_validator_1.IsBoolean)(),
24
- __metadata("design:type", Boolean)
25
- ], ListResponseFormatDto.prototype, "csv", void 0);
26
- exports.ListResponseFormatDto = ListResponseFormatDto;
27
- //# sourceMappingURL=list.response.format.dto.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list.response.format.dto.js","sourceRoot":"","sources":["../../../src/platformUtility/dtos/list.response.format.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAwD;AACxD,MAAa,qBAAqB;CAQjC;AAPG;IAAC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;;mDACG;AAEf;IAAC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;;kDACE;AAPlB,sDAQC"}
@@ -1,7 +0,0 @@
1
- export declare class NumberRangeFilterDto {
2
- min?: number;
3
- max?: number;
4
- positive?: boolean;
5
- negative?: boolean;
6
- zero?: boolean;
7
- }
@@ -1,45 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.NumberRangeFilterDto = void 0;
13
- const class_transformer_1 = require("class-transformer");
14
- const class_validator_1 = require("class-validator");
15
- class NumberRangeFilterDto {
16
- }
17
- __decorate([
18
- (0, class_validator_1.IsNumber)(),
19
- (0, class_validator_1.IsOptional)(),
20
- (0, class_transformer_1.Expose)(),
21
- __metadata("design:type", Number)
22
- ], NumberRangeFilterDto.prototype, "min", void 0);
23
- __decorate([
24
- (0, class_validator_1.IsOptional)(),
25
- (0, class_validator_1.IsNumber)(),
26
- (0, class_transformer_1.Expose)(),
27
- __metadata("design:type", Number)
28
- ], NumberRangeFilterDto.prototype, "max", void 0);
29
- __decorate([
30
- (0, class_validator_1.IsBoolean)(),
31
- (0, class_validator_1.IsOptional)(),
32
- __metadata("design:type", Boolean)
33
- ], NumberRangeFilterDto.prototype, "positive", void 0);
34
- __decorate([
35
- (0, class_validator_1.IsBoolean)(),
36
- (0, class_validator_1.IsOptional)(),
37
- __metadata("design:type", Boolean)
38
- ], NumberRangeFilterDto.prototype, "negative", void 0);
39
- __decorate([
40
- (0, class_validator_1.IsBoolean)(),
41
- (0, class_validator_1.IsOptional)(),
42
- __metadata("design:type", Boolean)
43
- ], NumberRangeFilterDto.prototype, "zero", void 0);
44
- exports.NumberRangeFilterDto = NumberRangeFilterDto;
45
- //# sourceMappingURL=number.range.filter.dto.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"number.range.filter.dto.js","sourceRoot":"","sources":["../../../src/platformUtility/dtos/number.range.filter.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA2C;AAC3C,qDAAkE;AAElE,MAAa,oBAAoB;CAsBhC;AArBG;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAM,GAAE;;iDACI;AAEb;IAAC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,0BAAM,GAAE;;iDACI;AAEb;IAAC,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;sDACM;AAEnB;IAAC,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;sDACM;AAEnB;IAAC,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;kDACE;AArBnB,oDAsBC"}
@@ -1,28 +0,0 @@
1
- import { CommonListFilterDto } from '../dtos/common.list.filter.dto';
2
- import { DateFilterDto } from '../dtos/date.filter.dto';
3
- import { ListResponseDto } from '../dtos/list.response.dto';
4
- import { SqlService } from '../services';
5
- export declare class ProcessCommonList {
6
- protected config: {
7
- sql: string;
8
- order: string;
9
- columns: string[];
10
- metrics?: string[];
11
- };
12
- protected filter: CommonListFilterDto;
13
- protected restrictions: string[];
14
- protected query: string;
15
- protected response: ListResponseDto;
16
- protected sqlService: SqlService;
17
- protected handle(): Promise<{
18
- aggregate: any;
19
- }> | Promise<ListResponseDto>;
20
- private getListRecords;
21
- private getTotalRecords;
22
- private getQueryRestrictions;
23
- private getQuery;
24
- private getRecords;
25
- private aggregate;
26
- protected processDate(date: DateFilterDto, column: string): void;
27
- private sendResponse;
28
- }
@@ -1,90 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProcessCommonList = void 0;
4
- const common_1 = require("../../common");
5
- const process_date_filter_1 = require("./process.date.filter");
6
- class ProcessCommonList {
7
- constructor() {
8
- this.restrictions = [];
9
- this.response = { stats: {}, metrics: {}, records: [] };
10
- }
11
- handle() {
12
- this.query = this.getQuery();
13
- if (this.filter.aggregate)
14
- return this.aggregate();
15
- return this.getListRecords();
16
- }
17
- async getListRecords() {
18
- await this.getRecords();
19
- await this.getTotalRecords();
20
- return this.sendResponse();
21
- }
22
- async getTotalRecords() {
23
- if (this.filter?.no_metrics || this.filter?.format?.csv)
24
- return;
25
- const metrics = this.config?.metrics || [];
26
- metrics.push(`count(1) count`);
27
- const sql = `select ${this.config.metrics.join(',')} from ${this.query}`;
28
- const record = await this.sqlService.readFirst(sql);
29
- this.response.stats.total = record.count;
30
- this.response.metrics = {};
31
- for (const [key, value] of Object.entries(record)) {
32
- if (key === 'count')
33
- continue;
34
- this.response.metrics[key] = value;
35
- }
36
- }
37
- getQueryRestrictions() {
38
- if (!this.restrictions.length)
39
- return;
40
- const record = [];
41
- this.restrictions.forEach((restriction) => {
42
- record.push(` ( ${restriction} ) `);
43
- });
44
- return record.join('and');
45
- }
46
- getQuery() {
47
- const restrictions = this.getQueryRestrictions();
48
- const columns = this.config.columns.join(',');
49
- let sql = `select ${columns} from ${this.config.sql}`;
50
- if (restrictions)
51
- sql = `${sql} and ${restrictions} `;
52
- if (this.filter.filter_query)
53
- return `(${sql}) sq where ${this.filter.filter_query}`;
54
- return `(${sql}) sq`;
55
- }
56
- async getRecords() {
57
- const filter = this.filter;
58
- const limit = filter.limit ?? 20;
59
- const page = filter.page || 1;
60
- const offset = (page - 1) * limit;
61
- const order = this.config.order || 'sq.created_at desc';
62
- const sql = `select sq.* from ${this.query} order by ${order} limit ${limit} offset ${offset}`;
63
- this.response.stats.limit = limit;
64
- this.response.stats.page = page;
65
- this.response.records = await this.sqlService.read(sql);
66
- }
67
- async aggregate() {
68
- const aggregate = this.filter.aggregate;
69
- const supportedOperations = ['avg', 'sum', 'max', 'min'];
70
- const key = Object.keys(aggregate)[0];
71
- if (supportedOperations.indexOf(key) === -1)
72
- throw new common_1.OperationException(`Given aggregate function ${key} is not supported`);
73
- const value = Object.values(aggregate)[0];
74
- const sql = `select ${key}(sq.${value}) aggregate from ${this.query}`;
75
- const response = await this.sqlService.readFirst(sql);
76
- return { aggregate: response.aggregate };
77
- }
78
- processDate(date, column) {
79
- const range = new process_date_filter_1.ProcessDateFilter().process(date);
80
- if (!range)
81
- return;
82
- this.restrictions.push(`${column} between '${range.min}' and '${range.max}'`);
83
- }
84
- async sendResponse() {
85
- if (!this.filter.format?.csv)
86
- return this.response;
87
- }
88
- }
89
- exports.ProcessCommonList = ProcessCommonList;
90
- //# sourceMappingURL=process.common.list.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"process.common.list.js","sourceRoot":"","sources":["../../../src/platformUtility/libraries/process.common.list.ts"],"names":[],"mappings":";;;AAAA,yCAAkD;AAKlD,+DAA0D;AAO1D,MAAa,iBAAiB;IAA9B;QAiBc,iBAAY,GAAa,EAAE,CAAC;QAgB5B,aAAQ,GAAoB,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IA2JlF,CAAC;IAjJa,MAAM;QACZ,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC7B,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS;YAAE,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC;QAEnD,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC;IACjC,CAAC;IAEO,KAAK,CAAC,cAAc;QAExB,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;QACxB,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;QAG7B,OAAO,IAAI,CAAC,YAAY,EAAE,CAAC;IAC/B,CAAC;IAOO,KAAK,CAAC,eAAe;QAEzB,IAAI,IAAI,CAAC,MAAM,EAAE,UAAU,IAAI,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG;YAAE,OAAO;QAChE,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,EAAE,OAAO,IAAI,EAAE,CAAC;QAE3C,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAE/B,MAAM,GAAG,GAAG,UAAU,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,IAAI,CAAC,KAAK,EAAE,CAAC;QACzE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QAE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AAG,MAAM,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QAEtD,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC;IAC7C,CAAC;IAUS,WAAW,CAAC,IAAmB,EAAE,MAAc;QACrD,MAAM,KAAK,GAAG,IAAI,uCAAiB,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACpD,IAAI,CAAC,KAAK;YAAE,OAAO;QAEnB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,aAAa,KAAK,CAAC,GAAG,UAAU,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC;IAClF,CAAC;IAEO,KAAK,CAAC,YAAY;QACtB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG;YAAE,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvD,CAAC;CACJ;AA5LD,8CA4LC"}
@@ -1,14 +0,0 @@
1
- import { DateFilterDto } from '../dtos/date.filter.dto';
2
- import { DateRangeFilterDto } from '../dtos/date.range.filter.dto';
3
- export declare class ProcessDateFilter {
4
- private filter;
5
- private range;
6
- process(filter: DateFilterDto): DateRangeFilterDto;
7
- private analyseFilter;
8
- private today;
9
- private week;
10
- private month;
11
- private year;
12
- private financialYear;
13
- private checkRange;
14
- }
@@ -1,61 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProcessDateFilter = void 0;
4
- const date_fns_1 = require("date-fns");
5
- class ProcessDateFilter {
6
- process(filter) {
7
- if (!filter)
8
- return;
9
- this.filter = filter;
10
- this.analyseFilter();
11
- return this.range;
12
- }
13
- analyseFilter() {
14
- this.today();
15
- if (!this.range)
16
- this.week();
17
- if (!this.range)
18
- this.month();
19
- if (!this.range)
20
- this.year();
21
- if (!this.range)
22
- this.financialYear();
23
- if (!this.range)
24
- this.checkRange();
25
- }
26
- today() {
27
- if (!this.filter.today)
28
- return;
29
- const today = new Date();
30
- this.range = { min: (0, date_fns_1.startOfDay)(today), max: (0, date_fns_1.endOfDay)(today) };
31
- }
32
- week() {
33
- if (!this.filter.week)
34
- return;
35
- const now = new Date();
36
- this.range = { min: (0, date_fns_1.startOfWeek)(now, { weekStartsOn: 1 }), max: (0, date_fns_1.endOfDay)(now) };
37
- }
38
- month() {
39
- if (!this.filter.month)
40
- return;
41
- const now = new Date();
42
- this.range = { min: (0, date_fns_1.startOfMonth)(now), max: (0, date_fns_1.endOfDay)(now) };
43
- }
44
- year() {
45
- if (!this.filter.year)
46
- return;
47
- const now = new Date();
48
- this.range = { min: (0, date_fns_1.startOfYear)(now), max: (0, date_fns_1.endOfDay)(now) };
49
- }
50
- financialYear() {
51
- if (!this.filter.financial_year)
52
- return;
53
- }
54
- checkRange() {
55
- if (!this.filter.range)
56
- return;
57
- this.range = this.filter.range;
58
- }
59
- }
60
- exports.ProcessDateFilter = ProcessDateFilter;
61
- //# sourceMappingURL=process.date.filter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"process.date.filter.js","sourceRoot":"","sources":["../../../src/platformUtility/libraries/process.date.filter.ts"],"names":[],"mappings":";;;AAAA,uCAAwF;AAQxF,MAAa,iBAAiB;IAsB1B,OAAO,CAAC,MAAqB;QACzB,IAAI,CAAC,MAAM;YAAE,OAAO;QAEpB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,aAAa,EAAE,CAAC;QAErB,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAOO,aAAa;QACjB,IAAI,CAAC,KAAK,EAAE,CAAC;QAEb,IAAI,CAAC,IAAI,CAAC,KAAK;YAAE,IAAI,CAAC,IAAI,EAAE,CAAC;QAC7B,IAAI,CAAC,IAAI,CAAC,KAAK;YAAE,IAAI,CAAC,KAAK,EAAE,CAAC;QAC9B,IAAI,CAAC,IAAI,CAAC,KAAK;YAAE,IAAI,CAAC,IAAI,EAAE,CAAC;QAC7B,IAAI,CAAC,I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