@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.
- package/dist/aws/awsservices.d.ts +39 -39
- package/dist/aws/awsservices.js +398 -398
- package/dist/constants.d.ts +35 -35
- package/dist/constants.js +36 -36
- package/dist/enums/databasetype.enum.d.ts +7 -7
- package/dist/enums/databasetype.enum.js +11 -11
- package/dist/enums/log.enum.d.ts +22 -22
- package/dist/enums/log.enum.js +26 -26
- package/dist/index.d.ts +25 -25
- package/dist/index.js +69 -61
- package/dist/lib/activity.d.ts +1 -1
- package/dist/lib/activity.js +44 -44
- package/dist/lib/calculatedbsize.d.ts +15 -15
- package/dist/lib/calculatedbsize.js +75 -75
- package/dist/lib/connection.d.ts +116 -116
- package/dist/lib/connection.js +595 -595
- package/dist/lib/convertfilesize.d.ts +2 -2
- package/dist/lib/convertfilesize.js +15 -15
- package/dist/lib/countrycode.d.ts +2 -2
- package/dist/lib/countrycode.js +255 -255
- package/dist/lib/event.d.ts +26 -26
- package/dist/lib/event.js +252 -248
- package/dist/lib/helper.d.ts +94 -93
- package/dist/lib/helper.js +1016 -1009
- package/dist/lib/memoryserverclient.d.ts +40 -40
- package/dist/lib/memoryserverclient.js +256 -252
- package/dist/lib/operautilitycommon.d.ts +65 -65
- package/dist/lib/operautilitycommon.js +620 -620
- package/dist/lib/redis.d.ts +21 -21
- package/dist/lib/redis.js +46 -46
- package/dist/lib/socketidfromredis.d.ts +3 -3
- package/dist/lib/socketidfromredis.js +5 -5
- package/dist/lib/taskutils.d.ts +40 -40
- package/dist/lib/taskutils.js +656 -656
- package/dist/lib/utility.d.ts +300 -298
- package/dist/lib/utility.js +5626 -5621
- package/dist/lib/validateRequest.d.ts +3 -3
- package/dist/lib/validateRequest.js +13 -13
- package/dist/logs/auditlog.d.ts +25 -25
- package/dist/logs/auditlog.js +1033 -1029
- package/dist/logs/checklogtable.d.ts +3 -3
- package/dist/logs/checklogtable.js +67 -67
- package/dist/logs/log.table.d.ts +7 -7
- package/dist/logs/log.table.js +127 -127
- package/dist/modals/connection.modal.d.ts +32 -32
- package/dist/modals/connection.modal.js +2 -2
- package/dist/modals/globalNotification.modal.d.ts +8 -8
- package/dist/modals/globalNotification.modal.js +2 -2
- package/dist/modals/log.modal.d.ts +64 -64
- package/dist/modals/log.modal.js +2 -2
- package/dist/modals/mail.modal.d.ts +6 -6
- package/dist/modals/mail.modal.js +2 -2
- package/dist/modals/notificationData.modal.d.ts +29 -29
- package/dist/modals/notificationData.modal.js +2 -2
- package/dist/modals/redisconfig.modal.d.ts +6 -6
- package/dist/modals/redisconfig.modal.js +2 -2
- package/dist/modals/sqsconfig.modal.d.ts +8 -8
- package/dist/modals/sqsconfig.modal.js +2 -2
- package/dist/modals/utility.modal.d.ts +17 -17
- package/dist/modals/utility.modal.js +2 -2
- package/dist/utility/crypto.d.ts +4 -4
- package/dist/utility/crypto.js +43 -43
- package/dist/utility/errorHandler.d.ts +30 -30
- package/dist/utility/errorHandler.js +24 -24
- package/dist/utility/errorHandlerForServices.d.ts +22 -22
- package/dist/utility/errorHandlerForServices.js +19 -19
- package/dist/utility/mail.d.ts +21 -21
- package/dist/utility/mail.js +91 -87
- package/package.json +3 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const convertfilesize: (bytes: number, decimals?: number) => string;
|
|
2
|
-
export { convertfilesize };
|
|
1
|
+
declare const convertfilesize: (bytes: number, decimals?: number) => string;
|
|
2
|
+
export { convertfilesize };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.convertfilesize = void 0;
|
|
4
|
-
var convertfilesize = function (bytes, decimals) {
|
|
5
|
-
if (decimals === void 0) { decimals = 2; }
|
|
6
|
-
if (bytes === 0)
|
|
7
|
-
return '0 MB';
|
|
8
|
-
var k = 1024;
|
|
9
|
-
var dm = decimals < 0 ? 0 : decimals;
|
|
10
|
-
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
|
11
|
-
var i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
12
|
-
(i < 2) ? i = 2 : ''; // To set mb as the least returned value
|
|
13
|
-
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
|
|
14
|
-
};
|
|
15
|
-
exports.convertfilesize = convertfilesize;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.convertfilesize = void 0;
|
|
4
|
+
var convertfilesize = function (bytes, decimals) {
|
|
5
|
+
if (decimals === void 0) { decimals = 2; }
|
|
6
|
+
if (bytes === 0)
|
|
7
|
+
return '0 MB';
|
|
8
|
+
var k = 1024;
|
|
9
|
+
var dm = decimals < 0 ? 0 : decimals;
|
|
10
|
+
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
|
11
|
+
var i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
12
|
+
(i < 2) ? i = 2 : ''; // To set mb as the least returned value
|
|
13
|
+
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
|
|
14
|
+
};
|
|
15
|
+
exports.convertfilesize = convertfilesize;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare function getCountryFromCode(code: string): string;
|
|
2
|
-
export { getCountryFromCode };
|
|
1
|
+
declare function getCountryFromCode(code: string): string;
|
|
2
|
+
export { getCountryFromCode };
|
package/dist/lib/countrycode.js
CHANGED
|
@@ -1,255 +1,255 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCountryFromCode = void 0;
|
|
4
|
-
var data = {
|
|
5
|
-
"AF": "Afghanistan",
|
|
6
|
-
"AX": "Åland Islands",
|
|
7
|
-
"AL": "Albania",
|
|
8
|
-
"DZ": "Algeria",
|
|
9
|
-
"AS": "American Samoa",
|
|
10
|
-
"AD": "Andorra",
|
|
11
|
-
"AO": "Angola",
|
|
12
|
-
"AI": "Anguilla",
|
|
13
|
-
"AQ": "Antarctica",
|
|
14
|
-
"AG": "Antigua and Barbuda",
|
|
15
|
-
"AR": "Argentina",
|
|
16
|
-
"AM": "Armenia",
|
|
17
|
-
"AW": "Aruba",
|
|
18
|
-
"AU": "Australia",
|
|
19
|
-
"AT": "Austria",
|
|
20
|
-
"AZ": "Azerbaijan",
|
|
21
|
-
"BS": "Bahamas",
|
|
22
|
-
"BH": "Bahrain",
|
|
23
|
-
"BD": "Bangladesh",
|
|
24
|
-
"BB": "Barbados",
|
|
25
|
-
"BY": "Belarus",
|
|
26
|
-
"BE": "Belgium",
|
|
27
|
-
"BZ": "Belize",
|
|
28
|
-
"BJ": "Benin",
|
|
29
|
-
"BM": "Bermuda",
|
|
30
|
-
"BT": "Bhutan",
|
|
31
|
-
"BO": "Bolivia",
|
|
32
|
-
"BA": "Bosnia and Herzegovina",
|
|
33
|
-
"BW": "Botswana",
|
|
34
|
-
"BV": "Bouvet Island",
|
|
35
|
-
"BR": "Brazil",
|
|
36
|
-
"IO": "British Indian Ocean Territory",
|
|
37
|
-
"BN": "Brunei Darussalam",
|
|
38
|
-
"BG": "Bulgaria",
|
|
39
|
-
"BF": "Burkina Faso",
|
|
40
|
-
"BI": "Burundi",
|
|
41
|
-
"KH": "Cambodia",
|
|
42
|
-
"CM": "Cameroon",
|
|
43
|
-
"CA": "Canada",
|
|
44
|
-
"CV": "Cape Verde",
|
|
45
|
-
"KY": "Cayman Islands",
|
|
46
|
-
"CF": "Central African Republic",
|
|
47
|
-
"TD": "Chad",
|
|
48
|
-
"CL": "Chile",
|
|
49
|
-
"CN": "China",
|
|
50
|
-
"CX": "Christmas Island",
|
|
51
|
-
"CC": "Cocos (Keeling) Islands",
|
|
52
|
-
"CO": "Colombia",
|
|
53
|
-
"KM": "Comoros",
|
|
54
|
-
"CG": "Congo",
|
|
55
|
-
"CD": "Democratic Republic of the Congo",
|
|
56
|
-
"CK": "Cook Islands",
|
|
57
|
-
"CR": "Costa Rica",
|
|
58
|
-
"CI": "Cote D'Ivoire",
|
|
59
|
-
"HR": "Croatia",
|
|
60
|
-
"CU": "Cuba",
|
|
61
|
-
"CY": "Cyprus",
|
|
62
|
-
"CZ": "Czech Republic",
|
|
63
|
-
"DK": "Denmark",
|
|
64
|
-
"DJ": "Djibouti",
|
|
65
|
-
"DM": "Dominica",
|
|
66
|
-
"DO": "Dominican Republic",
|
|
67
|
-
"EC": "Ecuador",
|
|
68
|
-
"EG": "Egypt",
|
|
69
|
-
"SV": "El Salvador",
|
|
70
|
-
"GQ": "Equatorial Guinea",
|
|
71
|
-
"ER": "Eritrea",
|
|
72
|
-
"EE": "Estonia",
|
|
73
|
-
"ET": "Ethiopia",
|
|
74
|
-
"FK": "Falkland Islands (Malvinas)",
|
|
75
|
-
"FO": "Faroe Islands",
|
|
76
|
-
"FJ": "Fiji",
|
|
77
|
-
"FI": "Finland",
|
|
78
|
-
"FR": "France",
|
|
79
|
-
"GF": "French Guiana",
|
|
80
|
-
"PF": "French Polynesia",
|
|
81
|
-
"TF": "French Southern Territories",
|
|
82
|
-
"GA": "Gabon",
|
|
83
|
-
"GM": "Gambia",
|
|
84
|
-
"GE": "Georgia",
|
|
85
|
-
"DE": "Germany",
|
|
86
|
-
"GH": "Ghana",
|
|
87
|
-
"GI": "Gibraltar",
|
|
88
|
-
"GR": "Greece",
|
|
89
|
-
"GL": "Greenland",
|
|
90
|
-
"GD": "Grenada",
|
|
91
|
-
"GP": "Guadeloupe",
|
|
92
|
-
"GU": "Guam",
|
|
93
|
-
"GT": "Guatemala",
|
|
94
|
-
"GG": "Guernsey",
|
|
95
|
-
"GN": "Guinea",
|
|
96
|
-
"GW": "Guinea-Bissau",
|
|
97
|
-
"GY": "Guyana",
|
|
98
|
-
"HT": "Haiti",
|
|
99
|
-
"HM": "Heard Island and Mcdonald Islands",
|
|
100
|
-
"VA": "Vatican City",
|
|
101
|
-
"HN": "Honduras",
|
|
102
|
-
"HI": "Hawaii",
|
|
103
|
-
"HK": "Hong Kong",
|
|
104
|
-
"HU": "Hungary",
|
|
105
|
-
"IS": "Iceland",
|
|
106
|
-
"IN": "India",
|
|
107
|
-
"ID": "Indonesia",
|
|
108
|
-
"IR": "Iran",
|
|
109
|
-
"IQ": "Iraq",
|
|
110
|
-
"IE": "Ireland",
|
|
111
|
-
"IM": "Isle of Man",
|
|
112
|
-
"IL": "Israel",
|
|
113
|
-
"IT": "Italy",
|
|
114
|
-
"JM": "Jamaica",
|
|
115
|
-
"JP": "Japan",
|
|
116
|
-
"JE": "Jersey",
|
|
117
|
-
"JO": "Jordan",
|
|
118
|
-
"KZ": "Kazakhstan",
|
|
119
|
-
"KE": "Kenya",
|
|
120
|
-
"KI": "Kiribati",
|
|
121
|
-
"KP": "Korea",
|
|
122
|
-
"KR": "South Korea",
|
|
123
|
-
"KW": "Kuwait",
|
|
124
|
-
"KG": "Kyrgyzstan",
|
|
125
|
-
"LA": "Lao People'S Democratic Republic",
|
|
126
|
-
"LV": "Latvia",
|
|
127
|
-
"LB": "Lebanon",
|
|
128
|
-
"LS": "Lesotho",
|
|
129
|
-
"LR": "Liberia",
|
|
130
|
-
"LY": "Libya",
|
|
131
|
-
"LI": "Liechtenstein",
|
|
132
|
-
"LT": "Lithuania",
|
|
133
|
-
"LU": "Luxembourg",
|
|
134
|
-
"MO": "Macao",
|
|
135
|
-
"MK": "Macedonia",
|
|
136
|
-
"MG": "Madagascar",
|
|
137
|
-
"MW": "Malawi",
|
|
138
|
-
"MY": "Malaysia",
|
|
139
|
-
"MV": "Maldives",
|
|
140
|
-
"ML": "Mali",
|
|
141
|
-
"MT": "Malta",
|
|
142
|
-
"MH": "Marshall Islands",
|
|
143
|
-
"MQ": "Martinique",
|
|
144
|
-
"MR": "Mauritania",
|
|
145
|
-
"MU": "Mauritius",
|
|
146
|
-
"YT": "Mayotte",
|
|
147
|
-
"MX": "Mexico",
|
|
148
|
-
"FM": "Micronesia",
|
|
149
|
-
"MD": "Moldova",
|
|
150
|
-
"MC": "Monaco",
|
|
151
|
-
"MN": "Mongolia",
|
|
152
|
-
"ME": "Montenegro",
|
|
153
|
-
"MS": "Montserrat",
|
|
154
|
-
"MA": "Morocco",
|
|
155
|
-
"MZ": "Mozambique",
|
|
156
|
-
"MM": "Myanmar",
|
|
157
|
-
"NA": "Namibia",
|
|
158
|
-
"NR": "Nauru",
|
|
159
|
-
"NP": "Nepal",
|
|
160
|
-
"NL": "Netherlands",
|
|
161
|
-
"AN": "Netherlands Antilles",
|
|
162
|
-
"NC": "New Caledonia",
|
|
163
|
-
"NZ": "New Zealand",
|
|
164
|
-
"NI": "Nicaragua",
|
|
165
|
-
"NE": "Niger",
|
|
166
|
-
"NG": "Nigeria",
|
|
167
|
-
"NU": "Niue",
|
|
168
|
-
"NF": "Norfolk Island",
|
|
169
|
-
"MP": "Northern Mariana Islands",
|
|
170
|
-
"NO": "Norway",
|
|
171
|
-
"OM": "Oman",
|
|
172
|
-
"PK": "Pakistan",
|
|
173
|
-
"PW": "Palau",
|
|
174
|
-
"PS": "Palestinian Territory, Occupied",
|
|
175
|
-
"PA": "Panama",
|
|
176
|
-
"PG": "Papua New Guinea",
|
|
177
|
-
"PY": "Paraguay",
|
|
178
|
-
"PE": "Peru",
|
|
179
|
-
"PH": "Philippines",
|
|
180
|
-
"PN": "Pitcairn",
|
|
181
|
-
"PL": "Poland",
|
|
182
|
-
"PT": "Portugal",
|
|
183
|
-
"PR": "Puerto Rico",
|
|
184
|
-
"QA": "Qatar",
|
|
185
|
-
"RE": "Reunion",
|
|
186
|
-
"RO": "Romania",
|
|
187
|
-
"RU": "Russia",
|
|
188
|
-
"RW": "RWANDA",
|
|
189
|
-
"SH": "Saint Helena",
|
|
190
|
-
"KN": "Saint Kitts and Nevis",
|
|
191
|
-
"LC": "Saint Lucia",
|
|
192
|
-
"PM": "Saint Pierre and Miquelon",
|
|
193
|
-
"VC": "Saint Vincent and the Grenadines",
|
|
194
|
-
"WS": "Samoa",
|
|
195
|
-
"SCT": "Scotland",
|
|
196
|
-
"SM": "San Marino",
|
|
197
|
-
"ST": "Sao Tome and Principe",
|
|
198
|
-
"SA": "Saudi Arabia",
|
|
199
|
-
"SN": "Senegal",
|
|
200
|
-
"CS": "Serbia",
|
|
201
|
-
"SC": "Seychelles",
|
|
202
|
-
"SL": "Sierra Leone",
|
|
203
|
-
"SG": "Singapore",
|
|
204
|
-
"SK": "Slovakia",
|
|
205
|
-
"SI": "Slovenia",
|
|
206
|
-
"SB": "Solomon Islands",
|
|
207
|
-
"SO": "Somalia",
|
|
208
|
-
"ZA": "South Africa",
|
|
209
|
-
"GS": "South Georgia and the South Sandwich Islands",
|
|
210
|
-
"ES": "Spain",
|
|
211
|
-
"LK": "Sri Lanka",
|
|
212
|
-
"SD": "Sudan",
|
|
213
|
-
"SR": "Suriname",
|
|
214
|
-
"SJ": "Svalbard and Jan Mayen",
|
|
215
|
-
"SZ": "Swaziland",
|
|
216
|
-
"SE": "Sweden",
|
|
217
|
-
"CH": "Switzerland",
|
|
218
|
-
"SY": "Syria",
|
|
219
|
-
"TW": "Taiwan",
|
|
220
|
-
"TJ": "Tajikistan",
|
|
221
|
-
"TZ": "Tanzania",
|
|
222
|
-
"TH": "Thailand",
|
|
223
|
-
"TL": "Timor-Leste",
|
|
224
|
-
"TG": "Togo",
|
|
225
|
-
"TK": "Tokelau",
|
|
226
|
-
"TO": "Tonga",
|
|
227
|
-
"TT": "Trinidad and Tobago",
|
|
228
|
-
"TN": "Tunisia",
|
|
229
|
-
"TR": "Turkey",
|
|
230
|
-
"TM": "Turkmenistan",
|
|
231
|
-
"TC": "Turks and Caicos Islands",
|
|
232
|
-
"TV": "Tuvalu",
|
|
233
|
-
"UG": "Uganda",
|
|
234
|
-
"UA": "Ukraine",
|
|
235
|
-
"AE": "United Arab Emirates",
|
|
236
|
-
"GB": "United Kingdom",
|
|
237
|
-
"US": "United States",
|
|
238
|
-
"UM": "United States Minor Outlying Islands",
|
|
239
|
-
"UY": "Uruguay",
|
|
240
|
-
"UZ": "Uzbekistan",
|
|
241
|
-
"VU": "Vanuatu",
|
|
242
|
-
"VE": "Venezuela",
|
|
243
|
-
"VN": "Viet Nam",
|
|
244
|
-
"VG": "Virgin Islands, British",
|
|
245
|
-
"VI": "Virgin Islands, U.S.",
|
|
246
|
-
"WF": "Wallis and Futuna",
|
|
247
|
-
"EH": "Western Sahara",
|
|
248
|
-
"YE": "Yemen",
|
|
249
|
-
"ZM": "Zambia",
|
|
250
|
-
"ZW": "Zimbabwe"
|
|
251
|
-
};
|
|
252
|
-
function getCountryFromCode(code) {
|
|
253
|
-
return data[code];
|
|
254
|
-
}
|
|
255
|
-
exports.getCountryFromCode = getCountryFromCode;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCountryFromCode = void 0;
|
|
4
|
+
var data = {
|
|
5
|
+
"AF": "Afghanistan",
|
|
6
|
+
"AX": "Åland Islands",
|
|
7
|
+
"AL": "Albania",
|
|
8
|
+
"DZ": "Algeria",
|
|
9
|
+
"AS": "American Samoa",
|
|
10
|
+
"AD": "Andorra",
|
|
11
|
+
"AO": "Angola",
|
|
12
|
+
"AI": "Anguilla",
|
|
13
|
+
"AQ": "Antarctica",
|
|
14
|
+
"AG": "Antigua and Barbuda",
|
|
15
|
+
"AR": "Argentina",
|
|
16
|
+
"AM": "Armenia",
|
|
17
|
+
"AW": "Aruba",
|
|
18
|
+
"AU": "Australia",
|
|
19
|
+
"AT": "Austria",
|
|
20
|
+
"AZ": "Azerbaijan",
|
|
21
|
+
"BS": "Bahamas",
|
|
22
|
+
"BH": "Bahrain",
|
|
23
|
+
"BD": "Bangladesh",
|
|
24
|
+
"BB": "Barbados",
|
|
25
|
+
"BY": "Belarus",
|
|
26
|
+
"BE": "Belgium",
|
|
27
|
+
"BZ": "Belize",
|
|
28
|
+
"BJ": "Benin",
|
|
29
|
+
"BM": "Bermuda",
|
|
30
|
+
"BT": "Bhutan",
|
|
31
|
+
"BO": "Bolivia",
|
|
32
|
+
"BA": "Bosnia and Herzegovina",
|
|
33
|
+
"BW": "Botswana",
|
|
34
|
+
"BV": "Bouvet Island",
|
|
35
|
+
"BR": "Brazil",
|
|
36
|
+
"IO": "British Indian Ocean Territory",
|
|
37
|
+
"BN": "Brunei Darussalam",
|
|
38
|
+
"BG": "Bulgaria",
|
|
39
|
+
"BF": "Burkina Faso",
|
|
40
|
+
"BI": "Burundi",
|
|
41
|
+
"KH": "Cambodia",
|
|
42
|
+
"CM": "Cameroon",
|
|
43
|
+
"CA": "Canada",
|
|
44
|
+
"CV": "Cape Verde",
|
|
45
|
+
"KY": "Cayman Islands",
|
|
46
|
+
"CF": "Central African Republic",
|
|
47
|
+
"TD": "Chad",
|
|
48
|
+
"CL": "Chile",
|
|
49
|
+
"CN": "China",
|
|
50
|
+
"CX": "Christmas Island",
|
|
51
|
+
"CC": "Cocos (Keeling) Islands",
|
|
52
|
+
"CO": "Colombia",
|
|
53
|
+
"KM": "Comoros",
|
|
54
|
+
"CG": "Congo",
|
|
55
|
+
"CD": "Democratic Republic of the Congo",
|
|
56
|
+
"CK": "Cook Islands",
|
|
57
|
+
"CR": "Costa Rica",
|
|
58
|
+
"CI": "Cote D'Ivoire",
|
|
59
|
+
"HR": "Croatia",
|
|
60
|
+
"CU": "Cuba",
|
|
61
|
+
"CY": "Cyprus",
|
|
62
|
+
"CZ": "Czech Republic",
|
|
63
|
+
"DK": "Denmark",
|
|
64
|
+
"DJ": "Djibouti",
|
|
65
|
+
"DM": "Dominica",
|
|
66
|
+
"DO": "Dominican Republic",
|
|
67
|
+
"EC": "Ecuador",
|
|
68
|
+
"EG": "Egypt",
|
|
69
|
+
"SV": "El Salvador",
|
|
70
|
+
"GQ": "Equatorial Guinea",
|
|
71
|
+
"ER": "Eritrea",
|
|
72
|
+
"EE": "Estonia",
|
|
73
|
+
"ET": "Ethiopia",
|
|
74
|
+
"FK": "Falkland Islands (Malvinas)",
|
|
75
|
+
"FO": "Faroe Islands",
|
|
76
|
+
"FJ": "Fiji",
|
|
77
|
+
"FI": "Finland",
|
|
78
|
+
"FR": "France",
|
|
79
|
+
"GF": "French Guiana",
|
|
80
|
+
"PF": "French Polynesia",
|
|
81
|
+
"TF": "French Southern Territories",
|
|
82
|
+
"GA": "Gabon",
|
|
83
|
+
"GM": "Gambia",
|
|
84
|
+
"GE": "Georgia",
|
|
85
|
+
"DE": "Germany",
|
|
86
|
+
"GH": "Ghana",
|
|
87
|
+
"GI": "Gibraltar",
|
|
88
|
+
"GR": "Greece",
|
|
89
|
+
"GL": "Greenland",
|
|
90
|
+
"GD": "Grenada",
|
|
91
|
+
"GP": "Guadeloupe",
|
|
92
|
+
"GU": "Guam",
|
|
93
|
+
"GT": "Guatemala",
|
|
94
|
+
"GG": "Guernsey",
|
|
95
|
+
"GN": "Guinea",
|
|
96
|
+
"GW": "Guinea-Bissau",
|
|
97
|
+
"GY": "Guyana",
|
|
98
|
+
"HT": "Haiti",
|
|
99
|
+
"HM": "Heard Island and Mcdonald Islands",
|
|
100
|
+
"VA": "Vatican City",
|
|
101
|
+
"HN": "Honduras",
|
|
102
|
+
"HI": "Hawaii",
|
|
103
|
+
"HK": "Hong Kong",
|
|
104
|
+
"HU": "Hungary",
|
|
105
|
+
"IS": "Iceland",
|
|
106
|
+
"IN": "India",
|
|
107
|
+
"ID": "Indonesia",
|
|
108
|
+
"IR": "Iran",
|
|
109
|
+
"IQ": "Iraq",
|
|
110
|
+
"IE": "Ireland",
|
|
111
|
+
"IM": "Isle of Man",
|
|
112
|
+
"IL": "Israel",
|
|
113
|
+
"IT": "Italy",
|
|
114
|
+
"JM": "Jamaica",
|
|
115
|
+
"JP": "Japan",
|
|
116
|
+
"JE": "Jersey",
|
|
117
|
+
"JO": "Jordan",
|
|
118
|
+
"KZ": "Kazakhstan",
|
|
119
|
+
"KE": "Kenya",
|
|
120
|
+
"KI": "Kiribati",
|
|
121
|
+
"KP": "Korea",
|
|
122
|
+
"KR": "South Korea",
|
|
123
|
+
"KW": "Kuwait",
|
|
124
|
+
"KG": "Kyrgyzstan",
|
|
125
|
+
"LA": "Lao People'S Democratic Republic",
|
|
126
|
+
"LV": "Latvia",
|
|
127
|
+
"LB": "Lebanon",
|
|
128
|
+
"LS": "Lesotho",
|
|
129
|
+
"LR": "Liberia",
|
|
130
|
+
"LY": "Libya",
|
|
131
|
+
"LI": "Liechtenstein",
|
|
132
|
+
"LT": "Lithuania",
|
|
133
|
+
"LU": "Luxembourg",
|
|
134
|
+
"MO": "Macao",
|
|
135
|
+
"MK": "Macedonia",
|
|
136
|
+
"MG": "Madagascar",
|
|
137
|
+
"MW": "Malawi",
|
|
138
|
+
"MY": "Malaysia",
|
|
139
|
+
"MV": "Maldives",
|
|
140
|
+
"ML": "Mali",
|
|
141
|
+
"MT": "Malta",
|
|
142
|
+
"MH": "Marshall Islands",
|
|
143
|
+
"MQ": "Martinique",
|
|
144
|
+
"MR": "Mauritania",
|
|
145
|
+
"MU": "Mauritius",
|
|
146
|
+
"YT": "Mayotte",
|
|
147
|
+
"MX": "Mexico",
|
|
148
|
+
"FM": "Micronesia",
|
|
149
|
+
"MD": "Moldova",
|
|
150
|
+
"MC": "Monaco",
|
|
151
|
+
"MN": "Mongolia",
|
|
152
|
+
"ME": "Montenegro",
|
|
153
|
+
"MS": "Montserrat",
|
|
154
|
+
"MA": "Morocco",
|
|
155
|
+
"MZ": "Mozambique",
|
|
156
|
+
"MM": "Myanmar",
|
|
157
|
+
"NA": "Namibia",
|
|
158
|
+
"NR": "Nauru",
|
|
159
|
+
"NP": "Nepal",
|
|
160
|
+
"NL": "Netherlands",
|
|
161
|
+
"AN": "Netherlands Antilles",
|
|
162
|
+
"NC": "New Caledonia",
|
|
163
|
+
"NZ": "New Zealand",
|
|
164
|
+
"NI": "Nicaragua",
|
|
165
|
+
"NE": "Niger",
|
|
166
|
+
"NG": "Nigeria",
|
|
167
|
+
"NU": "Niue",
|
|
168
|
+
"NF": "Norfolk Island",
|
|
169
|
+
"MP": "Northern Mariana Islands",
|
|
170
|
+
"NO": "Norway",
|
|
171
|
+
"OM": "Oman",
|
|
172
|
+
"PK": "Pakistan",
|
|
173
|
+
"PW": "Palau",
|
|
174
|
+
"PS": "Palestinian Territory, Occupied",
|
|
175
|
+
"PA": "Panama",
|
|
176
|
+
"PG": "Papua New Guinea",
|
|
177
|
+
"PY": "Paraguay",
|
|
178
|
+
"PE": "Peru",
|
|
179
|
+
"PH": "Philippines",
|
|
180
|
+
"PN": "Pitcairn",
|
|
181
|
+
"PL": "Poland",
|
|
182
|
+
"PT": "Portugal",
|
|
183
|
+
"PR": "Puerto Rico",
|
|
184
|
+
"QA": "Qatar",
|
|
185
|
+
"RE": "Reunion",
|
|
186
|
+
"RO": "Romania",
|
|
187
|
+
"RU": "Russia",
|
|
188
|
+
"RW": "RWANDA",
|
|
189
|
+
"SH": "Saint Helena",
|
|
190
|
+
"KN": "Saint Kitts and Nevis",
|
|
191
|
+
"LC": "Saint Lucia",
|
|
192
|
+
"PM": "Saint Pierre and Miquelon",
|
|
193
|
+
"VC": "Saint Vincent and the Grenadines",
|
|
194
|
+
"WS": "Samoa",
|
|
195
|
+
"SCT": "Scotland",
|
|
196
|
+
"SM": "San Marino",
|
|
197
|
+
"ST": "Sao Tome and Principe",
|
|
198
|
+
"SA": "Saudi Arabia",
|
|
199
|
+
"SN": "Senegal",
|
|
200
|
+
"CS": "Serbia",
|
|
201
|
+
"SC": "Seychelles",
|
|
202
|
+
"SL": "Sierra Leone",
|
|
203
|
+
"SG": "Singapore",
|
|
204
|
+
"SK": "Slovakia",
|
|
205
|
+
"SI": "Slovenia",
|
|
206
|
+
"SB": "Solomon Islands",
|
|
207
|
+
"SO": "Somalia",
|
|
208
|
+
"ZA": "South Africa",
|
|
209
|
+
"GS": "South Georgia and the South Sandwich Islands",
|
|
210
|
+
"ES": "Spain",
|
|
211
|
+
"LK": "Sri Lanka",
|
|
212
|
+
"SD": "Sudan",
|
|
213
|
+
"SR": "Suriname",
|
|
214
|
+
"SJ": "Svalbard and Jan Mayen",
|
|
215
|
+
"SZ": "Swaziland",
|
|
216
|
+
"SE": "Sweden",
|
|
217
|
+
"CH": "Switzerland",
|
|
218
|
+
"SY": "Syria",
|
|
219
|
+
"TW": "Taiwan",
|
|
220
|
+
"TJ": "Tajikistan",
|
|
221
|
+
"TZ": "Tanzania",
|
|
222
|
+
"TH": "Thailand",
|
|
223
|
+
"TL": "Timor-Leste",
|
|
224
|
+
"TG": "Togo",
|
|
225
|
+
"TK": "Tokelau",
|
|
226
|
+
"TO": "Tonga",
|
|
227
|
+
"TT": "Trinidad and Tobago",
|
|
228
|
+
"TN": "Tunisia",
|
|
229
|
+
"TR": "Turkey",
|
|
230
|
+
"TM": "Turkmenistan",
|
|
231
|
+
"TC": "Turks and Caicos Islands",
|
|
232
|
+
"TV": "Tuvalu",
|
|
233
|
+
"UG": "Uganda",
|
|
234
|
+
"UA": "Ukraine",
|
|
235
|
+
"AE": "United Arab Emirates",
|
|
236
|
+
"GB": "United Kingdom",
|
|
237
|
+
"US": "United States",
|
|
238
|
+
"UM": "United States Minor Outlying Islands",
|
|
239
|
+
"UY": "Uruguay",
|
|
240
|
+
"UZ": "Uzbekistan",
|
|
241
|
+
"VU": "Vanuatu",
|
|
242
|
+
"VE": "Venezuela",
|
|
243
|
+
"VN": "Viet Nam",
|
|
244
|
+
"VG": "Virgin Islands, British",
|
|
245
|
+
"VI": "Virgin Islands, U.S.",
|
|
246
|
+
"WF": "Wallis and Futuna",
|
|
247
|
+
"EH": "Western Sahara",
|
|
248
|
+
"YE": "Yemen",
|
|
249
|
+
"ZM": "Zambia",
|
|
250
|
+
"ZW": "Zimbabwe"
|
|
251
|
+
};
|
|
252
|
+
function getCountryFromCode(code) {
|
|
253
|
+
return data[code];
|
|
254
|
+
}
|
|
255
|
+
exports.getCountryFromCode = getCountryFromCode;
|
package/dist/lib/event.d.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { AWSError } from "aws-sdk";
|
|
2
|
-
import { SQSConfig } from "../modals/sqsconfig.modal";
|
|
3
|
-
import { NotificationData } from "../modals/notificationData.modal";
|
|
4
|
-
import { Db } from "mongodb";
|
|
5
|
-
import { GlobalNotificationData } from "../modals/globalNotification.modal";
|
|
6
|
-
export declare class Event {
|
|
7
|
-
private sqs;
|
|
8
|
-
private queueURL;
|
|
9
|
-
private FCMMobileServiceAccountKey;
|
|
10
|
-
constructor(eventConfig: SQSConfig);
|
|
11
|
-
/**
|
|
12
|
-
* @param userId
|
|
13
|
-
* @param db company DB
|
|
14
|
-
* @param data Notification Object to send Push Notification, EMail and socket Events
|
|
15
|
-
*/
|
|
16
|
-
CreateEvent: (userId: string | null, db: Db | null, data: NotificationData) => Promise<string | AWSError | any>;
|
|
17
|
-
/**
|
|
18
|
-
* @param userIds
|
|
19
|
-
* @param db
|
|
20
|
-
* @param data notification object
|
|
21
|
-
* @description to send push notification, desktop notification, Email notification to user
|
|
22
|
-
*/
|
|
23
|
-
CreateEvents: (userIds: string[] | [], db: Db | null, data: NotificationData) => Promise<any>;
|
|
24
|
-
RefreshNotificationBar: (userId: string) => void;
|
|
25
|
-
SetGlobalNotification: (data: GlobalNotificationData, db: Db) => Promise<any>;
|
|
26
|
-
}
|
|
1
|
+
import { AWSError } from "aws-sdk";
|
|
2
|
+
import { SQSConfig } from "../modals/sqsconfig.modal";
|
|
3
|
+
import { NotificationData } from "../modals/notificationData.modal";
|
|
4
|
+
import { Db } from "mongodb";
|
|
5
|
+
import { GlobalNotificationData } from "../modals/globalNotification.modal";
|
|
6
|
+
export declare class Event {
|
|
7
|
+
private sqs;
|
|
8
|
+
private queueURL;
|
|
9
|
+
private FCMMobileServiceAccountKey;
|
|
10
|
+
constructor(eventConfig: SQSConfig);
|
|
11
|
+
/**
|
|
12
|
+
* @param userId
|
|
13
|
+
* @param db company DB
|
|
14
|
+
* @param data Notification Object to send Push Notification, EMail and socket Events
|
|
15
|
+
*/
|
|
16
|
+
CreateEvent: (userId: string | null, db: Db | null, data: NotificationData) => Promise<string | AWSError | any>;
|
|
17
|
+
/**
|
|
18
|
+
* @param userIds
|
|
19
|
+
* @param db
|
|
20
|
+
* @param data notification object
|
|
21
|
+
* @description to send push notification, desktop notification, Email notification to user
|
|
22
|
+
*/
|
|
23
|
+
CreateEvents: (userIds: string[] | [], db: Db | null, data: NotificationData) => Promise<any>;
|
|
24
|
+
RefreshNotificationBar: (userId: string) => void;
|
|
25
|
+
SetGlobalNotification: (data: GlobalNotificationData, db: Db) => Promise<any>;
|
|
26
|
+
}
|