rez_core 2.2.258 → 2.2.259
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/app.module.js +2 -2
- package/dist/app.module.js.map +1 -1
- package/dist/module/integration/controller/calender-event.controller.js.map +1 -0
- package/dist/module/integration/controller/integration.controller.d.ts +113 -0
- package/dist/module/{communication/controller/communication.controller.js → integration/controller/integration.controller.js} +197 -75
- package/dist/module/integration/controller/integration.controller.js.map +1 -0
- package/dist/module/{communication → integration}/controller/wrapper.controller.d.ts +1 -1
- package/dist/module/integration/controller/wrapper.controller.js.map +1 -0
- package/dist/module/{communication → integration}/dto/create-config.dto.d.ts +48 -4
- package/dist/module/{communication → integration}/dto/create-config.dto.js +96 -18
- package/dist/module/integration/dto/create-config.dto.js.map +1 -0
- package/dist/module/{communication/entity/communication-config.entity.d.ts → integration/entity/integration-config.entity.d.ts} +11 -1
- package/dist/module/integration/entity/integration-config.entity.js +78 -0
- package/dist/module/integration/entity/integration-config.entity.js.map +1 -0
- package/dist/module/{communication → integration}/entity/integration-source.entity.d.ts +1 -1
- package/dist/module/{communication → integration}/entity/integration-source.entity.js +8 -8
- package/dist/module/integration/entity/integration-source.entity.js.map +1 -0
- package/dist/module/integration/entity/user-integration.entity.d.ts +23 -0
- package/dist/module/integration/entity/user-integration.entity.js +70 -0
- package/dist/module/integration/entity/user-integration.entity.js.map +1 -0
- package/dist/module/integration/examples/usage.example.d.ts +16 -0
- package/dist/module/integration/examples/usage.example.js +217 -0
- package/dist/module/integration/examples/usage.example.js.map +1 -0
- package/dist/module/{communication → integration}/factories/base.factory.d.ts +2 -2
- package/dist/module/integration/factories/base.factory.js.map +1 -0
- package/dist/module/{communication → integration}/factories/email.factory.d.ts +3 -7
- package/dist/module/{communication → integration}/factories/email.factory.js +1 -13
- package/dist/module/integration/factories/email.factory.js.map +1 -0
- package/dist/module/{communication/factories/communication.factory.d.ts → integration/factories/integration.factory.d.ts} +4 -4
- package/dist/module/{communication/factories/communication.factory.js → integration/factories/integration.factory.js} +26 -26
- package/dist/module/integration/factories/integration.factory.js.map +1 -0
- package/dist/module/integration/factories/sms.factory.d.ts +9 -0
- package/dist/module/integration/factories/sms.factory.js +26 -0
- package/dist/module/integration/factories/sms.factory.js.map +1 -0
- package/dist/module/{communication → integration}/factories/telephone.factory.d.ts +3 -5
- package/dist/module/{communication → integration}/factories/telephone.factory.js +11 -17
- package/dist/module/integration/factories/telephone.factory.js.map +1 -0
- package/dist/module/{communication → integration}/factories/whatsapp.factory.d.ts +2 -2
- package/dist/module/integration/factories/whatsapp.factory.js.map +1 -0
- package/dist/module/integration/integration.module.d.ts +2 -0
- package/dist/module/{communication/communication.module.js → integration/integration.module.js} +22 -42
- package/dist/module/integration/integration.module.js.map +1 -0
- package/dist/module/integration/service/calendar-event.service.js.map +1 -0
- package/dist/module/{communication/service/communication-queue.service.d.ts → integration/service/integration-queue.service.d.ts} +1 -1
- package/dist/module/{communication/service/communication-queue.service.js → integration/service/integration-queue.service.js} +8 -8
- package/dist/module/integration/service/integration-queue.service.js.map +1 -0
- package/dist/module/integration/service/integration.service.d.ts +155 -0
- package/dist/module/{communication/service/communication.service.js → integration/service/integration.service.js} +391 -307
- package/dist/module/integration/service/integration.service.js.map +1 -0
- package/dist/module/{communication → integration}/service/oauth.service.js +1 -1
- package/dist/module/integration/service/oauth.service.js.map +1 -0
- package/dist/module/{communication → integration}/service/wrapper.service.d.ts +4 -4
- package/dist/module/{communication → integration}/service/wrapper.service.js +25 -26
- package/dist/module/integration/service/wrapper.service.js.map +1 -0
- package/dist/module/{communication → integration}/strategies/email/gmail-api.strategy.d.ts +3 -3
- package/dist/module/{communication → integration}/strategies/email/gmail-api.strategy.js +2 -6
- package/dist/module/integration/strategies/email/gmail-api.strategy.js.map +1 -0
- package/dist/module/integration/strategies/email/outlook-api.strategy.d.ts +5 -0
- package/dist/module/integration/strategies/email/outlook-api.strategy.js.map +1 -0
- package/dist/module/integration/strategies/email/outlook.strategy.d.ts +5 -0
- package/dist/module/integration/strategies/email/outlook.strategy.js.map +1 -0
- package/dist/module/{communication → integration}/strategies/email/sendgrid-api.strategy.d.ts +3 -3
- package/dist/module/integration/strategies/email/sendgrid-api.strategy.js.map +1 -0
- package/dist/module/{communication/strategies/communication.strategy.d.ts → integration/strategies/integration.strategy.d.ts} +4 -3
- package/dist/module/{communication/strategies/communication.strategy.js → integration/strategies/integration.strategy.js} +1 -1
- package/dist/module/integration/strategies/integration.strategy.js.map +1 -0
- package/dist/module/integration/strategies/telephone/ozonetel-voice.strategy.d.ts +17 -0
- package/dist/module/{communication → integration}/strategies/telephone/ozonetel-voice.strategy.js +13 -5
- package/dist/module/integration/strategies/telephone/ozonetel-voice.strategy.js.map +1 -0
- package/dist/module/{communication → integration}/strategies/telephone/tubelight-voice.strategy.d.ts +6 -4
- package/dist/module/{communication → integration}/strategies/telephone/tubelight-voice.strategy.js +3 -7
- package/dist/module/integration/strategies/telephone/tubelight-voice.strategy.js.map +1 -0
- package/dist/module/{communication → integration}/strategies/whatsapp/whatsapp-cloud.strategy.d.ts +3 -3
- package/dist/module/integration/strategies/whatsapp/whatsapp-cloud.strategy.js.map +1 -0
- package/dist/module/integration/strategies/whatsapp/whatsapp.strategy.d.ts +5 -0
- package/dist/module/integration/strategies/whatsapp/whatsapp.strategy.js.map +1 -0
- package/dist/module/meta/entity/entity-master.entity.d.ts +1 -1
- package/dist/module/meta/entity/entity-master.entity.js +2 -2
- package/dist/module/meta/entity/entity-master.entity.js.map +1 -1
- package/dist/module/meta/service/entity-dynamic.service.js +47 -27
- package/dist/module/meta/service/entity-dynamic.service.js.map +1 -1
- package/dist/module/user/controller/login.controller.d.ts +3 -3
- package/dist/module/user/controller/login.controller.js +5 -5
- package/dist/module/user/controller/login.controller.js.map +1 -1
- package/dist/module/user/user.module.js +2 -2
- package/dist/module/user/user.module.js.map +1 -1
- package/dist/module/workflow-automation/entity/workflow-automation-action.entity.d.ts +1 -0
- package/dist/module/workflow-automation/entity/workflow-automation-action.entity.js +4 -0
- package/dist/module/workflow-automation/entity/workflow-automation-action.entity.js.map +1 -1
- package/dist/module/workflow-automation/service/workflow-automation.service.d.ts +2 -1
- package/dist/module/workflow-automation/service/workflow-automation.service.js +8 -4
- package/dist/module/workflow-automation/service/workflow-automation.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/docs/modules/event-driven-integration-design.md +92 -0
- package/docs/modules/integration.md +197 -0
- package/package.json +1 -1
- package/src/app.module.ts +2 -2
- package/src/module/integration/controller/integration.controller.ts +411 -0
- package/src/module/{communication → integration}/dto/create-config.dto.ts +110 -18
- package/src/module/{communication/entity/communication-config.entity.ts → integration/entity/integration-config.entity.ts} +33 -6
- package/src/module/{communication → integration}/entity/integration-source.entity.ts +1 -1
- package/src/module/integration/entity/user-integration.entity.ts +71 -0
- package/src/module/integration/examples/usage.example.ts +338 -0
- package/src/module/{communication → integration}/factories/base.factory.ts +2 -2
- package/src/module/{communication → integration}/factories/email.factory.ts +2 -12
- package/src/module/{communication/factories/communication.factory.ts → integration/factories/integration.factory.ts} +18 -18
- package/src/module/integration/factories/sms.factory.ts +19 -0
- package/src/module/integration/factories/telephone.factory.ts +41 -0
- package/src/module/{communication → integration}/factories/whatsapp.factory.ts +2 -2
- package/src/module/integration/integration.module.ts +86 -0
- package/src/module/{communication/service/communication-queue.service.ts → integration/service/integration-queue.service.ts} +2 -2
- package/src/module/{communication/service/communication.service.ts → integration/service/integration.service.ts} +598 -448
- package/src/module/{communication → integration}/service/oauth.service.ts +1 -1
- package/src/module/{communication → integration}/service/wrapper.service.ts +24 -25
- package/src/module/{communication → integration}/strategies/email/gmail-api.strategy.ts +6 -18
- package/src/module/{communication → integration}/strategies/email/outlook-api.strategy.ts +5 -5
- package/src/module/{communication → integration}/strategies/email/outlook.strategy.ts +5 -5
- package/src/module/{communication → integration}/strategies/email/sendgrid-api.strategy.ts +5 -5
- package/src/module/{communication/strategies/communication.strategy.ts → integration/strategies/integration.strategy.ts} +7 -3
- package/src/module/{communication → integration}/strategies/telephone/ozonetel-voice.strategy.ts +40 -12
- package/src/module/{communication → integration}/strategies/telephone/tubelight-voice.strategy.ts +24 -17
- package/src/module/{communication → integration}/strategies/whatsapp/whatsapp-cloud.strategy.ts +5 -5
- package/src/module/{communication → integration}/strategies/whatsapp/whatsapp.strategy.ts +5 -5
- package/src/module/meta/entity/entity-master.entity.ts +2 -2
- package/src/module/meta/service/entity-dynamic.service.ts +55 -28
- package/src/module/user/controller/login.controller.ts +3 -3
- package/src/module/user/user.module.ts +2 -2
- package/src/module/workflow-automation/entity/workflow-automation-action.entity.ts +3 -0
- package/src/module/workflow-automation/service/workflow-automation.service.ts +8 -4
- package/src/resources/dev.properties.yaml +3 -3
- package/.vscode/extensions.json +0 -5
- package/dist/module/communication/communication.module.d.ts +0 -2
- package/dist/module/communication/communication.module.js.map +0 -1
- package/dist/module/communication/controller/calender-event.controller.js.map +0 -1
- package/dist/module/communication/controller/communication.controller.d.ts +0 -99
- package/dist/module/communication/controller/communication.controller.js.map +0 -1
- package/dist/module/communication/controller/wrapper.controller.js.map +0 -1
- package/dist/module/communication/dto/create-config.dto.js.map +0 -1
- package/dist/module/communication/entity/communication-config.entity.js +0 -45
- package/dist/module/communication/entity/communication-config.entity.js.map +0 -1
- package/dist/module/communication/entity/communication-hub.entity.d.ts +0 -20
- package/dist/module/communication/entity/communication-hub.entity.js +0 -115
- package/dist/module/communication/entity/communication-hub.entity.js.map +0 -1
- package/dist/module/communication/entity/integration-source.entity.js.map +0 -1
- package/dist/module/communication/examples/usage.example.d.ts +0 -11
- package/dist/module/communication/examples/usage.example.js +0 -89
- package/dist/module/communication/examples/usage.example.js.map +0 -1
- package/dist/module/communication/factories/base.factory.js.map +0 -1
- package/dist/module/communication/factories/communication.factory.js.map +0 -1
- package/dist/module/communication/factories/email.factory.js.map +0 -1
- package/dist/module/communication/factories/sms.factory.d.ts +0 -15
- package/dist/module/communication/factories/sms.factory.js +0 -49
- package/dist/module/communication/factories/sms.factory.js.map +0 -1
- package/dist/module/communication/factories/telephone.factory.js.map +0 -1
- package/dist/module/communication/factories/whatsapp.factory.js.map +0 -1
- package/dist/module/communication/service/calendar-event.service.js.map +0 -1
- package/dist/module/communication/service/communication-queue.service.js.map +0 -1
- package/dist/module/communication/service/communication.service.d.ts +0 -155
- package/dist/module/communication/service/communication.service.js.map +0 -1
- package/dist/module/communication/service/oauth.service.js.map +0 -1
- package/dist/module/communication/service/wrapper.service.js.map +0 -1
- package/dist/module/communication/strategies/communication.strategy.js.map +0 -1
- package/dist/module/communication/strategies/email/gmail-api.strategy.js.map +0 -1
- package/dist/module/communication/strategies/email/gmail-smtp-v2.strategy.d.ts +0 -5
- package/dist/module/communication/strategies/email/gmail-smtp-v2.strategy.js +0 -60
- package/dist/module/communication/strategies/email/gmail-smtp-v2.strategy.js.map +0 -1
- package/dist/module/communication/strategies/email/gmail-smtp.strategy.d.ts +0 -5
- package/dist/module/communication/strategies/email/gmail-smtp.strategy.js +0 -49
- package/dist/module/communication/strategies/email/gmail-smtp.strategy.js.map +0 -1
- package/dist/module/communication/strategies/email/outlook-api.strategy.d.ts +0 -5
- package/dist/module/communication/strategies/email/outlook-api.strategy.js.map +0 -1
- package/dist/module/communication/strategies/email/outlook-smtp.strategy.d.ts +0 -5
- package/dist/module/communication/strategies/email/outlook-smtp.strategy.js +0 -65
- package/dist/module/communication/strategies/email/outlook-smtp.strategy.js.map +0 -1
- package/dist/module/communication/strategies/email/outlook.strategy.d.ts +0 -5
- package/dist/module/communication/strategies/email/outlook.strategy.js.map +0 -1
- package/dist/module/communication/strategies/email/sendgrid-api.strategy.js.map +0 -1
- package/dist/module/communication/strategies/sms/knowlarity-multi.strategy.d.ts +0 -6
- package/dist/module/communication/strategies/sms/knowlarity-multi.strategy.js +0 -121
- package/dist/module/communication/strategies/sms/knowlarity-multi.strategy.js.map +0 -1
- package/dist/module/communication/strategies/sms/knowlarity.strategy.d.ts +0 -5
- package/dist/module/communication/strategies/sms/knowlarity.strategy.js +0 -44
- package/dist/module/communication/strategies/sms/knowlarity.strategy.js.map +0 -1
- package/dist/module/communication/strategies/sms/twilio-v2.strategy.d.ts +0 -5
- package/dist/module/communication/strategies/sms/twilio-v2.strategy.js +0 -48
- package/dist/module/communication/strategies/sms/twilio-v2.strategy.js.map +0 -1
- package/dist/module/communication/strategies/sms/twilio.strategy.d.ts +0 -5
- package/dist/module/communication/strategies/sms/twilio.strategy.js +0 -44
- package/dist/module/communication/strategies/sms/twilio.strategy.js.map +0 -1
- package/dist/module/communication/strategies/telephone/knowlarity-multi.strategy.d.ts +0 -6
- package/dist/module/communication/strategies/telephone/knowlarity-multi.strategy.js +0 -121
- package/dist/module/communication/strategies/telephone/knowlarity-multi.strategy.js.map +0 -1
- package/dist/module/communication/strategies/telephone/knowlarity-voice.strategy.d.ts +0 -5
- package/dist/module/communication/strategies/telephone/knowlarity-voice.strategy.js +0 -44
- package/dist/module/communication/strategies/telephone/knowlarity-voice.strategy.js.map +0 -1
- package/dist/module/communication/strategies/telephone/ozonetel-voice.strategy.d.ts +0 -15
- package/dist/module/communication/strategies/telephone/ozonetel-voice.strategy.js.map +0 -1
- package/dist/module/communication/strategies/telephone/tubelight-voice.strategy.js.map +0 -1
- package/dist/module/communication/strategies/whatsapp/whatsapp-cloud.strategy.js.map +0 -1
- package/dist/module/communication/strategies/whatsapp/whatsapp.strategy.d.ts +0 -5
- package/dist/module/communication/strategies/whatsapp/whatsapp.strategy.js.map +0 -1
- package/docs/modules/communication.md +0 -177
- package/src/module/communication/communication.module.ts +0 -106
- package/src/module/communication/controller/communication.controller.ts +0 -293
- package/src/module/communication/entity/communication-hub.entity.ts +0 -103
- package/src/module/communication/examples/usage.example.ts +0 -170
- package/src/module/communication/factories/sms.factory.ts +0 -44
- package/src/module/communication/factories/telephone.factory.ts +0 -49
- package/src/module/communication/strategies/email/gmail-smtp-v2.strategy.ts +0 -68
- package/src/module/communication/strategies/email/gmail-smtp.strategy.ts +0 -51
- package/src/module/communication/strategies/email/outlook-smtp.strategy.ts +0 -73
- package/src/module/communication/strategies/sms/knowlarity-multi.strategy.ts +0 -158
- package/src/module/communication/strategies/sms/knowlarity.strategy.ts +0 -44
- package/src/module/communication/strategies/sms/twilio-v2.strategy.ts +0 -47
- package/src/module/communication/strategies/sms/twilio.strategy.ts +0 -44
- package/src/module/communication/strategies/telephone/knowlarity-multi.strategy.ts +0 -158
- package/src/module/communication/strategies/telephone/knowlarity-voice.strategy.ts +0 -44
- /package/dist/module/{communication → integration}/controller/calender-event.controller.d.ts +0 -0
- /package/dist/module/{communication → integration}/controller/calender-event.controller.js +0 -0
- /package/dist/module/{communication → integration}/controller/wrapper.controller.js +0 -0
- /package/dist/module/{communication → integration}/factories/base.factory.js +0 -0
- /package/dist/module/{communication → integration}/factories/whatsapp.factory.js +0 -0
- /package/dist/module/{communication → integration}/service/calendar-event.service.d.ts +0 -0
- /package/dist/module/{communication → integration}/service/calendar-event.service.js +0 -0
- /package/dist/module/{communication → integration}/service/oauth.service.d.ts +0 -0
- /package/dist/module/{communication → integration}/strategies/email/outlook-api.strategy.js +0 -0
- /package/dist/module/{communication → integration}/strategies/email/outlook.strategy.js +0 -0
- /package/dist/module/{communication → integration}/strategies/email/sendgrid-api.strategy.js +0 -0
- /package/dist/module/{communication → integration}/strategies/whatsapp/whatsapp-cloud.strategy.js +0 -0
- /package/dist/module/{communication → integration}/strategies/whatsapp/whatsapp.strategy.js +0 -0
- /package/src/module/{communication → integration}/controller/calender-event.controller.ts +0 -0
- /package/src/module/{communication → integration}/controller/wrapper.controller.ts +0 -0
- /package/src/module/{communication → integration}/service/calendar-event.service.ts +0 -0
package/dist/module/{communication/communication.module.js → integration/integration.module.js}
RENAMED
|
@@ -6,92 +6,72 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.
|
|
9
|
+
exports.IntegrationModule = void 0;
|
|
10
10
|
const common_1 = require("@nestjs/common");
|
|
11
11
|
const typeorm_1 = require("@nestjs/typeorm");
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const communication_controller_1 = require("./controller/communication.controller");
|
|
12
|
+
const integration_config_entity_1 = require("./entity/integration-config.entity");
|
|
13
|
+
const integration_service_1 = require("./service/integration.service");
|
|
14
|
+
const integration_queue_service_1 = require("./service/integration-queue.service");
|
|
15
|
+
const integration_controller_1 = require("./controller/integration.controller");
|
|
17
16
|
const gmail_api_strategy_1 = require("./strategies/email/gmail-api.strategy");
|
|
18
|
-
const gmail_smtp_strategy_1 = require("./strategies/email/gmail-smtp.strategy");
|
|
19
|
-
const outlook_api_strategy_1 = require("./strategies/email/outlook-api.strategy");
|
|
20
17
|
const sendgrid_api_strategy_1 = require("./strategies/email/sendgrid-api.strategy");
|
|
21
|
-
const twilio_strategy_1 = require("./strategies/sms/twilio.strategy");
|
|
22
|
-
const knowlarity_strategy_1 = require("./strategies/sms/knowlarity.strategy");
|
|
23
18
|
const whatsapp_cloud_strategy_1 = require("./strategies/whatsapp/whatsapp-cloud.strategy");
|
|
24
|
-
const knowlarity_voice_strategy_1 = require("./strategies/telephone/knowlarity-voice.strategy");
|
|
25
19
|
const ozonetel_voice_strategy_1 = require("./strategies/telephone/ozonetel-voice.strategy");
|
|
26
20
|
const tubelight_voice_strategy_1 = require("./strategies/telephone/tubelight-voice.strategy");
|
|
27
21
|
const outlook_strategy_1 = require("./strategies/email/outlook.strategy");
|
|
28
|
-
const gmail_smtp_v2_strategy_1 = require("./strategies/email/gmail-smtp-v2.strategy");
|
|
29
|
-
const outlook_smtp_strategy_1 = require("./strategies/email/outlook-smtp.strategy");
|
|
30
|
-
const twilio_v2_strategy_1 = require("./strategies/sms/twilio-v2.strategy");
|
|
31
|
-
const knowlarity_multi_strategy_1 = require("./strategies/sms/knowlarity-multi.strategy");
|
|
32
|
-
const knowlarity_multi_strategy_2 = require("./strategies/telephone/knowlarity-multi.strategy");
|
|
33
22
|
const whatsapp_strategy_1 = require("./strategies/whatsapp/whatsapp.strategy");
|
|
34
23
|
const oauth_service_1 = require("./service/oauth.service");
|
|
35
24
|
const email_factory_1 = require("./factories/email.factory");
|
|
36
25
|
const sms_factory_1 = require("./factories/sms.factory");
|
|
37
26
|
const whatsapp_factory_1 = require("./factories/whatsapp.factory");
|
|
38
27
|
const telephone_factory_1 = require("./factories/telephone.factory");
|
|
39
|
-
const
|
|
28
|
+
const integration_factory_1 = require("./factories/integration.factory");
|
|
40
29
|
const calender_event_controller_1 = require("./controller/calender-event.controller");
|
|
41
30
|
const calendar_event_service_1 = require("./service/calendar-event.service");
|
|
42
31
|
const wrapper_service_1 = require("./service/wrapper.service");
|
|
43
32
|
const wrapper_controller_1 = require("./controller/wrapper.controller");
|
|
44
33
|
const ics_module_1 = require("../ics/ics.module");
|
|
45
34
|
const integration_source_entity_1 = require("./entity/integration-source.entity");
|
|
46
|
-
|
|
35
|
+
const user_integration_entity_1 = require("./entity/user-integration.entity");
|
|
36
|
+
let IntegrationModule = class IntegrationModule {
|
|
47
37
|
};
|
|
48
|
-
exports.
|
|
49
|
-
exports.
|
|
38
|
+
exports.IntegrationModule = IntegrationModule;
|
|
39
|
+
exports.IntegrationModule = IntegrationModule = __decorate([
|
|
50
40
|
(0, common_1.Module)({
|
|
51
41
|
imports: [
|
|
52
42
|
typeorm_1.TypeOrmModule.forFeature([
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
43
|
+
integration_config_entity_1.IntegrationConfig,
|
|
44
|
+
integration_source_entity_1.IntegrationSource,
|
|
45
|
+
user_integration_entity_1.UserIntegration,
|
|
56
46
|
]),
|
|
57
47
|
ics_module_1.IcsMeetingModule,
|
|
58
48
|
],
|
|
59
|
-
controllers: [
|
|
49
|
+
controllers: [integration_controller_1.IntegrationController, calender_event_controller_1.GoogleController, wrapper_controller_1.WrapperController],
|
|
60
50
|
providers: [
|
|
61
|
-
|
|
62
|
-
|
|
51
|
+
integration_service_1.IntegrationService,
|
|
52
|
+
integration_queue_service_1.IntegrationQueueService,
|
|
63
53
|
oauth_service_1.OAuthService,
|
|
64
54
|
gmail_api_strategy_1.GmailApiStrategy,
|
|
65
|
-
gmail_smtp_strategy_1.GmailSmtpStrategy,
|
|
66
|
-
outlook_api_strategy_1.OutlookApiStrategy,
|
|
67
55
|
sendgrid_api_strategy_1.SendGridApiStrategy,
|
|
68
|
-
twilio_strategy_1.TwilioStrategy,
|
|
69
|
-
knowlarity_strategy_1.KnowlarityStrategy,
|
|
70
56
|
whatsapp_cloud_strategy_1.WhatsAppCloudStrategy,
|
|
71
|
-
knowlarity_voice_strategy_1.KnowlarityVoiceStrategy,
|
|
72
57
|
ozonetel_voice_strategy_1.OzonetelVoiceStrategy,
|
|
73
58
|
tubelight_voice_strategy_1.TubelightVoiceStrategy,
|
|
74
59
|
outlook_strategy_1.OutlookStrategy,
|
|
75
|
-
gmail_smtp_v2_strategy_1.GmailSMTPStrategy,
|
|
76
|
-
outlook_smtp_strategy_1.OutlookSMTPStrategy,
|
|
77
|
-
twilio_v2_strategy_1.SmsStrategy,
|
|
78
|
-
knowlarity_multi_strategy_1.KnowlarityStrategy,
|
|
79
|
-
knowlarity_multi_strategy_2.KnowlarityStrategy,
|
|
80
60
|
whatsapp_strategy_1.WhatsAppStrategy,
|
|
81
61
|
email_factory_1.EmailFactory,
|
|
82
62
|
sms_factory_1.SmsFactory,
|
|
83
63
|
whatsapp_factory_1.WhatsAppFactory,
|
|
84
64
|
telephone_factory_1.TelephoneFactory,
|
|
85
|
-
|
|
65
|
+
integration_factory_1.IntegrationFactory,
|
|
86
66
|
calendar_event_service_1.GoogleService,
|
|
87
67
|
wrapper_service_1.WrapperService,
|
|
88
68
|
],
|
|
89
69
|
exports: [
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
70
|
+
integration_service_1.IntegrationService,
|
|
71
|
+
integration_factory_1.IntegrationFactory,
|
|
72
|
+
integration_queue_service_1.IntegrationQueueService,
|
|
93
73
|
wrapper_service_1.WrapperService,
|
|
94
74
|
],
|
|
95
75
|
})
|
|
96
|
-
],
|
|
97
|
-
//# sourceMappingURL=
|
|
76
|
+
], IntegrationModule);
|
|
77
|
+
//# sourceMappingURL=integration.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration.module.js","sourceRoot":"","sources":["../../../src/module/integration/integration.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAGhD,kFAAuE;AAGvE,uEAAmE;AACnE,mFAA8E;AAG9E,gFAA4E;AAG5E,8EAAyE;AACzE,oFAA+E;AAC/E,2FAAsF;AACtF,4FAAuF;AACvF,8FAAyF;AAGzF,0EAAsE;AACtE,+EAA2E;AAC3E,2DAAuD;AAGvD,6DAAyD;AACzD,yDAAqD;AACrD,mEAA+D;AAC/D,qEAAiE;AACjE,yEAAqE;AACrE,sFAA0E;AAC1E,6EAAiE;AACjE,+DAA2D;AAC3D,wEAAoE;AACpE,kDAAqD;AACrD,kFAAuE;AACvE,8EAAmE;AAgD5D,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;CAAG,CAAA;AAApB,8CAAiB;4BAAjB,iBAAiB;IA9C7B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,uBAAa,CAAC,UAAU,CAAC;gBACvB,6CAAiB;gBACjB,6CAAiB;gBACjB,yCAAe;aAChB,CAAC;YACF,6BAAgB;SACjB;QACD,WAAW,EAAE,CAAC,8CAAqB,EAAE,4CAAgB,EAAE,sCAAiB,CAAC;QACzE,SAAS,EAAE;YAET,wCAAkB;YAClB,mDAAuB;YACvB,4BAAY;YAGZ,qCAAgB;YAChB,2CAAmB;YAGnB,+CAAqB;YACrB,+CAAqB;YACrB,iDAAsB;YAGtB,kCAAe;YACf,oCAAgB;YAGhB,4BAAY;YACZ,wBAAU;YACV,kCAAe;YACf,oCAAgB;YAChB,wCAAkB;YAElB,sCAAa;YACb,gCAAc;SACf;QACD,OAAO,EAAE;YACP,wCAAkB;YAClB,wCAAkB;YAClB,mDAAuB;YACvB,gCAAc;SACf;KACF,CAAC;GACW,iBAAiB,CAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-event.service.js","sourceRoot":"","sources":["../../../../src/module/integration/service/calendar-event.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AACA,2CAAoD;AACpD,iCAA0B;AAC1B,+EAA0E;AAGnE,IAAM,aAAa,qBAAnB,MAAM,aAAa;IAGxB,YAA6B,gBAAkC;QAAlC,qBAAgB,GAAhB,gBAAgB,CAAkB;QAF9C,WAAM,GAAG,IAAI,eAAM,CAAC,eAAa,CAAC,IAAI,CAAC,CAAC;IAES,CAAC;IAKnE,KAAK,CAAC,WAAW,CAAC,KAAU,EAAE,OAAY;QACxC,IAAI,CAAC,KAAK,EAAE,YAAY,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAC3C,CAAC;QAED,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;QAG1E,MAAM,kBAAkB,GAAG,CAAC,YAAmB,EAAE,EAAE,EAAE,CACnD,SAAS;aACN,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CACb,OAAO,CAAC,KAAK,QAAQ;YACnB,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;YAChB,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC;gBACvB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;gBACpC,CAAC,CAAC,CAAC,EAAE,KAAK;oBACR,CAAC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,EAAE,UAAU,WAAW,EAAE;gBACtC,cAAc,EAAE,kBAAkB;aACnC;SACF,CACF,CAAC;QAEF,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;CACF,CAAA;AA/GY,sCAAa;wBAAb,aAAa;IADzB,IAAA,mBAAU,GAAE;qCAIoC,qCAAgB;GAHpD,aAAa,CA+GzB"}
|
|
@@ -8,13 +8,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
-
var
|
|
11
|
+
var IntegrationQueueService_1;
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.
|
|
13
|
+
exports.IntegrationQueueService = void 0;
|
|
14
14
|
const common_1 = require("@nestjs/common");
|
|
15
|
-
let
|
|
15
|
+
let IntegrationQueueService = IntegrationQueueService_1 = class IntegrationQueueService {
|
|
16
16
|
constructor() {
|
|
17
|
-
this.logger = new common_1.Logger(
|
|
17
|
+
this.logger = new common_1.Logger(IntegrationQueueService_1.name);
|
|
18
18
|
this.queue = [];
|
|
19
19
|
this.processing = false;
|
|
20
20
|
setInterval(() => this.processQueue(), 5000);
|
|
@@ -139,9 +139,9 @@ let CommunicationQueueService = CommunicationQueueService_1 = class Communicatio
|
|
|
139
139
|
return canceled;
|
|
140
140
|
}
|
|
141
141
|
};
|
|
142
|
-
exports.
|
|
143
|
-
exports.
|
|
142
|
+
exports.IntegrationQueueService = IntegrationQueueService;
|
|
143
|
+
exports.IntegrationQueueService = IntegrationQueueService = IntegrationQueueService_1 = __decorate([
|
|
144
144
|
(0, common_1.Injectable)(),
|
|
145
145
|
__metadata("design:paramtypes", [])
|
|
146
|
-
],
|
|
147
|
-
//# sourceMappingURL=
|
|
146
|
+
], IntegrationQueueService);
|
|
147
|
+
//# sourceMappingURL=integration-queue.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-queue.service.js","sourceRoot":"","sources":["../../../../src/module/integration/service/integration-queue.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AAkB7C,IAAM,uBAAuB,+BAA7B,MAAM,uBAAuB;IAKlC;QAJiB,WAAM,GAAG,IAAI,eAAM,CAAC,yBAAuB,CAAC,IAAI,CAAC,CAAC;QAC3D,UAAK,GAAoB,EAAE,CAAC;QAC5B,eAAU,GAAG,KAAK,CAAC;QAIzB,WAAW,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,CAAC,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,YAAY,CAChB,OAAe,EACf,SAAiB,EACjB,SAAiB,EACjB,OAAe,EACf,IAA2C,EAC3C,WAAsC,QAAQ,EAC9C,YAAmB,EACnB,QAAc;QAEd,MAAM,SAAS,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAE3C,MAAM,aAAa,GAAkB;YACnC,EAAE,EAAE,SAAS;YACb,OAAO;YACP,SAAS;YACT,SAAS;YACT,OAAO;YACP,IAAI;YACJ,QAAQ;YACR,YAAY;YACZ,QAAQ;YACR,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,UAAU,EAAE,CAAC;YACb,UAAU,EAAE,CAAC;SACd,CAAC;QAEF,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC/B,IAAI,CAAC,SAAS,EAAE,CAAC;QAEjB,IAAI,CAAC,MAAM,CAAC,GAAG,CACb,mBAAmB,SAAS,QAAQ,SAAS,kBAAkB,QAAQ,EAAE,CAC1E,CAAC;QACF,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,iBAAiB,CACrB,OAAe,EACf,SAAiB,EACjB,UAAoB,EACpB,OAAe,EACf,IAA2C,EAC3C,WAAsC,KAAK,EAC3C,QAAc;QAEd,MAA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AC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF,CAAA;AAlNY,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,mBAAU,GAAE;;GACA,uBAAuB,CAkNnC"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { Repository } from 'typeorm';
|
|
2
|
+
import { ConfigService } from '@nestjs/config';
|
|
3
|
+
import { IntegrationConfig } from '../entity/integration-config.entity';
|
|
4
|
+
import { UserIntegration } from '../entity/user-integration.entity';
|
|
5
|
+
import { IntegrationFactory } from '../factories/integration.factory';
|
|
6
|
+
import { IntegrationResult } from '../strategies/integration.strategy';
|
|
7
|
+
import { GmailApiStrategy } from '../strategies/email/gmail-api.strategy';
|
|
8
|
+
import { SendGridApiStrategy } from '../strategies/email/sendgrid-api.strategy';
|
|
9
|
+
import { IntegrationQueueService } from './integration-queue.service';
|
|
10
|
+
import { BulkMessageDto, CreateUserIntegrationDto, UpdateUserIntegrationDto } from '../dto/create-config.dto';
|
|
11
|
+
export interface SendMessageDto {
|
|
12
|
+
levelId: number;
|
|
13
|
+
levelType: string;
|
|
14
|
+
app_code: string;
|
|
15
|
+
to: string;
|
|
16
|
+
message: string;
|
|
17
|
+
mode?: 'EMAIL' | 'SMS' | 'WA' | 'TELEPHONE';
|
|
18
|
+
priority?: number;
|
|
19
|
+
user_id?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface GenericMessageDto {
|
|
22
|
+
levelId: number;
|
|
23
|
+
levelType: string;
|
|
24
|
+
app_code: string;
|
|
25
|
+
to: string | string[];
|
|
26
|
+
message: string;
|
|
27
|
+
subject?: string;
|
|
28
|
+
type?: 'EMAIL' | 'SMS' | 'WA' | 'TELEPHONE';
|
|
29
|
+
priority?: 'high' | 'medium' | 'low';
|
|
30
|
+
cc?: string | string[];
|
|
31
|
+
bcc?: string | string[];
|
|
32
|
+
html?: string;
|
|
33
|
+
attachments?: any[];
|
|
34
|
+
mediaUrl?: string;
|
|
35
|
+
templateId?: string;
|
|
36
|
+
variables?: Record<string, any>;
|
|
37
|
+
user_id?: number;
|
|
38
|
+
}
|
|
39
|
+
export interface IntegrationConfigWithConfig extends IntegrationConfig {
|
|
40
|
+
config?: any;
|
|
41
|
+
}
|
|
42
|
+
export interface GmailSSOResult {
|
|
43
|
+
hubId: number;
|
|
44
|
+
configId: number;
|
|
45
|
+
}
|
|
46
|
+
export declare class IntegrationService {
|
|
47
|
+
private readonly configRepository;
|
|
48
|
+
private readonly userIntegrationRepository;
|
|
49
|
+
private readonly integrationFactory;
|
|
50
|
+
private readonly gmailApiStrategy;
|
|
51
|
+
private readonly sendGridApiStrategy;
|
|
52
|
+
private readonly configService;
|
|
53
|
+
private readonly queueService?;
|
|
54
|
+
private readonly logger;
|
|
55
|
+
private readonly gmailOAuthStates;
|
|
56
|
+
constructor(configRepository: Repository<IntegrationConfig>, userIntegrationRepository: Repository<UserIntegration>, integrationFactory: IntegrationFactory, gmailApiStrategy: GmailApiStrategy, sendGridApiStrategy: SendGridApiStrategy, configService: ConfigService, queueService?: IntegrationQueueService | undefined);
|
|
57
|
+
private deriveServiceType;
|
|
58
|
+
sendMessage({ levelId, levelType, app_code, to, message, mode, priority, user_id, }: SendMessageDto): Promise<IntegrationResult>;
|
|
59
|
+
getActiveConfigs(levelId: number, levelType: string, app_code: string, mode?: 'EMAIL' | 'SMS' | 'WA' | 'TELEPHONE'): Promise<IntegrationConfig[]>;
|
|
60
|
+
private sortConfigsByPriority;
|
|
61
|
+
private sendViaConfig;
|
|
62
|
+
createIntegrationConfig(levelId: number, levelType: string, app_code: string, configType: 'EMAIL' | 'SMS' | 'WA' | 'TELEPHONE', provider: string, integration_source_id: number, config: any, priority?: number, is_default?: boolean): Promise<IntegrationConfig | {
|
|
63
|
+
authUrl: string;
|
|
64
|
+
state: string;
|
|
65
|
+
message: string;
|
|
66
|
+
}>;
|
|
67
|
+
getSupportedCombinations(): {
|
|
68
|
+
mode: string;
|
|
69
|
+
service: string;
|
|
70
|
+
provider: string;
|
|
71
|
+
}[];
|
|
72
|
+
getLevelConfigs(levelId: number, levelType: string, filters?: {
|
|
73
|
+
app_code?: string;
|
|
74
|
+
integration_type?: 'WA' | 'SMS' | 'EMAIL' | 'TELEPHONE';
|
|
75
|
+
integration_provider?: string;
|
|
76
|
+
}): Promise<Array<IntegrationConfig & {
|
|
77
|
+
linkedSource?: string;
|
|
78
|
+
configDetails?: any;
|
|
79
|
+
}>>;
|
|
80
|
+
private extractLinkedSource;
|
|
81
|
+
private extractConfigDetails;
|
|
82
|
+
updateConfigStatus(hubId: number, status: number): Promise<void>;
|
|
83
|
+
deleteConfiguration(configId: number): Promise<void>;
|
|
84
|
+
updateConfiguration(hubId: number, updateData: {
|
|
85
|
+
config?: any;
|
|
86
|
+
priority?: number;
|
|
87
|
+
is_default?: boolean;
|
|
88
|
+
status?: number;
|
|
89
|
+
}): Promise<IntegrationConfig & {
|
|
90
|
+
config?: any;
|
|
91
|
+
}>;
|
|
92
|
+
sendGenericMessage(messageDto: GenericMessageDto): Promise<IntegrationResult>;
|
|
93
|
+
sendBulkMessage(bulkDto: BulkMessageDto): Promise<{
|
|
94
|
+
results: IntegrationResult[];
|
|
95
|
+
summary: any;
|
|
96
|
+
}>;
|
|
97
|
+
scheduleMessage(scheduledDto: any): Promise<{
|
|
98
|
+
scheduled: boolean;
|
|
99
|
+
scheduleId?: string;
|
|
100
|
+
}>;
|
|
101
|
+
sendTemplateMessage(templateDto: any): Promise<IntegrationResult>;
|
|
102
|
+
private detectCommunicationType;
|
|
103
|
+
private sortConfigsByPriorityAndDefault;
|
|
104
|
+
private processTemplate;
|
|
105
|
+
private getTemplate;
|
|
106
|
+
private chunkArray;
|
|
107
|
+
initGmailOAuth(levelId: number, levelType: string, app_code: string, email?: string): Promise<{
|
|
108
|
+
authUrl: string;
|
|
109
|
+
state: string;
|
|
110
|
+
}>;
|
|
111
|
+
handleGmailOAuthCallback(code: string, state: string): Promise<GmailSSOResult>;
|
|
112
|
+
handleGmailTokensCallback(email: string, accessToken: string, refreshToken: string, state: string): Promise<GmailSSOResult>;
|
|
113
|
+
testGmailConfig(hubId: number): Promise<{
|
|
114
|
+
success: boolean;
|
|
115
|
+
error?: string;
|
|
116
|
+
}>;
|
|
117
|
+
private generateSecureState;
|
|
118
|
+
private validateUniqueActiveConfig;
|
|
119
|
+
private requiresOAuthFlow;
|
|
120
|
+
private generateOAuthUrl;
|
|
121
|
+
private createDirectConfig;
|
|
122
|
+
initOutlookOAuth(levelId: number, levelType: string, app_code: string, email?: string): Promise<{
|
|
123
|
+
authUrl: string;
|
|
124
|
+
state: string;
|
|
125
|
+
}>;
|
|
126
|
+
handleOutlookOAuthCallback(code: string, state: string): Promise<GmailSSOResult>;
|
|
127
|
+
getIntegrationConfigById(hubId: number): Promise<(IntegrationConfig & {
|
|
128
|
+
config: IntegrationConfig;
|
|
129
|
+
linkedSource?: string;
|
|
130
|
+
configDetails?: any;
|
|
131
|
+
}) | null>;
|
|
132
|
+
getSendGridTemplates(levelId: number, levelType: string, app_code: string): Promise<{
|
|
133
|
+
success: boolean;
|
|
134
|
+
data?: Array<{
|
|
135
|
+
label: string;
|
|
136
|
+
value: string;
|
|
137
|
+
}>;
|
|
138
|
+
error?: string;
|
|
139
|
+
}>;
|
|
140
|
+
getSendGridVerifiedSenders(apiKey: string): Promise<{
|
|
141
|
+
success: boolean;
|
|
142
|
+
data?: Array<{
|
|
143
|
+
label: string;
|
|
144
|
+
value: string;
|
|
145
|
+
}>;
|
|
146
|
+
error?: string;
|
|
147
|
+
}>;
|
|
148
|
+
createUserIntegration(createDto: CreateUserIntegrationDto): Promise<UserIntegration>;
|
|
149
|
+
getUserIntegrations(userId: number): Promise<UserIntegration[]>;
|
|
150
|
+
getConfigUserIntegrations(configId: number): Promise<UserIntegration[]>;
|
|
151
|
+
getUserIntegrationByUserAndConfig(userId: number, configId: number): Promise<UserIntegration | null>;
|
|
152
|
+
updateUserIntegration(id: number, updateDto: UpdateUserIntegrationDto): Promise<UserIntegration>;
|
|
153
|
+
deleteUserIntegration(id: number): Promise<void>;
|
|
154
|
+
getUserIntegrationForStrategy(userId: number, integrationConfigId: number): Promise<any | null>;
|
|
155
|
+
}
|