@optimiser/common 1.0.365 → 1.0.367

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 (69) hide show
  1. package/dist/aws/awsservices.d.ts +39 -39
  2. package/dist/aws/awsservices.js +398 -398
  3. package/dist/constants.d.ts +35 -35
  4. package/dist/constants.js +36 -36
  5. package/dist/enums/databasetype.enum.d.ts +7 -7
  6. package/dist/enums/databasetype.enum.js +11 -11
  7. package/dist/enums/log.enum.d.ts +22 -22
  8. package/dist/enums/log.enum.js +26 -26
  9. package/dist/index.d.ts +25 -25
  10. package/dist/index.js +69 -61
  11. package/dist/lib/activity.d.ts +1 -1
  12. package/dist/lib/activity.js +44 -44
  13. package/dist/lib/calculatedbsize.d.ts +15 -15
  14. package/dist/lib/calculatedbsize.js +75 -75
  15. package/dist/lib/connection.d.ts +116 -116
  16. package/dist/lib/connection.js +595 -595
  17. package/dist/lib/convertfilesize.d.ts +2 -2
  18. package/dist/lib/convertfilesize.js +15 -15
  19. package/dist/lib/countrycode.d.ts +2 -2
  20. package/dist/lib/countrycode.js +255 -255
  21. package/dist/lib/event.d.ts +26 -26
  22. package/dist/lib/event.js +252 -248
  23. package/dist/lib/helper.d.ts +94 -93
  24. package/dist/lib/helper.js +1016 -1009
  25. package/dist/lib/memoryserverclient.d.ts +40 -40
  26. package/dist/lib/memoryserverclient.js +256 -252
  27. package/dist/lib/operautilitycommon.d.ts +65 -65
  28. package/dist/lib/operautilitycommon.js +620 -620
  29. package/dist/lib/redis.d.ts +21 -21
  30. package/dist/lib/redis.js +46 -46
  31. package/dist/lib/socketidfromredis.d.ts +3 -3
  32. package/dist/lib/socketidfromredis.js +5 -5
  33. package/dist/lib/taskutils.d.ts +40 -40
  34. package/dist/lib/taskutils.js +656 -656
  35. package/dist/lib/utility.d.ts +300 -298
  36. package/dist/lib/utility.js +5626 -5621
  37. package/dist/lib/validateRequest.d.ts +3 -3
  38. package/dist/lib/validateRequest.js +13 -13
  39. package/dist/logs/auditlog.d.ts +25 -25
  40. package/dist/logs/auditlog.js +1033 -1029
  41. package/dist/logs/checklogtable.d.ts +3 -3
  42. package/dist/logs/checklogtable.js +67 -67
  43. package/dist/logs/log.table.d.ts +7 -7
  44. package/dist/logs/log.table.js +127 -127
  45. package/dist/modals/connection.modal.d.ts +32 -32
  46. package/dist/modals/connection.modal.js +2 -2
  47. package/dist/modals/globalNotification.modal.d.ts +8 -8
  48. package/dist/modals/globalNotification.modal.js +2 -2
  49. package/dist/modals/log.modal.d.ts +64 -64
  50. package/dist/modals/log.modal.js +2 -2
  51. package/dist/modals/mail.modal.d.ts +6 -6
  52. package/dist/modals/mail.modal.js +2 -2
  53. package/dist/modals/notificationData.modal.d.ts +29 -29
  54. package/dist/modals/notificationData.modal.js +2 -2
  55. package/dist/modals/redisconfig.modal.d.ts +6 -6
  56. package/dist/modals/redisconfig.modal.js +2 -2
  57. package/dist/modals/sqsconfig.modal.d.ts +8 -8
  58. package/dist/modals/sqsconfig.modal.js +2 -2
  59. package/dist/modals/utility.modal.d.ts +17 -17
  60. package/dist/modals/utility.modal.js +2 -2
  61. package/dist/utility/crypto.d.ts +4 -4
  62. package/dist/utility/crypto.js +43 -43
  63. package/dist/utility/errorHandler.d.ts +30 -30
  64. package/dist/utility/errorHandler.js +24 -24
  65. package/dist/utility/errorHandlerForServices.d.ts +22 -22
  66. package/dist/utility/errorHandlerForServices.js +19 -19
  67. package/dist/utility/mail.d.ts +21 -21
  68. package/dist/utility/mail.js +91 -87
  69. package/package.json +3 -3
