@servicelabsco/nestjs-utility-services 1.2.150 → 1.2.151

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 (43) hide show
  1. package/dist/config/entity.constants.d.ts +2 -0
  2. package/dist/config/entity.constants.js +2 -0
  3. package/dist/config/entity.constants.js.map +1 -1
  4. package/dist/migrations/1758615351607-CreateRemoteRequestLogTable.d.ts +5 -0
  5. package/dist/migrations/1758615351607-CreateRemoteRequestLogTable.js +24 -0
  6. package/dist/migrations/1758615351607-CreateRemoteRequestLogTable.js.map +1 -0
  7. package/dist/platformUtility/dtos/index.d.ts +2 -0
  8. package/dist/platformUtility/dtos/index.js +2 -0
  9. package/dist/platformUtility/dtos/index.js.map +1 -1
  10. package/dist/platformUtility/dtos/remote.request.config.dto.d.ts +4 -0
  11. package/dist/platformUtility/dtos/remote.request.config.dto.js +8 -0
  12. package/dist/platformUtility/dtos/remote.request.config.dto.js.map +1 -0
  13. package/dist/platformUtility/dtos/remote.request.log.attributes.dto.d.ts +3 -0
  14. package/dist/platformUtility/dtos/remote.request.log.attributes.dto.js +8 -0
  15. package/dist/platformUtility/dtos/remote.request.log.attributes.dto.js.map +1 -0
  16. package/dist/platformUtility/entities/index.d.ts +1 -0
  17. package/dist/platformUtility/entities/index.js +1 -0
  18. package/dist/platformUtility/entities/index.js.map +1 -1
  19. package/dist/platformUtility/entities/remote.request.log.entity.d.ts +13 -0
  20. package/dist/platformUtility/entities/remote.request.log.entity.js +58 -0
  21. package/dist/platformUtility/entities/remote.request.log.entity.js.map +1 -0
  22. package/dist/platformUtility/es6.classes.d.ts +6 -3
  23. package/dist/platformUtility/es6.classes.js +16 -3
  24. package/dist/platformUtility/es6.classes.js.map +1 -1
  25. package/dist/platformUtility/jobs/index.d.ts +1 -0
  26. package/dist/platformUtility/jobs/index.js +1 -0
  27. package/dist/platformUtility/jobs/index.js.map +1 -1
  28. package/dist/platformUtility/jobs/remote.request.log.job.d.ts +9 -0
  29. package/dist/platformUtility/jobs/remote.request.log.job.js +30 -0
  30. package/dist/platformUtility/jobs/remote.request.log.job.js.map +1 -0
  31. package/dist/platformUtility/services/es6.jobs.service.d.ts +3 -1
  32. package/dist/platformUtility/services/es6.jobs.service.js +5 -1
  33. package/dist/platformUtility/services/es6.jobs.service.js.map +1 -1
  34. package/dist/platformUtility/services/remote.request.service.d.ts +8 -4
  35. package/dist/platformUtility/services/remote.request.service.js +24 -7
  36. package/dist/platformUtility/services/remote.request.service.js.map +1 -1
  37. package/dist/platformUtility/subscribers/index.d.ts +1 -0
  38. package/dist/platformUtility/subscribers/index.js +1 -0
  39. package/dist/platformUtility/subscribers/index.js.map +1 -1
  40. package/dist/platformUtility/subscribers/remote.request.log.subscriber.d.ts +10 -0
  41. package/dist/platformUtility/subscribers/remote.request.log.subscriber.js +34 -0
  42. package/dist/platformUtility/subscribers/remote.request.log.subscriber.js.map +1 -0
  43. package/package.json +1 -1
@@ -7,6 +7,7 @@ import { UserEntity } from '../auth/entities/user.entity';
7
7
  import { UserReferralEntity } from '../auth/entities/user.referral.entity';
8
8
  import { FailedBullJobEntity } from '../platformUtility/entities/failed.bull.job.entity';
9
9
  import { PendingBullJobEntity } from '../platformUtility/entities/pending.bull.job.entity';
10
+ import { RemoteRequestLogEntity } from '../platformUtility/entities/remote.request.log.entity';
10
11
  import { PermissionEntity } from '../security/entities/permission.entity';
11
12
  import { RoleEntity } from '../security/entities/role.entity';
12
13
  import { UserPermissionEntity } from '../security/entities/user.permission.entity';
