-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathapp-constants.js
More file actions
48 lines (41 loc) · 1.64 KB
/
app-constants.js
File metadata and controls
48 lines (41 loc) · 1.64 KB
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
/**
* App constants
*/
const ADMIN_ROLES = ['administrator', 'admin']
const SENSITIVE_DATA_ROLES = [...ADMIN_ROLES, 'Talent Manager']
const SEARCH_BY_EMAIL_ROLES = ADMIN_ROLES.concat('tgadmin', 'copilot', 'Project Manager', 'Talent Manager')
const AUTOCOMPLETE_ROLES = ['copilot', 'administrator', 'admin', 'Connect Copilot', 'Connect Account Manager', 'Connect Admin', 'Account Executive', 'Talent Manager', 'Project Manager']
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 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'
}
const PHONE_REGEX = /^\+[1-9]\d{1,14}$/
module.exports = {
ADMIN_ROLES,
SENSITIVE_DATA_ROLES,
SEARCH_BY_EMAIL_ROLES,
AUTOCOMPLETE_ROLES,
EVENT_ORIGINATOR,
EVENT_MIME_TYPE,
TOPICS,
MAMBO_GET_REWARDS_ALLOWED_FIELDS,
BOOLEAN_OPERATOR,
PHONE_REGEX
}