Skip to content

Commit

Permalink
refactor: rename request and response interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
proohit committed Apr 29, 2022
1 parent 96d8bc3 commit 5bf8cec
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
16 changes: 7 additions & 9 deletions src/@types/Requests.ts
@@ -1,25 +1,23 @@
export interface AuthParam {
customernumber: string;
apikey: string;
apisessionid: string;
}
export interface InfoDNSRecordsRequest {
action: string;
param: InfoDNSRecordsParam;
}

export interface InfoDNSRecordsParam {
export interface InfoDNSRecordsParam extends AuthParam {
domainname: string;
customernumber: string;
apikey: string;
apisessionid: string;
}

export interface InfoDNSZoneRequest {
action: string;
param: InfoDNSZoneParam;
}

export interface InfoDNSZoneParam {
export interface InfoDNSZoneParam extends AuthParam {
domainname: string;
customernumber: string;
apikey: string;
apisessionid: string;
}

export interface LoginRequest {
Expand Down
12 changes: 6 additions & 6 deletions src/@types/Responses.ts
Expand Up @@ -28,10 +28,10 @@ export interface InfoDNSZoneResponse {
statuscode: number;
shortmessage: string;
longmessage: string;
responsedata: InfoDNSZoneResponsedata;
responsedata: InfoDNSZoneResponseData;
}

export interface InfoDNSZoneResponsedata {
export interface InfoDNSZoneResponseData {
name: string;
ttl: string;
serial: string;
Expand All @@ -43,14 +43,14 @@ export interface InfoDNSZoneResponsedata {

export interface InfoDNSRecordsResponse extends ApiResponse {
action: Actions.infoDnsRecords;
responsedata: InfoDNSRecordsResponsedata;
responsedata: InfoDNSRecordsResponseData;
}

export interface InfoDNSRecordsResponsedata {
dnsrecords: Dnsrecord[];
export interface InfoDNSRecordsResponseData {
dnsrecords: DnsRecord[];
}

export interface Dnsrecord {
export interface DnsRecord {
id: string;
hostname: string;
type: string;
Expand Down

0 comments on commit 5bf8cec

Please sign in to comment.