rez_core 2.2.155 → 2.2.157
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 -0
- package/dist/app.module.js.map +1 -1
- package/dist/constant/global.constant.d.ts +1 -1
- package/dist/constant/global.constant.js +1 -1
- package/dist/constant/global.constant.js.map +1 -1
- package/dist/module/auth/strategies/google.strategy.js +1 -1
- package/dist/module/auth/strategies/google.strategy.js.map +1 -1
- package/dist/module/communication/communication.module.d.ts +2 -0
- package/dist/module/communication/communication.module.js +69 -0
- package/dist/module/communication/communication.module.js.map +1 -0
- package/dist/module/communication/controller/communication.controller.d.ts +54 -0
- package/dist/module/communication/controller/communication.controller.js +148 -0
- package/dist/module/communication/controller/communication.controller.js.map +1 -0
- package/dist/module/communication/dto/create-config.dto.d.ts +91 -0
- package/dist/module/communication/dto/create-config.dto.js +243 -0
- package/dist/module/communication/dto/create-config.dto.js.map +1 -0
- package/dist/module/communication/entity/communication-config.entity.d.ts +44 -0
- package/dist/module/communication/entity/communication-config.entity.js +45 -0
- package/dist/module/communication/entity/communication-config.entity.js.map +1 -0
- package/dist/module/communication/entity/communication-hub.entity.d.ts +20 -0
- package/dist/module/communication/entity/communication-hub.entity.js +105 -0
- package/dist/module/communication/entity/communication-hub.entity.js.map +1 -0
- package/dist/module/communication/examples/usage.example.d.ts +11 -0
- package/dist/module/communication/examples/usage.example.js +89 -0
- package/dist/module/communication/examples/usage.example.js.map +1 -0
- package/dist/module/communication/factories/base.factory.d.ts +9 -0
- package/dist/module/communication/factories/base.factory.js +3 -0
- package/dist/module/communication/factories/base.factory.js.map +1 -0
- package/dist/module/communication/factories/communication.factory.d.ts +33 -0
- package/dist/module/communication/factories/communication.factory.js +104 -0
- package/dist/module/communication/factories/communication.factory.js.map +1 -0
- package/dist/module/communication/factories/email.factory.d.ts +19 -0
- package/dist/module/communication/factories/email.factory.js +61 -0
- package/dist/module/communication/factories/email.factory.js.map +1 -0
- package/dist/module/communication/factories/sms.factory.d.ts +15 -0
- package/dist/module/communication/factories/sms.factory.js +49 -0
- package/dist/module/communication/factories/sms.factory.js.map +1 -0
- package/dist/module/communication/factories/telephone.factory.d.ts +13 -0
- package/dist/module/communication/factories/telephone.factory.js +43 -0
- package/dist/module/communication/factories/telephone.factory.js.map +1 -0
- package/dist/module/communication/factories/whatsapp.factory.d.ts +13 -0
- package/dist/module/communication/factories/whatsapp.factory.js +43 -0
- package/dist/module/communication/factories/whatsapp.factory.js.map +1 -0
- package/dist/module/communication/service/communication.service.d.ts +111 -0
- package/dist/module/communication/service/communication.service.js +726 -0
- package/dist/module/communication/service/communication.service.js.map +1 -0
- package/dist/module/communication/service/oauth.service.d.ts +18 -0
- package/dist/module/communication/service/oauth.service.js +185 -0
- package/dist/module/communication/service/oauth.service.js.map +1 -0
- package/dist/module/communication/strategies/communication.strategy.d.ts +17 -0
- package/dist/module/communication/strategies/communication.strategy.js +3 -0
- package/dist/module/communication/strategies/communication.strategy.js.map +1 -0
- package/dist/module/communication/strategies/email/gmail-api.strategy.d.ts +7 -0
- package/dist/module/communication/strategies/email/gmail-api.strategy.js +135 -0
- package/dist/module/communication/strategies/email/gmail-api.strategy.js.map +1 -0
- package/dist/module/communication/strategies/email/gmail-smtp.strategy.d.ts +5 -0
- package/dist/module/communication/strategies/email/gmail-smtp.strategy.js +49 -0
- package/dist/module/communication/strategies/email/gmail-smtp.strategy.js.map +1 -0
- package/dist/module/communication/strategies/email/outlook-api.strategy.d.ts +5 -0
- package/dist/module/communication/strategies/email/outlook-api.strategy.js +44 -0
- package/dist/module/communication/strategies/email/outlook-api.strategy.js.map +1 -0
- package/dist/module/communication/strategies/gmail-smtp.strategy.d.ts +5 -0
- package/dist/module/communication/strategies/gmail-smtp.strategy.js +61 -0
- package/dist/module/communication/strategies/gmail-smtp.strategy.js.map +1 -0
- package/dist/module/communication/strategies/gmail.strategy.d.ts +5 -0
- package/dist/module/communication/strategies/gmail.strategy.js +71 -0
- package/dist/module/communication/strategies/gmail.strategy.js.map +1 -0
- package/dist/module/communication/strategies/knowlarity.strategy.d.ts +6 -0
- package/dist/module/communication/strategies/knowlarity.strategy.js +115 -0
- package/dist/module/communication/strategies/knowlarity.strategy.js.map +1 -0
- package/dist/module/communication/strategies/outlook-smtp.strategy.d.ts +5 -0
- package/dist/module/communication/strategies/outlook-smtp.strategy.js +66 -0
- package/dist/module/communication/strategies/outlook-smtp.strategy.js.map +1 -0
- package/dist/module/communication/strategies/outlook.strategy.d.ts +5 -0
- package/dist/module/communication/strategies/outlook.strategy.js +64 -0
- package/dist/module/communication/strategies/outlook.strategy.js.map +1 -0
- package/dist/module/communication/strategies/sms/knowlarity.strategy.d.ts +5 -0
- package/dist/module/communication/strategies/sms/knowlarity.strategy.js +44 -0
- package/dist/module/communication/strategies/sms/knowlarity.strategy.js.map +1 -0
- package/dist/module/communication/strategies/sms/twilio.strategy.d.ts +5 -0
- package/dist/module/communication/strategies/sms/twilio.strategy.js +44 -0
- package/dist/module/communication/strategies/sms/twilio.strategy.js.map +1 -0
- package/dist/module/communication/strategies/sms.strategy.d.ts +5 -0
- package/dist/module/communication/strategies/sms.strategy.js +50 -0
- package/dist/module/communication/strategies/sms.strategy.js.map +1 -0
- package/dist/module/communication/strategies/telephone/knowlarity-voice.strategy.d.ts +5 -0
- package/dist/module/communication/strategies/telephone/knowlarity-voice.strategy.js +44 -0
- package/dist/module/communication/strategies/telephone/knowlarity-voice.strategy.js.map +1 -0
- package/dist/module/communication/strategies/whatsapp/whatsapp-cloud.strategy.d.ts +5 -0
- package/dist/module/communication/strategies/whatsapp/whatsapp-cloud.strategy.js +47 -0
- package/dist/module/communication/strategies/whatsapp/whatsapp-cloud.strategy.js.map +1 -0
- package/dist/module/communication/strategies/whatsapp.strategy.d.ts +5 -0
- package/dist/module/communication/strategies/whatsapp.strategy.js +58 -0
- package/dist/module/communication/strategies/whatsapp.strategy.js.map +1 -0
- package/dist/module/enterprise/entity/organization.entity.d.ts +1 -0
- package/dist/module/enterprise/entity/organization.entity.js +4 -0
- package/dist/module/enterprise/entity/organization.entity.js.map +1 -1
- package/dist/module/enterprise/repository/organization.repository.d.ts +1 -0
- package/dist/module/enterprise/repository/organization.repository.js +5 -0
- package/dist/module/enterprise/repository/organization.repository.js.map +1 -1
- package/dist/module/master/service/master.service.d.ts +0 -1
- package/dist/module/master/service/master.service.js +20 -24
- package/dist/module/master/service/master.service.js.map +1 -1
- package/dist/module/meta/controller/entity-master.controller.d.ts +8 -0
- package/dist/module/meta/controller/entity-master.controller.js +44 -0
- package/dist/module/meta/controller/entity-master.controller.js.map +1 -0
- package/dist/module/meta/entity.module.js +6 -1
- package/dist/module/meta/entity.module.js.map +1 -1
- package/dist/module/meta/repository/entity-master.repository.d.ts +8 -0
- package/dist/module/meta/repository/entity-master.repository.js +36 -0
- package/dist/module/meta/repository/entity-master.repository.js.map +1 -0
- package/dist/module/meta/service/entity-master.service.d.ts +4 -1
- package/dist/module/meta/service/entity-master.service.js +8 -2
- package/dist/module/meta/service/entity-master.service.js.map +1 -1
- package/dist/module/notification/controller/otp.controller.d.ts +1 -0
- package/dist/module/notification/controller/otp.controller.js.map +1 -1
- package/dist/module/notification/service/otp.service.d.ts +1 -0
- package/dist/module/notification/service/otp.service.js +2 -2
- package/dist/module/notification/service/otp.service.js.map +1 -1
- package/dist/module/user/controller/login.controller.d.ts +4 -2
- package/dist/module/user/controller/login.controller.js +28 -6
- package/dist/module/user/controller/login.controller.js.map +1 -1
- package/dist/module/user/service/login.service.d.ts +1 -1
- package/dist/module/user/service/login.service.js +15 -6
- package/dist/module/user/service/login.service.js.map +1 -1
- package/dist/module/user/user.module.js +2 -0
- package/dist/module/user/user.module.js.map +1 -1
- package/dist/module/workflow/service/populate-workflow.service.js +2 -2
- package/dist/module/workflow/service/populate-workflow.service.js.map +1 -1
- package/dist/module/workflow/service/stage.service.js +1 -1
- package/dist/module/workflow/service/stage.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -1
- package/src/app.module.ts +2 -0
- package/src/constant/global.constant.ts +1 -1
- package/src/module/auth/strategies/google.strategy.ts +1 -1
- package/src/module/communication/communication.module.ts +77 -0
- package/src/module/communication/controller/communication.controller.ts +122 -0
- package/src/module/communication/dto/create-config.dto.ts +234 -0
- package/src/module/communication/entity/communication-config.entity.ts +80 -0
- package/src/module/communication/entity/communication-hub.entity.ts +77 -0
- package/src/module/communication/examples/usage.example.ts +169 -0
- package/src/module/communication/factories/base.factory.ts +7 -0
- package/src/module/communication/factories/communication.factory.ts +103 -0
- package/src/module/communication/factories/email.factory.ts +51 -0
- package/src/module/communication/factories/sms.factory.ts +41 -0
- package/src/module/communication/factories/telephone.factory.ts +34 -0
- package/src/module/communication/factories/whatsapp.factory.ts +34 -0
- package/src/module/communication/service/communication.service.ts +1118 -0
- package/src/module/communication/service/oauth.service.ts +203 -0
- package/src/module/communication/strategies/communication.strategy.ts +23 -0
- package/src/module/communication/strategies/email/gmail-api.strategy.ts +161 -0
- package/src/module/communication/strategies/email/gmail-smtp.strategy.ts +51 -0
- package/src/module/communication/strategies/email/outlook-api.strategy.ts +44 -0
- package/src/module/communication/strategies/gmail-smtp.strategy.ts +64 -0
- package/src/module/communication/strategies/gmail.strategy.ts +68 -0
- package/src/module/communication/strategies/knowlarity.strategy.ts +124 -0
- package/src/module/communication/strategies/outlook-smtp.strategy.ts +69 -0
- package/src/module/communication/strategies/outlook.strategy.ts +57 -0
- package/src/module/communication/strategies/sms/knowlarity.strategy.ts +44 -0
- package/src/module/communication/strategies/sms/twilio.strategy.ts +44 -0
- package/src/module/communication/strategies/sms.strategy.ts +44 -0
- package/src/module/communication/strategies/telephone/knowlarity-voice.strategy.ts +44 -0
- package/src/module/communication/strategies/whatsapp/whatsapp-cloud.strategy.ts +49 -0
- package/src/module/communication/strategies/whatsapp.strategy.ts +53 -0
- package/src/module/enterprise/entity/organization.entity.ts +3 -0
- package/src/module/enterprise/repository/organization.repository.ts +6 -0
- package/src/module/master/service/master.service.ts +29 -24
- package/src/module/meta/controller/entity-master.controller.ts +28 -0
- package/src/module/meta/entity.module.ts +6 -1
- package/src/module/meta/repository/entity-master.repository.ts +17 -0
- package/src/module/meta/service/entity-master.service.ts +7 -0
- package/src/module/notification/controller/otp.controller.ts +1 -1
- package/src/module/notification/service/otp.service.ts +3 -3
- package/src/module/user/controller/login.controller.ts +36 -5
- package/src/module/user/service/login.service.ts +48 -23
- package/src/module/user/user.module.ts +2 -0
- package/src/module/workflow/service/populate-workflow.service.ts +3 -3
- package/src/module/workflow/service/stage.service.ts +1 -1
- package/src/resources/dev.properties.yaml +1 -0
package/dist/app.module.js
CHANGED
|
@@ -25,6 +25,7 @@ const layout_preference_module_1 = require("./module/layout_preference/layout_pr
|
|
|
25
25
|
const workflow_module_1 = require("./module/workflow/workflow.module");
|
|
26
26
|
const ics_module_1 = require("./module/ics/ics.module");
|
|
27
27
|
const dashboard_module_1 = require("./module/dashboard/dashboard.module");
|
|
28
|
+
const communication_module_1 = require("./module/communication/communication.module");
|
|
28
29
|
let AppModule = class AppModule {
|
|
29
30
|
};
|
|
30
31
|
exports.AppModule = AppModule;
|
|
@@ -48,6 +49,7 @@ exports.AppModule = AppModule = __decorate([
|
|
|
48
49
|
workflow_module_1.WorkflowModule,
|
|
49
50
|
ics_module_1.IcsMeetingModule,
|
|
50
51
|
dashboard_module_1.DashboardModule,
|
|
52
|
+
communication_module_1.CommunicationModule,
|
|
51
53
|
],
|
|
52
54
|
})
|
|
53
55
|
], AppModule);
|
package/dist/app.module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,0DAAwD;AACxD,6EAAyE;AACzE,uDAAmD;AACnD,2DAAuD;AACvD,+DAA2D;AAC3D,iEAA6D;AAC7D,mFAA+E;AAC/E,qEAAuD;AACvD,iEAA6D;AAC7D,6EAAyE;AACzE,uFAAkF;AAClF,iEAA6D;AAC7D,2DAAuD;AACvD,kGAA6F;AAC7F,uEAAmE;AACnE,wDAA2D;AAC3D,0EAAsE;
|
|
1
|
+
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,0DAAwD;AACxD,6EAAyE;AACzE,uDAAmD;AACnD,2DAAuD;AACvD,+DAA2D;AAC3D,iEAA6D;AAC7D,mFAA+E;AAC/E,qEAAuD;AACvD,iEAA6D;AAC7D,6EAAyE;AACzE,uFAAkF;AAClF,iEAA6D;AAC7D,2DAAuD;AACvD,kGAA6F;AAC7F,uEAAmE;AACnE,wDAA2D;AAC3D,0EAAsE;AACtE,sFAAkF;AAwB3E,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IAtBrB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,4BAAY;YACZ,8BAAc;YACd,oCAAgB;YAChB,0BAAW;YACX,wBAAU;YACV,4BAAY;YACZ,wCAAkB;YAClB,2BAAU;YACV,4BAAY;YACZ,oCAAgB;YAChB,qCAAgB;YAChB,4BAAY;YACZ,wBAAU;YACV,iDAAsB;YACtB,gCAAc;YACd,6BAAgB;YAChB,kCAAe;YACf,0CAAmB;SACpB;KACF,CAAC;GACW,SAAS,CAAG"}
|
|
@@ -29,7 +29,7 @@ export declare const DISPLAY_LIST = "LIST";
|
|
|
29
29
|
export declare const DISPLAY_EXPORT = "EXPORT";
|
|
30
30
|
export declare const DISPLAY_REPORT = "REPORT";
|
|
31
31
|
export declare const WORKFLOW = "WRFW";
|
|
32
|
-
export declare const ACTION = "
|
|
32
|
+
export declare const ACTION = "WFAC";
|
|
33
33
|
export declare const STAGE = "WFS";
|
|
34
34
|
export declare const STAGE_GROUP = "WFSG";
|
|
35
35
|
export declare const ACTION_CATEGORY = "WFAC";
|
|
@@ -32,7 +32,7 @@ exports.DISPLAY_LIST = 'LIST';
|
|
|
32
32
|
exports.DISPLAY_EXPORT = 'EXPORT';
|
|
33
33
|
exports.DISPLAY_REPORT = 'REPORT';
|
|
34
34
|
exports.WORKFLOW = 'WRFW';
|
|
35
|
-
exports.ACTION = '
|
|
35
|
+
exports.ACTION = 'WFAC';
|
|
36
36
|
exports.STAGE = 'WFS';
|
|
37
37
|
exports.STAGE_GROUP = 'WFSG';
|
|
38
38
|
exports.ACTION_CATEGORY = 'WFAC';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global.constant.js","sourceRoot":"","sources":["../../src/constant/global.constant.ts"],"names":[],"mappings":";;;AACa,QAAA,eAAe,GAAG,KAAK,CAAC;AACxB,QAAA,uBAAuB,GAAG,KAAK,CAAC;AAChC,QAAA,eAAe,GAAG,KAAK,CAAC;AACxB,QAAA,sBAAsB,GAAG,KAAK,CAAC;AAC/B,QAAA,4BAA4B,GAAG,KAAK,CAAC;AACrC,QAAA,2BAA2B,GAAG,KAAK,CAAC;AACpC,QAAA,qBAAqB,GAAG,KAAK,CAAC;AAC9B,QAAA,gBAAgB,GAAG,KAAK,CAAC;AACzB,QAAA,qBAAqB,GAAG,MAAM,CAAC;AAC/B,QAAA,0BAA0B,GAAG,MAAM,CAAC;AACpC,QAAA,wBAAwB,GAAG,KAAK,CAAC;AACjC,QAAA,sBAAsB,GAAG,KAAK,CAAC;AAC/B,QAAA,oBAAoB,GAAG,KAAK,CAAC;AAC7B,QAAA,4BAA4B,GAAG,KAAK,CAAC;AACrC,QAAA,4BAA4B,GAAG,KAAK,CAAC;AACrC,QAAA,0BAA0B,GAAG,KAAK,CAAC;AACnC,QAAA,+BAA+B,GAAG,KAAK,CAAC;AAExC,QAAA,sBAAsB,GAAG,YAAY,CAAC;AACtC,QAAA,kBAAkB,GAAG,QAAQ,CAAC;AAG9B,QAAA,SAAS,GAAW,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,EAAE,CAAC;AAGjD,QAAA,aAAa,GAAG,e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|
clientID: configService.get('CLIENT_ID'),
|
|
21
21
|
clientSecret: configService.get('CLIENT_SECRET'),
|
|
22
22
|
callbackURL: configService.get('CALLBACK_URL'),
|
|
23
|
-
scope: ['openid', 'email', 'profile'],
|
|
23
|
+
scope: ['openid', 'email', 'profile', 'https://www.googleapis.com/auth/gmail.send'],
|
|
24
24
|
accessType: 'offline',
|
|
25
25
|
includeGrantedScopes: true,
|
|
26
26
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google.strategy.js","sourceRoot":"","sources":["../../../../src/module/auth/strategies/google.strategy.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,+CAAoD;AACpD,qEAAmE;AACnE,2CAA+C;AAGxC,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,IAAA,2BAAgB,EAAC,kCAAQ,EAAE,QAAQ,CAAC;IACtE,YAAoB,aAA4B;QAC9C,KAAK,CAAC;YACJ,QAAQ,EAAE,aAAa,CAAC,GAAG,CAAS,WAAW,CAAE;YACjD,YAAY,EAAE,aAAa,CAAC,GAAG,CAAS,eAAe,CAAE;YACzD,WAAW,EAAE,aAAa,CAAC,GAAG,CAAS,cAAc,CAAE;YACvD,KAAK,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"google.strategy.js","sourceRoot":"","sources":["../../../../src/module/auth/strategies/google.strategy.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,+CAAoD;AACpD,qEAAmE;AACnE,2CAA+C;AAGxC,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,IAAA,2BAAgB,EAAC,kCAAQ,EAAE,QAAQ,CAAC;IACtE,YAAoB,aAA4B;QAC9C,KAAK,CAAC;YACJ,QAAQ,EAAE,aAAa,CAAC,GAAG,CAAS,WAAW,CAAE;YACjD,YAAY,EAAE,aAAa,CAAC,GAAG,CAAS,eAAe,CAAE;YACzD,WAAW,EAAE,aAAa,CAAC,GAAG,CAAS,cAAc,CAAE;YACvD,KAAK,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,4CAA4C,CAAC;YACnF,UAAU,EAAE,SAAS;YACrB,oBAAoB,EAAE,IAAI;SAE3B,CAAC,CAAC;QATe,kBAAa,GAAb,aAAa,CAAe;IAUhD,CAAC;IAGD,mBAAmB;QACjB,OAAO;YACL,MAAM,EAAE,gBAAgB;SAGzB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,QAAQ,CACZ,WAAmB,EACnB,YAAoB,EACpB,OAAY,EACZ,IAAoB;QAEpB,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC;QACjD,MAAM,IAAI,GAAG;YACX,SAAS,EAAE,OAAO,CAAC,IAAI,EAAE,SAAS,IAAI,EAAE;YACxC,UAAU,EAAE,OAAO,CAAC,IAAI,EAAE,UAAU,IAAI,EAAE;YAC1C,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,EAAE;SACvC,CAAC;QAEF,OAAO,IAAI,CAAC,IAAI,EAAE;YAChB,KAAK;YACL,IAAI;YACJ,WAAW;YACX,YAAY;YACZ,QAAQ,EAAE,QAAQ;SACnB,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA3CY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,GAAE;qCAEwB,sBAAa;GADrC,cAAc,CA2C1B"}
|
|
@@ -0,0 +1,69 @@
|
|
|
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.CommunicationModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
12
|
+
const communication_config_entity_1 = require("./entity/communication-config.entity");
|
|
13
|
+
const communication_hub_entity_1 = require("./entity/communication-hub.entity");
|
|
14
|
+
const communication_service_1 = require("./service/communication.service");
|
|
15
|
+
const communication_controller_1 = require("./controller/communication.controller");
|
|
16
|
+
const gmail_api_strategy_1 = require("./strategies/email/gmail-api.strategy");
|
|
17
|
+
const gmail_smtp_strategy_1 = require("./strategies/email/gmail-smtp.strategy");
|
|
18
|
+
const outlook_api_strategy_1 = require("./strategies/email/outlook-api.strategy");
|
|
19
|
+
const twilio_strategy_1 = require("./strategies/sms/twilio.strategy");
|
|
20
|
+
const knowlarity_strategy_1 = require("./strategies/sms/knowlarity.strategy");
|
|
21
|
+
const whatsapp_cloud_strategy_1 = require("./strategies/whatsapp/whatsapp-cloud.strategy");
|
|
22
|
+
const knowlarity_voice_strategy_1 = require("./strategies/telephone/knowlarity-voice.strategy");
|
|
23
|
+
const gmail_strategy_1 = require("./strategies/gmail.strategy");
|
|
24
|
+
const outlook_strategy_1 = require("./strategies/outlook.strategy");
|
|
25
|
+
const gmail_smtp_strategy_2 = require("./strategies/gmail-smtp.strategy");
|
|
26
|
+
const outlook_smtp_strategy_1 = require("./strategies/outlook-smtp.strategy");
|
|
27
|
+
const sms_strategy_1 = require("./strategies/sms.strategy");
|
|
28
|
+
const knowlarity_strategy_2 = require("./strategies/knowlarity.strategy");
|
|
29
|
+
const whatsapp_strategy_1 = require("./strategies/whatsapp.strategy");
|
|
30
|
+
const oauth_service_1 = require("./service/oauth.service");
|
|
31
|
+
const email_factory_1 = require("./factories/email.factory");
|
|
32
|
+
const sms_factory_1 = require("./factories/sms.factory");
|
|
33
|
+
const whatsapp_factory_1 = require("./factories/whatsapp.factory");
|
|
34
|
+
const telephone_factory_1 = require("./factories/telephone.factory");
|
|
35
|
+
const communication_factory_1 = require("./factories/communication.factory");
|
|
36
|
+
let CommunicationModule = class CommunicationModule {
|
|
37
|
+
};
|
|
38
|
+
exports.CommunicationModule = CommunicationModule;
|
|
39
|
+
exports.CommunicationModule = CommunicationModule = __decorate([
|
|
40
|
+
(0, common_1.Module)({
|
|
41
|
+
imports: [typeorm_1.TypeOrmModule.forFeature([communication_config_entity_1.CommunicationConfig, communication_hub_entity_1.CommunicationHub])],
|
|
42
|
+
controllers: [communication_controller_1.CommunicationController],
|
|
43
|
+
providers: [
|
|
44
|
+
communication_service_1.CommunicationService,
|
|
45
|
+
oauth_service_1.OAuthService,
|
|
46
|
+
gmail_api_strategy_1.GmailApiStrategy,
|
|
47
|
+
gmail_smtp_strategy_1.GmailSmtpStrategy,
|
|
48
|
+
outlook_api_strategy_1.OutlookApiStrategy,
|
|
49
|
+
twilio_strategy_1.TwilioStrategy,
|
|
50
|
+
knowlarity_strategy_1.KnowlarityStrategy,
|
|
51
|
+
whatsapp_cloud_strategy_1.WhatsAppCloudStrategy,
|
|
52
|
+
knowlarity_voice_strategy_1.KnowlarityVoiceStrategy,
|
|
53
|
+
gmail_strategy_1.GmailStrategy,
|
|
54
|
+
outlook_strategy_1.OutlookStrategy,
|
|
55
|
+
gmail_smtp_strategy_2.GmailSMTPStrategy,
|
|
56
|
+
outlook_smtp_strategy_1.OutlookSMTPStrategy,
|
|
57
|
+
sms_strategy_1.SmsStrategy,
|
|
58
|
+
knowlarity_strategy_2.KnowlarityStrategy,
|
|
59
|
+
whatsapp_strategy_1.WhatsAppStrategy,
|
|
60
|
+
email_factory_1.EmailFactory,
|
|
61
|
+
sms_factory_1.SmsFactory,
|
|
62
|
+
whatsapp_factory_1.WhatsAppFactory,
|
|
63
|
+
telephone_factory_1.TelephoneFactory,
|
|
64
|
+
communication_factory_1.CommunicationFactory,
|
|
65
|
+
],
|
|
66
|
+
exports: [communication_service_1.CommunicationService, communication_factory_1.CommunicationFactory],
|
|
67
|
+
})
|
|
68
|
+
], CommunicationModule);
|
|
69
|
+
//# sourceMappingURL=communication.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"communication.module.js","sourceRoot":"","sources":["../../../src/module/communication/communication.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAGhD,sFAA2E;AAC3E,gFAAqE;AAGrE,2EAAuE;AAGvE,oFAAgF;AAGhF,8EAAyE;AACzE,gFAA2E;AAC3E,kFAA6E;AAC7E,sEAAkE;AAClE,8EAAmG;AACnG,2FAAsF;AACtF,gGAA2F;AAG3F,gEAA4D;AAC5D,oEAAgE;AAChE,0EAAqE;AACrE,8EAAyE;AACzE,4DAAwD;AACxD,0EAAsE;AACtE,sEAAkE;AAClE,2DAAuD;AAGvD,6DAAyD;AACzD,yDAAqD;AACrD,mEAA+D;AAC/D,qEAAiE;AACjE,6EAAyE;AAuClE,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;CAAG,CAAA;AAAtB,kDAAmB;8BAAnB,mBAAmB;IArC/B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,uBAAa,CAAC,UAAU,CAAC,CAAC,iDAAmB,EAAE,2CAAgB,CAAC,CAAC,CAAC;QAC5E,WAAW,EAAE,CAAC,kDAAuB,CAAC;QACtC,SAAS,EAAE;YAET,4CAAoB;YACpB,4BAAY;YAGZ,qCAAgB;YAChB,uCAAiB;YACjB,yCAAkB;YAGlB,gCAAc;YACd,wCAAqB;YACrB,+CAAqB;YACrB,mDAAuB;YAGvB,8BAAa;YACb,kCAAe;YACf,uCAAiB;YACjB,2CAAmB;YACnB,0BAAW;YACX,wCAAkB;YAClB,oCAAgB;YAGhB,4BAAY;YACZ,wBAAU;YACV,kCAAe;YACf,oCAAgB;YAChB,4CAAoB;SACrB;QACD,OAAO,EAAE,CAAC,4CAAoB,EAAE,4CAAoB,CAAC;KACtD,CAAC;GACW,mBAAmB,CAAG"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { CommunicationService } from '../service/communication.service';
|
|
2
|
+
import { CreateConfigDto, UpdateConfigStatusDto, GenericSendMessageDto, BulkMessageDto, GmailOAuthInitDto, OutlookOAuthInitDto } from '../dto/create-config.dto';
|
|
3
|
+
export declare class ScheduledMessageDto extends GenericSendMessageDto {
|
|
4
|
+
scheduleFor: Date;
|
|
5
|
+
timezone?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class CommunicationController {
|
|
8
|
+
private readonly communicationService;
|
|
9
|
+
constructor(communicationService: CommunicationService);
|
|
10
|
+
sendMessage(sendMessageDto: GenericSendMessageDto): Promise<import("../strategies/communication.strategy").CommunicationResult>;
|
|
11
|
+
sendBulkMessage(bulkMessageDto: BulkMessageDto): Promise<{
|
|
12
|
+
results: import("../strategies/communication.strategy").CommunicationResult[];
|
|
13
|
+
summary: any;
|
|
14
|
+
}>;
|
|
15
|
+
scheduleMessage(scheduledMessageDto: ScheduledMessageDto): Promise<{
|
|
16
|
+
scheduled: boolean;
|
|
17
|
+
scheduleId?: string;
|
|
18
|
+
}>;
|
|
19
|
+
sendTemplateMessage(templateMessage: {
|
|
20
|
+
organisationId: number;
|
|
21
|
+
to: string | string[];
|
|
22
|
+
templateId: string;
|
|
23
|
+
variables: Record<string, any>;
|
|
24
|
+
type?: 'EMAIL' | 'SMS' | 'WA' | 'TELEPHONE';
|
|
25
|
+
}): Promise<import("../strategies/communication.strategy").CommunicationResult>;
|
|
26
|
+
createConfig(createConfigDto: CreateConfigDto): Promise<import("../entity/communication-hub.entity").CommunicationHub | {
|
|
27
|
+
authUrl: string;
|
|
28
|
+
state: string;
|
|
29
|
+
message: string;
|
|
30
|
+
}>;
|
|
31
|
+
getSupportedCombinations(): Promise<{
|
|
32
|
+
mode: string;
|
|
33
|
+
service: string;
|
|
34
|
+
provider: string;
|
|
35
|
+
}[]>;
|
|
36
|
+
getLevelConfigs(levelId: number, levelType: string): Promise<import("../entity/communication-hub.entity").CommunicationHub[]>;
|
|
37
|
+
updateConfigStatus(hubId: number, updateStatusDto: UpdateConfigStatusDto): Promise<{
|
|
38
|
+
message: string;
|
|
39
|
+
}>;
|
|
40
|
+
initGmailOAuth(initDto: GmailOAuthInitDto): Promise<{
|
|
41
|
+
authUrl: string;
|
|
42
|
+
state: string;
|
|
43
|
+
}>;
|
|
44
|
+
testGmailConfig(body: {
|
|
45
|
+
hubId: number;
|
|
46
|
+
}): Promise<{
|
|
47
|
+
success: boolean;
|
|
48
|
+
error?: string;
|
|
49
|
+
}>;
|
|
50
|
+
initOutlookOAuth(initDto: OutlookOAuthInitDto): Promise<{
|
|
51
|
+
authUrl: string;
|
|
52
|
+
state: string;
|
|
53
|
+
}>;
|
|
54
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.CommunicationController = exports.ScheduledMessageDto = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const communication_service_1 = require("../service/communication.service");
|
|
18
|
+
const create_config_dto_1 = require("../dto/create-config.dto");
|
|
19
|
+
class ScheduledMessageDto extends create_config_dto_1.GenericSendMessageDto {
|
|
20
|
+
}
|
|
21
|
+
exports.ScheduledMessageDto = ScheduledMessageDto;
|
|
22
|
+
let CommunicationController = class CommunicationController {
|
|
23
|
+
constructor(communicationService) {
|
|
24
|
+
this.communicationService = communicationService;
|
|
25
|
+
}
|
|
26
|
+
async sendMessage(sendMessageDto) {
|
|
27
|
+
return this.communicationService.sendGenericMessage(sendMessageDto);
|
|
28
|
+
}
|
|
29
|
+
async sendBulkMessage(bulkMessageDto) {
|
|
30
|
+
return this.communicationService.sendBulkMessage(bulkMessageDto);
|
|
31
|
+
}
|
|
32
|
+
async scheduleMessage(scheduledMessageDto) {
|
|
33
|
+
return this.communicationService.scheduleMessage(scheduledMessageDto);
|
|
34
|
+
}
|
|
35
|
+
async sendTemplateMessage(templateMessage) {
|
|
36
|
+
return this.communicationService.sendTemplateMessage(templateMessage);
|
|
37
|
+
}
|
|
38
|
+
async createConfig(createConfigDto) {
|
|
39
|
+
return this.communicationService.createCommunicationConfig(createConfigDto.levelId, createConfigDto.levelType, createConfigDto.configType, createConfigDto.service, createConfigDto.provider, createConfigDto.config, createConfigDto.priority, createConfigDto.is_default);
|
|
40
|
+
}
|
|
41
|
+
async getSupportedCombinations() {
|
|
42
|
+
return this.communicationService.getSupportedCombinations();
|
|
43
|
+
}
|
|
44
|
+
async getLevelConfigs(levelId, levelType) {
|
|
45
|
+
return this.communicationService.getLevelConfigs(levelId, levelType);
|
|
46
|
+
}
|
|
47
|
+
async updateConfigStatus(hubId, updateStatusDto) {
|
|
48
|
+
await this.communicationService.updateConfigStatus(hubId, updateStatusDto.status);
|
|
49
|
+
return { message: 'Status updated successfully' };
|
|
50
|
+
}
|
|
51
|
+
async initGmailOAuth(initDto) {
|
|
52
|
+
return this.communicationService.initGmailOAuth(initDto.levelId, initDto.levelType, initDto.email);
|
|
53
|
+
}
|
|
54
|
+
async testGmailConfig(body) {
|
|
55
|
+
return this.communicationService.testGmailConfig(body.hubId);
|
|
56
|
+
}
|
|
57
|
+
async initOutlookOAuth(initDto) {
|
|
58
|
+
return this.communicationService.initOutlookOAuth(initDto.levelId, initDto.levelType, initDto.email);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
exports.CommunicationController = CommunicationController;
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, common_1.Post)('send'),
|
|
64
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
65
|
+
__param(0, (0, common_1.Body)()),
|
|
66
|
+
__metadata("design:type", Function),
|
|
67
|
+
__metadata("design:paramtypes", [create_config_dto_1.GenericSendMessageDto]),
|
|
68
|
+
__metadata("design:returntype", Promise)
|
|
69
|
+
], CommunicationController.prototype, "sendMessage", null);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, common_1.Post)('send/bulk'),
|
|
72
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
73
|
+
__param(0, (0, common_1.Body)()),
|
|
74
|
+
__metadata("design:type", Function),
|
|
75
|
+
__metadata("design:paramtypes", [create_config_dto_1.BulkMessageDto]),
|
|
76
|
+
__metadata("design:returntype", Promise)
|
|
77
|
+
], CommunicationController.prototype, "sendBulkMessage", null);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, common_1.Post)('send/scheduled'),
|
|
80
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
81
|
+
__param(0, (0, common_1.Body)()),
|
|
82
|
+
__metadata("design:type", Function),
|
|
83
|
+
__metadata("design:paramtypes", [ScheduledMessageDto]),
|
|
84
|
+
__metadata("design:returntype", Promise)
|
|
85
|
+
], CommunicationController.prototype, "scheduleMessage", null);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, common_1.Post)('send/template'),
|
|
88
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
89
|
+
__param(0, (0, common_1.Body)()),
|
|
90
|
+
__metadata("design:type", Function),
|
|
91
|
+
__metadata("design:paramtypes", [Object]),
|
|
92
|
+
__metadata("design:returntype", Promise)
|
|
93
|
+
], CommunicationController.prototype, "sendTemplateMessage", null);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, common_1.Post)('config'),
|
|
96
|
+
__param(0, (0, common_1.Body)()),
|
|
97
|
+
__metadata("design:type", Function),
|
|
98
|
+
__metadata("design:paramtypes", [create_config_dto_1.CreateConfigDto]),
|
|
99
|
+
__metadata("design:returntype", Promise)
|
|
100
|
+
], CommunicationController.prototype, "createConfig", null);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, common_1.Get)('supported-combinations'),
|
|
103
|
+
__metadata("design:type", Function),
|
|
104
|
+
__metadata("design:paramtypes", []),
|
|
105
|
+
__metadata("design:returntype", Promise)
|
|
106
|
+
], CommunicationController.prototype, "getSupportedCombinations", null);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, common_1.Get)('level/:id/:type/configs'),
|
|
109
|
+
__param(0, (0, common_1.Param)('id', common_1.ParseIntPipe)),
|
|
110
|
+
__param(1, (0, common_1.Param)('type')),
|
|
111
|
+
__metadata("design:type", Function),
|
|
112
|
+
__metadata("design:paramtypes", [Number, String]),
|
|
113
|
+
__metadata("design:returntype", Promise)
|
|
114
|
+
], CommunicationController.prototype, "getLevelConfigs", null);
|
|
115
|
+
__decorate([
|
|
116
|
+
(0, common_1.Put)('config/:id/status'),
|
|
117
|
+
__param(0, (0, common_1.Param)('id', common_1.ParseIntPipe)),
|
|
118
|
+
__param(1, (0, common_1.Body)()),
|
|
119
|
+
__metadata("design:type", Function),
|
|
120
|
+
__metadata("design:paramtypes", [Number, create_config_dto_1.UpdateConfigStatusDto]),
|
|
121
|
+
__metadata("design:returntype", Promise)
|
|
122
|
+
], CommunicationController.prototype, "updateConfigStatus", null);
|
|
123
|
+
__decorate([
|
|
124
|
+
(0, common_1.Post)('gmail/oauth/init'),
|
|
125
|
+
__param(0, (0, common_1.Body)()),
|
|
126
|
+
__metadata("design:type", Function),
|
|
127
|
+
__metadata("design:paramtypes", [create_config_dto_1.GmailOAuthInitDto]),
|
|
128
|
+
__metadata("design:returntype", Promise)
|
|
129
|
+
], CommunicationController.prototype, "initGmailOAuth", null);
|
|
130
|
+
__decorate([
|
|
131
|
+
(0, common_1.Post)('gmail/test'),
|
|
132
|
+
__param(0, (0, common_1.Body)()),
|
|
133
|
+
__metadata("design:type", Function),
|
|
134
|
+
__metadata("design:paramtypes", [Object]),
|
|
135
|
+
__metadata("design:returntype", Promise)
|
|
136
|
+
], CommunicationController.prototype, "testGmailConfig", null);
|
|
137
|
+
__decorate([
|
|
138
|
+
(0, common_1.Post)('outlook/oauth/init'),
|
|
139
|
+
__param(0, (0, common_1.Body)()),
|
|
140
|
+
__metadata("design:type", Function),
|
|
141
|
+
__metadata("design:paramtypes", [create_config_dto_1.OutlookOAuthInitDto]),
|
|
142
|
+
__metadata("design:returntype", Promise)
|
|
143
|
+
], CommunicationController.prototype, "initOutlookOAuth", null);
|
|
144
|
+
exports.CommunicationController = CommunicationController = __decorate([
|
|
145
|
+
(0, common_1.Controller)('communication'),
|
|
146
|
+
__metadata("design:paramtypes", [communication_service_1.CommunicationService])
|
|
147
|
+
], CommunicationController);
|
|
148
|
+
//# sourceMappingURL=communication.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"communication.controller.js","sourceRoot":"","sources":["../../../../src/module/communication/controller/communication.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAUwB;AACxB,4EAE0C;AAC1C,gEAOkC;AAElC,MAAa,mBAAoB,SAAQ,yCAAqB;CAG7D;AAHD,kDAGC;AAGM,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAClC,YAA6B,o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AAI,GAAE,CAAA;;;;kEAQhC;AAGK;IADL,IAAA,aAAI,EAAC,QAAQ,CAAC;IACK,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAkB,mCAAe;;2DAW1D;AAGK;IADL,IAAA,YAAG,EAAC,wBAAwB,CAAC;;;;uEAG7B;AAGK;IADL,IAAA,YAAG,EAAC,yBAAyB,CAAC;IAE5B,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;IACzB,WAAA,IAAA,cAAK,EAAC,MAAM,CAAC,CAAA;;;;8DAGf;AAGK;IADL,IAAA,YAAG,EAAC,mBAAmB,CAAC;IAEtB,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;IACzB,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAkB,yCAAqB;;iEAO/C;AAGK;IADL,IAAA,aAAI,EAAC,kBAAkB,CAAC;IACH,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAU,qCAAiB;;6DAMtD;AAIK;IADL,IAAA,aAAI,EAAC,YAAY,CAAC;IACI,WAAA,IAAA,aAAI,GAAE,CAAA;;;;8DAE5B;AAIK;IADL,IAAA,aAAI,EAAC,oBAAoB,CAAC;IACH,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAU,uCAAmB;;+DAE1D;kCA3FU,uBAAuB;IADnC,IAAA,mBAAU,EAAC,eAAe,CAAC;qCAEyB,4CAAoB;GAD5D,uBAAuB,CA4FnC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { CommunicationConfigType } from '../entity/communication-hub.entity';
|
|
2
|
+
export declare class CreateConfigDto {
|
|
3
|
+
levelId: number;
|
|
4
|
+
levelType: string;
|
|
5
|
+
configType: CommunicationConfigType;
|
|
6
|
+
service: string;
|
|
7
|
+
provider: string;
|
|
8
|
+
config: {
|
|
9
|
+
useOAuth?: boolean;
|
|
10
|
+
clientId?: string;
|
|
11
|
+
clientSecret?: string;
|
|
12
|
+
refreshToken?: string;
|
|
13
|
+
accessToken?: string;
|
|
14
|
+
tenantId?: string;
|
|
15
|
+
phoneNumberId?: string;
|
|
16
|
+
apiVersion?: string;
|
|
17
|
+
accountSid?: string;
|
|
18
|
+
authToken?: string;
|
|
19
|
+
fromNumber?: string;
|
|
20
|
+
accessKeyId?: string;
|
|
21
|
+
secretAccessKey?: string;
|
|
22
|
+
region?: string;
|
|
23
|
+
fromEmail?: string;
|
|
24
|
+
email?: string;
|
|
25
|
+
password?: string;
|
|
26
|
+
host?: string;
|
|
27
|
+
port?: number;
|
|
28
|
+
secure?: boolean;
|
|
29
|
+
user?: string;
|
|
30
|
+
from?: string;
|
|
31
|
+
tls?: any;
|
|
32
|
+
apiKey?: string;
|
|
33
|
+
templateId?: string;
|
|
34
|
+
dynamicTemplateData?: any;
|
|
35
|
+
callerNumber?: string;
|
|
36
|
+
apiSecret?: string;
|
|
37
|
+
baseUrl?: string;
|
|
38
|
+
callType?: 'voice' | 'sms';
|
|
39
|
+
voiceMessage?: string;
|
|
40
|
+
language?: string;
|
|
41
|
+
[key: string]: any;
|
|
42
|
+
};
|
|
43
|
+
priority?: number;
|
|
44
|
+
is_default?: boolean;
|
|
45
|
+
}
|
|
46
|
+
export declare class UpdateConfigStatusDto {
|
|
47
|
+
status: number;
|
|
48
|
+
}
|
|
49
|
+
export declare class GenericSendMessageDto {
|
|
50
|
+
levelId: number;
|
|
51
|
+
levelType: string;
|
|
52
|
+
to: string | string[];
|
|
53
|
+
message: string;
|
|
54
|
+
subject?: string;
|
|
55
|
+
type?: 'EMAIL' | 'SMS' | 'WA' | 'TELEPHONE';
|
|
56
|
+
priority?: 'high' | 'medium' | 'low';
|
|
57
|
+
cc?: string | string[];
|
|
58
|
+
bcc?: string | string[];
|
|
59
|
+
html?: string;
|
|
60
|
+
attachments?: any[];
|
|
61
|
+
mediaUrl?: string;
|
|
62
|
+
templateId?: string;
|
|
63
|
+
variables?: Record<string, any>;
|
|
64
|
+
}
|
|
65
|
+
export declare class BulkMessageDto {
|
|
66
|
+
levelId: number;
|
|
67
|
+
levelType: string;
|
|
68
|
+
recipients: string[];
|
|
69
|
+
message: string;
|
|
70
|
+
subject?: string;
|
|
71
|
+
type?: 'EMAIL' | 'SMS' | 'WA' | 'TELEPHONE';
|
|
72
|
+
priority?: 'high' | 'medium' | 'low';
|
|
73
|
+
html?: string;
|
|
74
|
+
templateId?: string;
|
|
75
|
+
variables?: Record<string, any>;
|
|
76
|
+
batchSize?: number;
|
|
77
|
+
}
|
|
78
|
+
export declare class GmailOAuthInitDto {
|
|
79
|
+
levelId: number;
|
|
80
|
+
levelType: string;
|
|
81
|
+
email?: string;
|
|
82
|
+
}
|
|
83
|
+
export declare class OAuthCallbackDto {
|
|
84
|
+
code: string;
|
|
85
|
+
state: string;
|
|
86
|
+
}
|
|
87
|
+
export declare class OutlookOAuthInitDto {
|
|
88
|
+
levelId: number;
|
|
89
|
+
levelType: string;
|
|
90
|
+
email?: string;
|
|
91
|
+
}
|