/**
 * Wireguard interface helpers
 *
 * @since 1.0.0
 */
import * as CommandExecutor from "@effect/platform/CommandExecutor";
import * as PlatformError from "@effect/platform/Error";
import * as FileSystem from "@effect/platform/FileSystem";
import * as Path from "@effect/platform/Path";
import * as Socket from "@effect/platform/Socket";
import * as Cause from "effect/Cause";
import * as Effect from "effect/Effect";
import * as ParseResult from "effect/ParseResult";
import * as Schema from "effect/Schema";
import * as Scope from "effect/Scope";
import * as WireguardConfig from "./WireguardConfig.js";
import * as WireguardControl from "./WireguardControl.js";
import * as WireguardErrors from "./WireguardErrors.js";
import * as WireguardPeer from "./WireguardPeer.js";
declare const WireguardInterface_base: Schema.Class<WireguardInterface, {
    /**
     * Ensures the interface name matches the platform's interface name regex.
     * These functions need to be fully typed as we are accessing a static
     * method on this same class and otherwise typescript really complains about
     * inference.
     */
    Name: Schema.transformOrFail<typeof Schema.String, typeof Schema.String, never>;
}, Schema.Struct.Encoded<{
    /**
     * Ensures the interface name matches the platform's interface name regex.
     * These functions need to be fully typed as we are accessing a static
     * method on this same class and otherwise typescript really complains about
     * inference.
     */
    Name: Schema.transformOrFail<typeof Schema.String, typeof Schema.String, never>;
}>, never, {
    readonly Name: string;
}, {}, {}>;
/**
 * A wireguard interface name.
 *
 * @since 1.0.0
 * @category Datatypes
 */
export declare class WireguardInterface extends WireguardInterface_base {
    /**
     * @since 1.0.0
     * @category Constructors
     */
    static getNextAvailableInterface: Effect.Effect<WireguardInterface, WireguardErrors.WireguardError, never>;
    static InterfaceRegExpForPlatform: Effect.Effect<RegExp, WireguardErrors.WireguardError, never>;
    /**
     * @since 1.0.0
     * @category Userspace api
     */
    readonly SocketLocation: string;
    /**
     * Starts a wireguard tunnel that will be gracefully shutdown and stop
     * serving traffic once the scope is closed.
     *
     * @since 1.0.0
     * @category Wireguard control
     */
    upScoped: {
        (config: WireguardConfig.WireguardConfig): Effect.Effect<WireguardInterface, Socket.SocketError | ParseResult.ParseError | PlatformError.PlatformError | Cause.TimeoutException, FileSystem.FileSystem | Path.Path | Scope.Scope | CommandExecutor.CommandExecutor | WireguardControl.WireguardControl>;
    };
    /**
     * Starts a wireguard tunnel that will continue to run and serve traffic
     * even after the nodejs process exits.
     *
     * @since 1.0.0
     * @category Wireguard control
     */
    up: {
        (config: WireguardConfig.WireguardConfig): Effect.Effect<WireguardInterface, Socket.SocketError | ParseResult.ParseError | PlatformError.PlatformError | Cause.TimeoutException, FileSystem.FileSystem | Path.Path | CommandExecutor.CommandExecutor | WireguardControl.WireguardControl>;
    };
    /**
     * Stops a previously started wireguard tunnel.
     *
     * @since 1.0.0
     * @category Wireguard control
     */
    down: {
        (config: WireguardConfig.WireguardConfig): Effect.Effect<WireguardInterface, PlatformError.PlatformError | ParseResult.ParseError | Cause.TimeoutException, FileSystem.FileSystem | Path.Path | CommandExecutor.CommandExecutor | WireguardControl.WireguardControl>;
    };
    /**
     * Adds a peer to this interface.
     *
     * @since 1.0.0
     * @category Wireguard control
     */
    addPeer: {
        (peer: WireguardPeer.WireguardPeer): Effect.Effect<void, Socket.SocketError | ParseResult.ParseError, WireguardControl.WireguardControl | CommandExecutor.CommandExecutor>;
    };
    /**
     * Removes a peer from this interface.
     *
     * @since 1.0.0
     * @category Wireguard control
     */
    removePeer: {
        (peer: WireguardPeer.WireguardPeer): Effect.Effect<void, Socket.SocketError | ParseResult.ParseError, WireguardControl.WireguardControl>;
    };
}
export default WireguardInterface;
//# sourceMappingURL=WireguardInterface.d.ts.map