@servicelabsco/slabs-access-manager 0.1.170 → 0.1.171

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 (88) hide show
  1. package/dist/access/controllers/business.webhook.controller.d.ts +13 -0
  2. package/dist/access/controllers/business.webhook.controller.js +81 -0
  3. package/dist/access/controllers/business.webhook.controller.js.map +1 -0
  4. package/dist/access/controllers/index.d.ts +1 -0
  5. package/dist/access/controllers/index.js +1 -0
  6. package/dist/access/controllers/index.js.map +1 -1
  7. package/dist/access/dtos/add.webhook.dto.d.ts +5 -0
  8. package/dist/access/dtos/add.webhook.dto.js +36 -0
  9. package/dist/access/dtos/add.webhook.dto.js.map +1 -0
  10. package/dist/access/dtos/business.webhook.attributes.dto.d.ts +3 -0
  11. package/dist/access/dtos/business.webhook.attributes.dto.js +8 -0
  12. package/dist/access/dtos/business.webhook.attributes.dto.js.map +1 -0
  13. package/dist/access/dtos/index.d.ts +5 -0
  14. package/dist/access/dtos/index.js +5 -0
  15. package/dist/access/dtos/index.js.map +1 -1
  16. package/dist/access/dtos/send.webhook.request.payload.d.ts +4 -0
  17. package/dist/access/dtos/send.webhook.request.payload.js +7 -0
  18. package/dist/access/dtos/send.webhook.request.payload.js.map +1 -0
  19. package/dist/access/dtos/webhook.event.attributes.dto.d.ts +3 -0
  20. package/dist/access/dtos/webhook.event.attributes.dto.js +8 -0
  21. package/dist/access/dtos/webhook.event.attributes.dto.js.map +1 -0
  22. package/dist/access/dtos/webhook.log.attributes.dto.d.ts +3 -0
  23. package/dist/access/dtos/webhook.log.attributes.dto.js +8 -0
  24. package/dist/access/dtos/webhook.log.attributes.dto.js.map +1 -0
  25. package/dist/access/entities/business.webhook.entity.d.ts +12 -0
  26. package/dist/access/entities/business.webhook.entity.js +52 -0
  27. package/dist/access/entities/business.webhook.entity.js.map +1 -0
  28. package/dist/access/entities/index.d.ts +3 -0
  29. package/dist/access/entities/index.js +3 -0
  30. package/dist/access/entities/index.js.map +1 -1
  31. package/dist/access/entities/webhook.event.entity.d.ts +9 -0
  32. package/dist/access/entities/webhook.event.entity.js +42 -0
  33. package/dist/access/entities/webhook.event.entity.js.map +1 -0
  34. package/dist/access/entities/webhook.log.entity.d.ts +16 -0
  35. package/dist/access/entities/webhook.log.entity.js +66 -0
  36. package/dist/access/entities/webhook.log.entity.js.map +1 -0
  37. package/dist/access/es6.classes.d.ts +18 -6
  38. package/dist/access/es6.classes.js +32 -0
  39. package/dist/access/es6.classes.js.map +1 -1
  40. package/dist/access/jobs/business.webhook.job.d.ts +7 -0
  41. package/dist/access/jobs/business.webhook.job.js +29 -0
  42. package/dist/access/jobs/business.webhook.job.js.map +1 -0
  43. package/dist/access/jobs/index.d.ts +3 -0
  44. package/dist/access/jobs/index.js +3 -0
  45. package/dist/access/jobs/index.js.map +1 -1
  46. package/dist/access/jobs/webhook.event.job.d.ts +7 -0
  47. package/dist/access/jobs/webhook.event.job.js +29 -0
  48. package/dist/access/jobs/webhook.event.job.js.map +1 -0
  49. package/dist/access/jobs/webhook.log.job.d.ts +7 -0
  50. package/dist/access/jobs/webhook.log.job.js +29 -0
  51. package/dist/access/jobs/webhook.log.job.js.map +1 -0
  52. package/dist/access/libraries/index.d.ts +1 -0
  53. package/dist/access/libraries/index.js +1 -0
  54. package/dist/access/libraries/index.js.map +1 -1
  55. package/dist/access/libraries/send.webhook.request.d.ts +20 -0
  56. package/dist/access/libraries/send.webhook.request.js +71 -0
  57. package/dist/access/libraries/send.webhook.request.js.map +1 -0
  58. package/dist/access/services/es6.jobs.service.d.ts +7 -1
  59. package/dist/access/services/es6.jobs.service.js +13 -1
  60. package/dist/access/services/es6.jobs.service.js.map +1 -1
  61. package/dist/access/services/webhook.service.d.ts +5 -2
  62. package/dist/access/services/webhook.service.js +12 -2
  63. package/dist/access/services/webhook.service.js.map +1 -1
  64. package/dist/access/subscribers/business.webhook.subscriber.d.ts +10 -0
  65. package/dist/access/subscribers/business.webhook.subscriber.js +34 -0
  66. package/dist/access/subscribers/business.webhook.subscriber.js.map +1 -0
  67. package/dist/access/subscribers/index.d.ts +3 -0
  68. package/dist/access/subscribers/index.js +3 -0
  69. package/dist/access/subscribers/index.js.map +1 -1
  70. package/dist/access/subscribers/webhook.event.subscriber.d.ts +10 -0
  71. package/dist/access/subscribers/webhook.event.subscriber.js +34 -0
  72. package/dist/access/subscribers/webhook.event.subscriber.js.map +1 -0
  73. package/dist/access/subscribers/webhook.log.subscriber.d.ts +10 -0
  74. package/dist/access/subscribers/webhook.log.subscriber.js +34 -0
  75. package/dist/access/subscribers/webhook.log.subscriber.js.map +1 -0
  76. package/dist/config/entity.constants.d.ts +6 -0
  77. package/dist/config/entity.constants.js +6 -0
  78. package/dist/config/entity.constants.js.map +1 -1
  79. package/dist/migrations/1725422481585-CreateBusinessWebhookTable.d.ts +5 -0
  80. package/dist/migrations/1725422481585-CreateBusinessWebhookTable.js +22 -0
  81. package/dist/migrations/1725422481585-CreateBusinessWebhookTable.js.map +1 -0
  82. package/dist/migrations/1725428002811-CreateWebhookEventTable.d.ts +5 -0
  83. package/dist/migrations/1725428002811-CreateWebhookEventTable.js +21 -0
  84. package/dist/migrations/1725428002811-CreateWebhookEventTable.js.map +1 -0
  85. package/dist/migrations/1725428278040-CreateWebhookLogTable.d.ts +5 -0
  86. package/dist/migrations/1725428278040-CreateWebhookLogTable.js +24 -0
  87. package/dist/migrations/1725428278040-CreateWebhookLogTable.js.map +1 -0
  88. package/package.json +1 -1
