-
Notifications
You must be signed in to change notification settings - Fork 14
/
app-constants.js
45 lines (39 loc) · 1.47 KB
/
app-constants.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
/**
* App constants
*/
const ADMIN_ROLES = ['administrator', 'admin']
const SEARCH_BY_EMAIL_ROLES = ADMIN_ROLES.concat('tgadmin');
const AUTOCOMPLETE_ROLES = ['copilot', 'administrator', 'admin', 'Connect Copilot', 'Connect Account Manager', 'Connect Admin', 'Account Executive']
const EVENT_ORIGINATOR = 'topcoder-member-api'
const EVENT_MIME_TYPE = 'application/json'
const TOPICS = {
MemberCreated: 'member.action.profile.create',
MemberUpdated: 'member.action.profile.update',
EmailChanged: 'member.action.email.profile.emailchange.verification',
MemberTraitCreated: 'member.action.profile.trait.create',
MemberTraitUpdated: 'member.action.profile.trait.update',
MemberTraitDeleted: 'member.action.profile.trait.delete',
MemberSkillsCreated: 'member.action.profile.skills.create',
MemberSkillsUpdated: 'member.action.profile.skills.update'
}
const ES_SEARCH_MAX_SIZE = 9999
const MAMBO_GET_REWARDS_ALLOWED_FIELDS = [
'awarded.awardedType', 'awarded.message', 'awarded.name', 'awarded.type',
'awarded.reward.active', 'awarded.reward.attrs', 'awarded.reward.id', 'awarded.reward.imageUrl', 'awarded.reward.mimeType', 'awarded.reward.hint', 'awarded.reward.message',
'awardedOn', 'expiryOn', 'isExpired', 'id'
]
const BOOLEAN_OPERATOR = {
AND: 'AND',
OR: 'OR'
}
module.exports = {
ADMIN_ROLES,
SEARCH_BY_EMAIL_ROLES,
AUTOCOMPLETE_ROLES,
EVENT_ORIGINATOR,
EVENT_MIME_TYPE,
TOPICS,
ES_SEARCH_MAX_SIZE,
MAMBO_GET_REWARDS_ALLOWED_FIELDS,
BOOLEAN_OPERATOR
}