Skip to content

Commit d9e2a2c

Browse files
authored
Merge pull request #56 from topcoder-platform/dev
Interview scheduler
2 parents 898d776 + 4fbacc5 commit d9e2a2c

File tree

3 files changed

+35
-13
lines changed

3 files changed

+35
-13
lines changed

src/scripts/createIndex.js

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,29 @@ async function createIndex () {
5050
type: 'nested',
5151
properties: {
5252
id: { type: 'keyword' },
53+
xaiId: { type: 'keyword' },
5354
jobCandidateId: { type: 'keyword' },
54-
googleCalendarId: { type: 'keyword' },
55-
customMessage: { type: 'text' },
56-
xaiTemplate: { type: 'keyword' },
57-
round: { type: 'integer' },
55+
calendarEventId: { type: 'keyword' },
56+
templateUrl: { type: 'keyword' },
57+
templateId: { type: 'keyword' },
58+
templateType: { type: 'keyword' },
59+
title: { type: 'keyword' },
60+
locationDetails: { type: 'keyword' },
61+
duration: { type: 'integer' },
5862
startTimestamp: { type: 'date' },
59-
attendeesList: [],
63+
endTimestamp: { type: 'date' },
64+
hostName: { type: 'keyword' },
65+
hostEmail: { type: 'keyword' },
66+
guestNames: { type: 'keyword' },
67+
guestEmails: { type: 'keyword' },
68+
round: { type: 'integer' },
6069
status: { type: 'keyword' },
70+
rescheduleUrl: { type: 'keyword' },
6171
createdAt: { type: 'date' },
6272
createdBy: { type: 'keyword' },
6373
updatedAt: { type: 'date' },
64-
updatedBy: { type: 'keyword' }
74+
updatedBy: { type: 'keyword' },
75+
deletedAt: { type: 'date' }
6576
}
6677
},
6778
createdAt: { type: 'date' },

src/services/InterviewProcessorService.js

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,29 @@ processRequestInterview.schema = {
5858
'mime-type': Joi.string().required(),
5959
payload: Joi.object().keys({
6060
id: Joi.string().uuid().required(),
61+
xaiId: Joi.string().allow(null),
6162
jobCandidateId: Joi.string().uuid().required(),
62-
googleCalendarId: Joi.string().allow(null),
63-
customMessage: Joi.string().allow(null),
64-
xaiTemplate: Joi.xaiTemplate().required(),
63+
calendarEventId: Joi.string().allow(null),
64+
templateUrl: Joi.xaiTemplate().required(),
65+
templateId: Joi.string().allow(null),
66+
templateType: Joi.string().allow(null),
67+
title: Joi.string().allow(null),
68+
locationDetails: Joi.string().allow(null),
6569
round: Joi.number().integer().positive().required(),
70+
duration: Joi.number().integer().positive().required(),
6671
startTimestamp: Joi.date().allow(null),
67-
attendeesList: Joi.array().items(Joi.string().email()).allow(null),
72+
endTimestamp: Joi.date().allow(null),
73+
hostName: Joi.string().required(),
74+
hostEmail: Joi.string().email().required(),
75+
guestNames: Joi.array().items(Joi.string()).allow(null),
76+
guestEmails: Joi.array().items(Joi.string().email()).allow(null),
6877
status: Joi.interviewStatus().required(),
78+
rescheduleUrl: Joi.string().allow(null),
6979
createdAt: Joi.date().required(),
7080
createdBy: Joi.string().uuid().required(),
7181
updatedAt: Joi.date().allow(null),
72-
updatedBy: Joi.string().uuid().allow(null)
82+
updatedBy: Joi.string().uuid().allow(null),
83+
deletedAt: Joi.date().allow(null)
7384
}).required()
7485
}).required(),
7586
transactionId: Joi.string().required()

src/services/JobCandidateProcessorService.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ async function updateCandidateStatus ({ type, payload, previousData }) {
2525
localLogger.debug({ context: 'updateCandidateStatus', message: `jobCandidate is already in status: ${payload.status}` })
2626
return
2727
}
28-
//if (!['rejected', 'shortlist',].includes(payload.status)) {
29-
if (!['client rejected - screening', 'client rejected - interview','interview','selected'].includes(payload.status)) {
28+
// if (!['rejected', 'shortlist',].includes(payload.status)) {
29+
if (!['client rejected - screening', 'client rejected - interview', 'interview', 'selected'].includes(payload.status)) {
3030
localLogger.debug({ context: 'updateCandidateStatus', message: `not interested status: ${payload.status}` })
3131
return
3232
}

0 commit comments

Comments
 (0)