Skip to content

fix: Apify: actor -> Actor, add @apify/consts, tracking headers #17396

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

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion components/adtraction/adtraction.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export default {
console.log(Object.keys(this.$auth));
},
},
};
};
2 changes: 1 addition & 1 deletion components/apify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The Apify API unleashes the power to automate web scraping, process data, and or

**E-commerce Price Monitoring**

- Set up a Pipedream workflow that triggers an Apify actor to scrape product prices from multiple e-commerce sites daily. Store this data in Pipedream's built-in data store and use the Pipedream Email API to send a daily digest of the best deals to subscribers.
- Set up a Pipedream workflow that triggers an Apify Actor to scrape product prices from multiple e-commerce sites daily. Store this data in Pipedream's built-in data store and use the Pipedream Email API to send a daily digest of the best deals to subscribers.

**Social Media Sentiment Analysis**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "apify-get-dataset-items",
name: "Get Dataset Items",
description: "Returns data stored in a dataset. [See the documentation](https://docs.apify.com/api/v2/dataset-items-get)",
version: "0.0.2",
version: "0.0.3",
type: "action",
props: {
apify,
Expand Down
12 changes: 6 additions & 6 deletions components/apify/actions/run-actor/run-actor.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { EVENT_TYPES } from "../../common/constants.mjs";
export default {
key: "apify-run-actor",
name: "Run Actor",
description: "Performs an execution of a selected actor in Apify. [See the documentation](https://docs.apify.com/api/v2#/reference/actors/run-collection/run-actor)",
version: "0.0.3",
description: "Performs an execution of a selected Actor in Apify. [See the documentation](https://docs.apify.com/api/v2#/reference/actors/run-collection/run-actor)",
version: "0.0.4",
type: "action",
props: {
apify,
Expand All @@ -30,7 +30,7 @@ export default {
runAsynchronously: {
type: "boolean",
label: "Run Asynchronously",
description: "Set to `true` to run the actor asynchronously",
description: "Set to `true` to run the Actor asynchronously",
reloadProps: true,
},
timeout: {
Expand Down Expand Up @@ -162,7 +162,7 @@ export default {
props.properties = {
type: "object",
label: "Properties",
description: "Properties to set for this actor",
description: "Properties to set for this Actor",
};
}
if (this.runAsynchronously) {
Expand Down Expand Up @@ -241,8 +241,8 @@ export default {
},
});
const summary = this.runAsynchronously
? `Successfully started actor run with ID: ${response.data.id}`
: `Successfully ran actor with ID: ${this.actorId}`;
? `Successfully started Actor run with ID: ${response.data.id}`
: `Successfully ran Actor with ID: ${this.actorId}`;
$.export("$summary", `${summary}`);
return response;
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "apify-run-task-synchronously",
name: "Run Task Synchronously",
description: "Run a specific task and return its dataset items. [See the documentation](https://docs.apify.com/api/v2/actor-task-run-sync-get-dataset-items-get)",
version: "0.0.2",
version: "0.0.3",
type: "action",
props: {
apify,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "apify-scrape-single-url",
name: "Scrape Single URL",
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.",
version: "0.0.3",
version: "0.0.4",
type: "action",
props: {
apify,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "apify-set-key-value-store-record",
name: "Set Key-Value Store Record",
description: "Create or update a record in the key-value store of Apify. [See the documentation](https://docs.apify.com/api/v2#/reference/key-value-stores/record-collection/put-record)",
version: "0.0.3",
version: "0.0.4",
type: "action",
props: {
apify,
Expand Down
3 changes: 2 additions & 1 deletion components/apify/apify.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default {
userActorId: {
type: "string",
label: "Actor ID",
description: "The ID of the actor to monitor.",
description: "The ID of the Actor to monitor.",
async options({ page }) {
const { data: { items } } = await this.listUserActors({
params: {
Expand Down Expand Up @@ -162,6 +162,7 @@ export default {
return {
"Content-Type": "application/json",
"Authorization": `Bearer ${this.$auth.api_token}`,
"x-apify-integration-platform": "pipedream",
};
},
_makeRequest({
Expand Down
3 changes: 2 additions & 1 deletion components/apify/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/apify",
"version": "0.2.1",
"version": "0.2.2",
"description": "Pipedream Apify Components",
"main": "apify.app.mjs",
"keywords": [
Expand All @@ -13,6 +13,7 @@
"access": "public"
},
"dependencies": {
"@apify/consts": "^2.41.0",
"@pipedream/platform": "^3.0.3"
}
}
11 changes: 6 additions & 5 deletions components/apify/sources/common/base.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { WEBHOOK_EVENT_TYPES } from '@apify/consts';
import apify from "../../apify.app.mjs";

export default {
Expand All @@ -15,10 +16,10 @@ export default {
data: {
requestUrl: this.http.endpoint,
eventTypes: [
"ACTOR.RUN.SUCCEEDED",
"ACTOR.RUN.FAILED",
"ACTOR.RUN.TIMED_OUT",
"ACTOR.RUN.ABORTED",
WEBHOOK_EVENT_TYPES.ACTOR_RUN_SUCCEEDED,
WEBHOOK_EVENT_TYPES.ACTOR_RUN_FAILED,
WEBHOOK_EVENT_TYPES.ACTOR_RUN_TIMED_OUT,
WEBHOOK_EVENT_TYPES.ACTOR_RUN_ABORTED,
],
condition: this.getCondition(),
},
Expand All @@ -36,7 +37,7 @@ export default {
});

this.$emit(body, {
summary: body.eventType === "TEST"
summary: body.eventType === WEBHOOK_EVENT_TYPES.TEST
? "Webhook test has successfully triggered!"
: this.getSummary(body),
id: body.eventData.actorRunId || `${body.userId}-${body.createAt}`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ export default {
...common,
key: "apify-new-finished-actor-run-instant",
name: "New Finished Actor Run (Instant)",
description: "Emit new event when a selected actor is run and finishes.",
version: "0.0.3",
description: "Emit new event when a selected Actor is run and finishes.",
version: "0.0.4",
type: "source",
dedupe: "unique",
props: {
Expand All @@ -27,7 +27,7 @@ export default {
};
},
getSummary(body) {
return `A new actor run ${body.eventData.actorRunId} has finished`;
return `A new Actor run ${body.eventData.actorRunId} has finished`;
},
},
sampleEmit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "apify-new-finished-task-run-instant",
name: "New Finished Task Run (Instant)",
description: "Emit new event when a selected task is run and finishes.",
version: "0.0.3",
version: "0.0.4",
type: "source",
dedupe: "unique",
props: {
Expand Down
2 changes: 1 addition & 1 deletion components/asters/asters.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export default {
console.log(Object.keys(this.$auth));
},
},
};
};
2 changes: 1 addition & 1 deletion components/bitget/bitget.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export default {
console.log(Object.keys(this.$auth));
},
},
};
};
2 changes: 1 addition & 1 deletion components/explorium/explorium.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export default {
console.log(Object.keys(this.$auth));
},
},
};
};
2 changes: 1 addition & 1 deletion components/joggai/joggai.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export default {
console.log(Object.keys(this.$auth));
},
},
};
};
2 changes: 1 addition & 1 deletion components/mumble/mumble.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export default {
console.log(Object.keys(this.$auth));
},
},
};
};
2 changes: 1 addition & 1 deletion components/neetoform/neetoform.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export default {
console.log(Object.keys(this.$auth));
},
},
};
};
2 changes: 1 addition & 1 deletion components/order_sender/order_sender.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export default {
console.log(Object.keys(this.$auth));
},
},
};
};
2 changes: 1 addition & 1 deletion components/pinghome/pinghome.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export default {
console.log(Object.keys(this.$auth));
},
},
};
};
2 changes: 1 addition & 1 deletion components/prepr_graphql/prepr_graphql.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export default {
console.log(Object.keys(this.$auth));
},
},
};
};
2 changes: 1 addition & 1 deletion components/prodatakey/prodatakey.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export default {
console.log(Object.keys(this.$auth));
},
},
};
};
2 changes: 1 addition & 1 deletion components/salesforge/salesforge.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export default {
console.log(Object.keys(this.$auth));
},
},
};
};
2 changes: 1 addition & 1 deletion components/sign_plus/sign_plus.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export default {
console.log(Object.keys(this.$auth));
},
},
};
};
2 changes: 1 addition & 1 deletion components/themarketer/themarketer.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export default {
console.log(Object.keys(this.$auth));
},
},
};
};
2 changes: 1 addition & 1 deletion components/vincario/vincario.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export default {
console.log(Object.keys(this.$auth));
},
},
};
};
2 changes: 1 addition & 1 deletion components/zenedu/zenedu.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export default {
console.log(Object.keys(this.$auth));
},
},
};
};
14 changes: 10 additions & 4 deletions pnpm-lock.yaml

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