@@ -0,0 +1,13 @@
1
+ import { SqlService, StringSearchDto } from '@servicelabsco/nestjs-utility-services';
2
+ import { AddWebhookDto } from '../dtos/add.webhook.dto';
3
+ import { BusinessParamDto } from '../dtos/business.param.dto';
4
+ import { BusinessWebhookEntity } from '../entities/business.webhook.entity';
5
+ import { AccessBusinessService } from '../services/access.business.service';
6
+ export declare class BusinessWebhookController {
7
+ private readonly accessBusinessService;
8
+ private readonly sqlService;
9
+ constructor(accessBusinessService: AccessBusinessService, sqlService: SqlService);
10
+ find(body: StringSearchDto): Promise<any>;
11
+ show(params: BusinessParamDto): Promise<BusinessWebhookEntity>;
12
+ create(body: AddWebhookDto): Promise<BusinessWebhookEntity>;
13
+ }
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.BusinessWebhookController = void 0;
16
+ const common_1 = require("@nestjs/common");
17
+ const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
18
+ const add_webhook_dto_1 = require("../dtos/add.webhook.dto");
19
+ const business_param_dto_1 = require("../dtos/business.param.dto");
20
+ const business_webhook_entity_1 = require("../entities/business.webhook.entity");
21
+ const process_db_find_1 = require("../libraries/process.db.find");
22
+ const access_business_service_1 = require("../services/access.business.service");
23
+ let BusinessWebhookController = class BusinessWebhookController {
24
+ constructor(accessBusinessService, sqlService) {
25
+ this.accessBusinessService = accessBusinessService;
26
+ this.sqlService = sqlService;
27
+ }
28
+ async find(body) {
29
+ await this.accessBusinessService.validateAccess();
30
+ const config = {
31
+ tableName: 'utl_webhook_events a',
32
+ primaryCondition: `a.deleted_at is null`,
33
+ searchCompareKeys: ['a.name'],
34
+ columns: ['a.*'],
35
+ order: `a.name asc`,
36
+ idsCompareKey: 'a.id',
37
+ ...body,
38
+ };
39
+ return new process_db_find_1.ProcessDbFind(this.sqlService).process(config);
40
+ }
41
+ async show(params) {
42
+ const business = await this.accessBusinessService.validateAccess();
43
+ return business_webhook_entity_1.BusinessWebhookEntity.findOne({ where: { id: params.id, business_id: business.id } });
44
+ }
45
+ async create(body) {
46
+ const business = await this.accessBusinessService.validateAccess();
47
+ const wh = await business_webhook_entity_1.BusinessWebhookEntity.firstOrCreate({ business_id: business.id });
48
+ wh.active = true;
49
+ wh.url = body.url;
50
+ wh.event_type = JSON.stringify(body.events);
51
+ return wh.save();
52
+ }
53
+ };
54
+ exports.BusinessWebhookController = BusinessWebhookController;
55
+ __decorate([
56
+ (0, common_1.Post)('find-event'),
57
+ __param(0, (0, common_1.Body)()),
58
+ __metadata("design:type", Function),
59
+ __metadata("design:paramtypes", [nestjs_utility_services_1.StringSearchDto]),
60
+ __metadata("design:returntype", Promise)
61
+ ], BusinessWebhookController.prototype, "find", null);
62
+ __decorate([
63
+ (0, common_1.Get)('detail'),
64
+ __param(0, (0, common_1.Param)()),
65
+ __metadata("design:type", Function),
66
+ __metadata("design:paramtypes", [business_param_dto_1.BusinessParamDto]),
67
+ __metadata("design:returntype", Promise)
68
+ ], BusinessWebhookController.prototype, "show", null);
69
+ __decorate([
70
+ (0, common_1.Post)(),
71
+ __param(0, (0, common_1.Body)()),
72
+ __metadata("design:type", Function),
73
+ __metadata("design:paramtypes", [add_webhook_dto_1.AddWebhookDto]),
74
+ __metadata("design:returntype", Promise)
75
+ ], BusinessWebhookController.prototype, "create", null);
76
+ exports.BusinessWebhookController = BusinessWebhookController = __decorate([
77
+ (0, common_1.Controller)('api/b/webhook'),
78
+ __metadata("design:paramtypes", [access_business_service_1.AccessBusinessService,
79
+ nestjs_utility_services_1.SqlService])
80
+ ], BusinessWebhookController);
81
+ //# sourceMappingURL=business.webhook.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"business.webhook.controller.js","sourceRoot":"","sources":["../../../src/access/controllers/business.webhook.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoE;AACpE,oFAAqF;AACrF,6DAAwD;AACxD,mEAA8D;AAE9D,iFAA4E;AAC5E,kEAA6D;AAC7D,iFAA4E;AAQrE,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IAClC,YACqB,qBAA4C,EAC5C,UAAsB;QADtB,0BAAqB,GAArB,qBAAqB,CAAuB;QAC5C,eAAU,GAAV,UAAU,CAAY;IACxC,CAAC;IAGE,AAAN,KAAK,CAAC,IAAI,CAAS,IAAqB;QACpC,MAAM,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,CAAC;QAElD,MAAM,MAAM,GAAqB;YAC7B,SAAS,EAAE,sBAAsB;YACjC,gBAAgB,EAAE,sBAAsB;YACxC,iBAAiB,EAAE,CAAC,QAAQ,CAAC;YAC7B,OAAO,EAAE,CAAC,KAAK,CAAC;YAChB,KAAK,EAAE,YAAY;YACnB,aAAa,EAAE,MAAM;YACrB,GAAG,IAAI;SACV,CAAC;QAEF,OAAO,IAAI,+BAAa,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9D,CAAC;IAGK,AAAN,KAAK,CAAC,IAAI,CAAU,MAAwB;QACxC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,CAAC;QACnE,OAAO,+CAAqB,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IACjG,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAAS,IAAmB;QACpC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,CAAC;QACnE,MAAM,EAAE,GAAG,MAAM,+CAAqB,CAAC,aAAa,CAAC,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;QAEnF,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC;QACjB,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;QAElB,EAAE,CAAC,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAE5C,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC;IACrB,CAAC;CACJ,CAAA;AAzCY,8DAAyB;AAO5B;IADL,IAAA,aAAI,EAAC,YAAY,CAAC;IACP,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,yCAAe;;qDAcvC;AAGK;IADL,IAAA,YAAG,EAAC,QAAQ,CAAC;IACF,WAAA,IAAA,cAAK,GAAE,CAAA;;qCAAS,qCAAgB;;qDAG3C;AAGK;IADL,IAAA,aAAI,GAAE;IACO,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,+BAAa;;uDAUvC;oCAxCQ,yBAAyB;IADrC,IAAA,mBAAU,EAAC,eAAe,CAAC;qCAGoB,+CAAqB;QAChC,oCAAU;GAHlC,yBAAyB,CAyCrC"}
@@ -7,6 +7,7 @@ export * from './business.notification.channel.preference.controller';
7
7
  export * from './business.preference.controller';
