This repository contains the OpenAPI specification for the backend API of OpusDNS along with generated TypeScript types and constants.
npm install @opusdns/apiImport 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';paths- OpenAPI paths interfaceoperations- OpenAPI operations interfacecomponents- OpenAPI components interface
Domain- Domain object typeDomainCreate- Domain creation typeDomainUpdate- Domain update typeDomainRenewRequest- Domain renewal type
GET_Domains_Request- GET domains request typePOST_Domains_Request_Body- POST domains request body typeGET_Domains_Response- GET domains response type
DOMAIN_AVAILABILITY_STATUS- Domain availability status enumALLOCATION_METHOD_TYPE- Allocation method type enumDOMAIN_STATUS- Domain status enumCONTACT_ROLE_TYPE- Contact role type enum
DnsZone- DNS zone typeDnsRecord- DNS record typeDnsRrset- DNS RRset type
Organization- Organization typeUser- User typeContact- Contact type
There are two documentation setups in this repository:
The docs/ folder is a static site that embeds
@scalar/api-reference and is published
via GitHub Pages on developers.opusdns.com.
Source of truth: docs/index.html. Do not put
guides/Markdown content here.
A more sophisticated documentation setup using
Scalar Docs 2.0 is
contained in scalar/. The Scalar project config lives at
scalar/scalar.config.json, guide content lives
under scalar/content/, and the API reference is
fetched from the raw GitHub copy of src/openapi.yaml.
To preview locally:
npm install
npm --prefix scalar install
npm run docs:preview
# → http://localhost:7970