Skip to content

New Components - easyhire #13250

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

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import easyhire from "../../easyhire.app.mjs";

export default {
key: "easyhire-create-application",
name: "Create Application",
description: "Creates a new application in EasyHire. [See the documentation](https://easyhire.ai/integrations/api-docs/)",
version: "0.0.1",
type: "action",
props: {
easyhire,
jobOpeningId: {
type: "string",
label: "Job Opening ID",
description: "The ID of the job opening to create the application for",
},
applicantEmail: {
type: "string",
label: "Applicant Email",
description: "The email address of the applicant",
},
applicantName: {
type: "string",
label: "Applicant Name",
description: "The name of the applicant",
},
resumePdf: {
type: "string",
label: "Resume PDF",
description: "The URL of a .pdf file containing the applicant's resume",
},
uniqueExternalId: {
type: "string",
label: "Unique External ID",
description: "A unique external ID representing the application",
optional: true,
},
},
async run({ $ }) {
const response = await this.easyhire.createApplication({
$,
data: {
job_opening_id: this.jobOpeningId,
applicant_email: this.applicantEmail,
applicant_name: this.applicantName,
resume_pdf: this.resumePdf,
unique_external_id: this.uniqueExternalId,
},
});
$.export("$summary", `Successfully created application for ${this.applicantName}`);
return response;
},
};
34 changes: 31 additions & 3 deletions components/easyhire/easyhire.app.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,39 @@
import { axios } from "@pipedream/platform";

export default {
type: "app",
app: "easyhire",
propDefinitions: {},
methods: {
// this.$auth contains connected account data
authKeys() {
console.log(Object.keys(this.$auth));
_baseUrl() {
return "https://easyhire.ai/api";
},
async _makeRequest(opts = {}) {
const {
$ = this,
method = "GET",
path,
headers,
...otherOpts
} = opts;
return axios($, {
...otherOpts,
method,
url: this._baseUrl() + path,
headers: {
...headers,
"Content-Type": "application/json",
"Authorization": `Api-Key ${this.$auth.api_key}`,
"Accept-Version": "v1",
},
});
},
createApplication(opts = {}) {
return this._makeRequest({
method: "POST",
path: "/create-application/",
...opts,
});
},
},
};
7 changes: 5 additions & 2 deletions components/easyhire/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/easyhire",
"version": "0.0.1",
"version": "0.1.0",
"description": "Pipedream easyhire Components",
"main": "easyhire.app.mjs",
"keywords": [
Expand All @@ -11,5 +11,8 @@
"author": "Pipedream <support@pipedream.com> (https://pipedream.com/)",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@pipedream/platform": "^3.0.3"
}
}
}
9 changes: 6 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading