diff --git a/components/verifi_email/actions/validate-email-address/validate-email-address.mjs b/components/verifi_email/actions/validate-email-address/validate-email-address.mjs new file mode 100644 index 0000000000000..fcad2ef5d110c --- /dev/null +++ b/components/verifi_email/actions/validate-email-address/validate-email-address.mjs @@ -0,0 +1,27 @@ +import verifiEmail from "../../verifi_email.app.mjs"; + +export default { + key: "verifi_email-validate-email-address", + name: "Validate Email Address", + description: "Validate an email address. [See the documentation](https://verifi.email/docs)", + version: "0.0.1", + type: "action", + props: { + verifiEmail, + email: { + type: "string", + label: "Email Address", + description: "The email address to validate", + }, + }, + async run({ $ }) { + const response = await this.verifiEmail.validateEmailAddress({ + $, + params: { + email: this.email, + }, + }); + $.export("$summary", `Successfully validated email address ${this.email}`); + return response; + }, +}; diff --git a/components/verifi_email/package.json b/components/verifi_email/package.json index 0527a6423b80f..e074229d51e5c 100644 --- a/components/verifi_email/package.json +++ b/components/verifi_email/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/verifi_email", - "version": "0.0.1", + "version": "0.1.0", "description": "Pipedream verifi.email Components", "main": "verifi_email.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } -} \ No newline at end of file +} diff --git a/components/verifi_email/verifi_email.app.mjs b/components/verifi_email/verifi_email.app.mjs index 55163d00046ec..399d4af368efc 100644 --- a/components/verifi_email/verifi_email.app.mjs +++ b/components/verifi_email/verifi_email.app.mjs @@ -1,11 +1,21 @@ +import { axios } from "@pipedream/platform"; + export default { type: "app", app: "verifi_email", propDefinitions: {}, methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); + validateEmailAddress({ + $ = this, params, ...opts + }) { + return axios($, { + url: "https://api.verifi.email/check", + params: { + ...params, + token: this.$auth.api_key, + }, + ...opts, + }); }, }, }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6c3c7bbacd1e1..fadacef5fcd0e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10159,8 +10159,7 @@ importers: specifier: ^6.11.1 version: 6.13.1 - components/pingback: - specifiers: {} + components/pingback: {} components/pingbell: dependencies: @@ -14570,7 +14569,11 @@ importers: components/veriff: {} - components/verifi_email: {} + components/verifi_email: + dependencies: + '@pipedream/platform': + specifier: ^3.1.0 + version: 3.1.0 components/verifiedemail: {} @@ -29916,22 +29919,22 @@ packages: superagent@3.8.1: resolution: {integrity: sha512-VMBFLYgFuRdfeNQSMLbxGSLfmXL/xc+OO+BZp41Za/NRDBet/BNbkRJrYzCUu0u4GU0i/ml2dtT8b9qgkw9z6Q==} engines: {node: '>= 4.0'} - deprecated: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at . + deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net superagent@4.1.0: resolution: {integrity: sha512-FT3QLMasz0YyCd4uIi5HNe+3t/onxMyEho7C3PSqmti3Twgy2rXT4fmkTz6wRL6bTF4uzPcfkUCa8u4JWHw8Ag==} engines: {node: '>= 6.0'} - deprecated: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at . + deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net superagent@5.3.1: resolution: {integrity: sha512-wjJ/MoTid2/RuGCOFtlacyGNxN9QLMgcpYLDQlWFIhhdJ93kNscFonGvrpAHSCVjRVj++DGCglocF7Aej1KHvQ==} engines: {node: '>= 7.0.0'} - deprecated: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at . + deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net superagent@7.1.6: resolution: {integrity: sha512-gZkVCQR1gy/oUXr+kxJMLDjla434KmSOKbx5iGD30Ql+AkJQ/YlPKECJy2nhqOsHLjGHzoDTXNSjhnvWhzKk7g==} engines: {node: '>=6.4.0 <13 || >=14'} - deprecated: Please downgrade to v7.1.5 if you need IE/ActiveXObject support OR upgrade to v8.0.0 as we no longer support IE and published an incorrect patch version (see https://github.com/visionmedia/superagent/issues/1731) + deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net supports-color@2.0.0: resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==}