{"id":20252980,"url":"https://github.com/torus-tools/domains","last_synced_at":"2025-08-11T23:04:56.903Z","repository":{"id":57167301,"uuid":"283400030","full_name":"torus-tools/domains","owner":"torus-tools","description":"Standardize and automate operations concerning DNS records and nameservers in your domain name registrar","archived":false,"fork":false,"pushed_at":"2020-09-12T04:53:00.000Z","size":6978,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-03T08:20:29.882Z","etag":null,"topics":["dns","dns-records","domains","nameservers"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/torus-tools.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-29T04:43:25.000Z","updated_at":"2024-12-02T06:52:33.000Z","dependencies_parsed_at":"2022-08-30T13:20:09.455Z","dependency_job_id":null,"html_url":"https://github.com/torus-tools/domains","commit_stats":null,"previous_names":["arjan-tools/domains"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/torus-tools/domains","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torus-tools%2Fdomains","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torus-tools%2Fdomains/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torus-tools%2Fdomains/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torus-tools%2Fdomains/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/torus-tools","download_url":"https://codeload.github.com/torus-tools/domains/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torus-tools%2Fdomains/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268519218,"owners_count":24263066,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dns","dns-records","domains","nameservers"],"created_at":"2024-11-14T10:20:30.650Z","updated_at":"2025-08-11T23:04:56.841Z","avatar_url":"https://github.com/torus-tools.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Torus Tools - Domains\n\nA promise-based javascript SDK that standarizes interactions with various different domain registrars providers.\n\n## Currently Supporting\n- AWS\n- Godaddy\n\n**If you are interested in adding new providers create the feature request and we will add it to our pipeline; or feel free to submit your own PR** :sunglasses:\n\n## Records Format\nthe records parameter has the following format\n```\n{\n  name:\"example.com\",  //traffic coming into (root domain or sub-domain)\n  data: \"192.0.2.44\",  //route traffic to somewhere (an ip or resource ARN)\n  type: \"CNAME\",  //type of record.\n  ttl: 3600   //ttl for the record if required\n  alias: true|false   //depending on this value the record will either have a resourceRecords attribute or an aliasTarget attribute in AWS\n}\n```\n## Record Types\n - A\n - AAAA\n - CAA\n - CNAME\n - MX\n - NAPTR\n - NS\n - PTR\n - SOA\n - SPF\n - SRV\n - TXT\n\n # API\n The API standardizes operations accross different providers. As shown in the example below, all of the methods must be used in the format `[PROVIDER].method`\n\n```\nconst {godaddy} = require('@torus-tools/domains')\n\ngodaddy.getNameservers('mydomain.com')\n.then(data=\u003e console.log(data))\n.catch(err=\u003econsole.log(err))\n ```\n\n## getNameservers(domain)\n- **description**: gets the nameservers for a particular domain\n- **params**: (domain)\n  - **domain**: STRING: REQUIRED: the root domain of your site i.e. yoursite.com\n- **returns**: promise(resolve, reject)\n  - **resolve**: (nameservers)\n    - **nameservers**: an array of nameserver addresses\n  - **reject**: (error)\n\n## updateNameservers(domain, nameservers)\n- **description**: updates the nameservers for a particular domain\n- **params**: (domain, nameservers)\n  - **domain**: STRING: REQUIRED: the root domain of your site i.e. yoursite.com\n  - **nameservers**: ARRAY: REQUIRED: an array of nameserver strings\n- **returns**: promise(resolve, reject)\n  - **resolve**: ('All Done')\n    - **nameservers**: an array of nameserver addresses\n  - **reject**: (error)\n\n## listRecords(domain)\n- **description**: Lists the records of a particular domain\n- **params**: (domain)\n  - **domain**: STRING: REQUIRED: the root domain of your site i.e. yoursite.com\n- **returns**: promise(resolve, reject)\n  - **resolve**: ('All Done')\n    - **recordSet**: an object with the record set of the given domain\n  - **reject**: (error)\n\n## upsertRecords(domain, records)\n- **description**: It will create or update the specified records for a given domain. If one of the records exists it will updated, otherwise it will be created.\n- **params**: (domain, records)\n  - **domain**: STRING: REQUIRED: the root domain of your site i.e. yoursite.com\n  - **records**: OBJECT: REQUIRED: the record set that includes:\n    - Record name\n    - Record type\n    - Record data\n    - Record ttl\n- **returns**: promise(resolve, reject)\n  - **resolve**: ('All Done')\n    - **record**: an array with the new record data that has been created or updated\n  - **reject**: (error)\n\n\n## deleteRecords(domain, records)\n- **description**: deletes the specified records for a given domain.\n- **params**: (domain, records)\n  - **domain**: STRING: REQUIRED: the root domain of your site i.e. yoursite.com\n  - **records**: OBJECT: REQUIRED: the record sets that will be deleted\n- **returns**: promise(resolve, reject)\n  - **resolve**: ('recordSet deleted')\n    - **recordSet**: an object with the record set hat has been deleted\n  - **reject**: (error)\n\n\n## deleteAllRecords(doamin, records)\n- **description**: Deletes all DNS records for a given domain.\n- **params**: (domain)\n  - **domain**: STRING: REQUIRED: the root domain of your site i.e. yoursite.com\n- **returns**: promise(resolve, reject)\n  - **resolve**: ('All recordSets deleted')\n  - **reject**: (error)\n\n## createRedirect(domain, url)\n- **description**: creates a 301 redirect for the given domian to a specified url.\n- **params**: (domain, url)\n  - **domain**: STRING: REQUIRED: the root domain of your site i.e. yoursite.com\n  - **url**: STRING: REQUIRED: the url address you want to redirect \n- **returns**: promise(resolve, reject)\n  - **resolve**: ('All Done')\n    - **type**: a string with the value \"REDIRECT_PERMANENT\"\n    - **url**: a string for the redirect url address\n  - **reject**: (error)\n\n\n## addRecord(domain, records)\n- **description**: It will add the specified records to the given domain. \n- **params**: (domain, records)\n  - **domain**: STRING: REQUIRED: the root domain of your site i.e. yoursite.com\n  - **records**: OBJECT: REQUIRED: the record set that includes:\n    - Record name\n    - Record type\n    - Record data\n    - Record ttl\n- **returns**: promise(resolve, reject)\n  - **resolve**: ('All Done')\n    - **record**: an object with the record that has been added\n  - **reject**: (error)\n\n\n## getZone(domain)\n- **description**: gets the DNS zone Id for a given domain.\n- **params**: (domain)\n  - **domain**: STRING: REQUIRED: the root domain of your site i.e. yoursite.com\n- **returns**: promise(resolve, reject)\n  - **resolve**: ('All Done')\n    - **HostedZones**: An array with the hosted zone ID of given domain.\n  - **reject**: ('no hosted zones exist for the given domain')","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftorus-tools%2Fdomains","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftorus-tools%2Fdomains","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftorus-tools%2Fdomains/lists"}