@servicelabsco/slabs-access-manager 0.1.139 → 0.1.140
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.
- package/dist/access/controllers/business.app.integration.controller.d.ts +2 -6
- package/dist/access/controllers/business.app.integration.controller.js +7 -33
- package/dist/access/controllers/business.app.integration.controller.js.map +1 -1
- package/dist/access/controllers/common.webhook.controller.d.ts +6 -2
- package/dist/access/controllers/common.webhook.controller.js +27 -4
- package/dist/access/controllers/common.webhook.controller.js.map +1 -1
- package/dist/access/entities/business.app.integration.credential.entity.js +1 -1
- package/dist/access/entities/business.app.integration.credential.entity.js.map +1 -1
- package/dist/access/es6.classes.d.ts +7 -4
- package/dist/access/es6.classes.js +7 -1
- package/dist/access/es6.classes.js.map +1 -1
- package/dist/access/libraries/index.d.ts +2 -0
- package/dist/access/libraries/index.js +2 -0
- package/dist/access/libraries/index.js.map +1 -1
- package/dist/access/libraries/process.app.integration.d.ts +17 -0
- package/dist/access/libraries/process.app.integration.js +62 -0
- package/dist/access/libraries/process.app.integration.js.map +1 -0
- package/dist/access/libraries/process.notification.js +1 -1
- package/dist/access/libraries/process.notification.js.map +1 -1
- package/dist/access/libraries/process.slack.integration.d.ts +7 -5
- package/dist/access/libraries/process.slack.integration.js +9 -12
- package/dist/access/libraries/process.slack.integration.js.map +1 -1
- package/dist/access/libraries/process.zoho.integration.d.ts +19 -0
- package/dist/access/libraries/process.zoho.integration.js +87 -0
- package/dist/access/libraries/process.zoho.integration.js.map +1 -0
- package/dist/access/services/access.business.service.d.ts +4 -2
- package/dist/access/services/access.business.service.js +14 -2
- package/dist/access/services/access.business.service.js.map +1 -1
- package/dist/access/services/app.integration.service.d.ts +9 -0
- package/dist/access/services/app.integration.service.js +63 -0
- package/dist/access/services/app.integration.service.js.map +1 -0
- package/dist/access/services/index.d.ts +1 -0
- package/dist/access/services/index.js +1 -0
- package/dist/access/services/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropertyService, SqlService } from '@servicelabsco/nestjs-utility-services';
|
|
2
|
-
import {
|
|
2
|
+
import { Response } from 'express';
|
|
3
3
|
import { BusinessParamDto } from '../dtos/business.param.dto';
|
|
4
4
|
import { DbFindDto } from '../dtos/db.find.dto';
|
|
5
5
|
import { AppIntegrationEntity } from '../entities/app.integration.entity';
|
|
@@ -13,11 +13,7 @@ export declare class BusinessAppIntegrationController {
|
|
|
13
13
|
search(): Promise<BusinessAppIntegrationEntity[]>;
|
|
14
14
|
find(body: DbFindDto): Promise<any>;
|
|
15
15
|
integrations(): Promise<AppIntegrationEntity[]>;
|
|
16
|
-
integrateSlack(): Promise<
|
|
17
|
-
client_id: string;
|
|
18
|
-
scope: string;
|
|
19
|
-
}>;
|
|
16
|
+
integrateSlack(params: BusinessParamDto, res: Response): Promise<void | BusinessAppIntegrationEntity>;
|
|
20
17
|
show(params: BusinessParamDto): Promise<BusinessAppIntegrationEntity>;
|
|
21
|
-
initializeIntegration(body: AddBusinessAppIntegrationDto): Promise<BusinessAppIntegrationEntity>;
|
|
22
18
|
revokeIntegration(params: BusinessParamDto): Promise<BusinessAppIntegrationEntity>;
|
|
23
19
|
}
|
|
@@ -15,14 +15,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.BusinessAppIntegrationController = void 0;
|
|
16
16
|
const common_1 = require("@nestjs/common");
|
|
17
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
18
|
const business_param_dto_1 = require("../dtos/business.param.dto");
|
|
21
19
|
const db_find_dto_1 = require("../dtos/db.find.dto");
|
|
22
20
|
const app_integration_entity_1 = require("../entities/app.integration.entity");
|
|
23
21
|
const business_app_integration_entity_1 = require("../entities/business.app.integration.entity");
|
|
22
|
+
const process_app_integration_1 = require("../libraries/process.app.integration");
|
|
24
23
|
const process_db_find_1 = require("../libraries/process.db.find");
|
|
25
|
-
const process_whatsapp_integration_1 = require("../libraries/process.whatsapp.integration");
|
|
26
24
|
const access_business_service_1 = require("../services/access.business.service");
|
|
27
25
|
let BusinessAppIntegrationController = class BusinessAppIntegrationController {
|
|
28
26
|
constructor(accessBusinessService, sqlService, propertyService) {
|
|
@@ -52,35 +50,16 @@ let BusinessAppIntegrationController = class BusinessAppIntegrationController {
|
|
|
52
50
|
await this.accessBusinessService.validateAccess();
|
|
53
51
|
return app_integration_entity_1.AppIntegrationEntity.find({ where: { active: true } });
|
|
54
52
|
}
|
|
55
|
-
async integrateSlack() {
|
|
53
|
+
async integrateSlack(params, res) {
|
|
56
54
|
const business = await this.accessBusinessService.validateAccess();
|
|
57
55
|
if (!business)
|
|
58
56
|
return;
|
|
59
|
-
|
|
60
|
-
const scope = await this.propertyService.get('slack.access.scope');
|
|
61
|
-
if (!clientId)
|
|
62
|
-
throw new nestjs_utility_services_1.OperationException('No Client Id');
|
|
63
|
-
return {
|
|
64
|
-
client_id: clientId,
|
|
65
|
-
scope: scope,
|
|
66
|
-
};
|
|
57
|
+
return new process_app_integration_1.ProcessAppIntegration(business, this.propertyService, res).process(params.id);
|
|
67
58
|
}
|
|
68
59
|
async show(params) {
|
|
69
60
|
const business = await this.accessBusinessService.validateAccess();
|
|
70
61
|
return business_app_integration_entity_1.BusinessAppIntegrationEntity.findOne({ where: { id: params.id, business_id: business.id } });
|
|
71
62
|
}
|
|
72
|
-
async initializeIntegration(body) {
|
|
73
|
-
const business = await this.accessBusinessService.validateAccess();
|
|
74
|
-
const integration = await app_integration_entity_1.AppIntegrationEntity.findOne({ where: { id: body.integration_id } });
|
|
75
|
-
if (!integration)
|
|
76
|
-
throw new nestjs_utility_services_1.OperationException('There is no any integration');
|
|
77
|
-
switch (integration.integration_identifier) {
|
|
78
|
-
case integration_type_constant_1.IntegrationIdentifierConstants.whatsapp:
|
|
79
|
-
return new process_whatsapp_integration_1.ProcessWhatsappIntegration(business).handle(integration.id);
|
|
80
|
-
default:
|
|
81
|
-
break;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
63
|
async revokeIntegration(params) {
|
|
85
64
|
const business = await this.accessBusinessService.validateAccess();
|
|
86
65
|
const bz_integration = await business_app_integration_entity_1.BusinessAppIntegrationEntity.findOne({ where: { id: params.id, business_id: business.id } });
|
|
@@ -111,9 +90,11 @@ __decorate([
|
|
|
111
90
|
__metadata("design:returntype", Promise)
|
|
112
91
|
], BusinessAppIntegrationController.prototype, "integrations", null);
|
|
113
92
|
__decorate([
|
|
114
|
-
(0, common_1.Post)('
|
|
93
|
+
(0, common_1.Post)(':id/integrate'),
|
|
94
|
+
__param(0, (0, common_1.Param)()),
|
|
95
|
+
__param(1, (0, common_1.Res)()),
|
|
115
96
|
__metadata("design:type", Function),
|
|
116
|
-
__metadata("design:paramtypes", []),
|
|
97
|
+
__metadata("design:paramtypes", [business_param_dto_1.BusinessParamDto, Object]),
|
|
117
98
|
__metadata("design:returntype", Promise)
|
|
118
99
|
], BusinessAppIntegrationController.prototype, "integrateSlack", null);
|
|
119
100
|
__decorate([
|
|
@@ -123,13 +104,6 @@ __decorate([
|
|
|
123
104
|
__metadata("design:paramtypes", [business_param_dto_1.BusinessParamDto]),
|
|
124
105
|
__metadata("design:returntype", Promise)
|
|
125
106
|
], BusinessAppIntegrationController.prototype, "show", null);
|
|
126
|
-
__decorate([
|
|
127
|
-
(0, common_1.Post)(),
|
|
128
|
-
__param(0, (0, common_1.Body)()),
|
|
129
|
-
__metadata("design:type", Function),
|
|
130
|
-
__metadata("design:paramtypes", [add_business_app_integration_dto_1.AddBusinessAppIntegrationDto]),
|
|
131
|
-
__metadata("design:returntype", Promise)
|
|
132
|
-
], BusinessAppIntegrationController.prototype, "initializeIntegration", null);
|
|
133
107
|
__decorate([
|
|
134
108
|
(0, common_1.Post)(':id/revoke'),
|
|
135
109
|
__param(0, (0, common_1.Param)()),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business.app.integration.controller.js","sourceRoot":"","sources":["../../../src/access/controllers/business.app.integration.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"business.app.integration.controller.js","sourceRoot":"","sources":["../../../src/access/controllers/business.app.integration.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAyE;AACzE,oFAAyG;AAEzG,mEAA8D;AAC9D,qDAAgD;AAEhD,+EAA0E;AAC1E,iGAA2F;AAC3F,kFAA6E;AAC7E,kEAA6D;AAC7D,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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E,MAAM,CAAC,EAAE,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QAC1H,IAAI,CAAC,cAAc;YAAE,MAAM,IAAI,4CAAkB,CAAC,6BAA6B,CAAC,CAAC;QAEjF,cAAc,CAAC,MAAM,GAAG,KAAK,CAAC;QAE9B,OAAO,cAAc,CAAC,IAAI,EAAE,CAAC;IACjC,CAAC;CACJ,CAAA;AA/DY,4EAAgC;AAQnC;IADL,IAAA,aAAI,EAAC,QAAQ,CAAC;;;;8DAId;AAGK;IADL,IAAA,aAAI,EAAC,MAAM,CAAC;IACD,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,uBAAS;;4DAejC;AAGK;IADL,IAAA,aAAI,EAAC,cAAc,CAAC;;;;oEAIpB;AAGK;IADL,IAAA,aAAI,EAAC,eAAe,CAAC;IACA,WAAA,IAAA,cAAK,GAAE,CAAA;IAA4B,WAAA,IAAA,YAAG,GAAE,CAAA;;qCAAxB,qCAAgB;;sEAKrD;AAGK;IADL,IAAA,YAAG,EAAC,YAAY,CAAC;IACN,WAAA,IAAA,cAAK,GAAE,CAAA;;qCAAS,qCAAgB;;4DAI3C;AAGK;IADL,IAAA,aAAI,EAAC,YAAY,CAAC;IACM,WAAA,IAAA,cAAK,GAAE,CAAA;;qCAAS,qCAAgB;;yEASxD;2CA9DQ,gCAAgC;IAD5C,IAAA,mBAAU,EAAC,mBAAmB,CAAC;qCAGgB,+CAAqB;QAChC,oCAAU;QACL,yCAAe;GAJ5C,gCAAgC,CA+D5C"}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import { PropertyService } from '@servicelabsco/nestjs-utility-services';
|
|
1
|
+
import { PropertyService, RemoteRequestService } from '@servicelabsco/nestjs-utility-services';
|
|
2
2
|
import { Response } from 'express';
|
|
3
3
|
import { PdfDocumentService } from '../../accessUtility/services/pdf.document.service';
|
|
4
|
+
import { AccessBusinessService } from '../services/access.business.service';
|
|
4
5
|
export declare class CommonWebhookController {
|
|
5
6
|
private readonly propertyService;
|
|
6
7
|
private readonly pdfDocumentService;
|
|
7
|
-
|
|
8
|
+
private readonly accessBusinessService;
|
|
9
|
+
private readonly remoteRequestService;
|
|
10
|
+
constructor(propertyService: PropertyService, pdfDocumentService: PdfDocumentService, accessBusinessService: AccessBusinessService, remoteRequestService: RemoteRequestService);
|
|
8
11
|
slackIntegration(queries: any, res: Response): Promise<void>;
|
|
12
|
+
zohoIntegration(queries: any, res: Response): Promise<void>;
|
|
9
13
|
htmlToPdf(body: any): Promise<{
|
|
10
14
|
success: boolean;
|
|
11
15
|
}>;
|
|
@@ -17,10 +17,14 @@ const common_1 = require("@nestjs/common");
|
|
|
17
17
|
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
18
18
|
const pdf_document_service_1 = require("../../accessUtility/services/pdf.document.service");
|
|
19
19
|
const process_slack_integration_1 = require("../libraries/process.slack.integration");
|
|
20
|
+
const access_business_service_1 = require("../services/access.business.service");
|
|
21
|
+
const process_zoho_integration_1 = require("../libraries/process.zoho.integration");
|
|
20
22
|
let CommonWebhookController = class CommonWebhookController {
|
|
21
|
-
constructor(propertyService, pdfDocumentService) {
|
|
23
|
+
constructor(propertyService, pdfDocumentService, accessBusinessService, remoteRequestService) {
|
|
22
24
|
this.propertyService = propertyService;
|
|
23
25
|
this.pdfDocumentService = pdfDocumentService;
|
|
26
|
+
this.accessBusinessService = accessBusinessService;
|
|
27
|
+
this.remoteRequestService = remoteRequestService;
|
|
24
28
|
}
|
|
25
29
|
async slackIntegration(queries, res) {
|
|
26
30
|
if (!queries)
|
|
@@ -28,7 +32,15 @@ let CommonWebhookController = class CommonWebhookController {
|
|
|
28
32
|
const { state, code } = queries;
|
|
29
33
|
if (!code || !state)
|
|
30
34
|
throw new nestjs_utility_services_1.OperationException('Invalid Request');
|
|
31
|
-
return new process_slack_integration_1.ProcessSlackIntegration(this.propertyService).handle(code, state, res);
|
|
35
|
+
return new process_slack_integration_1.ProcessSlackIntegration(this.propertyService, this.accessBusinessService).handle(code, state, res);
|
|
36
|
+
}
|
|
37
|
+
async zohoIntegration(queries, res) {
|
|
38
|
+
if (!queries)
|
|
39
|
+
return;
|
|
40
|
+
const { state, code } = queries;
|
|
41
|
+
if (!code || !state)
|
|
42
|
+
throw new nestjs_utility_services_1.OperationException('Invalid Request');
|
|
43
|
+
return new process_zoho_integration_1.ProcessZohoIntegration(this.propertyService, this.accessBusinessService, this.remoteRequestService).handle(code, state, res);
|
|
32
44
|
}
|
|
33
45
|
async htmlToPdf(body) {
|
|
34
46
|
await this.pdfDocumentService.uploadToTheSystem(body);
|
|
@@ -47,6 +59,15 @@ __decorate([
|
|
|
47
59
|
__metadata("design:paramtypes", [Object, Object]),
|
|
48
60
|
__metadata("design:returntype", Promise)
|
|
49
61
|
], CommonWebhookController.prototype, "slackIntegration", null);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, common_1.Get)('integrate-zoho'),
|
|
64
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
65
|
+
__param(0, (0, common_1.Query)()),
|
|
66
|
+
__param(1, (0, common_1.Res)()),
|
|
67
|
+
__metadata("design:type", Function),
|
|
68
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
69
|
+
__metadata("design:returntype", Promise)
|
|
70
|
+
], CommonWebhookController.prototype, "zohoIntegration", null);
|
|
50
71
|
__decorate([
|
|
51
72
|
(0, common_1.Post)('html-to-pdf'),
|
|
52
73
|
__param(0, (0, common_1.Body)()),
|
|
@@ -55,8 +76,10 @@ __decorate([
|
|
|
55
76
|
__metadata("design:returntype", Promise)
|
|
56
77
|
], CommonWebhookController.prototype, "htmlToPdf", null);
|
|
57
78
|
exports.CommonWebhookController = CommonWebhookController = __decorate([
|
|
58
|
-
(0, common_1.Controller)('
|
|
79
|
+
(0, common_1.Controller)('webhook'),
|
|
59
80
|
__metadata("design:paramtypes", [nestjs_utility_services_1.PropertyService,
|
|
60
|
-
pdf_document_service_1.PdfDocumentService
|
|
81
|
+
pdf_document_service_1.PdfDocumentService,
|
|
82
|
+
access_business_service_1.AccessBusinessService,
|
|
83
|
+
nestjs_utility_services_1.RemoteRequestService])
|
|
61
84
|
], CommonWebhookController);
|
|
62
85
|
//# sourceMappingURL=common.webhook.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.webhook.controller.js","sourceRoot":"","sources":["../../../src/access/controllers/common.webhook.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA+F;AAC/F,
|
|
1
|
+
{"version":3,"file":"common.webhook.controller.js","sourceRoot":"","sources":["../../../src/access/controllers/common.webhook.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA+F;AAC/F,oFAAmH;AAEnH,4FAAuF;AACvF,sFAAiF;AACjF,iFAA4E;AAC5E,oFAA+E;AAQxE,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAChC,YACqB,eAAgC,EAChC,kBAAsC,EACtC,qBAA4C,EAC5C,oBAA0C;QAH1C,oBAAe,GAAf,eAAe,CAAiB;QAChC,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,0BAAqB,GAArB,qBAAqB,CAAuB;QAC5C,yBAAoB,GAApB,oBAAoB,CAAsB;IAC5D,CAAC;IAIE,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,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;IAClH,CAAC;IAIK,AAAN,KAAK,CAAC,e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metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.BusinessAppIntegrationCredentialEntity = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
13
|
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
15
|
const business_app_integration_credential_attributes_dto_1 = require("../dtos/business.app.integration.credential.attributes.dto");
|
|
16
16
|
const business_app_integration_entity_1 = require("./business.app.integration.entity");
|
|
17
17
|
let BusinessAppIntegrationCredentialEntity = class BusinessAppIntegrationCredentialEntity extends nestjs_utility_services_1.CommonEntity {
|
|
@@ -1 +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,
|
|
1
|
+
{"version":3,"file":"business.app.integration.credential.entity.js","sourceRoot":"","sources":["../../../src/access/entities/business.app.integration.credential.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oFAAsE;AACtE,qCAAgE;AAChE,mIAA2H;AAC3H,uFAAiF;AAS1E,IAAM,sCAAsC,GAA5C,MAAM,sCAAuC,SAAQ,sCAAY;CAoBvE,CAAA;AApBY,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,gCAAgC,CAAC;GAC5B,sCAAsC,CAoBlD"}
|
|
@@ -183,6 +183,7 @@ import { CommonTagController } from './libraries/common.tag.controller';
|
|
|
183
183
|
import { ConversationController } from './libraries/conversation.controller';
|
|
184
184
|
import { ProcessApiAccountData } from './libraries/process.api.account.data';
|
|
185
185
|
import { ProcessApiAccountList } from './libraries/process.api.account.list';
|
|
186
|
+
import { ProcessAppIntegration } from './libraries/process.app.integration';
|
|
186
187
|
import { ProcessApplicationMenu } from './libraries/process.application.menu';
|
|
187
188
|
import { ProcessBulkUploadItemList } from './libraries/process.bulk.upload.item.list';
|
|
188
189
|
import { ProcessBulkUploadList } from './libraries/process.bulk.upload.list';
|
|
@@ -199,8 +200,8 @@ import { ProcessCreateDashboardComponent } from './libraries/process.create.dash
|
|
|
199
200
|
import { ProcessCustomFieldCreation } from './libraries/process.custom.field.creation';
|
|
200
201
|
import { ProcessCustomFieldList } from './libraries/process.custom.field.list';
|
|
201
202
|
import { ProcessDashboardComponent } from './libraries/process.dashboard.component';
|
|
202
|
-
import { ProcessDashboardReport } from './libraries/process.dashboard.report';
|
|
203
203
|
import { ProcessDashboardReportData } from './libraries/process.dashboard.report.data';
|
|
204
|
+
import { ProcessDashboardReport } from './libraries/process.dashboard.report';
|
|
204
205
|
import { ProcessDateFilter } from './libraries/process.date.filter';
|
|
205
206
|
import { ProcessDbFind } from './libraries/process.db.find';
|
|
206
207
|
import { ProcessDownloadLogList } from './libraries/process.download.log.list';
|
|
@@ -222,6 +223,7 @@ import { ProcessTestList } from './libraries/process.test.list';
|
|
|
222
223
|
import { ProcessUserGroupCreation } from './libraries/process.user.group.creation';
|
|
223
224
|
import { ProcessUserNotificationList } from './libraries/process.user.notification.list';
|
|
224
225
|
import { ProcessWhatsappIntegration } from './libraries/process.whatsapp.integration';
|
|
226
|
+
import { ProcessZohoIntegration } from './libraries/process.zoho.integration';
|
|
225
227
|
import { SendEmailNotification } from './libraries/send.email.notification';
|
|
226
228
|
import { SendFcmNotification } from './libraries/send.fcm.notification';
|
|
227
229
|
import { SendGchatMessageNotification } from './libraries/send.gchat.message.notification';
|
|
@@ -237,6 +239,7 @@ import { ExternalAccessMiddleware } from './middlewares/external.access.middlewa
|
|
|
237
239
|
import { AccessBusinessService } from './services/access.business.service';
|
|
238
240
|
import { AccessReportService } from './services/access.report.service';
|
|
239
241
|
import { ApiAccountService } from './services/api.account.service';
|
|
242
|
+
import { AppIntegrationService } from './services/app.integration.service';
|
|
240
243
|
import { AuditLogService } from './services/audit.log.service';
|
|
241
244
|
import { BusinessPreferenceService } from './services/business.preference.service';
|
|
242
245
|
import { BusinessUserRoleService } from './services/business.user.role.service';
|
|
@@ -327,13 +330,13 @@ import { WhatsappTemplateSubscriber } from './subscribers/whatsapp.template.subs
|
|
|
327
330
|
declare const es6Classes: {
|
|
328
331
|
commands: (typeof WebhookPollCommand)[];
|
|
329
332
|
controllers: (typeof AccessMenuController | typeof ApiAccountController | typeof BulkUploadController | typeof BulkUploadItemController | typeof BusinessAppIntegrationController | typeof BusinessPreferenceController | typeof BusinessUserGroupController | typeof ChoiceListController | typeof ChoiceTypeController | typeof CommonWebhookController | typeof CustomFieldController | typeof DashboardBuilderController | typeof DashboardComponentController | typeof DashboardController | typeof DashboardReportController | typeof DeveloperModeController | typeof DownloadLogController | typeof FcmTokenController | typeof GroupMemberController | typeof GroupRoleController | typeof ListingController | typeof ListingPreferenceController | typeof ScheduledReportController | typeof ScheduledReportItemController | typeof TagController | typeof UserNotificationController | typeof UserPreferenceController)[];
|
|
330
|
-
dtos: (typeof FcmTemplateAttributesDto | typeof NotificationPayloadDto | typeof SendEmailNotificationDataDto | typeof GchatPostingPayloadDto | typeof AddShortUrlDto | typeof BankAccountPayloadDto | typeof RecurringDefinitionDto | typeof AccessBusinessParamDto | typeof DateRangeFilterDto | typeof DateFilterDto | typeof ListResponseFormatDto | typeof NumberRangeFilterDto | typeof CommonListFilterDto | typeof DbFindDto | typeof ListResponseDto | typeof AddListingPreferenceDto | typeof ProcessCommonListConfigDto | typeof
|
|
333
|
+
dtos: (typeof FcmTemplateAttributesDto | typeof NotificationPayloadDto | typeof SendEmailNotificationDataDto | typeof GchatPostingPayloadDto | typeof AddShortUrlDto | typeof BankAccountPayloadDto | typeof RecurringDefinitionDto | typeof AccessBusinessParamDto | typeof DateRangeFilterDto | typeof DateFilterDto | typeof ListResponseFormatDto | typeof NumberRangeFilterDto | typeof CommonListFilterDto | typeof DbFindDto | typeof ListResponseDto | typeof AddListingPreferenceDto | typeof ProcessCommonListConfigDto | typeof AddBusinessPreferenceDto | typeof ModifyCustomFieldStatusDto | typeof GetScriptValuesDto | typeof AddDashboardComponentPropertiesDto | typeof AddDashboardComponentDto | typeof StringSearchDto | typeof EditQueryDto | typeof TokenPayloadDto | typeof AddGroupMemberDto | typeof AddRoleDto | typeof AddScheduledReportDto | typeof AddBusinessAppIntegrationDto | typeof AddConversationDto | typeof AddTagDto | typeof BusinessAppIntegrationMessagePayloadDto | typeof ProcessListingPayloadDto | typeof ServerEmailRecipientsDto | typeof ServerEmailMessageDto | typeof SlackMessageDataDto)[];
|
|
331
334
|
entities: (typeof AccessBusinessEntity | typeof BusinessUserEntity | typeof ProductEntity | typeof GchatUserEntity | typeof GchatMessageEntity | typeof GchatWebhookMessageEntity | typeof SlackIntegrationEntity | typeof SlackMessageEntity | typeof SlackUserEntity | typeof WhatsappMessageEntity | typeof WhatsappPreferenceEntity | typeof FcmMessageEntity | typeof FcmTokenEntity | typeof BusinessAppIntegrationCredentialEntity | typeof BusinessAppIntegrationMessagesEntity | typeof BusinessEmailEntity | typeof BusinessGroupRoleEntity | typeof GroupRoleEntity | typeof BusinessUserRoleEntity | typeof MenuRoleEntity | typeof MenuEntity | typeof UiActionRoleEntity | typeof MenuActionEntity | typeof ChildMenuEntity | typeof ConversationEntity | typeof DashboardComponentEntity | typeof DownloadLogEntity | typeof EmailRecipientEntity | typeof EmailMessageEntity | typeof GroupMemberEntity | typeof PreferenceUserEntity | typeof PreferenceUserGroupEntity | typeof ModuleMenuEntity | typeof ScheduledReportEntity | typeof ScheduledReportEmailEntity | typeof ScheduledReportItemEntity | typeof SlackWebhookMessageEntity | typeof UserNotificationEntity | typeof UserRoleEntity | typeof WatchlistAssignmentEntity | typeof WebhookSlugEntity)[];
|
|
332
335
|
enums: (typeof NotificationTypeEnum | typeof RecurringPeriodEnum | typeof CustomColumnTypeEnum | typeof PlatformTypeEnum)[];
|
|
333
336
|
jobs: (typeof AccessTestJob | typeof ApiAccountJob | typeof AppIntegrationJob | typeof BusinessAppIntegrationCredentialJob | typeof BusinessAppIntegrationJob | typeof BusinessAppIntegrationMessagesJob | typeof BusinessEmailJob | typeof BusinessGroupRoleJob | typeof BusinessPreferenceJob | typeof BusinessUserGroupJob | typeof BusinessUserJob | typeof BusinessUserRoleJob | typeof ChildMenuJob | typeof ChoiceListJob | typeof ChoiceTypeJob | typeof ConversationJob | typeof CustomFieldJob | typeof CustomReportJob | typeof DashboardComponentJob | typeof DashboardJob | typeof DownloadLogJob | typeof EmailAttachmentJob | typeof EmailMessageJob | typeof EmailRecipientJob | typeof FcmMessageJob | typeof FcmNotificationJob | typeof FcmTemplateJob | typeof FcmTokenJob | typeof GchatIncomingWebhookJob | typeof GchatMessageJob | typeof GchatTemplateJob | typeof GchatUserJob | typeof GchatWebhookJob | typeof GchatWebhookMessageJob | typeof GroupMemberJob | typeof GroupRoleJob | typeof ListPreferenceJob | typeof ListingColumnJob | typeof ListingPageJob | typeof ListingPreferenceJob | typeof MenuActionJob | typeof MenuJob | typeof MenuRoleJob | typeof ModuleJob | typeof ModuleMenuJob | typeof PreferenceUserGroupJob | typeof PreferenceUsersJob | typeof ProcessServerEmailJob | typeof ProductJob | typeof RoleGroupJob | typeof ScheduledReportEmailJob | typeof ScheduledReportItemJob | typeof ScheduledReportJob | typeof SlackIncomingWebhookJob | typeof SlackIntegrationJob | typeof SlackMessageJob | typeof SlackTemplateJob | typeof SlackUserJob | typeof SlackWebhookJob | typeof SlackWebhookMessageJob | typeof SyncBURoleJob | typeof UiActionJob | typeof UiActionRoleJob | typeof UserNotificationJob | typeof UserPreferenceJob | typeof UserRoleJob | typeof WatchlistAssignmentJob | typeof WebhookSlugJob | typeof WebhookTypeJob | typeof WhatsappIncomingWebhookJob | typeof WhatsappMessageJob | typeof WhatsappTemplateJob)[];
|
|
334
|
-
libraries: (typeof ProcessEmailNotification | typeof SendEmailNotification | typeof SendGchatMessageNotification | typeof SendGchatWebhookNotification | typeof SendSlackMessageNotification | typeof SendSlackWebhookNotification | typeof SendWhatsappMessageNotification | typeof SendFcmNotification | typeof ProcessApplicationMenu | typeof ProcessMenuDetails | typeof ProcessApiAccountData | typeof ProcessListingCsvFile | typeof ProcessDateFilter | typeof ProcessCommonList | typeof ProcessApiAccountList | typeof ProcessDbFind | typeof ProcessBulkUploadList | typeof ProcessBulkUploadItemList | typeof ProcessWhatsappIntegration | typeof ProcessBusinessUserGroupList | typeof ProcessUserGroupCreation | typeof ProcessChoiceListData | typeof ProcessChoiceTypeList | typeof ProcessChoiceTypeData | typeof ProcessSlackIntegration | typeof ProcessCustomFieldList | typeof ProcessCustomFieldCreation | typeof ProcessDashboardReportData | typeof ProcessReportData | typeof ProcessCreateDashboardComponent | typeof ProcessDashboardComponent | typeof ProcessDashboardReport | typeof ProcessDownloadLogList | typeof SetFcmToken | typeof ProcessGroupMemberList | typeof ProcessGroupRoleList | typeof ProcessPreferenceData | typeof ProcessScheduledReportData | typeof ProcessScheduledReportList | typeof ProcessScheduledReportItemList | typeof ProcessUserNotificationList | typeof ProcessBusinessGroupRoleUpdation | typeof ProcessBusinessUserRoleUpdate | typeof ProcessGroupMemberUpdation | typeof SyncBusinessUserRole | typeof CommonTagController | typeof ProcessConversationData | typeof ConversationController | typeof ValidateCustomFieldData | typeof ProcessCommonCustomField | typeof ProcessNotification | typeof ProcessSlackMessage | typeof ProcessTestList)[];
|
|
337
|
+
libraries: (typeof ProcessEmailNotification | typeof SendEmailNotification | typeof SendGchatMessageNotification | typeof SendGchatWebhookNotification | typeof SendSlackMessageNotification | typeof SendSlackWebhookNotification | typeof SendWhatsappMessageNotification | typeof SendFcmNotification | typeof ProcessApplicationMenu | typeof ProcessMenuDetails | typeof ProcessApiAccountData | typeof ProcessListingCsvFile | typeof ProcessDateFilter | typeof ProcessCommonList | typeof ProcessApiAccountList | typeof ProcessDbFind | typeof ProcessBulkUploadList | typeof ProcessBulkUploadItemList | typeof ProcessWhatsappIntegration | typeof ProcessAppIntegration | typeof ProcessBusinessUserGroupList | typeof ProcessUserGroupCreation | typeof ProcessChoiceListData | typeof ProcessChoiceTypeList | typeof ProcessChoiceTypeData | typeof ProcessSlackIntegration | typeof ProcessZohoIntegration | typeof ProcessCustomFieldList | typeof ProcessCustomFieldCreation | typeof ProcessDashboardReportData | typeof ProcessReportData | typeof ProcessCreateDashboardComponent | typeof ProcessDashboardComponent | typeof ProcessDashboardReport | typeof ProcessDownloadLogList | typeof SetFcmToken | typeof ProcessGroupMemberList | typeof ProcessGroupRoleList | typeof ProcessPreferenceData | typeof ProcessScheduledReportData | typeof ProcessScheduledReportList | typeof ProcessScheduledReportItemList | typeof ProcessUserNotificationList | typeof ProcessBusinessGroupRoleUpdation | typeof ProcessBusinessUserRoleUpdate | typeof ProcessGroupMemberUpdation | typeof SyncBusinessUserRole | typeof CommonTagController | typeof ProcessConversationData | typeof ConversationController | typeof ValidateCustomFieldData | typeof ProcessCommonCustomField | typeof ProcessNotification | typeof ProcessSlackMessage | typeof ProcessTestList)[];
|
|
335
338
|
middlewares: (typeof BusinessMiddleware | typeof ExternalAccessMiddleware)[];
|
|
336
|
-
services: (typeof SendEmailService | typeof GchatService | typeof SlackService | typeof WhatsappService | typeof NotificationService | typeof SlabsService | typeof WebhookService | typeof AccessBusinessService | typeof ListingService | typeof AuditLogService | typeof AccessReportService | typeof PlatformService | typeof ListingPreferenceService | typeof ScheduledReportService | typeof BusinessUserRoleService | typeof UtilityService | typeof CustomFieldService | typeof ApiAccountService | typeof BusinessPreferenceService | typeof Es6JobsService | typeof GptService | typeof LoadEntityService | typeof UserNotificationService | typeof UserPreferenceService)[];
|
|
339
|
+
services: (typeof SendEmailService | typeof GchatService | typeof SlackService | typeof WhatsappService | typeof NotificationService | typeof SlabsService | typeof WebhookService | typeof AccessBusinessService | typeof ListingService | typeof AuditLogService | typeof AccessReportService | typeof PlatformService | typeof ListingPreferenceService | typeof ScheduledReportService | typeof BusinessUserRoleService | typeof UtilityService | typeof CustomFieldService | typeof ApiAccountService | typeof AppIntegrationService | typeof BusinessPreferenceService | typeof Es6JobsService | typeof GptService | typeof LoadEntityService | typeof UserNotificationService | typeof UserPreferenceService)[];
|
|
337
340
|
subscribers: (typeof ApiAccountSubscriber | typeof AppIntegrationSubscriber | typeof BusinessAppIntegrationCredentialSubscriber | typeof BusinessAppIntegrationMessagesSubscriber | typeof BusinessAppIntegrationSubscriber | typeof BusinessEmailSubscriber | typeof BusinessGroupRoleSubscriber | typeof BusinessPreferenceSubscriber | typeof BusinessUserGroupSubscriber | typeof BusinessUserRoleSubscriber | typeof BusinessUserSubscriber | typeof ChildMenuSubscriber | typeof ChoiceListSubscriber | typeof ChoiceTypeSubscriber | typeof ConversationSubscriber | typeof CustomFieldSubscriber | typeof CustomReportSubscriber | typeof DashboardComponentSubscriber | typeof DashboardSubscriber | typeof DownloadLogSubscriber | typeof EmailAttachmentSubscriber | typeof EmailMessageSubscriber | typeof EmailRecipientSubscriber | typeof FcmMessageSubscriber | typeof FcmNotificationSubscriber | typeof FcmTemplateSubscriber | typeof FcmTokenSubscriber | typeof GchatMessageSubscriber | typeof GchatTemplateSubscriber | typeof GchatUserSubscriber | typeof GchatWebhookMessageSubscriber | typeof GchatWebhookSubscriber | typeof GroupMemberSubscriber | typeof GroupRoleSubscriber | typeof ListPreferenceSubscriber | typeof ListingColumnSubscriber | typeof ListingPageSubscriber | typeof ListingPreferenceSubscriber | typeof MenuActionSubscriber | typeof MenuRoleSubscriber | typeof MenuSubscriber | typeof ModuleMenuSubscriber | typeof ModuleSubscriber | typeof PreferenceUserGroupSubscriber | typeof PreferenceUserSubscriber | typeof ProductSubscriber | typeof RoleGroupSubscriber | typeof ScheduledReportEmailSubscriber | typeof ScheduledReportItemSubscriber | typeof ScheduledReportSubscriber | typeof SlackIntegrationSubscriber | typeof SlackMessageSubscriber | typeof SlackTemplateSubscriber | typeof SlackUserSubscriber | typeof SlackWebhookMessageSubscriber | typeof SlackWebhookSubscriber | typeof UiActionRoleSubscriber | typeof UiActionSubscriber | typeof UserNotificationSubscriber | typeof UserPreferenceSubscriber | typeof UserRoleSubscriber | typeof WatchlistAssignmentSubscriber | typeof WebhookSlugSubscriber | typeof WebhookTypeSubscriber | typeof WhatsappMessageSubscriber | typeof WhatsappTemplateSubscriber)[];
|
|
338
341
|
};
|
|
339
342
|
export default es6Classes;
|
|
@@ -304,6 +304,7 @@ const common_tag_controller_1 = require("./libraries/common.tag.controller");
|
|
|
304
304
|
const conversation_controller_1 = require("./libraries/conversation.controller");
|
|
305
305
|
const process_api_account_data_1 = require("./libraries/process.api.account.data");
|
|
306
306
|
const process_api_account_list_1 = require("./libraries/process.api.account.list");
|
|
307
|
+
const process_app_integration_1 = require("./libraries/process.app.integration");
|
|
307
308
|
const process_application_menu_1 = require("./libraries/process.application.menu");
|
|
308
309
|
const process_bulk_upload_item_list_1 = require("./libraries/process.bulk.upload.item.list");
|
|
309
310
|
const process_bulk_upload_list_1 = require("./libraries/process.bulk.upload.list");
|
|
@@ -320,8 +321,8 @@ const process_create_dashboard_component_1 = require("./libraries/process.create
|
|
|
320
321
|
const process_custom_field_creation_1 = require("./libraries/process.custom.field.creation");
|
|
321
322
|
const process_custom_field_list_1 = require("./libraries/process.custom.field.list");
|
|
322
323
|
const process_dashboard_component_1 = require("./libraries/process.dashboard.component");
|
|
323
|
-
const process_dashboard_report_1 = require("./libraries/process.dashboard.report");
|
|
324
324
|
const process_dashboard_report_data_1 = require("./libraries/process.dashboard.report.data");
|
|
325
|
+
const process_dashboard_report_1 = require("./libraries/process.dashboard.report");
|
|
325
326
|
const process_date_filter_1 = require("./libraries/process.date.filter");
|
|
326
327
|
const process_db_find_1 = require("./libraries/process.db.find");
|
|
327
328
|
const process_download_log_list_1 = require("./libraries/process.download.log.list");
|
|
@@ -343,6 +344,7 @@ const process_test_list_1 = require("./libraries/process.test.list");
|
|
|
343
344
|
const process_user_group_creation_1 = require("./libraries/process.user.group.creation");
|
|
344
345
|
const process_user_notification_list_1 = require("./libraries/process.user.notification.list");
|
|
345
346
|
const process_whatsapp_integration_1 = require("./libraries/process.whatsapp.integration");
|
|
347
|
+
const process_zoho_integration_1 = require("./libraries/process.zoho.integration");
|
|
346
348
|
const send_email_notification_1 = require("./libraries/send.email.notification");
|
|
347
349
|
const send_fcm_notification_1 = require("./libraries/send.fcm.notification");
|
|
348
350
|
const send_gchat_message_notification_1 = require("./libraries/send.gchat.message.notification");
|
|
@@ -358,6 +360,7 @@ const external_access_middleware_1 = require("./middlewares/external.access.midd
|
|
|
358
360
|
const access_business_service_1 = require("./services/access.business.service");
|
|
359
361
|
const access_report_service_1 = require("./services/access.report.service");
|
|
360
362
|
const api_account_service_1 = require("./services/api.account.service");
|
|
363
|
+
const app_integration_service_1 = require("./services/app.integration.service");
|
|
361
364
|
const audit_log_service_1 = require("./services/audit.log.service");
|
|
362
365
|
const business_preference_service_1 = require("./services/business.preference.service");
|
|
363
366
|
const business_user_role_service_1 = require("./services/business.user.role.service");
|
|
@@ -756,6 +759,7 @@ const es6Classes = {
|
|
|
756
759
|
conversation_controller_1.ConversationController,
|
|
757
760
|
process_api_account_data_1.ProcessApiAccountData,
|
|
758
761
|
process_api_account_list_1.ProcessApiAccountList,
|
|
762
|
+
process_app_integration_1.ProcessAppIntegration,
|
|
759
763
|
process_application_menu_1.ProcessApplicationMenu,
|
|
760
764
|
process_bulk_upload_item_list_1.ProcessBulkUploadItemList,
|
|
761
765
|
process_bulk_upload_list_1.ProcessBulkUploadList,
|
|
@@ -795,6 +799,7 @@ const es6Classes = {
|
|
|
795
799
|
process_user_group_creation_1.ProcessUserGroupCreation,
|
|
796
800
|
process_user_notification_list_1.ProcessUserNotificationList,
|
|
797
801
|
process_whatsapp_integration_1.ProcessWhatsappIntegration,
|
|
802
|
+
process_zoho_integration_1.ProcessZohoIntegration,
|
|
798
803
|
send_email_notification_1.SendEmailNotification,
|
|
799
804
|
send_fcm_notification_1.SendFcmNotification,
|
|
800
805
|
send_gchat_message_notification_1.SendGchatMessageNotification,
|
|
@@ -811,6 +816,7 @@ const es6Classes = {
|
|
|
811
816
|
access_business_service_1.AccessBusinessService,
|
|
812
817
|
access_report_service_1.AccessReportService,
|
|
813
818
|
api_account_service_1.ApiAccountService,
|
|
819
|
+
app_integration_service_1.AppIntegrationService,
|
|
814
820
|
audit_log_service_1.AuditLogService,
|
|
815
821
|
business_preference_service_1.BusinessPreferenceService,
|
|
816
822
|
business_user_role_service_1.BusinessUserRoleService,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"es6.classes.js","sourceRoot":"","sources":["../../src/access/es6.classes.ts"],"names":[],"mappings":";;AAAA,0EAAqE;AACrE,iFAA4E;AAC5E,iFAA4E;AAC5E,iFAA4E;AAC5E,2FAAqF;AACrF,2GAAqG;AACrG,iGAA4F;AAC5F,iGAA2F;AAC3F,iFAA4E;AAC5E,iFAA4E;AAC5E,uFAAkF;AAClF,mFAA8E;AAC9E,6FAAwF;AACxF,iGAA4F;AAC5F,6EAAyE;AACzE,2FAAsF;AACtF,uFAAkF;AAClF,mFAA8E;AAC9E,6EAAwE;AACxE,mFAA8E;AAC9E,+EAA0E;AAC1E,yEAAqE;AACrE,+FAA0F;AAC1F,2FAAsF;AACtF,qGAA+F;AAC/F,iEAA6D;AAC7D,6FAAwF;AACxF,yFAAoF;AACpF,gFAA0E;AAC1E,oEAA8D;AAC9D,8FAAuF;AACvF,oFAA8E;AAC9E,oFAA6E;AAC7E,oEAA8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AA2B;QAC3B,6CAAoB;QACpB,yCAAkB;QAClB,gCAAc;QACd,6CAAoB;QACpB,oCAAgB;QAChB,gEAA6B;QAC7B,qDAAwB;QACxB,sCAAiB;QACjB,2CAAmB;QACnB,kEAA8B;QAC9B,gEAA6B;QAC7B,uDAAyB;QACzB,yDAA0B;QAC1B,iDAAsB;QACtB,mDAAuB;QACvB,2CAAmB;QACnB,gEAA6B;QAC7B,iDAAsB;QACtB,kDAAsB;QACtB,yCAAkB;QAClB,yDAA0B;QAC1B,qDAAwB;QACxB,yCAAkB;QAClB,+DAA6B;QAC7B,+CAAqB;QACrB,+CAAqB;QACrB,uDAAyB;QACzB,yDAA0B;KAC7B;CACJ,CAAC;AAEF,kBAAe,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"es6.classes.js","sourceRoot":"","sources":["../../src/access/es6.classes.ts"],"names":[],"mappings":";;AAAA,0EAAqE;AACrE,iFAA4E;AAC5E,iFAA4E;AAC5E,iFAA4E;AAC5E,2FAAqF;AACrF,2GAAqG;AACrG,iGAA4F;AAC5F,iGAA2F;AAC3F,iFAA4E;AAC5E,iFAA4E;AAC5E,uFAAkF;AAClF,mFAA8E;AAC9E,6FAAwF;AACxF,iGAA4F;AAC5F,6EAAyE;AACzE,2FAAsF;AACtF,uFAAkF;AAClF,mFAA8E;AAC9E,6EAAwE;AACxE,mFAA8E;AAC9E,+EAA0E;AAC1E,yEAAqE;AACrE,+FAA0F;AAC1F,2FAAsF;AACtF,qGAA+F;AAC/F,iEAA6D;AAC7D,6FAAwF;AACxF,yFAAoF;AACpF,gFAA0E;AAC1E,oEAA8D;AAC9D,8FAAuF;AACvF,oFAA8E;AAC9E,oFAA6E;AAC7E,oEAA8D;AAC9D,oEAA8D;AAC9D,sEAAiE;AACjE,sEAAgE;AAChE,oFAA8E;AAC9E,0GAAmG;AACnG,sEAAgE;AAChE,kFAA4E;AAC5E,sDAAiD;AACjD,8EAAwE;AACxE,gEAA0D;AAC1D,oDAA+C;AAC/C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gEAA6B;QAC7B,qDAAwB;QACxB,sCAAiB;QACjB,2CAAmB;QACnB,kEAA8B;QAC9B,gEAA6B;QAC7B,uDAAyB;QACzB,yDAA0B;QAC1B,iDAAsB;QACtB,mDAAuB;QACvB,2CAAmB;QACnB,gEAA6B;QAC7B,iDAAsB;QACtB,kDAAsB;QACtB,yCAAkB;QAClB,yDAA0B;QAC1B,qDAAwB;QACxB,yCAAkB;QAClB,+DAA6B;QAC7B,+CAAqB;QACrB,+CAAqB;QACrB,uDAAyB;QACzB,yDAA0B;KAC7B;CACJ,CAAC;AAEF,kBAAe,UAAU,CAAC"}
|
|
@@ -2,6 +2,7 @@ export * from './common.tag.controller';
|
|
|
2
2
|
export * from './conversation.controller';
|
|
3
3
|
export * from './process.api.account.data';
|
|
4
4
|
export * from './process.api.account.list';
|
|
5
|
+
export * from './process.app.integration';
|
|
5
6
|
export * from './process.application.menu';
|
|
6
7
|
export * from './process.bulk.upload.item.list';
|
|
7
8
|
export * from './process.bulk.upload.list';
|
|
@@ -41,6 +42,7 @@ export * from './process.test.list';
|
|
|
41
42
|
export * from './process.user.group.creation';
|
|
42
43
|
export * from './process.user.notification.list';
|
|
43
44
|
export * from './process.whatsapp.integration';
|
|
45
|
+
export * from './process.zoho.integration';
|
|
44
46
|
export * from './send.email.notification';
|
|
45
47
|
export * from './send.fcm.notification';
|
|
46
48
|
export * from './send.gchat.message.notification';
|
|
@@ -18,6 +18,7 @@ __exportStar(require("./common.tag.controller"), exports);
|
|
|
18
18
|
__exportStar(require("./conversation.controller"), exports);
|
|
19
19
|
__exportStar(require("./process.api.account.data"), exports);
|
|
20
20
|
__exportStar(require("./process.api.account.list"), exports);
|
|
21
|
+
__exportStar(require("./process.app.integration"), exports);
|
|
21
22
|
__exportStar(require("./process.application.menu"), exports);
|
|
22
23
|
__exportStar(require("./process.bulk.upload.item.list"), exports);
|
|
23
24
|
__exportStar(require("./process.bulk.upload.list"), exports);
|
|
@@ -57,6 +58,7 @@ __exportStar(require("./process.test.list"), exports);
|
|
|
57
58
|
__exportStar(require("./process.user.group.creation"), exports);
|
|
58
59
|
__exportStar(require("./process.user.notification.list"), exports);
|
|
59
60
|
__exportStar(require("./process.whatsapp.integration"), exports);
|
|
61
|
+
__exportStar(require("./process.zoho.integration"), exports);
|
|
60
62
|
__exportStar(require("./send.email.notification"), exports);
|
|
61
63
|
__exportStar(require("./send.fcm.notification"), exports);
|
|
62
64
|
__exportStar(require("./send.gchat.message.notification"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/access/libraries/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AAAA,4DAA0C;AAAA,6DAA2C;AAAA,6DAA2C;AAAA,6DAA2C;AAAA,kEAAgD;AAAA,6DAA2C;AAAA,yEAAuD;AAAA,qEAAmD;AAAA,sEAAoD;AAAA,6DAA2C;AAAA,6DAA2C;AAAA,6DAA2C;AAAA,gEAA8C;AAAA,wDAAsC;AAAA,8DAA4C;AAAA,uEAAqD;AAAA,kEAAgD;AAAA,8DAA4C;AAAA,gEAA8C;AAAA,kEAAgD;AAAA,6DAA2C;AAAA,wDAAsC;AAAA,oDAAkC;AAAA,8DAA4C;AAAA,+DAA6C;AAAA,8DAA4C;AAAA,kEAAgD;AAAA,4DAA0C;AAAA,6DAA2C;AAAA,yDAAuC;AAAA,yDAAuC;AAAA,4DAA0C;AAAA,wDAAsC;AAAA,kEAAgD;AAAA,uEAAqD;AAAA,kEAAgD;AAAA,8DAA4C;AAAA,0DAAwC;AAAA,sDAAoC;AAAA,gEAA8C;AAAA,mEAAiD;AAAA,iEAA+C;AAAA,4DAA0C;AAAA,0DAAwC;AAAA,oEAAkD;AAAA,oEAAkD;AAAA,oEAAkD;AAAA,qEAAmD;AAAA,uEAAqD;AAAA,kDAAgC;AAAA,4DAA0C;AAAA,+DAA4C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/access/libraries/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AAAA,4DAA0C;AAAA,6DAA2C;AAAA,6DAA2C;AAAA,4DAA0C;AAAA,6DAA2C;AAAA,kEAAgD;AAAA,6DAA2C;AAAA,yEAAuD;AAAA,qEAAmD;AAAA,sEAAoD;AAAA,6DAA2C;AAAA,6DAA2C;AAAA,6DAA2C;AAAA,gEAA8C;AAAA,wDAAsC;AAAA,8DAA4C;AAAA,uEAAqD;AAAA,kEAAgD;AAAA,8DAA4C;AAAA,gEAA8C;AAAA,kEAAgD;AAAA,6DAA2C;AAAA,wDAAsC;AAAA,oDAAkC;AAAA,8DAA4C;AAAA,+DAA6C;AAAA,8DAA4C;AAAA,kEAAgD;AAAA,4DAA0C;AAAA,6DAA2C;AAAA,yDAAuC;AAAA,yDAAuC;AAAA,4DAA0C;AAAA,wDAAsC;AAAA,kEAAgD;AAAA,uEAAqD;AAAA,kEAAgD;AAAA,8DAA4C;AAAA,0DAAwC;AAAA,sDAAoC;AAAA,gEAA8C;AAAA,mEAAiD;AAAA,iEAA+C;AAAA,6DAA2C;AAAA,4DAA0C;AAAA,0DAAwC;AAAA,oEAAkD;AAAA,oEAAkD;AAAA,oEAAkD;AAAA,qEAAmD;AAAA,uEAAqD;AAAA,kDAAgC;AAAA,4DAA0C;AAAA,+DAA4C"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PropertyService, UserAccessDto } from '@servicelabsco/nestjs-utility-services';
|
|
2
|
+
import { Response } from 'express';
|
|
3
|
+
import { AccessBusinessEntity } from '../entities/access.business.entity';
|
|
4
|
+
import { AppIntegrationEntity } from '../entities/app.integration.entity';
|
|
5
|
+
import { BusinessAppIntegrationEntity } from '../entities/business.app.integration.entity';
|
|
6
|
+
export declare class ProcessAppIntegration {
|
|
7
|
+
protected readonly business: AccessBusinessEntity;
|
|
8
|
+
protected readonly propertyService: PropertyService;
|
|
9
|
+
protected readonly res: Response;
|
|
10
|
+
protected integration: AppIntegrationEntity;
|
|
11
|
+
protected user: UserAccessDto;
|
|
12
|
+
constructor(business: AccessBusinessEntity, propertyService: PropertyService, res: Response);
|
|
13
|
+
process(integrationId: number): Promise<void | BusinessAppIntegrationEntity>;
|
|
14
|
+
validate(id: number): Promise<void>;
|
|
15
|
+
initializeSlack(): Promise<void>;
|
|
16
|
+
initializeZoho(): Promise<void>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProcessAppIntegration = void 0;
|
|
4
|
+
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
5
|
+
const integration_type_constant_1 = require("../../config/integration.type.constant");
|
|
6
|
+
const app_integration_entity_1 = require("../entities/app.integration.entity");
|
|
7
|
+
const business_app_integration_entity_1 = require("../entities/business.app.integration.entity");
|
|
8
|
+
const process_whatsapp_integration_1 = require("./process.whatsapp.integration");
|
|
9
|
+
class ProcessAppIntegration {
|
|
10
|
+
constructor(business, propertyService, res) {
|
|
11
|
+
this.business = business;
|
|
12
|
+
this.propertyService = propertyService;
|
|
13
|
+
this.res = res;
|
|
14
|
+
}
|
|
15
|
+
async process(integrationId) {
|
|
16
|
+
await this.validate(integrationId);
|
|
17
|
+
switch (this.integration.integration_identifier) {
|
|
18
|
+
case integration_type_constant_1.IntegrationIdentifierConstants.slack:
|
|
19
|
+
return this.initializeSlack();
|
|
20
|
+
case integration_type_constant_1.IntegrationIdentifierConstants.zoho:
|
|
21
|
+
return this.initializeZoho();
|
|
22
|
+
case integration_type_constant_1.IntegrationIdentifierConstants.whatsapp:
|
|
23
|
+
return new process_whatsapp_integration_1.ProcessWhatsappIntegration(this.business).handle(this.integration.id);
|
|
24
|
+
default:
|
|
25
|
+
throw new nestjs_utility_services_1.OperationException('No integration found');
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
async validate(id) {
|
|
29
|
+
const integration = await app_integration_entity_1.AppIntegrationEntity.findOne({ where: { id, active: true } });
|
|
30
|
+
if (!integration)
|
|
31
|
+
throw new nestjs_utility_services_1.OperationException('No integration found');
|
|
32
|
+
const businessIntegration = await business_app_integration_entity_1.BusinessAppIntegrationEntity.findOne({
|
|
33
|
+
where: { integration_id: id, business_id: this.business.id, active: true },
|
|
34
|
+
});
|
|
35
|
+
if (businessIntegration)
|
|
36
|
+
throw new nestjs_utility_services_1.OperationException(`${integration.name} is already integrated on this business`);
|
|
37
|
+
this.integration = integration;
|
|
38
|
+
this.user = nestjs_utility_services_1.Auth.user();
|
|
39
|
+
}
|
|
40
|
+
async initializeSlack() {
|
|
41
|
+
const clientId = await this.propertyService.get('slack.client.id');
|
|
42
|
+
const scope = await this.propertyService.get('slack.access.scope');
|
|
43
|
+
const redirectUrl = `${process.env.SERVER_URL}/webhook/integrate-slack`;
|
|
44
|
+
const state = [this.business.id, this.user.id];
|
|
45
|
+
if (!clientId)
|
|
46
|
+
throw new nestjs_utility_services_1.OperationException('No Client Id');
|
|
47
|
+
const url = `https://slack.com/oauth/v2/authorize?scope=${scope}&client_id=${clientId}&redirect_uri=${redirectUrl}&state=${state}`;
|
|
48
|
+
return this.res.redirect(url);
|
|
49
|
+
}
|
|
50
|
+
async initializeZoho() {
|
|
51
|
+
const clientId = await this.propertyService.get('zoho.client.id');
|
|
52
|
+
const scope = await this.propertyService.get('zoho.access.scope');
|
|
53
|
+
const redirectUrl = `${process.env.SERVER_URL}/webhook/integrate-zoho`;
|
|
54
|
+
const state = [this.business.id, this.user.id];
|
|
55
|
+
if (!clientId)
|
|
56
|
+
throw new nestjs_utility_services_1.OperationException('No Client Id');
|
|
57
|
+
const url = `https://accounts.zoho.com/oauth/v2/auth?scope=${scope}&client_id=${clientId}&redirect_uri=${redirectUrl}&state=${state}&response_type=code`;
|
|
58
|
+
return this.res.redirect(url);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.ProcessAppIntegration = ProcessAppIntegration;
|
|
62
|
+
//# sourceMappingURL=process.app.integration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process.app.integration.js","sourceRoot":"","sources":["../../../src/access/libraries/process.app.integration.ts"],"names":[],"mappings":";;;AAAA,oFAAkH;AAElH,sFAAwF;AAExF,+EAA0E;AAC1E,iGAA2F;AAC3F,iFAA4E;AAO5E,MAAa,qBAAqB;IAI9B,YACuB,QAA8B,EAC9B,eAAgC,EAChC,GAAa;QAFb,aAAQ,GAAR,QAAQ,CAAsB;QAC9B,oBAAe,GAAf,eAAe,CAAiB;QAChC,QAAG,GAAH,GAAG,CAAU;IACjC,CAAC;IAEJ,KAAK,CAAC,OAAO,CAAC,aAAqB;QAC/B,MAAM,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;QAEnC,QAAQ,IAAI,CAAC,WAAW,CAAC,sBAAsB,EAAE,CAAC;YAC9C,KAAK,0DAA8B,CAAC,KAAK;gBACrC,OAAO,IAAI,CAAC,eAAe,EAAE,CAAC;YAElC,KAAK,0DAA8B,CAAC,IAAI;gBACpC,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC;YAEjC,KAAK,0DAA8B,CAAC,QAAQ;gBACxC,OAAO,IAAI,yDAA0B,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;YAErF;gBACI,MAAM,IAAI,4CAAkB,CAAC,sBAAsB,CAAC,CAAC;QAC7D,CAAC;IACL,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,EAAU;QACrB,MAAM,WAAW,GAAG,MAAM,6CAAoB,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QACxF,IAAI,CAAC,WAAW;YAAE,MAAM,IAAI,4CAAkB,CAAC,sBAAsB,CAAC,CAAC;QAEvE,MAAM,mBAAmB,GAAG,MAAM,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G,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,yBAAyB,CAAC;QACvE,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAE/C,IAAI,CAAC,QAAQ;YAAE,MAAM,IAAI,4CAAkB,CAAC,cAAc,CAAC,CAAC;QAE5D,MAAM,GAAG,GAAG,iDAAiD,KAAK,cAAc,QAAQ,iBAAiB,WAAW,UAAU,KAAK,qBAAqB,CAAC;QACzJ,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAClC,CAAC;CACJ;AAjED,sDAiEC"}
|
|
@@ -12,7 +12,7 @@ class ProcessNotification {
|
|
|
12
12
|
this.payload = payload;
|
|
13
13
|
const notification = await notification_entity_1.NotificationEntity.findOne({
|
|
14
14
|
where: { identifier: payload.identifier },
|
|
15
|
-
relations: ['sms.template', 'emails.template', 'whatsapp.template', 'slack.template', 'gchat.template', 'inapp'],
|
|
15
|
+
relations: ['sms.template', 'emails.template', 'whatsapp.template', 'slack.template', 'gchat.template', 'inapp', 'fcm.template'],
|
|
16
16
|
});
|
|
17
17
|
if (!notification)
|
|
18
18
|
throw new nestjs_utility_services_1.OperationException(`Notification of type ${payload.identifier} is not defined`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process.notification.js","sourceRoot":"","sources":["../../../src/access/libraries/process.notification.ts"],"names":[],"mappings":";;;AAAA,oFAA4E;AAC5E,0FAAsF;AAEtF,2EAAsE;AAGtE,MAAa,mBAAmB;IAE5B,YAA+B,mBAAwC;QAAxC,wBAAmB,GAAnB,mBAAmB,CAAqB;IAAG,CAAC;IAE3E,KAAK,CAAC,OAAO,CAAC,OAA+B;QACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,MAAM,YAAY,GAAG,MAAM,wCAAkB,CAAC,OAAO,CAAC;YAClD,KAAK,EAAE,EA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IACL,CAAC;IAEO,KAAK,CAAC,WAAW,CAAC,YAAgC;QACtD,MAAM,KAAK,GAAG,YAAY,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAC1F,KAAK,MAAM,IAAI,IAAI,KAAK;YAAE,MAAM,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAClG,CAAC;IAEO,KAAK,CAAC,kBAAkB,CAAC,YAAgC;QAC7D,MAAM,OAAO,GAAG,MAAM,yCAAkB,CAAC,IAAI,CAAC;YAC1C,KAAK,EAAE,EAAE,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,eAAe,EAAE,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;SACnG,CAAC,CAAC;QAEH,KAAK,MAAM,IAAI,IAAI,OAAO;YAAE,MAAM,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACpG,CAAC;CACJ;AAxFD,kDAwFC"}
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import { PropertyService } from '@servicelabsco/nestjs-utility-services';
|
|
2
|
-
import {
|
|
1
|
+
import { PropertyService, UserEntity } from '@servicelabsco/nestjs-utility-services';
|
|
2
|
+
import { Response } from 'express';
|
|
3
3
|
import { AccessBusinessEntity } from '../entities/access.business.entity';
|
|
4
4
|
import { BusinessAppIntegrationEntity } from '../entities/business.app.integration.entity';
|
|
5
|
-
import {
|
|
5
|
+
import { SlackIntegrationEntity } from '../entities/slack.integration.entity';
|
|
6
|
+
import { AccessBusinessService } from '../services/access.business.service';
|
|
6
7
|
export declare class ProcessSlackIntegration {
|
|
7
8
|
private readonly propertyService;
|
|
9
|
+
private readonly accessBusinessService;
|
|
8
10
|
protected business: AccessBusinessEntity;
|
|
11
|
+
protected user: UserEntity;
|
|
9
12
|
protected res: Response;
|
|
10
|
-
constructor(propertyService: PropertyService);
|
|
13
|
+
constructor(propertyService: PropertyService, accessBusinessService: AccessBusinessService);
|
|
11
14
|
handle(code: string, state: any, res: Response): Promise<void>;
|
|
12
15
|
handleRedirect(): Promise<void>;
|
|
13
16
|
initialize(state: any): Promise<void>;
|
|
14
17
|
setBusinessIntegration(integration_id: number): Promise<BusinessAppIntegrationEntity>;
|
|
15
18
|
getAccessToken(code: string): Promise<any>;
|
|
16
19
|
setSlackToken(token: string): Promise<SlackIntegrationEntity>;
|
|
17
|
-
getFrontendUrl(business: any): Promise<string>;
|
|
18
20
|
}
|
|
@@ -3,14 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ProcessSlackIntegration = void 0;
|
|
4
4
|
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
5
5
|
const integration_type_constant_1 = require("../../config/integration.type.constant");
|
|
6
|
-
const slack_integration_entity_1 = require("../entities/slack.integration.entity");
|
|
7
6
|
const access_business_entity_1 = require("../entities/access.business.entity");
|
|
8
7
|
const app_integration_entity_1 = require("../entities/app.integration.entity");
|
|
9
|
-
const business_app_integration_entity_1 = require("../entities/business.app.integration.entity");
|
|
10
8
|
const business_app_integration_credential_entity_1 = require("../entities/business.app.integration.credential.entity");
|
|
9
|
+
const business_app_integration_entity_1 = require("../entities/business.app.integration.entity");
|
|
10
|
+
const slack_integration_entity_1 = require("../entities/slack.integration.entity");
|
|
11
11
|
class ProcessSlackIntegration {
|
|
12
|
-
constructor(propertyService) {
|
|
12
|
+
constructor(propertyService, accessBusinessService) {
|
|
13
13
|
this.propertyService = propertyService;
|
|
14
|
+
this.accessBusinessService = accessBusinessService;
|
|
14
15
|
}
|
|
15
16
|
async handle(code, state, res) {
|
|
16
17
|
await this.initialize(state);
|
|
@@ -32,7 +33,7 @@ class ProcessSlackIntegration {
|
|
|
32
33
|
return this.handleRedirect();
|
|
33
34
|
}
|
|
34
35
|
async handleRedirect() {
|
|
35
|
-
const link = await this.getFrontendUrl(this.business);
|
|
36
|
+
const link = await this.accessBusinessService.getFrontendUrl(this.business.id);
|
|
36
37
|
this.res.redirect(`${link}/e/f/integrations`);
|
|
37
38
|
}
|
|
38
39
|
async initialize(state) {
|
|
@@ -45,6 +46,7 @@ class ProcessSlackIntegration {
|
|
|
45
46
|
const user = await nestjs_utility_services_1.UserEntity.findOne({ where: { id: +stateData[1] } });
|
|
46
47
|
if (!user)
|
|
47
48
|
throw new nestjs_utility_services_1.OperationException('No Any user there');
|
|
49
|
+
this.user = user;
|
|
48
50
|
this.business = business;
|
|
49
51
|
}
|
|
50
52
|
async setBusinessIntegration(integration_id) {
|
|
@@ -59,8 +61,10 @@ class ProcessSlackIntegration {
|
|
|
59
61
|
active: true,
|
|
60
62
|
name: 'Slack',
|
|
61
63
|
description: 'Slack has been integrated on this business',
|
|
64
|
+
created_by: this.user.id,
|
|
65
|
+
updated_by: this.user.id,
|
|
62
66
|
});
|
|
63
|
-
return
|
|
67
|
+
return bzIntegration.save();
|
|
64
68
|
}
|
|
65
69
|
async getAccessToken(code) {
|
|
66
70
|
const apiUrl = `https://slack.com/api/oauth.v2.access`;
|
|
@@ -95,13 +99,6 @@ class ProcessSlackIntegration {
|
|
|
95
99
|
slackIntegration.access_token = token;
|
|
96
100
|
return slackIntegration.save();
|
|
97
101
|
}
|
|
98
|
-
async getFrontendUrl(business) {
|
|
99
|
-
const url = business.attributes?.url;
|
|
100
|
-
if (url)
|
|
101
|
-
return url;
|
|
102
|
-
const defaultUrl = `https://client.finnoto.in`;
|
|
103
|
-
return this.propertyService.get(`business.default.frontend.url`, defaultUrl);
|
|
104
|
-
}
|
|
105
102
|
}
|
|
106
103
|
exports.ProcessSlackIntegration = ProcessSlackIntegration;
|
|
107
104
|
//# sourceMappingURL=process.slack.integration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process.slack.integration.js","sourceRoot":"","sources":["../../../src/access/libraries/process.slack.integration.ts"],"names":[],"mappings":";;;AAAA,oFAAyG;
|
|
1
|
+
{"version":3,"file":"process.slack.integration.js","sourceRoot":"","sources":["../../../src/access/libraries/process.slack.integration.ts"],"names":[],"mappings":";;;AAAA,oFAAyG;AAEzG,sFAAwF;AACxF,+EAA0E;AAC1E,+EAA0E;AAC1E,uHAAgH;AAChH,iGAA2F;AAC3F,mFAA8E;AAM9E,MAAa,uBAAuB;IAMhC,YACqB,eAAgC,EAChC,qBAA4C;QAD5C,oBAAe,GAAf,eAAe,CAAiB;QAChC,0BAAqB,GAArB,qBAAqB,CAAuB;IAC9D,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,IAAY,EAAE,KAAU,EAAE,GAAa;QAChD,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAE7B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QAEf,MAAM,WAAW,GAAG,MAAM,6CAAoB,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,sBAAsB,EAAE,0DAA8B,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACpI,IAAI,CAAC,WAAW;YAAE,MAAM,IAAI,4CAAkB,CAAC,sBAAsB,CAAC,CAAC;QAEvE,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QACrD,IAAI,CAAC,YAAY;YAAE,MAAM,IAAI,4CAAkB,CAAC,qBAAqB,CAAC,CAAC;QAEvE,MAAM,mBAAmB,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QAE9E,MAAM,OAAO,GAAG,EAAE,uBAAuB,EAAE,mBAAmB,CAAC,EAAE,EAAE,CAAC;QAEpE,IAAI,cAAc,GAAG,MAAM,mFAAsC,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CA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e,EAAE,aAAa,CAAC,CAAC;QAEhD,MAAM,WAAW,GAAG;YAChB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,QAAQ;SACjB,CAAC;QAEF,IAAI,CAAC;YACD,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;YAElD,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,uBAAuB,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;YAC9D,CAAC;YACD,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YAElC,OAAO,GAAG,CAAC,YAAY,CAAC;QAC5B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;QACnC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,KAAa;QAC7B,IAAI,gBAAgB,GAAG,MAAM,iDAAsB,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QAC1G,IAAI,CAAC,gBAAgB;YAAE,iDAAsB,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;QAE1G,gBAAgB,CAAC,YAAY,GAAG,KAAK,CAAC;QAEtC,OAAO,gBAAgB,CAAC,IAAI,EAAE,CAAC;IACnC,CAAC;CACJ;AAtHD,0DAsHC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PropertyService, RemoteRequestService, UserEntity } from '@servicelabsco/nestjs-utility-services';
|
|
2
|
+
import { Response } from 'express';
|
|
3
|
+
import { AccessBusinessEntity } from '../entities/access.business.entity';
|
|
4
|
+
import { BusinessAppIntegrationEntity } from '../entities/business.app.integration.entity';
|
|
5
|
+
import { AccessBusinessService } from '../services/access.business.service';
|
|
6
|
+
export declare class ProcessZohoIntegration {
|
|
7
|
+
private readonly propertyService;
|
|
8
|
+
private readonly accessBusinessService;
|
|
9
|
+
private readonly remoteRequestService;
|
|
10
|
+
protected business: AccessBusinessEntity;
|
|
11
|
+
protected user: UserEntity;
|
|
12
|
+
protected res: Response;
|
|
13
|
+
constructor(propertyService: PropertyService, accessBusinessService: AccessBusinessService, remoteRequestService: RemoteRequestService);
|
|
14
|
+
handle(code: string, state: any, res: Response): Promise<void>;
|
|
15
|
+
handleRedirect(): Promise<void>;
|
|
16
|
+
initialize(state: any): Promise<void>;
|
|
17
|
+
setBusinessIntegration(integration_id: number): Promise<BusinessAppIntegrationEntity>;
|
|
18
|
+
getAccessToken(code: string): Promise<import("@servicelabsco/nestjs-utility-services").RemoteRawResponseDto>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProcessZohoIntegration = void 0;
|
|
4
|
+
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
5
|
+
const integration_type_constant_1 = require("../../config/integration.type.constant");
|
|
6
|
+
const access_business_entity_1 = require("../entities/access.business.entity");
|
|
7
|
+
const app_integration_entity_1 = require("../entities/app.integration.entity");
|
|
8
|
+
const business_app_integration_credential_entity_1 = require("../entities/business.app.integration.credential.entity");
|
|
9
|
+
const business_app_integration_entity_1 = require("../entities/business.app.integration.entity");
|
|
10
|
+
class ProcessZohoIntegration {
|
|
11
|
+
constructor(propertyService, accessBusinessService, remoteRequestService) {
|
|
12
|
+
this.propertyService = propertyService;
|
|
13
|
+
this.accessBusinessService = accessBusinessService;
|
|
14
|
+
this.remoteRequestService = remoteRequestService;
|
|
15
|
+
}
|
|
16
|
+
async handle(code, state, res) {
|
|
17
|
+
await this.initialize(state);
|
|
18
|
+
this.res = res;
|
|
19
|
+
const integration = await app_integration_entity_1.AppIntegrationEntity.findOne({ where: { integration_identifier: integration_type_constant_1.IntegrationIdentifierConstants.zoho } });
|
|
20
|
+
if (!integration)
|
|
21
|
+
throw new nestjs_utility_services_1.OperationException('No integration found');
|
|
22
|
+
const tokens = await this.getAccessToken(code);
|
|
23
|
+
if (!tokens)
|
|
24
|
+
throw new nestjs_utility_services_1.OperationException('Failed To get token');
|
|
25
|
+
const businessIntegration = await this.setBusinessIntegration(integration.id);
|
|
26
|
+
const payload = { business_integration_id: businessIntegration.id };
|
|
27
|
+
let setCredentials = await business_app_integration_credential_entity_1.BusinessAppIntegrationCredentialEntity.findOne({ where: payload });
|
|
28
|
+
if (!setCredentials)
|
|
29
|
+
setCredentials = business_app_integration_credential_entity_1.BusinessAppIntegrationCredentialEntity.create({ ...payload });
|
|
30
|
+
setCredentials.access_token = tokens?.data.access_token;
|
|
31
|
+
setCredentials.refresh_token = tokens?.data?.refresh_token;
|
|
32
|
+
setCredentials.expiry_at = tokens?.data?.expiry_at;
|
|
33
|
+
await setCredentials.save();
|
|
34
|
+
return this.handleRedirect();
|
|
35
|
+
}
|
|
36
|
+
async handleRedirect() {
|
|
37
|
+
const link = await this.accessBusinessService.getFrontendUrl(this.business.id);
|
|
38
|
+
this.res.redirect(`${link}/e/f/integrations`);
|
|
39
|
+
}
|
|
40
|
+
async initialize(state) {
|
|
41
|
+
const stateData = state?.split(',');
|
|
42
|
+
if (!stateData)
|
|
43
|
+
throw new nestjs_utility_services_1.OperationException('No State is defined');
|
|
44
|
+
const business = await access_business_entity_1.AccessBusinessEntity.findOne({ where: { id: +stateData[0] } });
|
|
45
|
+
if (!business)
|
|
46
|
+
throw new nestjs_utility_services_1.OperationException('No Any business there');
|
|
47
|
+
const user = await nestjs_utility_services_1.UserEntity.findOne({ where: { id: +stateData[1] } });
|
|
48
|
+
if (!user)
|
|
49
|
+
throw new nestjs_utility_services_1.OperationException('No Any user there');
|
|
50
|
+
this.user = user;
|
|
51
|
+
this.business = business;
|
|
52
|
+
}
|
|
53
|
+
async setBusinessIntegration(integration_id) {
|
|
54
|
+
let integration = await business_app_integration_entity_1.BusinessAppIntegrationEntity.findOne({ where: { business_id: this.business.id, integration_id } });
|
|
55
|
+
if (integration) {
|
|
56
|
+
integration.active = true;
|
|
57
|
+
return integration.save();
|
|
58
|
+
}
|
|
59
|
+
const bzIntegration = await business_app_integration_entity_1.BusinessAppIntegrationEntity.firstOrCreate({
|
|
60
|
+
business_id: this.business.id,
|
|
61
|
+
integration_id,
|
|
62
|
+
active: true,
|
|
63
|
+
name: 'Zoho',
|
|
64
|
+
description: 'Zoho has been integrated on this business',
|
|
65
|
+
created_by: this.user.id,
|
|
66
|
+
updated_by: this.user.id,
|
|
67
|
+
});
|
|
68
|
+
return bzIntegration.save();
|
|
69
|
+
}
|
|
70
|
+
async getAccessToken(code) {
|
|
71
|
+
const client_id = await this.propertyService.get('zoho.client.id');
|
|
72
|
+
const client_secret = await this.propertyService.get('zoho.client.secret');
|
|
73
|
+
const baseUrl = `https://accounts.zoho.com/oauth/v2/token?code=${code}`;
|
|
74
|
+
const redirectUrl = `${process.env.SERVER_URL}/webhook/integrate-zoho`;
|
|
75
|
+
const url = `${baseUrl}&client_id=${client_id}&client_secret=${client_secret}&grant_type=authorization_code&redirect_uri=${redirectUrl}`;
|
|
76
|
+
const opts = {
|
|
77
|
+
url,
|
|
78
|
+
method: 'POST',
|
|
79
|
+
headers: {
|
|
80
|
+
'Content-Type': 'application/json',
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
return this.remoteRequestService.getRawResponse(opts);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
exports.ProcessZohoIntegration = ProcessZohoIntegration;
|
|
87
|
+
//# sourceMappingURL=process.zoho.integration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process.zoho.integration.js","sourceRoot":"","sources":["../../../src/access/libraries/process.zoho.integration.ts"],"names":[],"mappings":";;;AA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AAoB,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IAC1D,CAAC;CACJ;AAhGD,wDAgGC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { AccessService } from '@servicelabsco/nestjs-utility-services';
|
|
1
|
+
import { AccessService, PropertyService } from '@servicelabsco/nestjs-utility-services';
|
|
2
2
|
import { AccessBusinessEntity } from '../entities/access.business.entity';
|
|
3
3
|
export declare class AccessBusinessService {
|
|
4
4
|
private readonly accessService;
|
|
5
|
-
|
|
5
|
+
private readonly propertyService;
|
|
6
|
+
constructor(accessService: AccessService, propertyService: PropertyService);
|
|
6
7
|
validateAccess(): Promise<AccessBusinessEntity>;
|
|
7
8
|
hasRoles(roles: string[]): Promise<AccessBusinessEntity>;
|
|
8
9
|
validateRoles(roles: string[]): Promise<void>;
|
|
10
|
+
getFrontendUrl(business_id: number): Promise<string>;
|
|
9
11
|
}
|
|
@@ -14,8 +14,9 @@ const common_1 = require("@nestjs/common");
|
|
|
14
14
|
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
15
15
|
const access_business_entity_1 = require("../entities/access.business.entity");
|
|
16
16
|
let AccessBusinessService = class AccessBusinessService {
|
|
17
|
-
constructor(accessService) {
|
|
17
|
+
constructor(accessService, propertyService) {
|
|
18
18
|
this.accessService = accessService;
|
|
19
|
+
this.propertyService = propertyService;
|
|
19
20
|
}
|
|
20
21
|
async validateAccess() {
|
|
21
22
|
const user = nestjs_utility_services_1.Auth.user();
|
|
@@ -39,10 +40,21 @@ let AccessBusinessService = class AccessBusinessService {
|
|
|
39
40
|
if (!hasRole)
|
|
40
41
|
throw new nestjs_utility_services_1.AccessException(`You don't have appropriate role to do this operation`);
|
|
41
42
|
}
|
|
43
|
+
async getFrontendUrl(business_id) {
|
|
44
|
+
const business = await access_business_entity_1.AccessBusinessEntity.first(business_id);
|
|
45
|
+
if (!business)
|
|
46
|
+
return;
|
|
47
|
+
const url = business.attributes?.url;
|
|
48
|
+
if (url)
|
|
49
|
+
return url;
|
|
50
|
+
const defaultUrl = `https://client.finnoto.in`;
|
|
51
|
+
return this.propertyService.get(`business.default.frontend.url`, defaultUrl);
|
|
52
|
+
}
|
|
42
53
|
};
|
|
43
54
|
exports.AccessBusinessService = AccessBusinessService;
|
|
44
55
|
exports.AccessBusinessService = AccessBusinessService = __decorate([
|
|
45
56
|
(0, common_1.Injectable)(),
|
|
46
|
-
__metadata("design:paramtypes", [nestjs_utility_services_1.AccessService
|
|
57
|
+
__metadata("design:paramtypes", [nestjs_utility_services_1.AccessService,
|
|
58
|
+
nestjs_utility_services_1.PropertyService])
|
|
47
59
|
], AccessBusinessService);
|
|
48
60
|
//# sourceMappingURL=access.business.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"access.business.service.js","sourceRoot":"","sources":["../../../src/access/services/access.business.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,
|
|
1
|
+
{"version":3,"file":"access.business.service.js","sourceRoot":"","sources":["../../../src/access/services/access.business.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oFAA+G;AAC/G,+EAA0E;AAGnE,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAC9B,YACqB,aAA4B,EAC5B,eAAgC;QADhC,kBAAa,GAAb,aAAa,CAAe;QAC5B,oBAAe,GAAf,eAAe,CAAiB;IAClD,CAAC;IAEJ,KAAK,CAAC,cAAc;QAChB,MAAM,IAAI,GAAG,8BAAI,CAAC,IAAI,EAAE,CAAC;QAEzB,MAAM,UAAU,GAAG,IAAI,EAAE,eAAe,EAAE,WAAW,CAAC;QACtD,IAAI,CAAC,UAAU;YAAE,MAAM,IAAI,yCAAe,EAAE,CAAC;QAE7C,MAAM,QAAQ,GAAG,MAAM,6CAAoB,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC;QACnF,IAAI,CAAC,QAAQ;YAAE,MAAM,IAAI,yCAAe,EAAE,CAAC;QAE3C,OAAO,QAAQ,CAAC;IACpB,CAAC;IAQD,KAAK,CAAC,QAAQ,CAAC,KAAe;QAC1B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAE7C,IAAI,KAAK,EAAE,MAAM,GAAG,CAAC,EAAE,CAAC;YACpB,MAAM,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QACpC,CAAC;QAED,OAAO,QAAQ,CAAC;IACpB,CAAC;IASD,KAAK,CAAC,aAAa,CAAC,KAAe;QAC/B,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;QAEnE,IAAI,CAAC,OAAO;YAAE,MAAM,IAAI,yCAAe,CAAC,sDAAsD,CAAC,CAAC;IACpG,CAAC;IAQD,KAAK,CAAC,cAAc,CAAC,WAAmB;QACpC,MAAM,QAAQ,GAAQ,MAAM,6CAAoB,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QACpE,IAAI,CAAC,QAAQ;YAAE,OAAO;QAEtB,MAAM,GAAG,GAAG,QAAQ,CAAC,UAAU,EAAE,GAAG,CAAC;QACrC,IAAI,GAAG;YAAE,OAAO,GAAG,CAAC;QAEpB,MAAM,UAAU,GAAG,2BAA2B,CAAC;QAC/C,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,+BAA+B,EAAE,UAAU,CAAC,CAAC;IACjF,CAAC;CACJ,CAAA;AA/DY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAU,GAAE;qCAG2B,uCAAa;QACX,yCAAe;GAH5C,qBAAqB,CA+DjC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PropertyService, RemoteRequestService } from '@servicelabsco/nestjs-utility-services';
|
|
2
|
+
import { BusinessAppIntegrationCredentialEntity } from '../entities/business.app.integration.credential.entity';
|
|
3
|
+
export declare class AppIntegrationService {
|
|
4
|
+
private readonly propertyService;
|
|
5
|
+
private readonly remoteRequestService;
|
|
6
|
+
constructor(propertyService: PropertyService, remoteRequestService: RemoteRequestService);
|
|
7
|
+
updateZohoAccessToken(businessId: number): Promise<BusinessAppIntegrationCredentialEntity>;
|
|
8
|
+
getCredential(businessId: number, identifier: string): Promise<BusinessAppIntegrationCredentialEntity>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
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.AppIntegrationService = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
15
|
+
const integration_type_constant_1 = require("../../config/integration.type.constant");
|
|
16
|
+
const app_integration_entity_1 = require("../entities/app.integration.entity");
|
|
17
|
+
const business_app_integration_credential_entity_1 = require("../entities/business.app.integration.credential.entity");
|
|
18
|
+
const business_app_integration_entity_1 = require("../entities/business.app.integration.entity");
|
|
19
|
+
let AppIntegrationService = class AppIntegrationService {
|
|
20
|
+
constructor(propertyService, remoteRequestService) {
|
|
21
|
+
this.propertyService = propertyService;
|
|
22
|
+
this.remoteRequestService = remoteRequestService;
|
|
23
|
+
}
|
|
24
|
+
async updateZohoAccessToken(businessId) {
|
|
25
|
+
const client_id = await this.propertyService.get('zoho.client.id');
|
|
26
|
+
const client_secret = await this.propertyService.get('zoho.client.secret');
|
|
27
|
+
const credential = await this.getCredential(businessId, integration_type_constant_1.IntegrationIdentifierConstants.zoho);
|
|
28
|
+
if (new Date(credential?.expiry_at) < new Date())
|
|
29
|
+
return credential;
|
|
30
|
+
const baseUrl = `https://accounts.zoho.com/oauth/v2/token?referesh_token=${credential?.refresh_token}`;
|
|
31
|
+
const redirectUrl = `${process.env.SERVER_URL}/webhook/integrate-zoho`;
|
|
32
|
+
const url = `${baseUrl}&client_id=${client_id}&client_secret=${client_secret}&grant_type=refresh_token&redirect_uri=${redirectUrl}`;
|
|
33
|
+
const opts = {
|
|
34
|
+
url,
|
|
35
|
+
method: 'POST',
|
|
36
|
+
headers: {
|
|
37
|
+
'Content-Type': 'application/json',
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
const response = await this.remoteRequestService.getRawResponse(opts);
|
|
41
|
+
credential.access_token = response?.data?.access_token;
|
|
42
|
+
credential.refresh_token = response?.data?.refresh_token;
|
|
43
|
+
credential.expiry_at = response?.data?.expires_in;
|
|
44
|
+
return credential.save();
|
|
45
|
+
}
|
|
46
|
+
async getCredential(businessId, identifier) {
|
|
47
|
+
const integration = await app_integration_entity_1.AppIntegrationEntity.findOne({ where: { integration_identifier: identifier } });
|
|
48
|
+
const businessIntegration = await business_app_integration_entity_1.BusinessAppIntegrationEntity.findOne({
|
|
49
|
+
where: { business_id: businessId, integration_id: integration?.id },
|
|
50
|
+
});
|
|
51
|
+
const credential = await business_app_integration_credential_entity_1.BusinessAppIntegrationCredentialEntity.findOne({
|
|
52
|
+
where: { business_integration_id: businessIntegration?.id },
|
|
53
|
+
});
|
|
54
|
+
return credential;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
exports.AppIntegrationService = AppIntegrationService;
|
|
58
|
+
exports.AppIntegrationService = AppIntegrationService = __decorate([
|
|
59
|
+
(0, common_1.Injectable)(),
|
|
60
|
+
__metadata("design:paramtypes", [nestjs_utility_services_1.PropertyService,
|
|
61
|
+
nestjs_utility_services_1.RemoteRequestService])
|
|
62
|
+
], AppIntegrationService);
|
|
63
|
+
//# sourceMappingURL=app.integration.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.integration.service.js","sourceRoot":"","sources":["../../../src/access/services/app.integration.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oFAA+F;AAC/F,sFAAwF;AACxF,+EAA0E;AAC1E,uHAAgH;AAChH,iGAA2F;AAGpF,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAC9B,YACqB,eAAgC,EAChC,oBAA0C;QAD1C,oBAAe,GAAf,eAAe,CAAiB;QAChC,yBAAoB,GAApB,oBAAoB,CAAsB;IAC5D,CAAC;IAEJ,KAAK,CAAC,qBAAqB,CAAC,UAAkB;QAC1C,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QACnE,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;QAE3E,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,0DAA8B,CAAC,IAAI,CAAC,CAAC;QAC7F,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,GAAG,IAAI,IAAI,EAAE;YAAE,OAAO,UAAU,CAAC;QAEpE,MAAM,OAAO,GAAG,2DAA2D,UAAU,EAAE,aAAa,EAAE,CAAC;QACvG,MAAM,WAAW,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,yBAAyB,CAAC;QACvE,MAAM,GAAG,GAAG,GAAG,OAAO,cAAc,SAAS,kBA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from './api.account.service';
|
|
4
|
+
export * from './app.integration.service';
|
|
4
5
|
export * from './audit.log.service';
|
|
5
6
|
export * from './business.preference.service';
|
|
6
7
|
export * from './business.user.role.service';
|
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./access.business.service"), exports);
|
|
18
18
|
__exportStar(require("./access.report.service"), exports);
|
|
19
19
|
__exportStar(require("./api.account.service"), exports);
|
|
20
|
+
__exportStar(require("./app.integration.service"), exports);
|
|
20
21
|
__exportStar(require("./audit.log.service"), exports);
|
|
21
22
|
__exportStar(require("./business.preference.service"), exports);
|
|
22
23
|
__exportStar(require("./business.user.role.service"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/access/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAAA,0DAAwC;AAAA,wDAAsC;AAAA,sDAAoC;AAAA,gEAA8C;AAAA,+DAA6C;AAAA,yDAAuC;AAAA,kDAAgC;AAAA,gDAA8B;AAAA,+DAA6C;AAAA,oDAAkC;AAAA,wDAAsC;AAAA,yDAAuC;AAAA,qDAAmC;AAAA,6DAA2C;AAAA,uDAAqC;AAAA,kDAAgC;AAAA,kDAAgC;AAAA,8DAA4C;AAAA,4DAA0C;AAAA,oDAAkC;AAAA,oDAAkC;AAAA,qDAAkC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/access/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAAA,0DAAwC;AAAA,wDAAsC;AAAA,4DAA0C;AAAA,sDAAoC;AAAA,gEAA8C;AAAA,+DAA6C;AAAA,yDAAuC;AAAA,kDAAgC;AAAA,gDAA8B;AAAA,+DAA6C;AAAA,oDAAkC;AAAA,wDAAsC;AAAA,yDAAuC;AAAA,qDAAmC;AAAA,6DAA2C;AAAA,uDAAqC;AAAA,kDAAgC;AAAA,kDAAgC;AAAA,8DAA4C;AAAA,4DAA0C;AAAA,oDAAkC;AAAA,oDAAkC;AAAA,qDAAkC"}
|
package/package.json
CHANGED