File tree Expand file tree Collapse file tree 6 files changed +641
-4
lines changed Expand file tree Collapse file tree 6 files changed +641
-4
lines changed Original file line number Diff line number Diff line change 1+ import gem from "../../gem.app.mjs" ;
2+ import { axios } from "@pipedream/platform" ;
3+
4+ export default {
5+ key : "gem-create-candidate" ,
6+ name : "Create Candidate" ,
7+ description : "Creates a new candidate in Gem. [See the documentation]()" ,
8+ version : "0.0.{{ts}}" ,
9+ type : "action" ,
10+ props : {
11+ gem,
12+ firstName : {
13+ propDefinition : [
14+ gem ,
15+ "firstName" ,
16+ ] ,
17+ } ,
18+ lastName : {
19+ propDefinition : [
20+ gem ,
21+ "lastName" ,
22+ ] ,
23+ } ,
24+ emails : {
25+ propDefinition : [
26+ gem ,
27+ "emails" ,
28+ ] ,
29+ } ,
30+ jobPosition : {
31+ propDefinition : [
32+ gem ,
33+ "jobPosition" ,
34+ ] ,
35+ optional : true ,
36+ } ,
37+ source : {
38+ propDefinition : [
39+ gem ,
40+ "source" ,
41+ ] ,
42+ optional : true ,
43+ } ,
44+ notes : {
45+ propDefinition : [
46+ gem ,
47+ "notes" ,
48+ ] ,
49+ optional : true ,
50+ } ,
51+ } ,
52+ async run ( { $ } ) {
53+ const candidate = await this . gem . createCandidate ( {
54+ firstName : this . firstName ,
55+ lastName : this . lastName ,
56+ emails : this . emails ,
57+ jobPosition : this . jobPosition ,
58+ source : this . source ,
59+ notes : this . notes ,
60+ } ) ;
61+ $ . export (
62+ "$summary" ,
63+ `Created candidate ${ candidate . first_name } ${ candidate . last_name } with ID: ${ candidate . id } ` ,
64+ ) ;
65+ return candidate ;
66+ } ,
67+ } ;
Original file line number Diff line number Diff line change 1+ import gem from "../../gem.app.mjs" ;
2+ import { axios } from "@pipedream/platform" ;
3+
4+ export default {
5+ key : "gem-update-candidate-stage" ,
6+ name : "Update Candidate Stage" ,
7+ description : "Updates the hiring stage of an existing candidate. [See the documentation]()" ,
8+ version : "0.0.{{ts}}" ,
9+ type : "action" ,
10+ props : {
11+ gem,
12+ candidateId : {
13+ propDefinition : [
14+ "gem" ,
15+ "candidateId" ,
16+ ] ,
17+ } ,
18+ newStage : {
19+ propDefinition : [
20+ "gem" ,
21+ "newStage" ,
22+ ] ,
23+ } ,
24+ changeNote : {
25+ propDefinition : [
26+ "gem" ,
27+ "changeNote" ,
28+ ] ,
29+ optional : true ,
30+ } ,
31+ } ,
32+ async run ( { $ } ) {
33+ const response = await this . gem . updateCandidateStage ( {
34+ candidateId : this . candidateId ,
35+ newStage : this . newStage ,
36+ changeNote : this . changeNote ,
37+ } ) ;
38+ $ . export (
39+ "$summary" ,
40+ `Updated candidate stage for candidate ${ this . candidateId } to new stage ${ this . newStage } ` ,
41+ ) ;
42+ return response ;
43+ } ,
44+ } ;
You can’t perform that action at this time.
0 commit comments