cloud-ide-model-schema 1.0.8 → 1.0.10

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.
Files changed (55) hide show
  1. package/lib/@types/common.d.ts +22 -0
  2. package/lib/@types/common.js +50 -0
  3. package/lib/@types/coreControllerResponse.d.ts +43 -0
  4. package/lib/@types/coreControllerResponse.js +2 -0
  5. package/lib/@types/designConfigControllerResponse.d.ts +28 -0
  6. package/lib/@types/designConfigControllerResponse.js +2 -0
  7. package/lib/@types/emailServiceConfig.d.ts +33 -0
  8. package/lib/@types/emailServiceConfig.js +2 -0
  9. package/lib/@types/entityControllerResponse.d.ts +35 -0
  10. package/lib/@types/entityControllerResponse.js +2 -0
  11. package/lib/@types/forgotPasswordControllerResponse.d.ts +13 -0
  12. package/lib/@types/forgotPasswordControllerResponse.js +2 -0
  13. package/lib/@types/jwtPayload.d.ts +16 -0
  14. package/lib/@types/jwtPayload.js +2 -0
  15. package/lib/@types/loginControllerResponse.d.ts +17 -0
  16. package/lib/@types/loginControllerResponse.js +2 -0
  17. package/lib/@types/menuControllerResponse.d.ts +13 -0
  18. package/lib/@types/menuControllerResponse.js +2 -0
  19. package/lib/@types/resetPasswordControllerResponse.d.ts +15 -0
  20. package/lib/@types/resetPasswordControllerResponse.js +2 -0
  21. package/lib/@types/userPermissions.d.ts +7 -0
  22. package/lib/@types/userPermissions.js +2 -0
  23. package/lib/model/auth/forgot-password.d.ts +14 -0
  24. package/lib/model/auth/forgot-password.js +62 -0
  25. package/lib/model/auth/login.d.ts +26 -0
  26. package/lib/model/auth/login.js +109 -0
  27. package/lib/model/auth/register.d.ts +20 -0
  28. package/lib/model/auth/register.js +33 -0
  29. package/lib/model/auth/reset-password.d.ts +13 -0
  30. package/lib/model/auth/reset-password.js +22 -0
  31. package/lib/model/core/design-config.d.ts +10 -0
  32. package/lib/model/core/design-config.js +19 -0
  33. package/lib/model/core/entity.d.ts +11 -0
  34. package/lib/model/core/entity.js +35 -0
  35. package/lib/model/core/general-master.d.ts +10 -0
  36. package/lib/model/core/general-master.js +19 -0
  37. package/lib/model/core/menu.d.ts +12 -0
  38. package/lib/model/core/menu.js +31 -0
  39. package/lib/model/core/pin-code.d.ts +11 -0
  40. package/lib/model/core/pin-code.js +28 -0
  41. package/lib/model/core/user.d.ts +11 -0
  42. package/lib/model/core/user.js +19 -0
  43. package/lib/utilities/helpers/encryption.helper.d.ts +2 -0
  44. package/lib/utilities/helpers/encryption.helper.js +14 -0
  45. package/lib/utilities/helpers/error.helper.d.ts +9 -0
  46. package/lib/utilities/helpers/error.helper.js +26 -0
  47. package/lib/utilities/helpers/response.helper.d.ts +16 -0
  48. package/lib/utilities/helpers/response.helper.js +9 -0
  49. package/lib/utilities/helpers/string.helper.d.ts +3 -0
  50. package/lib/utilities/helpers/string.helper.js +232 -0
  51. package/lib/utilities/helpers/type.hepler.d.ts +3 -0
  52. package/lib/utilities/helpers/type.hepler.js +2 -0
  53. package/lib/utilities/helpers/view.helper.d.ts +2 -0
  54. package/lib/utilities/helpers/view.helper.js +14 -0
  55. package/package.json +1 -2
