@servicelabsco/slabs-access-manager 0.1.140 → 0.1.142
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 +3 -2
- package/dist/access/controllers/business.app.integration.controller.js +4 -5
- package/dist/access/controllers/business.app.integration.controller.js.map +1 -1
- package/dist/access/libraries/process.app.integration.d.ts +11 -6
- package/dist/access/libraries/process.app.integration.js +14 -14
- package/dist/access/libraries/process.app.integration.js.map +1 -1
- package/dist/access/services/access.business.service.d.ts +3 -2
- package/dist/access/services/access.business.service.js +6 -6
- package/dist/access/services/access.business.service.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PropertyService, SqlService } from '@servicelabsco/nestjs-utility-services';
|
|
2
|
-
import { Response } from 'express';
|
|
3
2
|
import { BusinessParamDto } from '../dtos/business.param.dto';
|
|
4
3
|
import { DbFindDto } from '../dtos/db.find.dto';
|
|
5
4
|
import { AppIntegrationEntity } from '../entities/app.integration.entity';
|
|
@@ -13,7 +12,9 @@ export declare class BusinessAppIntegrationController {
|
|
|
13
12
|
search(): Promise<BusinessAppIntegrationEntity[]>;
|
|
14
13
|
find(body: DbFindDto): Promise<any>;
|
|
15
14
|
integrations(): Promise<AppIntegrationEntity[]>;
|
|
16
|
-
|
|
15
|
+
integrateApp(params: BusinessParamDto): Promise<BusinessAppIntegrationEntity | {
|
|
16
|
+
redirect_url: string;
|
|
17
|
+
}>;
|
|
17
18
|
show(params: BusinessParamDto): Promise<BusinessAppIntegrationEntity>;
|
|
18
19
|
revokeIntegration(params: BusinessParamDto): Promise<BusinessAppIntegrationEntity>;
|
|
19
20
|
}
|
|
@@ -50,11 +50,11 @@ let BusinessAppIntegrationController = class BusinessAppIntegrationController {
|
|
|
50
50
|
await this.accessBusinessService.validateAccess();
|
|
51
51
|
return app_integration_entity_1.AppIntegrationEntity.find({ where: { active: true } });
|
|
52
52
|
}
|
|
53
|
-
async
|
|
53
|
+
async integrateApp(params) {
|
|
54
54
|
const business = await this.accessBusinessService.validateAccess();
|
|
55
55
|
if (!business)
|
|
56
56
|
return;
|
|
57
|
-
return new process_app_integration_1.ProcessAppIntegration(business, this.propertyService
|
|
57
|
+
return new process_app_integration_1.ProcessAppIntegration(business, this.propertyService).process(params.id);
|
|
58
58
|
}
|
|
59
59
|
async show(params) {
|
|
60
60
|
const business = await this.accessBusinessService.validateAccess();
|
|
@@ -92,11 +92,10 @@ __decorate([
|
|
|
92
92
|
__decorate([
|
|
93
93
|
(0, common_1.Post)(':id/integrate'),
|
|
94
94
|
__param(0, (0, common_1.Param)()),
|
|
95
|
-
__param(1, (0, common_1.Res)()),
|
|
96
95
|
__metadata("design:type", Function),
|
|
97
|
-
__metadata("design:paramtypes", [business_param_dto_1.BusinessParamDto
|
|
96
|
+
__metadata("design:paramtypes", [business_param_dto_1.BusinessParamDto]),
|
|
98
97
|
__metadata("design:returntype", Promise)
|
|
99
|
-
], BusinessAppIntegrationController.prototype, "
|
|
98
|
+
], BusinessAppIntegrationController.prototype, "integrateApp", null);
|
|
100
99
|
__decorate([
|
|
101
100
|
(0, common_1.Get)(':id/detail'),
|
|
102
101
|
__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,2CAAoE;AACpE,oFAAyG;AACzG,mEAA8D;AAC9D,qDAAgD;AAEhD,+EAA0E;AAC1E,iGAA2F;AAC3F,kFAA6E;AAC7E,kEAA6D;AAC7D,iFAA4E;AAQrE,IAAM,gCAAgC,GAAtC,MAAM,gCAAgC;IACzC,YACqB,q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AAC;;;;oEAIpB;AAGK;IADL,IAAA,aAAI,EAAC,eAAe,CAAC;IACF,WAAA,IAAA,cAAK,GAAE,CAAA;;qCAAS,qCAAgB;;oEAKnD;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,17 +1,22 @@
|
|
|
1
1
|
import { PropertyService, UserAccessDto } from '@servicelabsco/nestjs-utility-services';
|
|
2
|
-
import { Response } from 'express';
|
|
3
2
|
import { AccessBusinessEntity } from '../entities/access.business.entity';
|
|
4
3
|
import { AppIntegrationEntity } from '../entities/app.integration.entity';
|
|
5
4
|
import { BusinessAppIntegrationEntity } from '../entities/business.app.integration.entity';
|
|
6
5
|
export declare class ProcessAppIntegration {
|
|
7
6
|
protected readonly business: AccessBusinessEntity;
|
|
8
7
|
protected readonly propertyService: PropertyService;
|
|
9
|
-
protected readonly res: Response;
|
|
10
8
|
protected integration: AppIntegrationEntity;
|
|
11
9
|
protected user: UserAccessDto;
|
|
12
|
-
constructor(business: AccessBusinessEntity, propertyService: PropertyService
|
|
13
|
-
process(integrationId: number): Promise<
|
|
10
|
+
constructor(business: AccessBusinessEntity, propertyService: PropertyService);
|
|
11
|
+
process(integrationId: number): Promise<BusinessAppIntegrationEntity | {
|
|
12
|
+
redirect_url: string;
|
|
13
|
+
}>;
|
|
14
14
|
validate(id: number): Promise<void>;
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
initializeWhatsapp(): Promise<BusinessAppIntegrationEntity>;
|
|
16
|
+
initializeSlack(): Promise<{
|
|
17
|
+
redirect_url: string;
|
|
18
|
+
}>;
|
|
19
|
+
initializeZoho(): Promise<{
|
|
20
|
+
redirect_url: string;
|
|
21
|
+
}>;
|
|
17
22
|
}
|
|
@@ -7,23 +7,20 @@ const app_integration_entity_1 = require("../entities/app.integration.entity");
|
|
|
7
7
|
const business_app_integration_entity_1 = require("../entities/business.app.integration.entity");
|
|
8
8
|
const process_whatsapp_integration_1 = require("./process.whatsapp.integration");
|
|
9
9
|
class ProcessAppIntegration {
|
|
10
|
-
constructor(business, propertyService
|
|
10
|
+
constructor(business, propertyService) {
|
|
11
11
|
this.business = business;
|
|
12
12
|
this.propertyService = propertyService;
|
|
13
|
-
this.res = res;
|
|
14
13
|
}
|
|
15
14
|
async process(integrationId) {
|
|
16
15
|
await this.validate(integrationId);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
throw new nestjs_utility_services_1.OperationException('No integration found');
|
|
26
|
-
}
|
|
16
|
+
const identifier = this.integration.integration_identifier;
|
|
17
|
+
if (identifier === integration_type_constant_1.IntegrationIdentifierConstants.zoho)
|
|
18
|
+
return this.initializeZoho();
|
|
19
|
+
if (identifier === integration_type_constant_1.IntegrationIdentifierConstants.slack)
|
|
20
|
+
return this.initializeSlack();
|
|
21
|
+
if (identifier === integration_type_constant_1.IntegrationIdentifierConstants.whatsapp)
|
|
22
|
+
return this.initializeWhatsapp();
|
|
23
|
+
throw new nestjs_utility_services_1.OperationException('No integration found');
|
|
27
24
|
}
|
|
28
25
|
async validate(id) {
|
|
29
26
|
const integration = await app_integration_entity_1.AppIntegrationEntity.findOne({ where: { id, active: true } });
|
|
@@ -37,6 +34,9 @@ class ProcessAppIntegration {
|
|
|
37
34
|
this.integration = integration;
|
|
38
35
|
this.user = nestjs_utility_services_1.Auth.user();
|
|
39
36
|
}
|
|
37
|
+
async initializeWhatsapp() {
|
|
38
|
+
return new process_whatsapp_integration_1.ProcessWhatsappIntegration(this.business).handle(this.integration.id);
|
|
39
|
+
}
|
|
40
40
|
async initializeSlack() {
|
|
41
41
|
const clientId = await this.propertyService.get('slack.client.id');
|
|
42
42
|
const scope = await this.propertyService.get('slack.access.scope');
|
|
@@ -45,7 +45,7 @@ class ProcessAppIntegration {
|
|
|
45
45
|
if (!clientId)
|
|
46
46
|
throw new nestjs_utility_services_1.OperationException('No Client Id');
|
|
47
47
|
const url = `https://slack.com/oauth/v2/authorize?scope=${scope}&client_id=${clientId}&redirect_uri=${redirectUrl}&state=${state}`;
|
|
48
|
-
return
|
|
48
|
+
return { redirect_url: url };
|
|
49
49
|
}
|
|
50
50
|
async initializeZoho() {
|
|
51
51
|
const clientId = await this.propertyService.get('zoho.client.id');
|
|
@@ -55,7 +55,7 @@ class ProcessAppIntegration {
|
|
|
55
55
|
if (!clientId)
|
|
56
56
|
throw new nestjs_utility_services_1.OperationException('No Client Id');
|
|
57
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
|
|
58
|
+
return { redirect_url: url };
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
exports.ProcessAppIntegration = ProcessAppIntegration;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process.app.integration.js","sourceRoot":"","sources":["../../../src/access/libraries/process.app.integration.ts"],"names":[],"mappings":";;;AAAA,oFAAkH;
|
|
1
|
+
{"version":3,"file":"process.app.integration.js","sourceRoot":"","sources":["../../../src/access/libraries/process.app.integration.ts"],"names":[],"mappings":";;;AAAA,oFAAkH;AAClH,sFAAwF;AAExF,+EAA0E;AAC1E,iGAA2F;AAC3F,iFAA4E;AAO5E,MAAa,qBAAqB;IAI9B,YACuB,QAA8B,EAC9B,eAAgC;QADhC,aAAQ,GAAR,QAAQ,CAAsB;QAC9B,oBAAe,GAAf,eAAe,CAAiB;IACpD,CAAC;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,CAAC;QACzJ,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,CAAC;IACjC,CAAC;CACJ;AA5DD,sDA4DC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { AccessService, PropertyService } from '@servicelabsco/nestjs-utility-services';
|
|
1
|
+
import { AccessService, PropertyService, SqlService } 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
|
-
|
|
6
|
+
private readonly sqlService;
|
|
7
|
+
constructor(accessService: AccessService, propertyService: PropertyService, sqlService: SqlService);
|
|
7
8
|
validateAccess(): Promise<AccessBusinessEntity>;
|
|
8
9
|
hasRoles(roles: string[]): Promise<AccessBusinessEntity>;
|
|
9
10
|
validateRoles(roles: string[]): Promise<void>;
|
|
@@ -14,9 +14,10 @@ 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, propertyService) {
|
|
17
|
+
constructor(accessService, propertyService, sqlService) {
|
|
18
18
|
this.accessService = accessService;
|
|
19
19
|
this.propertyService = propertyService;
|
|
20
|
+
this.sqlService = sqlService;
|
|
20
21
|
}
|
|
21
22
|
async validateAccess() {
|
|
22
23
|
const user = nestjs_utility_services_1.Auth.user();
|
|
@@ -41,10 +42,8 @@ let AccessBusinessService = class AccessBusinessService {
|
|
|
41
42
|
throw new nestjs_utility_services_1.AccessException(`You don't have appropriate role to do this operation`);
|
|
42
43
|
}
|
|
43
44
|
async getFrontendUrl(business_id) {
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
return;
|
|
47
|
-
const url = business.attributes?.url;
|
|
45
|
+
const business_url = await this.sqlService.read(`select a.attributes->>'url' as url from bz_business_details a where a.id = ${business_id} and a.deleted_at is null`);
|
|
46
|
+
const url = business_url[0]?.url;
|
|
48
47
|
if (url)
|
|
49
48
|
return url;
|
|
50
49
|
const defaultUrl = `https://client.finnoto.in`;
|
|
@@ -55,6 +54,7 @@ exports.AccessBusinessService = AccessBusinessService;
|
|
|
55
54
|
exports.AccessBusinessService = AccessBusinessService = __decorate([
|
|
56
55
|
(0, common_1.Injectable)(),
|
|
57
56
|
__metadata("design:paramtypes", [nestjs_utility_services_1.AccessService,
|
|
58
|
-
nestjs_utility_services_1.PropertyService
|
|
57
|
+
nestjs_utility_services_1.PropertyService,
|
|
58
|
+
nestjs_utility_services_1.SqlService])
|
|
59
59
|
], AccessBusinessService);
|
|
60
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,oFAA2H;AAC3H,+EAA0E;AAGnE,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAC9B,YACqB,aAA4B,EAC5B,eAAgC,EAChC,UAAsB;QAFtB,kBAAa,GAAb,aAAa,CAAe;QAC5B,oBAAe,GAAf,eAAe,CAAiB;QAChC,eAAU,GAAV,UAAU,CAAY;IACxC,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,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