1
- const config = require ( ' config' )
1
+ const config = require ( " config" ) ;
2
2
3
3
/**
4
4
* App constants
5
5
*/
6
6
const UserRoles = {
7
- Admin : ' administrator' ,
8
- Copilot : ' copilot' ,
9
- Manager : ' Connect Manager' ,
10
- User : ' Topcoder User' ,
11
- SelfServiceCustomer : ' Self-Service Customer'
12
- }
7
+ Admin : " administrator" ,
8
+ Copilot : " copilot" ,
9
+ Manager : " Connect Manager" ,
10
+ User : " Topcoder User" ,
11
+ SelfServiceCustomer : " Self-Service Customer" ,
12
+ } ;
13
13
14
14
const prizeSetTypes = {
15
- ChallengePrizes : ' placement' ,
16
- CopilotPayment : ' copilot' ,
17
- ReviewerPayment : ' reviewer' ,
18
- CheckpointPrizes : ' checkpoint'
19
- }
15
+ ChallengePrizes : " placement" ,
16
+ CopilotPayment : " copilot" ,
17
+ ReviewerPayment : " reviewer" ,
18
+ CheckpointPrizes : " checkpoint" ,
19
+ } ;
20
20
21
21
const challengeStatuses = {
22
- New : ' New' ,
23
- Draft : ' Draft' ,
24
- Approved : ' Approved' ,
25
- Cancelled : ' Cancelled' ,
26
- Active : ' Active' ,
27
- Completed : ' Completed' ,
28
- Deleted : ' Deleted' ,
29
- CancelledFailedReview : ' Cancelled - Failed Review' ,
30
- CancelledFailedScreening : ' Cancelled - Failed Screening' ,
31
- CancelledZeroSubmissions : ' Cancelled - Zero Submissions' ,
32
- CancelledWinnerUnresponsive : ' Cancelled - Winner Unresponsive' ,
33
- CancelledClientRequest : ' Cancelled - Client Request' ,
34
- CancelledRequirementsInfeasible : ' Cancelled - Requirements Infeasible' ,
35
- CancelledZeroRegistrations : ' Cancelled - Zero Registrations' ,
36
- CancelledPaymentFailed : ' Cancelled - Payment Failed'
37
- }
22
+ New : " New" ,
23
+ Draft : " Draft" ,
24
+ Approved : " Approved" ,
25
+ Cancelled : " Cancelled" ,
26
+ Active : " Active" ,
27
+ Completed : " Completed" ,
28
+ Deleted : " Deleted" ,
29
+ CancelledFailedReview : " Cancelled - Failed Review" ,
30
+ CancelledFailedScreening : " Cancelled - Failed Screening" ,
31
+ CancelledZeroSubmissions : " Cancelled - Zero Submissions" ,
32
+ CancelledWinnerUnresponsive : " Cancelled - Winner Unresponsive" ,
33
+ CancelledClientRequest : " Cancelled - Client Request" ,
34
+ CancelledRequirementsInfeasible : " Cancelled - Requirements Infeasible" ,
35
+ CancelledZeroRegistrations : " Cancelled - Zero Registrations" ,
36
+ CancelledPaymentFailed : " Cancelled - Payment Failed" ,
37
+ } ;
38
38
39
39
const validChallengeParams = {
40
- UpdatedBy : ' updatedBy' ,
41
- Updated : ' updated' ,
42
- CreatedBy : ' createdBy' ,
43
- Created : ' created' ,
44
- EndDate : ' endDate' ,
45
- StartDate : ' startDate' ,
46
- ProjectId : ' projectId' ,
47
- Name : ' name' ,
48
- TypeId : ' typeId' ,
49
- Prizes : ' overview.totalPrizes'
50
- }
40
+ UpdatedBy : " updatedBy" ,
41
+ Updated : " updated" ,
42
+ CreatedBy : " createdBy" ,
43
+ Created : " created" ,
44
+ EndDate : " endDate" ,
45
+ StartDate : " startDate" ,
46
+ ProjectId : " projectId" ,
47
+ Name : " name" ,
48
+ TypeId : " typeId" ,
49
+ Prizes : " overview.totalPrizes" ,
50
+ } ;
51
51
52
- const EVENT_ORIGINATOR = ' topcoder-challenges-api'
52
+ const EVENT_ORIGINATOR = " topcoder-challenges-api" ;
53
53
54
- const EVENT_MIME_TYPE = ' application/json'
54
+ const EVENT_MIME_TYPE = " application/json" ;
55
55
56
56
const DiscussionTypes = {
57
- Challenge : ' challenge'
58
- }
57
+ Challenge : " challenge" ,
58
+ } ;
59
59
60
60
// using a testing topc, should be changed to use real topics in comments when they are created
61
61
const Topics = {
62
- ChallengeCreated : ' challenge.notification.create' ,
63
- ChallengeUpdated : ' challenge.notification.update' ,
64
- ChallengeDeleted : ' challenge.notification.delete' ,
65
- ChallengeTypeCreated : ' test.new.bus.events' , // 'challenge.action.type.created',
66
- ChallengeTypeUpdated : ' test.new.bus.events' , // 'challenge.action.type.updated',
67
- ChallengePhaseCreated : ' test.new.bus.events' , // 'challenge.action.phase.created',
68
- ChallengePhaseUpdated : ' test.new.bus.events' , // 'challenge.action.phase.updated',
69
- ChallengePhaseDeleted : ' test.new.bus.events' , // 'challenge.action.phase.deleted',
70
- TimelineTemplateCreated : ' test.new.bus.events' , // 'challenge.action.timeline.template.created',
71
- TimelineTemplateUpdated : ' test.new.bus.events' , // 'challenge.action.timeline.template.updated',
72
- TimelineTemplateDeleted : ' test.new.bus.events' , // 'challenge.action.timeline.template.deleted',
73
- ChallengeTypeTimelineTemplateCreated : ' test.new.bus.events' , // 'challenge.action.type.timeline.template.created',
74
- ChallengeTypeTimelineTemplateUpdated : ' test.new.bus.events' , // 'challenge.action.type.timeline.template.updated',
75
- ChallengeTypeTimelineTemplateDeleted : ' test.new.bus.events' , // 'challenge.action.type.timeline.template.deleted'
76
- ChallengeAttachmentCreated : ' test.new.bus.events' , // 'challenge.action.attachment.created',
77
- ChallengeAttachmentUpdated : ' test.new.bus.events' , // 'challenge.action.attachment.updated',
78
- ChallengeAttachmentDeleted : ' test.new.bus.events' , // 'challenge.action.attachment.deleted',
62
+ ChallengeCreated : " challenge.notification.create" ,
63
+ ChallengeUpdated : " challenge.notification.update" ,
64
+ ChallengeDeleted : " challenge.notification.delete" ,
65
+ ChallengeTypeCreated : " test.new.bus.events" , // 'challenge.action.type.created',
66
+ ChallengeTypeUpdated : " test.new.bus.events" , // 'challenge.action.type.updated',
67
+ ChallengePhaseCreated : " test.new.bus.events" , // 'challenge.action.phase.created',
68
+ ChallengePhaseUpdated : " test.new.bus.events" , // 'challenge.action.phase.updated',
69
+ ChallengePhaseDeleted : " test.new.bus.events" , // 'challenge.action.phase.deleted',
70
+ TimelineTemplateCreated : " test.new.bus.events" , // 'challenge.action.timeline.template.created',
71
+ TimelineTemplateUpdated : " test.new.bus.events" , // 'challenge.action.timeline.template.updated',
72
+ TimelineTemplateDeleted : " test.new.bus.events" , // 'challenge.action.timeline.template.deleted',
73
+ ChallengeTimelineTemplateCreated : " test.new.bus.events" , // 'challenge.action.type.timeline.template.created',
74
+ ChallengeTimelineTemplateUpdated : " test.new.bus.events" , // 'challenge.action.type.timeline.template.updated',
75
+ ChallengeTimelineTemplateDeleted : " test.new.bus.events" , // 'challenge.action.type.timeline.template.deleted'
76
+ ChallengeAttachmentCreated : " test.new.bus.events" , // 'challenge.action.attachment.created',
77
+ ChallengeAttachmentUpdated : " test.new.bus.events" , // 'challenge.action.attachment.updated',
78
+ ChallengeAttachmentDeleted : " test.new.bus.events" , // 'challenge.action.attachment.deleted',
79
79
// Self Service topics
80
- Notifications : ' notifications.action.create'
81
- }
80
+ Notifications : " notifications.action.create" ,
81
+ } ;
82
82
83
83
const challengeTracks = {
84
- DEVELOP : ' DEVELOP' ,
85
- DESIGN : ' DESIGN' ,
86
- DATA_SCIENCE : ' DATA_SCIENCE' ,
87
- QA : 'QA'
88
- }
84
+ DEVELOP : " DEVELOP" ,
85
+ DESIGN : " DESIGN" ,
86
+ DATA_SCIENCE : " DATA_SCIENCE" ,
87
+ QA : "QA" ,
88
+ } ;
89
89
90
90
const challengeTextSortField = {
91
- Name : ' name' ,
92
- TypeId : ' typeId'
93
- }
91
+ Name : " name" ,
92
+ TypeId : " typeId" ,
93
+ } ;
94
94
95
95
const reviewTypes = {
96
- Community : ' COMMUNITY' ,
97
- Internal : ' INTERNAL'
98
- }
96
+ Community : " COMMUNITY" ,
97
+ Internal : " INTERNAL" ,
98
+ } ;
99
99
100
100
const SelfServiceNotificationTypes = {
101
- WORK_REQUEST_SUBMITTED : ' self-service.notifications.work-request-submitted' ,
102
- WORK_REQUEST_STARTED : ' self-service.notifications.work-request-started' ,
103
- WORK_REQUEST_REDIRECTED : ' self-service.notifications.work-request-redirected' ,
104
- WORK_COMPLETED : ' self-service.notifications.work-completed'
105
- }
101
+ WORK_REQUEST_SUBMITTED : " self-service.notifications.work-request-submitted" ,
102
+ WORK_REQUEST_STARTED : " self-service.notifications.work-request-started" ,
103
+ WORK_REQUEST_REDIRECTED : " self-service.notifications.work-request-redirected" ,
104
+ WORK_COMPLETED : " self-service.notifications.work-completed" ,
105
+ } ;
106
106
107
107
const SelfServiceNotificationSettings = {
108
108
[ SelfServiceNotificationTypes . WORK_REQUEST_SUBMITTED ] : {
109
109
sendgridTemplateId : config . SENDGRID_TEMPLATES . WORK_REQUEST_SUBMITTED ,
110
- cc : [ ]
110
+ cc : [ ] ,
111
111
} ,
112
112
[ SelfServiceNotificationTypes . WORK_REQUEST_STARTED ] : {
113
113
sendgridTemplateId : config . SENDGRID_TEMPLATES . WORK_REQUEST_STARTED ,
114
- cc : [ ]
114
+ cc : [ ] ,
115
115
} ,
116
116
[ SelfServiceNotificationTypes . WORK_REQUEST_REDIRECTED ] : {
117
117
sendgridTemplateId : config . SENDGRID_TEMPLATES . WORK_REQUEST_REDIRECTED ,
118
- cc : [ ...config . SELF_SERVICE_EMAIL_CC_ACCOUNTS ]
118
+ cc : [ ...config . SELF_SERVICE_EMAIL_CC_ACCOUNTS ] ,
119
119
} ,
120
120
[ SelfServiceNotificationTypes . WORK_COMPLETED ] : {
121
121
sendgridTemplateId : config . SENDGRID_TEMPLATES . WORK_COMPLETED ,
122
- cc : [ ]
123
- }
124
- }
122
+ cc : [ ] ,
123
+ } ,
124
+ } ;
125
125
126
126
module . exports = {
127
127
UserRoles,
@@ -136,5 +136,5 @@ module.exports = {
136
136
DiscussionTypes,
137
137
reviewTypes,
138
138
SelfServiceNotificationTypes,
139
- SelfServiceNotificationSettings
140
- }
139
+ SelfServiceNotificationSettings,
140
+ } ;
0 commit comments