Skip to content

Commit d8e88a9

Browse files
authored
Merge pull request #64 from topcoder-platform/feature/api-updates
api-updates challenge:30186701
2 parents 4a24d73 + cf38c92 commit d8e88a9

8 files changed

+31
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@
6060
"test/e2e/*.js"
6161
]
6262
}
63-
}
63+
}

src/scripts/createIndex.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ async function createIndex () {
2929
roles: { type: 'keyword' },
3030
status: { type: 'keyword' },
3131
isApplicationPageActive: { type: 'boolean' },
32+
minSalary: { type: 'integer' },
33+
maxSalary: { type: 'integer' },
34+
hoursPerWeek: { type: 'integer' },
35+
jobLocation: { type: 'keyword' },
36+
jobTimezone: { type: 'keyword' },
37+
currency: { type: 'keyword' },
3238
roleIds: { type: 'keyword' },
3339
createdAt: { type: 'date' },
3440
createdBy: { type: 'keyword' },
@@ -48,6 +54,7 @@ async function createIndex () {
4854
status: { type: 'keyword' },
4955
externalId: { type: 'keyword' },
5056
resume: { type: 'text' },
57+
remark: { type: 'keyword' },
5158
interviews: {
5259
type: 'nested',
5360
properties: {

src/services/JobCandidateProcessorService.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ processCreate.schema = {
101101
updatedBy: Joi.string().uuid().allow(null),
102102
status: Joi.jobCandidateStatus().required(),
103103
externalId: Joi.string().allow(null),
104-
resume: Joi.string().uri().allow(null)
104+
resume: Joi.string().uri().allow(null),
105+
remark: Joi.string().allow(null)
105106
}).required()
106107
}).required(),
107108
transactionId: Joi.string().required()

src/services/JobProcessorService.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ processCreate.schema = {
8585
updatedBy: Joi.string().uuid().allow(null),
8686
status: Joi.jobStatus().required(),
8787
isApplicationPageActive: Joi.boolean().required(),
88+
minSalary: Joi.number().integer().required(),
89+
maxSalary: Joi.number().integer().required(),
90+
hoursPerWeek: Joi.number().integer().required(),
91+
jobLocation: Joi.string().required(),
92+
jobTimezone: Joi.string().required(),
93+
currency: Joi.string().required(),
8894
roleIds: Joi.array().items(Joi.string().uuid().required()).allow(null)
8995
}).required()
9096
}).required(),

test/messages/taas.job.create.event.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@
2525
"createdBy": "a55fe1bc-1754-45fa-9adc-cf3d6d7c377a",
2626
"status": "sourcing",
2727
"isApplicationPageActive": false,
28+
"minSalary": 100,
29+
"maxSalary": 200,
30+
"hoursPerWeek": 20,
31+
"jobLocation": "Any location",
32+
"jobTimezone": "GMT",
33+
"currency": "USD",
2834
"roleIds": [
2935
"e7b7e818-40d4-4102-b486-09bdd21400b8"
3036
]

test/messages/taas.job.update.event.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
"createdAt": "2020-11-05T19:00:16.268Z",
2525
"createdBy": "a55fe1bc-1754-45fa-9adc-cf3d6d7c377a",
2626
"isApplicationPageActive": false,
27+
"minSalary": 100,
28+
"maxSalary": 200,
29+
"hoursPerWeek": 20,
30+
"jobLocation": "Any location",
31+
"jobTimezone": "GMT",
32+
"currency": "USD",
2733
"roleIds": [
2834
"e7b7e818-40d4-4102-b486-09bdd21400b8"
2935
]

test/messages/taas.jobcandidate.create.event.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"id": "0cb99adb-8bcd-4952-9203-9867dd45ef6f",
1010
"createdAt": "2020-11-05T19:00:19.052Z",
1111
"createdBy": "a55fe1bc-1754-45fa-9adc-cf3d6d7c377a",
12-
"status": "open"
12+
"status": "open",
13+
"remark": "excellent"
1314
}
1415
}

test/messages/taas.jobcandidate.update.event.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"jobId": "ffbc24f7-301e-48d3-bf01-c056916056a2",
99
"userId": "a55fe1bc-1754-45fa-9adc-cf3d6d7c377a",
1010
"status": "selected",
11+
"remark": "excellent",
1112
"updatedAt": "2020-11-05T19:00:21.625Z",
1213
"updatedBy": "a55fe1bc-1754-45fa-9adc-cf3d6d7c377a",
1314
"createdAt": "2020-11-05T19:00:16.268Z",

0 commit comments

Comments
 (0)