-
Notifications
You must be signed in to change notification settings - Fork 33
/
email_template.config.js
229 lines (223 loc) · 9.5 KB
/
email_template.config.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
/*
* Configure email templates.
* Variables can be used inside the subject and the message of a template(enclosed in double curly braces).
*/
const config = require('config')
module.exports = {
/**
* List all the kind of emails which could be sent by the endpoint `POST /taas-teams/email` inside `teamTemplates`.
*/
teamTemplates: {
/* Report a general issue for a team.
*
* - projectId: the project ID. Example: 123412
* - projectName: the project name. Example: "TaaS API Misc Updates"
* - reportText: the body of reported issue. Example: "I have issue with ... \n ... Thank you in advance!"
*/
'team-issue-report': {
subject: 'Issue Reported on TaaS Team {{projectName}} ({{projectId}}).',
body: 'Project Name: {{projectName}}' + '\n' +
'Project ID: {{projectId}}' + '\n' +
`Project URL: ${config.TAAS_APP_URL}/{{projectId}}` + '\n' +
'\n' +
'{{reportText}}',
recipients: config.REPORT_ISSUE_EMAILS,
sendgridTemplateId: config.REPORT_ISSUE_SENDGRID_TEMPLATE_ID
},
/* Report issue for a particular member
*
* - userHandle: the user handle. Example: "bili_2021"
* - projectId: the project ID. Example: 123412
* - projectName: the project name. Example: "TaaS API Misc Updates"
* - reportText: the body of reported issue. Example: "I have issue with ... \n ... Thank you in advance!"
*/
'member-issue-report': {
subject: 'Issue Reported for member {{userHandle}} on TaaS Team {{projectName}} ({{projectId}}).',
body: 'User Handle: {{userHandle}}' + '\n' +
'Project Name: {{projectName}}' + '\n' +
'Project ID: {{projectId}}' + '\n' +
`Project URL: ${config.TAAS_APP_URL}/{{projectId}}` + '\n' +
'\n' +
'{{reportText}}',
recipients: config.REPORT_ISSUE_EMAILS,
sendgridTemplateId: config.REPORT_ISSUE_SENDGRID_TEMPLATE_ID
},
/* Request extension for a particular member
*
* - userHandle: the user handle. Example: "bili_2021"
* - projectId: the project ID. Example: 123412
* - projectName: the project name. Example: "TaaS API Misc Updates"
* - text: comment for the request. Example: "I would like to keep working with this member for 2 months..."
*/
'extension-request': {
subject: 'Extension Requested for member {{userHandle}} on TaaS Team {{projectName}} ({{projectId}}).',
body: 'User Handle: {{userHandle}}' + '\n' +
'Project Name: {{projectName}}' + '\n' +
'Project ID: {{projectId}}' + '\n' +
`Project URL: ${config.TAAS_APP_URL}/{{projectId}}` + '\n' +
'\n' +
'{{text}}',
recipients: config.REPORT_ISSUE_EMAILS,
sendgridTemplateId: config.REQUEST_EXTENSION_SENDGRID_TEMPLATE_ID
}
},
/**
* List all kind of emails which could be send as Email Notifications by scheduler, API endpoints or anything else.
*/
notificationEmailTemplates: {
'taas.notification.job-candidate-resume-viewed': {
subject: 'Client has viewed your Topcoder profile',
body: '',
recipients: [],
from: config.NOTIFICATION_SENDER_EMAIL,
sendgridTemplateId: config.TAAS_NOTIFICATION_JOB_CANDIDATE_RESUME_VIEWED_SENDGRID_TEMPLATE_ID
},
'taas.notification.candidates-available-for-review': {
subject: 'You have candidates to review',
body: '',
recipients: [],
from: config.NOTIFICATION_SENDER_EMAIL,
sendgridTemplateId: config.TAAS_NOTIFICATION_CANDIDATES_AVAILABLE_FOR_REVIEW_SENDGRID_TEMPLATE_ID
},
'taas.notification.interview-coming-up-host': {
subject: 'Interview reminder: Your Topcoder interview is coming up',
body: '',
recipients: [],
from: config.NOTIFICATION_SENDER_EMAIL,
sendgridTemplateId: config.TAAS_NOTIFICATION_INTERVIEW_COMING_UP_HOST_SENDGRID_TEMPLATE_ID
},
'taas.notification.interview-coming-up-guest': {
subject: 'Reminder: Interview coming up',
body: '',
recipients: [],
from: config.NOTIFICATION_SENDER_EMAIL,
sendgridTemplateId: config.TAAS_NOTIFICATION_INTERVIEW_COMING_UP_GUEST_SENDGRID_TEMPLATE_ID
},
'taas.notification.interview-rescheduled-host': {
subject: 'Your interview has been rescheduled to {{start}}',
body: '',
recipients: [],
from: config.NOTIFICATION_SENDER_EMAIL,
sendgridTemplateId: config.TAAS_NOTIFICATION_INTERVIEW_RESCHEDULED_HOST_SENDGRID_TEMPLATE_ID
},
'taas.notification.interview-rescheduled-guest': {
subject: 'Your interview has been rescheduled to {{start}}',
body: '',
recipients: [],
from: config.NOTIFICATION_SENDER_EMAIL,
sendgridTemplateId: config.TAAS_NOTIFICATION_INTERVIEW_RESCHEDULED_GUEST_SENDGRID_TEMPLATE_ID
},
'taas.notification.interview-cancelled-host': {
subject: 'Your interview on {{start}} has been cancelled',
body: '',
recipients: [],
from: config.NOTIFICATION_SENDER_EMAIL,
sendgridTemplateId: config.TAAS_NOTIFICATION_INTERVIEW_CANCELLED_HOST_SENDGRID_TEMPLATE_ID
},
'taas.notification.interview-cancelled-guest': {
subject: 'Your interview on {{start}} has been cancelled',
body: '',
recipients: [],
from: config.NOTIFICATION_SENDER_EMAIL,
sendgridTemplateId: config.TAAS_NOTIFICATION_INTERVIEW_CANCELLED_GUEST_SENDGRID_TEMPLATE_ID
},
'taas.notification.interview-invitation': {
subject: 'Schedule your interview for {{jobTitle}}',
body: '',
recipients: [],
from: config.NOTIFICATION_SENDER_EMAIL,
sendgridTemplateId: config.TAAS_NOTIFICATION_INTERVIEW_INVITATION_SENDGRID_TEMPLATE_ID
},
'taas.notification.interview-link-for-host': {
subject: 'Your candidate interview is confirmed! {{start}}',
body: '',
recipients: [],
from: config.NOTIFICATION_SENDER_EMAIL,
sendgridTemplateId: config.TAAS_NOTIFICATION_INTERVIEW_LINK_FOR_HOST_SENDGRID_TEMPLATE_ID
},
'taas.notification.interview-link-for-guest': {
subject: 'Your interview is confirmed! {{start}}',
body: '',
recipients: [],
from: config.NOTIFICATION_SENDER_EMAIL,
sendgridTemplateId: config.TAAS_NOTIFICATION_INTERVIEW_LINK_FOR_GUEST_SENDGRID_TEMPLATE_ID
},
'taas.notification.interview-expired-host': {
subject: 'Interview expired - your candidate didn\'t select time',
body: '',
recipients: [],
from: config.NOTIFICATION_SENDER_EMAIL,
sendgridTemplateId: config.TAAS_NOTIFICATION_INTERVIEW_EXPIRED_HOST_SENDGRID_TEMPLATE_ID
},
'taas.notification.interview-expired-guest': {
subject: 'Your interview invitation is expired',
body: '',
recipients: [],
from: config.NOTIFICATION_SENDER_EMAIL,
sendgridTemplateId: config.TAAS_NOTIFICATION_INTERVIEW_EXPIRED_GUEST_SENDGRID_TEMPLATE_ID
},
'taas.notification.interview-schedule-reminder': {
subject: 'ACTION REQUIRED: Schedule your interview',
body: '',
recipients: [],
from: config.NOTIFICATION_SENDER_EMAIL,
sendgridTemplateId: config.TAAS_NOTIFICATION_INTERVIEW_SCHEDULE_REMINDER_SENDGRID_TEMPLATE_ID
},
'taas.notification.interview-awaits-resolution': {
subject: 'Interview complete - here’s what to do next',
body: '',
recipients: [],
from: config.NOTIFICATION_SENDER_EMAIL,
sendgridTemplateId: config.TAAS_NOTIFICATION_INTERVIEW_AWAITS_RESOLUTION_SENDGRID_TEMPLATE_ID
},
'taas.notification.post-interview-action-required': {
subject: 'Reminder: Take action to reserve your talent',
body: '',
recipients: [],
from: config.NOTIFICATION_SENDER_EMAIL,
sendgridTemplateId: config.TAAS_NOTIFICATION_POST_INTERVIEW_ACTION_REQUIRED_SENDGRID_TEMPLATE_ID
},
'taas.notification.resource-booking-expiration': {
subject: 'Reminder: 3 weeks left for your Topcoder Freelancer(s)',
body: '',
recipients: [],
from: config.NOTIFICATION_SENDER_EMAIL,
sendgridTemplateId: config.TAAS_NOTIFICATION_RESOURCE_BOOKING_EXPIRATION_SENDGRID_TEMPLATE_ID
},
'taas.notification.team-created': {
subject: 'Your Topcoder talent request confirmation',
body: '',
recipients: [],
from: config.NOTIFICATION_SENDER_EMAIL,
sendgridTemplateId: config.TAAS_NOTIFICATION_TEAM_CREATED_SENDGRID_TEMPLATE_ID
},
'taas.notification.job-created': {
subject: 'New job added to your Topcoder team',
body: '',
recipients: [],
from: config.NOTIFICATION_SENDER_EMAIL,
sendgridTemplateId: config.TAAS_NOTIFICATION_JOB_CREATED_SENDGRID_TEMPLATE_ID
},
'taas.notification.interviews-overlapping': {
subject: 'Topcoder - Interviews overlapping',
body: '',
recipients: config.NOTIFICATION_OPS_EMAILS,
from: config.NOTIFICATION_SENDER_EMAIL,
sendgridTemplateId: config.TAAS_NOTIFICATION_INTERVIEWS_OVERLAPPING_SENDGRID_TEMPLATE_ID
},
'taas.notification.job-candidate-selected': {
subject: 'Topcoder - Job Candidate {{userHandle}} Selected for {{jobTitle}} in Team {{teamName}}',
body: '',
recipients: config.NOTIFICATION_OPS_EMAILS,
from: config.NOTIFICATION_SENDER_EMAIL,
sendgridTemplateId: config.TAAS_NOTIFICATION_JOB_CANDIDATE_SELECTED_SENDGRID_TEMPLATE_ID
},
'taas.notification.resource-booking-placed': {
subject: 'Your Topcoder talent is confirmed! How to start working with them.',
body: '',
recipients: [],
from: config.NOTIFICATION_SENDER_EMAIL,
sendgridTemplateId: config.TAAS_NOTIFICATION_RESOURCE_BOOKING_PLACED_SENDGRID_TEMPLATE_ID
}
}
}