@pipedream/whoisfreaks 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # Overview
2
+
3
+ The WhoisFreaks API offers a way to dig into the riches of domain registration data. With this API, you can retrieve extensive WHOIS records, including registrar details, domain status, creation and expiration dates, and registrant information, among other data. When integrated with Pipedream's serverless platform, you unlock the potential to automate domain research, track domain registrations, monitor changes, and connect insights with other apps for a multitude of purposes.
4
+
5
+ # Example Workflows
6
+
7
+ - **Domain Registration Monitoring**: Build a workflow on Pipedream that tracks domain registrations for specific keywords. When a new domain containing the keyword is registered, use WhoisFreaks to fetch WHOIS data and send alerts via Slack or email to the interested parties.
8
+
9
+ - **Trademark Protection**: Set up a Pipedream workflow to monitor the registration of domains similar to your trademarks. WhoisFreaks can be used to identify potential trademark infringements, and you can connect to a CRM like Salesforce to initiate a follow-up action or legal response.
10
+
11
+ - **Competitive Intelligence Gathering**: Create a Pipedream workflow to perform regular searches for domains registered by your competitors. Utilize WhoisFreaks API to extract relevant data and compile it into a report, which can be periodically sent to Google Sheets for analysis and shared with your team.
@@ -0,0 +1,45 @@
1
+ import whoisfreaks from "../../whoisfreaks.app.mjs";
2
+
3
+ export default {
4
+ key: "whoisfreaks-domain-lookup",
5
+ name: "Domain Lookup",
6
+ description: "Retrieve details about a domain name. [See the documentation](https://whoisfreaks.com/products/whois-api#live_lookup)",
7
+ version: "0.0.1",
8
+ type: "action",
9
+ props: {
10
+ whoisfreaks,
11
+ domainName: {
12
+ propDefinition: [
13
+ whoisfreaks,
14
+ "domainName",
15
+ ],
16
+ },
17
+ lookupType: {
18
+ type: "string",
19
+ label: "Lookup Type",
20
+ description: "Whether to perform a `live` or `historical` lookup",
21
+ options: [
22
+ "live",
23
+ "historical",
24
+ ],
25
+ },
26
+ format: {
27
+ propDefinition: [
28
+ whoisfreaks,
29
+ "format",
30
+ ],
31
+ },
32
+ },
33
+ async run({ $ }) {
34
+ const response = await this.whoisfreaks.domainLookup({
35
+ $,
36
+ params: {
37
+ domainName: this.domainName,
38
+ whois: this.lookupType,
39
+ format: this.format,
40
+ },
41
+ });
42
+ $.export("$summary", `Successfully performed lookup for domain ${this.domainName}`);
43
+ return response;
44
+ },
45
+ };
@@ -0,0 +1,34 @@
1
+ import whoisfreaks from "../../whoisfreaks.app.mjs";
2
+
3
+ export default {
4
+ key: "whoisfreaks-ip-lookup",
5
+ name: "IP Lookup",
6
+ description: "Retrieve information about an IP address. [See the documentation](https://whoisfreaks.com/products/whois-api#ip_lookup)",
7
+ version: "0.0.1",
8
+ type: "action",
9
+ props: {
10
+ whoisfreaks,
11
+ ip: {
12
+ type: "string",
13
+ label: "IP",
14
+ description: "IPv4 or IPv6 address for the requested whois",
15
+ },
16
+ format: {
17
+ propDefinition: [
18
+ whoisfreaks,
19
+ "format",
20
+ ],
21
+ },
22
+ },
23
+ async run({ $ }) {
24
+ const response = await this.whoisfreaks.ipLookup({
25
+ $,
26
+ params: {
27
+ ip: this.ip,
28
+ format: this.format,
29
+ },
30
+ });
31
+ $.export("$summary", `Successfully performed lookup for IP ${this.ip}`);
32
+ return response;
33
+ },
34
+ };
@@ -0,0 +1,76 @@
1
+ import whoisfreaks from "../../whoisfreaks.app.mjs";
2
+ import { ConfigurationError } from "@pipedream/platform";
3
+
4
+ export default {
5
+ key: "whoisfreaks-reverse-lookup",
6
+ name: "Reverse Lookup",
7
+ description: "Retrieve details about a domain by keyword, email, registrant name or company. [See the documentation](https://whoisfreaks.com/products/whois-api#reverse_lookup)",
8
+ version: "0.0.1",
9
+ type: "action",
10
+ props: {
11
+ whoisfreaks,
12
+ keyword: {
13
+ type: "string",
14
+ label: "Keyword",
15
+ description: "Keyword search utilizes case-insensitive Pattern Matching search technique to search in our historical database. For example, `whoisfreaks` matches with any keyword that have the searched pattern like `mywhoisfreaks` and `whoisfreakscom`.",
16
+ optional: true,
17
+ },
18
+ email: {
19
+ type: "string",
20
+ label: "Email",
21
+ description: "Email search uses case-insensitive exact matching technique to search in our historical database. For example, `support@whoisfreaks.com` matches only with `support@whoisfreaks.com`.",
22
+ optional: true,
23
+ },
24
+ owner: {
25
+ type: "string",
26
+ label: "Owner",
27
+ description: "The owner name for requested whois",
28
+ optional: true,
29
+ },
30
+ company: {
31
+ type: "string",
32
+ label: "Company",
33
+ description: "Registrant name or Company search use full-text search technique to search in our historical database. For example, `whoisfreaks` matched with `whoisfreaks`, `whoisfreak`, `whois`, `mywhoisfreaks` and `whoisfreakscom`.",
34
+ optional: true,
35
+ },
36
+ format: {
37
+ propDefinition: [
38
+ whoisfreaks,
39
+ "format",
40
+ ],
41
+ },
42
+ page: {
43
+ type: "integer",
44
+ label: "Page",
45
+ description: "For getting next or desired page of whois info. Default: `1`",
46
+ default: 1,
47
+ optional: true,
48
+ },
49
+ },
50
+ async run({ $ }) {
51
+ if ([
52
+ this.keyword,
53
+ this.email,
54
+ this.owner,
55
+ this.company,
56
+ ].filter((v) => v !== undefined).length !== 1) {
57
+ throw new ConfigurationError("Must enter one and only one of `keyword`, `email`, `owner`, or `company`");
58
+ }
59
+
60
+ const response = await this.whoisfreaks.domainLookup({
61
+ $,
62
+ params: {
63
+ keyword: this.keyword,
64
+ email: this.email,
65
+ owner: this.owner,
66
+ company: this.company,
67
+ whois: "reverse",
68
+ format: this.format,
69
+ page: this.page,
70
+ },
71
+ });
72
+
73
+ $.export("$summary", "Successfully performed reverse lookup");
74
+ return response;
75
+ },
76
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/whoisfreaks",
3
- "version": "0.0.1",
3
+ "version": "0.1.0",
4
4
  "description": "Pipedream WhoisFreaks Components",
5
5
  "main": "whoisfreaks.app.mjs",
6
6
  "keywords": [
@@ -11,5 +11,8 @@
11
11
  "author": "Pipedream <support@pipedream.com> (https://pipedream.com/)",
12
12
  "publishConfig": {
13
13
  "access": "public"
14
+ },
15
+ "dependencies": {
16
+ "@pipedream/platform": "^3.0.3"
14
17
  }
15
18
  }
@@ -1,11 +1,55 @@
1
+ import { axios } from "@pipedream/platform";
2
+
1
3
  export default {
2
4
  type: "app",
3
5
  app: "whoisfreaks",
4
- propDefinitions: {},
6
+ propDefinitions: {
7
+ domainName: {
8
+ type: "string",
9
+ label: "Domain Name",
10
+ description: "The domain name to lookup",
11
+ },
12
+ format: {
13
+ type: "string",
14
+ label: "Format",
15
+ description: "Two formats are available JSON, XML. If you don't specify the 'format' parameter, the default format will be JSON.",
16
+ options: [
17
+ "JSON",
18
+ "XML",
19
+ ],
20
+ optional: true,
21
+ },
22
+ },
5
23
  methods: {
6
- // this.$auth contains connected account data
7
- authKeys() {
8
- console.log(Object.keys(this.$auth));
24
+ _baseUrl() {
25
+ return "https://api.whoisfreaks.com/v1.0";
26
+ },
27
+ _makeRequest({
28
+ $ = this,
29
+ path,
30
+ params,
31
+ ...opts
32
+ }) {
33
+ return axios($, {
34
+ url: `${this._baseUrl()}${path}`,
35
+ params: {
36
+ ...params,
37
+ apiKey: this.$auth.api_key,
38
+ },
39
+ ...opts,
40
+ });
41
+ },
42
+ domainLookup(opts = {}) {
43
+ return this._makeRequest({
44
+ path: "/whois",
45
+ ...opts,
46
+ });
47
+ },
48
+ ipLookup(opts = {}) {
49
+ return this._makeRequest({
50
+ path: "/ip-whois",
51
+ ...opts,
52
+ });
9
53
  },
10
54
  },
11
- };
55
+ };