Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
c31d278
Merge pull request #407 from topcoder-platform/dev
urwithat Jul 26, 2021
c1b0578
Send Weekly Surveys
yoution Jul 28, 2021
cb194d6
update: allow up to 10 daysWorked
eisbilir Jul 28, 2021
0c7e498
update: search up to 10 days
eisbilir Jul 28, 2021
66a2ec2
fix: Edit payments fields #431
yoution Jul 28, 2021
8949ec3
fix: issue #431
yoution 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
5d02723
Merge pull request #439 from topcoder-platform/dev
nkumar-topcoder Aug 9, 2021
32b650f
add logs to email notifications scheduler
maxceem Aug 9, 2021
d7f27b2
fix handle server error text
maxceem Aug 9, 2021
61c2cc8
improved logs for email notifications
maxceem Aug 9, 2021
20b4d7d
fix send survey for work periods
maxceem Aug 9, 2021
feb14c0
use "of" instead of "in" to be sure
maxceem Aug 9, 2021
2d157c8
Merge pull request #459 from topcoder-platform/hotfix/send-survey-wor…
maxceem Aug 9, 2021
013c854
Stripe Config
urwithat Aug 9, 2021
ff9b65b
Merge branch 'dev' of https://github.com/topcoder-platform/taas-apis …
urwithat Aug 9, 2021
619902e
Updating amount logic
Aug 10, 2021
3d0408c
Merge remote-tracking branch 'origin/roles-checkout' into dev
Aug 10, 2021
cdfd20c
Merge pull request #464 from arpitchaudhari/dev
nikolay83 Aug 10, 2021
0c6d720
add more logs for sending surveys
maxceem Aug 10, 2021
e7c70d6
Added scopes for calculateAmount & createPayment APIs
Aug 10, 2021
a333608
Merge pull request #467 from arpitchaudhari/dev
nikolay83 Aug 10, 2021
92b7c97
Merge pull request #465 from topcoder-platform/hotfix/send-survey-wor…
maxceem Aug 10, 2021
2583409
#443 & Stripe Connectivity Issues
Aug 11, 2021
e14172b
https://github.com/topcoder-platform/taas-app/issues/443 & Stripe Co…
Aug 11, 2021
8bb7183
Merge branch 'roles-checkout' of https://github.com/arpitchaudhari/ta…
Aug 11, 2021
198493b
Merge branch 'roles-checkout' into dev
Aug 11, 2021
9abb019
Merge pull request #472 from arpitchaudhari/dev
nikolay83 Aug 11, 2021
cdbac5e
fix: update ROLE_MATCHING_RATE to 0.66
yoution Aug 11, 2021
354b1c5
fix: taas 412 add skill and unmatch skills for role
yoution Aug 11, 2021
260244c
Merge pull request #473 from yoution/issue-412
nikolay83 Aug 11, 2021
3282d3a
fix: issue taas#462
yoution Aug 12, 2021
14a992f
Merge pull request #479 from yoution/issue-462
nikolay83 Aug 12, 2021
9cd777e
API to identify whether member is external or internal.
Aug 12, 2021
6ea9431
Merge pull request #480 from arpitchaudhari/dev
nikolay83 Aug 12, 2021
49580d9
Adding Authentication to isExternalMember API
Aug 12, 2021
abb7346
Merge pull request #481 from arpitchaudhari/dev
nikolay83 Aug 12, 2021
c8019b1
fix: issue topcoder-platform/taas-app#475
yoution Aug 13, 2021
9c31e35
Merge pull request #484 from yoution/issue-462
nikolay83 Aug 13, 2021
af3feff
fix issue topcoder-platform/taas-app#462
yoution Aug 13, 2021
7057e45
Merge pull request #485 from yoution/issue-462
nikolay83 Aug 13, 2021
d9387cf
feat(teams): accept `intakeSource` in `createTeam` request
cagdas001 Aug 13, 2021
aa470aa
Merge pull request #489 from cagdas001/dev
nikolay83 Aug 13, 2021
abba8ff
fix: resolve conflict
yoution Aug 16, 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
46 changes: 44 additions & 2 deletions config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,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 @@ -178,11 +180,22 @@ module.exports = {
DEFAULT_TIMELINE_TEMPLATE_ID: process.env.DEFAULT_TIMELINE_TEMPLATE_ID || '53a307ce-b4b3-4d6f-b9a1-3741a58f77e6',
DEFAULT_TRACK_ID: process.env.DEFAULT_TRACK_ID || '9b6fc876-f4d9-4ccb-9dfd-419247628825',
// the minimum matching rate when searching roles by skills
ROLE_MATCHING_RATE: process.env.ROLE_MATCHING_RATE || 0.70,
ROLE_MATCHING_RATE: process.env.ROLE_MATCHING_RATE || 0.66,
// member groups representing Wipro or TopCoder employee
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 @@ -229,5 +242,34 @@ 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',
// The Stripe
STRIPE_SECRET_KEY: process.env.STRIPE_SECRET_KEY,
CURRENCY: process.env.CURRENCY || 'usd'
}
Loading