8
8
  export * from './business.user.group.controller';
9
9
  export * from './business.user.notification.preference.controller';
10
+ export * from './business.webhook.controller';
10
11
  export * from './choice.list.controller';
11
12
  export * from './choice.type.controller';
12
13
  export * from './common.webhook.controller';
@@ -23,6 +23,7 @@ __exportStar(require("./business.notification.channel.preference.controller"), e
23
23
  __exportStar(require("./business.preference.controller"), exports);
24
24
  __exportStar(require("./business.user.group.controller"), exports);
25
25
  __exportStar(require("./business.user.notification.preference.controller"), exports);
26
+ __exportStar(require("./business.webhook.controller"), exports);
26
27
  __exportStar(require("./choice.list.controller"), exports);
27
28
  __exportStar(require("./choice.type.controller"), exports);
28
29
  __exportStar(require("./common.webhook.controller"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/access/controllers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AAAA,2DAAyC;AAAA,2DAAyC;AAAA,gEAA8C;AAAA,wEAAsD;AAAA,wFAAsE;AAAA,mEAAiD;AAAA,mEAAiD;AAAA,qFAAmE;AAAA,2DAAyC;AAAA,2DAAyC;AAAA,8DAA4C;AAAA,4DAA0C;AAAA,iEAA+C;AAAA,mEAAiD;AAAA,yDAAuC;AAAA,gEAA8C;AAAA,8DAA4C;AAAA,4DAA0C;AAAA,yDAAuC;AAAA,4DAA0C;AAAA,0DAAwC;AAAA,uDAAqC;AAAA,kEAAgD;AAAA,gEAA8C;AAAA,qEAAmD;AAAA,mDAAiC;AAAA,iEAA+C;AAAA,+DAA4C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/access/controllers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AAAA,2DAAyC;AAAA,2DAAyC;AAAA,gEAA8C;AAAA,wEAAsD;AAAA,wFAAsE;AAAA,mEAAiD;AAAA,mEAAiD;AAAA,qFAAmE;AAAA,gEAA8C;AAAA,2DAAyC;AAAA,2DAAyC;AAAA,8DAA4C;AAAA,4DAA0C;AAAA,iEAA+C;AAAA,mEAAiD;AAAA,yDAAuC;AAAA,gEAA8C;AAAA,8DAA4C;AAAA,4DAA0C;AAAA,yDAAuC;AAAA,4DAA0C;AAAA,0DAAwC;AAAA,uDAAqC;AAAA,kEAAgD;AAAA,gEAA8C;AAAA,qEAAmD;AAAA,mDAAiC;AAAA,iEAA+C;AAAA,+DAA4C"}
@@ -0,0 +1,5 @@
1
+ export declare class AddWebhookDto {
2
+ id?: number;
3
+ url?: string;
4
+ events: string[];
5
+ }
@@ -0,0 +1,36 @@
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.AddWebhookDto = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ class AddWebhookDto {
16
+ }
17
+ exports.AddWebhookDto = AddWebhookDto;
18
+ __decorate([
19
+ (0, class_transformer_1.Expose)(),
20
+ (0, class_validator_1.IsOptional)(),
21
+ (0, class_validator_1.IsNumber)(),
22
+ __metadata("design:type", Number)
23
+ ], AddWebhookDto.prototype, "id", void 0);
24
+ __decorate([
25
+ (0, class_transformer_1.Expose)(),
26
+ (0, class_validator_1.IsNotEmpty)(),
27
+ (0, class_validator_1.IsString)(),
28
+ __metadata("design:type", String)
29
+ ], AddWebhookDto.prototype, "url", void 0);
30
+ __decorate([
31
+ (0, class_transformer_1.Expose)(),
32
+ (0, class_validator_1.IsNotEmpty)(),
33
+ (0, class_validator_1.IsArray)(),
34
+ __metadata("design:type", Array)
35
+ ], AddWebhookDto.prototype, "events", void 0);
36
+ //# sourceMappingURL=add.webhook.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add.webhook.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/add.webhook.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA2C;AAC3C,qDAAsF;AAEtF,MAAa,aAAa;CAezB;AAfD,sCAeC;AAXG;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;yCACC;AAKZ;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;0CACE;AAKb;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;;6CACO"}
@@ -0,0 +1,3 @@
1
+ import { CommonAttributesDto } from '@servicelabsco/nestjs-utility-services';
2
+ export declare class BusinessWebhookAttributesDto extends CommonAttributesDto {
3
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BusinessWebhookAttributesDto = void 0;
4
+ const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
5
+ class BusinessWebhookAttributesDto extends nestjs_utility_services_1.CommonAttributesDto {
6
+ }
7
+ exports.BusinessWebhookAttributesDto = BusinessWebhookAttributesDto;
8
+ //# sourceMappingURL=business.webhook.attributes.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"business.webhook.attributes.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/business.webhook.attributes.dto.ts"],"names":[],"mappings":";;;AAAA,oFAA6E;AAC7E,MAAa,4BAA6B,SAAQ,6CAAmB;CAAG;AAAxE,oEAAwE"}
@@ -18,6 +18,7 @@ export * from './add.scheduled.report.dto';
18
18
  export * from './add.short.url.dto';
19
19
  export * from './add.tag.dto';
20
20
  export * from './add.user.preference.dto';
21
+ export * from './add.webhook.dto';
21
22
  export * from './api.account.attributes.dto';
22
23
  export * from './api.account.list.filter.dto';
23
24
  export * from './app.integration.attributes.dto';
@@ -39,6 +40,7 @@ export * from './business.user.group.list.filter.dto';
39
40
  export * from './business.user.notification.preference.attributes.dto';
40
41
  export * from './business.user.notification.preference.list.filter.dto';
41
42
  export * from './business.user.role.attributes.dto';
43
+ export * from './business.webhook.attributes.dto';
42
44
  export * from './bz.notification.channel.preference.attributes.dto';
43
45
  export * from './child.menu.attributes.dto';
44
46
  export * from './choice.list.attributes.dto';
@@ -107,6 +109,7 @@ export * from './scheduled.report.item.attributes.dto';
107
109
  export * from './scheduled.report.item.list.filter.dto';
108
110
  export * from './scheduled.report.list.filter.dto';
109
111
  export * from './send.email.notification.data.dto';
112
+ export * from './send.webhook.request.payload';
110
113
  export * from './server.email.attachment.dto';
111
114
  export * from './server.email.message.dto';
112
115
  export * from './server.email.recipient.dto';
@@ -130,6 +133,8 @@ export * from './user.notification.list.filter.dto';
130
133
  export * from './user.preference.attributes.dto';
131
134
  export * from './user.role.attributes.dto';
132
135
  export * from './watchlist.assignment.attributes.dto';
136
+ export * from './webhook.event.attributes.dto';
137
+ export * from './webhook.log.attributes.dto';
133
138
  export * from './webhook.slug.attributes.dto';
134
139
  export * from './webhook.type.attributes.dto';
135
140
  export * from './whatsapp.message.attributes.dto';
@@ -34,6 +34,7 @@ __exportStar(require("./add.scheduled.report.dto"), exports);
34
34
  __exportStar(require("./add.short.url.dto"), exports);
35
35
  __exportStar(require("./add.tag.dto"), exports);
36
36
  __exportStar(require("./add.user.preference.dto"), exports);
37
+ __exportStar(require("./add.webhook.dto"), exports);
37
38
  __exportStar(require("./api.account.attributes.dto"), exports);
38
39
  __exportStar(require("./api.account.list.filter.dto"), exports);
39
40
  __exportStar(require("./app.integration.attributes.dto"), exports);
@@ -55,6 +56,7 @@ __exportStar(require("./business.user.group.list.filter.dto"), exports);
55
56
  __exportStar(require("./business.user.notification.preference.attributes.dto"), exports);
56
57
  __exportStar(require("./business.user.notification.preference.list.filter.dto"), exports);
57
58
  __exportStar(require("./business.user.role.attributes.dto"), exports);
59
+ __exportStar(require("./business.webhook.attributes.dto"), exports);
58
60
  __exportStar(require("./bz.notification.channel.preference.attributes.dto"), exports);
59
61
  __exportStar(require("./child.menu.attributes.dto"), exports);
60
62
  __exportStar(require("./choice.list.attributes.dto"), exports);
@@ -123,6 +125,7 @@ __exportStar(require("./scheduled.report.item.attributes.dto"), exports);
123
125
  __exportStar(require("./scheduled.report.item.list.filter.dto"), exports);
124
126
  __exportStar(require("./scheduled.report.list.filter.dto"), exports);
125
127
  __exportStar(require("./send.email.notification.data.dto"), exports);
128
+ __exportStar(require("./send.webhook.request.payload"), exports);
126
129
  __exportStar(require("./server.email.attachment.dto"), exports);
127
130
  __exportStar(require("./server.email.message.dto"), exports);
128
131
  __exportStar(require("./server.email.recipient.dto"), exports);
@@ -146,6 +149,8 @@ __exportStar(require("./user.notification.list.filter.dto"), exports);
146
149
  __exportStar(require("./user.preference.attributes.dto"), exports);
147
150
  __exportStar(require("./user.role.attributes.dto"), exports);
148
151
  __exportStar(require("./watchlist.assignment.attributes.dto"), exports);
152
+ __exportStar(require("./webhook.event.attributes.dto"), exports);
153
+ __exportStar(require("./webhook.log.attributes.dto"), exports);
149
154
  __exportStar(require("./webhook.slug.attributes.dto"), exports);
150
155
  __exportStar(require("./webhook.type.attributes.dto"), exports);
151
156
  __exportStar(require("./whatsapp.message.attributes.dto"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/access/dtos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAAA,wDAAsC;AAAA,qEAAmD;AAAA,gEAA8C;AAAA,gEAA8C;AAAA,kFAAgE;AAAA,wDAAsC;AAAA,wDAAsC;AAAA,yDAAuC;AAAA,yDAAuC;AAAA,gEAA8C;AAAA,2EAAyD;AAAA,yDAAuC;AAAA,+DAA6C;AAAA,4EAA0D;AAAA,iDAA+B;AAAA,6DAA2C;AAAA,sDAAoC;AAAA,gDAA8B;AAAA,4DAA0C;AAAA,+DAA6C;AAAA,gEAA8C;AAAA,mEAAiD;AAAA,6DAA2C;AAAA,qEAAmD;AAAA,gEAA8C;AAAA,4EAA0D;AAAA,uFAAqE;AAAA,iFAA+D;AAAA,qFAAmE;AAAA,kEAAgD;AAAA,iEAA+C;AAAA,6FAA2E;AAAA,uDAAqC;AAAA,uEAAqD;AA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@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SendWebhookRequestPayload = void 0;
4
+ class SendWebhookRequestPayload {
5
+ }
6
+ exports.SendWebhookRequestPayload = SendWebhookRequestPayload;
7
+ //# sourceMappingURL=send.webhook.request.payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"send.webhook.request.payload.js","sourceRoot":"","sources":["../../../src/access/dtos/send.webhook.request.payload.ts"],"names":[],"mappings":";;;AAAA,MAAa,yBAAyB;CAGrC;AAHD,8DAGC"}
@@ -0,0 +1,3 @@
1
+ import { CommonAttributesDto } from '@servicelabsco/nestjs-utility-services';
2
+ export declare class WebhookEventAttributesDto extends CommonAttributesDto {
3
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WebhookEventAttributesDto = void 0;
4
+ const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
5
+ class WebhookEventAttributesDto extends nestjs_utility_services_1.CommonAttributesDto {
6
+ }
7
+ exports.WebhookEventAttributesDto = WebhookEventAttributesDto;
8
+ //# sourceMappingURL=webhook.event.attributes.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook.event.attributes.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/webhook.event.attributes.dto.ts"],"names":[],"mappings":";;;AAAA,oFAA6E;AAC7E,MAAa,yBAA0B,SAAQ,6CAAmB;CAAG;AAArE,8DAAqE"}
@@ -0,0 +1,3 @@
1
+ import { CommonAttributesDto } from '@servicelabsco/nestjs-utility-services';
2
+ export declare class WebhookLogAttributesDto extends CommonAttributesDto {
3
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WebhookLogAttributesDto = void 0;
4
+ const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
5
+ class WebhookLogAttributesDto extends nestjs_utility_services_1.CommonAttributesDto {
6
+ }
7
+ exports.WebhookLogAttributesDto = WebhookLogAttributesDto;
8
+ //# sourceMappingURL=webhook.log.attributes.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook.log.attributes.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/webhook.log.attributes.dto.ts"],"names":[],"mappings":";;;AAAA,oFAA6E;AAC7E,MAAa,uBAAwB,SAAQ,6CAAmB;CAAG;AAAnE,0DAAmE"}
@@ -0,0 +1,12 @@
1
+ import { CommonEntity } from '@servicelabsco/nestjs-utility-services';
2
+ import { BusinessWebhookAttributesDto } from '../dtos/business.webhook.attributes.dto';
3
+ import { AccessBusinessEntity } from './access.business.entity';
4
+ export declare class BusinessWebhookEntity extends CommonEntity {
5
+ business_id: number;
6
+ url: string;
7
+ secret: string;
8
+ event_type: any;
9
+ active: boolean;
10
+ attributes: BusinessWebhookAttributesDto;
11
+ business: AccessBusinessEntity;
12
+ }
@@ -0,0 +1,52 @@
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.BusinessWebhookEntity = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
15
+ const business_webhook_attributes_dto_1 = require("../dtos/business.webhook.attributes.dto");
16
+ const access_business_entity_1 = require("./access.business.entity");
17
+ let BusinessWebhookEntity = class BusinessWebhookEntity extends nestjs_utility_services_1.CommonEntity {
18
+ };
19
+ exports.BusinessWebhookEntity = BusinessWebhookEntity;
20
+ __decorate([
21
+ (0, typeorm_1.Column)(),
22
+ __metadata("design:type", Number)
23
+ ], BusinessWebhookEntity.prototype, "business_id", void 0);
24
+ __decorate([
25
+ (0, typeorm_1.Column)(),
26
+ __metadata("design:type", String)
27
+ ], BusinessWebhookEntity.prototype, "url", void 0);
28
+ __decorate([
29
+ (0, typeorm_1.Column)(),
30
+ __metadata("design:type", String)
31
+ ], BusinessWebhookEntity.prototype, "secret", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.Column)('json'),
34
+ __metadata("design:type", Object)
35
+ ], BusinessWebhookEntity.prototype, "event_type", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.Column)(),
38
+ __metadata("design:type", Boolean)
39
+ ], BusinessWebhookEntity.prototype, "active", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.Column)('json'),
42
+ __metadata("design:type", business_webhook_attributes_dto_1.BusinessWebhookAttributesDto)
43
+ ], BusinessWebhookEntity.prototype, "attributes", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.ManyToOne)(() => access_business_entity_1.AccessBusinessEntity),
46
+ (0, typeorm_1.JoinColumn)({ name: 'business_id' }),
47
+ __metadata("design:type", access_business_entity_1.AccessBusinessEntity)
48
+ ], BusinessWebhookEntity.prototype, "business", void 0);
49
+ exports.BusinessWebhookEntity = BusinessWebhookEntity = __decorate([
50
+ (0, typeorm_1.Entity)('bz_webhook_details')
51
+ ], BusinessWebhookEntity);
52
+ //# sourceMappingURL=business.webhook.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"business.webhook.entity.js","sourceRoot":"","sources":["../../../src/access/entities/business.webhook.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgE;AAChE,oFAAsE;AACtE,6FAAuF;AACvF,qEAAgE;AASzD,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,sCAAY;CAqBtD,CAAA;AArBY,sDAAqB;AAE9B;IADC,IAAA,gBAAM,GAAE;;0DACW;AAGpB;IADC,IAAA,gBAAM,GAAE;;kDACG;AAGZ;IADC,IAAA,gBAAM,GAAE;;qDACM;AAGf;IADC,IAAA,gBAAM,EAAC,MAAM,CAAC;;yDACC;AAGhB;IADC,IAAA,gBAAM,GAAE;;qDACO;AAGhB;IADC,IAAA,gBAAM,EAAC,MAAM,CAAC;8BACH,8DAA4B;yDAAC;AAGmC;IAA3E,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,6CAAoB,CAAC;IAAE,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;8BAAW,6CAAoB;uDAAC;gCApBlG,qBAAqB;IADjC,IAAA,gBAAM,EAAC,oBAAoB,CAAC;GAChB,qBAAqB,CAqBjC"}
@@ -12,6 +12,7 @@ export * from './business.user.entity';
12
12
  export * from './business.user.group.entity';
