Skip to content

Commit 0faa3a3

Browse files
committed
imp API Triggered Notifications
1 parent cc75599 commit 0faa3a3

16 files changed

+885
-36
lines changed

config/default.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ module.exports = {
142142
TAAS_ROLE_UPDATE_TOPIC: process.env.TAAS_ROLE_UPDATE_TOPIC || 'taas.role.update',
143143
// the delete role entity Kafka message topic
144144
TAAS_ROLE_DELETE_TOPIC: process.env.TAAS_ROLE_DELETE_TOPIC || 'taas.role.delete',
145+
// the create team entity message topic, only used for eventHandler
146+
TAAS_TEAM_CREATE_TOPIC: process.env.TAAS_TEAM_CREATE_TOPIC || 'taas.team.create',
145147
// special kafka topics
146148
TAAS_ACTION_RETRY_TOPIC: process.env.TAAS_ACTION_RETRY_TOPIC || 'taas.action.retry',
147149

@@ -161,6 +163,10 @@ module.exports = {
161163
// INTERVIEW_INVITATION_RECIPIENTS_LIST may contain comma-separated list of email which is converted to array
162164
// scheduler@x.ai should be in the RECIPIENTS list
163165
INTERVIEW_INVITATION_RECIPIENTS_LIST: (process.env.INTERVIEW_INVITATION_RECIPIENTS_LIST || 'scheduler@topcoder.com').split(','),
166+
// the emails address for overlapping interview
167+
NOTIFICATION_OPS_EMAILS: (process.env.NOTIFICATION_OPS_EMAILS || 'overlapping@topcoder.com').split(','),
168+
// the slack channel for sending notifications
169+
NOTIFICATION_SLACK_CHANNEL: process.env.NOTIFICATION_SLACK_CHANNEL || '#dev-general',
164170
// SendGrid email template ID for reporting issue
165171
REPORT_ISSUE_SENDGRID_TEMPLATE_ID: process.env.REPORT_ISSUE_SENDGRID_TEMPLATE_ID,
166172
// SendGrid email template ID for requesting extension

config/email_template.config.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,41 @@ module.exports = {
152152
recipients: [],
153153
from: config.NOTIFICATION_SENDER_EMAIL,
154154
sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID
155+
},
156+
'taas.notification.team-created': {
157+
subject: 'Topcoder - Team Created',
158+
body: '',
159+
recipients: [],
160+
from: config.NOTIFICATION_SENDER_EMAIL,
161+
sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID
162+
},
163+
'taas.notification.job-created': {
164+
subject: 'Topcoder - Job Created',
165+
body: '',
166+
recipients: [],
167+
from: config.NOTIFICATION_SENDER_EMAIL,
168+
sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID
169+
},
170+
'taas.notification.interviews-overlapping': {
171+
subject: 'Topcoder - Interviews overlapping',
172+
body: '',
173+
recipients: config.NOTIFICATION_OPS_EMAILS,
174+
from: config.NOTIFICATION_SENDER_EMAIL,
175+
sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID
176+
},
177+
'taas.notification.job-candidate-selected': {
178+
subject: 'Topcoder - Job Candidate Selected',
179+
body: '',
180+
recipients: config.NOTIFICATION_OPS_EMAILS,
181+
from: config.NOTIFICATION_SENDER_EMAIL,
182+
sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID
183+
},
184+
'taas.notification.resource-booking-placed': {
185+
subject: 'Topcoder - Resource Booking Placed',
186+
body: '',
187+
recipients: [],
188+
from: config.NOTIFICATION_SENDER_EMAIL,
189+
sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID
155190
}
156191
}
157192
}