@@ -0,0 +1,22 @@
1
+ import { IEntityErrorLogger } from "../model/core/entity";
2
+ export declare class MTableQueries {
3
+ total: number;
4
+ pageIndex: number;
5
+ pageSize: number;
6
+ query: string;
7
+ sort: {
8
+ order: 'asc' | 'desc' | '';
9
+ key: string | number;
10
+ };
11
+ constructor(init: MTableQueries);
12
+ Validate(): Partial<IEntityErrorLogger>;
13
+ }
14
+ export type TableQueries = MTableQueries;
15
+ export interface paginationQueryResponse {
16
+ paginatedResults: any[];
17
+ totalDocument: number;
18
+ }
19
+ export interface CommonSelect {
20
+ label: string;
21
+ value: string;
22
+ }
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MTableQueries = void 0;
4
+ var MTableQueries = /** @class */ (function () {
5
+ function MTableQueries(init) {
6
+ this.total = 1;
7
+ this.pageIndex = 1;
8
+ this.pageSize = 10;
9
+ this.query = "";
10
+ this.sort = {
11
+ order: "",
12
+ key: ""
13
+ };
14
+ Object.assign(this, init);
15
+ }
16
+ MTableQueries.prototype.Validate = function () {
17
+ var _a, _b, _c, _d, _e;
18
+ var errorLogger = {};
19
+ if (this.sort) {
20
+ if (((_a = this.sort) === null || _a === void 0 ? void 0 : _a.order) != 'asc' && ((_b = this.sort) === null || _b === void 0 ? void 0 : _b.order) != 'desc' && ((_c = this.sort) === null || _c === void 0 ? void 0 : _c.order) != '') {
21
+ errorLogger.sort = "Incorect Sort order!";
22
+ }
23
+ if (typeof ((_d = this.sort) === null || _d === void 0 ? void 0 : _d.key) != 'string' && typeof ((_e = this.sort) === null || _e === void 0 ? void 0 : _e.key) != 'number') {
24
+ errorLogger.sort = "Incorect Sort key!";
25
+ }
26
+ }
27
+ else {
28
+ errorLogger.sort = "Sort order and key is required!";
29
+ }
30
+ if (typeof (this.pageIndex) == 'number') {
31
+ if (this.pageIndex < 1) {
32
+ errorLogger.pageIndex = "Incorect Page Index!";
33
+ }
34
+ }
35
+ else {
36
+ errorLogger.pageIndex = "Page index is required";
37
+ }
38
+ if (typeof (this.pageSize) == 'number') {
39
+ if (this.pageSize < 1) {
40
+ errorLogger.pageSize = "Incorect Page Size!";
41
+ }
42
+ }
43
+ else {
44
+ errorLogger.pageSize = "Page Size is required";
45
+ }
46
+ return errorLogger;
47
+ };
48
+ return MTableQueries;
49
+ }());
50
+ exports.MTableQueries = MTableQueries;
@@ -0,0 +1,43 @@
1
+ import { ICoreSypin } from "../schema/core";
2
+ import { controllerResponse } from "../utilities/helpers/response.helper";
3
+ import { CommonSelect } from "./common";
4
+ export interface generalMasterSelectControllerResponse extends controllerResponse {
5
+ data?: {
6
+ core_general_master: generalMasterSelectResponseData[];
7
+ core_general_master_type: generalMasterTypeResponseData[];
8
+ };
9
+ }
10
+ export interface generalMasterSelectResponseData extends generalMasterResponseData {
11
+ title: string;
12
+ value: string;
13
+ }
14
+ export interface generalMasterResponseData {
15
+ _id?: string;
16
+ sygms_code: string;
17
+ sygms_id_sygmt: string;
18
+ sygms_title: string;
19
+ sygms_desc: string;
20
+ sygms_isactive: string;
21
+ sygms_configuration: any;
22
+ }
23
+ export interface generalMasterTypeResponseData {
24
+ _id: string;
25
+ sygmt_code: string;
26
+ sygmt_title: string;
27
+ sygmt_desc: string;
28
+ sygmt_isactive: boolean;
29
+ }
30
+ export interface pinCodeSelectControllerResponse extends controllerResponse {
31
+ data?: {
32
+ core_pin_code: pinCodeSelectResponseData[];
33
+ };
34
+ }
35
+ export interface pinCodeSelectResponseData extends ICoreSypin {
36
+ title: string;
37
+ value: string;
38
+ }
39
+ export interface userSelectControllerResponse extends controllerResponse {
40
+ data?: {
41
+ auth_user_mst: CommonSelect[];
42
+ };
43
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,28 @@
1
+ import { ICoreSypc, ICoreSypg, ICoreSypgr, ICoreSytm, ITabs } from "../schema/core";
2
+ import { controllerResponse } from "../utilities/helpers/response.helper";
3
+ export interface designConfigControllerResponse extends controllerResponse {
4
+ data?: designConfigResponseData;
5
+ }
6
+ export interface designConfigResponseData {
7
+ page?: Partial<ICoreSypg>;
8
+ theme?: Partial<ICoreSytm>;
9
+ grid?: {
10
+ [key: string]: ICoreSypgr;
11
+ };
12
+ controls?: {
13
+ [key: string]: ICoreSypc;
14
+ };
15
+ tab?: {
16
+ [key: string]: ICoreTabs;
17
+ };
18
+ }
19
+ export interface ICoreTabs {
20
+ _id?: string;
21
+ syptb_title: string;
22
+ syptb_tabs: {
23
+ [key: string]: ITabs;
24
+ };
25
+ syptb_tab_code: string;
26
+ syptb_page_id_sypg: string;
27
+ syptb_isactive?: boolean;
28
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,33 @@
1
+ export interface SendMailInfo {
2
+ reference: string;
3
+ receiver: string;
4
+ data: any;
5
+ }
6
+ export interface EmailServiceConfig {
7
+ service?: string;
8
+ auth: {
9
+ user: string;
10
+ pass: string;
11
+ };
12
+ host: string;
13
+ port: number;
14
+ secure: boolean;
15
+ requireTLS?: boolean;
16
+ debug?: boolean;
17
+ secureConnection?: boolean;
18
+ tls?: {
19
+ [key: string]: string;
20
+ };
21
+ connectionTimeout?: number;
22
+ }
23
+ export interface EmailOptions {
24
+ from?: string;
25
+ to?: string;
26
+ subject?: string;
27
+ messageId?: string;
28
+ date?: Date;
29
+ body?: string;
30
+ reference?: any;
31
+ templete?: any;
32
+ custom?: boolean;
33
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,35 @@
1
+ import { controllerResponse } from "../utilities/helpers/response.helper";
2
+ export interface entityControllerResponse extends controllerResponse {
3
+ data?: entityResponseData[];
4
+ }
5
+ export interface entityResponseData {
6
+ _id?: string;
7
+ syen_id_syen?: string;
8
+ syen_print_name?: string;
9
+ syen_entity_type_gmst?: string;
10
+ syen_name?: string;
11
+ syen_entity_code?: string;
12
+ syen_corporate_address?: string;
13
+ syen_corporate_pin_sypc?: string;
14
+ syen_corporate_pincode_sypc?: string;
15
+ syen_corporate_contact_person_user?: string;
16
+ syen_corporate_phone?: number;
17
+ syen_corporate_phone_alt?: number;
18
+ syen_corporate_fax?: string;
19
+ syen_corporate_email?: string;
20
+ syen_corporate_email_alt?: string;
21
+ syen_website?: string;
22
+ syen_currency_sycr?: string;
23
+ syen_registered_address?: string;
24
+ syen_registered_pin_sypc?: string;
25
+ syen_registered_pincode_sypc?: string;
26
+ syen_registered_phone?: number;
27
+ syen_registered_email?: string;
28
+ syen_registered_fax?: string;
29
+ syen_registered_contact_person_user?: string;
30
+ syen_udise_no?: string;
31
+ syen_affiliation_no?: string;
32
+ syen_photo_id_fm?: string;
33
+ syen_isactive?: boolean;
34
+ children: entityResponseData[];
35
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ import { IUser } from "../schema/auth";
2
+ import { controllerResponse } from "../utilities/helpers/response.helper";
3
+ import { SendMailInfo } from "./emailServiceConfig";
4
+ export interface ForgotPasswordControllerResponse extends controllerResponse {
5
+ data?: Partial<ForgotPasswordResponseData>;
6
+ }
7
+ export interface ForgotPasswordResponseData {
8
+ user: Partial<IUser>;
9
+ reset_password_link: string;
10
+ }
11
+ export interface ForgotPasswordSendMailInfo extends SendMailInfo {
12
+ data: Partial<ForgotPasswordResponseData>;
13
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,16 @@
1
+ import { ICoreSyen } from "../schema/core";
2
+ export interface jwtPayload {
3
+ sylog_id_user?: string;
4
+ sylog_id_logses?: string;
5
+ user_username?: string;
6
+ sylog_config_data?: resetPasswordSylog;
7
+ core_system_entity?: ICoreSyen;
8
+ }
9
+ export interface resetPasswordJwtPayload {
10
+ user_password?: string;
11
+ }
12
+ export interface resetPasswordSylog {
13
+ reset_password_link?: string;
14
+ reset_password_secret?: string;
15
+ request_timestamp?: Date;
16
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,17 @@
1
+ import { IUser } from "../schema/auth";
2
+ import { controllerResponse } from "../utilities/helpers/response.helper";
3
+ import { SendMailInfo } from "./emailServiceConfig";
4
+ export interface loginControllerResponse extends controllerResponse {
5
+ data?: Partial<loginResponseData>;
6
+ token?: string;
7
+ }
8
+ export interface reLoginControllerResponse extends controllerResponse {
9
+ data?: Partial<loginResponseData>;
10
+ token?: string;
11
+ }
12
+ export interface loginResponseData {
13
+ user: Partial<IUser>;
14
+ }
15
+ export interface LoginSendMailInfo extends SendMailInfo {
16
+ data: Partial<loginResponseData>;
17
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ import { controllerResponse } from "../utilities/helpers/response.helper";
2
+ export interface menuControllerResponse extends controllerResponse {
3
+ data?: menuResponseData[];
4
+ }
5
+ export interface menuResponseData {
6
+ key: string;
7
+ path: string;
8
+ isExternalLink?: boolean;
9
+ title: string;
10
+ icon: string;
11
+ type: string;
12
+ subMenu: menuResponseData[];
13
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ import { IUser } from "../schema/auth";
2
+ import { controllerResponse } from "../utilities/helpers/response.helper";
3
+ import { SendMailInfo } from "./emailServiceConfig";
4
+ export interface ResetPasswordControllerResponse extends controllerResponse {
5
+ data?: Partial<ResetPasswordResponseData>;
6
+ }
7
+ export interface SignOutControllerResponse extends controllerResponse {
8
+ }
9
+ export interface ResetPasswordResponseData {
10
+ user: Partial<IUser>;
11
+ reset_password_link: string;
12
+ }
13
+ export interface ResetPasswordSendMailInfo extends SendMailInfo {
14
+ data: Partial<ResetPasswordResponseData>;
15
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ export interface UserPermissions {
2
+ _id: string;
3
+ create?: boolean;
4
+ read?: boolean;
5
+ update?: boolean;
6
+ delete?: boolean;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ import { forgotPasswordMethod } from "../../utilities/helpers/type.hepler";
2
+ type IForgotPasswordErrorLogger = {
3
+ [key in keyof MForgotPassword]: string;
4
+ };
5
+ declare class MForgotPassword {
6
+ custom_forgot_password_method: forgotPasswordMethod;
7
+ user_username: string;
8
+ user_emailid: string;
9
+ user_mobileno: number;
10
+ constructor(init: MForgotPassword);
11
+ forgotPasswordValidate(): Partial<IForgotPasswordErrorLogger>;
12
+ }
13
+ export { IForgotPasswordErrorLogger, //interface
14
+ MForgotPassword };
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MForgotPassword = void 0;
4
+ /* INTERFACE END */
5
+ /* MODEL START */
6
+ var MForgotPassword = /** @class */ (function () {
7
+ function MForgotPassword(init) {
8
+ Object.assign(this, init);
9
+ }
10
+ MForgotPassword.prototype.forgotPasswordValidate = function () {
11
+ var _a, _b, _c;
12
+ var errorLogger = {};
13
+ /* Check method set or not */
14
+ if (!this.custom_forgot_password_method) {
15
+ errorLogger.custom_forgot_password_method = "Forgot Password Method is Required!";
16
+ }
17
+ else {
18
+ if (this.custom_forgot_password_method == "username") {
19
+ /* if username is selected by user */
20
+ if (this.user_username) {
21
+ /* Check wether length is in between 8 to 20 or not */
22
+ if (((_a = this.user_username) === null || _a === void 0 ? void 0 : _a.length) < 8 || ((_b = this.user_username) === null || _b === void 0 ? void 0 : _b.length) > 20) {
23
+ errorLogger.user_username = "Username is Invalid!";
24
+ }
25
+ }
26
+ else {
27
+ errorLogger.user_username = "Username is Required!";
28
+ }
29
+ }
30
+ else if (this.custom_forgot_password_method == "email") {
31
+ /* if email is selected by user */
32
+ if (this.user_emailid) {
33
+ /* Check wether length is 8 to 50 or not */
34
+ if (((_c = this.user_emailid) === null || _c === void 0 ? void 0 : _c.length) < 8 || this.user_emailid.length > 50) {
35
+ errorLogger.user_emailid = "Email Id is Invalid!";
36
+ }
37
+ }
38
+ else {
39
+ errorLogger.user_emailid = "Email Id is Required!";
40
+ }
41
+ }
42
+ else if (this.custom_forgot_password_method == "mobile") {
43
+ /* if mobile is selected by user */
44
+ if (this.user_mobileno) {
45
+ /* Check wether length is 10 to 15 digits or not */
46
+ if (this.user_mobileno < 1000000000 || this.user_mobileno > 999999999999999) {
47
+ errorLogger.user_mobileno = "Mobile Number is Invalid!";
48
+ }
49
+ }
50
+ else {
51
+ errorLogger.user_mobileno = "Mobile Number is Required!";
52
+ }
53
+ }
54
+ else {
55
+ errorLogger.custom_forgot_password_method = "Forgot Password Method is Invalid, please use 'username' or 'email' or 'mobile'";
56
+ }
57
+ }
58
+ return errorLogger;
59
+ };
60
+ return MForgotPassword;
61
+ }());
62
+ exports.MForgotPassword = MForgotPassword;
@@ -0,0 +1,26 @@
1
+ import { loginMethod } from "../../utilities/helpers/type.hepler";
2
+ type ILoginErrorLogger = {
3
+ [key in keyof MLogin]: string;
4
+ };
5
+ declare class MLogin {
6
+ custom_login_method?: loginMethod;
7
+ user_username?: string;
8
+ user_password?: string;
9
+ mpin_pin?: string;
10
+ constructor(init: MLogin);
11
+ loginValidate(): Partial<ILoginErrorLogger>;
12
+ }
13
+ type IReLoginErrorLogger = {
14
+ [key in keyof MReLogin]: string;
15
+ };
16
+ declare class MReLogin {
17
+ custom_login_method?: loginMethod;
18
+ user_password?: string;
19
+ mpin_pin?: string;
20
+ token?: string;
21
+ constructor(init: MReLogin);
22
+ reLoginValidate(): Partial<IReLoginErrorLogger>;
23
+ }
24
+ export { ILoginErrorLogger, //interface,
25
+ IReLoginErrorLogger, MLogin, // model
26
+ MReLogin };
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MReLogin = exports.MLogin = void 0;
4
+ /* INTERFACE END */
5
+ /* MODEL START */
6
+ var MLogin = /** @class */ (function () {
7
+ function MLogin(init) {
8
+ Object.assign(this, init);
9
+ }
10
+ MLogin.prototype.loginValidate = function () {
11
+ var _a, _b;
12
+ var errorLogger = {};
13
+ if (!this.user_username) {
14
+ errorLogger.user_username = "Username is Required";
15
+ }
16
+ /* Check mpin or password selected or not, any one from both */
17
+ if (!this.custom_login_method) {
18
+ errorLogger.custom_login_method = "Login Method is Required, Mpin or Password!";
19
+ }
20
+ else {
21
+ if (this.custom_login_method == "pass") {
22
+ /* if password is selected by user */
23
+ if (this.user_password) {
24
+ /* Check wether length is in between 8 to 50 or not */
25
+ if (((_a = this.user_password) === null || _a === void 0 ? void 0 : _a.length) < 7 || ((_b = this.user_password) === null || _b === void 0 ? void 0 : _b.length) > 50) {
26
+ errorLogger.user_password = "Password is Invalid!";
27
+ }
28
+ }
29
+ else {
30
+ errorLogger.user_password = "Password is Invalid!";
31
+ }
32
+ }
33
+ else if (this.custom_login_method == "mpin") {
34
+ /* if mpin is selected by user */
35
+ if (this.mpin_pin) {
36
+ /* Check wether length is 6 or not */
37
+ if (parseInt(this.mpin_pin) < 100000 || parseInt(this.mpin_pin) > 999999) {
38
+ errorLogger.mpin_pin = "MPIN is Invalid!";
39
+ }
40
+ if (!(/^[0-9]+$/).test(this.mpin_pin)) {
41
+ errorLogger.mpin_pin = "MPIN is Invalid!";
42
+ }
43
+ }
44
+ else {
45
+ errorLogger.mpin_pin = "MPIN is Invalid!";
46
+ }
47
+ }
48
+ else {
49
+ errorLogger.custom_login_method = "Login Method is Invalid, please use 'mpin' or 'pass'";
50
+ }
51
+ }
52
+ return errorLogger;
53
+ };
54
+ return MLogin;
55
+ }());
56
+ exports.MLogin = MLogin;
57
+ /* INTERFACE END */
58
+ /* MODEL START */
59
+ var MReLogin = /** @class */ (function () {
60
+ function MReLogin(init) {
61
+ Object.assign(this, init);
62
+ }
63
+ MReLogin.prototype.reLoginValidate = function () {
64
+ var _a, _b;
65
+ var errorLogger = {};
66
+ if (!this.token) {
67
+ errorLogger.token = "Token is Required";
68
+ }
69
+ /* Check mpin or password selected or not, any one from both */
70
+ if (!this.custom_login_method) {
71
+ errorLogger.custom_login_method = "Login Method is Required, Mpin or Password!";
72
+ }
73
+ else {
74
+ if (this.custom_login_method == "pass") {
75
+ /* if password is selected by user */
76
+ if (this.user_password) {
77
+ /* Check wether length is in between 8 to 50 or not */
78
+ if (((_a = this.user_password) === null || _a === void 0 ? void 0 : _a.length) < 7 || ((_b = this.user_password) === null || _b === void 0 ? void 0 : _b.length) > 50) {
79
+ errorLogger.user_password = "Password is Invalid!";
80
+ }
81
+ }
82
+ else {
83
+ errorLogger.user_password = "Password is Invalid!";
84
+ }
85
+ }
86
+ else if (this.custom_login_method == "mpin") {
87
+ /* if mpin is selected by user */
88
+ if (this.mpin_pin) {
89
+ /* Check wether length is 6 or not */
90
+ if (parseInt(this.mpin_pin) < 100000 || parseInt(this.mpin_pin) > 999999) {
91
+ errorLogger.mpin_pin = "MPIN is Invalid!";
92
+ }
93
+ if (!(/^[0-9]+$/).test(this.mpin_pin)) {
94
+ errorLogger.mpin_pin = "MPIN is Invalid!";
95
+ }
96
+ }
97
+ else {
98
+ errorLogger.mpin_pin = "MPIN is Invalid!";
99
+ }
100
+ }
101
+ else {
102
+ errorLogger.custom_login_method = "Login Method is Invalid, please use 'mpin' or 'pass'";
103
+ }
104
+ }
105
+ return errorLogger;
106
+ };
107
+ return MReLogin;
108
+ }());
109
+ exports.MReLogin = MReLogin;
@@ -0,0 +1,20 @@
1
+ import { MErrorLoggerHelper } from "../../utilities/helpers/error.helper";
2
+ interface IRegisterErrorLogger extends MErrorLoggerHelper {
3
+ control: keyof MRegister;
4
+ }
5
+ declare class MRegister {
6
+ user_id_ent: string;
7
+ user_username: string;
8
+ user_firstname: string;
9
+ user_middlename: string;
10
+ user_lastname: string;
11
+ user_fullname: string;
12
+ user_emailid: string;
13
+ user_mobileno: number;
14
+ user_password: string;
15
+ user_photo_id_fm: string;
16
+ constructor(init: MRegister);
17
+ loginValidate(): IRegisterErrorLogger[];
18
+ }
19
+ export { IRegisterErrorLogger, //interface
20
+ MRegister };
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MRegister = void 0;
4
+ /* INTERFACE END */
5
+ /* MODEL START */
6
+ var MRegister = /** @class */ (function () {
7
+ function MRegister(init) {
8
+ Object.assign(this, init);
9
+ }
10
+ MRegister.prototype.loginValidate = function () {
11
+ var _a, _b;
12
+ var errorLogger = [];
13
+ if (!this.user_username) {
14
+ errorLogger.push({
15
+ control: "user_username",
16
+ message: "Username is Required"
17
+ });
18
+ }
19
+ /* if password is selected by user */
20
+ if (this.user_password) {
21
+ /* Check wether length is in between 8 to 50 or not */
22
+ if (((_a = this.user_password) === null || _a === void 0 ? void 0 : _a.length) < 8 || ((_b = this.user_password) === null || _b === void 0 ? void 0 : _b.length) > 50) {
23
+ errorLogger.push({
24
+ control: "user_password",
25
+ message: "Password is Invalid!"
26
+ });
27
+ }
28
+ }
29
+ return errorLogger;
30
+ };
31
+ return MRegister;
32
+ }());
33
+ exports.MRegister = MRegister;
@@ -0,0 +1,13 @@
1
+ import { resetPasswordSylog } from "../../@types/jwtPayload";
2
+ type IResetPasswordErrorLogger = {
3
+ [key in keyof MResetPassword]: string;
4
+ };
5
+ declare class MResetPassword {
6
+ user_password: string;
7
+ user_username: string;
8
+ sylog_config_data: resetPasswordSylog;
9
+ constructor(init: MResetPassword);
10
+ resetPasswordValidate(): Partial<IResetPasswordErrorLogger>;
11
+ }
12
+ export { IResetPasswordErrorLogger, //interface
13
+ MResetPassword };
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MResetPassword = void 0;
4
+ /* INTERFACE END */
5
+ /* MODEL START */
6
+ var MResetPassword = /** @class */ (function () {
7
+ function MResetPassword(init) {
8
+ Object.assign(this, init);
9
+ }
10
+ MResetPassword.prototype.resetPasswordValidate = function () {
11
+ var errorLogger = {};
12
+ if (!this.sylog_config_data) {
13
+ errorLogger.sylog_config_data = "Configuration Data is Required!";
14
+ }
15
+ if (!this.user_password) {
16
+ errorLogger.user_password = "Password is Required!";
17
+ }
18
+ return errorLogger;
19
+ };
20
+ return MResetPassword;
21
+ }());
22
+ exports.MResetPassword = MResetPassword;
@@ -0,0 +1,10 @@
1
+ type IDesignConfigErrorLogger = {
2
+ [key in keyof MDesignConfig]: string;
3
+ };
4
+ declare class MDesignConfig {
5
+ sypg_page_code?: string;
6
+ constructor(init: MDesignConfig);
7
+ designConfigValidate(): Partial<IDesignConfigErrorLogger>;
8
+ }
9
+ export { IDesignConfigErrorLogger, //interface
10
+ MDesignConfig };