Skip to content

Commit

Permalink
unmanaged domain add/remove
Browse files Browse the repository at this point in the history
  • Loading branch information
tbeseda committed Nov 30, 2023
1 parent fc3d376 commit e6b90a8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
"zip-dir": "^2.0.0"
},
"devDependencies": {
"@architect/eslint-config": "^2.1.1",
"@architect/eslint-config": "^2.1.2",
"dotenv": "^16.3.1",
"eslint": "^8.43.0",
"tap-arc": "^0.3.5",
"tape": "^5.6.3"
"eslint": "^8.54.0",
"tap-arc": "^1.2.2",
"tape": "^5.7.2"
},
"keywords": [
"node",
Expand Down
17 changes: 17 additions & 0 deletions src/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,23 @@ module.exports = {
return read({ token, _staging, scope: 'domains' })
},

/**
* @description add an unmanaged domain
* @param {BaseParams & {domain: string}} options
*/
async add ({ token, domain, _staging }) {
return write({ token, _staging, scope: 'domains' }, { domain })
},

/**
* @description remove an unmanaged domain
* @param {BaseParams & {domainID: string}} options
*/
async remove ({ token, domainID, _staging }) {
if (!domainID) throw Error('missing_domainID')
return write({ token, _staging, scope: 'domains', path: `${domainID}/delete` })
},

/**
* @description check domain availability and retrieve purchase link
* @param {BaseParams & {domain: string}} options
Expand Down

0 comments on commit e6b90a8

Please sign in to comment.