data/notifications-email-template.html

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,102 @@
240240
{{/each}}
241241
</table>
242242
{{/if}}
243+
{{#if notificationType.newTeamCreated}}
244+
<span style="font-weight:bold;">Team Name:</span>
245+
{{teamName}}
246+
<table style="font-size:13px;border:1px solid black;border-collapse:collapse;width:95%;">
247+
<tr style="font-weight:bold;border:1px solid black;border-collapse:collapse">
248+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">Job Title</td>
249+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">Duration</td>
250+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">Start Date</td>
251+
</tr>
252+
{{#each jobList}}
253+
<tr>
254+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">{{this.title}}</td>
255+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">{{this.duration}}</td>
256+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">{{this.startDate}}</td>
257+
</tr>
258+
{{/each}}
259+
</table>
260+
{{/if}}
261+
{{#if notificationType.newJobCreated}}
262+
<table style="font-size:13px;border:1px solid black;border-collapse:collapse;width:95%;">
263+
<tr style="font-weight:bold;border:1px solid black;border-collapse:collapse">
264+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">Team Name</td>
265+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">Job title</td>
266+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">Duration</td>
267+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">Start Date</td>
268+
</tr>
269+
<tr>
270+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">{{teamName}}</td>
271+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">{{jobTitle}}</td>
272+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">{{jobDuration}}</td>
273+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">{{jobStartDate}}</td>
274+
</tr>
275+
</table>
276+
{{/if}}
277+
{{#if notificationType.overlappingInterview}}
278+
<table style="font-size:13px;border:1px solid black;border-collapse:collapse;width:95%;">
279+
<tr style="font-weight:bold;border:1px solid black;border-collapse:collapse">
280+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">Team Name</td>
281+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">Team URL</td>
282+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">Job title</td>
283+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">Job URL</td>
284+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">Job Candidate</td>
285+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">Interview Start Date</td>
286+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">Interview End Date</td>
287+
</tr>
288+
{{#each interviews}}
289+
<tr>
290+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">{{this.teamName}}</td>
291+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">{{this.teamURL}}</td>
292+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">{{this.jobTitle}}</td>
293+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">{{this.jobURL}}</td>
294+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">{{this.candidateUserHandle}}</td>
295+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">{{this.startTime}}</td>
296+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">{{this.endTime}}</td>
297+
</tr>
298+
{{/each}}
299+
</table>
300+
{{/if}}
301+
{{#if notificationType.candidateSelected}}
302+
<table style="font-size:13px;border:1px solid black;border-collapse:collapse;width:95%;">
303+
<tr style="font-weight:bold;border:1px solid black;border-collapse:collapse">
304+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">Team Name</td>
305+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">Job title</td>
306+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">Job URL</td>
307+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">Job Start Date</td>
308+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">Job Duration</td>
309+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">Candidate User Handle</td>
310+
</tr>
311+
<tr>
312+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">{{teamName}}</td>
313+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">{{jobTitle}}</td>
314+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">{{jobUrl}}</td>
315+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">{{jobStartDate}}</td>
316+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">{{jobDuration}}</td>
317+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">{{userHandle}}</td>
318+
</tr>
319+
</table>
320+
{{/if}}
321+
{{#if notificationType.resourceBookingPlaced}}
322+
<table style="font-size:13px;border:1px solid black;border-collapse:collapse;width:95%;">
323+
<tr style="font-weight:bold;border:1px solid black;border-collapse:collapse">
324+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">Team Name</td>
325+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">Job Title</td>
326+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">Resource Bookings Handle</td>
327+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">Resource Bookings Start Date</td>
328+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">Resource Bookings End Date</td>
329+
</tr>
330+
<tr>
331+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">{{teamName}}</td>
332+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">{{jobTitle}}</td>
333+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">{{userHandle}}</td>
334+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">{{startDate}}</td>
335+
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">{{endDate}}</td>
336+
</tr>
337+
</table>
338+
{{/if}}
243339

244340
<br/>
245341
If you have any questions about this process or if you encounter any issues coordinating your availability, you may reply to this email or send a separate email to <a href="mailto:talent@topcoder.com">our Gig Work operations team</a>.

0 commit comments

Comments
 (0)