Skip to content

Commit 61d0151

Browse files
authored
GoDaddy - new components (#18446)
* new components * pnpm-lock.yaml * updates * add $auth.api_url
1 parent b4a7915 commit 61d0151

File tree

10 files changed

+733
-6
lines changed

10 files changed

+733
-6
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import godaddy from "../../godaddy.app.mjs";
2+
3+
export default {
4+
key: "godaddy-check-domain-availability",
5+
name: "Check Domain Availability",
6+
description: "Check the availability of a domain. [See the documentation](https://developer.godaddy.com/doc/endpoint/domains#/v1/available)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
godaddy,
11+
domain: {
12+
type: "string",
13+
label: "Domain",
14+
description: "The domain to check availability for",
15+
},
16+
checkType: {
17+
type: "string",
18+
label: "Check Type",
19+
description: "Optimize for time ('FAST') or accuracy ('FULL')",
20+
options: [
21+
"FAST",
22+
"FULL",
23+
],
24+
optional: true,
25+
},
26+
forTransfer: {
27+
type: "boolean",
28+
label: "For Transfer",
29+
description: "Whether or not to include domains available for transfer. If set to `true`, checkType is ignored",
30+
optional: true,
31+
},
32+
},
33+
async run({ $ }) {
34+
const response = await this.godaddy.checkDomainAvailability({
35+
$,
36+
params: {
37+
domain: this.domain,
38+
checkType: this.checkType,
39+
forTransfer: this.forTransfer,
40+
},
41+
});
42+
$.export("$summary", `Successfully checked domain availability for ${this.domain}`);
43+
return response;
44+
},
45+
};
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import godaddy from "../../godaddy.app.mjs";
2+
3+
export default {
4+
key: "godaddy-list-domains",
5+
name: "List Domains",
6+
description: "List domains in GoDaddy. [See the documentation](https://developer.godaddy.com/doc/endpoint/domains#/v1/list)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
godaddy,
11+
statuses: {
12+
propDefinition: [
13+
godaddy,
14+
"statuses",
15+
],
16+
},
17+
statusGroups: {
18+
propDefinition: [
19+
godaddy,
20+
"statusGroups",
21+
],
22+
},
23+
limit: {
24+
type: "integer",
25+
label: "Limit",
26+
description: "Maximum number of domains to return",
27+
optional: true,
28+
},
29+
marker: {
30+
type: "string",
31+
label: "Marker",
32+
description: "Marker Domain to use as the offset in results",
33+
optional: true,
34+
},
35+
includes: {
36+
propDefinition: [
37+
godaddy,
38+
"includes",
39+
],
40+
},
41+
modifiedDate: {
42+
type: "string",
43+
label: "Modified Date",
44+
description: "Only include results that have been modified since the specified date",
45+
optional: true,
46+
},
47+
},
48+
async run({ $ }) {
49+
const domains = await this.godaddy.listDomains({
50+
$,
51+
params: {
52+
statuses: this.statuses,
53+
statusGroups: this.statusGroups,
54+
limit: this.limit,
55+
marker: this.marker,
56+
includes: this.includes,
57+
modifiedDate: this.modifiedDate,
58+
},
59+
});
60+
61+
$.export("$summary", `Found ${domains.length} domain(s)`);
62+
return domains;
63+
},
64+
};
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import godaddy from "../../godaddy.app.mjs";
2+
3+
export default {
4+
key: "godaddy-renew-domain",
5+
name: "Renew Domain",
6+
description: "Renew a domain in GoDaddy. [See the documentation](https://developer.godaddy.com/doc/endpoint/domains#/v1/renew)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
godaddy,
11+
domain: {
12+
propDefinition: [
13+
godaddy,
14+
"domain",
15+
],
16+
},
17+
period: {
18+
type: "integer",
19+
label: "Period",
20+
description: "Number of years to extend the Domain. Must not exceed maximum for TLD. When omitted, defaults to period specified during original purchase.",
21+
max: 10,
22+
min: 1,
23+
optional: true,
24+
},
25+
},
26+
async run({ $ }) {
27+
const response = await this.godaddy.renewDomain({
28+
$,
29+
domain: this.domain,
30+
data: {
31+
period: this.period,
32+
},
33+
});
34+
$.export("$summary", `Renewed domain ${this.domain}`);
35+
return response;
36+
},
37+
};
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
import godaddy from "../../godaddy.app.mjs";
2+
import constants from "../../common/constants.mjs";
3+
4+
export default {
5+
key: "godaddy-suggest-domains",
6+
name: "Suggest Domains",
7+
description: "Suggest domains based on the given criteria. [See the documentation](https://developer.godaddy.com/doc/endpoint/domains#/v1/suggest)",
8+
version: "0.0.1",
9+
type: "action",
10+
props: {
11+
godaddy,
12+
query: {
13+
type: "string",
14+
label: "Query",
15+
description: "Domain name or set of keywords for which alternative domain names will be suggested",
16+
},
17+
country: {
18+
type: "string",
19+
label: "Country",
20+
description: "Two-letter ISO country code to be used as a hint for target region",
21+
optional: true,
22+
},
23+
city: {
24+
type: "string",
25+
label: "City",
26+
description: "Name of city to be used as a hint for target region",
27+
optional: true,
28+
},
29+
sources: {
30+
type: "string[]",
31+
label: "Sources",
32+
description: "Sources to be queried",
33+
options: constants.DOMAIN_SUGGESTION_SOURCES,
34+
optional: true,
35+
},
36+
tlds: {
37+
propDefinition: [
38+
godaddy,
39+
"tlds",
40+
],
41+
},
42+
lengthMax: {
43+
type: "integer",
44+
label: "Length Max",
45+
description: "Maximum length of second-level domain",
46+
optional: true,
47+
},
48+
lengthMin: {
49+
type: "integer",
50+
label: "Length Min",
51+
description: "Minimum length of second-level domain",
52+
optional: true,
53+
},
54+
limit: {
55+
type: "integer",
56+
label: "Limit",
57+
description: "Maximum number of suggestions to return",
58+
optional: true,
59+
},
60+
waitMs: {
61+
type: "integer",
62+
label: "Wait Ms",
63+
description: "Maximum amount of time, in milliseconds, to wait for responses. If elapses, return the results compiled up to that point",
64+
optional: true,
65+
},
66+
},
67+
async run({ $ }) {
68+
const domains = await this.godaddy.suggestDomains({
69+
$,
70+
params: {
71+
query: this.query,
72+
country: this.country,
73+
city: this.city,
74+
sources: this.sources,
75+
tlds: this.tlds,
76+
lengthMax: this.lengthMax,
77+
lengthMin: this.lengthMin,
78+
limit: this.limit,
79+
waitMs: this.waitMs,
80+
},
81+
});
82+
83+
$.export("$summary", `Found ${domains.length} domain(s)`);
84+
return domains;
85+
},
86+
};

0 commit comments

Comments
 (0)