feat(dns): Implement DNS management functionality
- Added DnsManager and DnsEntry classes to handle DNS entries. - Introduced new interfaces for DNS entry requests and data structures. - Updated Cloudly class to include DnsManager instance. - Enhanced app state to manage DNS entries and actions for creating, updating, and deleting DNS records. - Created UI components for DNS management, including forms for adding and editing DNS entries. - Updated overview and services views to reflect DNS entries. - Added validation and formatting methods for DNS entries.
This commit is contained in:
93
ts_interfaces/requests/dns.ts
Normal file
93
ts_interfaces/requests/dns.ts
Normal file
@@ -0,0 +1,93 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
import type { IDnsEntry } from '../data/dns.js';
|
||||
import type { IIdentity } from '../data/user.js';
|
||||
|
||||
export interface IRequest_Any_Cloudly_GetDnsEntries
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_GetDnsEntries
|
||||
> {
|
||||
method: 'getDnsEntries';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
zone?: string; // Optional filter by zone
|
||||
};
|
||||
response: {
|
||||
dnsEntries: IDnsEntry[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_Any_Cloudly_GetDnsEntryById
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_GetDnsEntryById
|
||||
> {
|
||||
method: 'getDnsEntryById';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
dnsEntryId: string;
|
||||
};
|
||||
response: {
|
||||
dnsEntry: IDnsEntry;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_Any_Cloudly_CreateDnsEntry
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_CreateDnsEntry
|
||||
> {
|
||||
method: 'createDnsEntry';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
dnsEntryData: IDnsEntry['data'];
|
||||
};
|
||||
response: {
|
||||
dnsEntry: IDnsEntry;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_Any_Cloudly_UpdateDnsEntry
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_UpdateDnsEntry
|
||||
> {
|
||||
method: 'updateDnsEntry';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
dnsEntryId: string;
|
||||
dnsEntryData: IDnsEntry['data'];
|
||||
};
|
||||
response: {
|
||||
dnsEntry: IDnsEntry;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_Any_Cloudly_DeleteDnsEntry
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_DeleteDnsEntry
|
||||
> {
|
||||
method: 'deleteDnsEntry';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
dnsEntryId: string;
|
||||
};
|
||||
response: {
|
||||
success: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_Any_Cloudly_GetDnsZones
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_GetDnsZones
|
||||
> {
|
||||
method: 'getDnsZones';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
};
|
||||
response: {
|
||||
zones: string[];
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user