forked from nokiadatagathering/MDGServer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
configurationSchema.js
288 lines (288 loc) · 11.6 KB
/
configurationSchema.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
module.exports = {
general: {
title: 'General',
description: '',
children: {
siteName: {
type: String,
title: 'Site Name',
description: '',
defaults: 'NOKIA DATA GATHERING'
},
protocolType: {
type: String,
title: 'Protocol',
description: 'This parameter can be set to http or https',
defaults: 'http'
},
httpspfx: {
type: String,
title: 'https pfx',
description: 'Path to .pfx file',
defaults: './ndg.pfx'
},
httpspassphrase: {
type: String,
title: 'https password phrase',
description: 'Password required by certificate',
defaults: 'q1w2e3r4'
},
port: {
type: String,
title: 'Port',
description: '',
defaults: 3000
},
mongodbUrl: {
type: String,
title: 'Mongo DB Url',
description: '',
defaults: process.env.MONGO_URL || 'mongodb://127.0.0.1:27017/MDG'
},
questionsTypes: {
type: Object,
title: 'Available questions types',
description: 'Types of questions that can be used',
defaults: ['string', 'int', 'decimal', 'date', 'geopoint', 'binary', 'binary#image', 'select', 'select1', 'time', 'note']
},
countries: {
type: Object,
title: 'Available countries',
description: 'Available countries that can be used in registration form',
defaults: ["Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegovina", "Botswana", "Bouvet Island", "Brazil", "British Antarctic Territory", "British Indian Ocean Territory", "British Virgin Islands", "Brunei", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Canton and Enderbury Islands", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos [Keeling] Islands", "Colombia", "Comoros", "Congo - Brazzaville", "Congo - Kinshasa", "Cook Islands", "Costa Rica", "Croatia", "Cuba", "Cyprus", "Czech Republic", "Côte d’Ivoire", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "Dronning Maud Land", "East Germany", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Islands", "Faroe Islands", "Fiji", "Finland", "France", "French Guiana", "French Polynesia", "French Southern Territories", "French Southern and Antarctic Territories", "Gabon", "Gambia", "Georgia", "Germany", "Ghana", "Gibraltar", "Greece", "Greenland", "Grenada", "Guadeloupe", "Guam", "Guatemala", "Guernsey", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Heard Island and McDonald Islands", "Honduras", "Hong Kong SAR China", "Hungary", "Iceland", "India", "Indonesia", "Iran", "Iraq", "Ireland", "Isle of Man", "Israel", "Italy", "Jamaica", "Japan", "Jersey", "Johnston Island", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Kuwait", "Kyrgyzstan", "Laos", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg", "Macau SAR China", "Macedonia", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Martinique", "Mauritania", "Mauritius", "Mayotte", "Metropolitan France", "Mexico", "Micronesia", "Midway Islands", "Moldova", "Monaco", "Mongolia", "Montenegro", "Montserrat", "Morocco", "Mozambique", "Myanmar [Burma]", "Namibia", "Nauru", "Nepal", "Netherlands", "Netherlands Antilles", "Neutral Zone", "New Caledonia", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Niue", "Norfolk Island", "North Korea", "North Vietnam", "Northern Mariana Islands", "Norway", "Oman", "Pacific Islands Trust Territory", "Pakistan", "Palau", "Palestinian Territories", "Panama", "Panama Canal Zone", "Papua New Guinea", "Paraguay", "People's Democratic Republic of Yemen", "Peru", "Philippines", "Pitcairn Islands", "Poland", "Portugal", "Puerto Rico", "Qatar", "Romania", "Russia", "Rwanda", "Réunion", "Saint Barthélemy", "Saint Helena", "Saint Kitts and Nevis", "Saint Lucia", "Saint Martin", "Saint Pierre and Miquelon", "Saint Vincent and the Grenadines", "Samoa", "San Marino", "Saudi Arabia", "Senegal", "Serbia", "Serbia and Montenegro", "Seychelles", "Sierra Leone", "Singapore", "Slovakia", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "South Georgia and the South Sandwich Islands", "South Korea", "Spain", "Sri Lanka", "Sudan", "Suriname", "Svalbard and Jan Mayen", "Swaziland", "Sweden", "Switzerland", "Syria", "São Tomé and Príncipe", "Taiwan", "Tajikistan", "Tanzania", "Thailand", "Timor-Leste", "Togo", "Tokelau", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey", "Turkmenistan", "Turks and Caicos Islands", "Tuvalu", "U.S. Minor Outlying Islands", "U.S. Miscellaneous Pacific Islands", "U.S. Virgin Islands", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", "Unknown or Invalid Region", "Uruguay", "Uzbekistan", "Vanuatu", "Vatican City", "Venezuela", "Vietnam", "Wake Island", "Wallis and Futuna", "Western Sahara", "Yemen", "Zambia", "Zimbabwe", "Åland Islands"]
}
}
},
languages: {
title: 'Languages',
description: 'Parameters for Digest Authorization. Do NOT change these unless you know what you are doing',
children: {
preferred: {
type: String,
title: 'preferred language',
description: '',
defaults: 'en'
},
supported_languages: {
type: Object,
title: 'Supported languages',
description: '',
defaults: [
{value: 'en', text: 'English'},
{value: 'ru', text: 'Русский'},
{value: 'zh', text: '中文'},
{value: 'vi', text: 'Việt' }
]
},
supported_languages_mobile: {
type: String,
title: 'Supported languages mobile',
description: '',
defaults: 'Chinese ch\r\nVietnamese vi\r\nSpanish es\r\nFinnish fi\r\nPortuguese pt\r\nRussian ru\r\n'
}
}
},
digestAuth: {
title: 'Digest Auth',
description: 'Parameters for Digest Authorization. Do NOT change these unless you know what you are doing',
children: {
qop: {
type: String,
title: 'qop',
defaults: 'auth'
},
realm: {
type: String,
title: 'realm',
defaults: 'NDG'
},
algorithm: {
type: String,
title: 'algorithm',
defaults: 'MD5'
},
opaque: {
type: String,
title: 'opaque',
defaults: 'bmRnb3BhcXVl'
}
}
},
basicAuth: {
title: 'Basic Auth',
description: 'Parameters for Basic Authorization.',
children: {
username: {
type: String,
title: 'username',
defaults: 'admin'
},
password: {
type: String,
title: 'password',
defaults: 'admin'
}
}
},
tests: {
title: 'Tests',
description: '',
children: {
host: {
type: String,
title: 'Host',
description: 'Host (ip) to bind for tests',
defaults: 'localhost'
},
port: {
type: String,
title: 'Port',
description: 'Port on which testing server will run',
defaults: 4000
},
mongodbUrl: {
type: String,
title: 'MongoDB Url',
description: '',
defaults: process.env.MONGO_TEST_URL || 'mongodb://127.0.0.1:27017/MDG-test'
}
}
},
twilio: {
title: 'Twilio',
description: 'Set of parameters used for Twilio configuration',
children: {
accountSid: {
type: String,
title: 'Twilio Account Sid',
description: 'Unique ID of the Account - first credential to determine which account an API request is coming from (acts as username)',
defaults: ''
},
authToken: {
type: String,
title: 'Twilio Auth Token',
description: 'Auth Token - second credential which acts as a password',
defaults: ''
},
phoneNumber: {
type: String,
title: 'Twilio Phone Number',
description: 'Phone number provided by Twilio',
defaults: ''
}
}
},
messages: {
title: 'Messages',
description: '',
children: {
registrationSms: {
type: String,
title: 'User Register Sms',
description: '',
defaults: 'Hello, your credentials for MDG are: username %s, password %s.'
},
userUpdateSms: {
type: String,
title: 'User Register Sms',
description: '',
defaults: 'Hello, your credentials for MDG have been changed to: username %s, password %s.'
},
headerSms: {
type: String,
title: 'User Register Sms',
description: '',
defaults: 'MDG: '
}
}
},
mail: {
title: 'Mail',
description: 'Set of parameters related to mail configuration',
children: {
from: {
title: 'Mail from',
description: 'Defines e-mail for system messages',
children: {
registration: {
type: String,
title: 'Registration Email from',
description: '',
defaults: '[email protected]'
},
subscription: {
type: String,
title: 'Subscription Email from',
description: '',
defaults: '[email protected]'
},
report: {
type: String,
title: 'Subscription Email from',
description: '',
defaults: '[email protected]'
},
forgotUsername: {
type: String,
title: 'Forgot Username Email from',
description: '',
defaults: '[email protected]'
},
resetPassword: {
type: String,
title: 'Reset Password Email from',
description: '',
defaults: '[email protected]'
},
passwordChanged: {
type: String,
title: 'Password Changed Email from',
description: '',
defaults: '[email protected]'
}
}
},
mandrillApiKey: {
type: String,
title: 'Mandrill Api Key',
description: 'Defines Mandrill Api Key',
defaults: ''
},
emailsForUsersReport: {
type: Object,
title: 'Emails for users registrations report',
defaults: []
},
registration: {
type: String,
title: 'Registration Email',
defaults: '/app/views/emails/${languages.preferred}/registrationEmail.jade'
},
subscription: {
type: String,
title: 'Subscription Email',
defaults: '/app/views/emails/${languages.preferred}/subscriptionEmail.jade'
},
report: {
type: String,
title: 'Registration Email',
defaults: '/app/views/emails/reportEmail.jade'
},
forgotUsername: {
type: String,
title: 'Forgot Username Email',
defaults: '/app/views/emails/${languages.preferred}/forgotUsernameEmail.jade'
},
resetPassword: {
type: String,
title: 'Reset Password Email',
defaults: '/app/views/emails/${languages.preferred}/resetPasswordEmail.jade'
},
passwordChanged: {
type: String,
title: 'Password Changed Email',
defaults: '/app/views/emails/${languages.preferred}/passwordChangedEmail.jade'
}
}
}
};