@servicelabsco/slabs-access-manager 0.1.131 → 0.1.132

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 (94) hide show
  1. package/dist/access/controllers/business.app.integration.controller.d.ts +23 -0
  2. package/dist/access/controllers/business.app.integration.controller.js +146 -0
  3. package/dist/access/controllers/business.app.integration.controller.js.map +1 -0
  4. package/dist/access/controllers/common.webhook.controller.d.ts +7 -0
  5. package/dist/access/controllers/common.webhook.controller.js +46 -0
  6. package/dist/access/controllers/common.webhook.controller.js.map +1 -0
  7. package/dist/access/controllers/index.d.ts +2 -0
  8. package/dist/access/controllers/index.js +2 -0
  9. package/dist/access/controllers/index.js.map +1 -1
  10. package/dist/access/dtos/add.business.app.integration.dto.d.ts +4 -0
  11. package/dist/access/dtos/add.business.app.integration.dto.js +30 -0
  12. package/dist/access/dtos/add.business.app.integration.dto.js.map +1 -0
  13. package/dist/access/dtos/app.integration.attributes.dto.d.ts +3 -0
  14. package/dist/access/dtos/app.integration.attributes.dto.js +8 -0
  15. package/dist/access/dtos/app.integration.attributes.dto.js.map +1 -0
  16. package/dist/access/dtos/business.app.integration.attributes.dto.d.ts +3 -0
  17. package/dist/access/dtos/business.app.integration.attributes.dto.js +8 -0
  18. package/dist/access/dtos/business.app.integration.attributes.dto.js.map +1 -0
  19. package/dist/access/dtos/business.app.integration.credential.attributes.dto.d.ts +3 -0
  20. package/dist/access/dtos/business.app.integration.credential.attributes.dto.js +8 -0
  21. package/dist/access/dtos/business.app.integration.credential.attributes.dto.js.map +1 -0
  22. package/dist/access/dtos/index.d.ts +4 -0
  23. package/dist/access/dtos/index.js +4 -0
  24. package/dist/access/dtos/index.js.map +1 -1
  25. package/dist/access/entities/app.integration.entity.d.ts +11 -0
  26. package/dist/access/entities/app.integration.entity.js +50 -0
  27. package/dist/access/entities/app.integration.entity.js.map +1 -0
  28. package/dist/access/entities/business.app.integration.credential.entity.d.ts +11 -0
  29. package/dist/access/entities/business.app.integration.credential.entity.js +48 -0
  30. package/dist/access/entities/business.app.integration.credential.entity.js.map +1 -0
  31. package/dist/access/entities/business.app.integration.entity.d.ts +14 -0
  32. package/dist/access/entities/business.app.integration.entity.js +58 -0
  33. package/dist/access/entities/business.app.integration.entity.js.map +1 -0
  34. package/dist/access/entities/index.d.ts +3 -0
  35. package/dist/access/entities/index.js +3 -0
  36. package/dist/access/entities/index.js.map +1 -1
  37. package/dist/access/es6.classes.d.ts +20 -9
  38. package/dist/access/es6.classes.js +35 -7
  39. package/dist/access/es6.classes.js.map +1 -1
  40. package/dist/access/jobs/app.integration.job.d.ts +7 -0
  41. package/dist/access/jobs/app.integration.job.js +29 -0
  42. package/dist/access/jobs/app.integration.job.js.map +1 -0
  43. package/dist/access/jobs/business.app.integration.credential.job.d.ts +7 -0
  44. package/dist/access/jobs/business.app.integration.credential.job.js +29 -0
  45. package/dist/access/jobs/business.app.integration.credential.job.js.map +1 -0
  46. package/dist/access/jobs/business.app.integration.job.d.ts +10 -0
  47. package/dist/access/jobs/business.app.integration.job.js +58 -0
  48. package/dist/access/jobs/business.app.integration.job.js.map +1 -0
  49. package/dist/access/jobs/index.d.ts +3 -0
  50. package/dist/access/jobs/index.js +3 -0
  51. package/dist/access/jobs/index.js.map +1 -1
  52. package/dist/access/libraries/index.d.ts +2 -0
  53. package/dist/access/libraries/index.js +2 -0
  54. package/dist/access/libraries/index.js.map +1 -1
  55. package/dist/access/libraries/process.slack.integration.d.ts +18 -0
  56. package/dist/access/libraries/process.slack.integration.js +107 -0
  57. package/dist/access/libraries/process.slack.integration.js.map +1 -0
  58. package/dist/access/libraries/process.whatsapp.integration.d.ts +8 -0
  59. package/dist/access/libraries/process.whatsapp.integration.js +34 -0
  60. package/dist/access/libraries/process.whatsapp.integration.js.map +1 -0
  61. package/dist/access/services/es6.jobs.service.d.ts +7 -1
  62. package/dist/access/services/es6.jobs.service.js +13 -1
  63. package/dist/access/services/es6.jobs.service.js.map +1 -1
  64. package/dist/access/subscribers/app.integration.subscriber.d.ts +10 -0
  65. package/dist/access/subscribers/app.integration.subscriber.js +34 -0
  66. package/dist/access/subscribers/app.integration.subscriber.js.map +1 -0
  67. package/dist/access/subscribers/business.app.integration.credential.subscriber.d.ts +10 -0
  68. package/dist/access/subscribers/business.app.integration.credential.subscriber.js +34 -0
  69. package/dist/access/subscribers/business.app.integration.credential.subscriber.js.map +1 -0
  70. package/dist/access/subscribers/business.app.integration.subscriber.d.ts +10 -0
  71. package/dist/access/subscribers/business.app.integration.subscriber.js +34 -0
  72. package/dist/access/subscribers/business.app.integration.subscriber.js.map +1 -0
  73. package/dist/access/subscribers/index.d.ts +3 -0
  74. package/dist/access/subscribers/index.js +3 -0
  75. package/dist/access/subscribers/index.js.map +1 -1
  76. package/dist/accessUtility/es6.classes.d.ts +3 -2
  77. package/dist/accessUtility/es6.classes.js +6 -0
  78. package/dist/accessUtility/es6.classes.js.map +1 -1
  79. package/dist/config/entity.constants.d.ts +9 -3
  80. package/dist/config/entity.constants.js +9 -3
  81. package/dist/config/entity.constants.js.map +1 -1
  82. package/dist/config/integration.type.constant.d.ts +6 -0
  83. package/dist/config/integration.type.constant.js +10 -0
  84. package/dist/config/integration.type.constant.js.map +1 -0
  85. package/dist/migrations/1723015380987-CreateAppIntegrationTable.d.ts +5 -0
  86. package/dist/migrations/1723015380987-CreateAppIntegrationTable.js +23 -0
  87. package/dist/migrations/1723015380987-CreateAppIntegrationTable.js.map +1 -0
  88. package/dist/migrations/1723018503948-CreateBusinessAppIntegrationTable.d.ts +5 -0
  89. package/dist/migrations/1723018503948-CreateBusinessAppIntegrationTable.js +22 -0
  90. package/dist/migrations/1723018503948-CreateBusinessAppIntegrationTable.js.map +1 -0
  91. package/dist/migrations/1723020352925-CreateBusinessAppIntegrationCredentialTable.d.ts +5 -0
  92. package/dist/migrations/1723020352925-CreateBusinessAppIntegrationCredentialTable.js +21 -0
  93. package/dist/migrations/1723020352925-CreateBusinessAppIntegrationCredentialTable.js.map +1 -0
  94. package/package.json +1 -1
