grm-shared-library 1.1.65 → 1.1.67
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/cjs/modules/sms/constants/sms-templates.config.js +57 -0
- package/dist/cjs/modules/sms/constants/sms-templates.config.js.map +1 -0
- package/dist/cjs/modules/sms/enums/sms-template.enum.js +15 -0
- package/dist/cjs/modules/sms/enums/sms-template.enum.js.map +1 -0
- package/dist/cjs/modules/sms/index.js +3 -0
- package/dist/cjs/modules/sms/index.js.map +1 -1
- package/dist/cjs/modules/sms/interfaces/sms-template.interface.js +3 -0
- package/dist/cjs/modules/sms/interfaces/sms-template.interface.js.map +1 -0
- package/dist/cjs/modules/user/dtos/create-mobile-user.dto.js +37 -0
- package/dist/cjs/modules/user/dtos/create-mobile-user.dto.js.map +1 -0
- package/dist/cjs/modules/user/index.js +1 -0
- package/dist/cjs/modules/user/index.js.map +1 -1
- package/dist/esm/modules/sms/constants/sms-templates.config.js +54 -0
- package/dist/esm/modules/sms/constants/sms-templates.config.js.map +1 -0
- package/dist/esm/modules/sms/enums/sms-template.enum.js +12 -0
- package/dist/esm/modules/sms/enums/sms-template.enum.js.map +1 -0
- package/dist/esm/modules/sms/index.js +3 -0
- package/dist/esm/modules/sms/index.js.map +1 -1
- package/dist/esm/modules/sms/interfaces/sms-template.interface.js +2 -0
- package/dist/esm/modules/sms/interfaces/sms-template.interface.js.map +1 -0
- package/dist/esm/modules/user/dtos/create-mobile-user.dto.js +33 -0
- package/dist/esm/modules/user/dtos/create-mobile-user.dto.js.map +1 -0
- package/dist/esm/modules/user/index.js +1 -0
- package/dist/esm/modules/user/index.js.map +1 -1
- package/dist/types/modules/sms/constants/sms-templates.config.d.ts +2 -0
- package/dist/types/modules/sms/enums/sms-template.enum.d.ts +10 -0
- package/dist/types/modules/sms/index.d.ts +3 -0
- package/dist/types/modules/sms/interfaces/sms-template.interface.d.ts +12 -0
- package/dist/types/modules/user/dtos/create-mobile-user.dto.d.ts +6 -0
- package/dist/types/modules/user/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SMS_TEMPLATES = void 0;
|
|
4
|
+
const sms_template_enum_1 = require("../enums/sms-template.enum");
|
|
5
|
+
exports.SMS_TEMPLATES = {
|
|
6
|
+
templates: {
|
|
7
|
+
[sms_template_enum_1.SmsTemplateType.OTP_VERIFICATION]: {
|
|
8
|
+
name: 'OTP Verification',
|
|
9
|
+
content: 'Your verification code is {{OTP}}. Use this code to complete your account verification. Code expires in {{EXPIRY_MINUTES}} minutes.',
|
|
10
|
+
variables: ['OTP', 'EXPIRY_MINUTES'],
|
|
11
|
+
description: 'Template for sending OTP verification codes'
|
|
12
|
+
},
|
|
13
|
+
[sms_template_enum_1.SmsTemplateType.PASSWORD_RESET]: {
|
|
14
|
+
name: 'Password Reset',
|
|
15
|
+
content: 'Your password reset code is {{OTP}}. Use this code to reset your password. Code expires in {{EXPIRY_MINUTES}} minutes. If you did not request this, please ignore.',
|
|
16
|
+
variables: ['OTP', 'EXPIRY_MINUTES'],
|
|
17
|
+
description: 'Template for password reset verification codes'
|
|
18
|
+
},
|
|
19
|
+
[sms_template_enum_1.SmsTemplateType.WELCOME]: {
|
|
20
|
+
name: 'Welcome Message',
|
|
21
|
+
content: 'Welcome to {{ORGANIZATION_NAME}}, {{NAME}}! Your account has been successfully created. Start exploring our platform today.',
|
|
22
|
+
variables: ['ORGANIZATION_NAME', 'NAME'],
|
|
23
|
+
description: 'Welcome message for new users'
|
|
24
|
+
},
|
|
25
|
+
[sms_template_enum_1.SmsTemplateType.ACCOUNT_ACTIVATION]: {
|
|
26
|
+
name: 'Account Activation',
|
|
27
|
+
content: 'Hi {{NAME}}, your account activation code is {{OTP}}. Use this code to activate your account. Code expires in {{EXPIRY_MINUTES}} minutes.',
|
|
28
|
+
variables: ['NAME', 'OTP', 'EXPIRY_MINUTES'],
|
|
29
|
+
description: 'Template for account activation codes'
|
|
30
|
+
},
|
|
31
|
+
[sms_template_enum_1.SmsTemplateType.SECURITY_ALERT]: {
|
|
32
|
+
name: 'Security Alert',
|
|
33
|
+
content: 'Security Alert: {{ALERT_MESSAGE}}. If this was not you, please contact support immediately. Time: {{TIMESTAMP}}',
|
|
34
|
+
variables: ['ALERT_MESSAGE', 'TIMESTAMP'],
|
|
35
|
+
description: 'Template for security alerts and notifications'
|
|
36
|
+
},
|
|
37
|
+
[sms_template_enum_1.SmsTemplateType.INCIDENT_NOTIFICATION]: {
|
|
38
|
+
name: 'Incident Notification',
|
|
39
|
+
content: 'Incident Alert: {{INCIDENT_TITLE}}. Priority: {{PRIORITY}}. Please check your dashboard for details. Ref: {{INCIDENT_ID}}',
|
|
40
|
+
variables: ['INCIDENT_TITLE', 'PRIORITY', 'INCIDENT_ID'],
|
|
41
|
+
description: 'Template for incident notifications'
|
|
42
|
+
},
|
|
43
|
+
[sms_template_enum_1.SmsTemplateType.APPOINTMENT_REMINDER]: {
|
|
44
|
+
name: 'Appointment Reminder',
|
|
45
|
+
content: 'Reminder: You have an appointment on {{DATE}} at {{TIME}} for {{PURPOSE}}. Location: {{LOCATION}}. Contact us if you need to reschedule.',
|
|
46
|
+
variables: ['DATE', 'TIME', 'PURPOSE', 'LOCATION'],
|
|
47
|
+
description: 'Template for appointment reminders'
|
|
48
|
+
},
|
|
49
|
+
[sms_template_enum_1.SmsTemplateType.GENERAL_NOTIFICATION]: {
|
|
50
|
+
name: 'General Notification',
|
|
51
|
+
content: '{{MESSAGE}}',
|
|
52
|
+
variables: ['MESSAGE'],
|
|
53
|
+
description: 'General purpose notification template'
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=sms-templates.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sms-templates.config.js","sourceRoot":"","sources":["../../../../../src/modules/sms/constants/sms-templates.config.ts"],"names":[],"mappings":";;;AACA,kEAA6D;AAEhD,QAAA,aAAa,GAAsB;IAC5C,SAAS,EAAE;QACP,CAAC,mCAAe,CAAC,gBAAgB,CAAC,EAAE;YAChC,IAAI,EAAE,kBAAkB;YACxB,OAAO,EAAE,qIAAqI;YAC9I,SAAS,EAAE,CAAC,KAAK,EAAE,gBAAgB,CAAC;YACpC,WAAW,EAAE,6CAA6C;SAC7D;QACD,CAAC,mCAAe,CAAC,cAAc,CAAC,EAAE;YAC9B,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,oKAAoK;YAC7K,SAAS,EAAE,CAAC,KAAK,EAAE,gBAAgB,CAAC;YACpC,WAAW,EAAE,gDAAgD;SAChE;QACD,CAAC,mCAAe,CAAC,OAAO,CAAC,EAAE;YACvB,IAAI,EAAE,iBAAiB;YACvB,OAAO,EAAE,6HAA6H;YACtI,SAAS,EAAE,CAAC,mBAAmB,EAAE,MAAM,CAAC;YACxC,WAAW,EAAE,+BAA+B;SAC/C;QACD,CAAC,mCAAe,CAAC,kBAAkB,CAAC,EAAE;YAClC,IAAI,EAAE,oBAAoB;YAC1B,OAAO,EAAE,2IAA2I;YACpJ,SAAS,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,gBAAgB,CAAC;YAC5C,WAAW,EAAE,uCAAuC;SACvD;QACD,CAAC,mCAAe,CAAC,cAAc,CAAC,EAAE;YAC9B,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,iHAAiH;YAC1H,SAAS,EAAE,CAAC,eAAe,EAAE,WAAW,CAAC;YACzC,WAAW,EAAE,gDAAgD;SAChE;QACD,CAAC,mCAAe,CAAC,qBAAqB,CAAC,EAAE;YACrC,IAAI,EAAE,uBAAuB;YAC7B,OAAO,EAAE,2HAA2H;YACpI,SAAS,EAAE,CAAC,gBAAgB,EAAE,UAAU,EAAE,aAAa,CAAC;YACxD,WAAW,EAAE,qCAAqC;SACrD;QACD,CAAC,mCAAe,CAAC,oBAAoB,CAAC,EAAE;YACpC,IAAI,EAAE,sBAAsB;YAC5B,OAAO,EAAE,0IAA0I;YACnJ,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,CAAC;YAClD,WAAW,EAAE,oCAAoC;SACpD;QACD,CAAC,mCAAe,CAAC,oBAAoB,CAAC,EAAE;YACpC,IAAI,EAAE,sBAAsB;YAC5B,OAAO,EAAE,aAAa;YACtB,SAAS,EAAE,CAAC,SAAS,CAAC;YACtB,WAAW,EAAE,uCAAuC;SACvD;KACJ;CACJ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SmsTemplateType = void 0;
|
|
4
|
+
var SmsTemplateType;
|
|
5
|
+
(function (SmsTemplateType) {
|
|
6
|
+
SmsTemplateType["OTP_VERIFICATION"] = "otp_verification";
|
|
7
|
+
SmsTemplateType["PASSWORD_RESET"] = "password_reset";
|
|
8
|
+
SmsTemplateType["WELCOME"] = "welcome";
|
|
9
|
+
SmsTemplateType["ACCOUNT_ACTIVATION"] = "account_activation";
|
|
10
|
+
SmsTemplateType["SECURITY_ALERT"] = "security_alert";
|
|
11
|
+
SmsTemplateType["INCIDENT_NOTIFICATION"] = "incident_notification";
|
|
12
|
+
SmsTemplateType["APPOINTMENT_REMINDER"] = "appointment_reminder";
|
|
13
|
+
SmsTemplateType["GENERAL_NOTIFICATION"] = "general_notification";
|
|
14
|
+
})(SmsTemplateType || (exports.SmsTemplateType = SmsTemplateType = {}));
|
|
15
|
+
//# sourceMappingURL=sms-template.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sms-template.enum.js","sourceRoot":"","sources":["../../../../../src/modules/sms/enums/sms-template.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,eASX;AATD,WAAY,eAAe;IACvB,wDAAqC,CAAA;IACrC,oDAAiC,CAAA;IACjC,sCAAmB,CAAA;IACnB,4DAAyC,CAAA;IACzC,oDAAiC,CAAA;IACjC,kEAA+C,CAAA;IAC/C,gEAA6C,CAAA;IAC7C,gEAA6C,CAAA;AACjD,CAAC,EATW,eAAe,+BAAf,eAAe,QAS1B"}
|
|
@@ -18,10 +18,13 @@ __exportStar(require("./interfaces/sms-request"), exports);
|
|
|
18
18
|
__exportStar(require("./interfaces/sms-response"), exports);
|
|
19
19
|
__exportStar(require("./interfaces/sms-notification"), exports);
|
|
20
20
|
__exportStar(require("./interfaces/sms-options"), exports);
|
|
21
|
+
__exportStar(require("./interfaces/sms-template.interface"), exports);
|
|
21
22
|
__exportStar(require("./dtos/create-uwazii-sms.dto"), exports);
|
|
22
23
|
__exportStar(require("./dtos/create-sms-notification.dto"), exports);
|
|
23
24
|
__exportStar(require("./dtos/update-sms-notification.dto"), exports);
|
|
24
25
|
__exportStar(require("./dtos/create-sms-options.dto"), exports);
|
|
25
26
|
__exportStar(require("./dtos/create-uwazii-sms-with-options.dto"), exports);
|
|
26
27
|
__exportStar(require("./enums/sms-notification-status.enum"), exports);
|
|
28
|
+
__exportStar(require("./enums/sms-template.enum"), exports);
|
|
29
|
+
__exportStar(require("./constants/sms-templates.config"), exports);
|
|
27
30
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/sms/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,4DAA0C;AAC1C,gEAA8C;AAC9C,2DAAyC;AACzC,+DAA6C;AAC7C,qEAAmD;AACnD,qEAAmD;AACnD,gEAA8C;AAC9C,4EAA0D;AAC1D,uEAAqD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/sms/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,4DAA0C;AAC1C,gEAA8C;AAC9C,2DAAyC;AACzC,sEAAoD;AACpD,+DAA6C;AAC7C,qEAAmD;AACnD,qEAAmD;AACnD,gEAA8C;AAC9C,4EAA0D;AAC1D,uEAAqD;AACrD,4DAA0C;AAC1C,mEAAiD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sms-template.interface.js","sourceRoot":"","sources":["../../../../../src/modules/sms/interfaces/sms-template.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,37 @@
|
|
|
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.CreateMobileUserDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class CreateMobileUserDto {
|
|
15
|
+
}
|
|
16
|
+
exports.CreateMobileUserDto = CreateMobileUserDto;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsString)(),
|
|
19
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], CreateMobileUserDto.prototype, "name", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsEmail)(),
|
|
24
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], CreateMobileUserDto.prototype, "email", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsString)(),
|
|
29
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], CreateMobileUserDto.prototype, "phoneNumber", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsNumber)(),
|
|
34
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], CreateMobileUserDto.prototype, "organizationId", void 0);
|
|
37
|
+
//# sourceMappingURL=create-mobile-user.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-mobile-user.dto.js","sourceRoot":"","sources":["../../../../../src/modules/user/dtos/create-mobile-user.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA0E;AAE1E,MAAa,mBAAmB;CAgB/B;AAhBD,kDAgBC;AAbG;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;iDACC;AAId;IAFC,IAAA,yBAAO,GAAE;IACT,IAAA,4BAAU,GAAE;;kDACE;AAIf;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;wDACQ;AAIrB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;2DACW"}
|
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./dtos/create-user.dto"), exports);
|
|
18
18
|
__exportStar(require("./dtos/update-user.dto"), exports);
|
|
19
|
+
__exportStar(require("./dtos/create-mobile-user.dto"), exports);
|
|
19
20
|
__exportStar(require("./enums/user-status.enum"), exports);
|
|
20
21
|
__exportStar(require("./interfaces/user"), exports);
|
|
21
22
|
__exportStar(require("./interfaces/user-context"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/user/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,yDAAuC;AACvC,2DAAyC;AACzC,oDAAkC;AAClC,4DAA0C;AAC1C,4DAA0C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/user/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,yDAAuC;AACvC,gEAA8C;AAC9C,2DAAyC;AACzC,oDAAkC;AAClC,4DAA0C;AAC1C,4DAA0C"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { SmsTemplateType } from '../enums/sms-template.enum';
|
|
2
|
+
export const SMS_TEMPLATES = {
|
|
3
|
+
templates: {
|
|
4
|
+
[SmsTemplateType.OTP_VERIFICATION]: {
|
|
5
|
+
name: 'OTP Verification',
|
|
6
|
+
content: 'Your verification code is {{OTP}}. Use this code to complete your account verification. Code expires in {{EXPIRY_MINUTES}} minutes.',
|
|
7
|
+
variables: ['OTP', 'EXPIRY_MINUTES'],
|
|
8
|
+
description: 'Template for sending OTP verification codes'
|
|
9
|
+
},
|
|
10
|
+
[SmsTemplateType.PASSWORD_RESET]: {
|
|
11
|
+
name: 'Password Reset',
|
|
12
|
+
content: 'Your password reset code is {{OTP}}. Use this code to reset your password. Code expires in {{EXPIRY_MINUTES}} minutes. If you did not request this, please ignore.',
|
|
13
|
+
variables: ['OTP', 'EXPIRY_MINUTES'],
|
|
14
|
+
description: 'Template for password reset verification codes'
|
|
15
|
+
},
|
|
16
|
+
[SmsTemplateType.WELCOME]: {
|
|
17
|
+
name: 'Welcome Message',
|
|
18
|
+
content: 'Welcome to {{ORGANIZATION_NAME}}, {{NAME}}! Your account has been successfully created. Start exploring our platform today.',
|
|
19
|
+
variables: ['ORGANIZATION_NAME', 'NAME'],
|
|
20
|
+
description: 'Welcome message for new users'
|
|
21
|
+
},
|
|
22
|
+
[SmsTemplateType.ACCOUNT_ACTIVATION]: {
|
|
23
|
+
name: 'Account Activation',
|
|
24
|
+
content: 'Hi {{NAME}}, your account activation code is {{OTP}}. Use this code to activate your account. Code expires in {{EXPIRY_MINUTES}} minutes.',
|
|
25
|
+
variables: ['NAME', 'OTP', 'EXPIRY_MINUTES'],
|
|
26
|
+
description: 'Template for account activation codes'
|
|
27
|
+
},
|
|
28
|
+
[SmsTemplateType.SECURITY_ALERT]: {
|
|
29
|
+
name: 'Security Alert',
|
|
30
|
+
content: 'Security Alert: {{ALERT_MESSAGE}}. If this was not you, please contact support immediately. Time: {{TIMESTAMP}}',
|
|
31
|
+
variables: ['ALERT_MESSAGE', 'TIMESTAMP'],
|
|
32
|
+
description: 'Template for security alerts and notifications'
|
|
33
|
+
},
|
|
34
|
+
[SmsTemplateType.INCIDENT_NOTIFICATION]: {
|
|
35
|
+
name: 'Incident Notification',
|
|
36
|
+
content: 'Incident Alert: {{INCIDENT_TITLE}}. Priority: {{PRIORITY}}. Please check your dashboard for details. Ref: {{INCIDENT_ID}}',
|
|
37
|
+
variables: ['INCIDENT_TITLE', 'PRIORITY', 'INCIDENT_ID'],
|
|
38
|
+
description: 'Template for incident notifications'
|
|
39
|
+
},
|
|
40
|
+
[SmsTemplateType.APPOINTMENT_REMINDER]: {
|
|
41
|
+
name: 'Appointment Reminder',
|
|
42
|
+
content: 'Reminder: You have an appointment on {{DATE}} at {{TIME}} for {{PURPOSE}}. Location: {{LOCATION}}. Contact us if you need to reschedule.',
|
|
43
|
+
variables: ['DATE', 'TIME', 'PURPOSE', 'LOCATION'],
|
|
44
|
+
description: 'Template for appointment reminders'
|
|
45
|
+
},
|
|
46
|
+
[SmsTemplateType.GENERAL_NOTIFICATION]: {
|
|
47
|
+
name: 'General Notification',
|
|
48
|
+
content: '{{MESSAGE}}',
|
|
49
|
+
variables: ['MESSAGE'],
|
|
50
|
+
description: 'General purpose notification template'
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=sms-templates.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sms-templates.config.js","sourceRoot":"","sources":["../../../../../src/modules/sms/constants/sms-templates.config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,MAAM,CAAC,MAAM,aAAa,GAAsB;IAC5C,SAAS,EAAE;QACP,CAAC,eAAe,CAAC,gBAAgB,CAAC,EAAE;YAChC,IAAI,EAAE,kBAAkB;YACxB,OAAO,EAAE,qIAAqI;YAC9I,SAAS,EAAE,CAAC,KAAK,EAAE,gBAAgB,CAAC;YACpC,WAAW,EAAE,6CAA6C;SAC7D;QACD,CAAC,eAAe,CAAC,cAAc,CAAC,EAAE;YAC9B,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,oKAAoK;YAC7K,SAAS,EAAE,CAAC,KAAK,EAAE,gBAAgB,CAAC;YACpC,WAAW,EAAE,gDAAgD;SAChE;QACD,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE;YACvB,IAAI,EAAE,iBAAiB;YACvB,OAAO,EAAE,6HAA6H;YACtI,SAAS,EAAE,CAAC,mBAAmB,EAAE,MAAM,CAAC;YACxC,WAAW,EAAE,+BAA+B;SAC/C;QACD,CAAC,eAAe,CAAC,kBAAkB,CAAC,EAAE;YAClC,IAAI,EAAE,oBAAoB;YAC1B,OAAO,EAAE,2IAA2I;YACpJ,SAAS,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,gBAAgB,CAAC;YAC5C,WAAW,EAAE,uCAAuC;SACvD;QACD,CAAC,eAAe,CAAC,cAAc,CAAC,EAAE;YAC9B,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,iHAAiH;YAC1H,SAAS,EAAE,CAAC,eAAe,EAAE,WAAW,CAAC;YACzC,WAAW,EAAE,gDAAgD;SAChE;QACD,CAAC,eAAe,CAAC,qBAAqB,CAAC,EAAE;YACrC,IAAI,EAAE,uBAAuB;YAC7B,OAAO,EAAE,2HAA2H;YACpI,SAAS,EAAE,CAAC,gBAAgB,EAAE,UAAU,EAAE,aAAa,CAAC;YACxD,WAAW,EAAE,qCAAqC;SACrD;QACD,CAAC,eAAe,CAAC,oBAAoB,CAAC,EAAE;YACpC,IAAI,EAAE,sBAAsB;YAC5B,OAAO,EAAE,0IAA0I;YACnJ,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,CAAC;YAClD,WAAW,EAAE,oCAAoC;SACpD;QACD,CAAC,eAAe,CAAC,oBAAoB,CAAC,EAAE;YACpC,IAAI,EAAE,sBAAsB;YAC5B,OAAO,EAAE,aAAa;YACtB,SAAS,EAAE,CAAC,SAAS,CAAC;YACtB,WAAW,EAAE,uCAAuC;SACvD;KACJ;CACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export var SmsTemplateType;
|
|
2
|
+
(function (SmsTemplateType) {
|
|
3
|
+
SmsTemplateType["OTP_VERIFICATION"] = "otp_verification";
|
|
4
|
+
SmsTemplateType["PASSWORD_RESET"] = "password_reset";
|
|
5
|
+
SmsTemplateType["WELCOME"] = "welcome";
|
|
6
|
+
SmsTemplateType["ACCOUNT_ACTIVATION"] = "account_activation";
|
|
7
|
+
SmsTemplateType["SECURITY_ALERT"] = "security_alert";
|
|
8
|
+
SmsTemplateType["INCIDENT_NOTIFICATION"] = "incident_notification";
|
|
9
|
+
SmsTemplateType["APPOINTMENT_REMINDER"] = "appointment_reminder";
|
|
10
|
+
SmsTemplateType["GENERAL_NOTIFICATION"] = "general_notification";
|
|
11
|
+
})(SmsTemplateType || (SmsTemplateType = {}));
|
|
12
|
+
//# sourceMappingURL=sms-template.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sms-template.enum.js","sourceRoot":"","sources":["../../../../../src/modules/sms/enums/sms-template.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,eASX;AATD,WAAY,eAAe;IACvB,wDAAqC,CAAA;IACrC,oDAAiC,CAAA;IACjC,sCAAmB,CAAA;IACnB,4DAAyC,CAAA;IACzC,oDAAiC,CAAA;IACjC,kEAA+C,CAAA;IAC/C,gEAA6C,CAAA;IAC7C,gEAA6C,CAAA;AACjD,CAAC,EATW,eAAe,KAAf,eAAe,QAS1B"}
|
|
@@ -2,10 +2,13 @@ export * from './interfaces/sms-request';
|
|
|
2
2
|
export * from './interfaces/sms-response';
|
|
3
3
|
export * from './interfaces/sms-notification';
|
|
4
4
|
export * from './interfaces/sms-options';
|
|
5
|
+
export * from './interfaces/sms-template.interface';
|
|
5
6
|
export * from './dtos/create-uwazii-sms.dto';
|
|
6
7
|
export * from './dtos/create-sms-notification.dto';
|
|
7
8
|
export * from './dtos/update-sms-notification.dto';
|
|
8
9
|
export * from './dtos/create-sms-options.dto';
|
|
9
10
|
export * from './dtos/create-uwazii-sms-with-options.dto';
|
|
10
11
|
export * from './enums/sms-notification-status.enum';
|
|
12
|
+
export * from './enums/sms-template.enum';
|
|
13
|
+
export * from './constants/sms-templates.config';
|
|
11
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/sms/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,sCAAsC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/sms/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,sCAAsC,CAAC;AACrD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kCAAkC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sms-template.interface.js","sourceRoot":"","sources":["../../../../../src/modules/sms/interfaces/sms-template.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { IsEmail, IsNotEmpty, IsNumber, IsString } from "class-validator";
|
|
11
|
+
export class CreateMobileUserDto {
|
|
12
|
+
}
|
|
13
|
+
__decorate([
|
|
14
|
+
IsString(),
|
|
15
|
+
IsNotEmpty(),
|
|
16
|
+
__metadata("design:type", String)
|
|
17
|
+
], CreateMobileUserDto.prototype, "name", void 0);
|
|
18
|
+
__decorate([
|
|
19
|
+
IsEmail(),
|
|
20
|
+
IsNotEmpty(),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], CreateMobileUserDto.prototype, "email", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
IsString(),
|
|
25
|
+
IsNotEmpty(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], CreateMobileUserDto.prototype, "phoneNumber", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
IsNumber(),
|
|
30
|
+
IsNotEmpty(),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], CreateMobileUserDto.prototype, "organizationId", void 0);
|
|
33
|
+
//# sourceMappingURL=create-mobile-user.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-mobile-user.dto.js","sourceRoot":"","sources":["../../../../../src/modules/user/dtos/create-mobile-user.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE1E,MAAM,OAAO,mBAAmB;CAgB/B;AAbG;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;iDACC;AAId;IAFC,OAAO,EAAE;IACT,UAAU,EAAE;;kDACE;AAIf;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;wDACQ;AAIrB;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;2DACW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/user/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/user/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare enum SmsTemplateType {
|
|
2
|
+
OTP_VERIFICATION = "otp_verification",
|
|
3
|
+
PASSWORD_RESET = "password_reset",
|
|
4
|
+
WELCOME = "welcome",
|
|
5
|
+
ACCOUNT_ACTIVATION = "account_activation",
|
|
6
|
+
SECURITY_ALERT = "security_alert",
|
|
7
|
+
INCIDENT_NOTIFICATION = "incident_notification",
|
|
8
|
+
APPOINTMENT_REMINDER = "appointment_reminder",
|
|
9
|
+
GENERAL_NOTIFICATION = "general_notification"
|
|
10
|
+
}
|
|
@@ -2,9 +2,12 @@ export * from './interfaces/sms-request';
|
|
|
2
2
|
export * from './interfaces/sms-response';
|
|
3
3
|
export * from './interfaces/sms-notification';
|
|
4
4
|
export * from './interfaces/sms-options';
|
|
5
|
+
export * from './interfaces/sms-template.interface';
|
|
5
6
|
export * from './dtos/create-uwazii-sms.dto';
|
|
6
7
|
export * from './dtos/create-sms-notification.dto';
|
|
7
8
|
export * from './dtos/update-sms-notification.dto';
|
|
8
9
|
export * from './dtos/create-sms-options.dto';
|
|
9
10
|
export * from './dtos/create-uwazii-sms-with-options.dto';
|
|
10
11
|
export * from './enums/sms-notification-status.enum';
|
|
12
|
+
export * from './enums/sms-template.enum';
|
|
13
|
+
export * from './constants/sms-templates.config';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface SmsTemplateContext {
|
|
2
|
+
[key: string]: string | number | undefined;
|
|
3
|
+
}
|
|
4
|
+
export interface SmsTemplate {
|
|
5
|
+
name: string;
|
|
6
|
+
content: string;
|
|
7
|
+
variables: string[];
|
|
8
|
+
description?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface SmsTemplateConfig {
|
|
11
|
+
templates: Record<string, SmsTemplate>;
|
|
12
|
+
}
|