import * as plugins from './plugins.js';
import * as interfaces from '../dist_ts_interfaces/index.js';
export declare const appState: plugins.deesElement.domtools.plugins.smartstate.Smartstate<string>;
export interface ILoginState {
    identity: interfaces.data.IIdentity | null;
    isLoggedIn: boolean;
}
export interface IStatsState {
    serverStats: interfaces.data.IServerStats | null;
    emailStats: interfaces.data.IEmailStats | null;
    dnsStats: interfaces.data.IDnsStats | null;
    securityMetrics: interfaces.data.ISecurityMetrics | null;
    lastUpdated: number;
    isLoading: boolean;
    error: string | null;
}
export interface IConfigState {
    config: interfaces.requests.IConfigData | null;
    isLoading: boolean;
    error: string | null;
}
export interface IUiState {
    activeView: string;
    sidebarCollapsed: boolean;
    autoRefresh: boolean;
    refreshInterval: number;
    theme: 'light' | 'dark';
}
export interface ILogState {
    recentLogs: interfaces.data.ILogEntry[];
    isStreaming: boolean;
    filters: {
        level?: string[];
        category?: string[];
    };
}
export interface INetworkState {
    connections: interfaces.data.IConnectionInfo[];
    connectionsByIP: {
        [ip: string]: number;
    };
    throughputRate: {
        bytesInPerSecond: number;
        bytesOutPerSecond: number;
    };
    totalBytes: {
        in: number;
        out: number;
    };
    topIPs: Array<{
        ip: string;
        count: number;
    }>;
    throughputByIP: Array<{
        ip: string;
        in: number;
        out: number;
    }>;
    throughputHistory: Array<{
        timestamp: number;
        in: number;
        out: number;
    }>;
    requestsPerSecond: number;
    requestsTotal: number;
    backends: interfaces.data.IBackendInfo[];
    lastUpdated: number;
    isLoading: boolean;
    error: string | null;
}
export interface ICertificateState {
    certificates: interfaces.requests.ICertificateInfo[];
    summary: {
        total: number;
        valid: number;
        expiring: number;
        expired: number;
        failed: number;
        unknown: number;
    };
    isLoading: boolean;
    error: string | null;
    lastUpdated: number;
}
export interface IEmailOpsState {
    emails: interfaces.requests.IEmail[];
    isLoading: boolean;
    error: string | null;
    lastUpdated: number;
}
export declare const loginStatePart: plugins.deesElement.domtools.plugins.smartstate.StatePart<string, ILoginState>;
export declare const statsStatePart: plugins.deesElement.domtools.plugins.smartstate.StatePart<string, IStatsState>;
export declare const configStatePart: plugins.deesElement.domtools.plugins.smartstate.StatePart<string, IConfigState>;
export declare const uiStatePart: plugins.deesElement.domtools.plugins.smartstate.StatePart<string, IUiState>;
export declare const logStatePart: plugins.deesElement.domtools.plugins.smartstate.StatePart<string, ILogState>;
export declare const networkStatePart: plugins.deesElement.domtools.plugins.smartstate.StatePart<string, INetworkState>;
export declare const emailOpsStatePart: plugins.deesElement.domtools.plugins.smartstate.StatePart<string, IEmailOpsState>;
export declare const certificateStatePart: plugins.deesElement.domtools.plugins.smartstate.StatePart<string, ICertificateState>;
export interface IRemoteIngressState {
    edges: interfaces.data.IRemoteIngress[];
    statuses: interfaces.data.IRemoteIngressStatus[];
    selectedEdgeId: string | null;
    newEdgeId: string | null;
    isLoading: boolean;
    error: string | null;
    lastUpdated: number;
}
export declare const remoteIngressStatePart: plugins.deesElement.domtools.plugins.smartstate.StatePart<string, IRemoteIngressState>;
export interface IRouteManagementState {
    mergedRoutes: interfaces.data.IMergedRoute[];
    warnings: interfaces.data.IRouteWarning[];
    apiTokens: interfaces.data.IApiTokenInfo[];
    isLoading: boolean;
    error: string | null;
    lastUpdated: number;
}
export declare const routeManagementStatePart: plugins.deesElement.domtools.plugins.smartstate.StatePart<string, IRouteManagementState>;
export declare const loginAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<ILoginState, {
    username: string;
    password: string;
}>;
export declare const logoutAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<ILoginState, unknown>;
export declare const fetchAllStatsAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IStatsState, unknown>;
export declare const fetchConfigurationAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IConfigState, unknown>;
export declare const fetchRecentLogsAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<ILogState, {
    limit?: number;
    level?: "debug" | "info" | "warn" | "error";
    category?: "smtp" | "dns" | "security" | "system" | "email";
}>;
export declare const toggleAutoRefreshAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IUiState, unknown>;
export declare const setActiveViewAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IUiState, string>;
export declare const fetchNetworkStatsAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<INetworkState, unknown>;
export declare const fetchAllEmailsAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IEmailOpsState, unknown>;
export declare const fetchCertificateOverviewAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<ICertificateState, unknown>;
export declare const reprovisionCertificateAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<ICertificateState, string>;
export declare const deleteCertificateAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<ICertificateState, string>;
export declare const importCertificateAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<ICertificateState, {
    id: string;
    domainName: string;
    created: number;
    validUntil: number;
    privateKey: string;
    publicKey: string;
    csr: string;
}>;
export declare function fetchCertificateExport(domain: string): Promise<{
    success: boolean;
    cert?: {
        id: string;
        domainName: string;
        created: number;
        validUntil: number;
        privateKey: string;
        publicKey: string;
        csr: string;
    };
    message?: string;
}>;
export declare function fetchConnectionToken(edgeId: string): Promise<{
    success: boolean;
    token?: string;
    message?: string;
}>;
export declare const fetchRemoteIngressAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IRemoteIngressState, unknown>;
export declare const createRemoteIngressAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IRemoteIngressState, {
    name: string;
    listenPorts?: number[];
    autoDerivePorts?: boolean;
    tags?: string[];
}>;
export declare const deleteRemoteIngressAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IRemoteIngressState, string>;
export declare const updateRemoteIngressAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IRemoteIngressState, {
    id: string;
    name?: string;
    listenPorts?: number[];
    autoDerivePorts?: boolean;
    tags?: string[];
}>;
export declare const regenerateRemoteIngressSecretAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IRemoteIngressState, string>;
export declare const clearNewEdgeIdAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IRemoteIngressState, unknown>;
export declare const toggleRemoteIngressAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IRemoteIngressState, {
    id: string;
    enabled: boolean;
}>;
export interface IVpnState {
    clients: interfaces.data.IVpnClient[];
    connectedClients: interfaces.data.IVpnConnectedClient[];
    status: interfaces.data.IVpnServerStatus | null;
    isLoading: boolean;
    error: string | null;
    lastUpdated: number;
    /** WireGuard config shown after create/rotate (only shown once) */
    newClientConfig: string | null;
}
export declare const vpnStatePart: plugins.deesElement.domtools.plugins.smartstate.StatePart<string, IVpnState>;
export declare const fetchVpnAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IVpnState, unknown>;
export declare const createVpnClientAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IVpnState, {
    clientId: string;
    serverDefinedClientTags?: string[];
    description?: string;
    forceDestinationSmartproxy?: boolean;
    destinationAllowList?: string[];
    destinationBlockList?: string[];
    useHostIp?: boolean;
    useDhcp?: boolean;
    staticIp?: string;
    forceVlan?: boolean;
    vlanId?: number;
}>;
export declare const deleteVpnClientAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IVpnState, string>;
export declare const toggleVpnClientAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IVpnState, {
    clientId: string;
    enabled: boolean;
}>;
export declare const updateVpnClientAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IVpnState, {
    clientId: string;
    description?: string;
    serverDefinedClientTags?: string[];
    forceDestinationSmartproxy?: boolean;
    destinationAllowList?: string[];
    destinationBlockList?: string[];
    useHostIp?: boolean;
    useDhcp?: boolean;
    staticIp?: string;
    forceVlan?: boolean;
    vlanId?: number;
}>;
export declare const clearNewClientConfigAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IVpnState, unknown>;
export interface IProfilesTargetsState {
    profiles: interfaces.data.ISecurityProfile[];
    targets: interfaces.data.INetworkTarget[];
    isLoading: boolean;
    error: string | null;
    lastUpdated: number;
}
export declare const profilesTargetsStatePart: plugins.deesElement.domtools.plugins.smartstate.StatePart<string, IProfilesTargetsState>;
export declare const fetchProfilesAndTargetsAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IProfilesTargetsState, unknown>;
export declare const createProfileAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IProfilesTargetsState, {
    name: string;
    description?: string;
    security: any;
    extendsProfiles?: string[];
}>;
export declare const updateProfileAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IProfilesTargetsState, {
    id: string;
    name?: string;
    description?: string;
    security?: any;
    extendsProfiles?: string[];
}>;
export declare const deleteProfileAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IProfilesTargetsState, {
    id: string;
    force?: boolean;
}>;
export declare const createTargetAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IProfilesTargetsState, {
    name: string;
    description?: string;
    host: string | string[];
    port: number;
}>;
export declare const updateTargetAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IProfilesTargetsState, {
    id: string;
    name?: string;
    description?: string;
    host?: string | string[];
    port?: number;
}>;
export declare const deleteTargetAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IProfilesTargetsState, {
    id: string;
    force?: boolean;
}>;
export declare const fetchMergedRoutesAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IRouteManagementState, unknown>;
export declare const createRouteAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IRouteManagementState, {
    route: any;
    enabled?: boolean;
    metadata?: any;
}>;
export declare const updateRouteAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IRouteManagementState, {
    id: string;
    route?: any;
    enabled?: boolean;
    metadata?: any;
}>;
export declare const deleteRouteAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IRouteManagementState, string>;
export declare const toggleRouteAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IRouteManagementState, {
    id: string;
    enabled: boolean;
}>;
export declare const setRouteOverrideAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IRouteManagementState, {
    routeName: string;
    enabled: boolean;
}>;
export declare const removeRouteOverrideAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IRouteManagementState, string>;
export declare const fetchApiTokensAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IRouteManagementState, unknown>;
export declare function createApiToken(name: string, scopes: interfaces.data.TApiTokenScope[], expiresInDays?: number | null): Promise<{
    success: boolean;
    tokenId?: string;
    tokenValue?: string;
    message?: string;
}>;
export declare function rollApiToken(id: string): Promise<{
    success: boolean;
    tokenValue?: string;
    message?: string;
}>;
export declare const revokeApiTokenAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IRouteManagementState, string>;
export declare const toggleApiTokenAction: plugins.deesElement.domtools.plugins.smartstate.StateAction<IRouteManagementState, {
    id: string;
    enabled: boolean;
}>;