@@ -0,0 +1,23 @@
1
+ import { PropertyService, SqlService } from '@servicelabsco/nestjs-utility-services';
2
+ import { AddBusinessAppIntegrationDto } from '../dtos/add.business.app.integration.dto';
3
+ import { BusinessParamDto } from '../dtos/business.param.dto';
4
+ import { DbFindDto } from '../dtos/db.find.dto';
5
+ import { AppIntegrationEntity } from '../entities/app.integration.entity';
6
+ import { BusinessAppIntegrationEntity } from '../entities/business.app.integration.entity';
7
+ import { AccessBusinessService } from '../services/access.business.service';
8
+ export declare class BusinessAppIntegrationController {
9
+ private readonly accessBusinessService;
10
+ private readonly sqlService;
11
+ private readonly propertyService;
12
+ constructor(accessBusinessService: AccessBusinessService, sqlService: SqlService, propertyService: PropertyService);
13
+ search(): Promise<BusinessAppIntegrationEntity[]>;
14
+ find(body: DbFindDto): Promise<any>;
15
+ show(params: BusinessParamDto): Promise<BusinessAppIntegrationEntity>;
16
+ initializeIntegration(body: AddBusinessAppIntegrationDto): Promise<BusinessAppIntegrationEntity>;
17
+ revokeIntegration(params: BusinessParamDto): Promise<BusinessAppIntegrationEntity>;
18
+ integrateSlack(): Promise<{
19
+ client_id: string;
20
+ scope: string;
21
+ }>;
22
+ integrations(): Promise<AppIntegrationEntity[]>;
23
+ }
@@ -0,0 +1,146 @@
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.BusinessAppIntegrationController = void 0;
16
+ const common_1 = require("@nestjs/common");
17
+ const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
18
+ const integration_type_constant_1 = require("../../config/integration.type.constant");
19
+ const add_business_app_integration_dto_1 = require("../dtos/add.business.app.integration.dto");
20
+ const business_param_dto_1 = require("../dtos/business.param.dto");
21
+ const db_find_dto_1 = require("../dtos/db.find.dto");
22
+ const app_integration_entity_1 = require("../entities/app.integration.entity");
23
+ const business_app_integration_entity_1 = require("../entities/business.app.integration.entity");
24
+ const process_db_find_1 = require("../libraries/process.db.find");
25
+ const process_whatsapp_integration_1 = require("../libraries/process.whatsapp.integration");
26
+ const access_business_service_1 = require("../services/access.business.service");
27
+ let BusinessAppIntegrationController = class BusinessAppIntegrationController {
28
+ constructor(accessBusinessService, sqlService, propertyService) {
29
+ this.accessBusinessService = accessBusinessService;
30
+ this.sqlService = sqlService;
31
+ this.propertyService = propertyService;
32
+ }
33
+ async search() {
34
+ const business = await this.accessBusinessService.validateAccess();
35
+ return business_app_integration_entity_1.BusinessAppIntegrationEntity.find({ where: { business_id: business.id }, relations: ['updator'] });
36
+ }
37
+ async find(body) {
38
+ const business = await this.accessBusinessService.validateAccess();
39
+ const config = {
40
+ primaryCondition: `a.deleted_at is null and a.business_id = ${business.id}`,
41
+ tableName: 'bz_app_integrations a left join utl_app_integrations b on b.id = a.integration_id',
42
+ columns: ['a.id', 'b.name', 'a.active', 'b.active integration_active'],
43
+ idsCompareKey: 'a.id',
44
+ searchCompareKeys: ['b.name'],
45
+ order: `b.name`,
46
+ statusCompareKeys: ['a.active', 'b.active'],
47
+ ...body,
48
+ };
49
+ return new process_db_find_1.ProcessDbFind(this.sqlService).process(config);
50
+ }
51
+ async show(params) {
52
+ const business = await this.accessBusinessService.validateAccess();
53
+ return business_app_integration_entity_1.BusinessAppIntegrationEntity.findOne({ where: { id: params.id, business_id: business.id } });
54
+ }
55
+ async initializeIntegration(body) {
56
+ const business = await this.accessBusinessService.validateAccess();
57
+ const integration = await app_integration_entity_1.AppIntegrationEntity.findOne({ where: { id: body.integration_id } });
58
+ if (!integration)
59
+ throw new nestjs_utility_services_1.OperationException('There is no any integration');
60
+ switch (integration.integration_identifier) {
61
+ case integration_type_constant_1.IntegrationIdentifierConstants.whatsapp:
62
+ return new process_whatsapp_integration_1.ProcessWhatsappIntegration(business).handle(integration.id);
63
+ default:
64
+ break;
65
+ }
66
+ }
67
+ async revokeIntegration(params) {
68
+ const business = await this.accessBusinessService.validateAccess();
69
+ const bz_integration = await business_app_integration_entity_1.BusinessAppIntegrationEntity.findOne({ where: { id: params.id, business_id: business.id } });
70
+ if (!bz_integration)
71
+ throw new nestjs_utility_services_1.OperationException('There is no any integration');
72
+ bz_integration.active = false;
73
+ return bz_integration.save();
74
+ }
75
+ async integrateSlack() {
76
+ const business = await this.accessBusinessService.validateAccess();
77
+ if (!business)
78
+ return;
79
+ const clientId = await this.propertyService.get('slack.client.id');
80
+ const scope = await this.propertyService.get('slack.access.scope');
81
+ if (!clientId)
82
+ throw new nestjs_utility_services_1.OperationException('No Client Id');
83
+ return {
84
+ client_id: clientId,
85
+ scope: scope,
86
+ };
87
+ }
88
+ async integrations() {
89
+ await this.accessBusinessService.validateAccess();
90
+ return app_integration_entity_1.AppIntegrationEntity.find({ where: { active: true } });
91
+ }
92
+ };
93
+ exports.BusinessAppIntegrationController = BusinessAppIntegrationController;
94
+ __decorate([
95
+ (0, common_1.Post)('search'),
96
+ __metadata("design:type", Function),
97
+ __metadata("design:paramtypes", []),
98
+ __metadata("design:returntype", Promise)
99
+ ], BusinessAppIntegrationController.prototype, "search", null);
100
+ __decorate([
101
+ (0, common_1.Post)('find'),
102
+ __param(0, (0, common_1.Body)()),
103
+ __metadata("design:type", Function),
104
+ __metadata("design:paramtypes", [db_find_dto_1.DbFindDto]),
105
+ __metadata("design:returntype", Promise)
106
+ ], BusinessAppIntegrationController.prototype, "find", null);
107
+ __decorate([
108
+ (0, common_1.Get)(':id'),
109
+ __param(0, (0, common_1.Param)()),
110
+ __metadata("design:type", Function),
111
+ __metadata("design:paramtypes", [business_param_dto_1.BusinessParamDto]),
112
+ __metadata("design:returntype", Promise)
113
+ ], BusinessAppIntegrationController.prototype, "show", null);
114
+ __decorate([
115
+ (0, common_1.Post)(),
116
+ __param(0, (0, common_1.Body)()),
117
+ __metadata("design:type", Function),
118
+ __metadata("design:paramtypes", [add_business_app_integration_dto_1.AddBusinessAppIntegrationDto]),
119
+ __metadata("design:returntype", Promise)
120
+ ], BusinessAppIntegrationController.prototype, "initializeIntegration", null);
121
+ __decorate([
122
+ (0, common_1.Post)(':id/revoke'),
123
+ __param(0, (0, common_1.Param)()),
124
+ __metadata("design:type", Function),
125
+ __metadata("design:paramtypes", [business_param_dto_1.BusinessParamDto]),
126
+ __metadata("design:returntype", Promise)
127
+ ], BusinessAppIntegrationController.prototype, "revokeIntegration", null);
128
+ __decorate([
129
+ (0, common_1.Get)('slack-id'),
130
+ __metadata("design:type", Function),
131
+ __metadata("design:paramtypes", []),
132
+ __metadata("design:returntype", Promise)
133
+ ], BusinessAppIntegrationController.prototype, "integrateSlack", null);
134
+ __decorate([
135
+ (0, common_1.Post)('search'),
136
+ __metadata("design:type", Function),
137
+ __metadata("design:paramtypes", []),
138
+ __metadata("design:returntype", Promise)
139
+ ], BusinessAppIntegrationController.prototype, "integrations", null);
140
+ exports.BusinessAppIntegrationController = BusinessAppIntegrationController = __decorate([
141
+ (0, common_1.Controller)('api/b/integration'),
142
+ __metadata("design:paramtypes", [access_business_service_1.AccessBusinessService,
143
+ nestjs_utility_services_1.SqlService,
144
+ nestjs_utility_services_1.PropertyService])
145
+ ], BusinessAppIntegrationController);
146
+ //# sourceMappingURL=business.app.integration.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"business.app.integration.controller.js","sourceRoot":"","sources":["../../../src/access/controllers/business.app.integration.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoE;AACpE,oFAAyG;AACzG,sFAAwF;AACxF,+FAAwF;AACxF,mEAA8D;AAC9D,qDAAgD;AAEhD,+EAA0E;AAC1E,iGAA2F;AAC3F,kEAA6D;AAC7D,4FAAuF;AACvF,iFAA4E;AAQrE,IAAM,gCAAgC,GAAtC,MAAM,gCAAgC;IACzC,YACqB,qBAA4C,EAC5C,UAAsB,EACtB,eAAgC;QAFhC,0BAAqB,GAArB,qBAAqB,CAAuB;QAC5C,eAAU,GAAV,UAAU,CAAY;QACtB,oBAAe,GAAf,eAAe,CAAiB;IAClD,CAAC;IAGE,AAAN,KAAK,CAAC,MAAM;QACR,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,CAAC;QACnE,OAAO,8DAA4B,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IAC9G,CAAC;IAGK,AAAN,KAAK,CAAC,IAAI,CAAS,IAAe;QAC9B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,CAAC;QAEnE,MAAM,MAAM,GAAqB;YAC7B,gBAAgB,EAAE,4CAA4C,QAAQ,CAAC,EAAE,EAAE;YAC3E,SAAS,EAAE,mFAAmF;YAC9F,OAAO,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,6BAA6B,CAAC;YACtE,aAAa,EAAE,MAAM;YACrB,iBAAiB,EAAE,CAAC,QAAQ,CAAC;YAC7B,KAAK,EAAE,QAAQ;YACf,iBAAiB,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC;YAC3C,GAAG,IAAI;SACV,CAAC;QAEF,OAAO,IAAI,+BAAa,CA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,EAAC,YAAY,CAAC;IACM,WAAA,IAAA,cAAK,GAAE,CAAA;;qCAAS,qCAAgB;;yEASxD;AAGK;IADL,IAAA,YAAG,EAAC,UAAU,CAAC;;;;sEAcf;AAGK;IADL,IAAA,aAAI,EAAC,QAAQ,CAAC;;;;oEAId;2CArFQ,gCAAgC;IAD5C,IAAA,mBAAU,EAAC,mBAAmB,CAAC;qCAGgB,+CAAqB;QAChC,oCAAU;QACL,yCAAe;GAJ5C,gCAAgC,CAsF5C"}
@@ -0,0 +1,7 @@
1
+ import { PropertyService } from '@servicelabsco/nestjs-utility-services';
2
+ import { Response } from 'express';
3
+ export declare class CommonWebhookController {
4
+ private readonly propertyService;
5
+ constructor(propertyService: PropertyService);
6
+ slackIntegration(queries: any, res: Response): Promise<void>;
7
+ }
@@ -0,0 +1,46 @@
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.CommonWebhookController = void 0;
16
+ const common_1 = require("@nestjs/common");
17
+ const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
18
+ const process_slack_integration_1 = require("../libraries/process.slack.integration");
19
+ let CommonWebhookController = class CommonWebhookController {
20
+ constructor(propertyService) {
21
+ this.propertyService = propertyService;
22
+ }
23
+ async slackIntegration(queries, res) {
24
+ if (!queries)
25
+ return;
26
+ const { state, code } = queries;
27
+ if (!code || !state)
28
+ throw new nestjs_utility_services_1.OperationException('Invalid Request');
29
+ return new process_slack_integration_1.ProcessSlackIntegration(this.propertyService).handle(code, state, res);
30
+ }
31
+ };
32
+ exports.CommonWebhookController = CommonWebhookController;
33
+ __decorate([
34
+ (0, common_1.Get)('integrate-slack'),
35
+ (0, common_1.HttpCode)(common_1.HttpStatus.OK),
36
+ __param(0, (0, common_1.Query)()),
37
+ __param(1, (0, common_1.Res)()),
38
+ __metadata("design:type", Function),
39
+ __metadata("design:paramtypes", [Object, Object]),
40
+ __metadata("design:returntype", Promise)
41
+ ], CommonWebhookController.prototype, "slackIntegration", null);
42
+ exports.CommonWebhookController = CommonWebhookController = __decorate([
43
+ (0, common_1.Controller)('api/b/webhook'),
44
+ __metadata("design:paramtypes", [nestjs_utility_services_1.PropertyService])
45
+ ], CommonWebhookController);
46
+ //# sourceMappingURL=common.webhook.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.webhook.controller.js","sourceRoot":"","sources":["../../../src/access/controllers/common.webhook.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAmF;AACnF,oFAA6F;AAC7F,sFAAiF;AAS1E,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAChC,YAA6B,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;IAAG,CAAC;IAI3D,AAAN,KAAK,CAAC,gBAAgB,CAAU,OAAY,EAAS,GAAa;QAC9D,IAAI,CAAC,OAAO;YAAE,OAAO;QACrB,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;QAEhC,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK;YAAE,MAAM,IAAI,4CAAkB,CAAC,iBAAiB,CAAC,CAAC;QACrE,OAAO,IAAI,mDAAuB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;IACtF,CAAC;CACJ,CAAA;AAZY,0DAAuB;AAK1B;IAFL,IAAA,YAAG,EAAC,iBAAiB,CAAC;IACtB,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IACA,WAAA,IAAA,cAAK,GAAE,CAAA;IAAgB,WAAA,IAAA,YAAG,GAAE,CAAA;;;;+DAMnD;kCAXQ,uBAAuB;IADnC,IAAA,mBAAU,EAAC,eAAe,CAAC;qCAEsB,yCAAe;GADpD,uBAAuB,CAYnC"}
@@ -2,10 +2,12 @@ export * from './access.menu.controller';
2
2
  export * from './api.account.controller';
