@servicelabsco/slabs-access-manager 0.1.171 → 0.1.172
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 -0
- package/dist/access/controllers/business.app.integration.controller.js +17 -0
- package/dist/access/controllers/business.app.integration.controller.js.map +1 -1
- package/dist/access/controllers/business.user.notification.preference.controller.js +3 -4
- package/dist/access/controllers/business.user.notification.preference.controller.js.map +1 -1
- package/dist/access/controllers/business.webhook.controller.d.ts +3 -0
- package/dist/access/controllers/business.webhook.controller.js +28 -0
- package/dist/access/controllers/business.webhook.controller.js.map +1 -1
- package/dist/access/dtos/add.business.user.notification.preference.dto.d.ts +1 -1
- package/dist/access/dtos/add.business.user.notification.preference.dto.js.map +1 -1
- package/dist/access/dtos/add.integration.preference.dto.d.ts +3 -0
- package/dist/access/dtos/add.integration.preference.dto.js +24 -0
- package/dist/access/dtos/add.integration.preference.dto.js.map +1 -0
- package/dist/access/dtos/add.notification.channel.preference.dto.d.ts +0 -1
- package/dist/access/dtos/add.notification.channel.preference.dto.js +0 -6
- package/dist/access/dtos/add.notification.channel.preference.dto.js.map +1 -1
- package/dist/access/dtos/index.d.ts +1 -0
- package/dist/access/dtos/index.js +1 -0
- package/dist/access/dtos/index.js.map +1 -1
- package/dist/access/entities/app.integration.entity.d.ts +0 -1
- package/dist/access/entities/app.integration.entity.js +0 -4
- package/dist/access/entities/app.integration.entity.js.map +1 -1
- package/dist/access/entities/business.app.integration.entity.d.ts +2 -1
- package/dist/access/entities/business.app.integration.entity.js +6 -2
- package/dist/access/entities/business.app.integration.entity.js.map +1 -1
- package/dist/access/es6.classes.d.ts +3 -3
- package/dist/access/jobs/email.message.job.js +2 -0
- package/dist/access/jobs/email.message.job.js.map +1 -1
- package/dist/access/libraries/business.notification.channel.preference.list.d.ts +0 -1
- package/dist/access/libraries/business.notification.channel.preference.list.js +0 -1
- package/dist/access/libraries/business.notification.channel.preference.list.js.map +1 -1
- package/dist/access/libraries/business.user.notification.preference.list.d.ts +0 -1
- package/dist/access/libraries/business.user.notification.preference.list.js +9 -3
- package/dist/access/libraries/business.user.notification.preference.list.js.map +1 -1
- package/dist/access/libraries/process.slack.integration.js +1 -0
- package/dist/access/libraries/process.slack.integration.js.map +1 -1
- package/dist/access/libraries/process.whatsapp.integration.js +1 -0
- package/dist/access/libraries/process.whatsapp.integration.js.map +1 -1
- package/dist/access/libraries/send.slack.message.notification.d.ts +3 -1
- package/dist/access/libraries/send.slack.message.notification.js +15 -3
- package/dist/access/libraries/send.slack.message.notification.js.map +1 -1
- package/dist/access/libraries/send.whatsapp.message.notification.js +9 -2
- package/dist/access/libraries/send.whatsapp.message.notification.js.map +1 -1
- 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/dist/access/services/notification.preference.service.d.ts +9 -0
- package/dist/access/services/notification.preference.service.js +50 -0
- package/dist/access/services/notification.preference.service.js.map +1 -0
- package/dist/access/services/notification.service.d.ts +6 -4
- package/dist/access/services/notification.service.js +7 -4
- package/dist/access/services/notification.service.js.map +1 -1
- package/dist/access/services/whatsapp.service.d.ts +8 -1
- package/dist/access/services/whatsapp.service.js +40 -2
- package/dist/access/services/whatsapp.service.js.map +1 -1
- package/dist/accessUtility/es6.classes.d.ts +3 -3
- package/dist/migrations/1725439900529-AddVisibleColumnUtlNotificationDetailsTable.d.ts +5 -0
- package/dist/migrations/1725439900529-AddVisibleColumnUtlNotificationDetailsTable.js +15 -0
- package/dist/migrations/1725439900529-AddVisibleColumnUtlNotificationDetailsTable.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PropertyService, SqlService } from '@servicelabsco/nestjs-utility-services';
|
|
2
|
+
import { AddIntegrationPreferenceDto } from '../dtos/add.integration.preference.dto';
|
|
2
3
|
import { BusinessParamDto } from '../dtos/business.param.dto';
|
|
3
4
|
import { DbFindDto } from '../dtos/db.find.dto';
|
|
4
5
|
import { AppIntegrationEntity } from '../entities/app.integration.entity';
|
|
@@ -17,4 +18,5 @@ export declare class BusinessAppIntegrationController {
|
|
|
17
18
|
}>;
|
|
18
19
|
show(params: BusinessParamDto): Promise<BusinessAppIntegrationEntity>;
|
|
19
20
|
revokeIntegration(params: BusinessParamDto): Promise<BusinessAppIntegrationEntity>;
|
|
21
|
+
enableGlobal(params: BusinessParamDto, body: AddIntegrationPreferenceDto): Promise<BusinessAppIntegrationEntity>;
|
|
20
22
|
}
|
|
@@ -15,6 +15,7 @@ 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 add_integration_preference_dto_1 = require("../dtos/add.integration.preference.dto");
|
|
18
19
|
const business_param_dto_1 = require("../dtos/business.param.dto");
|
|
19
20
|
const db_find_dto_1 = require("../dtos/db.find.dto");
|
|
20
21
|
const app_integration_entity_1 = require("../entities/app.integration.entity");
|
|
@@ -68,6 +69,14 @@ let BusinessAppIntegrationController = class BusinessAppIntegrationController {
|
|
|
68
69
|
bz_integration.active = false;
|
|
69
70
|
return bz_integration.save();
|
|
70
71
|
}
|
|
72
|
+
async enableGlobal(params, body) {
|
|
73
|
+
const business = await this.accessBusinessService.validateAccess();
|
|
74
|
+
const bz_integration = await business_app_integration_entity_1.BusinessAppIntegrationEntity.findOne({ where: { id: params.id, business_id: business.id } });
|
|
75
|
+
if (!bz_integration)
|
|
76
|
+
throw new nestjs_utility_services_1.OperationException('There is no any integration');
|
|
77
|
+
bz_integration.enabled_globally = body.enabled_globally;
|
|
78
|
+
return bz_integration.save();
|
|
79
|
+
}
|
|
71
80
|
};
|
|
72
81
|
exports.BusinessAppIntegrationController = BusinessAppIntegrationController;
|
|
73
82
|
__decorate([
|
|
@@ -110,6 +119,14 @@ __decorate([
|
|
|
110
119
|
__metadata("design:paramtypes", [business_param_dto_1.BusinessParamDto]),
|
|
111
120
|
__metadata("design:returntype", Promise)
|
|
112
121
|
], BusinessAppIntegrationController.prototype, "revokeIntegration", null);
|
|
122
|
+
__decorate([
|
|
123
|
+
(0, common_1.Post)(':id/preference'),
|
|
124
|
+
__param(0, (0, common_1.Param)()),
|
|
125
|
+
__param(1, (0, common_1.Body)()),
|
|
126
|
+
__metadata("design:type", Function),
|
|
127
|
+
__metadata("design:paramtypes", [business_param_dto_1.BusinessParamDto, add_integration_preference_dto_1.AddIntegrationPreferenceDto]),
|
|
128
|
+
__metadata("design:returntype", Promise)
|
|
129
|
+
], BusinessAppIntegrationController.prototype, "enableGlobal", null);
|
|
113
130
|
exports.BusinessAppIntegrationController = BusinessAppIntegrationController = __decorate([
|
|
114
131
|
(0, common_1.Controller)('api/b/app-integration'),
|
|
115
132
|
__metadata("design:paramtypes", [access_business_service_1.AccessBusinessService,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business.app.integration.controller.js","sourceRoot":"","sources":["../../../src/access/controllers/business.app.integration.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoE;AACpE,oFAAyG;AACzG,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,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xC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,CAAC;QAEnE,OAAO,8DAA4B,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IACxG,CAAC;IAGK,AAAN,KAAK,CAAC,iBAAiB,CAAU,MAAwB;QACrD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,CAAC;QAEnE,MAAM,cAAc,GAAG,MAAM,8DAA4B,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,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;
|
|
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,2FAAqF;AACrF,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,M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AC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC;QACxD,OAAO,cAAc,CAAC,IAAI,EAAE,CAAC;IACjC,CAAC;CACJ,CAAA;AA1EY,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;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;AAGK;IADL,IAAA,aAAI,EAAC,gBAAgB,CAAC;IACH,WAAA,IAAA,cAAK,GAAE,CAAA;IAA4B,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAzB,qCAAgB,EAAgB,4DAA2B;;oEAQ9F;2CAzEQ,gCAAgC;IAD5C,IAAA,mBAAU,EAAC,uBAAuB,CAAC;qCAGY,+CAAqB;QAChC,oCAAU;QACL,yCAAe;GAJ5C,gCAAgC,CA0E5C"}
|
|
@@ -48,12 +48,11 @@ let BusinessUserNotificationPreferenceController = class BusinessUserNotificatio
|
|
|
48
48
|
async findNotifications(body) {
|
|
49
49
|
const business = await this.accessBusinessService.validateAccess();
|
|
50
50
|
const config = {
|
|
51
|
-
primaryCondition: `a.deleted_at is null`,
|
|
51
|
+
primaryCondition: `a.deleted_at is null and a.visible = true`,
|
|
52
52
|
tableName: 'utl_notification_details a',
|
|
53
|
-
columns: ['a.id', '
|
|
53
|
+
columns: ['a.id', 'a.name', 'a.identifier', 'a.description'],
|
|
54
54
|
idsCompareKey: 'a.id',
|
|
55
|
-
searchCompareKeys: ['
|
|
56
|
-
statusCompareKeys: ['a.active', 'b.active'],
|
|
55
|
+
searchCompareKeys: ['a.name'],
|
|
57
56
|
order: 'a.id desc',
|
|
58
57
|
...body,
|
|
59
58
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business.user.notification.preference.controller.js","sourceRoot":"","sources":["../../../src/access/controllers/business.user.notification.preference.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoE;AACpE,oFAAyG;AACzG,yHAAiH;AACjH,mEAA8D;AAC9D,yIAAgI;AAChI,qDAAgD;AAEhD,2HAAoH;AACpH,wHAAwH;AACxH,kEAA6D;AAC7D,iFAA4E;AAC5E,iEAA6D;AAQtD,IAAM,4CAA4C,GAAlD,MAAM,4CAA4C;IACrD,YACqB,qBAA4C,EAC5C,cAA8B,EAC9B,UAAsB;QAFtB,0BAAqB,GAArB,qBAAqB,CAAuB;QAC5C,mBAAc,GAAd,cAAc,CAAgB;QAC9B,eAAU,GAAV,UAAU,CAAY;IACxC,CAAC;IAGE,AAAN,KAAK,CAAC,MAAM,CAAS,IAAqD;QACtE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,CAAC;QACnE,OAAO,IAAI,0FAA6C,CAAC,QAAQ,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1G,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAAS,IAA8C;QAC/D,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,CAAC;QAEnE,IAAI,CAAC,GAAG,uFAAwC,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;QACtF,IAAI,IAAI,EAAE,EAAE;YAAE,CAAC,GAAG,MAAM,uFAAwC,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAEjF,CAAC,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QACzB,CAAC,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QAC/B,CAAC,CAAC,eAAe,GAAG,IAAI,EAAE,eAAe,CAAC;QAC1C,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC;QAEhB,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;IACpB,CAAC;IAGK,AAAN,KAAK,CAAC,iBAAiB,CAAS,IAAe;QAC3C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,CAAC;QAEnE,MAAM,MAAM,GAAqB;YAC7B,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"business.user.notification.preference.controller.js","sourceRoot":"","sources":["../../../src/access/controllers/business.user.notification.preference.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoE;AACpE,oFAAyG;AACzG,yHAAiH;AACjH,mEAA8D;AAC9D,yIAAgI;AAChI,qDAAgD;AAEhD,2HAAoH;AACpH,wHAAwH;AACxH,kEAA6D;AAC7D,iFAA4E;AAC5E,iEAA6D;AAQtD,IAAM,4CAA4C,GAAlD,MAAM,4CAA4C;IACrD,YACqB,qBAA4C,EAC5C,cAA8B,EAC9B,UAAsB;QAFtB,0BAAqB,GAArB,qBAAqB,CAAuB;QAC5C,mBAAc,GAAd,cAAc,CAAgB;QAC9B,eAAU,GAAV,UAAU,CAAY;IACxC,CAAC;IAGE,AAAN,KAAK,CAAC,MAAM,CAAS,IAAqD;QACtE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,CAAC;QACnE,OAAO,IAAI,0FAA6C,CAAC,QAAQ,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1G,CAAC;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,aAAI,GAAE;IACO,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,wFAAwC;;0EAYlE;AAGK;IADL,IAAA,aAAI,EAAC,oBAAoB,CAAC;IACF,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,uBAAS;;qFAc9C;AAGK;IADL,IAAA,YAAG,EAAC,KAAK,CAAC;IACC,WAAA,IAAA,cAAK,GAAE,CAAA;;qCAAS,qCAAgB;;wEAW3C;AAGK;IADL,IAAA,aAAI,EAAC,cAAc,CAAC;IACL,WAAA,IAAA,cAAK,GAAE,CAAA;;qCAAS,qCAAgB;;4EAE/C;AAGK;IADL,IAAA,aAAI,EAAC,gBAAgB,CAAC;IACL,WAAA,IAAA,cAAK,GAAE,CAAA;;qCAAS,qCAAgB;;8EAEjD;uDAnEQ,4CAA4C;IADxD,IAAA,mBAAU,EAAC,yBAAyB,CAAC;qCAGU,+CAAqB;QAC5B,gCAAc;QAClB,oCAAU;GAJlC,4CAA4C,CA+ExD"}
|
|
@@ -10,4 +10,7 @@ export declare class BusinessWebhookController {
|
|
|
10
10
|
find(body: StringSearchDto): Promise<any>;
|
|
11
11
|
show(params: BusinessParamDto): Promise<BusinessWebhookEntity>;
|
|
12
12
|
create(body: AddWebhookDto): Promise<BusinessWebhookEntity>;
|
|
13
|
+
activate(): Promise<BusinessWebhookEntity>;
|
|
14
|
+
deactivate(): Promise<BusinessWebhookEntity>;
|
|
15
|
+
handleStatus(status: boolean): Promise<BusinessWebhookEntity>;
|
|
13
16
|
}
|
|
@@ -50,6 +50,22 @@ let BusinessWebhookController = class BusinessWebhookController {
|
|
|
50
50
|
wh.event_type = JSON.stringify(body.events);
|
|
51
51
|
return wh.save();
|
|
52
52
|
}
|
|
53
|
+
async activate() {
|
|
54
|
+
return this.handleStatus(true);
|
|
55
|
+
}
|
|
56
|
+
async deactivate() {
|
|
57
|
+
return this.handleStatus(false);
|
|
58
|
+
}
|
|
59
|
+
async handleStatus(status) {
|
|
60
|
+
const business = await this.accessBusinessService.validateAccess();
|
|
61
|
+
const r = await business_webhook_entity_1.BusinessWebhookEntity.findOne({ where: { business_id: business.id } });
|
|
62
|
+
if (r?.business_id !== business.id)
|
|
63
|
+
throw new nestjs_utility_services_1.AccessException();
|
|
64
|
+
if (status === r.active)
|
|
65
|
+
throw new nestjs_utility_services_1.OperationException(`Invalid Operation`);
|
|
66
|
+
r.active = status;
|
|
67
|
+
return r.save();
|
|
68
|
+
}
|
|
53
69
|
};
|
|
54
70
|
exports.BusinessWebhookController = BusinessWebhookController;
|
|
55
71
|
__decorate([
|
|
@@ -73,6 +89,18 @@ __decorate([
|
|
|
73
89
|
__metadata("design:paramtypes", [add_webhook_dto_1.AddWebhookDto]),
|
|
74
90
|
__metadata("design:returntype", Promise)
|
|
75
91
|
], BusinessWebhookController.prototype, "create", null);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, common_1.Post)('activate'),
|
|
94
|
+
__metadata("design:type", Function),
|
|
95
|
+
__metadata("design:paramtypes", []),
|
|
96
|
+
__metadata("design:returntype", Promise)
|
|
97
|
+
], BusinessWebhookController.prototype, "activate", null);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, common_1.Post)('deactivate'),
|
|
100
|
+
__metadata("design:type", Function),
|
|
101
|
+
__metadata("design:paramtypes", []),
|
|
102
|
+
__metadata("design:returntype", Promise)
|
|
103
|
+
], BusinessWebhookController.prototype, "deactivate", null);
|
|
76
104
|
exports.BusinessWebhookController = BusinessWebhookController = __decorate([
|
|
77
105
|
(0, common_1.Controller)('api/b/webhook'),
|
|
78
106
|
__metadata("design:paramtypes", [access_business_service_1.AccessBusinessService,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business.webhook.controller.js","sourceRoot":"","sources":["../../../src/access/controllers/business.webhook.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoE;AACpE,
|
|
1
|
+
{"version":3,"file":"business.webhook.controller.js","sourceRoot":"","sources":["../../../src/access/controllers/business.webh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IADL,IAAA,aAAI,GAAE;IACO,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,+BAAa;;uDAUvC;AAGK;IADL,IAAA,aAAI,EAAC,UAAU,CAAC;;;;yDAGhB;AAGK;IADL,IAAA,aAAI,EAAC,YAAY,CAAC;;;;2DAGlB;oCAlDQ,yBAAyB;IADrC,IAAA,mBAAU,EAAC,eAAe,CAAC;qCAGoB,+CAAqB;QAChC,oCAAU;GAHlC,yBAAyB,CA8DrC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add.business.user.notification.preference.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/add.business.user.notification.preference.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA2C;AAC3C,qDAA2E;AAC3E,4FAAsF;AAEtF,MAAa,wCAAwC;CAoBpD;AApBD,4FAoBC;AAhBG;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;oEACC;AAKZ;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yEACG;AAKhB;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAM,EAAC,4DAA2B,CAAC;IACnC,IAAA,4BAAU,GAAE;;4EACM;AAKnB;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;
|
|
1
|
+
{"version":3,"file":"add.business.user.notification.preference.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/add.business.user.notification.preference.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA2C;AAC3C,qDAA2E;AAC3E,4FAAsF;AAEtF,MAAa,wCAAwC;CAoBpD;AApBD,4FAoBC;AAhBG;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;oEACC;AAKZ;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yEACG;AAKhB;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAM,EAAC,4DAA2B,CAAC;IACnC,IAAA,4BAAU,GAAE;;4EACM;AAKnB;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;iFACW"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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.AddIntegrationPreferenceDto = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
class AddIntegrationPreferenceDto {
|
|
16
|
+
}
|
|
17
|
+
exports.AddIntegrationPreferenceDto = AddIntegrationPreferenceDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_transformer_1.Expose)(),
|
|
20
|
+
(0, class_validator_1.IsOptional)(),
|
|
21
|
+
(0, class_validator_1.IsBoolean)(),
|
|
22
|
+
__metadata("design:type", Boolean)
|
|
23
|
+
], AddIntegrationPreferenceDto.prototype, "enabled_globally", void 0);
|
|
24
|
+
//# sourceMappingURL=add.integration.preference.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.integration.preference.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/add.integration.preference.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA2C;AAC3C,qDAAwD;AAExD,MAAa,2BAA2B;CAKvC;AALD,kEAKC;AADG;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;;qEACe"}
|
|
@@ -34,10 +34,4 @@ __decorate([
|
|
|
34
34
|
(0, class_validator_1.IsNotEmpty)(),
|
|
35
35
|
__metadata("design:type", Number)
|
|
36
36
|
], AddNotificationChannelPreferenceDto.prototype, "channel_id", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, class_transformer_1.Expose)(),
|
|
39
|
-
(0, class_validator_1.IsNumber)(),
|
|
40
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
41
|
-
__metadata("design:type", Number)
|
|
42
|
-
], AddNotificationChannelPreferenceDto.prototype, "notification_id", void 0);
|
|
43
37
|
//# sourceMappingURL=add.notification.channel.preference.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add.notification.channel.preference.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/add.notification.channel.preference.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA2C;AAC3C,qDAA2E;AAC3E,4FAAsF;AAEtF,MAAa,mCAAmC;
|
|
1
|
+
{"version":3,"file":"add.notification.channel.preference.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/add.notification.channel.preference.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA2C;AAC3C,qDAA2E;AAC3E,4FAAsF;AAEtF,MAAa,mCAAmC;CAe/C;AAfD,kFAeC;AAXG;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+DACD;AAKZ;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;oEACG;AAKhB;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAM,EAAC,4DAA2B,CAAC;IACnC,IAAA,4BAAU,GAAE;;uEACM"}
|
|
@@ -11,6 +11,7 @@ export * from './add.custom.field.dto';
|
|
|
11
11
|
export * from './add.dashboard.component.dto';
|
|
12
12
|
export * from './add.dashboard.component.properties.dto';
|
|
13
13
|
export * from './add.group.member.dto';
|
|
14
|
+
export * from './add.integration.preference.dto';
|
|
14
15
|
export * from './add.listing.preference.dto';
|
|
15
16
|
export * from './add.notification.channel.preference.dto';
|
|
16
17
|
export * from './add.role.dto';
|
|
@@ -27,6 +27,7 @@ __exportStar(require("./add.custom.field.dto"), exports);
|
|
|
27
27
|
__exportStar(require("./add.dashboard.component.dto"), exports);
|
|
28
28
|
__exportStar(require("./add.dashboard.component.properties.dto"), exports);
|
|
29
29
|
__exportStar(require("./add.group.member.dto"), exports);
|
|
30
|
+
__exportStar(require("./add.integration.preference.dto"), exports);
|
|
30
31
|
__exportStar(require("./add.listing.preference.dto"), exports);
|
|
31
32
|
__exportStar(require("./add.notification.channel.preference.dto"), exports);
|
|
32
33
|
__exportStar(require("./add.role.dto"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/access/dtos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAAA,wDAAsC;AAAA,qEAAmD;AAAA,gEAA8C;AAAA,gEAA8C;AAAA,kFAAgE;AAAA,wDAAsC;AAAA,wDAAsC;AAAA,yDAAuC;AAAA,yDAAuC;AAAA,gEAA8C;AAAA,2EAAyD;AAAA,yDAAuC;AAAA,+DAA6C;AAAA,4EAA0D;AAAA,iDAA+B;AAAA,6DAA2C;AAAA,sDAAoC;AAAA,g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AoC;AAAA,oDAAkC;AAAA,sDAAoC;AAAA,6DAA2C;AAAA,kEAAgD;AAAA,wDAAsC;AAAA,qEAAmD;AAAA,sEAAoD;AAAA,mEAAiD;AAAA,6DAA2C;AAAA,wEAAsD;AAAA,iEAA+C;AAAA,+DAA6C;AAAA,gEAA8C;AAAA,gEAA8C;AAAA,oEAAkD;AAAA,iEAA+C;AAAA,qEAAkD"}
|
|
@@ -3,7 +3,6 @@ import { AppIntegrationAttributesDto } from '../dtos/app.integration.attributes.
|
|
|
3
3
|
export declare class AppIntegrationEntity extends CommonEntity {
|
|
4
4
|
name: string;
|
|
5
5
|
active: boolean;
|
|
6
|
-
enabled_globally: boolean;
|
|
7
6
|
integration_identifier: string;
|
|
8
7
|
url: string;
|
|
9
8
|
image: string;
|
|
@@ -24,10 +24,6 @@ __decorate([
|
|
|
24
24
|
(0, typeorm_1.Column)(),
|
|
25
25
|
__metadata("design:type", Boolean)
|
|
26
26
|
], AppIntegrationEntity.prototype, "active", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, typeorm_1.Column)(),
|
|
29
|
-
__metadata("design:type", Boolean)
|
|
30
|
-
], AppIntegrationEntity.prototype, "enabled_globally", void 0);
|
|
31
27
|
__decorate([
|
|
32
28
|
(0, typeorm_1.Column)({ unique: true }),
|
|
33
29
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.integration.entity.js","sourceRoot":"","sources":["../../../src/access/entities/app.integration.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oFAAsE;AACtE,qCAAyC;AACzC,2FAAqF;AAS9E,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,sCAAY;
|
|
1
|
+
{"version":3,"file":"app.integration.entity.js","sourceRoot":"","sources":["../../../src/access/entities/app.integration.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oFAAsE;AACtE,qCAAyC;AACzC,2FAAqF;AAS9E,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,sCAAY;CAqBrD,CAAA;AArBY,oDAAoB;AAE7B;IADC,IAAA,gBAAM,GAAE;;kDACI;AAGb;IADC,IAAA,gBAAM,GAAE;;oDACO;AAGhB;IADC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;oEACM;AAG/B;IADC,IAAA,gBAAM,GAAE;;iDACG;AAGZ;IADC,IAAA,gBAAM,GAAE;;mDACK;AAGd;IADC,IAAA,gBAAM,GAAE;;yDACW;AAGpB;IADC,IAAA,gBAAM,EAAC,MAAM,CAAC;8BACH,4DAA2B;wDAAC;+BApB/B,oBAAoB;IADhC,IAAA,gBAAM,EAAC,sBAAsB,CAAC;GAClB,oBAAoB,CAqBhC"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { CommonEntity } from '@servicelabsco/nestjs-utility-services';
|
|
2
2
|
import { BusinessAppIntegrationAttributesDto } from '../dtos/business.app.integration.attributes.dto';
|
|
3
|
-
import { AppIntegrationEntity } from './app.integration.entity';
|
|
4
3
|
import { AccessBusinessEntity } from './access.business.entity';
|
|
4
|
+
import { AppIntegrationEntity } from './app.integration.entity';
|
|
5
5
|
export declare class BusinessAppIntegrationEntity extends CommonEntity {
|
|
6
6
|
business_id: number;
|
|
7
7
|
integration_id: number;
|
|
8
8
|
name: string;
|
|
9
9
|
description: string;
|
|
10
10
|
active: boolean;
|
|
11
|
+
enabled_globally: boolean;
|
|
11
12
|
attributes: BusinessAppIntegrationAttributesDto;
|
|
12
13
|
business: AccessBusinessEntity;
|
|
13
14
|
integration: AppIntegrationEntity;
|
|
@@ -10,11 +10,11 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.BusinessAppIntegrationEntity = 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_attributes_dto_1 = require("../dtos/business.app.integration.attributes.dto");
|
|
16
|
-
const app_integration_entity_1 = require("./app.integration.entity");
|
|
17
16
|
const access_business_entity_1 = require("./access.business.entity");
|
|
17
|
+
const app_integration_entity_1 = require("./app.integration.entity");
|
|
18
18
|
let BusinessAppIntegrationEntity = class BusinessAppIntegrationEntity extends nestjs_utility_services_1.CommonEntity {
|
|
19
19
|
};
|
|
20
20
|
exports.BusinessAppIntegrationEntity = BusinessAppIntegrationEntity;
|
|
@@ -38,6 +38,10 @@ __decorate([
|
|
|
38
38
|
(0, typeorm_1.Column)(),
|
|
39
39
|
__metadata("design:type", Boolean)
|
|
40
40
|
], BusinessAppIntegrationEntity.prototype, "active", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)(),
|
|
43
|
+
__metadata("design:type", Boolean)
|
|
44
|
+
], BusinessAppIntegrationEntity.prototype, "enabled_globally", void 0);
|
|
41
45
|
__decorate([
|
|
42
46
|
(0, typeorm_1.Column)('json'),
|
|
43
47
|
__metadata("design:type", business_app_integration_attributes_dto_1.BusinessAppIntegrationAttributesDto)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business.app.integration.entity.js","sourceRoot":"","sources":["../../../src/access/entities/business.app.integration.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgE;AAChE,
|
|
1
|
+
{"version":3,"file":"business.app.integration.entity.js","sourceRoot":"","sources":["../../../src/access/entities/business.app.integration.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oFAAsE;AACtE,qCAAgE;AAChE,6GAAsG;AACtG,qEAAgE;AAChE,qEAAgE;AASzD,IAAM,4BAA4B,GAAlC,MAAM,4BAA6B,SAAQ,sCAAY;CAyB7D,CAAA;AAzBY,oEAA4B;AAErC;IADC,IAAA,gBAAM,GAAE;;iEACW;AAGpB;IADC,IAAA,gBAAM,GAAE;;oEACc;AAGvB;IADC,IAAA,gBAAM,GAAE;;0DACI;AAGb;IADC,IAAA,gBAAM,GAAE;;iEACW;AAGpB;IADC,IAAA,gBAAM,GAAE;;4DACO;AAGhB;IADC,IAAA,gBAAM,GAAE;;sEACiB;AAG1B;IADC,IAAA,gBAAM,EAAC,MAAM,CAAC;8BACH,6EAAmC;gEAAC;AAG4B;IAA3E,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,6CAAoB,CAAC;IAAE,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;8BAAW,6CAAoB;8DAAC;AAC5B;IAA9E,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,6CAAoB,CAAC;IAAE,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;8BAAc,6CAAoB;iEAAC;uCAxBxG,4BAA4B;IADxC,IAAA,gBAAM,EAAC,qBAAqB,CAAC;GACjB,4BAA4B,CAyBxC"}
|
|
@@ -357,10 +357,10 @@ declare const es6Classes: {
|
|
|
357
357
|
commands: (typeof WebhookPollCommand)[];
|
|
358
358
|
controllers: (typeof AccessMenuController | typeof ApiAccountController | typeof BulkUploadController | typeof BulkUploadItemController | typeof BusinessAppIntegrationController | typeof BusinessNotificationChannelPreferenceController | typeof BusinessPreferenceController | typeof BusinessUserGroupController | typeof BusinessUserNotificationPreferenceController | typeof BusinessWebhookController | 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)[];
|
|
359
359
|
dtos: (typeof FcmTemplateAttributesDto | typeof NotificationPayloadDto | typeof SendEmailNotificationDataDto | typeof GchatPostingPayloadDto | typeof AddShortUrlDto | typeof BankAccountPayloadDto | typeof RecurringDefinitionDto | typeof SendWebhookRequestPayload | typeof AccessBusinessParamDto | typeof DateRangeFilterDto | typeof DateFilterDto | typeof ListResponseFormatDto | typeof NumberRangeFilterDto | typeof CommonListFilterDto | typeof DbFindDto | typeof ListResponseDto | typeof AddListingPreferenceDto | typeof ProcessCommonListConfigDto | typeof AddBusinessPreferenceDto | typeof AddWebhookDto | 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)[];
|
|
360
|
-
entities: (typeof AccessBusinessEntity | typeof BusinessUserEntity | typeof ProductEntity | typeof GchatUserEntity | typeof GchatMessageEntity | typeof GchatWebhookMessageEntity | typeof SlackIntegrationEntity | typeof SlackMessageEntity | typeof
|
|
361
|
-
enums: (typeof NotificationTypeEnum | typeof
|
|
360
|
+
entities: (typeof AccessBusinessEntity | typeof BusinessUserEntity | typeof ProductEntity | typeof FcmMessageEntity | typeof FcmTokenEntity | typeof GchatUserEntity | typeof GchatMessageEntity | typeof GchatWebhookMessageEntity | typeof SlackIntegrationEntity | typeof SlackMessageEntity | typeof BzNotificationChannelPreferenceEntity | typeof SlackUserEntity | typeof WhatsappMessageEntity | typeof WhatsappPreferenceEntity | typeof BusinessAppIntegrationCredentialEntity | typeof BusinessAppIntegrationMessagesEntity | typeof BusinessEmailEntity | typeof BusinessGroupRoleEntity | typeof MenuRoleEntity | typeof MenuEntity | typeof UiActionRoleEntity | typeof MenuActionEntity | typeof ChildMenuEntity | typeof BusinessMenuEntity | typeof GroupRoleEntity | typeof BusinessUserRoleEntity | typeof BusinessWebhookEntity | 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 WebhookLogEntity | typeof WebhookSlugEntity)[];
|
|
361
|
+
enums: (typeof NotificationTypeEnum | typeof NotificationChannelTypeEnum | typeof RecurringPeriodEnum | typeof CustomColumnTypeEnum | typeof PlatformTypeEnum)[];
|
|
362
362
|
jobs: (typeof AccessTestJob | typeof ApiAccountJob | typeof AppIntegrationJob | typeof BusinessAppIntegrationCredentialJob | typeof BusinessAppIntegrationJob | typeof BusinessAppIntegrationMessagesJob | typeof BusinessEmailJob | typeof BusinessGroupRoleJob | typeof BusinessMenuJob | typeof BusinessPreferenceJob | typeof BusinessUserGroupJob | typeof BusinessUserJob | typeof BusinessUserNotificationPreferenceJob | typeof BusinessUserRoleJob | typeof BusinessWebhookJob | typeof BzNotificationChannelPreferenceJob | 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 WebhookEventJob | typeof WebhookLogJob | typeof WebhookSlugJob | typeof WebhookTypeJob | typeof WhatsappIncomingWebhookJob | typeof WhatsappMessageJob | typeof WhatsappTemplateJob)[];
|
|
363
|
-
libraries: (typeof ProcessEmailNotification | typeof SendEmailNotification | typeof SendGchatMessageNotification | typeof SendGchatWebhookNotification | typeof SendSlackMessageNotification | typeof SendSlackWebhookNotification | typeof SendWhatsappMessageNotification | typeof
|
|
363
|
+
libraries: (typeof ProcessEmailNotification | typeof SendEmailNotification | typeof SendFcmNotification | typeof SendGchatMessageNotification | typeof SendGchatWebhookNotification | typeof SendSlackMessageNotification | typeof SendSlackWebhookNotification | typeof SendWhatsappMessageNotification | typeof SendWebhookRequest | 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 ProcessBusinessNotificationChannelPreferenceList | typeof ProcessBusinessUserGroupList | typeof ProcessUserGroupCreation | typeof ProcessBusinessUserNotificationPreferenceList | 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 ProcessRevokeSlackIntegration | typeof ProcessBusinessGroupRoleUpdation | typeof ProcessBusinessUserRoleUpdate | typeof ProcessGroupMemberUpdation | typeof SyncBusinessUserRole | typeof CommonTagController | typeof ProcessConversationData | typeof ConversationController | typeof ValidateCustomFieldData | typeof ProcessCommonCustomField | typeof ProcessNotification | typeof ProcessSlackMessage | typeof ProcessTestList)[];
|
|
364
364
|
middlewares: (typeof BusinessMiddleware | typeof ExternalAccessMiddleware)[];
|
|
365
365
|
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)[];
|
|
366
366
|
subscribers: (typeof ApiAccountSubscriber | typeof AppIntegrationSubscriber | typeof BusinessAppIntegrationCredentialSubscriber | typeof BusinessAppIntegrationMessagesSubscriber | typeof BusinessAppIntegrationSubscriber | typeof BusinessEmailSubscriber | typeof BusinessGroupRoleSubscriber | typeof BusinessMenuSubscriber | typeof BusinessPreferenceSubscriber | typeof BusinessUserGroupSubscriber | typeof BusinessUserNotificationPreferenceSubscriber | typeof BusinessUserRoleSubscriber | typeof BusinessUserSubscriber | typeof BusinessWebhookSubscriber | typeof BzNotificationChannelPreferenceSubscriber | 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 WebhookEventSubscriber | typeof WebhookLogSubscriber | typeof WebhookSlugSubscriber | typeof WebhookTypeSubscriber | typeof WhatsappMessageSubscriber | typeof WhatsappTemplateSubscriber)[];
|
|
@@ -28,6 +28,8 @@ let EmailMessageJob = class EmailMessageJob extends nestjs_utility_services_1.Co
|
|
|
28
28
|
const sql = `select count(1) count from bz_email_messages a where a.email_id =${evt.entity.email_id} and a.read=false and a.deleted_at is null`;
|
|
29
29
|
const emailMessages = await this.sqlService.readFirst(sql);
|
|
30
30
|
const email = await business_email_entity_1.BusinessEmailEntity.first(evt.entity.email_id);
|
|
31
|
+
if (!email)
|
|
32
|
+
return;
|
|
31
33
|
email.attributes = { ...email.attributes, unread_count: emailMessages.count };
|
|
32
34
|
return email.save();
|
|
33
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.message.job.js","sourceRoot":"","sources":["../../../src/access/jobs/email.message.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oFAA+G;AAC/G,6EAAwE;AAIjE,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,mCAAS;IAC1C,YACuB,YAA0B,EAC5B,UAAsB;QAEvC,KAAK,CAAC,kCAAkC,CAAC,CAAC;QAHvB,iBAAY,GAAZ,YAAY,CAAc;QAC5B,eAAU,GAAV,UAAU,CAAY;IAG3C,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,GAAyC;QAClD,OAAO,GAAG,CAAC,MAAM,CAAC;IACtB,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,GAAyC;QAC1D,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC;YAAE,OAAO;QAEnC,MAAM,GAAG,GAAG,oEAAoE,GAAG,CAAC,MAAM,CAAC,QAAQ,6CAA6C,CAAC;QACjJ,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QAE3D,MAAM,KAAK,GAAG,MAAM,2CAAmB,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"email.message.job.js","sourceRoot":"","sources":["../../../src/access/jobs/email.message.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oFAA+G;AAC/G,6EAAwE;AAIjE,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,mCAAS;IAC1C,YACuB,YAA0B,EAC5B,UAAsB;QAEvC,KAAK,CAAC,kCAAkC,CAAC,CAAC;QAHvB,iBAAY,GAAZ,YAAY,CAAc;QAC5B,eAAU,GAAV,UAAU,CAAY;IAG3C,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,GAAyC;QAClD,OAAO,GAAG,CAAC,MAAM,CAAC;IACtB,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,GAAyC;QAC1D,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC;YAAE,OAAO;QAEnC,MAAM,GAAG,GAAG,oEAAoE,GAAG,CAAC,MAAM,CAAC,QAAQ,6CAA6C,CAAC;QACjJ,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QAE3D,MAAM,KAAK,GAAG,MAAM,2CAAmB,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACnE,IAAI,CAAC,KAAK;YAAE,OAAO;QAEnB,KAAK,CAAC,UAAU,GAAG,EAAE,GAAG,KAAK,CAAC,UAAU,EAAE,YAAY,EAAE,aAAa,CAAC,KAAK,EAAE,CAAC;QAE9E,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC;IACxB,CAAC;CACJ,CAAA;AAxBY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;qCAG4B,sCAAY;QAChB,oCAAU;GAHlC,eAAe,CAwB3B"}
|
|
@@ -10,7 +10,6 @@ export declare class ProcessBusinessNotificationChannelPreferenceList extends Pr
|
|
|
10
10
|
protected config: {
|
|
11
11
|
sql: string;
|
|
12
12
|
columns: string[];
|
|
13
|
-
order: string;
|
|
14
13
|
metrics: any[];
|
|
15
14
|
};
|
|
16
15
|
constructor(business: AccessBusinessEntity, listingService: ListingService);
|
|
@@ -10,7 +10,6 @@ class ProcessBusinessNotificationChannelPreferenceList extends process_common_li
|
|
|
10
10
|
this.config = {
|
|
11
11
|
sql: `bz_notification_channel_preferences a LEFT JOIN sys_users b on b.id=a.user_id LEFT join sys_lookup_values c on c.id=a.channel_id WHERE a.deleted_at IS NULL`,
|
|
12
12
|
columns: ['a.*', 'b.name user_name', 'c.name channel_name'],
|
|
13
|
-
order: 'sq.name asc',
|
|
14
13
|
metrics: [],
|
|
15
14
|
};
|
|
16
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business.notification.channel.preference.list.js","sourceRoot":"","sources":["../../../src/access/libraries/business.notification.channel.preference.list.ts"],"names":[],"mappings":";;;AAKA,+DAA0D;AAO1D,MAAa,gDAAiD,SAAQ,uCAAiB;
|
|
1
|
+
{"version":3,"file":"business.notification.channel.preference.list.js","sourceRoot":"","sources":["../../../src/access/libraries/business.notification.channel.preference.list.ts"],"names":[],"mappings":";;;AAKA,+DAA0D;AAO1D,MAAa,gDAAiD,SAAQ,uCAAiB;IAqBnF,YACuB,QAA8B,EAC9B,cAA8B;QAEjD,KAAK,EAAE,CAAC;QAHW,aAAQ,GAAR,QAAQ,CAAsB;QAC9B,mBAAc,GAAd,cAAc,CAAgB;QAd3C,WAAM,GAAG;YACf,GAAG,EAAE,6JAA6J;YAClK,OAAO,EAAE,CAAC,KAAK,EAAE,kBAAkB,EAAE,qBAAqB,CAAC;YAC3D,OAAO,EAAE,EAAE;SACd,CAAC;IAaF,CAAC;IAQD,KAAK,CAAC,OAAO,CAAC,MAA0D;QACpE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,IAAI,CAAC,cAAc,EAAE,CAAC;QAEtB,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;IACzB,CAAC;IAOO,cAAc;QAClB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,mBAAmB,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;QAE9D,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,IAAI,CAAC,aAAa,EAAE,CAAC;QAErB,IAAI,CAAC,MAAM,EAAE,CAAC;IAClB,CAAC;IAEO,aAAa;QACjB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU;YAAE,OAAO;QACpC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,kBAAkB,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC;IACvE,CAAC;IAQO,MAAM;QACV,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM;YAAE,OAAO;QAChC,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;QAE/B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAAC;IACtD,CAAC;CACJ;AAzED,4GAyEC"}
|
|
@@ -10,7 +10,6 @@ export declare class ProcessBusinessUserNotificationPreferenceList extends Proce
|
|
|
10
10
|
protected config: {
|
|
11
11
|
sql: string;
|
|
12
12
|
columns: string[];
|
|
13
|
-
order: string;
|
|
14
13
|
metrics: any[];
|
|
15
14
|
};
|
|
16
15
|
constructor(business: AccessBusinessEntity, listingService: ListingService);
|
|
@@ -8,9 +8,15 @@ class ProcessBusinessUserNotificationPreferenceList extends process_common_list_
|
|
|
8
8
|
this.business = business;
|
|
9
9
|
this.listingService = listingService;
|
|
10
10
|
this.config = {
|
|
11
|
-
sql: `bz_user_notification_preferences a LEFT JOIN utl_notification_details b ON a.notification_id=b.id AND b.deleted_at IS NULL LEFT JOIN sys_lookup_values c ON c.id=a.channel_id LEFT JOIN sys_users d ON d.id=a.user_id WHERE a.deleted_at IS NULL`,
|
|
12
|
-
columns: [
|
|
13
|
-
|
|
11
|
+
sql: `bz_user_notification_preferences a LEFT JOIN utl_notification_details b ON a.notification_id=b.id AND b.deleted_at IS NULL LEFT JOIN sys_lookup_values c ON c.id=a.channel_id LEFT JOIN sys_users d ON d.id=a.user_id WHERE a.deleted_at IS NULL and b.visible = true`,
|
|
12
|
+
columns: [
|
|
13
|
+
'a.*',
|
|
14
|
+
'b.name notification_name',
|
|
15
|
+
'd.name user_name',
|
|
16
|
+
'b.identifier',
|
|
17
|
+
'c.name channel_name',
|
|
18
|
+
'b.description notification_description',
|
|
19
|
+
],
|
|
14
20
|
metrics: [],
|
|
15
21
|
};
|
|
16
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business.user.notification.preference.list.js","sourceRoot":"","sources":["../../../src/access/libraries/business.user.notification.preference.list.ts"],"names":[],"mappings":";;;AAIA,+DAA0D;AAO1D,MAAa,6CAA8C,SAAQ,uCAAiB;
|
|
1
|
+
{"version":3,"file":"business.user.notification.preference.list.js","sourceRoot":"","sources":["../../../src/access/libraries/business.user.notification.preference.list.ts"],"names":[],"mappings":";;;AAIA,+DAA0D;AAO1D,MAAa,6CAA8C,SAAQ,uCAAiB;IA4BhF,YACuB,QAA8B,EAC9B,cAA8B;QAEjD,KAAK,EAAE,CAAC;QAHW,aAAQ,GAAR,QAAQ,CAAsB;QAC9B,mBAAc,GAAd,cAAc,CAAgB;QArB3C,WAAM,GAAG;YACf,GAAG,EAAE,uQAAuQ;YAC5Q,OAAO,EAAE;gBACL,KAAK;gBACL,0BAA0B;gBAC1B,kBAAkB;gBAClB,cAAc;gBACd,qBAAqB;gBACrB,wCAAwC;aAC3C;YACD,OAAO,EAAE,EAAE;SACd,CAAC;IAaF,CAAC;IAQD,KAAK,CAAC,OAAO,CAAC,MAAuD;QACjE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,IAAI,CAAC,cAAc,EAAE,CAAC;QAEtB,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;IACzB,CAAC;IAOO,cAAc;QAClB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,mBAAmB,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;QAE9D,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAE1B,IAAI,CAAC,MAAM,EAAE,CAAC;IAClB,CAAC;IAEO,aAAa;QACjB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU;YAAE,OAAO;QACpC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,kBAAkB,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC;IACvE,CAAC;IAEO,kBAAkB;QACtB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe;YAAE,OAAO;QACzC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,uBAAuB,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE,CAAC,CAAC;IACjF,CAAC;IAQO,MAAM;QACV,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM;YAAE,OAAO;QAChC,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;QAE/B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAAC;IACtD,CAAC;CACJ;AAtFD,sGAsFC"}
|
|
@@ -1 +1 @@
|
|
|
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,GAA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I,CAAC,EAAE;YACxB,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE;
|
|
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,CAAC;QAC9F,IAAI,CAAC,cAAc;YAAE,cA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a,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,MAAM,gBAAgB,GAAG,MAAM,iDAAsB,CAAC,UAAU,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;QAEpG,gBAAgB,CAAC,UAAU,GAAG,IAAI,CAAC;QACnC,gBAAgB,CAAC,YAAY,GAAG,KAAK,CAAC;QAEtC,OAAO,gBAAgB,CAAC,IAAI,EAAE,CAAC;IACnC,CAAC;CACJ;AAvHD,0DAuHC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process.whatsapp.integration.js","sourceRoot":"","sources":["../../../src/access/libraries/process.whatsapp.integration.ts"],"names":[],"mappings":";;;AAAA,oFAA4E;AAE5E,+EAA0E;AAC1E,iGAA2F;AAK3F,MAAa,0BAA0B;IACnC,YAA6B,QAA8B;QAA9B,aAAQ,GAAR,QAAQ,CAAsB;IAAG,CAAC;IAE/D,KAAK,CAAC,MAAM,CAAC,cAAsB;QAC/B,MAAM,WAAW,GAAG,MAAM,6CAAoB,CAAC,OAA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O,IAAI,CAAC,sBAAsB,CAAC,cAAc,CAAC,CAAC;IACvD,CAAC;IAED,KAAK,CAAC,sBAAsB,CAAC,cAAsB;QAC/C,IAAI,WAAW,GAAG,MAAM,8DAA4B,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,cAAc,EAAE,EAAE,CAAC,CAAC;QAE3H,IAAI,WAAW,EAAE,CAAC;YACd,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC;YAC1B,OAAO,WAAW,CAAC,IAAI,EAAE,CAAC;QAC9B,CAAC;QAED,MAAM,aAAa,GAAG,MAAM,8DAA4B,CAAC,aAAa,CAAC;YACnE,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE;YAC7B,cAAc;YACd,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,+CAA+C;YAC5D,gBAAgB,EAAE,IAAI;SACzB,CAAC,CAAC;QAEH,OAAO,aAAa,CAAC,IAAI,EAAE,CAAC;IAChC,CAAC;CACJ;AA7BD,gEA6BC"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { SlackNotificationEntity } from '../../accessUtility/entities/slack.notification.entity';
|
|
2
2
|
import { NotificationPayloadDto } from '../dtos/notification.payload.dto';
|
|
3
3
|
import { SlackIntegrationEntity } from '../entities/slack.integration.entity';
|
|
4
|
+
import { NotificationPreferenceService } from '../services/notification.preference.service';
|
|
4
5
|
import { SlackService } from '../services/slack.service';
|
|
5
6
|
export declare class SendSlackMessageNotification {
|
|
6
7
|
protected readonly notification: SlackNotificationEntity;
|
|
7
8
|
protected readonly slackService: SlackService;
|
|
9
|
+
protected readonly notificationPreferenceService: NotificationPreferenceService;
|
|
8
10
|
private payload;
|
|
9
11
|
protected base_url: string;
|
|
10
12
|
protected token: string;
|
|
11
13
|
protected slackIntegration: SlackIntegrationEntity;
|
|
12
|
-
constructor(notification: SlackNotificationEntity, slackService: SlackService);
|
|
14
|
+
constructor(notification: SlackNotificationEntity, slackService: SlackService, notificationPreferenceService: NotificationPreferenceService);
|
|
13
15
|
process(payload: NotificationPayloadDto): Promise<void>;
|
|
14
16
|
private sendMessage;
|
|
15
17
|
private getContent;
|
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SendSlackMessageNotification = void 0;
|
|
4
4
|
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
5
|
+
const integration_type_constant_1 = require("../../config/integration.type.constant");
|
|
5
6
|
const slack_message_entity_1 = require("../entities/slack.message.entity");
|
|
7
|
+
const notification_channel_type_enum_1 = require("../enums/notification.channel.type.enum");
|
|
6
8
|
const notification_type_enum_1 = require("../enums/notification.type.enum");
|
|
7
9
|
class SendSlackMessageNotification {
|
|
8
|
-
constructor(notification, slackService) {
|
|
10
|
+
constructor(notification, slackService, notificationPreferenceService) {
|
|
9
11
|
this.notification = notification;
|
|
10
12
|
this.slackService = slackService;
|
|
13
|
+
this.notificationPreferenceService = notificationPreferenceService;
|
|
11
14
|
this.base_url = 'https://slack.com/api';
|
|
12
15
|
}
|
|
13
16
|
async process(payload) {
|
|
@@ -15,8 +18,17 @@ class SendSlackMessageNotification {
|
|
|
15
18
|
this.token = await this.slackService.getBusinessToken(this.payload.business.id);
|
|
16
19
|
if (!this.token)
|
|
17
20
|
return;
|
|
18
|
-
for (const user of this.payload.user_ids)
|
|
19
|
-
await this.
|
|
21
|
+
for (const user of this.payload.user_ids) {
|
|
22
|
+
const send = await this.notificationPreferenceService.isAllowedChannels({
|
|
23
|
+
business_id: this.slackIntegration.business_id,
|
|
24
|
+
channel_id: notification_channel_type_enum_1.NotificationChannelTypeEnum.SLACK,
|
|
25
|
+
notification_id: this.notification.id,
|
|
26
|
+
integration_identifier: integration_type_constant_1.IntegrationIdentifierConstants.slack,
|
|
27
|
+
user_id: user,
|
|
28
|
+
});
|
|
29
|
+
if (send)
|
|
30
|
+
await this.sendMessage(this.notification, user);
|
|
31
|
+
}
|
|
20
32
|
}
|
|
21
33
|
async sendMessage(notification, userId) {
|
|
22
34
|
const channel = await this.slackService.getUserChannel(this.payload.business.id, userId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send.slack.message.notification.js","sourceRoot":"","sources":["../../../src/access/libraries/send.slack.message.notification.ts"],"names":[],"mappings":";;;AAAA,oFAAqF;
|
|
1
|
+
{"version":3,"file":"send.slack.message.notification.js","sourceRoot":"","sources":["../../../src/access/libraries/send.slack.message.notification.ts"],"names":[],"mappings":";;;AAAA,oFAAqF;AAErF,sFAAwF;AAIxF,2EAAsE;AAEtE,4FAAsF;AACtF,4EAAuE;AAIvE,MAAa,4BAA4B;IAQrC,YACuB,YAAqC,EACrC,YAA0B,EAC1B,6BAA4D;QAF5D,iBAAY,GAAZ,YAAY,CAAyB;QACrC,iBAAY,GAAZ,YAAY,CAAc;QAC1B,kCAA6B,GAA7B,6BAA6B,CAA+B;QARzE,aAAQ,GAAW,uBAAuB,CAAC;IASlD,CAAC;IAEJ,KAAK,CAAC,OAAO,CAAC,OAA+B;QACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,IAAI,CAAC,KAAK,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAChF,IAAI,CAAC,IAAI,CAAC,KAAK;YAAE,OAAO;QAExB,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;YACvC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,6BAA6B,CAAC,iBAAiB,CAAC;gBACpE,WAAW,EAAE,IAAI,CAAC,gBAAgB,CAAC,WAAW;gBAC9C,UAAU,EAAE,4DAA2B,CAAC,KAAK;gBAC7C,eAAe,EAAE,IAAI,CAAC,YAAY,CAAC,EAAE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|
|
17
17
|
this.payload = payload;
|
|
18
|
-
for (const user of this.payload.user_ids)
|
|
19
|
-
await this.
|
|
18
|
+
for (const user of this.payload.user_ids) {
|
|
19
|
+
const isAllowed = await this.whatsappService.isAllowedOnWhatsapp({
|
|
20
|
+
business_id: this.payload.business.id,
|
|
21
|
+
user_id: user,
|
|
22
|
+
notification_id: this.notification.id,
|
|
23
|
+
});
|
|
24
|
+
if (isAllowed)
|
|
25
|
+
await this.sendMessage(this.notification, user);
|
|
26
|
+
}
|
|
20
27
|
}
|
|
21
28
|
async sendMessage(notification, userId) {
|
|
22
29
|
const enabled = await this.whatsappService.hasWhatsappEnabled(this.payload.business.id, userId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send.whatsapp.message.notification.js","sourceRoot":"","sources":["../../../src/access/libraries/send.whatsapp.message.notification.ts"],"names":[],"mappings":";;;AAAA,oFAAsG;AAKtG,iFAA4E;AAC5E,4EAAuE;AAOvE,MAAa,+BAA+B;IAIxC,YACqB,YAAwC,EACxC,eAAgC,EAChC,eAAgC;QAFhC,iBAAY,GAAZ,YAAY,CAA4B;QACxC,oBAAe,GAAf,eAAe,CAAiB;QAChC,oBAAe,GAAf,eAAe,CAAiB;IAClD,CAAC;IAEJ,KAAK,CAAC,OAAO,CAAC,OAA+B;QACzC,IAAI,CAAC,KAAK,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,qBAAqB,EAAE,CAAC;QAChE,IAAI,CAAC,IAAI,CAAC,KAAK;YAAE,OAAO;QAExB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ;
|
|
1
|
+
{"version":3,"file":"send.whatsapp.message.notification.js","sourceRoot":"","sources":["../../../src/access/libraries/send.whatsapp.message.notification.ts"],"names":[],"mappings":";;;AAAA,oFAAsG;AAKtG,iFAA4E;AAC5E,4EAAuE;AAOvE,MAAa,+BAA+B;IAIxC,YACqB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AI,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS;YACxC,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW;YAC5C,kBAAkB,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,cAAc;YAC1D,UAAU,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU;SACvC,CAAC,CAAC;QAEH,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC;IACrB,CAAC;CACJ;AA5HD,0EA4HC"}
|
|
@@ -11,6 +11,7 @@ export * from './gpt.service';
|
|
|
11
11
|
export * from './listing.preference.service';
|
|
12
12
|
export * from './listing.service';
|
|
13
13
|
export * from './load.entity.service';
|
|
14
|
+
export * from './notification.preference.service';
|
|
14
15
|
export * from './notification.service';
|
|
15
16
|
export * from './platform.service';
|
|
16
17
|
export * from './scheduled.report.service';
|
|
@@ -27,6 +27,7 @@ __exportStar(require("./gpt.service"), exports);
|
|
|
27
27
|
__exportStar(require("./listing.preference.service"), exports);
|
|
28
28
|
__exportStar(require("./listing.service"), exports);
|
|
29
29
|
__exportStar(require("./load.entity.service"), exports);
|
|
30
|
+
__exportStar(require("./notification.preference.service"), exports);
|
|
30
31
|
__exportStar(require("./notification.service"), exports);
|
|
31
32
|
__exportStar(require("./platform.service"), exports);
|
|
32
33
|
__exportStar(require("./scheduled.report.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,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"}
|
|
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,oEAAkD;AAAA,yDAAuC;AAAA,qDAAmC;AAAA,6DAA2C;AAAA,uDAAqC;AAAA,kDAAgC;AAAA,kDAAgC;AAAA,8DAA4C;AAAA,4DAA0C;AAAA,oDAAkC;AAAA,oDAAkC;AAAA,qDAAkC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.NotificationPreferenceService = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const app_integration_entity_1 = require("../entities/app.integration.entity");
|
|
12
|
+
const business_app_integration_entity_1 = require("../entities/business.app.integration.entity");
|
|
13
|
+
const business_user_notification_preference_entity_1 = require("../entities/business.user.notification.preference.entity");
|
|
14
|
+
const bz_notification_channel_preference_entity_1 = require("../entities/bz.notification.channel.preference.entity");
|
|
15
|
+
let NotificationPreferenceService = class NotificationPreferenceService {
|
|
16
|
+
async isAllowedChannels(payload) {
|
|
17
|
+
const integration = await app_integration_entity_1.AppIntegrationEntity.findOne({ where: { integration_identifier: payload.integration_identifier } });
|
|
18
|
+
if (!integration)
|
|
19
|
+
return false;
|
|
20
|
+
const businessIntegration = await business_app_integration_entity_1.BusinessAppIntegrationEntity.findOne({
|
|
21
|
+
where: { business_id: payload.business_id, integration_id: integration?.id, active: true },
|
|
22
|
+
relations: ['integration'],
|
|
23
|
+
});
|
|
24
|
+
if (!businessIntegration)
|
|
25
|
+
return false;
|
|
26
|
+
if (businessIntegration.enabled_globally)
|
|
27
|
+
return true;
|
|
28
|
+
const notificationUserPreference = await business_user_notification_preference_entity_1.BusinessUserNotificationPreferenceEntity.findOne({
|
|
29
|
+
where: {
|
|
30
|
+
notification_id: payload.notification_id,
|
|
31
|
+
user_id: payload.user_id,
|
|
32
|
+
business_id: payload.business_id,
|
|
33
|
+
channel_id: payload.channel_id,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
if (!notificationUserPreference?.active)
|
|
37
|
+
return false;
|
|
38
|
+
const notificationChannelPreference = await bz_notification_channel_preference_entity_1.BzNotificationChannelPreferenceEntity.findOne({
|
|
39
|
+
where: { business_id: payload.business_id, user_id: payload.user_id, channel_id: payload.channel_id },
|
|
40
|
+
});
|
|
41
|
+
if (!notificationChannelPreference?.active)
|
|
42
|
+
return false;
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
exports.NotificationPreferenceService = NotificationPreferenceService;
|
|
47
|
+
exports.NotificationPreferenceService = NotificationPreferenceService = __decorate([
|
|
48
|
+
(0, common_1.Injectable)()
|
|
49
|
+
], NotificationPreferenceService);
|
|
50
|
+
//# sourceMappingURL=notification.preference.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification.preference.service.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EAAE,OAAO,CAAC,UAAU,EAAE;SACxG,CAAC,CAAC;QACH,IAAI,CAAC,6BAA6B,EAAE,MAAM;YAAE,OAAO,KAAK,CAAC;QAEzD,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ,CAAA;AAnCY,sEAA6B;wCAA7B,6BAA6B;IADzC,IAAA,mBAAU,GAAE;GACA,6BAA6B,CAmCzC"}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { CacheService, PropertyService, RemoteRequestService, SmsService } from '@servicelabsco/nestjs-utility-services';
|
|
2
|
+
import { EmailNotificationEntity } from '../../accessUtility/entities/email.notification.entity';
|
|
3
|
+
import { FcmNotificationEntity } from '../../accessUtility/entities/fcm.notification.entity';
|
|
2
4
|
import { GchatNotificationEntity } from '../../accessUtility/entities/gchat.notification.entity';
|
|
3
5
|
import { SlackNotificationEntity } from '../../accessUtility/entities/slack.notification.entity';
|
|
6
|
+
import { SmsNotificationEntity } from '../../accessUtility/entities/sms.notification.entity';
|
|
4
7
|
import { WhatsappNotificationEntity } from '../../accessUtility/entities/whatsapp.notification.entity';
|
|
5
8
|
import { NotificationPayloadDto } from '../dtos/notification.payload.dto';
|
|
6
9
|
import { GchatWebhookEntity } from '../entities/gchat.webhook.entity';
|
|
7
10
|
import { GchatService } from './gchat.service';
|
|
11
|
+
import { NotificationPreferenceService } from './notification.preference.service';
|
|
8
12
|
import { SendEmailService } from './send.email.service';
|
|
9
13
|
import { SlackService } from './slack.service';
|
|
10
14
|
import { WhatsappService } from './whatsapp.service';
|
|
11
|
-
import { EmailNotificationEntity } from '../../accessUtility/entities/email.notification.entity';
|
|
12
|
-
import { SmsNotificationEntity } from '../../accessUtility/entities/sms.notification.entity';
|
|
13
|
-
import { FcmNotificationEntity } from '../../accessUtility/entities/fcm.notification.entity';
|
|
14
15
|
export declare class NotificationService {
|
|
15
16
|
protected readonly remoteRequestService: RemoteRequestService;
|
|
16
17
|
protected readonly cacheService: CacheService;
|
|
@@ -20,7 +21,8 @@ export declare class NotificationService {
|
|
|
20
21
|
protected readonly gchatService: GchatService;
|
|
21
22
|
protected readonly sendEmailService: SendEmailService;
|
|
22
23
|
protected readonly smsService: SmsService;
|
|
23
|
-
|
|
24
|
+
protected readonly notificationPreferenceService: NotificationPreferenceService;
|
|
25
|
+
constructor(remoteRequestService: RemoteRequestService, cacheService: CacheService, slackService: SlackService, propertyService: PropertyService, whatsappService: WhatsappService, gchatService: GchatService, sendEmailService: SendEmailService, smsService: SmsService, notificationPreferenceService: NotificationPreferenceService);
|
|
24
26
|
sendSlackMessage(notification: SlackNotificationEntity, payload: NotificationPayloadDto): Promise<void>;
|
|
25
27
|
sendSlackWebhook(notification: SlackNotificationEntity, payload: NotificationPayloadDto): Promise<void>;
|
|
26
28
|
sendWhatsappMessage(notification: WhatsappNotificationEntity, payload: NotificationPayloadDto): Promise<void>;
|
|
@@ -15,18 +15,19 @@ const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-service
|
|
|
15
15
|
const typeorm_1 = require("typeorm");
|
|
16
16
|
const slack_webhook_entity_1 = require("../entities/slack.webhook.entity");
|
|
17
17
|
const send_email_notification_1 = require("../libraries/send.email.notification");
|
|
18
|
+
const send_fcm_notification_1 = require("../libraries/send.fcm.notification");
|
|
18
19
|
const send_gchat_message_notification_1 = require("../libraries/send.gchat.message.notification");
|
|
19
20
|
const send_gchat_webhook_notification_1 = require("../libraries/send.gchat.webhook.notification");
|
|
20
21
|
const send_slack_message_notification_1 = require("../libraries/send.slack.message.notification");
|
|
21
22
|
const send_slack_webhook_notification_1 = require("../libraries/send.slack.webhook.notification.");
|
|
22
23
|
const send_whatsapp_message_notification_1 = require("../libraries/send.whatsapp.message.notification");
|
|
23
24
|
const gchat_service_1 = require("./gchat.service");
|
|
25
|
+
const notification_preference_service_1 = require("./notification.preference.service");
|
|
24
26
|
const send_email_service_1 = require("./send.email.service");
|
|
25
27
|
const slack_service_1 = require("./slack.service");
|
|
26
28
|
const whatsapp_service_1 = require("./whatsapp.service");
|
|
27
|
-
const send_fcm_notification_1 = require("../libraries/send.fcm.notification");
|
|
28
29
|
let NotificationService = class NotificationService {
|
|
29
|
-
constructor(remoteRequestService, cacheService, slackService, propertyService, whatsappService, gchatService, sendEmailService, smsService) {
|
|
30
|
+
constructor(remoteRequestService, cacheService, slackService, propertyService, whatsappService, gchatService, sendEmailService, smsService, notificationPreferenceService) {
|
|
30
31
|
this.remoteRequestService = remoteRequestService;
|
|
31
32
|
this.cacheService = cacheService;
|
|
32
33
|
this.slackService = slackService;
|
|
@@ -35,9 +36,10 @@ let NotificationService = class NotificationService {
|
|
|
35
36
|
this.gchatService = gchatService;
|
|
36
37
|
this.sendEmailService = sendEmailService;
|
|
37
38
|
this.smsService = smsService;
|
|
39
|
+
this.notificationPreferenceService = notificationPreferenceService;
|
|
38
40
|
}
|
|
39
41
|
async sendSlackMessage(notification, payload) {
|
|
40
|
-
return new send_slack_message_notification_1.SendSlackMessageNotification(notification, this.slackService).process(payload);
|
|
42
|
+
return new send_slack_message_notification_1.SendSlackMessageNotification(notification, this.slackService, this.notificationPreferenceService).process(payload);
|
|
41
43
|
}
|
|
42
44
|
async sendSlackWebhook(notification, payload) {
|
|
43
45
|
const records = await slack_webhook_entity_1.SlackWebhookEntity.find({
|
|
@@ -91,6 +93,7 @@ exports.NotificationService = NotificationService = __decorate([
|
|
|
91
93
|
whatsapp_service_1.WhatsappService,
|
|
92
94
|
gchat_service_1.GchatService,
|
|
93
95
|
send_email_service_1.SendEmailService,
|
|
94
|
-
nestjs_utility_services_1.SmsService
|
|
96
|
+
nestjs_utility_services_1.SmsService,
|
|
97
|
+
notification_preference_service_1.NotificationPreferenceService])
|
|
95
98
|
], NotificationService);
|
|
96
99
|
//# sourceMappingURL=notification.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.service.js","sourceRoot":"","sources":["../../../src/access/services/notification.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oFAQgD;AAChD,qCAA0C;
|
|
1
|
+
{"version":3,"file":"notification.service.js","sourceRoot":"","sources":["../../../src/access/services/notification.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oFAQgD;AAChD,qCAA0C;AAS1C,2EAAsE;AACtE,kFAA6E;AAC7E,8EAAyE;AACzE,kGAA4F;AAC5F,kGAA4F;AAC5F,kGAA4F;AAC5F,mGAA6F;AAC7F,wGAAkG;AAClG,mDAA+C;AAC/C,uFAAkF;AAClF,6DAAwD;AACxD,mDAA+C;AAC/C,yDAAqD;AAG9C,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC5B,YACuB,oBAA0C,EAC1C,YAA0B,EAC1B,YAA0B,EAC1B,eAAgC,EAChC,eAAgC,EAChC,YAA0B,EAC1B,gBAAkC,EAClC,UAAsB,EACtB,6BAA4D;QAR5D,yBAAoB,GAApB,oBAAoB,CAAsB;QAC1C,iBAAY,GAAZ,YAAY,CAAc;QAC1B,iBAAY,GAAZ,YAAY,CAAc;QAC1B,oBAAe,GAAf,eAAe,CAAiB;QAChC,oBAAe,GAAf,eAAe,CAAiB;QAChC,iBAAY,GAAZ,YAAY,CAAc;QAC1B,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,eAAU,GAAV,UAAU,CAAY;QACtB,kCAA6B,GAA7B,6BAA6B,CAA+B;IAChF,CAAC;IAEJ,KAAK,CAAC,gBAAgB,CAAC,YAAqC,EAAE,OAA+B;QACzF,OAAO,IAAI,8DAA4B,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,6BAA6B,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAClI,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,YAAqC,EAAE,OAA+B;QACzF,MAAM,OAAO,GAAG,MAAM,yCAAkB,CAAC,IAAI,CAAC;YAC1C,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE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icelabsco/nestjs-utility-services';
|
|
2
2
|
import { WhatsappPostingPayloadDto } from '../dtos/whatsapp.posting.payload.dto';
|
|
3
|
+
import { NotificationPreferenceService } from './notification.preference.service';
|
|
3
4
|
export declare class WhatsappService {
|
|
4
5
|
private readonly remoteRequestService;
|
|
5
6
|
protected readonly cacheService: CacheService;
|
|
6
7
|
private readonly propertyService;
|
|
7
|
-
|
|
8
|
+
private readonly notificationPreferenceService;
|
|
9
|
+
constructor(remoteRequestService: RemoteRequestService, cacheService: CacheService, propertyService: PropertyService, notificationPreferenceService: NotificationPreferenceService);
|
|
8
10
|
getAuthorizationToken(): Promise<string>;
|
|
9
11
|
hasWhatsappEnabled(business_id: number, user_id: number): Promise<boolean>;
|
|
10
12
|
sendMessage(options: WhatsappPostingPayloadDto): Promise<import("@servicelabsco/nestjs-utility-services").RemoteRawResponseDto>;
|
|
13
|
+
isAllowedOnWhatsapp(payload: {
|
|
14
|
+
business_id: number;
|
|
15
|
+
user_id: number;
|
|
16
|
+
notification_id: number;
|
|
17
|
+
}): Promise<boolean>;
|
|
11
18
|
}
|
|
@@ -12,12 +12,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.WhatsappService = void 0;
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
|
14
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_entity_1 = require("../entities/business.app.integration.entity");
|
|
18
|
+
const business_user_notification_preference_entity_1 = require("../entities/business.user.notification.preference.entity");
|
|
19
|
+
const bz_notification_channel_preference_entity_1 = require("../entities/bz.notification.channel.preference.entity");
|
|
15
20
|
const whatsapp_preference_entity_1 = require("../entities/whatsapp.preference.entity");
|
|
21
|
+
const notification_channel_type_enum_1 = require("../enums/notification.channel.type.enum");
|
|
22
|
+
const notification_preference_service_1 = require("./notification.preference.service");
|
|
16
23
|
let WhatsappService = class WhatsappService {
|
|
17
|
-
constructor(remoteRequestService, cacheService, propertyService) {
|
|
24
|
+
constructor(remoteRequestService, cacheService, propertyService, notificationPreferenceService) {
|
|
18
25
|
this.remoteRequestService = remoteRequestService;
|
|
19
26
|
this.cacheService = cacheService;
|
|
20
27
|
this.propertyService = propertyService;
|
|
28
|
+
this.notificationPreferenceService = notificationPreferenceService;
|
|
21
29
|
}
|
|
22
30
|
async getAuthorizationToken() {
|
|
23
31
|
const key = `whatsapp.business.token`;
|
|
@@ -48,12 +56,42 @@ let WhatsappService = class WhatsappService {
|
|
|
48
56
|
};
|
|
49
57
|
return this.remoteRequestService.getRawResponse(opts);
|
|
50
58
|
}
|
|
59
|
+
async isAllowedOnWhatsapp(payload) {
|
|
60
|
+
const integration = await app_integration_entity_1.AppIntegrationEntity.findOne({ where: { integration_identifier: integration_type_constant_1.IntegrationIdentifierConstants.whatsapp } });
|
|
61
|
+
if (!integration)
|
|
62
|
+
return false;
|
|
63
|
+
const businessIntegration = await business_app_integration_entity_1.BusinessAppIntegrationEntity.findOne({
|
|
64
|
+
where: { business_id: payload.business_id, integration_id: integration?.id, active: true },
|
|
65
|
+
relations: ['integration'],
|
|
66
|
+
});
|
|
67
|
+
if (!businessIntegration)
|
|
68
|
+
return false;
|
|
69
|
+
if (businessIntegration.enabled_globally)
|
|
70
|
+
return true;
|
|
71
|
+
const notificationUserPreference = await business_user_notification_preference_entity_1.BusinessUserNotificationPreferenceEntity.findOne({
|
|
72
|
+
where: {
|
|
73
|
+
notification_id: payload.notification_id,
|
|
74
|
+
user_id: payload.user_id,
|
|
75
|
+
business_id: payload.business_id,
|
|
76
|
+
channel_id: notification_channel_type_enum_1.NotificationChannelTypeEnum.WHATSAPP,
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
if (!notificationUserPreference?.active)
|
|
80
|
+
return false;
|
|
81
|
+
const notificationChannelPreference = await bz_notification_channel_preference_entity_1.BzNotificationChannelPreferenceEntity.findOne({
|
|
82
|
+
where: { business_id: payload.business_id, user_id: payload.user_id, channel_id: notification_channel_type_enum_1.NotificationChannelTypeEnum.WHATSAPP },
|
|
83
|
+
});
|
|
84
|
+
if (!notificationChannelPreference?.active)
|
|
85
|
+
return false;
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
51
88
|
};
|
|
52
89
|
exports.WhatsappService = WhatsappService;
|
|
53
90
|
exports.WhatsappService = WhatsappService = __decorate([
|
|
54
91
|
(0, common_1.Injectable)(),
|
|
55
92
|
__metadata("design:paramtypes", [nestjs_utility_services_1.RemoteRequestService,
|
|
56
93
|
nestjs_utility_services_1.CacheService,
|
|
57
|
-
nestjs_utility_services_1.PropertyService
|
|
94
|
+
nestjs_utility_services_1.PropertyService,
|
|
95
|
+
notification_preference_service_1.NotificationPreferenceService])
|
|
58
96
|
], WhatsappService);
|
|
59
97
|
//# sourceMappingURL=whatsapp.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"whatsapp.service.js","sourceRoot":"","sources":["../../../src/access/services/whatsapp.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,
|
|
1
|
+
{"version":3,"file":"whatsapp.service.js","sourceRoot":"","sources":["../../../src/access/services/whatsapp.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oFAAiI;AACjI,sFAAwF;AAExF,+EAA0E;AAC1E,iGAA2F;AAC3F,2HAAoH;AACpH,qHAA8G;AAC9G,uFAAkF;AAClF,4FAAsF;AACtF,uFAAkF;AAG3E,IAAM,eAAe,GAArB,MAAM,eAAe;IACxB,YACqB,oBAA0C,EACxC,YAA0B,EAC5B,eAAgC,EAChC,6BAA4D;QAH5D,yBAAoB,GAApB,oBAAoB,CAAsB;QACxC,iBAAY,GAAZ,YAAY,CAAc;QAC5B,oBAAe,GAAf,eAAe,CAAiB;QAChC,kCAA6B,GAA7B,6BAA6B,CAA+B;IA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k.upload.sheet.dto';
|
|
2
2
|
import { DocumentFileUploadDto } from './dtos/document.file.upload.dto';
|
|
3
|
+
import { EmailNotificationAttributesDto } from './dtos/email.notification.attributes.dto';
|
|
3
4
|
import { ErrorHandlingDto } from './dtos/error.handling.dto';
|
|
4
|
-
import { GchatNotificationAttributesDto } from './dtos/gchat.notification.attributes.dto';
|
|
5
5
|
import { PdfDocumentDataDto } from './dtos/pdf.document.data.dto';
|
|
6
6
|
import { BulkDefinitionEntity } from './entities/bulk.definition.entity';
|
|
7
7
|
import { BulkDefinitionProcessingEntity } from './entities/bulk.definition.processing.entity';
|
|
@@ -85,8 +85,8 @@ import { UploadModificationSubscriber } from './subscribers/upload.modification.
|
|
|
85
85
|
import { WebhookRequestSubscriber } from './subscribers/webhook.request.subscriber';
|
|
86
86
|
import { WhatsappNotificationSubscriber } from './subscribers/whatsapp.notification.subscriber';
|
|
87
87
|
declare const es6Classes: {
|
|
88
|
-
dtos: (typeof
|
|
89
|
-
entities: (typeof
|
|
88
|
+
dtos: (typeof EmailNotificationAttributesDto | typeof BulkUploadSheetDto | typeof DocumentFileUploadDto | typeof ErrorHandlingDto | typeof PdfDocumentDataDto)[];
|
|
89
|
+
entities: (typeof FcmTemplateEntity | typeof FcmNotificationEntity | typeof InappNotificationEntity | typeof SmsNotificationEntity | typeof WhatsappNotificationEntity | typeof EmailNotificationEntity | typeof BulkUploadColumnEntity | typeof BulkUploadTypeEntity | typeof BulkDefinitionEntity | typeof BulkDefinitionProcessingEntity | typeof BulkUploadItemEntity | typeof BulkUploadEntity | typeof UploadModificationEntity | typeof ListingModelEntity | typeof TagAssignmentEntity | typeof DataMappingEntity | typeof ItemUnitEntity | typeof NotificationRecipientEntity | typeof PdfTemplatesEntity | typeof PdfDocumentsEntity | typeof WebhookRequestEntity)[];
|
|
90
90
|
jobs: (typeof PushToBulkItemJob | typeof AnalyseBulkUploadJob | typeof BulkDefinitionJob | typeof BulkDefinitionLoadJob | typeof BulkDefinitionProcessingJob | typeof BulkUploadColumnJob | typeof BulkUploadStatsJob | typeof BulkUploadItemJob | typeof BulkUploadJob | typeof BulkUploadTypeJob | typeof DataMappingJob | typeof EmailNotificationJob | typeof GchatNotificationJob | typeof InappNotificationJob | typeof ItemUnitJob | typeof ListingModelJob | typeof NotificationJob | typeof NotificationRecipientJob | typeof PdfDocumentJob | typeof SlackNotificationJob | typeof SmsNotificationJob | typeof TagAssignmentJob | typeof UploadModificationJob | typeof WebhookRequestJob | typeof WhatsappNotificationJob)[];
|
|
91
91
|
libraries: (typeof ReadXlsFile | typeof AnalyseBulkUpload | typeof GenerateBulkUploadSheet | typeof LoadXlsFile | typeof ProcessCommonData | typeof ProcessPdfDocument | typeof SetBulkUploadLogFile | typeof SlabsUtil)[];
|
|
92
92
|
services: (typeof BulkUploadService | typeof FileUploadService | typeof LambdaService | typeof Es6JobsService | typeof PdfDocumentService)[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AddVisibleColumnUtlNotificationDetailsTable1725439900529 = void 0;
|
|
4
|
+
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
5
|
+
class AddVisibleColumnUtlNotificationDetailsTable1725439900529 extends nestjs_utility_services_1.MigrationUtility {
|
|
6
|
+
constructor() {
|
|
7
|
+
super('utl_notification_details');
|
|
8
|
+
this.process();
|
|
9
|
+
}
|
|
10
|
+
process() {
|
|
11
|
+
this.boolean('visible', false);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.AddVisibleColumnUtlNotificationDetailsTable1725439900529 = AddVisibleColumnUtlNotificationDetailsTable1725439900529;
|
|
15
|
+
//# sourceMappingURL=1725439900529-AddVisibleColumnUtlNotificationDetailsTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1725439900529-AddVisibleColumnUtlNotificationDetailsTable.js","sourceRoot":"","sources":["../../src/migrations/1725439900529-AddVisibleColumnUtlNotificationDetailsTable.ts"],"names":[],"mappings":";;;AAAA,oFAA0E;AAE1E,MAAa,wDAAyD,SAAQ,0CAAgB;IAC1F;QACI,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAClC,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAED,OAAO;QACH,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IACnC,CAAC;CACJ;AATD,4HASC"}
|
package/package.json
CHANGED