13
13
  export * from './business.user.notification.preference.entity';
14
14
  export * from './business.user.role.entity';
15
+ export * from './business.webhook.entity';
15
16
  export * from './bz.notification.channel.preference.entity';
16
17
  export * from './child.menu.entity';
17
18
  export * from './choice.list.entity';
@@ -62,6 +63,8 @@ export * from './user.notification.entity';
62
63
  export * from './user.preference.entity';
63
64
  export * from './user.role.entity';
64
65
  export * from './watchlist.assignment.entity';
66
+ export * from './webhook.event.entity';
67
+ export * from './webhook.log.entity';
65
68
  export * from './webhook.slug.entity';
66
69
  export * from './webhook.type.entity';
67
70
  export * from './whatsapp.message.entity';
@@ -28,6 +28,7 @@ __exportStar(require("./business.user.entity"), exports);
28
28
  __exportStar(require("./business.user.group.entity"), exports);
29
29
  __exportStar(require("./business.user.notification.preference.entity"), exports);
30
30
  __exportStar(require("./business.user.role.entity"), exports);
31
+ __exportStar(require("./business.webhook.entity"), exports);
31
32
  __exportStar(require("./bz.notification.channel.preference.entity"), exports);
32
33
  __exportStar(require("./child.menu.entity"), exports);
