Skip to content

[PROD] Next Release #439

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 78 commits into from
Aug 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
8035016
feat: polish release - 2
cagdas001 Jul 27, 2021
3204533
Merge pull request #427 from cagdas001/milestone-19
nikolay83 Jul 27, 2021
c1b0578
Send Weekly Surveys
yoution Jul 28, 2021
cb194d6
update: allow up to 10 daysWorked
eisbilir Jul 28, 2021
99f97b3
fix: additional payments
narekcat Jul 28, 2021
0c7e498
update: search up to 10 days
eisbilir Jul 28, 2021
66a2ec2
fix: Edit payments fields #431
yoution Jul 28, 2021
60d476e
fix: script to import job from RCRM
eisbilir Jul 29, 2021
f559204
Merge pull request #432 from eisbilir/fix/job-import-script
maxceem Jul 29, 2021
3fe30ad
fix: additional payments, add joi validation rule for amount field
narekcat Jul 29, 2021
8949ec3
fix: issue #431
yoution Jul 29, 2021
23ac85f
Merge pull request #435 from narekcat/issue-430
maxceem Jul 29, 2021
1afad93
fix: memberRate for additional payments
maxceem Jul 30, 2021
3b2d61b
Merge branch 'dev' into update/10-working-days
maxceem Jul 30, 2021
0174cf7
Merge pull request #434 from eisbilir/update/10-working-days
maxceem Jul 31, 2021
358428e
added NPM command to rebuild service in docker
maxceem Jul 31, 2021
ea06ea1
Merge branch 'dev' of github.com:topcoder-platform/taas-apis into dev
maxceem Jul 31, 2021
ff54e2a
fix memberRate when creating WPP
maxceem Jul 31, 2021
21ae6fa
remove commented code
maxceem Jul 31, 2021
b2a9e91
Merge branch 'dev' into issue-431
maxceem Jul 31, 2021
81a3112
Merge pull request #436 from yoution/issue-431
maxceem Jul 31, 2021
407326b
fix edit payments
maxceem Jul 31, 2021
2d8680b
Challenge: 430559a5-abf5-4820-ade1-2c8a38b951fd Implemented email not…
tejad Jul 31, 2021
72c995c
endpoints for create/update WPP in bulk
eisbilir Aug 1, 2021
9a85ee2
fix: swagger request for bulk update
eisbilir Aug 2, 2021
e5d8118
Merge pull request #438 from eisbilir/feature/bulk-payments
maxceem Aug 2, 2021
d3b6040
fix: workly-surveys
yoution Aug 3, 2021
19a487d
fix: add catch for partiallyUpdateWorkPeriod
yoution Aug 4, 2021
406c5a1
Merge pull request #441 from yoution/feature/weekly-surveys
maxceem Aug 4, 2021
6a6d435
small fixes for Weekly Surveys
maxceem Aug 4, 2021
06469ea
Merge branch 'dev' into feature/weekly-surveys
maxceem Aug 4, 2021
1057409
Merge pull request #445 from topcoder-platform/feature/weekly-surveys
nkumar-topcoder Aug 4, 2021
e9c50be
add migration scripts
LieutenantRoger Aug 4, 2021
d243d44
Merge branch 'dev' into migrate-jobcandidates-scripts
LieutenantRoger Aug 4, 2021
67d375d
migration scripts
LieutenantRoger Aug 4, 2021
3030ac7
clean up the data
LieutenantRoger Aug 4, 2021
5d05945
remove the timestamp
LieutenantRoger Aug 4, 2021
5cd8cca
Merge pull request #446 from topcoder-platform/migrate-jobcandidates-…
LieutenantRoger Aug 4, 2021
a970435
1. Making sure team service doesn't send internal notifications
tejad Aug 4, 2021
bdaa7a2
Lint fix
tejad Aug 4, 2021
fb9cec3
configurable prefix for weekly survey collectors
maxceem Aug 4, 2021
51a5e62
Merge pull request #447 from topcoder-platform/feature/weekly-surveys
maxceem Aug 4, 2021
0daafec
Changing template ids
tejad Aug 4, 2021
9c2d368
Syncing notification type to template id
tejad Aug 4, 2021
2c36de0
Merge pull request #437 from tejad/feature/notifications-scheduler
maxceem Aug 4, 2021
91325c1
Merge branch 'feature/notifications-scheduler' of github.com:topcoder…
maxceem Aug 4, 2021
94632a4
fix email notification Kafka message payload format
maxceem Aug 4, 2021
22e9ebf
migration scripts update
LieutenantRoger Aug 4, 2021
d0ea9c8
ignore the data integrity issue
LieutenantRoger Aug 4, 2021
ca68c6a
improve docs/naming for the Notification Template rendering script
maxceem Aug 4, 2021
965ff50
Merge pull request #448 from topcoder-platform/migrate-jobcandidates-…
LieutenantRoger Aug 4, 2021
56bdf92
demo script for email notifications
maxceem Aug 4, 2021
0c543b8
remove redundant code
maxceem Aug 4, 2021
fa93c02
improve comments
maxceem Aug 4, 2021
045af53
fix: taas issue-412
yoution Aug 4, 2021
4b2e814
Merge pull request #450 from yoution/taas-issue-412
nikolay83 Aug 5, 2021
fc86113
migration scripts updated
LieutenantRoger Aug 5, 2021
d28dfe0
Merge branch 'dev' into migrate-jobcandidates-scripts
LieutenantRoger Aug 5, 2021
51bf20e
folder creation
LieutenantRoger Aug 5, 2021
8876cbb
change naming conversion
LieutenantRoger Aug 5, 2021
578d9d6
Merge pull request #451 from topcoder-platform/migrate-jobcandidates-…
LieutenantRoger Aug 5, 2021
80a2af9
sentSurvey should be `false` by default
maxceem Aug 5, 2021
e480323
fix updating RB.sendWeeklySurvey
maxceem Aug 5, 2021
07e9218
Merge pull request #449 from topcoder-platform/feature/notifications-…
maxceem Aug 5, 2021
51190a3
avoid-duplicate
LieutenantRoger Aug 5, 2021
cad9e02
Merge branch 'dev' into migrate-jobcandidates-scripts
LieutenantRoger Aug 5, 2021
6455cce
fix lint
LieutenantRoger Aug 5, 2021
1a3c098
Merge pull request #452 from topcoder-platform/migrate-jobcandidates-…
LieutenantRoger Aug 5, 2021
9ee4dab
fix universal email notification kafka payload
maxceem Aug 6, 2021
4593901
Adding support for generic duration format
tejad Aug 7, 2021
3d7022e
Making sure all email notifications are coming through demo script
tejad Aug 7, 2021
10845c4
Adding no-kafka package dependency as demo-email-notifications script…
tejad Aug 8, 2021
53a5cc6
Calculating Amount & Stripe APIs
Aug 8, 2021
4595964
fix(role-service): update validations to accept positive integers
cagdas001 Aug 9, 2021
9b13d56
Merge pull request #453 from tejad/dev
maxceem Aug 9, 2021
41d3a6f
Merge pull request #454 from arpitchaudhari/roles-checkout
nikolay83 Aug 9, 2021
9099ead
Merge pull request #455 from cagdas001/dev
nikolay83 Aug 9, 2021
8e895df
Merge pull request #457 from topcoder-platform/roles-checkout
nikolay83 Aug 9, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ build/Release
# Dependency directories
node_modules/
jspm_packages/
scripts/withdrawn-migration/temp/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
ES_HOST=http://dockerhost:9200
DATABASE_URL=postgres://postgres:postgres@dockerhost:5432/postgres
BUSAPI_URL=http://dockerhost:8002/v5
# stripe
STRIPE_SECRET_KEY=
CURRENCY=usd
```

- Values from this file would be automatically used by many `npm` commands.
Expand Down Expand Up @@ -215,6 +218,7 @@ To be able to change and test `taas-es-processor` locally you can follow the nex
| `npm run services:up` | Start services via docker-compose for local development. |
| `npm run services:down` | Stop services via docker-compose for local development. |
| `npm run services:logs -- -f <service_name>` | View logs of some service inside docker-compose. |
| `npm run services:rebuild -- -f <service_name>` | Rebuild service container ignoring cache (useful when pushed something to the Git repository of service) |
| `npm run local:init` | Recreate Database and Elasticsearch indexes and populate demo data for local development (removes any existent data). |
| `npm run local:reset` | Recreate Database and Elasticsearch indexes (removes any existent data). |
| `npm run cov` | Code Coverage Report. |
Expand Down Expand Up @@ -337,6 +341,6 @@ When we add, update or delete models and/or endpoints we have to make sure that
- Test, that when we migrate DB from the previous state using `npm run migrate`, we get exactly the same DB schema as if we create DB from scratch using command `npm run init-db force`.

## EMSI mapping
mapping EMSI tags to topcoder skills
Run `npm run emsi-mapping` to create the mapping file
mapping EMSI tags to topcoder skills
Run `npm run emsi-mapping` to create the mapping file
It will take about 15 minutes to create the mapping file `script/emsi-mapping/emsi-skils-mapping.js`
12 changes: 11 additions & 1 deletion app-constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,14 @@ const PaymentSchedulerStatus = {
CLOSE_CHALLENGE: 'close-challenge'
}

const JobStatus = {
OPEN: 'open'
}

const JobCandidateStatus = {
INTERVIEW: 'interview'
}

module.exports = {
UserRoles,
FullManagePermissionRoles,
Expand All @@ -164,5 +172,7 @@ module.exports = {
PaymentSchedulerStatus,
PaymentProcessingSwitch,
PaymentStatusRules,
ActiveWorkPeriodPaymentStatuses
ActiveWorkPeriodPaymentStatuses,
JobStatus,
JobCandidateStatus
}
11 changes: 10 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ const logger = require('./src/common/logger')
const eventHandlers = require('./src/eventHandlers')
const interviewService = require('./src/services/InterviewService')
const { processScheduler } = require('./src/services/PaymentSchedulerService')
const { sendSurveys } = require('./src/services/SurveyService')
const emailNotificationService = require('./src/services/EmailNotificationService')

// setup express app
const app = express()
Expand Down Expand Up @@ -98,9 +100,16 @@ const server = app.listen(app.get('port'), () => {
eventHandlers.init()
// schedule updateCompletedInterviews to run every hour
schedule.scheduleJob('0 0 * * * *', interviewService.updateCompletedInterviews)

// schedule sendSurveys
schedule.scheduleJob(config.WEEKLY_SURVEY.CRON, sendSurveys)
// schedule payment processing
schedule.scheduleJob(config.PAYMENT_PROCESSING.CRON, processScheduler)

schedule.scheduleJob(config.CRON_CANDIDATE_REVIEW, emailNotificationService.sendCandidatesAvailableEmails)
schedule.scheduleJob(config.CRON_INTERVIEW_COMING_UP, emailNotificationService.sendInterviewComingUpEmails)
schedule.scheduleJob(config.CRON_INTERVIEW_COMPLETED, emailNotificationService.sendInterviewCompletedEmails)
schedule.scheduleJob(config.CRON_POST_INTERVIEW, emailNotificationService.sendPostInterviewActionEmails)
schedule.scheduleJob(config.CRON_UPCOMING_RESOURCE_BOOKING, emailNotificationService.sendResourceBookingExpirationEmails)
})

if (process.env.NODE_ENV === 'test') {
Expand Down
41 changes: 40 additions & 1 deletion config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ module.exports = {

// the Kafka message topic for sending email
EMAIL_TOPIC: process.env.EMAIL_TOPIC || 'external.action.email',
// the Kafka message topic for creating notifications
NOTIFICATIONS_CREATE_TOPIC: process.env.NOTIFICATIONS_CREATE_TOPIC || 'notifications.action.create',
// the emails address for receiving the issue report
// REPORT_ISSUE_EMAILS may contain comma-separated list of email which is converted to array
REPORT_ISSUE_EMAILS: (process.env.REPORT_ISSUE_EMAILS || '').split(','),
Expand Down Expand Up @@ -180,6 +182,17 @@ module.exports = {
INTERNAL_MEMBER_GROUPS: process.env.INTERNAL_MEMBER_GROUPS || ['20000000', '20000001', '20000003', '20000010', '20000015'],
// Topcoder skills cache time in minutes
TOPCODER_SKILLS_CACHE_TIME: process.env.TOPCODER_SKILLS_CACHE_TIME || 60,
// weekly survey scheduler config
WEEKLY_SURVEY: {
CRON: process.env.WEEKLY_SURVEY_CRON || '0 1 * * 7',
BASE_URL: process.env.WEEKLY_SURVEY_BASE_URL || 'https://api.surveymonkey.net/v3/surveys',
JWT_TOKEN: process.env.WEEKLY_SURVEY_JWT_TOKEN || '',
SURVEY_ID: process.env.WEEKLY_SURVEY_SURVEY_ID || '',
SURVEY_COLLECTOR_PREFIX: process.env.WEEKLY_SURVEY_SURVEY_COLLECTOR_PREFIX || 'Week ending',
SURVEY_MASTER_COLLECTOR_ID: process.env.WEEKLY_SURVEY_SURVEY_MASTER_COLLECTOR_ID || '',
SURVEY_MASTER_MESSAGE_ID: process.env.WEEKLY_SURVEY_SURVEY_MASTER_MESSAGE_ID || '',
SURVEY_CONTACT_GROUP_ID: process.env.WEEKLY_SURVEY_SURVEY_CONTACT_GROUP_ID || ''
},
// payment scheduler config
PAYMENT_PROCESSING: {
// switch off actual API calls in Payment Scheduler
Expand Down Expand Up @@ -226,5 +239,31 @@ module.exports = {
interview: 'withdrawn',
selected: 'withdrawn',
offered: 'withdrawn'
}
},
// the sender email
NOTIFICATION_SENDER_EMAIL: process.env.NOTIFICATION_SENDER_EMAIL,
// the email notification sendgrid template id
NOTIFICATION_SENDGRID_TEMPLATE_ID: process.env.NOTIFICATION_SENDGRID_TEMPLATE_ID,
// frequency of cron checking for available candidates for review
CRON_CANDIDATE_REVIEW: process.env.CRON_CANDIDATE_REVIEW || '00 00 13 * * 0-6',
// frequency of cron checking for coming up interviews
// when changing this to frequency other than 5 mins, please change the minutesRange in sendInterviewComingUpEmails correspondingly
CRON_INTERVIEW_COMING_UP: process.env.CRON_INTERVIEW_COMING_UP || '*/5 * * * *',
// frequency of cron checking for interview completed
// when changing this to frequency other than 5 mins, please change the minutesRange in sendInterviewCompletedEmails correspondingly
CRON_INTERVIEW_COMPLETED: process.env.CRON_INTERVIEW_COMPLETED || '*/5 * * * *',
// frequency of cron checking for post interview actions
CRON_POST_INTERVIEW: process.env.CRON_POST_INTERVIEW || '00 00 13 * * 0-6',
// frequency of cron checking for upcoming resource bookings
CRON_UPCOMING_RESOURCE_BOOKING: process.env.CRON_UPCOMING_RESOURCE_BOOKING || '00 00 13 * * 1',
// The match window for fetching interviews which are coming up
INTERVIEW_COMING_UP_MATCH_WINDOW: process.env.INTERVIEW_COMING_UP_MATCH_WINDOW || 'PT5M',
// The remind time for fetching interviews which are coming up
INTERVIEW_COMING_UP_REMIND_TIME: (process.env.INTERVIEW_COMING_UP_REMIND_TIME || 'PT1H,PT24H').split(','),
// The match window for fetching completed interviews
INTERVIEW_COMPLETED_MATCH_WINDOW: process.env.INTERVIEW_COMPLETED_MATCH_WINDOW || 'PT5M',
// The interview completed past time for fetching interviews
INTERVIEW_COMPLETED_PAST_TIME: process.env.INTERVIEW_COMPLETED_PAST_TIME || 'PT4H',
// The time before resource booking expiry when we should start sending notifications
RESOURCE_BOOKING_EXPIRY_TIME: process.env.RESOURCE_BOOKING_EXPIRY_TIME || 'P21D'
}
229 changes: 141 additions & 88 deletions config/email_template.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,99 +6,152 @@
const config = require('config')

module.exports = {
/* 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!"
/**
* List all the kind of emails which could be sent by the endpoint `POST /taas-teams/email` inside `teamTemplates`.
*/
'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
},
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
},
/* 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
/* 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
},

/* Request interview for a job candidate
*
* - interviewType: the x.ai interview type. Example: "interview-30"
* - interviewRound: the round of the interview. Example: 2
* - interviewDuration: duration of the interview, in minutes. Example: 30
* - interviewerList: The list of interviewer email addresses. Example: "first@attendee.com, second@attendee.com"
* - candidateId: the id of the jobCandidate. Example: "cc562545-7b75-48bf-87e7-50b3c57e41b1"
* - candidateName: Full name of candidate. Example: "John Doe"
* - jobName: The title of the job. Example: "TaaS API Misc Updates"
*
* Template (defined in SendGrid):
* Subject: '{{interviewType}} tech interview with {{candidateName}} for {{jobName}} is requested by the Customer'
* Body:
* 'Hello!
* <br /><br />
* Congratulations, you have been selected to participate in a Topcoder Gig Work Interview!
* <br /><br />
* Please monitor your email for a response to this where you can coordinate your availability.
* <br /><br />
* Interviewee: {{candidateName}}<br />
* Interviewer(s): {{interviewerList}}<br />
* Interview Length: {{interviewDuration}} minutes
* <br /><br />
* /{{interviewType}}
* <br /><br />
* Topcoder Info:<br />
* Note: "id: {{candidateId}}, round: {{interviewRound}}"'
*
* Note, that the template should be defined in SendGrid.
* The subject & body above (identical to actual SendGrid template) is for reference purposes.
* We won't pass subject & body but only substitutions (replacements in template subject/body).
*/
'interview-invitation': {
subject: '',
body: '',
from: config.INTERVIEW_INVITATION_SENDER_EMAIL,
cc: config.INTERVIEW_INVITATION_CC_LIST,
recipients: config.INTERVIEW_INVITATION_RECIPIENTS_LIST,
sendgridTemplateId: config.INTERVIEW_INVITATION_SENDGRID_TEMPLATE_ID
}
},

/* Request interview for a job candidate
*
* - interviewType: the x.ai interview type. Example: "interview-30"
* - interviewRound: the round of the interview. Example: 2
* - interviewDuration: duration of the interview, in minutes. Example: 30
* - interviewerList: The list of interviewer email addresses. Example: "first@attendee.com, second@attendee.com"
* - candidateId: the id of the jobCandidate. Example: "cc562545-7b75-48bf-87e7-50b3c57e41b1"
* - candidateName: Full name of candidate. Example: "John Doe"
* - jobName: The title of the job. Example: "TaaS API Misc Updates"
*
* Template (defined in SendGrid):
* Subject: '{{interviewType}} tech interview with {{candidateName}} for {{jobName}} is requested by the Customer'
* Body:
* 'Hello!
* <br /><br />
* Congratulations, you have been selected to participate in a Topcoder Gig Work Interview!
* <br /><br />
* Please monitor your email for a response to this where you can coordinate your availability.
* <br /><br />
* Interviewee: {{candidateName}}<br />
* Interviewer(s): {{interviewerList}}<br />
* Interview Length: {{interviewDuration}} minutes
* <br /><br />
* /{{interviewType}}
* <br /><br />
* Topcoder Info:<br />
* Note: "id: {{candidateId}}, round: {{interviewRound}}"'
*
* Note, that the template should be defined in SendGrid.
* The subject & body above (identical to actual SendGrid template) is for reference purposes.
* We won't pass subject & body but only substitutions (replacements in template subject/body).
/**
* List all kind of emails which could be send as Email Notifications by scheduler, API endpoints or anything else.
*/
'interview-invitation': {
subject: '',
body: '',
from: config.INTERVIEW_INVITATION_SENDER_EMAIL,
cc: config.INTERVIEW_INVITATION_CC_LIST,
recipients: config.INTERVIEW_INVITATION_RECIPIENTS_LIST,
sendgridTemplateId: config.INTERVIEW_INVITATION_SENDGRID_TEMPLATE_ID
notificationEmailTemplates: {
'taas.notification.candidates-available-for-review': {
subject: 'Topcoder - {{teamName}} has job candidates available for review',
body: '',
recipients: [],
from: config.NOTIFICATION_SENDER_EMAIL,
sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID
},
'taas.notification.interview-coming-up-host': {
subject: 'Topcoder - Interview Coming Up: {{jobTitle}} with {{guestFullName}}',
body: '',
recipients: [],
from: config.NOTIFICATION_SENDER_EMAIL,
sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID
},
'taas.notification.interview-coming-up-guest': {
subject: 'Topcoder - Interview Coming Up: {{jobTitle}} with {{hostFullName}}',
body: '',
recipients: [],
from: config.NOTIFICATION_SENDER_EMAIL,
sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID
},
'taas.notification.interview-awaits-resolution': {
subject: 'Topcoder - Interview Awaits Resolution: {{jobTitle}} for {{guestFullName}}',
body: '',
recipients: [],
from: config.NOTIFICATION_SENDER_EMAIL,
sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID
},
'taas.notification.post-interview-action-required': {
subject: 'Topcoder - Candidate Action Required in {{teamName}} for {{numCandidates}} candidates',
body: '',
recipients: [],
from: config.NOTIFICATION_SENDER_EMAIL,
sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID
},
'taas.notification.resource-booking-expiration': {
subject: 'Topcoder - Resource Booking Expiring in {{teamName}} for {{numResourceBookings}} resource bookings',
body: '',
recipients: [],
from: config.NOTIFICATION_SENDER_EMAIL,
sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID
}
}
}
Loading