@@ -1,3 +1,3 @@
1
- import { Sequelize } from "sequelize";
2
- declare const _default: (tableName: string, sequelize: Sequelize) => Promise<unknown>;
3
- export default _default;
1
+ import { Sequelize } from "sequelize";
2
+ declare const _default: (tableName: string, sequelize: Sequelize) => Promise<unknown>;
3
+ export default _default;
@@ -1,67 +1,67 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- var __importDefault = (this && this.__importDefault) || function (mod) {
39
- return (mod && mod.__esModule) ? mod : { "default": mod };
40
- };
41
- Object.defineProperty(exports, "__esModule", { value: true });
42
- var log_table_1 = __importDefault(require("./log.table"));
43
- // checks if the table exist in the database otherwise creates a new one
44
- exports.default = (function (tableName, sequelize) { return __awaiter(void 0, void 0, void 0, function () {
45
- return __generator(this, function (_a) {
46
- return [2 /*return*/, new Promise(function (resolve, reject) {
47
- sequelize.query("SELECT * from `" + tableName + "s` LIMIT 1", { logging: false }).then(function (result) {
48
- resolve(true);
49
- }).catch(function (err) { return __awaiter(void 0, void 0, void 0, function () {
50
- return __generator(this, function (_a) {
51
- switch (_a.label) {
52
- case 0:
53
- console.log('Table does not exist creating now');
54
- return [4 /*yield*/, log_table_1.default(tableName, sequelize)];
55
- case 1:
56
- _a.sent();
57
- return [4 /*yield*/, sequelize.sync()];
58
- case 2:
59
- _a.sent();
60
- resolve(true);
61
- return [2 /*return*/];
62
- }
63
- });
64
- }); });
65
- })];
66
- });
67
- }); });
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ var log_table_1 = __importDefault(require("./log.table"));
43
+ // checks if the table exist in the database otherwise creates a new one
44
+ exports.default = (function (tableName, sequelize) { return __awaiter(void 0, void 0, void 0, function () {
45
+ return __generator(this, function (_a) {
46
+ return [2 /*return*/, new Promise(function (resolve, reject) {
47
+ sequelize.query("SELECT * from `" + tableName + "s` LIMIT 1", { logging: false }).then(function (result) {
48
+ resolve(true);
49
+ }).catch(function (err) { return __awaiter(void 0, void 0, void 0, function () {
50
+ return __generator(this, function (_a) {
51
+ switch (_a.label) {
52
+ case 0:
53
+ console.log('Table does not exist creating now');
54
+ return [4 /*yield*/, (0, log_table_1.default)(tableName, sequelize)];
55
+ case 1:
56
+ _a.sent();
57
+ return [4 /*yield*/, sequelize.sync()];
58
+ case 2:
59
+ _a.sent();
60
+ resolve(true);
61
+ return [2 /*return*/];
62
+ }
63
+ });
64
+ }); });
65
+ })];
66
+ });
67
+ }); });
@@ -1,7 +1,7 @@
1
- import { Sequelize } from "sequelize";
2
- declare const _default: (tableName: string, sequelize: Sequelize) => Promise<import("sequelize/types").Model<any, any>>;
3
- /**
4
- * @param tableName (name of table)
5
- * @param sequelize (database connection)
6
- */
7
- export default _default;
1
+ import { Sequelize } from "sequelize";
2
+ /**
3
+ * @param tableName (name of table)
4
+ * @param sequelize (database connection)
5
+ */
6
+ declare const _default: (tableName: string, sequelize: Sequelize) => Promise<import("sequelize").Model<any, any>>;
7
+ export default _default;
@@ -1,127 +1,127 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- var sequelize_1 = require("sequelize");
40
- /**
41
- * @param tableName (name of table)
42
- * @param sequelize (database connection)
43
- */
44
- exports.default = (function (tableName, sequelize) { return __awaiter(void 0, void 0, void 0, function () {
45
- var Table;
46
- return __generator(this, function (_a) {
47
- switch (_a.label) {
48
- case 0:
49
- Table = sequelize.define(tableName, {
50
- CompanyID: {
51
- type: sequelize_1.STRING,
52
- allowNull: true,
53
- defaultValue: ''
54
- },
55
- UserName: {
56
- type: sequelize_1.STRING,
57
- allowNull: false
58
- },
59
- UserEmail: {
60
- type: sequelize_1.STRING,
61
- allowNull: false
62
- },
63
- CreatedDate: {
64
- type: 'TIMESTAMP',
65
- defaultValue: sequelize_1.literal('CURRENT_TIMESTAMP'),
66
- allowNull: false
67
- },
68
- IPAddress: {
69
- type: sequelize_1.STRING,
70
- allowNull: false
71
- },
72
- TypeOfChange: {
73
- type: sequelize_1.STRING,
74
- allowNull: true,
75
- defaultValue: ''
76
- },
77
- Module: {
78
- type: sequelize_1.STRING,
79
- allowNull: true,
80
- defaultValue: ''
81
- },
82
- ChangeField: {
83
- type: sequelize_1.TEXT,
84
- allowNull: true,
85
- defaultValue: ''
86
- },
87
- OldValue: {
88
- type: sequelize_1.TEXT,
89
- allowNull: true,
90
- defaultValue: ''
91
- },
92
- NewValue: {
93
- type: sequelize_1.TEXT,
94
- allowNull: true,
95
- defaultValue: ''
96
- },
97
- LogType: {
98
- type: sequelize_1.ENUM,
99
- values: ['session', 'audit'],
100
- defaultValue: 'audit'
101
- },
102
- Browser: {
103
- type: sequelize_1.STRING,
104
- allowNull: true,
105
- defaultValue: ''
106
- },
107
- Status: {
108
- type: sequelize_1.STRING,
109
- allowNull: true,
110
- defaultValue: ''
111
- },
112
- Platform: {
113
- type: sequelize_1.STRING,
114
- allowNull: true,
115
- defaultValue: ''
116
- },
117
- Application: {
118
- type: sequelize_1.STRING,
119
- allowNull: true,
120
- defaultValue: ''
121
- },
122
- });
123
- return [4 /*yield*/, Table.sync()];
124
- case 1: return [2 /*return*/, _a.sent()];
125
- }
126
- });
127
- }); });
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ var sequelize_1 = require("sequelize");
40
+ /**
41
+ * @param tableName (name of table)
42
+ * @param sequelize (database connection)
43
+ */
44
+ exports.default = (function (tableName, sequelize) { return __awaiter(void 0, void 0, void 0, function () {
45
+ var Table;
46
+ return __generator(this, function (_a) {
47
+ switch (_a.label) {
48
+ case 0:
49
+ Table = sequelize.define(tableName, {
50
+ CompanyID: {
51
+ type: sequelize_1.STRING,
52
+ allowNull: true,
53
+ defaultValue: ''
54
+ },
55
+ UserName: {
56
+ type: sequelize_1.STRING,
57
+ allowNull: false
58
+ },
59
+ UserEmail: {
60
+ type: sequelize_1.STRING,
61
+ allowNull: false
62
+ },
63
+ CreatedDate: {
64
+ type: 'TIMESTAMP',
65
+ defaultValue: (0, sequelize_1.literal)('CURRENT_TIMESTAMP'),
66
+ allowNull: false
67
+ },
68
+ IPAddress: {
69
+ type: sequelize_1.STRING,
70
+ allowNull: false
71
+ },
72
+ TypeOfChange: {
73
+ type: sequelize_1.STRING,
74
+ allowNull: true,
75
+ defaultValue: ''
76
+ },
77
+ Module: {
78
+ type: sequelize_1.STRING,
79
+ allowNull: true,
80
+ defaultValue: ''
81
+ },
82
+ ChangeField: {
83
+ type: sequelize_1.TEXT,
84
+ allowNull: true,
85
+ defaultValue: ''
86
+ },
87
+ OldValue: {
88
+ type: sequelize_1.TEXT,
89
+ allowNull: true,
90
+ defaultValue: ''
91
+ },
92
+ NewValue: {
93
+ type: sequelize_1.TEXT,
94
+ allowNull: true,
95
+ defaultValue: ''
96
+ },
97
+ LogType: {
98
+ type: sequelize_1.ENUM,
99
+ values: ['session', 'audit'],
100
+ defaultValue: 'audit'
101
+ },
102
+ Browser: {
103
+ type: sequelize_1.STRING,
104
+ allowNull: true,
105
+ defaultValue: ''
106
+ },
107
+ Status: {
108
+ type: sequelize_1.STRING,
109
+ allowNull: true,
110
+ defaultValue: ''
111
+ },
112
+ Platform: {
113
+ type: sequelize_1.STRING,
114
+ allowNull: true,
115
+ defaultValue: ''
116
+ },
117
+ Application: {
118
+ type: sequelize_1.STRING,
119
+ allowNull: true,
120
+ defaultValue: ''
121
+ },
122
+ });
123
+ return [4 /*yield*/, Table.sync()];
124
+ case 1: return [2 /*return*/, _a.sent()];
125
+ }
126
+ });
127
+ }); });
@@ -1,32 +1,32 @@
1
- import { Request } from "express";
2
- import { MailConfig } from "./mail.modal";
3
- interface masterConnectionConfig extends MailConfig {
4
- MASTER_CONNECTION_STRING: string;
5
- MASTER_DB_NAME: string;
6
- ERROR_REPORT_FROM: string;
7
- ERROR_REPORT_TO: string;
8
- }
9
- interface tokenConfig {
10
- DBAddress: string;
11
- DBName: string;
12
- }
13
- interface OPT_Request extends Request {
14
- DBName?: string;
15
- DBAddress?: string;
16
- StorageType?: string;
17
- StorageSettings?: {
18
- [key: string]: any;
19
- };
20
- }
21
- interface OPT_ERROR extends Error {
22
- SendResponse: boolean;
23
- }
24
- interface ResponseStructure {
25
- Status: number;
26
- Data: any;
27
- Message: string;
28
- LogData?: boolean;
29
- OriginalStatus?: number;
30
- Type: "GET" | "PUT" | "DELETE" | "POST" | "ERROR";
31
- }
32
- export { masterConnectionConfig, tokenConfig, OPT_Request, ResponseStructure, OPT_ERROR };
1
+ import { Request } from "express";
2
+ import { MailConfig } from "./mail.modal";
3
+ interface masterConnectionConfig extends MailConfig {
4
+ MASTER_CONNECTION_STRING: string;
5
+ MASTER_DB_NAME: string;
6
+ ERROR_REPORT_FROM: string;
7
+ ERROR_REPORT_TO: string;
8
+ }
9
+ interface tokenConfig {
10
+ DBAddress: string;
11
+ DBName: string;
12
+ }
13
+ interface OPT_Request extends Request {
14
+ DBName?: string;
15
+ DBAddress?: string;
16
+ StorageType?: string;
17
+ StorageSettings?: {
18
+ [key: string]: any;
19
+ };
20
+ }
21
+ interface OPT_ERROR extends Error {
22
+ SendResponse: boolean;
23
+ }
24
+ interface ResponseStructure {
25
+ Status: number;
26
+ Data: any;
27
+ Message: string;
28
+ LogData?: boolean;
29
+ OriginalStatus?: number;
30
+ Type: "GET" | "PUT" | "DELETE" | "POST" | "ERROR";
31
+ }
32
+ export { masterConnectionConfig, tokenConfig, OPT_Request, ResponseStructure, OPT_ERROR };
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +1,8 @@
1
- import { ObjectId } from "bson";
2
- export interface GlobalNotificationData {
3
- EventObjectName: string;
4
- EventID: string | ObjectId;
5
- UserIds: string[] | ObjectId[];
6
- Message: string;
7
- CreatedBy: string | ObjectId;
8
- }
1
+ import { ObjectId } from "bson";
2
+ export interface GlobalNotificationData {
3
+ EventObjectName: string;
4
+ EventID: string | ObjectId;
5
+ UserIds: string[] | ObjectId[];
6
+ Message: string;
7
+ CreatedBy: string | ObjectId;
8
+ }
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,64 +1,64 @@
1
- import { String } from 'aws-sdk/clients/batch';
2
- import { EventType } from '../enums/log.enum';
3
- export interface LogObject {
4
- EventType: EventType;
5
- Module: string;
6
- OldValue: Array<any>;
7
- NewValue: Array<any>;
8
- Schema: {
9
- Fields: Array<any>;
10
- };
11
- }
12
- export interface ComparedObj {
13
- previousObj: {
14
- [key: string]: any;
15
- };
16
- updatedObj: {
17
- [key: string]: any;
18
- };
19
- }
20
- declare global {
21
- export namespace NodeJS {
22
- interface Global {
23
- dbConnections: {
24
- [key: string]: any;
25
- };
26
- }
27
- }
28
- }
29
- export declare namespace Express {
30
- interface Request {
31
- DBName: string;
32
- cookies: {
33
- [key: string]: {
34
- username: string;
35
- useremail: string;
36
- ci: string;
37
- };
38
- };
39
- headers: {
40
- [key: string]: any;
41
- };
42
- connection: {
43
- remoteAddress: string;
44
- socket: {
45
- remoteAddress: string;
46
- };
47
- };
48
- ip: string;
49
- socket: {
50
- remoteAddress: string;
51
- };
52
- }
53
- }
54
- export interface logDetails {
55
- LogType: string;
56
- UserName: string;
57
- UserEmail: string;
58
- IPAddress: string;
59
- Browser: string;
60
- Status: string;
61
- Platform: string;
62
- Application: string;
63
- CompanyId: String;
64
- }
1
+ import { String } from 'aws-sdk/clients/batch';
2
+ import { EventType } from '../enums/log.enum';
3
+ export interface LogObject {
4
+ EventType: EventType;
5
+ Module: string;
6
+ OldValue: Array<any>;
7
+ NewValue: Array<any>;
8
+ Schema: {
9
+ Fields: Array<any>;
10
+ };
11
+ }
12
+ export interface ComparedObj {
13
+ previousObj: {
14
+ [key: string]: any;
15
+ };
16
+ updatedObj: {
17
+ [key: string]: any;
18
+ };
19
+ }
20
+ declare global {
21
+ export namespace NodeJS {
22
+ interface Global {
23
+ dbConnections: {
24
+ [key: string]: any;
25
+ };
26
+ }
27
+ }
28
+ }
29
+ export declare namespace Express {
30
+ interface Request {
31
+ DBName: string;
32
+ cookies: {
33
+ [key: string]: {
34
+ username: string;
35
+ useremail: string;
36
+ ci: string;
37
+ };
38
+ };
39
+ headers: {
40
+ [key: string]: any;
41
+ };
42
+ connection: {
43
+ remoteAddress: string;
44
+ socket: {
45
+ remoteAddress: string;
46
+ };
47
+ };
48
+ ip: string;
49
+ socket: {
50
+ remoteAddress: string;
51
+ };
52
+ }
53
+ }
54
+ export interface logDetails {
55
+ LogType: string;
56
+ UserName: string;
57
+ UserEmail: string;
58
+ IPAddress: string;
59
+ Browser: string;
60
+ Status: string;
61
+ Platform: string;
62
+ Application: string;
63
+ CompanyId: String;
64
+ }
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });