import * as plugins from '../plugins.js';
import type * as authInterfaces from '../data/auth.js';
import type { IDnsProviderPublic, IProviderDomainListing, TDnsProviderType, TDnsProviderCredentials } from '../data/dns-provider.js';
/**
 * Get all DNS providers (public view, no secrets).
 */
export interface IReq_GetDnsProviders extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetDnsProviders> {
    method: 'getDnsProviders';
    request: {
        identity?: authInterfaces.IIdentity;
        apiToken?: string;
    };
    response: {
        providers: IDnsProviderPublic[];
    };
}
/**
 * Get a single DNS provider by id.
 */
export interface IReq_GetDnsProvider extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetDnsProvider> {
    method: 'getDnsProvider';
    request: {
        identity?: authInterfaces.IIdentity;
        apiToken?: string;
        id: string;
    };
    response: {
        provider: IDnsProviderPublic | null;
    };
}
/**
 * Create a new DNS provider.
 */
export interface IReq_CreateDnsProvider extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_CreateDnsProvider> {
    method: 'createDnsProvider';
    request: {
        identity?: authInterfaces.IIdentity;
        apiToken?: string;
        name: string;
        type: TDnsProviderType;
        credentials: TDnsProviderCredentials;
    };
    response: {
        success: boolean;
        id?: string;
        message?: string;
    };
}
/**
 * Update a DNS provider. Only supplied fields are updated.
 * Pass `credentials` to rotate the secret.
 */
export interface IReq_UpdateDnsProvider extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_UpdateDnsProvider> {
    method: 'updateDnsProvider';
    request: {
        identity?: authInterfaces.IIdentity;
        apiToken?: string;
        id: string;
        name?: string;
        credentials?: TDnsProviderCredentials;
    };
    response: {
        success: boolean;
        message?: string;
    };
}
/**
 * Delete a DNS provider. Fails if any IDomain still references it
 * unless `force: true` is set.
 */
export interface IReq_DeleteDnsProvider extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_DeleteDnsProvider> {
    method: 'deleteDnsProvider';
    request: {
        identity?: authInterfaces.IIdentity;
        apiToken?: string;
        id: string;
        force?: boolean;
    };
    response: {
        success: boolean;
        message?: string;
    };
}
/**
 * Test the connection to a DNS provider. Used both for newly-saved
 * providers and on demand from the UI.
 */
export interface IReq_TestDnsProvider extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_TestDnsProvider> {
    method: 'testDnsProvider';
    request: {
        identity?: authInterfaces.IIdentity;
        apiToken?: string;
        id: string;
    };
    response: {
        ok: boolean;
        error?: string;
        testedAt: number;
    };
}
/**
 * List the domains visible to a DNS provider's API account.
 * Used when importing — does NOT persist anything.
 */
export interface IReq_ListProviderDomains extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_ListProviderDomains> {
    method: 'listProviderDomains';
    request: {
        identity?: authInterfaces.IIdentity;
        apiToken?: string;
        providerId: string;
    };
    response: {
        success: boolean;
        domains?: IProviderDomainListing[];
        message?: string;
    };
}