33
34
  __exportStar(require("./choice.list.entity"), exports);
@@ -78,6 +79,8 @@ __exportStar(require("./user.notification.entity"), exports);
78
79
  __exportStar(require("./user.preference.entity"), exports);
79
80
  __exportStar(require("./user.role.entity"), exports);
80
81
  __exportStar(require("./watchlist.assignment.entity"), exports);
82
+ __exportStar(require("./webhook.event.entity"), exports);
83
+ __exportStar(require("./webhook.log.entity"), exports);
81
84
  __exportStar(require("./webhook.slug.entity"), exports);
82
85
  __exportStar(require("./webhook.type.entity"), exports);
83
86
  __exportStar(require("./whatsapp.message.entity"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/access/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AAAA,uDAAqC;AAAA,2DAAyC;AAAA,+EAA6D;AAAA,oEAAkD;AAAA,6EAA2D;AAAA,0DAAwC;AAAA,+DAA6C;AAAA,yDAAuC;AAAA,+DAA6C;AAAA,yDAAuC;AAAA,+DAA6C;AAAA,iFAA+D;AAAA,8DAA4C;AAAA,8EAA4D;AAAA,sDAAoC;AAAA,uDAAqC;AAAA,uDAAqC;AAAA,wDAAsC;AAAA,wDAAsC;AAAA,yDAAuC;AAAA,+DAA6C;AAAA,qDAAmC;AAAA,wDAAsC;AAAA,4DAA0C;AAAA,yDAAuC;AAAA,2DAAyC;AAAA,uDAAqC;AAAA,qDAAmC;AAAA,yDAAuC;AAAA,0DAAwC;AAAA,sDAAoC;AAAA,yDAAuC;AAAA,iEAA+C;AAAA,wDAAsC;AAAA,sDAAoC;AAAA,2DAAyC;AAAA,0DAAwC;AAAA,wDAAsC;AAAA,8DAA4C;AAAA,uDAAqC;AAAA,gDAA8B;AAAA,qDAAmC;AAAA,kDAAgC;AAAA,uDAAqC;AAAA,2DAAyC;AAAA,iEAA+C;AAAA,mDAAiC;AAAA,sDAAoC;AAAA,kEAAgD;AAAA,4DAA0C;AAAA,iEAA+C;A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AA,2DAAyC;AAAA,qDAAmC;AAAA,gEAA8C;AAAA,yDAAuC;AAAA,uDAAqC;AAAA,wDAAsC;AAAA,wDAAsC;AAAA,4DAA0C;AAAA,+DAA6C;AAAA,6DAA0C"}
@@ -0,0 +1,9 @@
1
+ import { CommonEntity } from '@servicelabsco/nestjs-utility-services';
2
+ import { WebhookEventAttributesDto } from '../dtos/webhook.event.attributes.dto';
3
+ export declare class WebhookEventEntity extends CommonEntity {
4
+ name: string;
5
+ description: string;
6
+ identifier: string;
7
+ active: boolean;
8
+ attributes: WebhookEventAttributesDto;
9
+ }
@@ -0,0 +1,42 @@
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.WebhookEventEntity = void 0;
13
+ const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
14
+ const typeorm_1 = require("typeorm");
15
+ const webhook_event_attributes_dto_1 = require("../dtos/webhook.event.attributes.dto");
16
+ let WebhookEventEntity = class WebhookEventEntity extends nestjs_utility_services_1.CommonEntity {
17
+ };
18
+ exports.WebhookEventEntity = WebhookEventEntity;
19
+ __decorate([
20
+ (0, typeorm_1.Column)(),
21
+ __metadata("design:type", String)
22
+ ], WebhookEventEntity.prototype, "name", void 0);
23
+ __decorate([
24
+ (0, typeorm_1.Column)(),
25
+ __metadata("design:type", String)
26
+ ], WebhookEventEntity.prototype, "description", void 0);
27
+ __decorate([
28
+ (0, typeorm_1.Column)(),
29
+ __metadata("design:type", String)
30
+ ], WebhookEventEntity.prototype, "identifier", void 0);
31
+ __decorate([
32
+ (0, typeorm_1.Column)(),
33
+ __metadata("design:type", Boolean)
34
+ ], WebhookEventEntity.prototype, "active", void 0);
35
+ __decorate([
36
+ (0, typeorm_1.Column)('json'),
37
+ __metadata("design:type", webhook_event_attributes_dto_1.WebhookEventAttributesDto)
38
+ ], WebhookEventEntity.prototype, "attributes", void 0);
39
+ exports.WebhookEventEntity = WebhookEventEntity = __decorate([
40
+ (0, typeorm_1.Entity)('utl_webhook_events')
41
+ ], WebhookEventEntity);
42
+ //# sourceMappingURL=webhook.event.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook.event.entity.js","sourceRoot":"","sources":["../../../src/access/entities/webhook.event.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oFAAsE;AACtE,qCAAyC;AACzC,uFAAiF;AAS1E,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,sCAAY;CAiBnD,CAAA;AAjBY,gDAAkB;AAE3B;IADC,IAAA,gBAAM,GAAE;;gDACI;AAGb;IADC,IAAA,gBAAM,GAAE;;uDACW;AAGpB;IADC,IAAA,gBAAM,GAAE;;sDACU;AAGnB;IADC,IAAA,gBAAM,GAAE;;kDACO;AAGhB;IADC,IAAA,gBAAM,EAAC,MAAM,CAAC;8BACH,wDAAyB;sDAAC;6BAd7B,kBAAkB;IAD9B,IAAA,gBAAM,EAAC,oBAAoB,CAAC;GAChB,kBAAkB,CAiB9B"}
@@ -0,0 +1,16 @@
1
+ import { CommonEntity } from '@servicelabsco/nestjs-utility-services';
2
+ import { WebhookLogAttributesDto } from '../dtos/webhook.log.attributes.dto';
3
+ import { BusinessWebhookEntity } from './business.webhook.entity';
4
+ import { WebhookEventEntity } from './webhook.event.entity';
5
+ export declare class WebhookLogEntity extends CommonEntity {
6
+ webhook_id: number;
7
+ event_id: number;
8
+ response_code: number;
9
+ attempted_at: Date;
10
+ is_success: boolean;
11
+ payload: any;
12
+ response_body: any;
13
+ attributes: WebhookLogAttributesDto;
14
+ webhook: BusinessWebhookEntity;
15
+ event: WebhookEventEntity;
16
+ }
@@ -0,0 +1,66 @@
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.WebhookLogEntity = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
15
+ const webhook_log_attributes_dto_1 = require("../dtos/webhook.log.attributes.dto");
16
+ const business_webhook_entity_1 = require("./business.webhook.entity");
17
+ const webhook_event_entity_1 = require("./webhook.event.entity");
18
+ let WebhookLogEntity = class WebhookLogEntity extends nestjs_utility_services_1.CommonEntity {
19
+ };
20
+ exports.WebhookLogEntity = WebhookLogEntity;
21
+ __decorate([
22
+ (0, typeorm_1.Column)(),
23
+ __metadata("design:type", Number)
24
+ ], WebhookLogEntity.prototype, "webhook_id", void 0);
25
+ __decorate([
26
+ (0, typeorm_1.Column)(),
27
+ __metadata("design:type", Number)
28
+ ], WebhookLogEntity.prototype, "event_id", void 0);
29
+ __decorate([
30
+ (0, typeorm_1.Column)(),
31
+ __metadata("design:type", Number)
32
+ ], WebhookLogEntity.prototype, "response_code", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)(),
35
+ __metadata("design:type", Date)
36
+ ], WebhookLogEntity.prototype, "attempted_at", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)(),
39
+ __metadata("design:type", Boolean)
40
+ ], WebhookLogEntity.prototype, "is_success", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)('json'),
43
+ __metadata("design:type", Object)
44
+ ], WebhookLogEntity.prototype, "payload", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)('json'),
47
+ __metadata("design:type", Object)
48
+ ], WebhookLogEntity.prototype, "response_body", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)('json'),
51
+ __metadata("design:type", webhook_log_attributes_dto_1.WebhookLogAttributesDto)
52
+ ], WebhookLogEntity.prototype, "attributes", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.ManyToOne)(() => business_webhook_entity_1.BusinessWebhookEntity),
55
+ (0, typeorm_1.JoinColumn)({ name: 'webhook_id' }),
56
+ __metadata("design:type", business_webhook_entity_1.BusinessWebhookEntity)
57
+ ], WebhookLogEntity.prototype, "webhook", void 0);
58
+ __decorate([
59
+ (0, typeorm_1.ManyToOne)(() => webhook_event_entity_1.WebhookEventEntity),
60
+ (0, typeorm_1.JoinColumn)({ name: 'event_id' }),
61
+ __metadata("design:type", webhook_event_entity_1.WebhookEventEntity)
62
+ ], WebhookLogEntity.prototype, "event", void 0);
63
+ exports.WebhookLogEntity = WebhookLogEntity = __decorate([
64
+ (0, typeorm_1.Entity)('utl_webhook_logs')
65
+ ], WebhookLogEntity);
66
+ //# sourceMappingURL=webhook.log.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook.log.entity.js","sourceRoot":"","sources":["../../../src/access/entities/webhook.log.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgE;AAChE,oFAAkF;AAClF,mFAA6E;AAC7E,uEAAkE;AAClE,iEAA4D;AASrD,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,sCAAY;CA4BjD,CAAA;AA5BY,4CAAgB;AAEzB;IADC,IAAA,gBAAM,GAAE;;oDACU;AAGnB;IADC,IAAA,gBAAM,GAAE;;kDACQ;AAGjB;IADC,IAAA,gBAAM,GAAE;;uDACa;AAGtB;IADC,IAAA,gBAAM,GAAE;8BACK,IAAI;sDAAC;AAGnB;IADC,IAAA,gBAAM,GAAE;;oDACW;AAGpB;IADC,IAAA,gBAAM,EAAC,MAAM,CAAC;;iDACF;AAGb;IADC,IAAA,gBAAM,EAAC,MAAM,CAAC;;uDACI;AAGnB;IADC,IAAA,gBAAM,EAAC,MAAM,CAAC;8BACH,oDAAuB;oDAAC;AAGwC;IAA3E,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,+CAAqB,CAAC;IAAE,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;8BAAU,+CAAqB;iDAAC;AACpC;IAAtE,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,yCAAkB,CAAC;IAAE,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;8BAAQ,yCAAkB;+CAAC;2BA3BxF,gBAAgB;IAD5B,IAAA,gBAAM,EAAC,kBAAkB,CAAC;GACd,gBAAgB,CA4B5B"}