Skip to content

Commit 8e8830e

Browse files
authored
Merge pull request #483 from yoution/issue-475
fix: issue #475
2 parents b98a7ca + ddd7e64 commit 8e8830e

12 files changed

+439
-6
lines changed

app-constants.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
const UserRoles = {
66
BookingManager: 'bookingmanager',
77
Administrator: 'administrator',
8-
ConnectManager: 'Connect Manager'
8+
ConnectManager: 'Connect Manager',
9+
TopcoderUser: 'Topcoder User'
910
}
1011

1112
const FullManagePermissionRoles = [

config/email_template.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,13 @@ module.exports = {
111111
* List all kind of emails which could be send as Email Notifications by scheduler, API endpoints or anything else.
112112
*/
113113
notificationEmailTemplates: {
114+
'taas.notification.job-candidate-resume-viewed': {
115+
subject: 'Topcoder - job candidate resume viewed',
116+
body: '',
117+
recipients: [],
118+
from: config.NOTIFICATION_SENDER_EMAIL,
119+
sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID
120+
},
114121
'taas.notification.candidates-available-for-review': {
115122
subject: 'Topcoder - {{teamName}} has job candidates available for review',
116123
body: '',

data/notifications-email-template.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,13 @@
240240
{{/each}}
241241
</table>
242242
{{/if}}
243+
244+
{{#if notificationType.jobCandidateResumeViewed}}
245+
Hi {{jobCandidateUserHandle}}. <br/> </br>
246+
247+
Your resume for the job "{{jobName}}" has been viewed by the client. <br/>
248+
{{/if}}
249+
243250
{{#if notificationType.newTeamCreated}}
244251
<span style="font-weight:bold;">Team:</span>
245252
<a href={{teamUrl}} target="_blank" rel="noopener noreferrer">{{teamName}}</a>

docs/Topcoder-bookings-api.postman_collection.json

Lines changed: 269 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"info": {
3-
"_postman_id": "99905d78-e7c8-42ee-8aca-2c7fe3f8df4a",
3+
"_postman_id": "e3bc87e1-261d-493b-b8f7-09e0e2102c5f",
44
"name": "Topcoder-bookings-api",
55
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
66
},
@@ -2658,6 +2658,274 @@
26582658
},
26592659
"response": []
26602660
},
2661+
{
2662+
"name": "get job candidate candidate resume with booking manager",
2663+
"request": {
2664+
"method": "GET",
2665+
"header": [
2666+
{
2667+
"key": "Authorization",
2668+
"type": "text",
2669+
"value": "Bearer {{token_bookingManager}}"
2670+
}
2671+
],
2672+
"url": {
2673+
"raw": "{{URL}}/jobCandidates/{{jobCandidateId}}/resume",
2674+
"host": [
2675+
"{{URL}}"
2676+
],
2677+
"path": [
2678+
"jobCandidates",
2679+
"{{jobCandidateId}}",
2680+
"resume"
2681+
],
2682+
"query": [
2683+
{
2684+
"key": "page",
2685+
"value": "1",
2686+
"disabled": true
2687+
},
2688+
{
2689+
"key": "perPage",
2690+
"value": "1",
2691+
"disabled": true
2692+
},
2693+
{
2694+
"key": "sortBy",
2695+
"value": "id",
2696+
"disabled": true
2697+
},
2698+
{
2699+
"key": "sortOrder",
2700+
"value": "asc",
2701+
"disabled": true
2702+
},
2703+
{
2704+
"key": "jobId",
2705+
"value": "46225f4c-c2a3-4603-a141-0277e96fabfa",
2706+
"disabled": true
2707+
},
2708+
{
2709+
"key": "userId",
2710+
"value": "a55fe1bc-1754-45fa-9adc-cf3d6d7c377a",
2711+
"disabled": true
2712+
},
2713+
{
2714+
"key": "status",
2715+
"value": "selected",
2716+
"disabled": true
2717+
},
2718+
{
2719+
"key": "externalId",
2720+
"value": "300234321",
2721+
"disabled": true
2722+
}
2723+
]
2724+
}
2725+
},
2726+
"response": []
2727+
},
2728+
{
2729+
"name": "get job candidate candidate resume with customer user",
2730+
"request": {
2731+
"method": "GET",
2732+
"header": [
2733+
{
2734+
"key": "Authorization",
2735+
"type": "text",
2736+
"value": "Bearer {{token_member}}"
2737+
}
2738+
],
2739+
"url": {
2740+
"raw": "{{URL}}/jobCandidates/{{jobCandidateId}}/resume",
2741+
"host": [
2742+
"{{URL}}"
2743+
],
2744+
"path": [
2745+
"jobCandidates",
2746+
"{{jobCandidateId}}",
2747+
"resume"
2748+
],
2749+
"query": [
2750+
{
2751+
"key": "page",
2752+
"value": "1",
2753+
"disabled": true
2754+
},
2755+
{
2756+
"key": "perPage",
2757+
"value": "1",
2758+
"disabled": true
2759+
},
2760+
{
2761+
"key": "sortBy",
2762+
"value": "id",
2763+
"disabled": true
2764+
},
2765+
{
2766+
"key": "sortOrder",
2767+
"value": "asc",
2768+
"disabled": true
2769+
},
2770+
{
2771+
"key": "jobId",
2772+
"value": "46225f4c-c2a3-4603-a141-0277e96fabfa",
2773+
"disabled": true
2774+
},
2775+
{
2776+
"key": "userId",
2777+
"value": "a55fe1bc-1754-45fa-9adc-cf3d6d7c377a",
2778+
"disabled": true
2779+
},
2780+
{
2781+
"key": "status",
2782+
"value": "selected",
2783+
"disabled": true
2784+
},
2785+
{
2786+
"key": "externalId",
2787+
"value": "300234321",
2788+
"disabled": true
2789+
}
2790+
]
2791+
}
2792+
},
2793+
"response": []
2794+
},
2795+
{
2796+
"name": "get job candidate candidate resume with connect user",
2797+
"request": {
2798+
"method": "GET",
2799+
"header": [
2800+
{
2801+
"key": "Authorization",
2802+
"type": "text",
2803+
"value": "Bearer {{token_connectUser}}"
2804+
}
2805+
],
2806+
"url": {
2807+
"raw": "{{URL}}/jobCandidates/{{jobCandidateId}}/resume",
2808+
"host": [
2809+
"{{URL}}"
2810+
],
2811+
"path": [
2812+
"jobCandidates",
2813+
"{{jobCandidateId}}",
2814+
"resume"
2815+
],
2816+
"query": [
2817+
{
2818+
"key": "page",
2819+
"value": "1",
2820+
"disabled": true
2821+
},
2822+
{
2823+
"key": "perPage",
2824+
"value": "1",
2825+
"disabled": true
2826+
},
2827+
{
2828+
"key": "sortBy",
2829+
"value": "id",
2830+
"disabled": true
2831+
},
2832+
{
2833+
"key": "sortOrder",
2834+
"value": "asc",
2835+
"disabled": true
2836+
},
2837+
{
2838+
"key": "jobId",
2839+
"value": "46225f4c-c2a3-4603-a141-0277e96fabfa",
2840+
"disabled": true
2841+
},
2842+
{
2843+
"key": "userId",
2844+
"value": "a55fe1bc-1754-45fa-9adc-cf3d6d7c377a",
2845+
"disabled": true
2846+
},
2847+
{
2848+
"key": "status",
2849+
"value": "selected",
2850+
"disabled": true
2851+
},
2852+
{
2853+
"key": "externalId",
2854+
"value": "300234321",
2855+
"disabled": true
2856+
}
2857+
]
2858+
}
2859+
},
2860+
"response": []
2861+
},
2862+
{
2863+
"name": "get job candidate candidate resume with m2m all",
2864+
"request": {
2865+
"method": "GET",
2866+
"header": [
2867+
{
2868+
"key": "Authorization",
2869+
"type": "text",
2870+
"value": "Bearer {{token_m2m_all_job_candidate}}"
2871+
}
2872+
],
2873+
"url": {
2874+
"raw": "{{URL}}/jobCandidates/{{jobCandidateId}}/resume",
2875+
"host": [
2876+
"{{URL}}"
2877+
],
2878+
"path": [
2879+
"jobCandidates",
2880+
"{{jobCandidateId}}",
2881+
"resume"
2882+
],
2883+
"query": [
2884+
{
2885+
"key": "page",
2886+
"value": "1",
2887+
"disabled": true
2888+
},
2889+
{
2890+
"key": "perPage",
2891+
"value": "1",
2892+
"disabled": true
2893+
},
2894+
{
2895+
"key": "sortBy",
2896+
"value": "id",
2897+
"disabled": true
2898+
},
2899+
{
2900+
"key": "sortOrder",
2901+
"value": "asc",
2902+
"disabled": true
2903+
},
2904+
{
2905+
"key": "jobId",
2906+
"value": "46225f4c-c2a3-4603-a141-0277e96fabfa",
2907+
"disabled": true
2908+
},
2909+
{
2910+
"key": "userId",
2911+
"value": "a55fe1bc-1754-45fa-9adc-cf3d6d7c377a",
2912+
"disabled": true
2913+
},
2914+
{
2915+
"key": "status",
2916+
"value": "selected",
2917+
"disabled": true
2918+
},
2919+
{
2920+
"key": "externalId",
2921+
"value": "300234321",
2922+
"disabled": true
2923+
}
2924+
]
2925+
}
2926+
},
2927+
"response": []
2928+
},
26612929
{
26622930
"name": "put job candidate with booking manager",
26632931
"request": {

docs/swagger.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -922,6 +922,61 @@ paths:
922922
application/json:
923923
schema:
924924
$ref: "#/components/schemas/Error"
925+
/jobCandidates/{id}/resume:
926+
get:
927+
tags:
928+
- JobCandidates
929+
description: |
930+
Get job candidate resume by id.
931+
932+
**Authorization** Topcoder token with read job candidate scope is allowed
933+
security:
934+
- bearerAuth: []
935+
parameters:
936+
- in: path
937+
name: id
938+
description: The job candidate id.
939+
required: true
940+
schema:
941+
type: string
942+
format: uuid
943+
responses:
944+
"200":
945+
description: OK
946+
content:
947+
application/msword:
948+
schema:
949+
$ref: "#/components/schemas/JobCandidateResume"
950+
"400":
951+
description: Bad request
952+
content:
953+
application/json:
954+
schema:
955+
$ref: "#/components/schemas/Error"
956+
"401":
957+
description: Not authenticated
958+
content:
959+
application/json:
960+
schema:
961+
$ref: "#/components/schemas/Error"
962+
"403":
963+
description: Forbidden
964+
content:
965+
application/json:
966+
schema:
967+
$ref: "#/components/schemas/Error"
968+
"404":
969+
description: Not Found
970+
content:
971+
application/json:
972+
schema:
973+
$ref: "#/components/schemas/Error"
974+
"500":
975+
description: Internal Server Error
976+
content:
977+
application/json:
978+
schema:
979+
$ref: "#/components/schemas/Error"
925980
/jobCandidates/{jobCandidateId}/requestInterview:
926981
patch:
927982
tags:
@@ -4277,6 +4332,9 @@ components:
42774332
"withdrawn-prescreen",
42784333
]
42794334
description: "The array of job Candidates status"
4335+
JobCandidateResume:
4336+
type: string
4337+
format: binary
42804338
JobCandidateRequestBody:
42814339
required:
42824340
- jobId

0 commit comments

Comments
 (0)