Skip to content
Merged
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import godaddy from "../../godaddy.app.mjs";

export default {
key: "godaddy-check-domain-availability",
name: "Check Domain Availability",
description: "Check the availability of a domain. [See the documentation](https://developer.godaddy.com/doc/endpoint/domains#/v1/available)",
version: "0.0.1",
type: "action",
props: {
godaddy,
domain: {
type: "string",
label: "Domain",
description: "The domain to check availability for",
},
checkType: {
type: "string",
label: "Check Type",
description: "Optimize for time ('FAST') or accuracy ('FULL')",
options: [
"FAST",
"FULL",
],
optional: true,
},
forTransfer: {
type: "boolean",
label: "For Transfer",
description: "Whether or not to include domains available for transfer. If set to `true`, checkType is ignored",
optional: true,
},
},
async run({ $ }) {
const response = await this.godaddy.checkDomainAvailability({
$,
params: {
domain: this.domain,
checkType: this.checkType,
forTransfer: this.forTransfer,
},
});
$.export("$summary", `Successfully checked domain availability for ${this.domain}`);
return response;
},
};
64 changes: 64 additions & 0 deletions components/godaddy/actions/list-domains/list-domains.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import godaddy from "../../godaddy.app.mjs";

export default {
key: "godaddy-list-domains",
name: "List Domains",
description: "List domains in GoDaddy. [See the documentation](https://developer.godaddy.com/doc/endpoint/domains#/v1/list)",
version: "0.0.1",
type: "action",
props: {
godaddy,
statuses: {
propDefinition: [
godaddy,
"statuses",
],
},
statusGroups: {
propDefinition: [
godaddy,
"statusGroups",
],
},
limit: {
type: "integer",
label: "Limit",
description: "Maximum number of domains to return",
optional: true,
},
marker: {
type: "string",
label: "Marker",
description: "Marker Domain to use as the offset in results",
optional: true,
},
includes: {
propDefinition: [
godaddy,
"includes",
],
},
modifiedDate: {
type: "string",
label: "Modified Date",
description: "Only include results that have been modified since the specified date",
optional: true,
},
},
async run({ $ }) {
const domains = await this.godaddy.listDomains({
$,
params: {
statuses: this.statuses,
statusGroups: this.statusGroups,
limit: this.limit,
marker: this.marker,
includes: this.includes,
modifiedDate: this.modifiedDate,
},
});

$.export("$summary", `Found ${domains.length} domain(s)`);
return domains;
},
};
37 changes: 37 additions & 0 deletions components/godaddy/actions/renew-domain/renew-domain.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import godaddy from "../../godaddy.app.mjs";

export default {
key: "godaddy-renew-domain",
name: "Renew Domain",
description: "Renew a domain in GoDaddy. [See the documentation](https://developer.godaddy.com/doc/endpoint/domains#/v1/renew)",
version: "0.0.1",
type: "action",
props: {
godaddy,
domain: {
propDefinition: [
godaddy,
"domain",
],
},
period: {
type: "integer",
label: "Period",
description: "Number of years to extend the Domain. Must not exceed maximum for TLD. When omitted, defaults to period specified during original purchase.",
max: 10,
min: 1,
optional: true,
},
},
async run({ $ }) {
const response = await this.godaddy.renewDomain({
$,
domain: this.domain,
data: {
period: this.period,
},
});
$.export("$summary", `Renewed domain ${this.domain}`);
return response;
},
};
86 changes: 86 additions & 0 deletions components/godaddy/actions/suggest-domains/suggest-domains.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
import godaddy from "../../godaddy.app.mjs";
import constants from "../../common/constants.mjs";

export default {
key: "godaddy-suggest-domains",
name: "Suggest Domains",
description: "Suggest domains based on the given criteria. [See the documentation](https://developer.godaddy.com/doc/endpoint/domains#/v1/suggest)",
version: "0.0.1",
type: "action",
props: {
godaddy,
query: {
type: "string",
label: "Query",
description: "Domain name or set of keywords for which alternative domain names will be suggested",
},
country: {
type: "string",
label: "Country",
description: "Two-letter ISO country code to be used as a hint for target region",
optional: true,
},
city: {
type: "string",
label: "City",
description: "Name of city to be used as a hint for target region",
optional: true,
},
sources: {
type: "string[]",
label: "Sources",
description: "Sources to be queried",
options: constants.DOMAIN_SUGGESTION_SOURCES,
optional: true,
},
tlds: {
propDefinition: [
godaddy,
"tlds",
],
},
lengthMax: {
type: "integer",
label: "Length Max",
description: "Maximum length of second-level domain",
optional: true,
},
lengthMin: {
type: "integer",
label: "Length Min",
description: "Minimum length of second-level domain",
optional: true,
},
limit: {
type: "integer",
label: "Limit",
description: "Maximum number of suggestions to return",
optional: true,
},
waitMs: {
type: "integer",
label: "Wait Ms",
description: "Maximum amount of time, in milliseconds, to wait for responses. If elapses, return the results compiled up to that point",
optional: true,
},
},
async run({ $ }) {
const domains = await this.godaddy.suggestDomains({
$,
params: {
query: this.query,
country: this.country,
city: this.city,
sources: this.sources,
tlds: this.tlds,
lengthMax: this.lengthMax,
lengthMin: this.lengthMin,
limit: this.limit,
waitMs: this.waitMs,
},
});

$.export("$summary", `Found ${domains.length} domain(s)`);
return domains;
},
};
Loading
Loading