@@ -89,6 +90,7 @@ declare const entityConstants: {
89
90
  bbf64c9ab49677db1a8303711d5be8d7: typeof UserReferralEntity;
90
91
  '2d501bb4f3a993415483bef5c4651cb6': typeof FailedBullJobEntity;
91
92
  '7d8f12557d67e2ab5287618c33547ccd': typeof PendingBullJobEntity;
93
+ '10911b0ed7907f3cdb94eab9d62d8097': typeof RemoteRequestLogEntity;
92
94
  '3df8caef05821e79d70a77f0b7d8ac72': typeof PermissionEntity;
93
95
  '41423d5ca13b6eff7a90c752063da414': typeof RoleEntity;
94
96
  '6c17d741e3fa41d086430b9867d6648f': typeof UserPermissionEntity;
@@ -8,6 +8,7 @@ const user_entity_1 = require("../auth/entities/user.entity");
8
8
  const user_referral_entity_1 = require("../auth/entities/user.referral.entity");
9
9
  const failed_bull_job_entity_1 = require("../platformUtility/entities/failed.bull.job.entity");
10
10
  const pending_bull_job_entity_1 = require("../platformUtility/entities/pending.bull.job.entity");
11
+ const remote_request_log_entity_1 = require("../platformUtility/entities/remote.request.log.entity");
11
12
  const permission_entity_1 = require("../security/entities/permission.entity");
12
13
  const role_entity_1 = require("../security/entities/role.entity");
13
14
  const user_permission_entity_1 = require("../security/entities/user.permission.entity");
@@ -90,6 +91,7 @@ const entityConstants = {
90
91
  bbf64c9ab49677db1a8303711d5be8d7: user_referral_entity_1.UserReferralEntity,
91
92
  '2d501bb4f3a993415483bef5c4651cb6': failed_bull_job_entity_1.FailedBullJobEntity,
92
93
  '7d8f12557d67e2ab5287618c33547ccd': pending_bull_job_entity_1.PendingBullJobEntity,
94
+ '10911b0ed7907f3cdb94eab9d62d8097': remote_request_log_entity_1.RemoteRequestLogEntity,
93
95
  '3df8caef05821e79d70a77f0b7d8ac72': permission_entity_1.PermissionEntity,
94
96
  '41423d5ca13b6eff7a90c752063da414': role_entity_1.RoleEntity,
95
97
  '6c17d741e3fa41d086430b9867d6648f': user_permission_entity_1.UserPermissionEntity,
@@ -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,0FAAqF;AACrF,8DAA0D;AAC1D,gFAA2E;AAC3E,+FAAyF;AACzF,iGAA2F;AAC3F,8EAA0E;AAC1E,kEAA8D;AAC9D,wFAAmF;AACnF,4EAAuE;AACvE,kFAA6E;AAC7E,4FAAsF;AACtF,kEAA8D;AAC9D,0FAAq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AE,yCAAkB;IACpD,kCAAkC,EAAE,6CAAoB;IACxD,gCAAgC,EAAE,qCAAgB;IAClD,kCAAkC,EAAE,uCAAiB;IACrD,kCAAkC,EAAE,gCAAc;IAClD,gCAAgC,EAAE,6CAAoB;IACtD,gCAAgC,EAAE,wCAAkB;IACpD,kCAAkC,EAAE,yCAAkB;IACtD,gCAAgC,EAAE,4BAAY;IAC9C,gCAAgC,EAAE,yCAAkB;IACpD,kCAAkC,EAAE,uCAAiB;IACrD,kCAAkC,EAAE,qDAAwB;IAC5D,gCAAgC,EAAE,qCAAgB;IAClD,kCAAkC,EAAE,uCAAiB;IACrD,gCAAgC,EAAE,6CAAoB;IACtD,kCAAkC,EAAE,2CAAmB;IACvD,gCAAgC,EAAE,yCAAkB;IACpD,kCAAkC,EAAE,8BAAa;IACjD,gCAAgC,EAAE,qCAAgB;IAClD,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;IACtD,kCAAkC,EAAE,iDAAsB;CAC7D,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,0FAAqF;AACrF,8DAA0D;AAC1D,gFAA2E;AAC3E,+FAAyF;AACzF,iGAA2F;AAC3F,qGAA+F;AAC/F,8EAA0E;AAC1E,kEAA8D;AAC9D,wFAAmF;AACnF,4EAAuE;AACvE,kFAA6E;AAC7E,4FAAsF;AACtF,kEAA8D;AAC9D,0FAAq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AAE,qCAAgB;IACpD,gCAAgC,EAAE,yCAAkB;IACpD,kCAAkC,EAAE,6CAAoB;IACxD,gCAAgC,EAAE,qCAAgB;IAClD,kCAAkC,EAAE,uCAAiB;IACrD,kCAAkC,EAAE,gCAAc;IAClD,gCAAgC,EAAE,6CAAoB;IACtD,gCAAgC,EAAE,wCAAkB;IACpD,kCAAkC,EAAE,yCAAkB;IACtD,gCAAgC,EAAE,4BAAY;IAC9C,gCAAgC,EAAE,yCAAkB;IACpD,kCAAkC,EAAE,uCAAiB;IACrD,kCAAkC,EAAE,qDAAwB;IAC5D,gCAAgC,EAAE,qCAAgB;IAClD,kCAAkC,EAAE,uCAAiB;IACrD,gCAAgC,EAAE,6CAAoB;IACtD,kCAAkC,EAAE,2CAAmB;IACvD,gCAAgC,EAAE,yCAAkB;IACpD,kCAAkC,EAAE,8BAAa;IACjD,gCAAgC,EAAE,qCAAgB;IAClD,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;IACtD,kCAAkC,EAAE,iDAAsB;CAC7D,CAAC;AAEF,iBAAS,eAAe,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { MigrationUtility } from '../common/libraries/migration.utility';
2
+ export declare class CreateRemoteRequestLogTable1758615351607 extends MigrationUtility {
3
+ constructor();
4
+ process(): void;
5
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateRemoteRequestLogTable1758615351607 = void 0;
4
+ const migration_utility_1 = require("../common/libraries/migration.utility");
5
+ class CreateRemoteRequestLogTable1758615351607 extends migration_utility_1.MigrationUtility {
6
+ constructor() {
7
+ super('utl_remote_request_logs');
8
+ this.process();
9
+ }
10
+ process() {
11
+ this.primary();
12
+ this.text('url');
13
+ this.string('method');
14
+ this.string('type');
15
+ this.source();
16
+ this.boolean('success');
17
+ this.json('request');
18
+ this.json('response');
19
+ this.json('attributes');
20
+ this.whoColumns();
21
+ }
22
+ }
23
+ exports.CreateRemoteRequestLogTable1758615351607 = CreateRemoteRequestLogTable1758615351607;
24
+ //# sourceMappingURL=1758615351607-CreateRemoteRequestLogTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1758615351607-CreateRemoteRequestLogTable.js","sourceRoot":"","sources":["../../src/migrations/1758615351607-CreateRemoteRequestLogTable.ts"],"names":[],"mappings":";;;AAAA,6EAAyE;AAEzE,MAAa,wCAAyC,SAAQ,oCAAgB;IAC1E;QACI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QACjC,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAED,OAAO;QACH,IAAI,CAAC,OAAO,EAAE,CAAC;QAEf,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACjB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACtB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAEpB,IAAI,CAAC,MAAM,EAAE,CAAC;QAEd,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAExB,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACrB,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAEtB,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACxB,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;CACJ;AAvBD,4FAuBC"}
@@ -10,6 +10,8 @@ export * from './push.notification.response.dto';
10
10
  export * from './push.notification.template.dto';
11
11
  export * from './queue.options.dto';
12
12
  export * from './remote.raw.response.dto';
13
+ export * from './remote.request.config.dto';
14
+ export * from './remote.request.log.attributes.dto';
13
15
  export * from './set.sms.payload.dto';
14
16
  export * from './sms.payload.dto';
15
17
  export * from './smtp.config.dto';
@@ -26,6 +26,8 @@ __exportStar(require("./push.notification.response.dto"), exports);
26
26
  __exportStar(require("./push.notification.template.dto"), exports);
27
27
  __exportStar(require("./queue.options.dto"), exports);
28
28
  __exportStar(require("./remote.raw.response.dto"), exports);
29
+ __exportStar(require("./remote.request.config.dto"), exports);
30
+ __exportStar(require("./remote.request.log.attributes.dto"), exports);
29
31
  __exportStar(require("./set.sms.payload.dto"), exports);
30
32
  __exportStar(require("./sms.payload.dto"), exports);
31
33
  __exportStar(require("./smtp.config.dto"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/dtos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AAAA,0DAAwC;AAAA,mEAAiD;AAAA,qDAAmC;AAAA,oDAAkC;AAAA,iEAA+C;AAAA,qDAAmC;AAAA,oEAAkD;AAAA,mEAAiD;AAAA,mEAAiD;AAAA,sDAAoC;AAAA,4DAA0C;AAAA,wDAAsC;AAAA,oDAAkC;AAAA,oDAAkC;AAAA,sDAAoC;AAAA,sDAAmC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/dtos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AAAA,0DAAwC;AAAA,mEAAiD;AAAA,qDAAmC;AAAA,oDAAkC;AAAA,iEAA+C;AAAA,qDAAmC;AAAA,oEAAkD;AAAA,mEAAiD;AAAA,mEAAiD;AAAA,sDAAoC;AAAA,4DAA0C;AAAA,8DAA4C;AAAA,sEAAoD;AAAA,wDAAsC;AAAA,oDAAkC;AAAA,oDAAkC;AAAA,sDAAoC;AAAA,sDAAmC"}
@@ -0,0 +1,4 @@
1
+ import { SourceColumnDto } from './source.column.dto';
2
+ export declare class RemoteRequestConfigDto extends SourceColumnDto {
3
+ type?: string;
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RemoteRequestConfigDto = void 0;
4
+ const source_column_dto_1 = require("./source.column.dto");
5
+ class RemoteRequestConfigDto extends source_column_dto_1.SourceColumnDto {
6
+ }
7
+ exports.RemoteRequestConfigDto = RemoteRequestConfigDto;
8
+ //# sourceMappingURL=remote.request.config.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote.request.config.dto.js","sourceRoot":"","sources":["../../../src/platformUtility/dtos/remote.request.config.dto.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AAEtD,MAAa,sBAAuB,SAAQ,mCAAe;CAE1D;AAFD,wDAEC"}
@@ -0,0 +1,3 @@
1
+ import { CommonAttributesDto } from './common.attributes.dto';
2
+ export declare class RemoteRequestLogAttributesDto extends CommonAttributesDto {
3
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RemoteRequestLogAttributesDto = void 0;
4
+ const common_attributes_dto_1 = require("./common.attributes.dto");
5
+ class RemoteRequestLogAttributesDto extends common_attributes_dto_1.CommonAttributesDto {
6
+ }
7
+ exports.RemoteRequestLogAttributesDto = RemoteRequestLogAttributesDto;
8
+ //# sourceMappingURL=remote.request.log.attributes.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote.request.log.attributes.dto.js","sourceRoot":"","sources":["../../../src/platformUtility/dtos/remote.request.log.attributes.dto.ts"],"names":[],"mappings":";;;AAAA,mEAA8D;AAE9D,MAAa,6BAA8B,SAAQ,2CAAmB;CAAG;AAAzE,sEAAyE"}
@@ -1,2 +1,3 @@
1
1
  export * from './failed.bull.job.entity';
2
2
  export * from './pending.bull.job.entity';
3
+ export * from './remote.request.log.entity';
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./failed.bull.job.entity"), exports);
18
18
  __exportStar(require("./pending.bull.job.entity"), exports);
19
+ __exportStar(require("./remote.request.log.entity"), exports);
19
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AAAA,4DAAyC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AAAA,4DAA0C;AAAA,8DAA2C"}
@@ -0,0 +1,13 @@
1
+ import { CommonEntity } from '../../common/libraries/common.entity';
2
+ import { RemoteRequestLogAttributesDto } from '../dtos/remote.request.log.attributes.dto';
3
+ export declare class RemoteRequestLogEntity extends CommonEntity {
4
+ url: string;
5
+ method: string;
6
+ type: string;
7
+ source_type: string;
8
+ source_id: number;
9
+ request: any;
10
+ response: any;
11
+ success: boolean;
12
+ attributes: RemoteRequestLogAttributesDto;
13
+ }
@@ -0,0 +1,58 @@
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.RemoteRequestLogEntity = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const common_entity_1 = require("../../common/libraries/common.entity");
15
+ const remote_request_log_attributes_dto_1 = require("../dtos/remote.request.log.attributes.dto");
16
+ let RemoteRequestLogEntity = class RemoteRequestLogEntity extends common_entity_1.CommonEntity {
17
+ };
18
+ exports.RemoteRequestLogEntity = RemoteRequestLogEntity;
19
+ __decorate([
20
+ (0, typeorm_1.Column)(),
21
+ __metadata("design:type", String)
22
+ ], RemoteRequestLogEntity.prototype, "url", void 0);
23
+ __decorate([
24
+ (0, typeorm_1.Column)(),
25
+ __metadata("design:type", String)
26
+ ], RemoteRequestLogEntity.prototype, "method", void 0);
27
+ __decorate([
28
+ (0, typeorm_1.Column)(),
29
+ __metadata("design:type", String)
30
+ ], RemoteRequestLogEntity.prototype, "type", void 0);
31
+ __decorate([
32
+ (0, typeorm_1.Column)(),
33
+ __metadata("design:type", String)
34
+ ], RemoteRequestLogEntity.prototype, "source_type", void 0);
35
+ __decorate([
36
+ (0, typeorm_1.Column)(),
37
+ __metadata("design:type", Number)
38
+ ], RemoteRequestLogEntity.prototype, "source_id", void 0);
39
+ __decorate([
40
+ (0, typeorm_1.Column)('json'),
41
+ __metadata("design:type", Object)
42
+ ], RemoteRequestLogEntity.prototype, "request", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.Column)('json'),
45
+ __metadata("design:type", Object)
46
+ ], RemoteRequestLogEntity.prototype, "response", void 0);
47
+ __decorate([
48
+ (0, typeorm_1.Column)(),
49
+ __metadata("design:type", Boolean)
50
+ ], RemoteRequestLogEntity.prototype, "success", void 0);
51
+ __decorate([
52
+ (0, typeorm_1.Column)('json'),
53
+ __metadata("design:type", remote_request_log_attributes_dto_1.RemoteRequestLogAttributesDto)
54
+ ], RemoteRequestLogEntity.prototype, "attributes", void 0);
55
+ exports.RemoteRequestLogEntity = RemoteRequestLogEntity = __decorate([
56
+ (0, typeorm_1.Entity)('utl_remote_request_logs')
57
+ ], RemoteRequestLogEntity);
58
+ //# sourceMappingURL=remote.request.log.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote.request.log.entity.js","sourceRoot":"","sources":["../../../src/platformUtility/entities/remote.request.log.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAyC;AAEzC,wEAAoE;AACpE,iGAA0F;AASnF,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,4BAAY;CA6BvD,CAAA;AA7BY,wDAAsB;AAE/B;IADC,IAAA,gBAAM,GAAE;;mDACG;AAGZ;IADC,IAAA,gBAAM,GAAE;;sDACM;AAGf;IADC,IAAA,gBAAM,GAAE;;oDACI;AAGb;IADC,IAAA,gBAAM,GAAE;;2DACW;AAGpB;IADC,IAAA,gBAAM,GAAE;;yDACS;AAGlB;IADC,IAAA,gBAAM,EAAC,MAAM,CAAC;;uDACF;AAGb;IADC,IAAA,gBAAM,EAAC,MAAM,CAAC;;wDACD;AAGd;IADC,IAAA,gBAAM,GAAE;;uDACQ;AAGjB;IADC,IAAA,gBAAM,EAAC,MAAM,CAAC;8BACH,iEAA6B;0DAAC;iCA1BjC,sBAAsB;IADlC,IAAA,gBAAM,EAAC,yBAAyB,CAAC;GACrB,sBAAsB,CA6BlC"}
@@ -21,11 +21,13 @@ import { SourceColumnDto } from './dtos/source.column.dto';
21
21
  import { StringSearchDto } from './dtos/string.search.dto';
22
22
  import { FailedBullJobEntity } from './entities/failed.bull.job.entity';
23
23
  import { PendingBullJobEntity } from './entities/pending.bull.job.entity';
24
+ import { RemoteRequestLogEntity } from './entities/remote.request.log.entity';
24
25
  import { LoadFailedBullJob } from './jobs/load.failed.bull.job';
25
26
  import { ProcessSesDeliveryWebhookJob } from './jobs/process.ses.delivery.webhook.job';
26
27
  import { ProcessTrackingWebhookJob } from './jobs/process.tracking.webhook.job';
27
28
  import { RecordWatcherJob } from './jobs/record.watcher.job';
28
29
  import { ReloadPendingBullJob } from './jobs/reload.pending.bull.job';
30
+ import { RemoteRequestLogJob } from './jobs/remote.request.log.job';
29
31
  import { TestJob } from './jobs/test.job';
30
32
  import { CommonSqsPolling } from './libraries/common.sqs.polling';
31
33
  import { CreateEntityConstantsFile } from './libraries/create.entity.constants.file';
@@ -65,16 +67,17 @@ import { SqlService } from './services/sql.service';
65
67
  import { SqsService } from './services/sqs.service';
66
68
  import { StartupService } from './services/startup.service';
67
69
  import { BaseSubscriber } from './subscribers/base.subscriber';
70
+ import { RemoteRequestLogSubscriber } from './subscribers/remote.request.log.subscriber';
68
71
  declare const es6Classes: {
69
72
  commands: (typeof MaintenanceCommand | typeof SqsWorkerCommand | typeof SyncClassCommand)[];
70
73
  consumers: (typeof JobConsumer)[];
71
74
  controllers: (typeof BullJobController | typeof QueueController)[];
72
75
  dtos: (typeof SourceColumnDto | typeof AwsConfigDto | typeof JobPayloadDto | typeof QueueOptionsDto | typeof CommonAttributesDto | typeof MailOptionsDto | typeof SmtpConfigDto | typeof RemoteRawResponseDto | typeof FcmResponseDto | typeof KaleyraCallbackPayloadDto | typeof PushNotificationResponseDto | typeof PushNotificationTemplateDto | typeof SetSmsPayloadDto | typeof SmsPayloadDto | typeof StringSearchDto)[];
73
- entities: (typeof FailedBullJobEntity | typeof PendingBullJobEntity)[];
74
- jobs: (typeof TestJob | typeof LoadFailedBullJob | typeof ProcessSesDeliveryWebhookJob | typeof ProcessTrackingWebhookJob | typeof RecordWatcherJob | typeof ReloadPendingBullJob)[];
76
+ entities: (typeof FailedBullJobEntity | typeof PendingBullJobEntity | typeof RemoteRequestLogEntity)[];
77
+ jobs: (typeof TestJob | typeof LoadFailedBullJob | typeof ProcessSesDeliveryWebhookJob | typeof ProcessTrackingWebhookJob | typeof RecordWatcherJob | typeof ReloadPendingBullJob | typeof RemoteRequestLogJob)[];
75
78
  libraries: (typeof ProcessAuditLogData | typeof ProcessCommonMail | typeof ProcessSesMail | typeof ProcessSesRawMail | typeof ProcessSmtpMail | typeof CommonSqsPolling | typeof FileSystemUtility | typeof CreateEs6ClassesFile | typeof CreateEs6JobsFile | typeof CreateEntityConstantsFile | typeof CreateEs6ServiceFile | typeof CreateIndexFile | typeof ProcessKaleyraCallbackResponse | typeof ProcessKaleyraSms | typeof SetSmsMessage)[];
76
79
  middlewares: (typeof MaintenanceMiddleware | typeof TrimPipe)[];
77
80
  services: (typeof CacheService | typeof AwsConfigService | typeof SqlService | typeof LocalPropertyService | typeof SqsService | typeof QueueService | typeof DynamoService | typeof AuditService | typeof MailService | typeof RedisService | typeof MaintenanceService | typeof RemoteRequestService | typeof SesMailNotificationService | typeof AwsSecretService | typeof Es6JobsService | typeof Es6Service | typeof FcmNotificationService | typeof ShutdownService | typeof SmsService | typeof StartupService)[];
78
- subscribers: (typeof BaseSubscriber)[];
81
+ subscribers: (typeof BaseSubscriber | typeof RemoteRequestLogSubscriber)[];
79
82
  };
80
83
  export default es6Classes;
@@ -18,6 +18,7 @@ const push_notification_response_dto_1 = require("./dtos/push.notification.respo
18
18
  const push_notification_template_dto_1 = require("./dtos/push.notification.template.dto");
19
19
  const queue_options_dto_1 = require("./dtos/queue.options.dto");
20
20
  const remote_raw_response_dto_1 = require("./dtos/remote.raw.response.dto");
21
+ const remote_request_log_attributes_dto_1 = require("./dtos/remote.request.log.attributes.dto");
21
22
  const set_sms_payload_dto_1 = require("./dtos/set.sms.payload.dto");
22
23
  const sms_payload_dto_1 = require("./dtos/sms.payload.dto");
23
24
  const smtp_config_dto_1 = require("./dtos/smtp.config.dto");
@@ -25,11 +26,13 @@ const source_column_dto_1 = require("./dtos/source.column.dto");
25
26
  const string_search_dto_1 = require("./dtos/string.search.dto");
26
27
  const failed_bull_job_entity_1 = require("./entities/failed.bull.job.entity");
27
28
  const pending_bull_job_entity_1 = require("./entities/pending.bull.job.entity");
29
+ const remote_request_log_entity_1 = require("./entities/remote.request.log.entity");
28
30
  const load_failed_bull_job_1 = require("./jobs/load.failed.bull.job");
29
31
  const process_ses_delivery_webhook_job_1 = require("./jobs/process.ses.delivery.webhook.job");
30
32
  const process_tracking_webhook_job_1 = require("./jobs/process.tracking.webhook.job");
31
33
  const record_watcher_job_1 = require("./jobs/record.watcher.job");
32
34
  const reload_pending_bull_job_1 = require("./jobs/reload.pending.bull.job");
35
+ const remote_request_log_job_1 = require("./jobs/remote.request.log.job");
33
36
  const test_job_1 = require("./jobs/test.job");
34
37
  const common_sqs_polling_1 = require("./libraries/common.sqs.polling");
35
38
  const create_entity_constants_file_1 = require("./libraries/create.entity.constants.file");
@@ -71,6 +74,7 @@ const sql_service_1 = require("./services/sql.service");
71
74
  const sqs_service_1 = require("./services/sqs.service");
72
75
  const startup_service_1 = require("./services/startup.service");
73
76
  const base_subscriber_1 = require("./subscribers/base.subscriber");
77
+ const remote_request_log_subscriber_1 = require("./subscribers/remote.request.log.subscriber");
74
78
  const es6Classes = {
75
79
  commands: [maintenance_command_1.MaintenanceCommand, sqs_worker_command_1.SqsWorkerCommand, sync_class_command_1.SyncClassCommand],
76
80
  consumers: [job_consumer_1.JobConsumer],
@@ -88,14 +92,23 @@ const es6Classes = {
88
92
  push_notification_template_dto_1.PushNotificationTemplateDto,
89
93
  queue_options_dto_1.QueueOptionsDto,
90
94
  remote_raw_response_dto_1.RemoteRawResponseDto,
95
+ remote_request_log_attributes_dto_1.RemoteRequestLogAttributesDto,
91
96
  set_sms_payload_dto_1.SetSmsPayloadDto,
92
97
  sms_payload_dto_1.SmsPayloadDto,
93
98
  smtp_config_dto_1.SmtpConfigDto,
94
99
  source_column_dto_1.SourceColumnDto,
95
100
  string_search_dto_1.StringSearchDto,
96
101
  ],
97
- entities: [failed_bull_job_entity_1.FailedBullJobEntity, pending_bull_job_entity_1.PendingBullJobEntity],
98
- jobs: [load_failed_bull_job_1.LoadFailedBullJob, process_ses_delivery_webhook_job_1.ProcessSesDeliveryWebhookJob, process_tracking_webhook_job_1.ProcessTrackingWebhookJob, record_watcher_job_1.RecordWatcherJob, reload_pending_bull_job_1.ReloadPendingBullJob, test_job_1.TestJob],
102
+ entities: [failed_bull_job_entity_1.FailedBullJobEntity, pending_bull_job_entity_1.PendingBullJobEntity, remote_request_log_entity_1.RemoteRequestLogEntity],
103
+ jobs: [
104
+ load_failed_bull_job_1.LoadFailedBullJob,
105
+ process_ses_delivery_webhook_job_1.ProcessSesDeliveryWebhookJob,
106
+ process_tracking_webhook_job_1.ProcessTrackingWebhookJob,
107
+ record_watcher_job_1.RecordWatcherJob,
108
+ reload_pending_bull_job_1.ReloadPendingBullJob,
109
+ remote_request_log_job_1.RemoteRequestLogJob,
110
+ test_job_1.TestJob,
111
+ ],
99
112
  libraries: [
100
113
  common_sqs_polling_1.CommonSqsPolling,
101
114
  create_entity_constants_file_1.CreateEntityConstantsFile,
@@ -138,7 +151,7 @@ const es6Classes = {
138
151
  sqs_service_1.SqsService,
139
152
  startup_service_1.StartupService,
140
153
  ],
141
- subscribers: [base_subscriber_1.BaseSubscriber],
154
+ subscribers: [base_subscriber_1.BaseSubscriber, remote_request_log_subscriber_1.RemoteRequestLogSubscriber],
142
155
  };
143
156
  exports.default = es6Classes;
144
157
  //# sourceMappingURL=es6.classes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"es6.classes.js","sourceRoot":"","sources":["../../src/platformUtility/es6.classes.ts"],"names":[],"mappings":";;AAAA,wEAAoE;AACpE,sEAAiE;AACjE,sEAAiE;AACjE,2DAAuD;AACvD,2EAAsE;AACtE,qEAAiE;AACjE,0DAAqD;AACrD,wEAAmE;AACnE,0FAAmF;AACnF,8DAAyD;AACzD,4DAAuD;AACvD,sFAAgF;AAChF,8DAAyD;AACzD,4FAAqF;AACrF,0FAAoF;AACpF,0FAAoF;AACpF,gEAA2D;AAC3D,4EAAsE;AACtE,oEAA8D;AAC9D,4DAAuD;AACvD,4DAAuD;AACvD,gEAA2D;AAC3D,gEAA2D;AAC3D,8EAAwE;AACxE,gFAA0E;AAC1E,sEAAgE;AAChE,8FAAuF;AACvF,sFAAgF;AAChF,kEAA6D;AAC7D,4EAAsE;AACtE,8CAA0C;AAC1C,uEAAkE;AAClE,2FAAqF;AACrF,iFAA2E;AAC3E,2EAAqE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Ae;QACf,uCAAiB;QACjB,4CAAmB;QACnB,uCAAiB;QACjB,8CAAoB;QACpB,gDAAqB;QACrB,kEAA8B;QAC9B,uCAAiB;QACjB,iCAAc;QACd,wCAAiB;QACjB,mCAAe;QACf,+BAAa;KAChB;IACD,WAAW,EAAE,CAAC,8CAAqB,EAAE,oBAAQ,CAAC;IAC9C,QAAQ,EAAE;QACN,4BAAY;QACZ,qCAAgB;QAChB,qCAAgB;QAChB,4BAAY;QACZ,8BAAa;QACb,iCAAc;QACd,wBAAU;QACV,iDAAsB;QACtB,6CAAoB;QACpB,0BAAW;QACX,wCAAkB;QAClB,4BAAY;QACZ,4BAAY;QACZ,6CAAoB;QACpB,0DAA0B;QAC1B,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,wEAAoE;AACpE,sEAAiE;AACjE,sEAAiE;AACjE,2DAAuD;AACvD,2EAAsE;AACtE,qEAAiE;AACjE,0DAAqD;AACrD,wEAAmE;AACnE,0FAAmF;AACnF,8DAAyD;AACzD,4DAAuD;AACvD,sFAAgF;AAChF,8DAAyD;AACzD,4FAAqF;AACrF,0FAAoF;AACpF,0FAAoF;AACpF,gEAA2D;AAC3D,4EAAsE;AACtE,gGAAyF;AACzF,oEAA8D;AAC9D,4DAAuD;AACvD,4DAAuD;AACvD,gEAA2D;AAC3D,gEAA2D;AAC3D,8EAAwE;AACxE,gFAA0E;AAC1E,oFAA8E;AAC9E,sEAAgE;AAChE,8FAAuF;AACvF,sFAAgF;AAChF,kEAA6D;AAC7D,4EAAsE;AACtE,0EAAoE;AACpE,8CAA0C;AAC1C,uEAAkE;AAClE,2FAAqF;AACrF,iFAA2E;AAC3E,2EAAqE;AACrE,iFAA2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CAAoB;QACpB,wCAAiB;QACjB,8CAAoB;QACpB,mCAAe;QACf,uCAAiB;QACjB,4CAAmB;QACnB,uCAAiB;QACjB,8CAAoB;QACpB,gDAAqB;QACrB,kEAA8B;QAC9B,uCAAiB;QACjB,iCAAc;QACd,wCAAiB;QACjB,mCAAe;QACf,+BAAa;KAChB;IACD,WAAW,EAAE,CAAC,8CAAqB,EAAE,oBAAQ,CAAC;IAC9C,QAAQ,EAAE;QACN,4BAAY;QACZ,qCAAgB;QAChB,qCAAgB;QAChB,4BAAY;QACZ,8BAAa;QACb,iCAAc;QACd,wBAAU;QACV,iDAAsB;QACtB,6CAAoB;QACpB,0BAAW;QACX,wCAAkB;QAClB,4BAAY;QACZ,4BAAY;QACZ,6CAAoB;QACpB,0DAA0B;QAC1B,kCAAe;QACf,wBAAU;QACV,wBAAU;QACV,wBAAU;QACV,gCAAc;KACjB;IACD,WAAW,EAAE,CAAC,gCAAc,EAAE,0DAA0B,CAAC;CAC5D,CAAC;AAEF,kBAAe,UAAU,CAAC"}
@@ -3,4 +3,5 @@ export * from './process.ses.delivery.webhook.job';
3
3
  export * from './process.tracking.webhook.job';
4
4
  export * from './record.watcher.job';
5
5
  export * from './reload.pending.bull.job';
6
+ export * from './remote.request.log.job';
6
7
  export * from './test.job';
@@ -19,5 +19,6 @@ __exportStar(require("./process.ses.delivery.webhook.job"), exports);
19
19
  __exportStar(require("./process.tracking.webhook.job"), exports);
20
20
  __exportStar(require("./record.watcher.job"), exports);
21
21
  __exportStar(require("./reload.pending.bull.job"), exports);
22
+ __exportStar(require("./remote.request.log.job"), exports);
22
23
  __exportStar(require("./test.job"), exports);
23
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/jobs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AAAA,qEAAmD;AAAA,iEAA+C;AAAA,uDAAqC;AAAA,4DAA0C;AAAA,6CAA0B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/jobs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AAAA,qEAAmD;AAAA,iEAA+C;AAAA,uDAAqC;AAAA,4DAA0C;AAAA,2DAAyC;AAAA,6CAA0B"}
@@ -0,0 +1,9 @@
1
+ import { DatabaseEventDto } from '../../common/dtos/database.event.dto';
2
+ import { CommonJob } from '../../common/libraries/common.job';
3
+ import { RemoteRequestLogEntity } from '../entities/remote.request.log.entity';
4
+ import { QueueService } from '../services/queue.service';
5
+ export declare class RemoteRequestLogJob extends CommonJob {
6
+ protected readonly queueService: QueueService;
7
+ constructor(queueService: QueueService);
8
+ handle(evt: DatabaseEventDto<RemoteRequestLogEntity>): Promise<RemoteRequestLogEntity>;
9
+ }
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.RemoteRequestLogJob = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const common_job_1 = require("../../common/libraries/common.job");
15
+ const queue_service_1 = require("../services/queue.service");
16
+ let RemoteRequestLogJob = class RemoteRequestLogJob extends common_job_1.CommonJob {
17
+ constructor(queueService) {
18
+ super('b00707a36583a5f7078a30ce50932f42');
19
+ this.queueService = queueService;
20
+ }
21
+ async handle(evt) {
22
+ return evt.entity;
23
+ }
24
+ };
25
+ exports.RemoteRequestLogJob = RemoteRequestLogJob;
26
+ exports.RemoteRequestLogJob = RemoteRequestLogJob = __decorate([
27
+ (0, common_1.Injectable)(),
28
+ __metadata("design:paramtypes", [queue_service_1.QueueService])
29
+ ], RemoteRequestLogJob);
30
+ //# sourceMappingURL=remote.request.log.job.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote.request.log.job.js","sourceRoot":"","sources":["../../../src/platformUtility/jobs/remote.request.log.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,kEAA8D;AAE9D,6DAAyD;AAGlD,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,sBAAS;IAC9C,YAA+B,YAA0B;QACrD,KAAK,CAAC,kCAAkC,CAAC,CAAC;QADf,iBAAY,GAAZ,YAAY,CAAc;IAEzD,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,GAA6C;QACtD,OAAO,GAAG,CAAC,MAAM,CAAC;IACtB,CAAC;CACJ,CAAA;AAPY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;qCAEoC,4BAAY;GADhD,mBAAmB,CAO/B"}
@@ -3,6 +3,7 @@ import { ProcessSesDeliveryWebhookJob } from '../jobs/process.ses.delivery.webho
3
3
  import { ProcessTrackingWebhookJob } from '../jobs/process.tracking.webhook.job';
4
4
  import { RecordWatcherJob } from '../jobs/record.watcher.job';
5
5
  import { ReloadPendingBullJob } from '../jobs/reload.pending.bull.job';
6
+ import { RemoteRequestLogJob } from '../jobs/remote.request.log.job';
6
7
  import { TestJob } from '../jobs/test.job';
7
8
  export declare class Es6JobsService {
8
9
  private readonly loadFailedBullJob;
@@ -10,9 +11,10 @@ export declare class Es6JobsService {
10
11
  private readonly processTrackingWebhookJob;
11
12
  private readonly recordWatcherJob;
12
13
  private readonly reloadPendingBullJob;
14
+ private readonly remoteRequestLogJob;
13
15
  private readonly testJob;
14
16
  private jobs;
15
- constructor(loadFailedBullJob: LoadFailedBullJob, processSesDeliveryWebhookJob: ProcessSesDeliveryWebhookJob, processTrackingWebhookJob: ProcessTrackingWebhookJob, recordWatcherJob: RecordWatcherJob, reloadPendingBullJob: ReloadPendingBullJob, testJob: TestJob);
17
+ constructor(loadFailedBullJob: LoadFailedBullJob, processSesDeliveryWebhookJob: ProcessSesDeliveryWebhookJob, processTrackingWebhookJob: ProcessTrackingWebhookJob, recordWatcherJob: RecordWatcherJob, reloadPendingBullJob: ReloadPendingBullJob, remoteRequestLogJob: RemoteRequestLogJob, testJob: TestJob);
16
18
  alignJobs(): void;
17
19
  setJobs(): void;
18
20
  }
@@ -16,15 +16,17 @@ const process_ses_delivery_webhook_job_1 = require("../jobs/process.ses.delivery
16
16
  const process_tracking_webhook_job_1 = require("../jobs/process.tracking.webhook.job");
17
17
  const record_watcher_job_1 = require("../jobs/record.watcher.job");
18
18
  const reload_pending_bull_job_1 = require("../jobs/reload.pending.bull.job");
19
+ const remote_request_log_job_1 = require("../jobs/remote.request.log.job");
19
20
  const test_job_1 = require("../jobs/test.job");
20
21
  const platform_utility_1 = require("../../common/libraries/platform.utility");
21
22
  let Es6JobsService = class Es6JobsService {
22
- constructor(loadFailedBullJob, processSesDeliveryWebhookJob, processTrackingWebhookJob, recordWatcherJob, reloadPendingBullJob, testJob) {
23
+ constructor(loadFailedBullJob, processSesDeliveryWebhookJob, processTrackingWebhookJob, recordWatcherJob, reloadPendingBullJob, remoteRequestLogJob, testJob) {
23
24
  this.loadFailedBullJob = loadFailedBullJob;
24
25
  this.processSesDeliveryWebhookJob = processSesDeliveryWebhookJob;
25
26
  this.processTrackingWebhookJob = processTrackingWebhookJob;
26
27
  this.recordWatcherJob = recordWatcherJob;
27
28
  this.reloadPendingBullJob = reloadPendingBullJob;
29
+ this.remoteRequestLogJob = remoteRequestLogJob;
28
30
  this.testJob = testJob;
29
31
  this.jobs = {};
30
32
  this.alignJobs();
@@ -37,6 +39,7 @@ let Es6JobsService = class Es6JobsService {
37
39
  fd9a3406400161c9dae9f327f10eaa49: this.processTrackingWebhookJob,
38
40
  '2d5219897af8f7809c63c7ad538795f2': this.recordWatcherJob,
39
41
  '2585362654581cff4f70fffe0249af26': this.reloadPendingBullJob,
42
+ b00707a36583a5f7078a30ce50932f42: this.remoteRequestLogJob,
40
43
  ba4c3857dfa9feac842416d9c39d0edd: this.testJob,
41
44
  };
42
45
  }
@@ -52,6 +55,7 @@ exports.Es6JobsService = Es6JobsService = __decorate([
52
55
  process_tracking_webhook_job_1.ProcessTrackingWebhookJob,
53
56
  record_watcher_job_1.RecordWatcherJob,
54
57
  reload_pending_bull_job_1.ReloadPendingBullJob,
58
+ remote_request_log_job_1.RemoteRequestLogJob,
55
59
  test_job_1.TestJob])
56
60
  ], Es6JobsService);
57
61
  //# sourceMappingURL=es6.jobs.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"es6.jobs.service.js","sourceRoot":"","sources":["../../../src/platformUtility/services/es6.jobs.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,uEAAiE;AACjE,+FAAwF;AACxF,uFAAiF;AACjF,mEAA8D;AAC9D,6EAAuE;AACvE,+CAA2C;AAC3C,8EAA0E;AAQnE,IAAM,cAAc,GAApB,MAAM,cAAc;IAGvB,YACqB,iBAAoC,EACpC,4BAA0D,EAC1D,yBAAoD,EACpD,gBAAkC,EAClC,oBAA0C,EAC1C,OAAgB;QALhB,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,iCAA4B,GAA5B,4BAA4B,CAA8B;QAC1D,8BAAyB,GAAzB,yBAAyB,CAA2B;QACpD,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,yBAAoB,GAApB,oBAAoB,CAAsB;QAC1C,YAAO,GAAP,OAAO,CAAS;QAR7B,SAAI,GAAG,EAAE,CAAC;QAUd,IAAI,CAAC,SAAS,EAAE,CAAC;QACjB,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAMD,SAAS;QACL,IAAI,CAAC,IAAI,GAAG;YACR,gCAAgC,EAAE,IAAI,CAAC,iBAAiB;YACxD,kCAAkC,EAAE,IAAI,CAAC,4BAA4B;YACrE,gCAAgC,EAAE,IAAI,CAAC,yBAAyB;YAChE,kCAAkC,EAAE,IAAI,CAAC,gBAAgB;YACzD,kCAAkC,EAAE,IAAI,CAAC,oBAAoB;YAC7D,gCAAgC,EAAE,IAAI,CAAC,OAAO;SACjD,CAAC;IACN,CAAC;IAMD,OAAO;QACH,kCAAe,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;CACJ,CAAA;AArCY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,GAAE;qCAK+B,wCAAiB;QACN,+DAA4B;QAC/B,wDAAyB;QAClC,qCAAgB;QACZ,8CAAoB;QACjC,kBAAO;GAT5B,cAAc,CAqC1B"}
1
+ {"version":3,"file":"es6.jobs.service.js","sourceRoot":"","sources":["../../../src/platformUtility/services/es6.jobs.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,uEAAiE;AACjE,+FAAwF;AACxF,uFAAiF;AACjF,mEAA8D;AAC9D,6EAAuE;AACvE,2EAAqE;AACrE,+CAA2C;AAC3C,8EAA0E;AAQnE,IAAM,cAAc,GAApB,MAAM,cAAc;IAGvB,YACqB,iBAAoC,EACpC,4BAA0D,EAC1D,yBAAoD,EACpD,gBAAkC,EAClC,oBAA0C,EAC1C,mBAAwC,EACxC,OAAgB;QANhB,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,iCAA4B,GAA5B,4BAA4B,CAA8B;QAC1D,8BAAyB,GAAzB,yBAAyB,CAA2B;QACpD,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,yBAAoB,GAApB,oBAAoB,CAAsB;QAC1C,wBAAmB,GAAnB,mBAAmB,CAAqB;QACxC,YAAO,GAAP,OAAO,CAAS;QAT7B,SAAI,GAAG,EAAE,CAAC;QAWd,IAAI,CAAC,SAAS,EAAE,CAAC;QACjB,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAMD,SAAS;QACL,IAAI,CAAC,IAAI,GAAG;YACR,gCAAgC,EAAE,IAAI,CAAC,iBAAiB;YACxD,kCAAkC,EAAE,IAAI,CAAC,4BAA4B;YACrE,gCAAgC,EAAE,IAAI,CAAC,yBAAyB;YAChE,kCAAkC,EAAE,IAAI,CAAC,gBAAgB;YACzD,kCAAkC,EAAE,IAAI,CAAC,oBAAoB;YAC7D,gCAAgC,EAAE,IAAI,CAAC,mBAAmB;YAC1D,gCAAgC,EAAE,IAAI,CAAC,OAAO;SACjD,CAAC;IACN,CAAC;IAMD,OAAO;QACH,kCAAe,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;CACJ,CAAA;AAvCY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,GAAE;qCAK+B,wCAAiB;QACN,+DAA4B;QAC/B,wDAAyB;QAClC,qCAAgB;QACZ,8CAAoB;QACrB,4CAAmB;QAC/B,kBAAO;GAV5B,cAAc,CAuC1B"}
@@ -1,11 +1,15 @@
1
+ import { AxiosRequestConfig } from 'axios';
2
+ import { CommonService } from '../../common/libraries/common.service';
1
3
  import { PropertyService } from '../../system/services/property.service';
2
4
  import { RemoteRawResponseDto } from '../dtos/remote.raw.response.dto';
3
- import { CommonService } from '../../common/libraries/common.service';
5
+ import { RemoteRequestLogEntity } from '../entities/remote.request.log.entity';
6
+ import { RemoteRequestConfigDto } from '../dtos/remote.request.config.dto';
4
7
  export declare class RemoteRequestService extends CommonService {
5
8
  private readonly propertyService;
6
9
  protected publicExposed: boolean;
7
10
  constructor(propertyService: PropertyService);
8
- sendThroughAxios(options: any): Promise<any>;
9
- getRawResponse(options: any): Promise<RemoteRawResponseDto>;
10
- getProxyResponse(data: any): Promise<any>;
11
+ sendThroughAxios(options: any, source?: RemoteRequestConfigDto): Promise<any>;
12
+ getRawResponse(options: AxiosRequestConfig, source?: RemoteRequestConfigDto): Promise<RemoteRawResponseDto>;
13
+ getProxyResponse(data: any, source?: RemoteRequestConfigDto): Promise<any>;
14
+ saveLog(options: any, data: RemoteRawResponseDto, source: RemoteRequestConfigDto): Promise<RemoteRequestLogEntity>;
11
15
  }
@@ -13,16 +13,17 @@ exports.RemoteRequestService = void 0;
13
13
  const common_1 = require("@nestjs/common");
14
14
  const axios_1 = require("axios");
15
15
  const operation_exception_1 = require("../../common/exceptions/operation.exception");
16
- const property_service_1 = require("../../system/services/property.service");
17
16
  const common_service_1 = require("../../common/libraries/common.service");
17
+ const property_service_1 = require("../../system/services/property.service");
18
+ const remote_request_log_entity_1 = require("../entities/remote.request.log.entity");
18
19
  let RemoteRequestService = class RemoteRequestService extends common_service_1.CommonService {
19
20
  constructor(propertyService) {
20
21
  super();
21
22
  this.propertyService = propertyService;
22
23
  this.publicExposed = true;
23
24
  }
24
- async sendThroughAxios(options) {
25
- return new Promise((resolve, reject) => {
25
+ async sendThroughAxios(options, source) {
26
+ const data = await new Promise((resolve, reject) => {
26
27
  (0, axios_1.default)(options)
27
28
  .then((response) => {
28
29
  resolve(response?.data);
@@ -31,9 +32,12 @@ let RemoteRequestService = class RemoteRequestService extends common_service_1.C
31
32
  reject(error);
32
33
  });
33
34
  });
35
+ if (source)
36
+ await this.saveLog(options, data, source);
37
+ return data;
34
38
  }
35
- async getRawResponse(options) {
36
- return new Promise((resolve, reject) => {
39
+ async getRawResponse(options, source) {
40
+ const data = await new Promise((resolve, reject) => {
37
41
  (0, axios_1.default)(options)
38
42
  .then((response) => {
39
43
  resolve({ success: true, data: response?.data, status: response?.status, headers: response?.headers });
@@ -42,8 +46,11 @@ let RemoteRequestService = class RemoteRequestService extends common_service_1.C
42
46
  resolve({ success: false, data: error?.response?.data, status: error?.response?.status, headers: error?.response?.headers });
43
47
  });
44
48
  });
49
+ if (source)
50
+ await this.saveLog(options, data, source);
51
+ return data;
45
52
  }
46
- async getProxyResponse(data) {
53
+ async getProxyResponse(data, source) {
47
54
  const url = await this.propertyService.get('proxy.server.url');
48
55
  if (!url)
49
56
  throw new operation_exception_1.OperationException(`Proxy server url is not set`);
@@ -52,7 +59,17 @@ let RemoteRequestService = class RemoteRequestService extends common_service_1.C
52
59
  url,
53
60
  data,
54
61
  };
55
- return this.sendThroughAxios(options);
62
+ return this.sendThroughAxios(options, source);
63
+ }
64
+ async saveLog(options, data, source) {
65
+ const log = remote_request_log_entity_1.RemoteRequestLogEntity.create({ source_id: source.source_id, source_type: source.source_type });
66
+ log.url = options?.url;
67
+ log.method = options?.method;
68
+ log.request = options;
69
+ log.response = data;
70
+ log.type = source?.type || 'raw';
71
+ log.success = !!data?.success;
72
+ return log.save();
56
73
  }
57
74
  };
58
75
  exports.RemoteRequestService = RemoteRequestService;
@@ -1 +1 @@
1
- {"version":3,"file":"remote.request.service.js","sourceRoot":"","sources":["../../../src/platformUtility/services/remote.request.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,iCAA0B;AAC1B,qFAAiF;AACjF,6EAAyE;AAEzE,0EAAsE;AAQ/D,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,8BAAa;IAGnD,YAA6B,eAAgC;QACzD,KAAK,EAAE,CAAC;QADiB,oBAAe,GAAf,eAAe,CAAiB;QAFnD,kBAAa,GAAG,IAAI,CAAC;IAI/B,CAAC;IAQD,KAAK,CAAC,gBAAgB,CAAC,OAAY;QAC/B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACnC,IAAA,eAAK,EAAC,OAAO,CAAC;iBACT,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACf,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;YAC5B,CAAC,CAAC;iBACD,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;gBACb,MAAM,CAAC,KA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":3,"file":"remote.request.service.js","sourceRoot":"","sources":["../../../src/platformUtility/services/remote.request.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,iCAAkD;AAClD,qFAAiF;AACjF,0EAAsE;AACtE,6EAAyE;AAGzE,qFAA+E;AASxE,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,8BAAa;IAGnD,YAA6B,eAAgC;QACzD,KAAK,EAAE,CAAC;QADiB,oBAAe,GAAf,eAAe,CAAiB;QAFnD,kBAAa,GAAG,IAAI,CAAC;IAI/B,CAAC;IAQD,KAAK,CAAC,gBAAgB,CAAC,OAAY,EAAE,MAA+B;QAChE,MAAM,IAAI,GAAG,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC/C,IAAA,eAAK,EAAC,OAAO,CAAC;iBACT,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACf,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;YAC5B,CAAC,CAAC;iBACD,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;gBACb,MAAM,CAAC,KAAK,CAAC,CAAC;YAClB,CAAC,CAAC,CAAC;QACX,CAAC,CAAC,CAAC;QAEH,IAAI,MAAM;YAAE,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,IAAW,EAAE,MAAM,CAAC,CAAC;QAC7D,OAAO,IAAI,CAAC;IAChB,CAAC;IAQD,KAAK,CAAC,cAAc,CAAC,OAA2B,EAAE,MAA+B;QAC7E,MAAM,IAAI,GAAyB,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrE,IAAA,eAAK,EAAC,OAAO,CAAC;iBACT,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACf,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,M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G,OAAO,CAAC;QACtB,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC;QACpB,GAAG,CAAC,IAAI,GAAG,MAAM,EAAE,IAAI,IAAI,KAAK,CAAC;QACjC,GAAG,CAAC,OAAO,GAAG,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC;QAE9B,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC;IACtB,CAAC;CACJ,CAAA;AAjFY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAIqC,kCAAe;GAHpD,oBAAoB,CAiFhC"}
@@ -1 +1,2 @@
1
1
  export * from './base.subscriber';
2
+ export * from './remote.request.log.subscriber';
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./base.subscriber"), exports);
18
+ __exportStar(require("./remote.request.log.subscriber"), exports);
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/subscribers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/subscribers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAAA,kEAA+C"}
@@ -0,0 +1,10 @@
1
+ import { DataSource } from 'typeorm';
2
+ import { CommonSubscriber } from '../../common/libraries/common.subscriber';
3
+ import { RemoteRequestLogEntity } from '../entities/remote.request.log.entity';
4
+ import { RemoteRequestLogJob } from '../jobs/remote.request.log.job';
5
+ export declare class RemoteRequestLogSubscriber extends CommonSubscriber<RemoteRequestLogEntity> {
6
+ private readonly dataSource;
7
+ protected readonly entityJob: RemoteRequestLogJob;
8
+ constructor(dataSource: DataSource, entityJob: RemoteRequestLogJob);
9
+ listenTo(): typeof RemoteRequestLogEntity;
10
+ }
@@ -0,0 +1,34 @@
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.RemoteRequestLogSubscriber = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const common_subscriber_1 = require("../../common/libraries/common.subscriber");
15
+ const remote_request_log_entity_1 = require("../entities/remote.request.log.entity");
16
+ const remote_request_log_job_1 = require("../jobs/remote.request.log.job");
17
+ let RemoteRequestLogSubscriber = class RemoteRequestLogSubscriber extends common_subscriber_1.CommonSubscriber {
18
+ constructor(dataSource, entityJob) {
19
+ super();
20
+ this.dataSource = dataSource;
21
+ this.entityJob = entityJob;
22
+ dataSource.subscribers.push(this);
23
+ }
24
+ listenTo() {
25
+ return remote_request_log_entity_1.RemoteRequestLogEntity;
26
+ }
27
+ };
28
+ exports.RemoteRequestLogSubscriber = RemoteRequestLogSubscriber;
29
+ exports.RemoteRequestLogSubscriber = RemoteRequestLogSubscriber = __decorate([
30
+ (0, typeorm_1.EventSubscriber)(),
31
+ __metadata("design:paramtypes", [typeorm_1.DataSource,
32
+ remote_request_log_job_1.RemoteRequestLogJob])
33
+ ], RemoteRequestLogSubscriber);
34
+ //# sourceMappingURL=remote.request.log.subscriber.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote.request.log.subscriber.js","sourceRoot":"","sources":["../../../src/platformUtility/subscribers/remote.request.log.subscriber.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAsD;AACtD,gFAA4E;AAC5E,qFAA+E;AAC/E,2EAAqE;AAG9D,IAAM,0BAA0B,GAAhC,MAAM,0BAA2B,SAAQ,oCAAwC;IACpF,YACqB,UAAsB,EACpB,SAA8B;QAEjD,KAAK,EAAE,CAAC;QAHS,eAAU,GAAV,UAAU,CAAY;QACpB,cAAS,GAAT,SAAS,CAAqB;QAGjD,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IACD,QAAQ;QACJ,OAAO,kDAAsB,CAAC;IAClC,CAAC;CACJ,CAAA;AAXY,gEAA0B;qCAA1B,0BAA0B;IADtC,IAAA,yBAAe,GAAE;qCAGmB,oBAAU;QACT,4CAAmB;GAH5C,0BAA0B,CAWtC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servicelabsco/nestjs-utility-services",
3
- "version": "1.2.150",
3
+ "version": "1.2.151",
4
4
  "description": "NestJS generic packages to support development",
5
5
  "author": "Hemant Kumar Sah <hemantanshu@gmail.com>",
6
6
  "license": "MIT",