Retrieves a list of stages for specific candidate or lead throughout the recruitment process
npm i @superfaceai/one-sdk
const { SuperfaceClient } = require('@superfaceai/one-sdk');
// You can manage tokens here: https://superface.ai/insights
const sdk = new SuperfaceClient({ sdkAuthToken: '<< Login to get your token >>' });
async function run() {
// Load the profile
const profile = await sdk.getProfile('recruitment/list-stage-changes@1.0.0');
// Use the profile
const result = await profile
.getUseCase('ListStageChanges')
.perform({
candidateId: 'CANDIDATE_ID'
}, {
provider: 'mock'
});
// Handle the result
try {
const data = result.unwrap();
console.log(data);
} catch (error) {
console.error(error);
}
}
run();
{
"candidateId": "CANDIDATE_ID"
}
{
"changes": [
{
"id": "1",
"stageId": "sourced",
"name": "Sourced",
"description": "Sourced from LinkedIn",
"current": false,
"createdAt": "2022-12-06T15:20:11Z"
}
]
}