Skip to content

Commit 967f090

Browse files
committed
Merge remote-tracking branch 'origin/master' into issue-18167
2 parents 66d5999 + 59b21cc commit 967f090

File tree

183 files changed

+10186
-522
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

183 files changed

+10186
-522
lines changed

components/afosto/afosto.app.mjs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
export default {
2+
type: "app",
3+
app: "afosto",
4+
propDefinitions: {},
5+
methods: {
6+
// this.$auth contains connected account data
7+
authKeys() {
8+
console.log(Object.keys(this.$auth));
9+
},
10+
},
11+
};

components/afosto/package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "@pipedream/afosto",
3+
"version": "0.0.1",
4+
"description": "Pipedream Afosto Components",
5+
"main": "afosto.app.mjs",
6+
"keywords": [
7+
"pipedream",
8+
"afosto"
9+
],
10+
"homepage": "https://pipedream.com/apps/afosto",
11+
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
12+
"publishConfig": {
13+
"access": "public"
14+
}
15+
}
Lines changed: 6 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,25 @@
11
import apify from "../../apify.app.mjs";
2-
import { ACTOR_ID } from "../../common/constants.mjs";
2+
import { gotScraping } from "got-scraping";
33

44
export default {
55
key: "apify-scrape-single-url",
66
name: "Scrape Single URL",
7-
description: "Executes a scraper on a specific website and returns its content as text. This action is perfect for extracting content from a single page.",
8-
version: "0.0.4",
7+
description: "Executes a scraper on a specific website and returns its content as HTML. This action is perfect for extracting content from a single page. [See the documentation](https://docs.apify.com/sdk/js/docs/examples/crawl-single-url)",
8+
version: "0.1.0",
99
type: "action",
1010
props: {
1111
apify,
1212
url: {
1313
type: "string",
1414
label: "URL",
1515
description: "The URL of the web page to scrape.",
16-
optional: false,
17-
},
18-
crawlerType: {
19-
type: "string",
20-
label: "Crawler Type",
21-
description: "Select the crawling engine:\n- **Headless web browser** - Useful for modern websites with anti-scraping protections and JavaScript rendering. It recognizes common blocking patterns like CAPTCHAs and automatically retries blocked requests through new sessions. However, running web browsers is more expensive as it requires more computing resources and is slower. It is recommended to use at least 8 GB of RAM.\n- **Stealthy web browser** (default) - Another headless web browser with anti-blocking measures enabled. Try this if you encounter bot protection while scraping. For best performance, use with Apify Proxy residential IPs. \n- **Raw HTTP client** - High-performance crawling mode that uses raw HTTP requests to fetch the pages. It is faster and cheaper, but it might not work on all websites.",
22-
options: [
23-
{
24-
label: "Headless browser (stealthy Firefox+Playwright) - Very reliable, best in avoiding blocking, but might be slow",
25-
value: "playwright:firefox",
26-
},
27-
{
28-
label: "Headless browser (Chrome+Playwright) - Reliable, but might be slow",
29-
value: "playwright:chrome",
30-
},
31-
{
32-
label: "Raw HTTP client (Cheerio) - Extremely fast, but cannot handle dynamic content",
33-
value: "cheerio",
34-
},
35-
],
3616
},
3717
},
3818
async run({ $ }) {
39-
const response = await this.apify.runActor({
40-
$,
41-
actorId: ACTOR_ID,
42-
data: {
43-
crawlerType: this.crawlerType,
44-
maxCrawlDepth: 0,
45-
maxCrawlPages: 1,
46-
maxResults: 1,
47-
startUrls: [
48-
{
49-
url: this.url,
50-
},
51-
],
52-
},
19+
const { body } = await gotScraping({
20+
url: this.url,
5321
});
5422
$.export("$summary", `Successfully scraped content from ${this.url}`);
55-
return response;
23+
return body;
5624
},
5725
};

components/apify/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/apify",
3-
"version": "0.2.2",
3+
"version": "0.3.0",
44
"description": "Pipedream Apify Components",
55
"main": "apify.app.mjs",
66
"keywords": [
@@ -14,6 +14,7 @@
1414
},
1515
"dependencies": {
1616
"@apify/consts": "^2.41.0",
17-
"@pipedream/platform": "^3.0.3"
17+
"@pipedream/platform": "^3.0.3",
18+
"got-scraping": "^4.1.2"
1819
}
1920
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import bamboohr from "../../bamboohr.app.mjs";
2+
3+
export default {
4+
key: "bamboohr-add-application-comment",
5+
name: "Add Application Comment",
6+
description: "Add a comment to an application. [See the documentation](https://documentation.bamboohr.com/reference/post-application-comment-1)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
bamboohr,
11+
applicationId: {
12+
propDefinition: [
13+
bamboohr,
14+
"applicationId",
15+
],
16+
},
17+
comment: {
18+
type: "string",
19+
label: "Comment",
20+
description: "The comment to add to the application",
21+
},
22+
},
23+
async run({ $ }) {
24+
const response = await this.bamboohr.addApplicationComment({
25+
$,
26+
applicationId: this.applicationId,
27+
data: {
28+
comment: this.comment,
29+
type: "comment",
30+
},
31+
});
32+
$.export("$summary", `Added comment to application ${this.applicationId}`);
33+
return response;
34+
},
35+
};
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import bamboohr from "../../bamboohr.app.mjs";
2+
import fs from "fs";
3+
import { ConfigurationError } from "@pipedream/platform";
4+
5+
export default {
6+
key: "bamboohr-download-resume",
7+
name: "Download Resume",
8+
description: "Download a resume from an application. [See the documentation](https://documentation.bamboohr.com/reference/get-company-file)",
9+
version: "0.0.1",
10+
type: "action",
11+
props: {
12+
bamboohr,
13+
applicationId: {
14+
propDefinition: [
15+
bamboohr,
16+
"applicationId",
17+
],
18+
},
19+
filename: {
20+
type: "string",
21+
label: "Filename",
22+
description: "The filename to save the downloaded file as in the `/tmp` directory",
23+
},
24+
syncDir: {
25+
type: "dir",
26+
accessMode: "write",
27+
sync: true,
28+
},
29+
},
30+
async run({ $ }) {
31+
const { resumeFileId } = await this.bamboohr.getApplication({
32+
$,
33+
applicationId: this.applicationId,
34+
});
35+
36+
if (!resumeFileId) {
37+
throw new ConfigurationError("No resume file ID found for application");
38+
}
39+
40+
const response = await this.bamboohr.downloadFile({
41+
$,
42+
fileId: resumeFileId,
43+
});
44+
45+
const rawcontent = response.toString("base64");
46+
const buffer = Buffer.from(rawcontent, "base64");
47+
const downloadedFilepath = `/tmp/${this.filename}`;
48+
fs.writeFileSync(downloadedFilepath, buffer);
49+
50+
$.export("$summary", `Downloaded resume for application ${this.applicationId}`);
51+
52+
return {
53+
filename: this.filename,
54+
downloadedFilepath,
55+
};
56+
},
57+
};
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import bamboohr from "../../bamboohr.app.mjs";
2+
3+
export default {
4+
key: "bamboohr-get-application",
5+
name: "Get Application",
6+
description: "Get the details of an application. [See the documentation](https://documentation.bamboohr.com/reference/get-application-details-1)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
bamboohr,
11+
applicationId: {
12+
propDefinition: [
13+
bamboohr,
14+
"applicationId",
15+
],
16+
},
17+
},
18+
async run({ $ }) {
19+
const response = await this.bamboohr.getApplication({
20+
$,
21+
applicationId: this.applicationId,
22+
});
23+
$.export("$summary", `Found application ${this.applicationId}`);
24+
return response;
25+
},
26+
};
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
import bamboohr from "../../bamboohr.app.mjs";
2+
import constants from "../../common/constants.mjs";
3+
4+
export default {
5+
key: "bamboohr-list-applications",
6+
name: "List Applications",
7+
description: "List all applications. [See the documentation](https://documentation.bamboohr.com/reference/get-applications)",
8+
version: "0.0.1",
9+
type: "action",
10+
props: {
11+
bamboohr,
12+
jobId: {
13+
propDefinition: [
14+
bamboohr,
15+
"jobId",
16+
],
17+
},
18+
statusId: {
19+
propDefinition: [
20+
bamboohr,
21+
"statusId",
22+
],
23+
optional: true,
24+
},
25+
statusGroup: {
26+
type: "string",
27+
label: "Status Group",
28+
description: "The group of statuses to filter by",
29+
options: constants.APPLICATION_STATUS_GROUPS,
30+
optional: true,
31+
},
32+
jobStatusGroup: {
33+
type: "string",
34+
label: "Job Status Group",
35+
description: "The group of job statuses to filter by",
36+
options: constants.JOB_STATUS_GROUPS,
37+
optional: true,
38+
},
39+
searchString: {
40+
type: "string",
41+
label: "Search String",
42+
description: "A general search criteria by which to find applications",
43+
optional: true,
44+
},
45+
sortBy: {
46+
type: "string",
47+
label: "Sort By",
48+
description: "The field to sort by",
49+
options: constants.APPLICATION_SORT_FIELDS,
50+
optional: true,
51+
},
52+
sortOrder: {
53+
type: "string",
54+
label: "Sort Order",
55+
description: "The order in which to sort the results",
56+
options: [
57+
"ASC",
58+
"DESC",
59+
],
60+
optional: true,
61+
},
62+
newSince: {
63+
type: "string",
64+
label: "New Since",
65+
description: "Only get applications newer than a given UTC timestamp, for example `2024-01-01 13:00:00`",
66+
optional: true,
67+
},
68+
page: {
69+
type: "integer",
70+
label: "Page",
71+
description: "The page number to return",
72+
optional: true,
73+
},
74+
},
75+
async run({ $ }) {
76+
const response = await this.bamboohr.listApplications({
77+
$,
78+
params: {
79+
jobId: this.jobId,
80+
applicationStatusId: this.statusId,
81+
applicationStatus: this.statusGroup,
82+
jobStatusGroups: this.jobStatusGroup,
83+
searchString: this.searchString,
84+
sortBy: this.sortBy,
85+
sortOrder: this.sortOrder,
86+
newSince: this.newSince,
87+
page: this.page,
88+
},
89+
});
90+
$.export("$summary", `Found ${response.applications.length} applications`);
91+
return response;
92+
},
93+
};
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import bamboohr from "../../bamboohr.app.mjs";
2+
3+
export default {
4+
key: "bamboohr-update-application-status",
5+
name: "Update Application Status",
6+
description: "Update the status of an application. [See the documentation](https://documentation.bamboohr.com/reference/post-applicant-status-1)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
bamboohr,
11+
applicationId: {
12+
propDefinition: [
13+
bamboohr,
14+
"applicationId",
15+
],
16+
},
17+
statusId: {
18+
propDefinition: [
19+
bamboohr,
20+
"statusId",
21+
],
22+
},
23+
},
24+
async run({ $ }) {
25+
const response = await this.bamboohr.updateApplicationStatus({
26+
$,
27+
applicationId: this.applicationId,
28+
data: {
29+
status: this.statusId,
30+
},
31+
});
32+
$.export("$summary", "Updated status of application.");
33+
return response;
34+
},
35+
};

0 commit comments

Comments
 (0)