3
3
  export * from './bulk.upload.controller';
4
4
  export * from './bulk.upload.item.controller';
5
+ export * from './business.app.integration.controller';
5
6
  export * from './business.preference.controller';
6
7
  export * from './business.user.group.controller';
7
8
  export * from './choice.list.controller';
8
9
  export * from './choice.type.controller';
10
+ export * from './common.webhook.controller';
9
11
  export * from './custom.field.controller';
10
12
  export * from './dashboard.builder.controller';
11
13
  export * from './dashboard.component.controller';
@@ -18,10 +18,12 @@ __exportStar(require("./access.menu.controller"), exports);
18
18
  __exportStar(require("./api.account.controller"), exports);
19
19
  __exportStar(require("./bulk.upload.controller"), exports);
20
20
  __exportStar(require("./bulk.upload.item.controller"), exports);
21
+ __exportStar(require("./business.app.integration.controller"), exports);
21
22
  __exportStar(require("./business.preference.controller"), exports);
22
23
  __exportStar(require("./business.user.group.controller"), exports);
23
24
  __exportStar(require("./choice.list.controller"), exports);
24
25
  __exportStar(require("./choice.type.controller"), exports);
26
+ __exportStar(require("./common.webhook.controller"), exports);
25
27
  __exportStar(require("./custom.field.controller"), exports);
26
28
  __exportStar(require("./dashboard.builder.controller"), exports);
27
29
  __exportStar(require("./dashboard.component.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,mEAAiD;AAAA,mEAAiD;AAAA,2DAAyC;AAAA,2DAAyC;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,mEAAiD;AAAA,mEAAiD;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,4 @@
1
+ export declare class AddBusinessAppIntegrationDto {
2
+ integration_id: number;
3
+ code: string;
4
+ }
@@ -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.AddBusinessAppIntegrationDto = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ class AddBusinessAppIntegrationDto {
16
+ }
17
+ exports.AddBusinessAppIntegrationDto = AddBusinessAppIntegrationDto;
18
+ __decorate([
19
+ (0, class_transformer_1.Expose)(),
20
+ (0, class_validator_1.IsNumber)(),
21
+ (0, class_validator_1.IsNotEmpty)(),
22
+ __metadata("design:type", Number)
23
+ ], AddBusinessAppIntegrationDto.prototype, "integration_id", void 0);
24
+ __decorate([
25
+ (0, class_transformer_1.Expose)(),
26
+ (0, class_validator_1.IsString)(),
27
+ (0, class_validator_1.IsOptional)(),
28
+ __metadata("design:type", String)
29
+ ], AddBusinessAppIntegrationDto.prototype, "code", void 0);
30
+ //# sourceMappingURL=add.business.app.integration.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add.business.app.integration.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/add.business.app.integration.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA2C;AAC3C,qDAA6E;AAE7E,MAAa,4BAA4B;CAUxC;AAVD,oEAUC;AANG;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;oEACU;AAKvB;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0DACA"}
@@ -0,0 +1,3 @@
1
+ import { CommonAttributesDto } from '@servicelabsco/nestjs-utility-services';
2
+ export declare class AppIntegrationAttributesDto extends CommonAttributesDto {
3
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AppIntegrationAttributesDto = void 0;
4
+ const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
5
+ class AppIntegrationAttributesDto extends nestjs_utility_services_1.CommonAttributesDto {
6
+ }
7
+ exports.AppIntegrationAttributesDto = AppIntegrationAttributesDto;
8
+ //# sourceMappingURL=app.integration.attributes.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.integration.attributes.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/app.integration.attributes.dto.ts"],"names":[],"mappings":";;;AAAA,oFAA6E;AAC7E,MAAa,2BAA4B,SAAQ,6CAAmB;CAAG;AAAvE,kEAAuE"}
@@ -0,0 +1,3 @@
1
+ import { CommonAttributesDto } from '@servicelabsco/nestjs-utility-services';
2
+ export declare class BusinessAppIntegrationAttributesDto extends CommonAttributesDto {
3
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BusinessAppIntegrationAttributesDto = void 0;
4
+ const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
5
+ class BusinessAppIntegrationAttributesDto extends nestjs_utility_services_1.CommonAttributesDto {
6
+ }
7
+ exports.BusinessAppIntegrationAttributesDto = BusinessAppIntegrationAttributesDto;
8
+ //# sourceMappingURL=business.app.integration.attributes.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"business.app.integration.attributes.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/business.app.integration.attributes.dto.ts"],"names":[],"mappings":";;;AAAA,oFAA6E;AAC7E,MAAa,mCAAoC,SAAQ,6CAAmB;CAAG;AAA/E,kFAA+E"}
@@ -0,0 +1,3 @@
1
+ import { CommonAttributesDto } from '@servicelabsco/nestjs-utility-services';
2
+ export declare class BusinessAppIntegrationCredentialAttributesDto extends CommonAttributesDto {
3
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BusinessAppIntegrationCredentialAttributesDto = void 0;
4
+ const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
5
+ class BusinessAppIntegrationCredentialAttributesDto extends nestjs_utility_services_1.CommonAttributesDto {
6
+ }
7
+ exports.BusinessAppIntegrationCredentialAttributesDto = BusinessAppIntegrationCredentialAttributesDto;
8
+ //# sourceMappingURL=business.app.integration.credential.attributes.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"business.app.integration.credential.attributes.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/business.app.integration.credential.attributes.dto.ts"],"names":[],"mappings":";;;AAAA,oFAA6E;AAC7E,MAAa,6CAA8C,SAAQ,6CAAmB;CAAG;AAAzF,sGAAyF"}
@@ -1,5 +1,6 @@
1
1
  export * from './access.business.param.dto';
2
2
  export * from './add.api.account.dto';
3
+ export * from './add.business.app.integration.dto';
3
4
  export * from './add.business.preference.dto';
4
5
  export * from './add.business.user.group.dto';
5
6
  export * from './add.choice.list.dto';
@@ -17,9 +18,12 @@ export * from './add.tag.dto';
17
18
  export * from './add.user.preference.dto';
18
19
  export * from './api.account.attributes.dto';
19
20
  export * from './api.account.list.filter.dto';
21
+ export * from './app.integration.attributes.dto';
20
22
  export * from './bank.account.payload.dto';
21
23
  export * from './bulk.upload.item.list.filter.dto';
22
24
  export * from './bulk.upload.list.filter.dto';
25
+ export * from './business.app.integration.attributes.dto';
26
+ export * from './business.app.integration.credential.attributes.dto';
23
27
  export * from './business.email.attributes.dto';
24
28
  export * from './business.param.dto';
25
29
  export * from './business.preference.attributes.dto';
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./access.business.param.dto"), exports);
18
18
  __exportStar(require("./add.api.account.dto"), exports);
19
+ __exportStar(require("./add.business.app.integration.dto"), exports);
19
20
  __exportStar(require("./add.business.preference.dto"), exports);
20
21
  __exportStar(require("./add.business.user.group.dto"), exports);
21
22
  __exportStar(require("./add.choice.list.dto"), exports);
@@ -33,9 +34,12 @@ __exportStar(require("./add.tag.dto"), exports);
33
34
  __exportStar(require("./add.user.preference.dto"), exports);
34
35
  __exportStar(require("./api.account.attributes.dto"), exports);
35
36
  __exportStar(require("./api.account.list.filter.dto"), exports);
37
+ __exportStar(require("./app.integration.attributes.dto"), exports);
36
38
  __exportStar(require("./bank.account.payload.dto"), exports);
37
39
  __exportStar(require("./bulk.upload.item.list.filter.dto"), exports);
38
40
  __exportStar(require("./bulk.upload.list.filter.dto"), exports);
41
+ __exportStar(require("./business.app.integration.attributes.dto"), exports);
42
+ __exportStar(require("./business.app.integration.credential.attributes.dto"), exports);
39
43
  __exportStar(require("./business.email.attributes.dto"), exports);
40
44
  __exportStar(require("./business.param.dto"), exports);
41
45
  __exportStar(require("./business.preference.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,gEAA8C;AAAA,gEAA8C;AAAA,wDAAsC;AAAA,wDAAsC;AAAA,yDAAuC;AAAA,yDAAuC;AAAA,gEAA8C;AAAA,2EAAyD;AAAA,yDAAuC;AAAA,+DAA6C;AAAA,iDAA+B;AAAA,6DAA2C;AAAA,sDAAoC;AAAA,gDAA8B;AAAA,4DAA0C;AAAA,+DAA6C;AAAA,gEAA8C;AAAA,6DAA2C;AAAA,qEAAmD;AAAA,gEAA8C;AAAA,kEAAgD;AAAA,uDAAqC;AAAA,uEAAqD;AAAA,iEAA+C;AAAA,uEAAqD;AAAA,wEAAsD;AAAA,sEAAoD;AAAA,8DAA4C;AAAA,+DAA6C;AAAA,+DAA6C;AAAA,gEAA8C;AAAA,2DAAyC;AAAA,gEAA8C;AAAA,mEAAiD;AAAA,gEAA8C;AAAA,iEAA+C;AAAA,iEA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AAAA,0DAAwC;AAAA,+DAA6C;AAAA,6DAA2C;AAAA,4DAA0C;AAAA,oDAAkC;AAAA,yEAAuD;AAAA,oEAAkD;AAAA,mEAAiD;AAAA,gEAA8C;AAAA,2DAAyC;AAAA,6DAA2C;AAAA,8DAA4C;AAAA,oEAAkD;AAAA,0EAAwD;AAAA,yEAAuD;AAAA,0EAAwD;AAAA,qEAAmD;AAAA,qEAAmD;AAAA,gEAA8C;AAAA,6DAA2C;AAAA,+DAA6C;AAAA,gEAA8C;AAAA,qEAAmD;AAAA,iEAA+C;AAAA,8DAA4C;AAAA,kEAAgD;AAAA,8DAA4C;AAAA,iEAA+C;AAAA,yEAAuD;AAAA,sDAAoC;AAAA,oDAAkC;AAAA,sDAAoC;AAAA,6DAA2C;AAAA,kEAAgD;AAAA,wDAAsC;AAAA,qEAAmD;AAAA,sEAAoD;AAAA,mEAAiD;AAAA,6DAA2C;AAAA,wEAAsD;AAAA,gEAA8C;AAAA,gEAA8C;AAAA,oEAAkD;AAAA,iEAA+C;AAAA,qEAAkD"}
@@ -0,0 +1,11 @@
1
+ import { CommonEntity } from '@servicelabsco/nestjs-utility-services';
2
+ import { AppIntegrationAttributesDto } from '../dtos/app.integration.attributes.dto';
3
+ export declare class AppIntegrationEntity extends CommonEntity {
4
+ name: string;
5
+ active: boolean;
6
+ integration_identifier: string;
7
+ url: string;
8
+ image: string;
9
+ description: string;
10
+ attributes: AppIntegrationAttributesDto;
11
+ }
@@ -0,0 +1,50 @@
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.AppIntegrationEntity = void 0;
13
+ const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
14
+ const typeorm_1 = require("typeorm");
15
+ const app_integration_attributes_dto_1 = require("../dtos/app.integration.attributes.dto");
16
+ let AppIntegrationEntity = class AppIntegrationEntity extends nestjs_utility_services_1.CommonEntity {
17
+ };
18
+ exports.AppIntegrationEntity = AppIntegrationEntity;
19
+ __decorate([
20
+ (0, typeorm_1.Column)(),
21
+ __metadata("design:type", String)
22
+ ], AppIntegrationEntity.prototype, "name", void 0);
23
+ __decorate([
24
+ (0, typeorm_1.Column)(),
25
+ __metadata("design:type", Boolean)
26
+ ], AppIntegrationEntity.prototype, "active", void 0);
27
+ __decorate([
28
+ (0, typeorm_1.Column)({ unique: true }),
29
+ __metadata("design:type", String)
30
+ ], AppIntegrationEntity.prototype, "integration_identifier", void 0);
31
+ __decorate([
32
+ (0, typeorm_1.Column)(),
33
+ __metadata("design:type", String)
34
+ ], AppIntegrationEntity.prototype, "url", void 0);
35
+ __decorate([
36
+ (0, typeorm_1.Column)(),
37
+ __metadata("design:type", String)
38
+ ], AppIntegrationEntity.prototype, "image", void 0);
39
+ __decorate([
40
+ (0, typeorm_1.Column)(),
41
+ __metadata("design:type", String)
42
+ ], AppIntegrationEntity.prototype, "description", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.Column)('json'),
45
+ __metadata("design:type", app_integration_attributes_dto_1.AppIntegrationAttributesDto)
46
+ ], AppIntegrationEntity.prototype, "attributes", void 0);
47
+ exports.AppIntegrationEntity = AppIntegrationEntity = __decorate([
48
+ (0, typeorm_1.Entity)('utl_app_integrations')
49
+ ], AppIntegrationEntity);
50
+ //# sourceMappingURL=app.integration.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.integration.entity.js","sourceRoot":"","sources":["../../../src/access/entities/app.integration.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oFAAsE;AACtE,qCAAyC;AACzC,2FAAqF;AAS9E,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,sCAAY;CAqBrD,CAAA;AArBY,oDAAoB;AAE7B;IADC,IAAA,gBAAM,GAAE;;kDACI;AAGb;IADC,IAAA,gBAAM,GAAE;;oDACO;AAGhB;IADC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;oEACM;AAG/B;IADC,IAAA,gBAAM,GAAE;;iDACG;AAGZ;IADC,IAAA,gBAAM,GAAE;;mDACK;AAGd;IADC,IAAA,gBAAM,GAAE;;yDACW;AAGpB;IADC,IAAA,gBAAM,EAAC,MAAM,CAAC;8BACH,4DAA2B;wDAAC;+BApB/B,oBAAoB;IADhC,IAAA,gBAAM,EAAC,sBAAsB,CAAC;GAClB,oBAAoB,CAqBhC"}
@@ -0,0 +1,11 @@
1
+ import { CommonEntity } from '@servicelabsco/nestjs-utility-services';
2
+ import { BusinessAppIntegrationCredentialAttributesDto } from '../dtos/business.app.integration.credential.attributes.dto';
3
+ import { BusinessAppIntegrationEntity } from './business.app.integration.entity';
4
+ export declare class BusinessAppIntegrationCredentialEntity extends CommonEntity {
5
+ business_integration_id: number;
6
+ refresh_token: string;
7
+ access_token: string;
8
+ expiry_at: Date;
9
+ attributes: BusinessAppIntegrationCredentialAttributesDto;
10
+ business_integration: BusinessAppIntegrationEntity;
11
+ }
@@ -0,0 +1,48 @@
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.BusinessAppIntegrationCredentialEntity = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
15
+ const business_app_integration_credential_attributes_dto_1 = require("../dtos/business.app.integration.credential.attributes.dto");
16
+ const business_app_integration_entity_1 = require("./business.app.integration.entity");
17
+ let BusinessAppIntegrationCredentialEntity = class BusinessAppIntegrationCredentialEntity extends nestjs_utility_services_1.CommonEntity {
18
+ };
19
+ exports.BusinessAppIntegrationCredentialEntity = BusinessAppIntegrationCredentialEntity;
20
+ __decorate([
21
+ (0, typeorm_1.Column)(),
22
+ __metadata("design:type", Number)
23
+ ], BusinessAppIntegrationCredentialEntity.prototype, "business_integration_id", void 0);
24
+ __decorate([
25
+ (0, typeorm_1.Column)(),
26
+ __metadata("design:type", String)
27
+ ], BusinessAppIntegrationCredentialEntity.prototype, "refresh_token", void 0);
28
+ __decorate([
29
+ (0, typeorm_1.Column)(),
30
+ __metadata("design:type", String)
31
+ ], BusinessAppIntegrationCredentialEntity.prototype, "access_token", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.Column)(),
34
+ __metadata("design:type", Date)
35
+ ], BusinessAppIntegrationCredentialEntity.prototype, "expiry_at", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.Column)('json'),
38
+ __metadata("design:type", business_app_integration_credential_attributes_dto_1.BusinessAppIntegrationCredentialAttributesDto)
39
+ ], BusinessAppIntegrationCredentialEntity.prototype, "attributes", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.ManyToOne)(() => business_app_integration_entity_1.BusinessAppIntegrationEntity),
42
+ (0, typeorm_1.JoinColumn)({ name: 'business_integration_id' }),
43
+ __metadata("design:type", business_app_integration_entity_1.BusinessAppIntegrationEntity)
44
+ ], BusinessAppIntegrationCredentialEntity.prototype, "business_integration", void 0);
45
+ exports.BusinessAppIntegrationCredentialEntity = BusinessAppIntegrationCredentialEntity = __decorate([
46
+ (0, typeorm_1.Entity)('bz_app_integrations_credentials')
47
+ ], BusinessAppIntegrationCredentialEntity);
48
+ //# sourceMappingURL=business.app.integration.credential.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"business.app.integration.credential.entity.js","sourceRoot":"","sources":["../../../src/access/entities/business.app.integration.credential.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgE;AAChE,oFAAsE;AACtE,mIAA2H;AAC3H,uFAAiF;AAS1E,IAAM,sCAAsC,GAA5C,MAAM,sCAAuC,SAAQ,sCAAY;CAsBvE,CAAA;AAtBY,wFAAsC;AAE/C;IADC,IAAA,gBAAM,GAAE;;uFACuB;AAGhC;IADC,IAAA,gBAAM,GAAE;;6EACa;AAGtB;IADC,IAAA,gBAAM,GAAE;;4EACY;AAGrB;IADC,IAAA,gBAAM,GAAE;8BACE,IAAI;yEAAC;AAGhB;IADC,IAAA,gBAAM,EAAC,MAAM,CAAC;8BACH,kGAA6C;0EAAC;AAK1D;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,8DAA4B,CAAC;IAC7C,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,yBAAyB,EAAE,CAAC;8BAC1B,8DAA4B;oFAAC;iDAnB1C,sCAAsC;IADlD,IAAA,gBAAM,EAAC,iCAAiC,CAAC;GAC7B,sCAAsC,CAsBlD"}
@@ -0,0 +1,14 @@
1
+ import { CommonEntity } from '@servicelabsco/nestjs-utility-services';
2
+ import { BusinessAppIntegrationAttributesDto } from '../dtos/business.app.integration.attributes.dto';
3
+ import { AppIntegrationEntity } from './app.integration.entity';
4
+ import { AccessBusinessEntity } from './access.business.entity';
5
+ export declare class BusinessAppIntegrationEntity extends CommonEntity {
6
+ business_id: number;
7
+ integration_id: number;
8
+ name: string;
9
+ description: string;
10
+ active: boolean;
11
+ attributes: BusinessAppIntegrationAttributesDto;
12
+ business: AccessBusinessEntity;
13
+ integration: AppIntegrationEntity;
14
+ }