Skip to content

fix: issue #475 #483

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
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion app-constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
const UserRoles = {
BookingManager: 'bookingmanager',
Administrator: 'administrator',
ConnectManager: 'Connect Manager'
ConnectManager: 'Connect Manager',
TopcoderUser: 'Topcoder User'
}

const FullManagePermissionRoles = [
Expand Down
7 changes: 7 additions & 0 deletions config/email_template.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ module.exports = {
* List all kind of emails which could be send as Email Notifications by scheduler, API endpoints or anything else.
*/
notificationEmailTemplates: {
'taas.notification.job-candidate-resume-viewed': {
subject: 'Topcoder - job candidate resume viewed',
body: '',
recipients: [],
from: config.NOTIFICATION_SENDER_EMAIL,
sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID
},
'taas.notification.candidates-available-for-review': {
subject: 'Topcoder - {{teamName}} has job candidates available for review',
body: '',
Expand Down
7 changes: 7 additions & 0 deletions data/notifications-email-template.html
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,13 @@
{{/each}}
</table>
{{/if}}

{{#if notificationType.jobCandidateResumeViewed}}
Hi {{jobCandidateUserHandle}}. <br/> </br>

Your resume for the job "{{jobName}}" has been viewed by the client. <br/>
{{/if}}

{{#if notificationType.newTeamCreated}}
<span style="font-weight:bold;">Team:</span>
<a href={{teamUrl}} target="_blank" rel="noopener noreferrer">{{teamName}}</a>
Expand Down
270 changes: 269 additions & 1 deletion docs/Topcoder-bookings-api.postman_collection.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info": {
"_postman_id": "99905d78-e7c8-42ee-8aca-2c7fe3f8df4a",
"_postman_id": "e3bc87e1-261d-493b-b8f7-09e0e2102c5f",
"name": "Topcoder-bookings-api",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
Expand Down Expand Up @@ -2658,6 +2658,274 @@
},
"response": []
},
{
"name": "get job candidate candidate resume with booking manager",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"type": "text",
"value": "Bearer {{token_bookingManager}}"
}
],
"url": {
"raw": "{{URL}}/jobCandidates/{{jobCandidateId}}/resume",
"host": [
"{{URL}}"
],
"path": [
"jobCandidates",
"{{jobCandidateId}}",
"resume"
],
"query": [
{
"key": "page",
"value": "1",
"disabled": true
},
{
"key": "perPage",
"value": "1",
"disabled": true
},
{
"key": "sortBy",
"value": "id",
"disabled": true
},
{
"key": "sortOrder",
"value": "asc",
"disabled": true
},
{
"key": "jobId",
"value": "46225f4c-c2a3-4603-a141-0277e96fabfa",
"disabled": true
},
{
"key": "userId",
"value": "a55fe1bc-1754-45fa-9adc-cf3d6d7c377a",
"disabled": true
},
{
"key": "status",
"value": "selected",
"disabled": true
},
{
"key": "externalId",
"value": "300234321",
"disabled": true
}
]
}
},
"response": []
},
{
"name": "get job candidate candidate resume with customer user",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"type": "text",
"value": "Bearer {{token_member}}"
}
],
"url": {
"raw": "{{URL}}/jobCandidates/{{jobCandidateId}}/resume",
"host": [
"{{URL}}"
],
"path": [
"jobCandidates",
"{{jobCandidateId}}",
"resume"
],
"query": [
{
"key": "page",
"value": "1",
"disabled": true
},
{
"key": "perPage",
"value": "1",
"disabled": true
},
{
"key": "sortBy",
"value": "id",
"disabled": true
},
{
"key": "sortOrder",
"value": "asc",
"disabled": true
},
{
"key": "jobId",
"value": "46225f4c-c2a3-4603-a141-0277e96fabfa",
"disabled": true
},
{
"key": "userId",
"value": "a55fe1bc-1754-45fa-9adc-cf3d6d7c377a",
"disabled": true
},
{
"key": "status",
"value": "selected",
"disabled": true
},
{
"key": "externalId",
"value": "300234321",
"disabled": true
}
]
}
},
"response": []
},
{
"name": "get job candidate candidate resume with connect user",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"type": "text",
"value": "Bearer {{token_connectUser}}"
}
],
"url": {
"raw": "{{URL}}/jobCandidates/{{jobCandidateId}}/resume",
"host": [
"{{URL}}"
],
"path": [
"jobCandidates",
"{{jobCandidateId}}",
"resume"
],
"query": [
{
"key": "page",
"value": "1",
"disabled": true
},
{
"key": "perPage",
"value": "1",
"disabled": true
},
{
"key": "sortBy",
"value": "id",
"disabled": true
},
{
"key": "sortOrder",
"value": "asc",
"disabled": true
},
{
"key": "jobId",
"value": "46225f4c-c2a3-4603-a141-0277e96fabfa",
"disabled": true
},
{
"key": "userId",
"value": "a55fe1bc-1754-45fa-9adc-cf3d6d7c377a",
"disabled": true
},
{
"key": "status",
"value": "selected",
"disabled": true
},
{
"key": "externalId",
"value": "300234321",
"disabled": true
}
]
}
},
"response": []
},
{
"name": "get job candidate candidate resume with m2m all",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"type": "text",
"value": "Bearer {{token_m2m_all_job_candidate}}"
}
],
"url": {
"raw": "{{URL}}/jobCandidates/{{jobCandidateId}}/resume",
"host": [
"{{URL}}"
],
"path": [
"jobCandidates",
"{{jobCandidateId}}",
"resume"
],
"query": [
{
"key": "page",
"value": "1",
"disabled": true
},
{
"key": "perPage",
"value": "1",
"disabled": true
},
{
"key": "sortBy",
"value": "id",
"disabled": true
},
{
"key": "sortOrder",
"value": "asc",
"disabled": true
},
{
"key": "jobId",
"value": "46225f4c-c2a3-4603-a141-0277e96fabfa",
"disabled": true
},
{
"key": "userId",
"value": "a55fe1bc-1754-45fa-9adc-cf3d6d7c377a",
"disabled": true
},
{
"key": "status",
"value": "selected",
"disabled": true
},
{
"key": "externalId",
"value": "300234321",
"disabled": true
}
]
}
},
"response": []
},
{
"name": "put job candidate with booking manager",
"request": {
Expand Down
58 changes: 58 additions & 0 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,61 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/Error"
/jobCandidates/{id}/resume:
get:
tags:
- JobCandidates
description: |
Get job candidate resume by id.

**Authorization** Topcoder token with read job candidate scope is allowed
security:
- bearerAuth: []
parameters:
- in: path
name: id
description: The job candidate id.
required: true
schema:
type: string
format: uuid
responses:
"200":
description: OK
content:
application/msword:
schema:
$ref: "#/components/schemas/JobCandidateResume"
"400":
description: Bad request
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"401":
description: Not authenticated
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"403":
description: Forbidden
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"404":
description: Not Found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"500":
description: Internal Server Error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/jobCandidates/{jobCandidateId}/requestInterview:
patch:
tags:
Expand Down Expand Up @@ -4277,6 +4332,9 @@ components:
"withdrawn-prescreen",
]
description: "The array of job Candidates status"
JobCandidateResume:
type: string
format: binary
JobCandidateRequestBody:
required:
- jobId
Expand Down
Loading