feat: expose domain dns records via api (#259)

This commit is contained in:
KM Koushik
2025-09-27 09:40:14 +10:00
committed by GitHub
parent 014199201b
commit 76fdad6c81
25 changed files with 2066 additions and 551 deletions
+16
View File
@@ -29,6 +29,14 @@ type VerifyDomainResponse = {
type VerifyDomainResponseSuccess =
paths["/v1/domains/{id}/verify"]["put"]["responses"]["200"]["content"]["application/json"];
type GetDomainResponse = {
data: GetDomainResponseSuccess | null;
error: ErrorResponse | null;
};
type GetDomainResponseSuccess =
paths["/v1/domains/{id}"]["get"]["responses"]["200"]["content"]["application/json"];
export class Domains {
constructor(private readonly usesend: UseSend) {
this.usesend = usesend;
@@ -54,4 +62,12 @@ export class Domains {
);
return data;
}
async get(id: number): Promise<GetDomainResponse> {
const data = await this.usesend.get<GetDomainResponseSuccess>(
`/domains/${id}`
);
return data;
}
}
+1
View File
@@ -112,6 +112,7 @@ export class Emails {
const data = await this.usesend.get<GetEmailResponseSuccess>(
`/emails/${id}`
);
return data;
}