-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New Components - verifly #21271
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
james-sib
wants to merge
1
commit into
PipedreamHQ:master
Choose a base branch
from
james-sib:new-components-verifly
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+185
−0
Open
New Components - verifly #21271
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
components/verifly/actions/create-bulk-job/create-bulk-job.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| import app from "../../verifly.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "verifly-create-bulk-job", | ||
| name: "Create Bulk Job", | ||
| description: "Submit a list of email addresses for asynchronous bulk verification. Returns a job you can poll for status and results. [See the documentation](https://verifly.email/openapi.json).", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| annotations: { | ||
| destructiveHint: false, | ||
| openWorldHint: true, | ||
| readOnlyHint: false, | ||
| }, | ||
| props: { | ||
| app, | ||
| emails: { | ||
| propDefinition: [ | ||
| app, | ||
| "emails", | ||
| ], | ||
| }, | ||
| filename: { | ||
| propDefinition: [ | ||
| app, | ||
| "filename", | ||
| ], | ||
| }, | ||
| webhookUrl: { | ||
| propDefinition: [ | ||
| app, | ||
| "webhookUrl", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.app.createBulkJob({ | ||
| $, | ||
| data: { | ||
| emails: this.emails, | ||
| filename: this.filename, | ||
| webhook_url: this.webhookUrl, | ||
| }, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully created bulk verification job${response.job_id | ||
| ? ` \`${response.job_id}\`` | ||
| : ""}`); | ||
|
|
||
| return response; | ||
| }, | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| import app from "../../verifly.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "verifly-verify-email", | ||
| name: "Verify Email", | ||
| description: "Verify a single email address for deliverability, syntax, MX, SMTP, disposable, role, catch-all and free-provider signals. [See the documentation](https://verifly.email/openapi.json).", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| annotations: { | ||
| destructiveHint: false, | ||
| openWorldHint: true, | ||
| readOnlyHint: true, | ||
| }, | ||
| props: { | ||
| app, | ||
| email: { | ||
| propDefinition: [ | ||
| app, | ||
| "email", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.app.verifyEmail({ | ||
| $, | ||
| email: this.email, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully verified \`${this.email}\` (result: ${response.result ?? "unknown"})`); | ||
|
|
||
| return response; | ||
| }, | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| { | ||
| "name": "@pipedream/verifly", | ||
| "version": "0.0.1", | ||
| "description": "Pipedream Verifly Components", | ||
| "main": "verifly.app.mjs", | ||
| "keywords": [ | ||
| "pipedream", | ||
| "verifly" | ||
| ], | ||
| "homepage": "https://pipedream.com/apps/verifly", | ||
| "author": "Pipedream <support@pipedream.com> (https://pipedream.com/)", | ||
| "publishConfig": { | ||
| "access": "public" | ||
| }, | ||
| "dependencies": { | ||
| "@pipedream/platform": "^3.0.3" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| import { axios } from "@pipedream/platform"; | ||
|
|
||
| export default { | ||
| type: "app", | ||
| app: "verifly", | ||
| propDefinitions: { | ||
| email: { | ||
| type: "string", | ||
| label: "Email", | ||
| description: "The email address to verify, for example `lead@example.com`.", | ||
| }, | ||
| emails: { | ||
| type: "string[]", | ||
| label: "Emails", | ||
| description: "The list of email addresses to verify in a single bulk job.", | ||
| }, | ||
| filename: { | ||
| type: "string", | ||
| label: "Filename", | ||
| description: "An optional name to label the bulk job, for example `leads-2024.csv`.", | ||
| optional: true, | ||
| }, | ||
| webhookUrl: { | ||
| type: "string", | ||
| label: "Webhook URL", | ||
| description: "Optional public HTTPS URL that Verifly calls when the bulk job completes.", | ||
| optional: true, | ||
| }, | ||
| }, | ||
| methods: { | ||
| _baseUrl() { | ||
| return "https://verifly.email/api/v1"; | ||
| }, | ||
| _headers(headers = {}) { | ||
| return { | ||
| "Authorization": `Bearer ${this.$auth.api_key}`, | ||
| "Content-Type": "application/json", | ||
| ...headers, | ||
| }; | ||
| }, | ||
| _makeRequest({ | ||
| $ = this, path, headers, ...args | ||
| }) { | ||
| return axios($, { | ||
| url: `${this._baseUrl()}${path}`, | ||
| headers: this._headers(headers), | ||
| ...args, | ||
| }); | ||
| }, | ||
| verifyEmail({ | ||
| email, ...args | ||
| } = {}) { | ||
| return this._makeRequest({ | ||
| path: "/verify", | ||
| params: { | ||
| email, | ||
| }, | ||
| ...args, | ||
| }); | ||
| }, | ||
| createBulkJob(args = {}) { | ||
| return this._makeRequest({ | ||
| method: "POST", | ||
| path: "/verify/bulk", | ||
| ...args, | ||
| }); | ||
| }, | ||
| getJob({ | ||
| jobId, ...args | ||
| } = {}) { | ||
| return this._makeRequest({ | ||
| path: `/jobs/${jobId}`, | ||
| ...args, | ||
| }); | ||
| }, | ||
| getCredits(args = {}) { | ||
| return this._makeRequest({ | ||
| path: "/credits", | ||
| ...args, | ||
| }); | ||
| }, | ||
| }, | ||
| }; | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Add a concrete example for the
emailsarray prop.This shared prop is reused by the bulk-job action, but the description never shows the expected array shape. In practice that makes it easy for agents/users to pass a single comma-delimited string instead of an actual list. Something like
["lead@example.com", "sales@example.com"]would remove the ambiguity.As per coding guidelines, prop descriptions must be explicit about formats and examples. As per path instructions, prop
descriptionfields must be written for AI agent consumption and include concrete inline examples for non-obvious formats.🤖 Prompt for AI Agents
Sources: Coding guidelines, Path instructions