OpusDNS API Types, Specification and Constants
This repository contains the OpenAPI specification for the backend API of OpusDNS along with generated TypeScript types and constants.
Installation
npm install @opusdns/api
Usage
Import the types, constants, and schemas you need directly from the package:
import {
Domain,
DOMAIN_AVAILABILITY_STATUS,
paths,
operations,
components,
GET_Domains_Request,
POST_Domains_Request_Body,
ALLOCATION_METHOD_TYPE
} from '@opusdns/api';
Available Exports
Schema Types
paths- OpenAPI paths interfaceoperations- OpenAPI operations interfacecomponents- OpenAPI components interface
Domain Types
Domain- Domain object typeDomainCreate- Domain creation typeDomainUpdate- Domain update typeDomainRenewRequest- Domain renewal type
Request/Response Types
GET_Domains_Request- GET domains request typePOST_Domains_Request_Body- POST domains request body typeGET_Domains_Response- GET domains response type
Constants
DOMAIN_AVAILABILITY_STATUS- Domain availability status enumALLOCATION_METHOD_TYPE- Allocation method type enumDOMAIN_STATUS- Domain status enumCONTACT_ROLE_TYPE- Contact role type enum
DNS Types
DnsZone- DNS zone typeDnsRecord- DNS record typeDnsRrset- DNS RRset type
Organization Types
Organization- Organization typeUser- User typeContact- Contact type
Documentation
developers.opusdns.com is served by
Scalar Docs 2.0 from
scalar/ in this repository.
How publishing works
Merging to main publishes. Scalar's GitHub integration builds main; there
is no deploy workflow in this repo and no Scalar token. The custom domain is
declared in the config itself
(scalar/scalar.config.json, siteConfig.customDomain),
not in CI. Nothing in the repository shows this connection, so it is written down
here: if publishing ever stops, the integration in the Scalar dashboard is where
to look.
Every PR gets a preview. The same integration builds each pull request and
posts a throwaway URL as a comment (…--opusdns-api-spec.apidocumentation.com),
so you can read a change as rendered before merging it. Use it — a bad filepath
or an icon name Scalar does not know renders as nothing rather than failing, and
merging is what makes that public.
The preview does not, however, cover the bots' own PRs: GitHub suppresses workflow runs for pull requests opened with a token rather than by a person, so both bots validate the config inline before opening theirs.
Layout
| Path | What |
|---|---|
scalar/scalar.config.json |
The whole site: tabs, sidebar routes, theme. Every page's title, icon and URL live here — content files carry no frontmatter |
scalar/content/ |
Guide Markdown |
scalar/content/tld-knowledge-base/ |
Generated from OpusDNS/tld-specifications by scripts/generate_tld_knowledge_base.py |
scalar/content/mcp-server/ |
Generated in OpusDNS/opusdns-mcp, which opens a PR here carrying the diff. scripts/sync_mcp_docs.py lives here but is run from there — see scripts/mcp_docs/ |
src/openapi.yaml |
The spec. The API Reference tab is fetched by Scalar from the raw GitHub URL at build time, so it is eventually consistent rather than bundled |
Two bots write scalar.config.json: Generate TLD Knowledge Base, a workflow
in this repo, and Publish MCP docs to api-spec, a workflow in
OpusDNS/opusdns-mcp that opens its PR here. Each rebuilds only the subtree it
owns and both serialise identically (json.dumps(..., indent=2, ensure_ascii=False) plus a trailing newline), so hand edits should match that
style — otherwise the next bot PR reformats your lines.
Local preview
npm install
npm --prefix scalar install
npm run docs:preview
# → http://localhost:7970
npm --prefix scalar run check # validate scalar.config.json
Run check before pushing anything that touches the config. A filepath
pointing at a file that does not exist, or an icon name Scalar does not know,
renders as nothing — and merging is what publishes.
The legacy docs/ folder
docs/ is a static GitHub Pages site that embeds
@scalar/api-reference. GitHub Pages is
still configured for it, but DNS points at Scalar, so it is not what serves the
domain. Treat it as vestigial; do not put content there.