@servicelabsco/nestjs-utility-services 1.1.83 → 1.1.85
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.controller.d.ts +7 -4
- package/dist/app.controller.js +14 -5
- package/dist/app.controller.js.map +1 -1
- package/dist/app.module.js +0 -2
- package/dist/app.module.js.map +1 -1
- package/dist/app.service.d.ts +2 -2
- package/dist/app.service.js +1 -3
- package/dist/app.service.js.map +1 -1
- package/dist/auth/dtos/user.access.dto.d.ts +13 -12
- package/dist/auth/dtos/user.access.dto.js.map +1 -1
- package/dist/auth/entities/user.entity.js +0 -2
- package/dist/auth/entities/user.entity.js.map +1 -1
- package/dist/auth/es6.classes.d.ts +2 -1
- package/dist/auth/middlewares/jwt.middleware.d.ts +2 -2
- package/dist/auth/middlewares/jwt.middleware.js +2 -1
- package/dist/auth/middlewares/jwt.middleware.js.map +1 -1
- package/dist/auth/services/refresh.token.service.js +1 -2
- package/dist/auth/services/refresh.token.service.js.map +1 -1
- package/dist/common/es6.classes.js +2 -0
- package/dist/common/es6.classes.js.map +1 -1
- package/dist/common/libraries/common.mongo.entity.d.ts +21 -0
- package/dist/common/libraries/common.mongo.entity.js +121 -0
- package/dist/common/libraries/common.mongo.entity.js.map +1 -0
- package/dist/common/libraries/index.d.ts +1 -0
- package/dist/common/libraries/index.js +1 -0
- package/dist/common/libraries/index.js.map +1 -1
- package/dist/common/libraries/platform.utility.d.ts +2 -0
- package/dist/common/libraries/platform.utility.js +14 -0
- package/dist/common/libraries/platform.utility.js.map +1 -1
- package/dist/config/cache.config.d.ts +1 -0
- package/dist/config/cache.config.js +3 -2
- package/dist/config/cache.config.js.map +1 -1
- package/dist/config/entity.constants.d.ts +4 -0
- package/dist/config/entity.constants.js +4 -0
- package/dist/config/entity.constants.js.map +1 -1
- package/dist/config/mongo.config.d.ts +3 -0
- package/dist/config/mongo.config.js +25 -0
- package/dist/config/mongo.config.js.map +1 -0
- package/dist/config/source.hash.d.ts +1 -0
- package/dist/config/source.hash.js +1 -0
- package/dist/config/source.hash.js.map +1 -1
- package/dist/migrations/1686046172898-CreateMailValidationTable.d.ts +5 -0
- package/dist/migrations/1686046172898-CreateMailValidationTable.js +24 -0
- package/dist/migrations/1686046172898-CreateMailValidationTable.js.map +1 -0
- package/dist/migrations/1686048669716-CreateMobileValidationTable.d.ts +5 -0
- package/dist/migrations/1686048669716-CreateMobileValidationTable.js +26 -0
- package/dist/migrations/1686048669716-CreateMobileValidationTable.js.map +1 -0
- package/dist/platformUtility/dtos/index.d.ts +1 -0
- package/dist/platformUtility/dtos/index.js +1 -0
- package/dist/platformUtility/dtos/index.js.map +1 -1
- package/dist/platformUtility/dtos/sms.payload.dto.d.ts +7 -0
- package/dist/platformUtility/dtos/sms.payload.dto.js +38 -0
- package/dist/platformUtility/dtos/sms.payload.dto.js.map +1 -0
- package/dist/platformUtility/es6.classes.d.ts +6 -4
- package/dist/platformUtility/es6.classes.js +6 -2
- package/dist/platformUtility/es6.classes.js.map +1 -1
- package/dist/platformUtility/jobs/record.watcher.job.js +1 -1
- package/dist/platformUtility/jobs/record.watcher.job.js.map +1 -1
- package/dist/platformUtility/libraries/index.d.ts +1 -1
- package/dist/platformUtility/libraries/index.js +1 -1
- package/dist/platformUtility/libraries/index.js.map +1 -1
- package/dist/platformUtility/libraries/process.kaleyra.sms.d.ts +12 -0
- package/dist/platformUtility/libraries/process.kaleyra.sms.js +59 -0
- package/dist/platformUtility/libraries/process.kaleyra.sms.js.map +1 -0
- package/dist/platformUtility/platform.utility.module.js +2 -1
- package/dist/platformUtility/platform.utility.module.js.map +1 -1
- package/dist/platformUtility/services/audit.service.d.ts +1 -1
- package/dist/platformUtility/services/audit.service.js +10 -8
- package/dist/platformUtility/services/audit.service.js.map +1 -1
- package/dist/platformUtility/services/cache.service.d.ts +2 -2
- package/dist/platformUtility/services/cache.service.js +5 -5
- package/dist/platformUtility/services/cache.service.js.map +1 -1
- package/dist/platformUtility/services/index.d.ts +1 -0
- package/dist/platformUtility/services/index.js +1 -0
- package/dist/platformUtility/services/index.js.map +1 -1
- package/dist/platformUtility/services/mail.service.js +0 -3
- package/dist/platformUtility/services/mail.service.js.map +1 -1
- package/dist/platformUtility/services/sms.service.d.ts +12 -0
- package/dist/platformUtility/services/sms.service.js +43 -0
- package/dist/platformUtility/services/sms.service.js.map +1 -0
- package/dist/security/entities/permission.entity.js +0 -4
- package/dist/security/entities/permission.entity.js.map +1 -1
- package/dist/security/entities/role.entity.js +0 -5
- package/dist/security/entities/role.entity.js.map +1 -1
- package/dist/system/dtos/index.d.ts +7 -0
- package/dist/system/dtos/index.js +7 -0
- package/dist/system/dtos/index.js.map +1 -1
- package/dist/system/dtos/mail.validation.attributes.dto.d.ts +3 -0
- package/dist/system/dtos/mail.validation.attributes.dto.js +8 -0
- package/dist/system/dtos/mail.validation.attributes.dto.js.map +1 -0
- package/dist/system/dtos/mail.validation.dto.d.ts +5 -0
- package/dist/system/dtos/mail.validation.dto.js +7 -0
- package/dist/system/dtos/mail.validation.dto.js.map +1 -0
- package/dist/system/dtos/mobile.validation.attributes.dto.d.ts +3 -0
- package/dist/system/dtos/mobile.validation.attributes.dto.js +8 -0
- package/dist/system/dtos/mobile.validation.attributes.dto.js.map +1 -0
- package/dist/system/dtos/mobile.validation.dto.d.ts +5 -0
- package/dist/system/dtos/mobile.validation.dto.js +7 -0
- package/dist/system/dtos/mobile.validation.dto.js.map +1 -0
- package/dist/system/dtos/otp.generation.dto.d.ts +5 -0
- package/dist/system/dtos/otp.generation.dto.js +25 -0
- package/dist/system/dtos/otp.generation.dto.js.map +1 -0
- package/dist/system/dtos/sms.message.attributes.dto.d.ts +4 -0
- package/dist/system/dtos/sms.message.attributes.dto.js +8 -0
- package/dist/system/dtos/sms.message.attributes.dto.js.map +1 -0
- package/dist/system/dtos/validation.options.dto.d.ts +4 -0
- package/dist/system/dtos/validation.options.dto.js +7 -0
- package/dist/system/dtos/validation.options.dto.js.map +1 -0
- package/dist/system/entities/business.rule.entity.js +0 -13
- package/dist/system/entities/business.rule.entity.js.map +1 -1
- package/dist/system/entities/column.definition.entity.js +0 -4
- package/dist/system/entities/column.definition.entity.js.map +1 -1
- package/dist/system/entities/column.entity.js +0 -15
- package/dist/system/entities/column.entity.js.map +1 -1
- package/dist/system/entities/index.d.ts +2 -0
- package/dist/system/entities/index.js +2 -0
- package/dist/system/entities/index.js.map +1 -1
- package/dist/system/entities/list.preference.entity.js +0 -4
- package/dist/system/entities/list.preference.entity.js.map +1 -1
- package/dist/system/entities/lookup.type.entity.js +0 -3
- package/dist/system/entities/lookup.type.entity.js.map +1 -1
- package/dist/system/entities/lookup.value.entity.js +0 -5
- package/dist/system/entities/lookup.value.entity.js.map +1 -1
- package/dist/system/entities/mail.validation.entity.d.ts +14 -0
- package/dist/system/entities/mail.validation.entity.js +60 -0
- package/dist/system/entities/mail.validation.entity.js.map +1 -0
- package/dist/system/entities/menu.entity.js +0 -4
- package/dist/system/entities/menu.entity.js.map +1 -1
- package/dist/system/entities/menu.role.entity.js +0 -3
- package/dist/system/entities/menu.role.entity.js.map +1 -1
- package/dist/system/entities/mobile.validation.entity.d.ts +15 -0
- package/dist/system/entities/mobile.validation.entity.js +64 -0
- package/dist/system/entities/mobile.validation.entity.js.map +1 -0
- package/dist/system/entities/model.entity.js +0 -9
- package/dist/system/entities/model.entity.js.map +1 -1
- package/dist/system/entities/model.relationship.entity.js +0 -2
- package/dist/system/entities/model.relationship.entity.js.map +1 -1
- package/dist/system/entities/module.entity.js +0 -4
- package/dist/system/entities/module.entity.js.map +1 -1
- package/dist/system/entities/module.menu.entity.js +0 -4
- package/dist/system/entities/module.menu.entity.js.map +1 -1
- package/dist/system/entities/page.definition.entity.js +0 -4
- package/dist/system/entities/page.definition.entity.js.map +1 -1
- package/dist/system/entities/parent.menu.entity.js +0 -3
- package/dist/system/entities/parent.menu.entity.js.map +1 -1
- package/dist/system/entities/relationship.entity.js +0 -10
- package/dist/system/entities/relationship.entity.js.map +1 -1
- package/dist/system/entities/security.rule.entity.js +0 -9
- package/dist/system/entities/security.rule.entity.js.map +1 -1
- package/dist/system/entities/sms.message.entity.d.ts +2 -1
- package/dist/system/entities/sms.message.entity.js +2 -1
- package/dist/system/entities/sms.message.entity.js.map +1 -1
- package/dist/system/entities/system.script.entity.js +0 -6
- package/dist/system/entities/system.script.entity.js.map +1 -1
- package/dist/system/entities/user.group.entity.js +0 -4
- package/dist/system/entities/user.group.entity.js.map +1 -1
- package/dist/system/entities/user.group.member.entity.js +0 -3
- package/dist/system/entities/user.group.member.entity.js.map +1 -1
- package/dist/system/entities/user.group.role.entity.js +0 -3
- package/dist/system/entities/user.group.role.entity.js.map +1 -1
- package/dist/system/entities/user.preference.entity.js +0 -4
- package/dist/system/entities/user.preference.entity.js.map +1 -1
- package/dist/system/es6.classes.d.ts +20 -6
- package/dist/system/es6.classes.js +34 -0
- package/dist/system/es6.classes.js.map +1 -1
- package/dist/system/jobs/index.d.ts +3 -0
- package/dist/system/jobs/index.js +3 -0
- package/dist/system/jobs/index.js.map +1 -1
- package/dist/system/jobs/mail.validation.job.d.ts +9 -0
- package/dist/system/jobs/mail.validation.job.js +28 -0
- package/dist/system/jobs/mail.validation.job.js.map +1 -0
- package/dist/system/jobs/mobile.validation.job.d.ts +9 -0
- package/dist/system/jobs/mobile.validation.job.js +28 -0
- package/dist/system/jobs/mobile.validation.job.js.map +1 -0
- package/dist/system/jobs/property.job.d.ts +2 -2
- package/dist/system/jobs/property.job.js +2 -2
- package/dist/system/jobs/property.job.js.map +1 -1
- package/dist/system/jobs/refresh.property.cache.job.d.ts +2 -2
- package/dist/system/jobs/refresh.property.cache.job.js +4 -4
- package/dist/system/jobs/refresh.property.cache.job.js.map +1 -1
- package/dist/system/jobs/sms.message.job.d.ts +12 -0
- package/dist/system/jobs/sms.message.job.js +39 -0
- package/dist/system/jobs/sms.message.job.js.map +1 -0
- package/dist/system/services/es6.jobs.service.d.ts +7 -1
- package/dist/system/services/es6.jobs.service.js +13 -1
- package/dist/system/services/es6.jobs.service.js.map +1 -1
- package/dist/system/services/index.d.ts +2 -0
- package/dist/system/services/index.js +2 -0
- package/dist/system/services/index.js.map +1 -1
- package/dist/system/services/mail.validation.service.d.ts +14 -0
- package/dist/system/services/mail.validation.service.js +84 -0
- package/dist/system/services/mail.validation.service.js.map +1 -0
- package/dist/system/services/mobile.validation.service.d.ts +14 -0
- package/dist/system/services/mobile.validation.service.js +89 -0
- package/dist/system/services/mobile.validation.service.js.map +1 -0
- package/dist/system/services/scheduled.event.service.js.map +1 -1
- package/dist/system/subscribers/index.d.ts +3 -0
- package/dist/system/subscribers/index.js +3 -0
- package/dist/system/subscribers/index.js.map +1 -1
- package/dist/system/subscribers/mail.validation.subscriber.d.ts +12 -0
- package/dist/system/subscribers/mail.validation.subscriber.js +39 -0
- package/dist/system/subscribers/mail.validation.subscriber.js.map +1 -0
- package/dist/system/subscribers/mobile.validation.subscriber.d.ts +12 -0
- package/dist/system/subscribers/mobile.validation.subscriber.js +39 -0
- package/dist/system/subscribers/mobile.validation.subscriber.js.map +1 -0
- package/dist/system/subscribers/sms.message.subscriber.d.ts +12 -0
- package/dist/system/subscribers/sms.message.subscriber.js +39 -0
- package/dist/system/subscribers/sms.message.subscriber.js.map +1 -0
- package/package.json +6 -4
- package/dist/platformUtility/libraries/process.postmark.mail.d.ts +0 -9
- package/dist/platformUtility/libraries/process.postmark.mail.js +0 -44
- package/dist/platformUtility/libraries/process.postmark.mail.js.map +0 -1
@@ -30,8 +30,10 @@ const list_preference_entity_1 = require("../system/entities/list.preference.ent
|
|
30
30
|
const lookup_type_entity_1 = require("../system/entities/lookup.type.entity");
|
31
31
|
const lookup_value_entity_1 = require("../system/entities/lookup.value.entity");
|
32
32
|
const mail_log_entity_1 = require("../system/entities/mail.log.entity");
|
33
|
+
const mail_validation_entity_1 = require("../system/entities/mail.validation.entity");
|
33
34
|
const menu_entity_1 = require("../system/entities/menu.entity");
|
34
35
|
const menu_role_entity_1 = require("../system/entities/menu.role.entity");
|
36
|
+
const mobile_validation_entity_1 = require("../system/entities/mobile.validation.entity");
|
35
37
|
const model_column_entity_1 = require("../system/entities/model.column.entity");
|
36
38
|
const model_entity_1 = require("../system/entities/model.entity");
|
37
39
|
const model_relationship_entity_1 = require("../system/entities/model.relationship.entity");
|
@@ -98,8 +100,10 @@ const entityConstants = {
|
|
98
100
|
'9efb14076dca6034ab4c3255c5c63aa2': lookup_type_entity_1.LookupTypeEntity,
|
99
101
|
ca12043141c4bbc3b08a13bd8dfa9bc8: lookup_value_entity_1.LookupValueEntity,
|
100
102
|
a3da8b74348b592a71fe3667f5d92954: mail_log_entity_1.MailLogEntity,
|
103
|
+
'7c4d023bb9746e4bd0e2cf74e42dd6a5': mail_validation_entity_1.MailValidationEntity,
|
101
104
|
'1ef387eee5c23a8d3c8f6a3130e1c397': menu_entity_1.MenuEntity,
|
102
105
|
'0357bfa9c9022c76f5302e2274e249fe': menu_role_entity_1.MenuRoleEntity,
|
106
|
+
fa2bfeba4f8c0f5c4ec5bf9ca6c03771: mobile_validation_entity_1.MobileValidationEntity,
|
103
107
|
e9e8c013efaa8c7456bc2384506d86df: model_column_entity_1.ModelColumnEntity,
|
104
108
|
a8855b02f7117b89181e846818251b37: model_entity_1.ModelEntity,
|
105
109
|
a2d3ea6789547ea1a2affbb6b79e8598: model_relationship_entity_1.ModelRelationshipEntity,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"entity.constants.js","sourceRoot":"","sources":["../../src/config/entity.constants.ts"],"names":[],"mappings":";AAAA,oEAAgE;AAChE,oEAAgE;AAChE,8EAAyE;AACzE,gFAA2E;AAC3E,8DAA0D;AAC1D,gFAA2E;AAC3E,+FAAyF;AACzF,iGAA2F;AAC3F,8EAA0E;AAC1E,kEAA8D;AAC9D,wFAAmF;AACnF,4EAAuE;AACvE,kFAA6E;AAC7E,4FAAsF;AACtF,kEAA8D;AAC9D,kFAA6E;AAC7E,0FAAqF;AACrF,oEAAgE;AAChE,sEAA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wB;IAC5D,kCAAkC,EAAE,0CAAkB;IACtD,kCAAkC,EAAE,mCAAe;IACnD,kCAAkC,EAAE,gDAAqB;IACzD,kCAAkC,EAAE,wDAAyB;IAC7D,kCAAkC,EAAE,4CAAmB;IACvD,gCAAgC,EAAE,6CAAoB;IACtD,kCAAkC,EAAE,iDAAsB;CAC7D,CAAC;AAEF,iBAAS,eAAe,CAAC"}
|
1
|
+
{"version":3,"file":"entity.constants.js","sourceRoot":"","sources":["../../src/config/entity.constants.ts"],"names":[],"mappings":";AAAA,oEAAgE;AAChE,oEAAgE;AAChE,8EAAyE;AACzE,gFAA2E;AAC3E,8DAA0D;AAC1D,gFAA2E;AAC3E,+FAAyF;AACzF,iGAA2F;AAC3F,8EAA0E;AAC1E,kEAA8D;AAC9D,wFAAmF;AACnF,4EAAuE;AACvE,kFAA6E;AAC7E,4FAAsF;AACtF,kEAA8D;AAC9D,kFAA6E;AAC7E,0FAAqF;AACrF,oEAAgE;AAChE,sEAAkE;AAClE,wEAAoE;AACpE,gFAA2E;AAC3E,oFAA+E;AAC/E,gFAA2E;AAC3E,8EAAyE;AACzE,8EAAyE;AACzE,gEAA4D;AAC5D,sFAAiF;AACjF,sFAAiF;AACjF,8EAAyE;AACzE,gFAA2E;AAC3E,wEAAmE;AACnE,sFAAiF;AACjF,gEAA4D;AAC5D,0EAAqE;AACrE,0FAAqF;AACrF,gFAA2E;AAC3E,kEAA8D;AAC9D,4FAAuF;AACvF,4EAAuE;AACvE,oEAAgE;AAChE,8EAAyE;AACzE,kFAA6E;AAC7E,sFAAiF;AACjF,8EAAyE;AACzE,gFAA2E;AAC3E,wEAAoE;AACpE,gFAA4E;AAC5E,kFAA6E;AAC7E,oEAAgE;AAChE,kFAA6E;AAC7E,gFAA2E;AAC3E,8FAAyF;AACzF,8EAAyE;AACzE,sFAAiF;AACjF,oFAA+E;AAC/E,kFAA6E;AAC7E,sEAAkE;AAClE,8EAAyE;AACzE,gFAA2E;AAC3E,kFAA6E;AAC7E,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E,mDAAuB;IACzD,kCAAkC,EAAE,mCAAe;IACnD,kCAAkC,EAAE,4BAAY;IAChD,kCAAkC,EAAE,qCAAgB;IACpD,gCAAgC,EAAE,yCAAkB;IACpD,kCAAkC,EAAE,6CAAoB;IACxD,gCAAgC,EAAE,qCAAgB;IAClD,kCAAkC,EAAE,uCAAiB;IACrD,kCAAkC,EAAE,gCAAc;IAClD,gCAAgC,EAAE,wCAAkB;IACpD,kCAAkC,EAAE,yCAAkB;IACtD,gCAAgC,EAAE,4BAAY;IAC9C,gCAAgC,EAAE,yCAAkB;IACpD,kCAAkC,EAAE,uCAAiB;IACrD,kCAAkC,EAAE,qDAAwB;IAC5D,gCAAgC,EAAE,qCAAgB;IAClD,gCAAgC,EAAE,6CAAoB;IACtD,kCAAkC,EAAE,2CAAmB;IACvD,gCAAgC,EAAE,yCAAkB;IACpD,kCAAkC,EAAE,8BAAa;IACjD,gCAAgC,EAAE,qCAAgB;IAClD,kCAAkC,EAAE,uCAAiB;IACrD,kCAAkC,EAAE,yCAAkB;IACtD,kCAAkC,EAAE,iCAAc;IAClD,kCAAkC,EAAE,sDAAwB;IAC5D,kCAAkC,EAAE,0CAAkB;IACtD,kCAAkC,EAAE,mCAAe;IACnD,kCAAkC,EAAE,gDAAqB;IACzD,kCAAkC,EAAE,wDAAyB;IAC7D,kCAAkC,EAAE,4CAAmB;IACvD,gCAAgC,EAAE,6CAAoB;IACtD,kCAAkC,EAAE,iDAAsB;CAC7D,CAAC;AAEF,iBAAS,eAAe,CAAC"}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
"use strict";
|
2
|
+
const config = require("config");
|
3
|
+
const path_1 = require("path");
|
4
|
+
const db = config.get('mongo');
|
5
|
+
const dbConfig = {
|
6
|
+
name: 'mongodb',
|
7
|
+
type: 'mongodb',
|
8
|
+
url: db.url,
|
9
|
+
database: db.database,
|
10
|
+
entities: [(0, path_1.join)(__dirname, '/../**/**/*.mentity.{ts,js}'), (0, path_1.join)(__dirname, '..', '..', 'node_modules/@servicelabsco/**/*.mentity.{ts,js}')],
|
11
|
+
subscribers: [
|
12
|
+
(0, path_1.join)(__dirname, '/../**/**/*.msubscriber.{ts,js}'),
|
13
|
+
(0, path_1.join)(__dirname, '..', '..', 'node_modules/@servicelabsco/**/*.msubscriber.{ts,js}'),
|
14
|
+
],
|
15
|
+
synchronize: false,
|
16
|
+
migrationsRun: false,
|
17
|
+
logging: 'all',
|
18
|
+
logger: 'file',
|
19
|
+
autoLoadEntities: true,
|
20
|
+
extra: {
|
21
|
+
charset: 'utf8_unicode_ci',
|
22
|
+
},
|
23
|
+
};
|
24
|
+
module.exports = dbConfig;
|
25
|
+
//# sourceMappingURL=mongo.config.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mongo.config.js","sourceRoot":"","sources":["../../src/config/mongo.config.ts"],"names":[],"mappings":";AACA,iCAAiC;AACjC,+BAA4B;AAE5B,MAAM,EAAE,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AAG/B,MAAM,QAAQ,GAAyB;IACnC,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,SAAS;IACf,GAAG,EAAE,EAAE,CAAC,GAAG;IACX,QAAQ,EAAE,EAAE,CAAC,QAAQ;IACrB,QAAQ,EAAE,CAAC,IAAA,WAAI,EAAC,SAAS,EAAE,6BAA6B,CAAC,EAAE,IAAA,WAAI,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,kDAAkD,CAAC,CAAC;IAC3I,WAAW,EAAE;QACT,IAAA,WAAI,EAAC,SAAS,EAAE,iCAAiC,CAAC;QAClD,IAAA,WAAI,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,sDAAsD,CAAC;KACtF;IAED,WAAW,EAAE,KAAK;IAOlB,aAAa,EAAE,KAAK;IACpB,OAAO,EAAE,KAAK;IACd,MAAM,EAAE,MAAM;IACd,gBAAgB,EAAE,IAAI;IAEtB,KAAK,EAAE;QACH,OAAO,EAAE,iBAAiB;KAC7B;CACJ,CAAC;AAEF,iBAAS,QAAQ,CAAC"}
|
@@ -9,6 +9,7 @@ const SOURCEHASH = {
|
|
9
9
|
form: 'c843c8bdd29ce0a01a2a6e63c9ed939b',
|
10
10
|
userGroup: '3354bd3a69f63e9e40f120547fcfe772',
|
11
11
|
relationship: 'ca92f0ad887a73e9ffa448f5e4620c70',
|
12
|
+
mobileValidation: 'fa2bfeba4f8c0f5c4ec5bf9ca6c03771',
|
12
13
|
};
|
13
14
|
module.exports = SOURCEHASH;
|
14
15
|
//# sourceMappingURL=source.hash.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"source.hash.js","sourceRoot":"","sources":["../../src/config/source.hash.ts"],"names":[],"mappings":";AAAA,MAAM,UAAU,GAAG;IACf,cAAc,EAAE,kCAAkC;IAClD,IAAI,EAAE,kCAAkC;IACxC,KAAK,EAAE,kCAAkC;IACzC,iBAAiB,EAAE,kCAAkC;IACrD,MAAM,EAAE,kCAAkC;IAC1C,MAAM,EAAE,kCAAkC;IAC1C,IAAI,EAAE,kCAAkC;IACxC,SAAS,EAAE,kCAAkC;IAC7C,YAAY,EAAE,kCAAkC;
|
1
|
+
{"version":3,"file":"source.hash.js","sourceRoot":"","sources":["../../src/config/source.hash.ts"],"names":[],"mappings":";AAAA,MAAM,UAAU,GAAG;IACf,cAAc,EAAE,kCAAkC;IAClD,IAAI,EAAE,kCAAkC;IACxC,KAAK,EAAE,kCAAkC;IACzC,iBAAiB,EAAE,kCAAkC;IACrD,MAAM,EAAE,kCAAkC;IAC1C,MAAM,EAAE,kCAAkC;IAC1C,IAAI,EAAE,kCAAkC;IACxC,SAAS,EAAE,kCAAkC;IAC7C,YAAY,EAAE,kCAAkC;IAChD,gBAAgB,EAAE,kCAAkC;CACvD,CAAC;AAEF,iBAAS,UAAU,CAAC"}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.CreateMailValidationTable1686046172898 = void 0;
|
4
|
+
const migration_utility_1 = require("../common/libraries/migration.utility");
|
5
|
+
class CreateMailValidationTable1686046172898 extends migration_utility_1.MigrationUtility {
|
6
|
+
constructor() {
|
7
|
+
super('sys_mail_validations');
|
8
|
+
this.process();
|
9
|
+
}
|
10
|
+
process() {
|
11
|
+
this.primary();
|
12
|
+
this.string('email');
|
13
|
+
this.string('type');
|
14
|
+
this.number('code');
|
15
|
+
this.dateTime('validity');
|
16
|
+
this.dateTime('completed_on');
|
17
|
+
this.number('attempts');
|
18
|
+
this.foreign({ name: 'gateway_id', foreignTable: 'sys_lookup_values' });
|
19
|
+
this.json('attributes');
|
20
|
+
this.whoColumns();
|
21
|
+
}
|
22
|
+
}
|
23
|
+
exports.CreateMailValidationTable1686046172898 = CreateMailValidationTable1686046172898;
|
24
|
+
//# sourceMappingURL=1686046172898-CreateMailValidationTable.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"1686046172898-CreateMailValidationTable.js","sourceRoot":"","sources":["../../src/migrations/1686046172898-CreateMailValidationTable.ts"],"names":[],"mappings":";;;AAAA,6EAAyE;AAEzE,MAAa,sCAAuC,SAAQ,oCAAgB;IACxE;QACI,KAAK,CAAC,sBAAsB,CAAC,CAAC;QAC9B,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAED,OAAO;QACH,IAAI,CAAC,OAAO,EAAE,CAAC;QAEf,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACrB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAEpB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAEpB,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QAC1B,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;QAC9B,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAExB,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,CAAC,CAAC;QAExE,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACxB,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;CACJ;AAvBD,wFAuBC"}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.CreateMobileValidationTable1686048669716 = void 0;
|
4
|
+
const migration_utility_1 = require("../common/libraries/migration.utility");
|
5
|
+
class CreateMobileValidationTable1686048669716 extends migration_utility_1.MigrationUtility {
|
6
|
+
constructor() {
|
7
|
+
super('sys_mobile_validations');
|
8
|
+
this.process();
|
9
|
+
}
|
10
|
+
process() {
|
11
|
+
this.primary();
|
12
|
+
this.number('dialing_code', { width: 5 });
|
13
|
+
this.number('mobile', { width: 20, type: 'bigint' });
|
14
|
+
this.number('otp');
|
15
|
+
this.dateTime('validity');
|
16
|
+
this.number('attempts');
|
17
|
+
this.dateTime('completed_on');
|
18
|
+
this.foreign({ name: 'gateway_id', foreignTable: 'sys_lookup_values' });
|
19
|
+
this.string('type');
|
20
|
+
this.json('attributes');
|
21
|
+
this.whoColumns();
|
22
|
+
this.index(['dialing_code', 'mobile']);
|
23
|
+
}
|
24
|
+
}
|
25
|
+
exports.CreateMobileValidationTable1686048669716 = CreateMobileValidationTable1686048669716;
|
26
|
+
//# sourceMappingURL=1686048669716-CreateMobileValidationTable.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"1686048669716-CreateMobileValidationTable.js","sourceRoot":"","sources":["../../src/migrations/1686048669716-CreateMobileValidationTable.ts"],"names":[],"mappings":";;;AAAA,6EAAyE;AAEzE,MAAa,wCAAyC,SAAQ,oCAAgB;IAC1E;QACI,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAChC,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAED,OAAO;QACH,IAAI,CAAC,OAAO,EAAE,CAAC;QAEf,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;QAC1C,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;QAErD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACnB,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QAC1B,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAExB,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;QAC9B,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,CAAC,CAAC;QAExE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAEpB,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACxB,IAAI,CAAC,UAAU,EAAE,CAAC;QAElB,IAAI,CAAC,KAAK,CAAC,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC3C,CAAC;CACJ;AA1BD,4FA0BC"}
|
@@ -14,5 +14,6 @@ export * from './push.notification.response.dto';
|
|
14
14
|
export * from './push.notification.template.dto';
|
15
15
|
export * from './queue.options.dto';
|
16
16
|
export * from './remote.raw.response.dto';
|
17
|
+
export * from './sms.payload.dto';
|
17
18
|
export * from './source.column.dto';
|
18
19
|
export * from './string.search.dto';
|
@@ -30,6 +30,7 @@ __exportStar(require("./push.notification.response.dto"), exports);
|
|
30
30
|
__exportStar(require("./push.notification.template.dto"), exports);
|
31
31
|
__exportStar(require("./queue.options.dto"), exports);
|
32
32
|
__exportStar(require("./remote.raw.response.dto"), exports);
|
33
|
+
__exportStar(require("./sms.payload.dto"), exports);
|
33
34
|
__exportStar(require("./source.column.dto"), exports);
|
34
35
|
__exportStar(require("./string.search.dto"), exports);
|
35
36
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/dtos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,2DAAyC;AACzC,oDAAkC;AAClC,0DAAwC;AACxC,mEAAiD;AACjD,qDAAmC;AACnC,oDAAkC;AAClC,sDAAoC;AACpC,6DAA2C;AAC3C,qDAAmC;AACnC,4DAA0C;AAC1C,oEAAkD;AAClD,mEAAiD;AACjD,mEAAiD;AACjD,sDAAoC;AACpC,4DAA0C;AAC1C,sDAAoC;AACpC,sDAAoC"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/dtos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,2DAAyC;AACzC,oDAAkC;AAClC,0DAAwC;AACxC,mEAAiD;AACjD,qDAAmC;AACnC,oDAAkC;AAClC,sDAAoC;AACpC,6DAA2C;AAC3C,qDAAmC;AACnC,4DAA0C;AAC1C,oEAAkD;AAClD,mEAAiD;AACjD,mEAAiD;AACjD,sDAAoC;AACpC,4DAA0C;AAC1C,oDAAkC;AAClC,sDAAoC;AACpC,sDAAoC"}
|
@@ -0,0 +1,38 @@
|
|
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.SmsPayloadDto = void 0;
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
14
|
+
const class_validator_1 = require("class-validator");
|
15
|
+
const sms_template_entity_1 = require("../../system/entities/sms.template.entity");
|
16
|
+
class SmsPayloadDto {
|
17
|
+
}
|
18
|
+
__decorate([
|
19
|
+
(0, class_validator_1.IsOptional)(),
|
20
|
+
(0, class_validator_1.IsNumber)(),
|
21
|
+
__metadata("design:type", Number)
|
22
|
+
], SmsPayloadDto.prototype, "id", void 0);
|
23
|
+
__decorate([
|
24
|
+
(0, class_validator_1.IsNotEmpty)(),
|
25
|
+
__metadata("design:type", String)
|
26
|
+
], SmsPayloadDto.prototype, "content", void 0);
|
27
|
+
__decorate([
|
28
|
+
(0, class_validator_1.IsNotEmpty)(),
|
29
|
+
(0, class_validator_1.IsNumber)(),
|
30
|
+
__metadata("design:type", Number)
|
31
|
+
], SmsPayloadDto.prototype, "mobile", void 0);
|
32
|
+
__decorate([
|
33
|
+
(0, class_validator_1.IsNotEmpty)(),
|
34
|
+
(0, class_transformer_1.Expose)(),
|
35
|
+
__metadata("design:type", sms_template_entity_1.SmsTemplateEntity)
|
36
|
+
], SmsPayloadDto.prototype, "template", void 0);
|
37
|
+
exports.SmsPayloadDto = SmsPayloadDto;
|
38
|
+
//# sourceMappingURL=sms.payload.dto.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"sms.payload.dto.js","sourceRoot":"","sources":["../../../src/platformUtility/dtos/sms.payload.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA2C;AAC3C,qDAAmE;AACnE,mFAA8E;AAE9E,MAAa,aAAa;CAezB;AAdG;IAAC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;yCACC;AAEZ;IAAC,IAAA,4BAAU,GAAE;;8CACG;AAEhB;IAAC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;6CACI;AAEf;IAAC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAM,GAAE;8BACC,uCAAiB;+CAAC;AAdhC,sCAeC"}
|
@@ -20,6 +20,7 @@ import { PushNotificationResponseDto } from './dtos/push.notification.response.d
|
|
20
20
|
import { PushNotificationTemplateDto } from './dtos/push.notification.template.dto';
|
21
21
|
import { QueueOptionsDto } from './dtos/queue.options.dto';
|
22
22
|
import { RemoteRawResponseDto } from './dtos/remote.raw.response.dto';
|
23
|
+
import { SmsPayloadDto } from './dtos/sms.payload.dto';
|
23
24
|
import { SourceColumnDto } from './dtos/source.column.dto';
|
24
25
|
import { StringSearchDto } from './dtos/string.search.dto';
|
25
26
|
import { FailedBullJobEntity } from './entities/failed.bull.job.entity';
|
@@ -38,7 +39,7 @@ import { FileSystemUtility } from './libraries/file.system.utility';
|
|
38
39
|
import { ProcessCommonList } from './libraries/process.common.list';
|
39
40
|
import { ProcessCommonMail } from './libraries/process.common.mail';
|
40
41
|
import { ProcessDateFilter } from './libraries/process.date.filter';
|
41
|
-
import {
|
42
|
+
import { ProcessKaleyraSms } from './libraries/process.kaleyra.sms';
|
42
43
|
import { ProcessSmtpMail } from './libraries/process.smtp.mail';
|
43
44
|
import { MaintenanceMiddleware } from './middlewares/maintenance.middleware';
|
44
45
|
import { TrimPipe } from './middlewares/trim.pipe';
|
@@ -54,6 +55,7 @@ import { MaintenanceService } from './services/maintenance.service';
|
|
54
55
|
import { QueueService } from './services/queue.service';
|
55
56
|
import { RemoteRequestService } from './services/remote.request.service';
|
56
57
|
import { ShutdownService } from './services/shutdown.service';
|
58
|
+
import { SmsService } from './services/sms.service';
|
57
59
|
import { SqlService } from './services/sql.service';
|
58
60
|
import { SqsService } from './services/sqs.service';
|
59
61
|
import { StartupService } from './services/startup.service';
|
@@ -62,12 +64,12 @@ declare const es6Classes: {
|
|
62
64
|
commands: (typeof EntityGeneratorCommand | typeof MaintenanceCommand | typeof SqsWorkerCommand | typeof SyncClassCommand)[];
|
63
65
|
consumers: (typeof EventConsumer | typeof JobConsumer)[];
|
64
66
|
controllers: (typeof BullJobController | typeof QueueController)[];
|
65
|
-
dtos: (typeof
|
67
|
+
dtos: (typeof JobPayloadDto | typeof QueueOptionsDto | typeof CommonAttributesDto | typeof RemoteRawResponseDto | typeof DateRangeFilterDto | typeof DateFilterDto | typeof ListResponseFormatDto | typeof NumberRangeFilterDto | typeof CommonListFilterDto | typeof ListResponseDto | typeof FcmResponseDto | typeof PushNotificationResponseDto | typeof PushNotificationTemplateDto | typeof MailOptionsDto | typeof SmsPayloadDto | typeof SourceColumnDto | typeof StringSearchDto)[];
|
66
68
|
entities: (typeof FailedBullJobEntity | typeof PendingBullJobEntity)[];
|
67
69
|
jobs: (typeof LoadFailedBullJob | typeof RecordWatcherJob | typeof ReloadPendingBullJob | typeof TestJob)[];
|
68
|
-
libraries: (typeof FileSystemUtility | typeof CommonSqsPolling | typeof CreateEntityConstantsFile | typeof CreateEs6ClassesFile | typeof CreateEs6JobsFile | typeof CreateEs6ServiceFile | typeof CreateIndexFile | typeof ProcessCommonMail | typeof ProcessSmtpMail | typeof
|
70
|
+
libraries: (typeof FileSystemUtility | typeof CommonSqsPolling | typeof CreateEntityConstantsFile | typeof CreateEs6ClassesFile | typeof CreateEs6JobsFile | typeof CreateEs6ServiceFile | typeof CreateIndexFile | typeof ProcessCommonMail | typeof ProcessSmtpMail | typeof ProcessKaleyraSms | typeof ProcessDateFilter | typeof ProcessCommonList)[];
|
69
71
|
middlewares: (typeof MaintenanceMiddleware | typeof TrimPipe)[];
|
70
|
-
services: (typeof
|
72
|
+
services: (typeof CacheService | typeof RemoteRequestService | typeof SqlService | typeof DynamoService | typeof MaintenanceService | typeof ShutdownService | typeof AuditService | typeof FcmNotificationService | typeof MailService | typeof SmsService | typeof SqsService | typeof StartupService | typeof Es6JobsService | typeof Es6Service | typeof LocalPropertyService | typeof QueueService)[];
|
71
73
|
subscribers: (typeof BaseSubscriber)[];
|
72
74
|
};
|
73
75
|
export default es6Classes;
|
@@ -24,6 +24,7 @@ const push_notification_response_dto_1 = require("./dtos/push.notification.respo
|
|
24
24
|
const push_notification_template_dto_1 = require("./dtos/push.notification.template.dto");
|
25
25
|
const queue_options_dto_1 = require("./dtos/queue.options.dto");
|
26
26
|
const remote_raw_response_dto_1 = require("./dtos/remote.raw.response.dto");
|
27
|
+
const sms_payload_dto_1 = require("./dtos/sms.payload.dto");
|
27
28
|
const source_column_dto_1 = require("./dtos/source.column.dto");
|
28
29
|
const string_search_dto_1 = require("./dtos/string.search.dto");
|
29
30
|
const failed_bull_job_entity_1 = require("./entities/failed.bull.job.entity");
|
@@ -42,7 +43,7 @@ const file_system_utility_1 = require("./libraries/file.system.utility");
|
|
42
43
|
const process_common_list_1 = require("./libraries/process.common.list");
|
43
44
|
const process_common_mail_1 = require("./libraries/process.common.mail");
|
44
45
|
const process_date_filter_1 = require("./libraries/process.date.filter");
|
45
|
-
const
|
46
|
+
const process_kaleyra_sms_1 = require("./libraries/process.kaleyra.sms");
|
46
47
|
const process_smtp_mail_1 = require("./libraries/process.smtp.mail");
|
47
48
|
const maintenance_middleware_1 = require("./middlewares/maintenance.middleware");
|
48
49
|
const trim_pipe_1 = require("./middlewares/trim.pipe");
|
@@ -58,6 +59,7 @@ const maintenance_service_1 = require("./services/maintenance.service");
|
|
58
59
|
const queue_service_1 = require("./services/queue.service");
|
59
60
|
const remote_request_service_1 = require("./services/remote.request.service");
|
60
61
|
const shutdown_service_1 = require("./services/shutdown.service");
|
62
|
+
const sms_service_1 = require("./services/sms.service");
|
61
63
|
const sql_service_1 = require("./services/sql.service");
|
62
64
|
const sqs_service_1 = require("./services/sqs.service");
|
63
65
|
const startup_service_1 = require("./services/startup.service");
|
@@ -83,6 +85,7 @@ const es6Classes = {
|
|
83
85
|
push_notification_template_dto_1.PushNotificationTemplateDto,
|
84
86
|
queue_options_dto_1.QueueOptionsDto,
|
85
87
|
remote_raw_response_dto_1.RemoteRawResponseDto,
|
88
|
+
sms_payload_dto_1.SmsPayloadDto,
|
86
89
|
source_column_dto_1.SourceColumnDto,
|
87
90
|
string_search_dto_1.StringSearchDto,
|
88
91
|
],
|
@@ -99,7 +102,7 @@ const es6Classes = {
|
|
99
102
|
process_common_list_1.ProcessCommonList,
|
100
103
|
process_common_mail_1.ProcessCommonMail,
|
101
104
|
process_date_filter_1.ProcessDateFilter,
|
102
|
-
|
105
|
+
process_kaleyra_sms_1.ProcessKaleyraSms,
|
103
106
|
process_smtp_mail_1.ProcessSmtpMail,
|
104
107
|
],
|
105
108
|
middlewares: [maintenance_middleware_1.MaintenanceMiddleware, trim_pipe_1.TrimPipe],
|
@@ -116,6 +119,7 @@ const es6Classes = {
|
|
116
119
|
queue_service_1.QueueService,
|
117
120
|
remote_request_service_1.RemoteRequestService,
|
118
121
|
shutdown_service_1.ShutdownService,
|
122
|
+
sms_service_1.SmsService,
|
119
123
|
sql_service_1.SqlService,
|
120
124
|
sqs_service_1.SqsService,
|
121
125
|
startup_service_1.StartupService,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"es6.classes.js","sourceRoot":"","sources":["../../src/platformUtility/es6.classes.ts"],"names":[],"mappings":";;AAAA,kFAA6E;AAC7E,wEAAoE;AACpE,sEAAiE;AACjE,sEAAiE;AACjE,+DAA2D;AAC3D,2DAAuD;AACvD,2EAAsE;AACtE,qEAAiE;AACjE,wEAAmE;AACnE,0EAAoE;AACpE,4DAAuD;AACvD,wEAAkE;AAClE,0FAAmF;AACnF,8DAAyD;AACzD,4DAAuD;AACvD,gEAA2D;AAC3D,8EAAwE;AACxE,8DAAyD;AACzD,4EAAsE;AACtE,4FAAqF;AACrF,0FAAoF;AACpF,0FAAoF;AACpF,gEAA2D;AAC3D,4EAAsE;AACtE,gEAA2D;AAC3D,gEAA2D;AAC3D,8EAAwE;AACxE,gFAA0E;AAC1E,sEAAgE;AAChE,kEAA6D;AAC7D,4EAAsE;AACtE,8CAA0C;AAC1C,uEAAkE;AAClE,2FAAqF;AACrF,iFAA2E;AAC3E,2EAAqE;AACrE,iFAA2E;AAC3E,qEAAgE;AAChE,yEAAoE;AACpE,yEAAoE;AACpE,yEAAoE;AACpE,yEAAoE;AACpE,
|
1
|
+
{"version":3,"file":"es6.classes.js","sourceRoot":"","sources":["../../src/platformUtility/es6.classes.ts"],"names":[],"mappings":";;AAAA,kFAA6E;AAC7E,wEAAoE;AACpE,sEAAiE;AACjE,sEAAiE;AACjE,+DAA2D;AAC3D,2DAAuD;AACvD,2EAAsE;AACtE,qEAAiE;AACjE,wEAAmE;AACnE,0EAAoE;AACpE,4DAAuD;AACvD,wEAAkE;AAClE,0FAAmF;AACnF,8DAAyD;AACzD,4DAAuD;AACvD,gEAA2D;AAC3D,8EAAwE;AACxE,8DAAyD;AACzD,4EAAsE;AACtE,4FAAqF;AACrF,0FAAoF;AACpF,0FAAoF;AACpF,gEAA2D;AAC3D,4EAAsE;AACtE,4DAAuD;AACvD,gEAA2D;AAC3D,gEAA2D;AAC3D,8EAAwE;AACxE,gFAA0E;AAC1E,sEAAgE;AAChE,kEAA6D;AAC7D,4EAAsE;AACtE,8CAA0C;AAC1C,uEAAkE;AAClE,2FAAqF;AACrF,iFAA2E;AAC3E,2EAAqE;AACrE,iFAA2E;AAC3E,qEAAgE;AAChE,yEAAoE;AACpE,yEAAoE;AACpE,yEAAoE;AACpE,yEAAoE;AACpE,yEAAoE;AACpE,qEAAgE;AAChE,iFAA6E;AAC7E,uDAAmD;AACnD,4DAAwD;AACxD,4DAAwD;AACxD,8DAA0D;AAC1D,kEAA6D;AAC7D,wDAAoD;AACpD,kFAA6E;AAC7E,8EAAyE;AACzE,0DAAsD;AACtD,wEAAoE;AACpE,4DAAwD;AACxD,8EAAyE;AACzE,kEAA8D;AAC9D,wDAAoD;AACpD,wDAAoD;AACpD,wDAAoD;AACpD,gEAA4D;AAC5D,mEAA+D;AAE/D,MAAM,UAAU,GAAG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await this.setAuditLog(event);
|
25
25
|
}
|
26
26
|
async setAuditLog(event) {
|
27
|
-
if (event.updatedColumns)
|
27
|
+
if (event.updatedColumns.length)
|
28
28
|
await this.auditService.setAuditRecord(event);
|
29
29
|
}
|
30
30
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"record.watcher.job.js","sourceRoot":"","sources":["../../../src/platformUtility/jobs/record.watcher.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,kEAA8D;AAC9D,6DAAyD;AACzD,+DAA2D;AAWpD,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,sBAAS;IAO3C,YAA+B,YAA0B,EAAmB,YAA0B;QAClG,KAAK,EAAE,CAAC;QADmB,iBAAY,GAAZ,YAAY,CAAc;QAAmB,iBAAY,GAAZ,YAAY,CAAc;IAEtG,CAAC;IAOD,KAAK,CAAC,MAAM,CAAC,KAA4B;QACrC,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IASO,KAAK,CAAC,WAAW,CAAC,
|
1
|
+
{"version":3,"file":"record.watcher.job.js","sourceRoot":"","sources":["../../../src/platformUtility/jobs/record.watcher.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,kEAA8D;AAC9D,6DAAyD;AACzD,+DAA2D;AAWpD,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,sBAAS;IAO3C,YAA+B,YAA0B,EAAmB,YAA0B;QAClG,KAAK,EAAE,CAAC;QADmB,iBAAY,GAAZ,YAAY,CAAc;QAAmB,iBAAY,GAAZ,YAAY,CAAc;IAEtG,CAAC;IAOD,KAAK,CAAC,MAAM,CAAC,KAA4B;QACrC,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IASO,KAAK,CAAC,WAAW,CAAC,KAA4B;QAElD,IAAI,KAAK,CAAC,cAAc,CAAC,MAAM;YAAE,MAAM,IAAI,CAAC,YAAY,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACnF,CAAC;CACJ,CAAA;AA/BY,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;qCAQoC,4BAAY,EAAiC,4BAAY;GAP7F,gBAAgB,CA+B5B;AA/BY,4CAAgB"}
|
@@ -8,5 +8,5 @@ export * from './file.system.utility';
|
|
8
8
|
export * from './process.common.list';
|
9
9
|
export * from './process.common.mail';
|
10
10
|
export * from './process.date.filter';
|
11
|
-
export * from './process.
|
11
|
+
export * from './process.kaleyra.sms';
|
12
12
|
export * from './process.smtp.mail';
|
@@ -24,6 +24,6 @@ __exportStar(require("./file.system.utility"), exports);
|
|
24
24
|
__exportStar(require("./process.common.list"), exports);
|
25
25
|
__exportStar(require("./process.common.mail"), exports);
|
26
26
|
__exportStar(require("./process.date.filter"), exports);
|
27
|
-
__exportStar(require("./process.
|
27
|
+
__exportStar(require("./process.kaleyra.sms"), exports);
|
28
28
|
__exportStar(require("./process.smtp.mail"), exports);
|
29
29
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/libraries/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,iEAA+C;AAC/C,4DAA0C;AAC1C,yDAAuC;AACvC,4DAA0C;AAC1C,sDAAoC;AACpC,wDAAsC;AACtC,wDAAsC;AACtC,wDAAsC;AACtC,wDAAsC;AACtC,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/libraries/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,iEAA+C;AAC/C,4DAA0C;AAC1C,yDAAuC;AACvC,4DAA0C;AAC1C,sDAAoC;AACpC,wDAAsC;AACtC,wDAAsC;AACtC,wDAAsC;AACtC,wDAAsC;AACtC,wDAAsC;AACtC,sDAAoC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { SmsMessageEntity } from '../../system/entities/sms.message.entity';
|
2
|
+
import { PropertyService } from '../../system/services/property.service';
|
3
|
+
import { SmsPayloadDto } from '../dtos/sms.payload.dto';
|
4
|
+
import { RemoteRequestService } from '../services/remote.request.service';
|
5
|
+
export declare class ProcessKaleyraSms {
|
6
|
+
private readonly remoteRequestService;
|
7
|
+
private readonly propertyService;
|
8
|
+
constructor(remoteRequestService: RemoteRequestService, propertyService: PropertyService);
|
9
|
+
send(data: SmsPayloadDto): Promise<any>;
|
10
|
+
sendSms(message: SmsMessageEntity): Promise<SmsMessageEntity | "test-environment here">;
|
11
|
+
private trigger;
|
12
|
+
}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.ProcessKaleyraSms = void 0;
|
4
|
+
const config = require("config");
|
5
|
+
const qs = require("qs");
|
6
|
+
const common_1 = require("../../common");
|
7
|
+
const sms_template_entity_1 = require("../../system/entities/sms.template.entity");
|
8
|
+
class ProcessKaleyraSms {
|
9
|
+
constructor(remoteRequestService, propertyService) {
|
10
|
+
this.remoteRequestService = remoteRequestService;
|
11
|
+
this.propertyService = propertyService;
|
12
|
+
}
|
13
|
+
async send(data) {
|
14
|
+
if (!common_1.PlatformUtility.isProductionEnvironment())
|
15
|
+
return data;
|
16
|
+
return this.trigger(data);
|
17
|
+
}
|
18
|
+
async sendSms(message) {
|
19
|
+
if (!common_1.PlatformUtility.isProductionEnvironment())
|
20
|
+
return 'test-environment here';
|
21
|
+
const template = await sms_template_entity_1.SmsTemplateEntity.first(message.template_id);
|
22
|
+
template.message = message.content;
|
23
|
+
const payload = { mobile: message.mobile, template, content: message.content };
|
24
|
+
const identifier = await this.trigger(payload);
|
25
|
+
message.identifier = identifier;
|
26
|
+
return message.save();
|
27
|
+
}
|
28
|
+
async trigger(data) {
|
29
|
+
const key = await this.propertyService.get('kaleyra.api.key', false);
|
30
|
+
const sid = await this.propertyService.get('kaleyra.api.sid', false);
|
31
|
+
if (!(key && sid))
|
32
|
+
throw new common_1.OperationException(`kaleyra api keys are not setup properly`);
|
33
|
+
const apiUrl = config.get('server.api_url');
|
34
|
+
const payload = {
|
35
|
+
api_key: key,
|
36
|
+
method: 'sms',
|
37
|
+
message: data.content,
|
38
|
+
to: `+91${data.mobile}`,
|
39
|
+
sender: data.template.sender,
|
40
|
+
entity_id: data.template.entity_identifier,
|
41
|
+
template_id: data.template.template_identifier,
|
42
|
+
callback: `${apiUrl}/capture-kaleyra-webhook`,
|
43
|
+
};
|
44
|
+
const options = {
|
45
|
+
method: 'POST',
|
46
|
+
url: `https://api.in.kaleyra.io/v1/${sid}/messages`,
|
47
|
+
params: payload,
|
48
|
+
headers: {
|
49
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
50
|
+
'api-key': key,
|
51
|
+
},
|
52
|
+
data: qs.stringify(payload),
|
53
|
+
};
|
54
|
+
const response = await this.remoteRequestService.sendThroughAxios(options);
|
55
|
+
return response.data[0].message_id;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
exports.ProcessKaleyraSms = ProcessKaleyraSms;
|
59
|
+
//# sourceMappingURL=process.kaleyra.sms.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"process.kaleyra.sms.js","sourceRoot":"","sources":["../../../src/platformUtility/libraries/process.kaleyra.sms.ts"],"names":[],"mappings":";;;AAAA,iCAAiC;AACjC,yBAAyB;AACzB,yCAAmE;AAEnE,mFAA8E;AAU9E,MAAa,iBAAiB;IAM1B,YAA6B,oBAA0C,EAAmB,eAAgC;QAA7F,yBAAoB,GAApB,oBAAoB,CAAsB;QAAmB,oBAAe,GAAf,eAAe,CAAiB;IAAG,CAAC;IAQ9H,KAAK,CAAC,IAAI,CAAC,IAAmB;QAC1B,IAAI,CAAC,wBAAe,CAAC,uBAAuB,EAAE;YAAE,OAAO,IAAI,CAAC;QAE5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAA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iBAAiB;YAC1C,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,mBAAmB;YAC9C,QAAQ,EAAE,GAAG,MAAM,0BAA0B;SAChD,CAAC;QAEF,MAAM,OAAO,GAAQ;YACjB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,gCAAgC,GAAG,WAAW;YACnD,MAAM,EAAE,OAAO;YACf,OAAO,EAAE;gBACL,cAAc,EAAE,mCAAmC;gBACnD,SAAS,EAAE,GAAG;aACjB;YACD,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC;SAC9B,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAC3E,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;IACvC,CAAC;CACJ;AA/ED,8CA+EC"}
|
@@ -8,6 +8,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
9
9
|
exports.PlatformUtilityModule = void 0;
|
10
10
|
const bull_1 = require("@nestjs/bull");
|
11
|
+
const cache_manager_1 = require("@nestjs/cache-manager");
|
11
12
|
const common_1 = require("@nestjs/common");
|
12
13
|
const config = require("config");
|
13
14
|
const auth_module_1 = require("../auth/auth.module");
|
@@ -19,7 +20,7 @@ let PlatformUtilityModule = class PlatformUtilityModule {
|
|
19
20
|
};
|
20
21
|
PlatformUtilityModule = __decorate([
|
21
22
|
(0, common_1.Module)({
|
22
|
-
imports: [bull_1.BullModule.registerQueue({ name }),
|
23
|
+
imports: [bull_1.BullModule.registerQueue({ name }), cache_manager_1.CacheModule.register(cacheConfig), (0, common_1.forwardRef)(() => auth_module_1.AuthModule), (0, common_1.forwardRef)(() => system_module_1.SystemModule)],
|
23
24
|
providers: [...es6_classes_1.default.services, ...es6_classes_1.default.consumers, ...es6_classes_1.default.subscribers, ...es6_classes_1.default.commands, ...es6_classes_1.default.jobs],
|
24
25
|
controllers: es6_classes_1.default.controllers,
|
25
26
|
exports: [...es6_classes_1.default.services, ...es6_classes_1.default.jobs],
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"platform.utility.module.js","sourceRoot":"","sources":["../../src/platformUtility/platform.utility.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uCAA0C;AAC1C,
|
1
|
+
{"version":3,"file":"platform.utility.module.js","sourceRoot":"","sources":["../../src/platformUtility/platform.utility.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uCAA0C;AAC1C,yDAAoD;AACpD,2CAAoD;AACpD,iCAAiC;AACjC,qDAAiD;AACjD,2DAAuD;AACvD,+CAAuC;AACvC,sDAAuD;AAEvD,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;AAQzD,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;CAAG,CAAA;AAAxB,qBAAqB;IANjC,IAAA,eAAM,EAAC;QACJ,OAAO,EAAE,CAAC,iBAAU,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,2BAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC,EAAE,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,4BAAY,CAAC,CAAC;QAC9I,SAAS,EAAE,CAAC,GAAG,qBAAU,CAAC,QAAQ,EAAE,GAAG,qBAAU,CAAC,SAAS,EAAE,GAAG,qBAAU,CAAC,WAAW,EAAE,GAAG,qBAAU,CAAC,QAAQ,EAAE,GAAG,qBAAU,CAAC,IAAI,CAAC;QACnI,WAAW,EAAE,qBAAU,CAAC,WAAW;QACnC,OAAO,EAAE,CAAC,GAAG,qBAAU,CAAC,QAAQ,EAAE,GAAG,qBAAU,CAAC,IAAI,CAAC;KACxD,CAAC;GACW,qBAAqB,CAAG;AAAxB,sDAAqB"}
|
@@ -1,6 +1,6 @@
|
|
1
|
+
import { DatabaseEventDto } from '../../common/dtos/database.event.dto';
|
1
2
|
import { ModelEntity } from './../../system/entities/model.entity';
|
2
3
|
import { DynamoService } from './dynamo.service';
|
3
|
-
import { DatabaseEventDto } from '../../common/dtos/database.event.dto';
|
4
4
|
export declare class AuditService {
|
5
5
|
private readonly dynamoService;
|
6
6
|
private toIgnore;
|
@@ -10,17 +10,17 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
10
10
|
};
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
12
|
exports.AuditService = void 0;
|
13
|
-
const operation_exception_1 = require("./../../common/exceptions/operation.exception");
|
14
13
|
const common_1 = require("@nestjs/common");
|
15
|
-
const
|
14
|
+
const config = require("config");
|
15
|
+
const hash_1 = require("../../common/libraries/hash");
|
16
16
|
const platform_utility_1 = require("../../common/libraries/platform.utility");
|
17
17
|
const creator_entity_1 = require("./../../auth/entities/creator.entity");
|
18
|
+
const operation_exception_1 = require("./../../common/exceptions/operation.exception");
|
18
19
|
const dynamo_service_1 = require("./dynamo.service");
|
19
|
-
const config = require("config");
|
20
20
|
let AuditService = class AuditService {
|
21
21
|
constructor(dynamoService) {
|
22
22
|
this.dynamoService = dynamoService;
|
23
|
-
this.toIgnore = ['created_at', 'updated_at', 'created_by', 'updated_by'];
|
23
|
+
this.toIgnore = ['created_at', 'updated_at', 'created_by', 'updated_by', 'attributes'];
|
24
24
|
this.auditTable = null;
|
25
25
|
this.init();
|
26
26
|
}
|
@@ -28,10 +28,11 @@ let AuditService = class AuditService {
|
|
28
28
|
if (!this.auditTable)
|
29
29
|
return;
|
30
30
|
const promises = [];
|
31
|
+
const source = hash_1.Hash.hashMD5(`${event.metadata.tableName}:${event.metadata.name}`);
|
31
32
|
event.updatedColumns.forEach((column) => {
|
32
33
|
if (this.toIgnore.indexOf(column) !== -1)
|
33
34
|
return;
|
34
|
-
const identifier = `${
|
35
|
+
const identifier = `${source}-${event.entity.id}`;
|
35
36
|
const timestamp = Date.now() * 1000 + platform_utility_1.PlatformUtility.generateRandomNumber(3);
|
36
37
|
const item = {
|
37
38
|
identifier,
|
@@ -40,6 +41,7 @@ let AuditService = class AuditService {
|
|
40
41
|
old_value: event.databaseEntity[column],
|
41
42
|
new_value: event.entity[column],
|
42
43
|
user: event.user?.id ?? 2,
|
44
|
+
ip: event.user?.req?.ip || null,
|
43
45
|
};
|
44
46
|
promises.push(this.dynamoService.setItem(this.auditTable, item));
|
45
47
|
});
|
@@ -59,11 +61,11 @@ let AuditService = class AuditService {
|
|
59
61
|
}
|
60
62
|
async addUserRecord(item) {
|
61
63
|
item.user = item.user === 2 ? null : await creator_entity_1.CreatorEntity.findOne({ where: { id: item.user } });
|
62
|
-
item.timestamp = new Date(
|
64
|
+
item.timestamp = new Date(Math.floor(item.timestamp / 1000));
|
63
65
|
delete item.identifier;
|
64
66
|
return item;
|
65
67
|
}
|
66
|
-
async getDataFromDynamo(
|
68
|
+
async getDataFromDynamo(sourceHash, id) {
|
67
69
|
if (!this.auditTable)
|
68
70
|
throw new operation_exception_1.OperationException('Audit table is not properly setup in configuration');
|
69
71
|
const params = {
|
@@ -74,7 +76,7 @@ let AuditService = class AuditService {
|
|
74
76
|
'#sort': 'timestamp',
|
75
77
|
},
|
76
78
|
ExpressionAttributeValues: {
|
77
|
-
':identifier': `${
|
79
|
+
':identifier': `${sourceHash}-${id}`,
|
78
80
|
':value': 0,
|
79
81
|
},
|
80
82
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"audit.service.js","sourceRoot":"","sources":["../../../src/platformUtility/services/audit.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"audit.service.js","sourceRoot":"","sources":["../../../src/platformUtility/services/audit.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,iCAAiC;AAEjC,sDAAmD;AACnD,8EAA0E;AAC1E,yE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;IAChB,CAAC;IAUO,KAAK,CAAC,iBAAiB,CAAC,UAAkB,EAAE,EAAU;QAE1D,IAAI,CAAC,IAAI,CAAC,UAAU;YAAE,MAAM,IAAI,wCAAkB,CAAC,oDAAoD,CAAC,CAAC;QAEzG,MAAM,MAAM,GAAG;YACX,SAAS,EAAE,IAAI,CAAC,UAAU;YAC1B,sBAAsB,EAAE,uCAAuC;YAC/D,wBAAwB,EAAE;gBACtB,MAAM,EAAE,YAAY;gBACpB,OAAO,EAAE,WAAW;aACvB;YACD,yBAAyB,EAAE;gBACvB,aAAa,EAAE,GAAG,UAAU,IAAI,EAAE,EAAE;gBACpC,QAAQ,EAAE,CAAC;aACd;SACJ,CAAC;QAEF,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAChD,CAAC;IAOO,IAAI;QACR,IAAI,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC;YAAE,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC/E,CAAC;CACJ,CAAA;AAjJY,YAAY;IADxB,IAAA,mBAAU,GAAE;qCAqBmC,8BAAa;GApBhD,YAAY,CAiJxB;AAjJY,oCAAY"}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { Cache } from 'cache-manager';
|
2
2
|
export declare class CacheService {
|
3
|
-
private
|
3
|
+
private cacheManager;
|
4
4
|
constructor(cacheManager: Cache);
|
5
5
|
set(key: string, value: any, expiresAt?: Date): Promise<any>;
|
6
|
-
get(key: string, defaultValue?:
|
6
|
+
get(key: string, defaultValue?: any): Promise<any>;
|
7
7
|
delete(key: string): Promise<void>;
|
8
8
|
}
|