node-behind-api-client 2.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitlab-ci.yml +20 -0
- package/README.md +65 -0
- package/docs/behind-api-client/easyjob/JobDescriptions/README.md +654 -0
- package/docs/behind-api-client/easyjob/README.md +647 -0
- package/docs/behind-api-client/easyjob/applicants/README.md +494 -0
- package/docs/behind-api-client/easyjob/applications/README.md +754 -0
- package/docs/behind-api-client/easyjob/candidateProfiles/README.md +940 -0
- package/docs/behind-api-client/easyjob/jd-candidate-questions/README.md +372 -0
- package/docs/behind-api-client/payments/payture/README.21.md +901 -0
- package/docs/behind-api-client/payments/payture/README.cards.md +1497 -0
- package/docs/behind-api-client/payments/payture/README.md +1497 -0
- package/docs/behind-api-client/payments/payture/README.rukitchen.md +396 -0
- package/docs/behind-api-client/payments/payture/README.subscriptions.md +1266 -0
- package/docs/behind-api-client/payments/stripe/README.flow.md +254 -0
- package/docs/behind-api-client/rag/storage/README.md +519 -0
- package/example.js +35 -0
- package/index.cjs +14 -0
- package/index.js +15 -0
- package/lib/behind-api-auth-client/BehindApiAuthClient.js +91 -0
- package/lib/behind-api-auth-client/authorisation/AuthorisationApp.js +9 -0
- package/lib/behind-api-auth-client/authorisation/AuthorisationV10.js +9 -0
- package/lib/behind-api-auth-client/authorisation/AuthorisationV10Code.js +30 -0
- package/lib/behind-api-auth-client/example.js +47 -0
- package/lib/behind-api-auth-client/package.json +9 -0
- package/lib/behind-api-client/BehindApiClient.js +137 -0
- package/lib/behind-api-client/chat/ChatApp.js +11 -0
- package/lib/behind-api-client/chat/ChatV10.js +13 -0
- package/lib/behind-api-client/chat/ChatV10Chat.js +87 -0
- package/lib/behind-api-client/chat/ChatV10Chats.js +14 -0
- package/lib/behind-api-client/chat/ChatV10Message.js +57 -0
- package/lib/behind-api-client/chat/ChatV20.js +11 -0
- package/lib/behind-api-client/chat/ChatV20Chat.js +14 -0
- package/lib/behind-api-client/chat/ChatV20Message.js +27 -0
- package/lib/behind-api-client/easyjob/EasyjobApp.js +9 -0
- package/lib/behind-api-client/easyjob/EasyjobV10.js +31 -0
- package/lib/behind-api-client/easyjob/EasyjobV10Answers.js +16 -0
- package/lib/behind-api-client/easyjob/EasyjobV10Applicants.js +29 -0
- package/lib/behind-api-client/easyjob/EasyjobV10Applications.js +39 -0
- package/lib/behind-api-client/easyjob/EasyjobV10CandidateProfileArtifacts.js +31 -0
- package/lib/behind-api-client/easyjob/EasyjobV10CandidateProfiles.js +99 -0
- package/lib/behind-api-client/easyjob/EasyjobV10Companies.js +36 -0
- package/lib/behind-api-client/easyjob/EasyjobV10Cv.js +15 -0
- package/lib/behind-api-client/easyjob/EasyjobV10Departments.js +37 -0
- package/lib/behind-api-client/easyjob/EasyjobV10JobDescriptionArtifacts.js +29 -0
- package/lib/behind-api-client/easyjob/EasyjobV10JobDescriptionCandidateQuestions.js +63 -0
- package/lib/behind-api-client/easyjob/EasyjobV10JobDescriptions.js +93 -0
- package/lib/behind-api-client/easyjob/EasyjobV10Reports.js +35 -0
- package/lib/behind-api-client/example.js +47 -0
- package/lib/behind-api-client/global/GlobalApp.js +9 -0
- package/lib/behind-api-client/global/GlobalV10.js +11 -0
- package/lib/behind-api-client/global/GlobalV10Sockets.js +16 -0
- package/lib/behind-api-client/global/GlobalV10Storage.js +29 -0
- package/lib/behind-api-client/gpt/GptApp.js +15 -0
- package/lib/behind-api-client/gpt/GptV10.js +15 -0
- package/lib/behind-api-client/gpt/GptV10Prompt.js +17 -0
- package/lib/behind-api-client/gpt/GptV10Request.js +16 -0
- package/lib/behind-api-client/gpt/GptV10Storedprompts.js +14 -0
- package/lib/behind-api-client/gpt/GptV10Whisper.js +23 -0
- package/lib/behind-api-client/gpt/GptV20.js +9 -0
- package/lib/behind-api-client/gpt/GptV20Prompt.js +15 -0
- package/lib/behind-api-client/gpt/GptV30.js +13 -0
- package/lib/behind-api-client/gpt/GptV30Chat.js +19 -0
- package/lib/behind-api-client/gpt/GptV30Prompt.js +41 -0
- package/lib/behind-api-client/gpt/GptV30Prompts.js +32 -0
- package/lib/behind-api-client/gpt/GptV40.js +11 -0
- package/lib/behind-api-client/gpt/GptV40Prompt.js +24 -0
- package/lib/behind-api-client/gpt/GptV40Prompts.js +30 -0
- package/lib/behind-api-client/mailer/MailerApp.js +11 -0
- package/lib/behind-api-client/mailer/MailerV10.js +15 -0
- package/lib/behind-api-client/mailer/MailerV10Bulk.js +21 -0
- package/lib/behind-api-client/mailer/MailerV10Message.js +83 -0
- package/lib/behind-api-client/mailer/MailerV10Settings.js +44 -0
- package/lib/behind-api-client/mailer/MailerV10Template.js +23 -0
- package/lib/behind-api-client/mailer/MailerV20.js +9 -0
- package/lib/behind-api-client/mailer/MailerV20Message.js +21 -0
- package/lib/behind-api-client/mastogram/MastogramApp.js +9 -0
- package/lib/behind-api-client/mastogram/MastogramV10.js +13 -0
- package/lib/behind-api-client/mastogram/MastogramV10Bluesky.js +42 -0
- package/lib/behind-api-client/mastogram/MastogramV10Mastodon.js +45 -0
- package/lib/behind-api-client/mastogram/MastogramV10Telegram.js +39 -0
- package/lib/behind-api-client/monitor/MonitorApp.js +9 -0
- package/lib/behind-api-client/monitor/MonitorV10.js +13 -0
- package/lib/behind-api-client/monitor/MonitorV10Finances.js +39 -0
- package/lib/behind-api-client/monitor/MonitorV10Record.js +15 -0
- package/lib/behind-api-client/monitor/MonitorV10Records.js +22 -0
- package/lib/behind-api-client/oauth/OauthApp.js +9 -0
- package/lib/behind-api-client/oauth/OauthV10.js +9 -0
- package/lib/behind-api-client/oauth/OauthV10Authorisation.js +15 -0
- package/lib/behind-api-client/package.json +9 -0
- package/lib/behind-api-client/payments/PaymentsApp.js +13 -0
- package/lib/behind-api-client/payments/PaymentsV10.js +15 -0
- package/lib/behind-api-client/payments/PaymentsV10Gift.js +32 -0
- package/lib/behind-api-client/payments/PaymentsV10Payture.js +30 -0
- package/lib/behind-api-client/payments/PaymentsV10Product.js +15 -0
- package/lib/behind-api-client/payments/PaymentsV10Telegram.js +44 -0
- package/lib/behind-api-client/payments/PaymentsV20.js +9 -0
- package/lib/behind-api-client/payments/PaymentsV20Payture.js +32 -0
- package/lib/behind-api-client/payments/PaymentsV21.js +15 -0
- package/lib/behind-api-client/payments/PaymentsV21Cards.js +14 -0
- package/lib/behind-api-client/payments/PaymentsV21Payture.js +29 -0
- package/lib/behind-api-client/payments/PaymentsV21Stripe.js +28 -0
- package/lib/behind-api-client/payments/PaymentsV21Subscriptions.js +21 -0
- package/lib/behind-api-client/questionnaire/QuestionnaireApp.js +9 -0
- package/lib/behind-api-client/questionnaire/QuestionnaireV10.js +9 -0
- package/lib/behind-api-client/questionnaire/QuestionnaireV10Form.js +22 -0
- package/lib/behind-api-client/raet/RaetApp.js +11 -0
- package/lib/behind-api-client/raet/RaetV10.js +21 -0
- package/lib/behind-api-client/raet/RaetV10Cv.js +87 -0
- package/lib/behind-api-client/raet/RaetV10Individual.js +43 -0
- package/lib/behind-api-client/raet/RaetV10Individuals.js +38 -0
- package/lib/behind-api-client/raet/RaetV10Jd.js +47 -0
- package/lib/behind-api-client/raet/RaetV10Project.js +61 -0
- package/lib/behind-api-client/raet/RaetV10Projects.js +14 -0
- package/lib/behind-api-client/raet/RaetV10Report.js +39 -0
- package/lib/behind-api-client/raet/RaetV20.js +11 -0
- package/lib/behind-api-client/raet/RaetV20Cv.js +31 -0
- package/lib/behind-api-client/raet/RaetV20Individuals.js +25 -0
- package/lib/behind-api-client/rag/RagApp.js +9 -0
- package/lib/behind-api-client/rag/RagV10.js +9 -0
- package/lib/behind-api-client/rag/RagV10Storage.js +27 -0
- package/lib/behind-api-client/ruKitchen/RuKitchenApp.js +9 -0
- package/lib/behind-api-client/ruKitchen/RuKitchenV10.js +11 -0
- package/lib/behind-api-client/ruKitchen/RuKitchenV10Importer.js +29 -0
- package/lib/behind-api-client/ruKitchen/RuKitchenV10SeoArticle.js +14 -0
- package/lib/behind-api-client/sales/SalesApp.js +11 -0
- package/lib/behind-api-client/sales/SalesV10.js +23 -0
- package/lib/behind-api-client/sales/SalesV10Catalogue.js +58 -0
- package/lib/behind-api-client/sales/SalesV10Categories.js +15 -0
- package/lib/behind-api-client/sales/SalesV10Companies.js +55 -0
- package/lib/behind-api-client/sales/SalesV10Company.js +120 -0
- package/lib/behind-api-client/sales/SalesV10Group.js +70 -0
- package/lib/behind-api-client/sales/SalesV10Groups.js +21 -0
- package/lib/behind-api-client/sales/SalesV10Logs.js +14 -0
- package/lib/behind-api-client/sales/SalesV10Notes.js +38 -0
- package/lib/behind-api-client/sales/SalesV20.js +11 -0
- package/lib/behind-api-client/sales/SalesV20Companies.js +26 -0
- package/lib/behind-api-client/sales/SalesV20Notes.js +17 -0
- package/lib/behind-api-client/sip/SipApp.js +9 -0
- package/lib/behind-api-client/sip/SipV10.js +15 -0
- package/lib/behind-api-client/sip/SipV10Call.js +83 -0
- package/lib/behind-api-client/sip/SipV10Phone.js +44 -0
- package/lib/behind-api-client/sip/SipV10Transcript.js +21 -0
- package/lib/behind-api-client/sip/SipV10Transcripts.js +21 -0
- package/lib/behind-api-client/storage/StorageApp.js +9 -0
- package/lib/behind-api-client/storage/StorageV10.js +11 -0
- package/lib/behind-api-client/storage/StorageV10File.js +35 -0
- package/lib/behind-api-client/storage/StorageV10Upload.js +21 -0
- package/lib/behind-api-client/tests/TestsApp.js +9 -0
- package/lib/behind-api-client/tests/TestsV10.js +15 -0
- package/lib/behind-api-client/tests/TestsV10Cases.js +29 -0
- package/lib/behind-api-client/tests/TestsV10CasesExtended.js +14 -0
- package/lib/behind-api-client/tests/TestsV10Core.js +14 -0
- package/lib/behind-api-client/tests/TestsV10Mail.js +14 -0
- package/lib/behind-api-client/tools/ToolsApp.js +9 -0
- package/lib/behind-api-client/tools/ToolsV10.js +9 -0
- package/lib/behind-api-client/tools/ToolsV10Pdf.js +30 -0
- package/package.json +25 -0
|
@@ -0,0 +1,494 @@
|
|
|
1
|
+
# Applicants API Extension
|
|
2
|
+
|
|
3
|
+
This document extends the main EasyJob JavaScript API Client Documentation with detailed information about the Applicants API methods.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The Applicants API allows you to manage job applicants and their application status throughout the hiring process. This includes retrieving applicant details, managing application stages, and viewing lists of applicants for specific job postings.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Applicants API
|
|
12
|
+
|
|
13
|
+
### behindAPI.easyjob.V10.applicants.get(applicationId)
|
|
14
|
+
Retrieves detailed information for a specific job applicant, including their complete profile data.
|
|
15
|
+
|
|
16
|
+
**Parameters:**
|
|
17
|
+
- `applicationId` (string, required) - The job application UUID to get detailed information for
|
|
18
|
+
|
|
19
|
+
**Usage:**
|
|
20
|
+
```javascript
|
|
21
|
+
const result = await behindAPI.easyjob.V10.applicants.get("dd0e8400-e29b-41d4-a716-446655440008");
|
|
22
|
+
|
|
23
|
+
// Response:
|
|
24
|
+
{
|
|
25
|
+
success: true,
|
|
26
|
+
data: {
|
|
27
|
+
application_id: "dd0e8400-e29b-41d4-a716-446655440008",
|
|
28
|
+
job_description_id: "770e8400-e29b-41d4-a716-446655440002",
|
|
29
|
+
candidate_profile_id: "aa0e8400-e29b-41d4-a716-446655440005",
|
|
30
|
+
message: "I am very interested in this position...",
|
|
31
|
+
stage: "initial_review",
|
|
32
|
+
application_created_at: "2024-01-20T14:30:00Z",
|
|
33
|
+
profile_id: "aa0e8400-e29b-41d4-a716-446655440005",
|
|
34
|
+
profile_data: {
|
|
35
|
+
first_name: "John",
|
|
36
|
+
last_name: "Doe",
|
|
37
|
+
email: "john.doe@example.com",
|
|
38
|
+
phone: "+1-555-123-4567",
|
|
39
|
+
location: "New York, NY",
|
|
40
|
+
summary: "Experienced software developer..."
|
|
41
|
+
},
|
|
42
|
+
facts: {
|
|
43
|
+
total_experience_years: 5,
|
|
44
|
+
education_level: "masters",
|
|
45
|
+
skills_match_percentage: 85
|
|
46
|
+
},
|
|
47
|
+
education: [
|
|
48
|
+
{
|
|
49
|
+
institution: "MIT",
|
|
50
|
+
degree: "Master of Science",
|
|
51
|
+
field_of_study: "Computer Science",
|
|
52
|
+
start_year: 2017,
|
|
53
|
+
end_year: 2019,
|
|
54
|
+
gpa: 3.8
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
job_experience: [
|
|
58
|
+
{
|
|
59
|
+
company: "Tech Corp",
|
|
60
|
+
position: "Senior Software Engineer",
|
|
61
|
+
start_date: "2020-01-15",
|
|
62
|
+
end_date: "2024-01-15",
|
|
63
|
+
description: "Led development of microservices...",
|
|
64
|
+
technologies: ["React", "Node.js", "AWS"]
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
hard_skills: [
|
|
68
|
+
{
|
|
69
|
+
skill: "JavaScript",
|
|
70
|
+
level: "Expert",
|
|
71
|
+
years_experience: 6
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
soft_skills: [
|
|
75
|
+
{
|
|
76
|
+
skill: "Leadership",
|
|
77
|
+
level: "Advanced"
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
certificates: [
|
|
81
|
+
{
|
|
82
|
+
name: "AWS Certified Solutions Architect",
|
|
83
|
+
issuing_organization: "Amazon Web Services",
|
|
84
|
+
issue_date: "2023-06-15",
|
|
85
|
+
expiry_date: "2026-06-15"
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
languages: [
|
|
89
|
+
{
|
|
90
|
+
language: "English",
|
|
91
|
+
proficiency: "Native"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
profile_created_at: "2024-01-15T10:30:00Z",
|
|
95
|
+
profile_updated_at: "2024-01-20T09:15:00Z"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### behindAPI.easyjob.V10.applicants.stageChange(applicationId, newStage)
|
|
101
|
+
Updates the stage of a job application for kanban-style tracking throughout the hiring process.
|
|
102
|
+
|
|
103
|
+
**Parameters:**
|
|
104
|
+
- `applicationId` (string, required) - The job application UUID to update
|
|
105
|
+
- `newStage` (string, required) - The new stage value for the application
|
|
106
|
+
|
|
107
|
+
**Common Stage Values:**
|
|
108
|
+
- `"applied"` - Initial application received
|
|
109
|
+
- `"initial_review"` - Application under initial review
|
|
110
|
+
- `"phone_screening"` - Phone/video screening stage
|
|
111
|
+
- `"technical_interview"` - Technical assessment stage
|
|
112
|
+
- `"final_interview"` - Final interview stage
|
|
113
|
+
- `"offer_extended"` - Job offer has been extended
|
|
114
|
+
- `"hired"` - Candidate has been hired
|
|
115
|
+
- `"rejected"` - Application has been rejected
|
|
116
|
+
- `"withdrawn"` - Candidate has withdrawn application
|
|
117
|
+
|
|
118
|
+
**Usage:**
|
|
119
|
+
```javascript
|
|
120
|
+
const result = await behindAPI.easyjob.V10.applicants.stageChange(
|
|
121
|
+
"dd0e8400-e29b-41d4-a716-446655440008",
|
|
122
|
+
"technical_interview"
|
|
123
|
+
);
|
|
124
|
+
|
|
125
|
+
// Response:
|
|
126
|
+
{
|
|
127
|
+
success: true
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### behindAPI.easyjob.V10.applicants.getList(jobDescriptionId)
|
|
132
|
+
Retrieves a list of all job applicants for a specific job description.
|
|
133
|
+
|
|
134
|
+
**Parameters:**
|
|
135
|
+
- `jobDescriptionId` (string, required) - The job description UUID to get applicants for
|
|
136
|
+
|
|
137
|
+
**Usage:**
|
|
138
|
+
```javascript
|
|
139
|
+
const result = await behindAPI.easyjob.V10.applicants.getList("770e8400-e29b-41d4-a716-446655440002");
|
|
140
|
+
|
|
141
|
+
// Response:
|
|
142
|
+
{
|
|
143
|
+
success: true,
|
|
144
|
+
data: [
|
|
145
|
+
{
|
|
146
|
+
application_id: "dd0e8400-e29b-41d4-a716-446655440008",
|
|
147
|
+
job_description_id: "770e8400-e29b-41d4-a716-446655440002",
|
|
148
|
+
candidate_profile_id: "aa0e8400-e29b-41d4-a716-446655440005",
|
|
149
|
+
message: "I am very interested in this position...",
|
|
150
|
+
stage: "initial_review",
|
|
151
|
+
application_created_at: "2024-01-20T14:30:00Z",
|
|
152
|
+
profile_id: "aa0e8400-e29b-41d4-a716-446655440005",
|
|
153
|
+
profile_data: {
|
|
154
|
+
first_name: "John",
|
|
155
|
+
last_name: "Doe",
|
|
156
|
+
email: "john.doe@example.com",
|
|
157
|
+
phone: "+1-555-123-4567",
|
|
158
|
+
location: "New York, NY",
|
|
159
|
+
summary: "Experienced software developer..."
|
|
160
|
+
},
|
|
161
|
+
profile_created_at: "2024-01-15T10:30:00Z"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
application_id: "ee0e8400-e29b-41d4-a716-446655440009",
|
|
165
|
+
job_description_id: "770e8400-e29b-41d4-a716-446655440002",
|
|
166
|
+
candidate_profile_id: "bb0e8400-e29b-41d4-a716-446655440006",
|
|
167
|
+
message: "Looking forward to contributing to your team...",
|
|
168
|
+
stage: "phone_screening",
|
|
169
|
+
application_created_at: "2024-01-21T10:15:00Z",
|
|
170
|
+
profile_id: "bb0e8400-e29b-41d4-a716-446655440006",
|
|
171
|
+
profile_data: {
|
|
172
|
+
first_name: "Jane",
|
|
173
|
+
last_name: "Smith",
|
|
174
|
+
email: "jane.smith@example.com",
|
|
175
|
+
phone: "+1-555-987-6543",
|
|
176
|
+
location: "San Francisco, CA",
|
|
177
|
+
summary: "Full-stack developer with expertise..."
|
|
178
|
+
},
|
|
179
|
+
profile_created_at: "2024-01-18T16:45:00Z"
|
|
180
|
+
}
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Data Structure Reference
|
|
188
|
+
|
|
189
|
+
### Application Object (get method)
|
|
190
|
+
The complete application object returned by `get()` includes:
|
|
191
|
+
|
|
192
|
+
**Core Application Data:**
|
|
193
|
+
- `application_id` (UUID) - Unique identifier for the application
|
|
194
|
+
- `job_description_id` (UUID) - The job posting this application is for
|
|
195
|
+
- `candidate_profile_id` (UUID) - The candidate's profile ID
|
|
196
|
+
- `message` (string) - Cover letter or application message
|
|
197
|
+
- `stage` (string) - Current stage in the hiring process
|
|
198
|
+
- `application_created_at` (timestamp) - When the application was submitted
|
|
199
|
+
|
|
200
|
+
**Profile Information:**
|
|
201
|
+
- `profile_id` (UUID) - Candidate's profile identifier
|
|
202
|
+
- `profile_data` (object) - Basic profile information
|
|
203
|
+
- `facts` (object) - Computed facts about the candidate
|
|
204
|
+
- `education` (array) - Educational background
|
|
205
|
+
- `job_experience` (array) - Work history
|
|
206
|
+
- `hard_skills` (array) - Technical skills
|
|
207
|
+
- `soft_skills` (array) - Interpersonal skills
|
|
208
|
+
- `certificates` (array) - Professional certifications
|
|
209
|
+
- `languages` (array) - Language proficiencies
|
|
210
|
+
- `profile_created_at` (timestamp) - Profile creation date
|
|
211
|
+
- `profile_updated_at` (timestamp) - Last profile update
|
|
212
|
+
|
|
213
|
+
### Application Object (getList method)
|
|
214
|
+
The simplified application objects returned by `getList()` include:
|
|
215
|
+
|
|
216
|
+
- `application_id` (UUID) - Unique identifier for the application
|
|
217
|
+
- `job_description_id` (UUID) - The job posting this application is for
|
|
218
|
+
- `candidate_profile_id` (UUID) - The candidate's profile ID
|
|
219
|
+
- `message` (string) - Cover letter or application message
|
|
220
|
+
- `stage` (string) - Current stage in the hiring process
|
|
221
|
+
- `application_created_at` (timestamp) - When the application was submitted
|
|
222
|
+
- `profile_id` (UUID) - Candidate's profile identifier
|
|
223
|
+
- `profile_data` (object) - Basic profile information only
|
|
224
|
+
- `profile_created_at` (timestamp) - Profile creation date
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## Complete Usage Example
|
|
229
|
+
|
|
230
|
+
```javascript
|
|
231
|
+
// Complete workflow for managing job applicants
|
|
232
|
+
async function manageJobApplicants(jobDescriptionId) {
|
|
233
|
+
try {
|
|
234
|
+
// 1. Get all applicants for a job posting
|
|
235
|
+
const applicantsList = await behindAPI.easyjob.V10.applicants.getList(jobDescriptionId);
|
|
236
|
+
|
|
237
|
+
if (!applicantsList.success) {
|
|
238
|
+
console.error("Failed to retrieve applicants list");
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
console.log(`Found ${applicantsList.data.length} applicants`);
|
|
243
|
+
|
|
244
|
+
// 2. Process each applicant
|
|
245
|
+
for (const applicant of applicantsList.data) {
|
|
246
|
+
console.log(`\nProcessing applicant: ${applicant.profile_data.first_name} ${applicant.profile_data.last_name}`);
|
|
247
|
+
console.log(`Current stage: ${applicant.stage}`);
|
|
248
|
+
console.log(`Applied on: ${applicant.application_created_at}`);
|
|
249
|
+
|
|
250
|
+
// 3. Get detailed information for promising candidates
|
|
251
|
+
if (applicant.stage === "applied") {
|
|
252
|
+
const detailedInfo = await behindAPI.easyjob.V10.applicants.get(applicant.application_id);
|
|
253
|
+
|
|
254
|
+
if (detailedInfo.success) {
|
|
255
|
+
const candidate = detailedInfo.data;
|
|
256
|
+
|
|
257
|
+
// Analyze candidate qualifications
|
|
258
|
+
const hasRequiredExperience = candidate.facts?.total_experience_years >= 3;
|
|
259
|
+
const hasRelevantSkills = candidate.facts?.skills_match_percentage >= 70;
|
|
260
|
+
const hasEducation = candidate.education && candidate.education.length > 0;
|
|
261
|
+
|
|
262
|
+
// Determine next stage based on qualifications
|
|
263
|
+
let newStage;
|
|
264
|
+
if (hasRequiredExperience && hasRelevantSkills && hasEducation) {
|
|
265
|
+
newStage = "phone_screening";
|
|
266
|
+
console.log(` ✓ Advancing to phone screening`);
|
|
267
|
+
} else {
|
|
268
|
+
newStage = "rejected";
|
|
269
|
+
console.log(` ✗ Rejecting due to insufficient qualifications`);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
// Update application stage
|
|
273
|
+
const stageUpdate = await behindAPI.easyjob.V10.applicants.stageChange(
|
|
274
|
+
applicant.application_id,
|
|
275
|
+
newStage
|
|
276
|
+
);
|
|
277
|
+
|
|
278
|
+
if (stageUpdate.success) {
|
|
279
|
+
console.log(` → Stage updated to: ${newStage}`);
|
|
280
|
+
} else {
|
|
281
|
+
console.log(` ✗ Failed to update stage`);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
// 4. Generate summary report
|
|
288
|
+
const updatedList = await behindAPI.easyjob.V10.applicants.getList(jobDescriptionId);
|
|
289
|
+
const stageCounts = {};
|
|
290
|
+
|
|
291
|
+
updatedList.data.forEach(applicant => {
|
|
292
|
+
stageCounts[applicant.stage] = (stageCounts[applicant.stage] || 0) + 1;
|
|
293
|
+
});
|
|
294
|
+
|
|
295
|
+
console.log("\n=== Application Summary ===");
|
|
296
|
+
Object.entries(stageCounts).forEach(([stage, count]) => {
|
|
297
|
+
console.log(`${stage}: ${count} applicants`);
|
|
298
|
+
});
|
|
299
|
+
|
|
300
|
+
} catch (error) {
|
|
301
|
+
console.error("Error managing applicants:", error);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
// Example: Moving candidates through the hiring pipeline
|
|
306
|
+
async function progressHiringPipeline(jobDescriptionId) {
|
|
307
|
+
try {
|
|
308
|
+
const applicants = await behindAPI.easyjob.V10.applicants.getList(jobDescriptionId);
|
|
309
|
+
|
|
310
|
+
for (const applicant of applicants.data) {
|
|
311
|
+
// Get detailed candidate information
|
|
312
|
+
const candidate = await behindAPI.easyjob.V10.applicants.get(applicant.application_id);
|
|
313
|
+
|
|
314
|
+
if (!candidate.success) continue;
|
|
315
|
+
|
|
316
|
+
const candidateData = candidate.data;
|
|
317
|
+
let nextStage = applicant.stage;
|
|
318
|
+
|
|
319
|
+
// Progress candidates based on current stage and qualifications
|
|
320
|
+
switch (applicant.stage) {
|
|
321
|
+
case "phone_screening":
|
|
322
|
+
// Move to technical interview if they have strong technical skills
|
|
323
|
+
const techSkills = candidateData.hard_skills?.filter(skill =>
|
|
324
|
+
["JavaScript", "React", "Node.js", "Python"].includes(skill.skill)
|
|
325
|
+
);
|
|
326
|
+
if (techSkills && techSkills.length >= 2) {
|
|
327
|
+
nextStage = "technical_interview";
|
|
328
|
+
}
|
|
329
|
+
break;
|
|
330
|
+
|
|
331
|
+
case "technical_interview":
|
|
332
|
+
// Move to final interview if they have leadership experience
|
|
333
|
+
const hasLeadership = candidateData.soft_skills?.some(skill =>
|
|
334
|
+
skill.skill.toLowerCase().includes("leadership")
|
|
335
|
+
);
|
|
336
|
+
const seniorRole = candidateData.job_experience?.some(exp =>
|
|
337
|
+
exp.position.toLowerCase().includes("senior") ||
|
|
338
|
+
exp.position.toLowerCase().includes("lead")
|
|
339
|
+
);
|
|
340
|
+
if (hasLeadership || seniorRole) {
|
|
341
|
+
nextStage = "final_interview";
|
|
342
|
+
}
|
|
343
|
+
break;
|
|
344
|
+
|
|
345
|
+
case "final_interview":
|
|
346
|
+
// Extend offer to top candidates
|
|
347
|
+
if (candidateData.facts?.skills_match_percentage >= 90) {
|
|
348
|
+
nextStage = "offer_extended";
|
|
349
|
+
}
|
|
350
|
+
break;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
// Update stage if it changed
|
|
354
|
+
if (nextStage !== applicant.stage) {
|
|
355
|
+
await behindAPI.easyjob.V10.applicants.stageChange(
|
|
356
|
+
applicant.application_id,
|
|
357
|
+
nextStage
|
|
358
|
+
);
|
|
359
|
+
console.log(`Advanced ${candidateData.profile_data.first_name} ${candidateData.profile_data.last_name} to ${nextStage}`);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
} catch (error) {
|
|
364
|
+
console.error("Error progressing hiring pipeline:", error);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
// Example: Filtering and analyzing applicants
|
|
369
|
+
async function analyzeApplicantPool(jobDescriptionId) {
|
|
370
|
+
try {
|
|
371
|
+
const applicants = await behindAPI.easyjob.V10.applicants.getList(jobDescriptionId);
|
|
372
|
+
|
|
373
|
+
const analysis = {
|
|
374
|
+
total: applicants.data.length,
|
|
375
|
+
byStage: {},
|
|
376
|
+
byLocation: {},
|
|
377
|
+
averageExperience: 0,
|
|
378
|
+
topSkills: {}
|
|
379
|
+
};
|
|
380
|
+
|
|
381
|
+
let totalExperience = 0;
|
|
382
|
+
let experienceCount = 0;
|
|
383
|
+
|
|
384
|
+
// Analyze each applicant
|
|
385
|
+
for (const applicant of applicants.data) {
|
|
386
|
+
// Count by stage
|
|
387
|
+
analysis.byStage[applicant.stage] = (analysis.byStage[applicant.stage] || 0) + 1;
|
|
388
|
+
|
|
389
|
+
// Count by location
|
|
390
|
+
const location = applicant.profile_data.location;
|
|
391
|
+
if (location) {
|
|
392
|
+
analysis.byLocation[location] = (analysis.byLocation[location] || 0) + 1;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
// Get detailed data for skills and experience analysis
|
|
396
|
+
const detailed = await behindAPI.easyjob.V10.applicants.get(applicant.application_id);
|
|
397
|
+
if (detailed.success) {
|
|
398
|
+
const candidate = detailed.data;
|
|
399
|
+
|
|
400
|
+
// Calculate experience
|
|
401
|
+
if (candidate.facts?.total_experience_years) {
|
|
402
|
+
totalExperience += candidate.facts.total_experience_years;
|
|
403
|
+
experienceCount++;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
// Count skills
|
|
407
|
+
if (candidate.hard_skills) {
|
|
408
|
+
candidate.hard_skills.forEach(skill => {
|
|
409
|
+
analysis.topSkills[skill.skill] = (analysis.topSkills[skill.skill] || 0) + 1;
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
// Calculate averages and sort results
|
|
416
|
+
analysis.averageExperience = experienceCount > 0 ? totalExperience / experienceCount : 0;
|
|
417
|
+
|
|
418
|
+
// Sort top skills
|
|
419
|
+
analysis.topSkills = Object.entries(analysis.topSkills)
|
|
420
|
+
.sort(([,a], [,b]) => b - a)
|
|
421
|
+
.slice(0, 10)
|
|
422
|
+
.reduce((obj, [skill, count]) => ({ ...obj, [skill]: count }), {});
|
|
423
|
+
|
|
424
|
+
console.log("=== Applicant Pool Analysis ===");
|
|
425
|
+
console.log(`Total Applicants: ${analysis.total}`);
|
|
426
|
+
console.log(`Average Experience: ${analysis.averageExperience.toFixed(1)} years`);
|
|
427
|
+
console.log("\nBy Stage:");
|
|
428
|
+
Object.entries(analysis.byStage).forEach(([stage, count]) => {
|
|
429
|
+
console.log(` ${stage}: ${count}`);
|
|
430
|
+
});
|
|
431
|
+
console.log("\nTop Locations:");
|
|
432
|
+
Object.entries(analysis.byLocation).slice(0, 5).forEach(([location, count]) => {
|
|
433
|
+
console.log(` ${location}: ${count}`);
|
|
434
|
+
});
|
|
435
|
+
console.log("\nMost Common Skills:");
|
|
436
|
+
Object.entries(analysis.topSkills).slice(0, 5).forEach(([skill, count]) => {
|
|
437
|
+
console.log(` ${skill}: ${count} candidates`);
|
|
438
|
+
});
|
|
439
|
+
|
|
440
|
+
return analysis;
|
|
441
|
+
|
|
442
|
+
} catch (error) {
|
|
443
|
+
console.error("Error analyzing applicant pool:", error);
|
|
444
|
+
return null;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
---
|
|
450
|
+
|
|
451
|
+
## Best Practices
|
|
452
|
+
|
|
453
|
+
1. **Stage Management**: Maintain consistent stage naming conventions across your hiring process. Define clear criteria for advancing candidates between stages.
|
|
454
|
+
|
|
455
|
+
2. **Data Usage**: Use the detailed `get()` method sparingly for performance reasons. Use `getList()` for overview operations and `get()` only when you need complete candidate details.
|
|
456
|
+
|
|
457
|
+
3. **Automated Processing**: Implement automated stage progression based on candidate qualifications and scores to streamline your hiring process.
|
|
458
|
+
|
|
459
|
+
4. **Error Handling**: Always check the `success` property before processing applicant data, as applications might be deleted or access permissions might change.
|
|
460
|
+
|
|
461
|
+
5. **Performance Optimization**: When processing large numbers of applicants, consider implementing batch processing with delays to avoid overwhelming the API.
|
|
462
|
+
|
|
463
|
+
6. **Privacy Considerations**: Handle candidate personal information responsibly and in compliance with data protection regulations.
|
|
464
|
+
|
|
465
|
+
---
|
|
466
|
+
|
|
467
|
+
## Error Handling
|
|
468
|
+
|
|
469
|
+
All methods return a response object with a `success` boolean property. When `success` is `false`, a `message` property will contain the error description.
|
|
470
|
+
|
|
471
|
+
```javascript
|
|
472
|
+
// Example error handling
|
|
473
|
+
const result = await behindAPI.easyjob.V10.applicants.get(invalidApplicationId);
|
|
474
|
+
|
|
475
|
+
if (!result.success) {
|
|
476
|
+
console.error("Error retrieving applicant:", result.message);
|
|
477
|
+
// Handle the error appropriately
|
|
478
|
+
return;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
// Process successful result
|
|
482
|
+
const applicantData = result.data;
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
---
|
|
486
|
+
|
|
487
|
+
## Integration Notes
|
|
488
|
+
|
|
489
|
+
The Applicants API works seamlessly with other EasyJob APIs:
|
|
490
|
+
|
|
491
|
+
- **Job Descriptions**: Applications are linked to specific job postings
|
|
492
|
+
- **Candidate Profiles**: Complete candidate information is accessible through applications
|
|
493
|
+
- **Job Description Candidate Questions**: Candidate responses to custom questions can be tracked alongside applications
|
|
494
|
+
- **Candidate Profile Artifacts**: Resumes and other documents are accessible through the applicant data structure
|