interface APIErrorDetails {
    code: string;
    message: string;
    fields?: Array<{
        name: string;
        messages: string[];
    }>;
}
interface APIError {
    error: APIErrorDetails;
}
interface MetaPagination {
    page: number;
    per_page: number;
    previous_page: number | null;
    next_page: number | null;
    last_page: number | null;
    total_entries: number;
}
interface Meta {
    pagination?: MetaPagination;
}
interface ActionError$1 {
    code: string;
    message: string;
}
interface ActionResource$1 {
    id: number;
    type: string;
}
interface BaseAction {
    id: number;
    command: string;
    status: "running" | "success" | "error";
    progress: number;
    started: string;
    finished: string | null;
    resources: ActionResource$1[];
    error: ActionError$1 | null;
}

declare class BaseAPI {
    protected token: string;
    protected baseUrl: string;
    constructor(token: string, baseUrl?: string);
    request<T>(endpoint: string, options?: RequestInit): Promise<{
        success: true;
        response: T;
    } | {
        success: false;
        response: APIError;
    }>;
}

interface PriceValue {
    net: string;
    gross: string;
}
interface LocationPriceEntry {
    location: string;
    price_hourly?: PriceValue;
    price_monthly: PriceValue;
    included_traffic?: number;
    price_per_tb_traffic?: PriceValue;
}
interface TypedLocationPrice {
    type: string;
    prices: LocationPriceEntry[];
}
interface ImagePrice {
    price_per_gb_month: PriceValue;
}
interface VolumePrice {
    price_per_gb_month: PriceValue;
}
interface ServerBackupPrice {
    percentage: string;
}
interface ServerTypePriceEntry {
    id: number;
    name: string;
    prices: LocationPriceEntry[];
}
interface LoadBalancerTypePriceEntry {
    id: number;
    name: string;
    prices: LocationPriceEntry[];
}
interface PricingData {
    currency: string;
    vat_rate: string;
    primary_ips: TypedLocationPrice[];
    floating_ips: TypedLocationPrice[];
    image: ImagePrice;
    volume: VolumePrice;
    server_backup: ServerBackupPrice;
    server_types: ServerTypePriceEntry[];
    load_balancer_types: LoadBalancerTypePriceEntry[];
}
interface PricingResponse {
    pricing: PricingData;
}

/**
 * Billing API
 *
 * Returns prices for resources.
 * https://docs.hetzner.cloud/#billing
 *
 */
declare class Billing extends BaseAPI {
    /**
     * Get all prices for resources
     * VAT and currency of the Project owner are used for calculations.
     * Both net and gross prices are included in the response.
     */
    get(): Promise<{
        success: true;
        response: PricingResponse;
    } | {
        success: false;
        response: APIError;
    }>;
}

type Protocol = "tcp" | "udp" | "icmp" | "esp" | "gre";
type Direction = "in" | "out";
type ActionStatus = "running" | "success" | "error";
interface FirewallRule {
    description?: string | null;
    direction: Direction;
    source_ips: string[];
    destination_ips?: string[];
    protocol: Protocol;
    port?: string;
}
interface FirewallResource {
    type: "server" | "label_selector";
    server?: {
        id: number;
    };
    label_selector?: {
        selector: string;
    };
}
interface FirewallResourceResult extends FirewallResource {
    applied_to_resources?: {
        type: "server";
        server: {
            id: number;
        };
    }[];
}
interface Firewall {
    id: number;
    name: string;
    labels?: Record<string, string>;
    created: string;
    rules: FirewallRule[];
    applied_to: FirewallResourceResult[];
}
interface FirewallsResponse {
    firewalls: Firewall[];
    meta: Meta;
}
interface FirewallCreateResponse {
    firewall: Firewall;
    actions: FirewallAction[];
}
interface FirewallAction {
    id: number;
    command: string;
    status: ActionStatus;
    started: string;
    finished: string | null;
    progress: number;
    resources: {
        id: number;
        type: string;
    }[];
    error: {
        code: string;
        message: string;
    } | null;
}
interface FirewallActionsResponse {
    actions: FirewallAction[];
    meta: Meta;
}
type SortOrder = "asc" | "desc";
type SortField = "id" | "command" | "status" | "started" | "finished";
type SortOption = SortField | `${SortField}:${SortOrder}`;

/**
 * Firewall Actions API
 *
 * Returns all Actions for Firewalls.
 * https://docs.hetzner.cloud/#firewalls-actions
 *
 */
declare class FirewallActions extends BaseAPI {
    /**
     * List all actions for firewalls
     * @param params Optional parameters for filtering and pagination
     */
    getAll(params?: {
        id?: number;
        sort?: SortOption;
        status?: ActionStatus;
        page?: number;
        per_page?: number;
    }): Promise<{
        success: true;
        response: FirewallActionsResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get a specific action for a firewall
     */
    get(firewallId: number, actionId: number): Promise<{
        success: true;
        response: {
            action: FirewallAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Apply firewall to resources
     */
    applyToResources(firewallId: number, resources: FirewallResource[]): Promise<{
        success: true;
        response: {
            action: FirewallAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Remove firewall from resources
     */
    removeFromResources(firewallId: number, resources: FirewallResource[]): Promise<{
        success: true;
        response: {
            action: FirewallAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Set firewall rules
     */
    setRules(firewallId: number, rules: FirewallRule[] | []): Promise<{
        success: true;
        response: {
            action: FirewallAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get all actions for a specific firewall
     */
    getFirewallActions(firewallId: number, params?: {
        sort?: SortOption;
        status?: ActionStatus;
        page?: number;
        per_page?: number;
    }): Promise<{
        success: true;
        response: FirewallActionsResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Returns a specific Action for a Firewall.
     */
    getFirewallAction(firewallId: number, actionId: number): Promise<{
        success: true;
        response: {
            action: FirewallAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
}

interface ListFirewallsParams {
    name?: string;
    label_selector?: string;
    sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc" | "created" | "created:asc" | "created:desc";
    page?: number;
    per_page?: number;
}
interface CreateFirewallParams {
    name: string;
    labels?: Record<string, string>;
    rules?: FirewallRule[];
    apply_to?: FirewallResource[];
}
interface UpdateFirewallParams {
    name?: string;
    labels?: Record<string, string>;
}
/**
 * Firewalls API
 *
 * Firewalls can limit the network access to or from your resources.
 * https://docs.hetzner.cloud/#firewalls
 *
 */
declare class Firewalls extends BaseAPI {
    private _actions;
    /**
     * Get the actions instance for managing firewall actions
     */
    get actions(): FirewallActions;
    /**
     * List all firewalls with optional filtering and pagination
     * @param params Optional parameters for filtering and pagination
     */
    getAll(params?: ListFirewallsParams): Promise<{
        success: true;
        response: FirewallsResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Create a new firewall
     * @param params Parameters for creating the firewall
     */
    create(params: CreateFirewallParams): Promise<{
        success: true;
        response: FirewallCreateResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get a specific firewall by ID
     * @param id The firewall ID
     */
    get(id: number): Promise<{
        success: true;
        response: {
            firewall: Firewall;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Update a firewall's properties
     * @param id The firewall ID
     * @param params Parameters to update
     */
    update(id: number, params: UpdateFirewallParams): Promise<{
        success: true;
        response: {
            firewall: Firewall;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Delete a firewall
     * @param id The firewall ID
     */
    delete(id: number): Promise<{
        success: true;
        response: null;
    } | {
        success: false;
        response: APIError;
    }>;
}

interface FloatingIP {
    id: number;
    name: string;
    description: string | null;
    ip: string;
    type: "ipv4" | "ipv6";
    server: number | null;
    dns_ptr: {
        [ip: string]: string;
    }[];
    home_location: {
        id: number;
        name: string;
        description: string;
        country: string;
        city: string;
        latitude: number;
        longitude: number;
        network_zone: string;
    };
    blocked: boolean;
    created: string;
    labels: Record<string, string>;
    protection: {
        delete: boolean;
    };
}
interface FloatingIPsResponse {
    floating_ips: FloatingIP[];
    meta?: Meta;
}
interface ListFloatingIPsParams {
    name?: string;
    label_selector?: string;
    sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc" | "created" | "created:asc" | "created:desc";
    page?: number;
    per_page?: number;
}
interface CreateFloatingIPParams {
    type: "ipv4" | "ipv6";
    server?: number;
    home_location?: string;
    description?: string;
    name?: string;
    labels?: Record<string, string>;
}
interface UpdateFloatingIPParams {
    description?: string;
    name?: string;
    labels?: Record<string, string>;
}
interface FloatingIPAction extends BaseAction {
}
interface FloatingIPActionsResponse {
    actions: FloatingIPAction[];
    meta?: Meta;
}
interface ListFloatingIPActionsParams {
    id?: number;
    sort?: "id" | "id:asc" | "id:desc" | "command" | "command:asc" | "command:desc" | "status" | "status:asc" | "status:desc" | "progress" | "progress:asc" | "progress:desc" | "started" | "started:asc" | "started:desc" | "finished" | "finished:asc" | "finished:desc";
    status?: "running" | "success" | "error";
    page?: number;
    per_page?: number;
}
interface AssignFloatingIPParams {
    server: number;
}
interface ChangeDNSPTRParams {
    ip: string;
    dns_ptr: string;
}
interface ChangeProtectionParams {
    delete: boolean;
}

declare class FloatingIPActions extends BaseAPI {
    /**
     * List all actions for Floating IPs
     * @param params Optional parameters for filtering and pagination
     */
    getAll(params?: ListFloatingIPActionsParams): Promise<{
        success: true;
        response: FloatingIPActionsResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get a specific action for Floating IPs
     * @param actionId The action ID
     */
    get(actionId: number): Promise<{
        success: true;
        response: FloatingIPAction;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * List actions for a specific Floating IP
     * @param floatingIpId The Floating IP ID
     * @param params Optional parameters for filtering and pagination
     */
    listForFloatingIP(floatingIpId: number, params?: ListFloatingIPActionsParams): Promise<{
        success: true;
        response: FloatingIPActionsResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Assign a Floating IP to a Server
     * @param floatingIpId The Floating IP ID
     * @param params Parameters for assigning the Floating IP
     */
    assign(floatingIpId: number, params: AssignFloatingIPParams): Promise<{
        success: true;
        response: FloatingIPAction;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Unassign a Floating IP
     * @param floatingIpId The Floating IP ID
     */
    unassign(floatingIpId: number): Promise<{
        success: true;
        response: FloatingIPAction;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Change Reverse DNS (PTR) for a Floating IP
     * @param floatingIpId The Floating IP ID
     * @param params Parameters for changing the DNS PTR record
     */
    changeDNSPTR(floatingIpId: number, params: ChangeDNSPTRParams): Promise<{
        success: true;
        response: FloatingIPAction;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Change Floating IP Protection
     * @param floatingIpId The Floating IP ID
     * @param params Parameters for changing the protection status
     */
    changeProtection(floatingIpId: number, params: ChangeProtectionParams): Promise<{
        success: true;
        response: FloatingIPAction;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get a specific action for a specific Floating IP
     * @param floatingIpId The Floating IP ID
     * @param actionId The action ID
     */
    getForFloatingIP(floatingIpId: number, actionId: number): Promise<{
        success: true;
        response: FloatingIPAction;
    } | {
        success: false;
        response: APIError;
    }>;
}

declare class FloatingIPs extends BaseAPI {
    private _actions;
    /**
     * List all Floating IPs with optional filtering and pagination
     * @param params Optional parameters for filtering and pagination
     */
    getAll(params?: ListFloatingIPsParams): Promise<{
        success: true;
        response: FloatingIPsResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get a specific Floating IP by ID
     * @param id The Floating IP ID
     */
    get(id: number): Promise<{
        success: true;
        response: FloatingIP;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Create a new Floating IP
     * @param params Parameters for creating the Floating IP
     */
    create(params: CreateFloatingIPParams): Promise<{
        success: true;
        response: {
            floating_ip: FloatingIP;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Update a Floating IP's properties
     * @param id The Floating IP ID
     * @param params Parameters to update
     */
    update(id: number, params: UpdateFloatingIPParams): Promise<{
        success: true;
        response: {
            floating_ip: FloatingIP;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Delete a Floating IP
     * @param id The Floating IP ID
     */
    delete(id: number): Promise<{
        success: true;
        response: null;
    } | {
        success: false;
        response: APIError;
    }>;
    get actions(): FloatingIPActions;
}

interface Location$1 {
  id: number
  name: string
  description: string
  country: string
  city: string
  latitude: number
  longitude: number
  network_zone: string
}

interface LocationsResponse {
  locations: Location$1[]
  meta: Meta
}

interface Datacenter$2 {
  id: number
  name: string
  description: string
  location: Location$1
  server_types: {
    supported: number[]
    available: number[]
    available_for_migration: number[]
  }
}

interface DatacentersResponse {
  datacenters: Datacenter$2[]
  recommendation: number
  meta: Meta
}

type SortableLocationField = "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc";
interface ListLocationsParams {
    name?: string;
    sort?: SortableLocationField;
    page?: number;
    per_page?: number;
}
/**
 * Locations API
 *
 * Datacenters are organized by Locations. Datacenters in the same Location are connected with very low latency links.
 * https://docs.hetzner.cloud/#locations
 *
 */
declare class Locations extends BaseAPI {
    /**
     * List all locations with optional filtering and pagination
     * @param params Optional parameters for filtering and pagination
     */
    getAll(params?: ListLocationsParams): Promise<{
        success: true;
        response: LocationsResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get a specific location by ID
     * @param id The location ID
     */
    get(id: number): Promise<{
        success: true;
        response: Location$1;
    } | {
        success: false;
        response: APIError;
    }>;
}
declare class Datacenters extends BaseAPI {
    /**
     * List all datacenters with optional filtering and pagination
     * @param params Optional parameters for filtering and pagination
     */
    getAll(params?: ListLocationsParams): Promise<{
        success: true;
        response: DatacentersResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get a specific datacenter by ID
     * @param id The datacenter ID
     */
    get(id: number): Promise<{
        success: true;
        response: Datacenter$2;
    } | {
        success: false;
        response: APIError;
    }>;
}

interface NetworkSubnet {
    type: "cloud" | "vswitch" | "server";
    ip_range: string;
    network_zone: string;
    gateway: string;
    vswitch_id?: number | null;
}
interface NetworkRoute {
    destination: string;
    gateway: string;
}
interface NetworkProtection {
    delete: boolean;
}
interface Network {
    id: number;
    name: string;
    ip_range: string;
    subnets: NetworkSubnet[];
    network_zone: string;
    routes: NetworkRoute[];
    servers: number[];
    load_balancers: number[];
    protection: NetworkProtection;
    labels: Record<string, string>;
    created: string;
    expose_routes_to_vswitch?: boolean;
}
interface NetworksResponse {
    networks: Network[];
    meta?: Meta;
}
interface ListNetworksParams {
    name?: string;
    label_selector?: string;
    sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc" | "created" | "created:asc" | "created:desc";
    page?: number;
    per_page?: number;
}
interface CreateNetworkParams {
    name: string;
    ip_range: string;
    labels?: Record<string, string>;
    subnets?: NetworkSubnet[];
    routes?: NetworkRoute[];
    expose_routes_to_vswitch?: boolean;
}
interface UpdateNetworkParams {
    name?: string;
    labels?: Record<string, string>;
    expose_routes_to_vswitch?: boolean;
}
interface NetworkActionsResponse {
    actions: BaseAction[];
    meta?: Meta;
}
interface ListNetworkActionsParams {
    id?: number;
    sort?: "id" | "command" | "status" | "progress" | "started" | "finished" | "id:asc" | "id:desc";
    status?: "running" | "success" | "error";
    page?: number;
    per_page?: number;
}
interface AddRouteNetworkParams {
    destination: string;
    gateway: string;
}
interface DeleteRouteNetworkParams {
    destination: string;
    gateway: string;
}
interface AddSubnetNetworkParams {
    type: "cloud" | "vswitch" | "server";
    ip_range?: string;
    network_zone: string;
    vswitch_id?: number;
}
interface DeleteSubnetNetworkParams {
    ip_range: string;
}
interface ChangeIPRangeNetworkParams {
    ip_range: string;
}
interface ChangeProtectionNetworkParams {
    delete: boolean;
}

/**
 * Network Actions API
 *
 * Network actions are used to manage networks.
 * https://docs.hetzner.cloud/#networks-actions
 *
 */
declare class NetworkActions extends BaseAPI {
    /**
     * List all actions for Networks
     * @param params Optional parameters for filtering and pagination
     */
    getAll(params?: ListNetworkActionsParams): Promise<{
        success: true;
        response: NetworkActionsResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get a specific action for Networks
     * @param actionId The action ID
     */
    get(actionId: number): Promise<{
        success: true;
        response: {
            actions: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * List actions for a specific Network
     * @param networkId The Network ID
     * @param params Optional parameters for filtering and pagination
     */
    listForNetwork(networkId: number, params?: ListNetworkActionsParams): Promise<{
        success: true;
        response: NetworkActionsResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get a specific action for a specific Network
     * @param networkId The Network ID
     * @param actionId The action ID
     */
    getForNetwork(networkId: number, actionId: number): Promise<{
        success: true;
        response: {
            actions: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Add a route to a Network
     * @param networkId The Network ID
     * @param params Parameters for adding the route
     */
    addRoute(networkId: number, params: AddRouteNetworkParams): Promise<{
        success: true;
        response: {
            actions: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Delete a route from a Network
     * @param networkId The Network ID
     * @param params Parameters for deleting the route
     */
    deleteRoute(networkId: number, params: DeleteRouteNetworkParams): Promise<{
        success: true;
        response: {
            actions: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Add a subnet to a Network
     * @param networkId The Network ID
     * @param params Parameters for adding the subnet
     */
    addSubnet(networkId: number, params: AddSubnetNetworkParams): Promise<{
        success: true;
        response: {
            actions: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Delete a subnet from a Network
     * @param networkId The Network ID
     * @param params Parameters for deleting the subnet
     */
    deleteSubnet(networkId: number, params: DeleteSubnetNetworkParams): Promise<{
        success: true;
        response: {
            actions: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Change the IP range of a Network
     * @param networkId The Network ID
     * @param params Parameters for changing the IP range
     */
    changeIPRange(networkId: number, params: ChangeIPRangeNetworkParams): Promise<{
        success: true;
        response: {
            actions: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Change the protection status of a Network
     * @param networkId The Network ID
     * @param params Parameters for changing the protection status
     */
    changeProtection(networkId: number, params: ChangeProtectionNetworkParams): Promise<{
        success: true;
        response: {
            actions: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
}

/**
 * Networks API
 *
 * Networks is a private networks feature. These Networks are optional and they coexist with the public network that every Server has by default.
 * https://docs.hetzner.cloud/#networks
 *
 */
declare class Networks extends BaseAPI {
    private _actions;
    /**
     * List all Networks with optional filtering and pagination
     * @param params Optional parameters for filtering and pagination
     */
    getAll(params?: ListNetworksParams): Promise<{
        success: true;
        response: NetworksResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Create a new Network
     * @param params Parameters for creating the Network
     */
    create(params: CreateNetworkParams): Promise<{
        success: true;
        response: {
            network: Network;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get a specific Network by ID
     * @param id The Network ID
     */
    get(id: number): Promise<{
        success: true;
        response: {
            network: Network;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Update a Network's properties
     * @param id The Network ID
     * @param params Parameters to update
     */
    update(id: number, params: UpdateNetworkParams): Promise<{
        success: true;
        response: {
            network: Network;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Delete a Network
     * @param id The Network ID
     */
    delete(id: number): Promise<{
        success: true;
        response: null;
    } | {
        success: false;
        response: APIError;
    }>;
    get actions(): NetworkActions;
}

interface SSHKey {
    id: number;
    name: string;
    fingerprint: string;
    public_key: string;
    labels: Record<string, string>;
    created: string;
}
interface SSHKeysResponse {
    ssh_keys: SSHKey[];
    meta?: Meta;
}
interface CreateSSHKeyParams {
    name: string;
    public_key: string;
    labels?: Record<string, string>;
}
interface UpdateSSHKeyParams {
    name?: string;
    labels?: Record<string, string>;
}
interface Certificate {
    id: number;
    name: string;
    certificate: string;
    created: string;
    domain_names: string[];
    fingerprint: string;
    labels: Record<string, string>;
    not_valid_after: string;
    not_valid_before: string;
    status: CertificateStatus;
    type: CertificateType;
}
type CertificateStatus = "pending" | "failed" | "completed";
type CertificateType = "uploaded" | "managed";
interface CertificatesResponse {
    certificates: Certificate[];
    meta?: {
        pagination?: {
            page: number;
            per_page: number;
            total_entries: number;
            last_page: number;
        };
    };
}
interface CreateCertificateParams {
    name: string;
    certificate: string;
    private_key: string;
    labels?: Record<string, string>;
}
interface UpdateCertificateParams {
    name?: string;
    labels?: Record<string, string>;
}
interface CertificateAction {
    id: number;
    command: string;
    status: "running" | "success" | "error";
    progress: number;
    started: string;
    finished: string | null;
    resources: Array<{
        id: number;
        type: string;
    }>;
    error?: {
        code: string;
        message: string;
    };
}
interface CertificateActionsResponse {
    actions: CertificateAction[];
    meta?: Meta;
}
interface CertificateActionResponse {
    action: CertificateAction;
}

interface ListCertificateActionsParams {
    id?: number[];
    sort?: Array<"id" | "command" | "status" | "started" | "finished" | "id:asc" | "id:desc" | "command:asc" | "command:desc" | "status:asc" | "status:desc" | "started:asc" | "started:desc" | "finished:asc" | "finished:desc">;
    status?: Array<"running" | "success" | "error">;
    page?: number;
    per_page?: number;
}
/**
 * Certificate Actions API
 *
 * Actions are the individual operations that can be performed on a certificate.
 * https://docs.hetzner.cloud/#certificate-actions
 *
 */
declare class CertificateActions extends BaseAPI {
    /**
     * Get all actions for all certificates
     * @param params Optional parameters for filtering and pagination
     */
    getAll(params?: ListCertificateActionsParams): Promise<{
        success: true;
        response: CertificateActionsResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get a specific action
     * @param actionId The action ID
     */
    get(actionId: number): Promise<{
        success: true;
        response: CertificateActionResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get all actions for a specific certificate
     * @param certificateId The certificate ID
     * @param params Optional parameters for filtering and pagination
     */
    listForCertificate(certificateId: number, params?: Omit<ListCertificateActionsParams, "id">): Promise<{
        success: true;
        response: CertificateActionsResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get a specific action for a certificate
     * @param certificateId The certificate ID
     * @param actionId The action ID
     */
    getForCertificate(certificateId: number, actionId: number): Promise<{
        success: true;
        response: CertificateActionResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Retry issuance or renewal of a certificate
     * @param certificateId The certificate ID
     */
    retry(certificateId: number): Promise<{
        success: true;
        response: CertificateActionResponse;
    } | {
        success: false;
        response: APIError;
    }>;
}

interface ListCertificatesParams {
    name?: string;
    label_selector?: string;
    sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc";
    page?: number;
    per_page?: number;
}
declare class Certificates extends BaseAPI {
    private _actions;
    /**
     * List all certificates with optional filtering and pagination
     * @param params Optional parameters for filtering and pagination
     */
    getAll(params?: ListCertificatesParams): Promise<{
        success: true;
        response: CertificatesResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get a specific certificate by ID
     * @param id The certificate ID
     */
    get(id: number): Promise<{
        success: true;
        response: Certificate;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Create a new certificate
     * @param params Parameters for creating the certificate
     */
    create(params: CreateCertificateParams): Promise<{
        success: true;
        response: Certificate;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Update a certificate's properties
     * @param id The certificate ID
     * @param params Parameters to update
     */
    update(id: number, params: UpdateCertificateParams): Promise<{
        success: true;
        response: Certificate;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Delete a certificate
     * @param id The certificate ID
     */
    delete(id: number): Promise<{
        success: true;
        response: null;
    } | {
        success: false;
        response: APIError;
    }>;
    get actions(): CertificateActions;
}

interface ListSSHKeysParams {
    name?: string;
    fingerprint?: string;
    label_selector?: string;
    sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc";
    page?: number;
    per_page?: number;
}
/**
 * SSH Keys API
 *
 * SSH keys are used to authenticate with the server.
 * https://docs.hetzner.cloud/#ssh-keys
 *
 */
declare class SSHKeys extends BaseAPI {
    /**
     * List all SSH keys with optional filtering and pagination
     * @param params Optional parameters for filtering and pagination
     */
    getAll(params?: ListSSHKeysParams): Promise<{
        success: true;
        response: SSHKeysResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get a specific SSH key by ID
     * @param id The SSH key ID
     */
    get(id: number): Promise<{
        success: true;
        response: {
            ssh_key: SSHKey;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Create a new SSH key
     * @param params Parameters for creating the SSH key
     */
    create(params: CreateSSHKeyParams): Promise<{
        success: true;
        response: {
            ssh_key: SSHKey;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Update an SSH key's properties
     * @param id The SSH key ID
     * @param params Parameters to update
     */
    update(id: number, params: UpdateSSHKeyParams): Promise<{
        success: true;
        response: {
            ssh_key: SSHKey;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Delete an SSH key
     * @param id The SSH key ID
     */
    delete(id: number): Promise<{
        success: true;
        response: null;
    } | {
        success: false;
        response: APIError;
    }>;
}

interface VolumeLocation {
    id: number;
    name: string;
    description: string;
    country: string;
    city: string;
    latitude: number;
    longitude: number;
    network_zone: string;
}
interface VolumeProtection {
    delete: boolean;
}
interface VolumeStatus {
    value: "available" | "creating";
}
interface Volume {
    id: number;
    created: string;
    name: string;
    server: number | null;
    location: VolumeLocation;
    size: number;
    linux_device: string;
    protection: VolumeProtection;
    labels: Record<string, string>;
    status: VolumeStatus["value"];
    format?: string;
}
interface VolumesResponse {
    volumes: Volume[];
    meta?: Meta;
}
interface ListVolumesParams {
    name?: string;
    label_selector?: string;
    sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc" | "created" | "created:asc" | "created:desc";
    page?: number;
    per_page?: number;
    status?: VolumeStatus["value"][];
}
interface CreateVolumeParams {
    name: string;
    size: number;
    location?: string;
    server?: number;
    format?: string;
    labels?: Record<string, string>;
    automount?: boolean;
}
interface UpdateVolumeParams {
    name?: string;
    labels?: Record<string, string>;
}
interface AttachVolumeParams {
    server: number;
    automount?: boolean;
}
interface ResizeVolumeParams {
    size: number;
}
interface ChangeVolumeProtectionParams {
    delete: boolean;
}
interface VolumeActionsResponse {
    actions: BaseAction[];
    meta?: Meta;
}
interface ListVolumeActionsParams {
    sort?: "id" | "id:asc" | "id:desc" | "command" | "command:asc" | "command:desc" | "status" | "status:asc" | "status:desc" | "progress" | "progress:asc" | "progress:desc" | "started" | "started:asc" | "started:desc" | "finished" | "finished:asc" | "finished:desc";
    status?: "available" | "creating";
    name?: string;
    label_selector?: string;
    page?: number;
    per_page?: number;
}

declare class VolumeActions extends BaseAPI {
    /**
     * List all actions for Volumes (globally, not for a specific volume)
     * @param params Optional parameters for filtering and pagination
     */
    getAll(params?: ListVolumeActionsParams): Promise<{
        success: true;
        response: VolumeActionsResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get a specific action for Volumes (globally)
     * @param actionId The action ID
     */
    getGlobalAction(actionId: number): Promise<{
        success: true;
        response: {
            action: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * List actions for a specific Volume
     * @param volumeId The Volume ID
     * @param params Optional parameters for filtering and pagination
     */
    listForVolume(volumeId: number, params?: ListVolumeActionsParams): Promise<{
        success: true;
        response: VolumeActionsResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get a specific action for a specific Volume
     * @param volumeId The Volume ID
     * @param actionId The action ID
     */
    getAction(volumeId: number, actionId: number): Promise<{
        success: true;
        response: {
            action: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Attach a Volume to a Server
     * @param volumeId The Volume ID
     * @param params Parameters for attaching the volume
     */
    attach(volumeId: number, params: AttachVolumeParams): Promise<{
        success: true;
        response: {
            action: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Detach a Volume from a Server
     * @param volumeId The Volume ID
     */
    detach(volumeId: number): Promise<{
        success: true;
        response: {
            action: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Resize a Volume
     * @param volumeId The Volume ID
     * @param params Parameters for resizing the volume
     */
    resize(volumeId: number, params: ResizeVolumeParams): Promise<{
        success: true;
        response: {
            action: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Change Volume Protection
     * @param volumeId The Volume ID
     * @param params Parameters for changing the protection status
     */
    changeProtection(volumeId: number, params: ChangeVolumeProtectionParams): Promise<{
        success: true;
        response: {
            action: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
}

/**
 * Volumes API
 *
 * Volumes can be used to store data on a server.
 * https://docs.hetzner.cloud/#volumes
 *
 */
declare class Volumes extends BaseAPI {
    private _actions;
    /**
     * List all Volumes with optional filtering and pagination
     * @param params Optional parameters for filtering and pagination
     */
    getAll(params?: ListVolumesParams): Promise<{
        success: true;
        response: VolumesResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get a specific Volume by ID
     * @param id The Volume ID
     */
    get(id: number): Promise<{
        success: true;
        response: {
            volume: Volume;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Create a new Volume
     * @param params Parameters for creating the Volume
     */
    create(params: CreateVolumeParams): Promise<{
        success: true;
        response: {
            volume: Volume;
            action?: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Update a Volume's properties
     * @param id The Volume ID
     * @param params Parameters to update
     */
    update(id: number, params: UpdateVolumeParams): Promise<{
        success: true;
        response: {
            volume: Volume;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Delete a Volume
     * @param id The Volume ID
     */
    delete(id: number): Promise<{
        success: true;
        response: null;
    } | {
        success: false;
        response: APIError;
    }>;
    get actions(): VolumeActions;
}

interface LoadBalancerLocation {
    id: number;
    name: string;
    description: string;
    country: string;
    city: string;
    latitude: number;
    longitude: number;
    network_zone: string;
}
interface LoadBalancerProtection {
    delete: boolean;
}
interface LoadBalancerIPDetail {
    ip: string;
    dns_ptr?: string | null;
}
interface LoadBalancerPublicNet {
    enabled: boolean;
    ipv4: LoadBalancerIPDetail;
    ipv6: LoadBalancerIPDetail;
}
interface LoadBalancerPrivateNet {
    network: number;
    ip: string;
}
interface LoadBalancerAlgorithm {
    type: "round_robin" | "least_connections";
}
interface LoadBalancerHealthCheckHTTPConfig {
    domain: string | null;
    path: string;
    response: string | null;
    status_codes: string[];
    tls: boolean;
}
interface LoadBalancerHealthCheck {
    protocol: "tcp" | "http" | "https";
    port: number;
    interval: number;
    timeout: number;
    retries: number;
    http: LoadBalancerHealthCheckHTTPConfig | null;
}
interface LoadBalancerServiceHTTPConfig {
    cookie_name: string | null;
    cookie_lifetime: number | null;
    certificates: number[];
    redirect_http: boolean | null;
    sticky_sessions: boolean | null;
}
interface LoadBalancerService {
    protocol: "tcp" | "http" | "https";
    listen_port: number;
    destination_port: number;
    proxyprotocol: boolean;
    health_check: LoadBalancerHealthCheck;
    http: LoadBalancerServiceHTTPConfig | null;
}
interface LoadBalancerTargetServer {
    id: number;
}
interface LoadBalancerTargetLabelSelector {
    selector: string;
}
interface LoadBalancerTargetIP {
    ip: string;
}
interface LoadBalancerTargetHealthStatusEntry {
    listen_port: number;
    status: "healthy" | "unhealthy" | "unknown";
}
interface LoadBalancerResolvedTarget {
    type: "server";
    server: LoadBalancerTargetServer;
    health_status: LoadBalancerTargetHealthStatusEntry[] | null;
    use_private_ip: boolean;
}
interface LoadBalancerTarget {
    type: "server" | "label_selector" | "ip";
    server?: LoadBalancerTargetServer;
    label_selector?: LoadBalancerTargetLabelSelector;
    ip?: LoadBalancerTargetIP;
    health_status?: LoadBalancerTargetHealthStatusEntry[] | null;
    use_private_ip: boolean;
    targets?: LoadBalancerResolvedTarget[];
}
interface LoadBalancer {
    id: number;
    name: string;
    public_net: LoadBalancerPublicNet;
    private_net: LoadBalancerPrivateNet[];
    location: LoadBalancerLocation;
    load_balancer_type: LoadBalancerType;
    protection: LoadBalancerProtection;
    labels: Record<string, string>;
    created: string;
    services: LoadBalancerService[];
    targets: LoadBalancerTarget[];
    algorithm: LoadBalancerAlgorithm;
    outgoing_traffic: number | null;
    ingoing_traffic: number | null;
    included_traffic: number;
}
interface LoadBalancersResponse {
    load_balancers: LoadBalancer[];
    meta?: Meta;
}
interface ListLoadBalancersParams {
    name?: string;
    label_selector?: string;
    sort?: string;
    page?: number;
    per_page?: number;
}
interface CreateLoadBalancerParams {
    name: string;
    load_balancer_type: string | number;
    algorithm?: LoadBalancerAlgorithm;
    services?: LoadBalancerService[];
    targets?: LoadBalancerTarget[];
    labels?: Record<string, string>;
    public_interface?: boolean;
    network?: number;
    network_zone?: string;
    location?: string | number;
}
interface UpdateLoadBalancerParams {
    name?: string;
    labels?: Record<string, string>;
}
interface LoadBalancerTimeSeries {
    [metric_name: string]: {
        values: Array<[number, string]>;
    };
}
interface LoadBalancerMetricsResponse {
    metrics: {
        start: string;
        end: string;
        step: number;
        time_series: LoadBalancerTimeSeries;
    };
}
interface GetLoadBalancerMetricsParams {
    type: string;
    start: string;
    end: string;
    step?: string;
}
interface LoadBalancerAction extends BaseAction {
}
interface LoadBalancerActionsResponse {
    actions: LoadBalancerAction[];
    meta?: Meta;
}
interface ListLoadBalancerActionsParams {
    id?: number[];
    sort?: string;
    status?: ("running" | "success" | "error")[];
    page?: number;
    per_page?: number;
}
interface AddServiceLoadBalancerParams extends LoadBalancerService {
}
interface UpdateServiceLoadBalancerParams {
    listen_port: number;
    protocol?: "tcp" | "http" | "https";
    destination_port?: number;
    proxyprotocol?: boolean;
    health_check?: LoadBalancerHealthCheck;
    http?: LoadBalancerServiceHTTPConfig | null;
}
interface DeleteServiceLoadBalancerParams {
    listen_port: number;
}
interface AddTargetLoadBalancerParams {
    type: "server" | "label_selector" | "ip";
    server?: LoadBalancerTargetServer;
    use_private_ip?: boolean;
    label_selector?: LoadBalancerTargetLabelSelector;
    ip?: LoadBalancerTargetIP;
}
interface RemoveTargetLoadBalancerParams extends AddTargetLoadBalancerParams {
}
interface AttachToNetworkLoadBalancerParams {
    network: number;
    ip?: string;
}
interface DetachFromNetworkLoadBalancerParams {
    network: number;
}
interface ChangeAlgorithmLoadBalancerParams {
    type: "round_robin" | "least_connections";
}
interface ChangeDNSPTRLoadBalancerParams {
    ip: string;
    dns_ptr: string | null;
}
interface ChangeProtectionLoadBalancerParams {
    delete?: boolean;
}
interface ChangeTypeLoadBalancerParams {
    load_balancer_type: string | number;
}
interface ListLoadBalancerTypesParams {
    name?: string;
    page?: number;
    per_page?: number;
}
interface LoadBalancerResponse {
    load_balancer: LoadBalancer;
}
interface LoadBalancerActionResponse {
    action: LoadBalancerAction;
}
interface CreateLoadBalancerResponse {
    load_balancer: LoadBalancer;
    action: LoadBalancerAction;
}
interface LoadBalancerType {
    id: number;
    name: string;
    description: string;
    max_connections: number;
    max_services: number;
    max_targets: number;
    max_assigned_certificates: number;
    deprecated: string;
    prices: {
        location: string;
        price_hourly: {
            net: string;
            gross: string;
        };
        price_monthly: {
            net: string;
            gross: string;
        };
        included_traffic: number;
        price_per_tb_traffic: {
            net: string;
            gross: string;
        };
    }[];
}
interface LoadBalancerTypesResponse {
    load_balancer_types: LoadBalancerType[];
    meta?: Meta;
}

/**
 * Load Balancer Actions API
 *
 * Load balancer actions are used to manage load balancers.
 * https://docs.hetzner.cloud/#load-balancers-actions
 *
 */
declare class LoadBalancerActions extends BaseAPI {
    /**
     * List all global actions for Load Balancers
     * @param params Optional parameters for filtering and pagination
     */
    getAllGlobal(params?: ListLoadBalancerActionsParams): Promise<{
        success: true;
        response: LoadBalancerActionsResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get a specific global action for Load Balancers
     * @param actionId The action ID
     */
    getGlobalAction(actionId: number): Promise<{
        success: true;
        response: LoadBalancerActionResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * List actions for a specific Load Balancer
     * @param loadBalancerId The Load Balancer ID
     * @param params Optional parameters for filtering and pagination
     */
    listForLoadBalancer(loadBalancerId: number, params?: ListLoadBalancerActionsParams): Promise<{
        success: true;
        response: LoadBalancerActionsResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get a specific action for a specific Load Balancer
     * @param loadBalancerId The Load Balancer ID
     * @param actionId The action ID
     */
    getAction(loadBalancerId: number, actionId: number): Promise<{
        success: true;
        response: LoadBalancerActionResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    addService(loadBalancerId: number, params: AddServiceLoadBalancerParams): Promise<{
        success: true;
        response: LoadBalancerActionResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    updateService(loadBalancerId: number, params: UpdateServiceLoadBalancerParams): Promise<{
        success: true;
        response: LoadBalancerActionResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    deleteService(loadBalancerId: number, params: DeleteServiceLoadBalancerParams): Promise<{
        success: true;
        response: LoadBalancerActionResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    addTarget(loadBalancerId: number, params: AddTargetLoadBalancerParams): Promise<{
        success: true;
        response: LoadBalancerActionResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    removeTarget(loadBalancerId: number, params: RemoveTargetLoadBalancerParams): Promise<{
        success: true;
        response: LoadBalancerActionResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    attachToNetwork(loadBalancerId: number, params: AttachToNetworkLoadBalancerParams): Promise<{
        success: true;
        response: LoadBalancerActionResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    detachFromNetwork(loadBalancerId: number, params: DetachFromNetworkLoadBalancerParams): Promise<{
        success: true;
        response: LoadBalancerActionResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    changeAlgorithm(loadBalancerId: number, params: ChangeAlgorithmLoadBalancerParams): Promise<{
        success: true;
        response: LoadBalancerActionResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    changeDNSPTR(loadBalancerId: number, params: ChangeDNSPTRLoadBalancerParams): Promise<{
        success: true;
        response: LoadBalancerActionResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    changeProtection(loadBalancerId: number, params: ChangeProtectionLoadBalancerParams): Promise<{
        success: true;
        response: LoadBalancerActionResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    changeType(loadBalancerId: number, params: ChangeTypeLoadBalancerParams): Promise<{
        success: true;
        response: LoadBalancerActionResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    enablePublicInterface(loadBalancerId: number): Promise<{
        success: true;
        response: LoadBalancerActionResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    disablePublicInterface(loadBalancerId: number): Promise<{
        success: true;
        response: LoadBalancerActionResponse;
    } | {
        success: false;
        response: APIError;
    }>;
}

/**
 * Load Balancers API
 *
 * Load Balancers can be used to load balance traffic between multiple servers.
 * https://docs.hetzner.cloud/#load-balancers
 *
 */
declare class LoadBalancers extends BaseAPI {
    private _actions;
    /**
     * List all Load Balancers
     */
    getAll(params?: ListLoadBalancersParams): Promise<{
        success: true;
        response: LoadBalancersResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Create a new Load Balancer
     */
    create(params: CreateLoadBalancerParams): Promise<{
        success: true;
        response: CreateLoadBalancerResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get a specific Load Balancer by ID
     */
    get(id: number): Promise<{
        success: true;
        response: LoadBalancerResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Update a Load Balancer
     */
    update(id: number, params: UpdateLoadBalancerParams): Promise<{
        success: true;
        response: LoadBalancerResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Delete a Load Balancer
     */
    delete(id: number): Promise<{
        success: true;
        response: null | LoadBalancerActionResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get Metrics for a Load Balancer
     */
    getMetrics(id: number, params: GetLoadBalancerMetricsParams): Promise<{
        success: true;
        response: LoadBalancerMetricsResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * List all Load Balancer Types
     */
    listTypes(params?: ListLoadBalancerTypesParams): Promise<{
        success: true;
        response: LoadBalancerTypesResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get a specific Load Balancer Type by ID
     */
    getType(id: number): Promise<{
        success: true;
        response: LoadBalancerTypesResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    get actions(): LoadBalancerActions;
}

interface ActionError {
    code: string;
    message: string;
}
interface ActionResource {
    id: number;
    type: string;
}
interface Action {
    id: number;
    command: string;
    status: string;
    started: string;
    finished: string;
    progress: number;
    resources: ActionResource[];
    error?: ActionError;
}
interface ActionsResponse {
    actions: Action[];
}

/**
 * Actions API
 *
 * Actions show the results and progress of asynchronous requests to the API.
 * https://docs.hetzner.cloud/#actions
 *
 */
declare class Actions extends BaseAPI {
    /**
     * Returns a list of Action objects, filtered by the provided ID.
     * The API may return an array, even if the ID matches a single action.
     */
    getAll(id: number): Promise<{
        success: true;
        response: ActionsResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Returns a specific Action object.
     */
    get(id: number): Promise<{
        success: true;
        response: Action;
    } | {
        success: false;
        response: APIError;
    }>;
}

interface ListImagesResponse {
    images: Image$1[];
    meta: Meta;
}
interface Image$1 {
    id: number;
    type: "system" | "app" | "snapshot" | "backup";
    status: "available" | "creating" | "unavailable";
    name: string;
    description: string;
    image_size: number;
    disk_size: number;
    created: string;
    created_from: {
        id: number;
        name: string;
    } | null;
    bound_to: number | null;
    os_flavor: "ubuntu" | "centos" | "debian" | "fedora" | "rocky" | "alma" | "unknown";
    os_version: string | null;
    rapid_deploy?: boolean;
    protection: {
        delete: boolean;
    };
    deprecated?: boolean | null;
    deleted?: string | null;
    labels: Record<string, string>;
    architecture: "x86" | "arm64";
}

interface ListImagesParams {
    type?: "system" | "app" | "snapshot" | "backup";
    status?: "available" | "creating" | "unavailable";
    bound_to?: string;
    include_deprecated?: boolean;
    sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc";
    name?: string;
    label_selector?: string;
    architecture?: "x86" | "arm64";
    page?: number;
    per_page?: number;
}
interface UpdateImageParams {
    description?: string;
    type?: "snapshot";
    labels?: Record<string, string>;
}
/**
 * Images API
 *
 * Images are used to create servers.
 * https://docs.hetzner.cloud/#images
 */
declare class Images extends BaseAPI {
    /**
     * List all images with optional filtering and pagination
     * @param params Optional parameters for filtering and pagination
     */
    getAll(params?: ListImagesParams): Promise<{
        success: true;
        response: ListImagesResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get an image by id
     * @param id The id of the image
     */
    get(id: number): Promise<{
        success: true;
        response: {
            image: Image$1;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Update an image
     * @param id The id of the image
     * @param params The parameters for updating the image
     */
    update(id: number, params: UpdateImageParams): Promise<{
        success: true;
        response: {
            image: Image$1;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Delete an image
     * @param id The id of the image
     */
    delete(id: number): Promise<{
        success: true;
        response: Action;
    } | {
        success: false;
        response: APIError;
    }>;
}

interface Location {
    id: number;
    name: string;
    description: string;
    country: string;
    city: string;
    latitude: number;
    longitude: number;
    network_zone: string;
}
interface ServerTypes$1 {
    supported: number[];
    available: number[];
    available_for_migration: number[];
}
interface Datacenter$1 {
    id: number;
    name: string;
    description: string;
    location: Location;
    server_types: ServerTypes$1;
}
interface DNSPtr {
    ip: string;
    dns_ptr: string;
}
interface Protection {
    delete: boolean;
}
interface PrimaryIP$1 {
    id: number;
    name: string;
    labels: Record<string, string>;
    created: string;
    blocked: boolean;
    datacenter: Datacenter$1;
    ip: string;
    dns_ptr: DNSPtr[];
    protection: Protection;
    type: "ipv4" | "ipv6";
    auto_delete: boolean;
    assignee_type: string;
    assignee_id: number;
}
interface ListPrimaryIPResponse {
    primary_ips: PrimaryIP$1[];
}
interface CreatePrimaryIPResponse {
    primary_ip: PrimaryIP$1;
    action: Action;
}

interface ListPrimaryIPsParams {
    name?: string;
    fingerprint?: string;
    label_selector?: string;
    sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc";
    page?: number;
    per_page?: number;
}
interface CreatePrimaryIPParams {
    name: string;
    type: "ipv4" | "ipv6";
    assignee_type: string;
    assignee_id?: number | null;
    auto_delete?: boolean;
    datacenter?: string;
    labels?: Record<string, string>;
}
interface UpdatePrimaryIPParams {
    name?: string;
    labels?: Record<string, string>;
    auto_delete?: boolean;
}
/**
 * Primary Ips API
 *
 * Primary IPs help you to create more flexible networking setups.
 * https://docs.hetzner.cloud/#primary-ips
 *
 */
declare class PrimaryIP extends BaseAPI {
    /**
     * List all primary ips with optional filtering and pagination
     * @param params Optional parameters for filtering and pagination
     */
    getAll(params?: ListPrimaryIPsParams): Promise<{
        success: true;
        response: ListPrimaryIPResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get a primary ip by id
     * @param id The id of the primary ip
     */
    get(id: number): Promise<{
        success: true;
        response: {
            primary_ip: PrimaryIP$1;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Create a primary ip
     * @param params The parameters for creating the primary ip
     */
    create(params: CreatePrimaryIPParams): Promise<{
        success: true;
        response: CreatePrimaryIPResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Update a primary ip
     * @param id The id of the primary ip
     * @param params The parameters for updating the primary ip
     */
    update(id: number, params: UpdatePrimaryIPParams): Promise<{
        success: true;
        response: {
            primary_ip: PrimaryIP$1;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Delete a primary ip
     * @param id The id of the primary ip
     */
    delete(id: number): Promise<{
        success: true;
        response: Action;
    } | {
        success: false;
        response: APIError;
    }>;
}

interface ListPlacementGroupsResponse {
    placement_groups: PlacementGroup$2[];
    meta: Meta;
}
interface PlacementGroup$2 {
    id: number;
    name: string;
    labels: Record<string, string>;
    type: "spread";
    created: string;
    servers: number[];
}

interface ListPlacementGroupsParams {
    name?: string;
    label_selector?: string;
    sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc" | "created" | "created:asc" | "created:desc";
    type?: "spread";
    page?: number;
    per_page?: number;
}
interface CreatePlacementGroupParams {
    name: string;
    type: "spread";
    labels?: Record<string, string>;
}
interface UpdatePlacementGroupParams {
    name?: string;
    labels?: Record<string, string>;
}
/**
 * Placement Groups API
 *
 * Placement groups help you to manage your servers in a specific datacenter.
 * https://docs.hetzner.cloud/#placement-groups
 */
declare class PlacementGroup$1 extends BaseAPI {
    /**
     * List all placement groups with optional filtering and pagination
     * @param params Optional parameters for filtering and pagination
     */
    getAll(params?: ListPlacementGroupsParams): Promise<{
        success: true;
        response: ListPlacementGroupsResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get a placement group by id
     * @param id The id of the placement group
     */
    get(id: number): Promise<{
        success: true;
        response: {
            placement_group: PlacementGroup$2;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Create a placement group
     * @param params The parameters for creating the placement group
     */
    create(params: CreatePlacementGroupParams): Promise<{
        success: true;
        response: {
            placement_group: PlacementGroup$2;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Update a placement group
     * @param id The id of the placement group
     * @param params The parameters for updating the placement group
     */
    update(id: number, params: UpdatePlacementGroupParams): Promise<{
        success: true;
        response: {
            placement_group: PlacementGroup$2;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Delete a placement group
     * @param id The id of the placement group
     */
    delete(id: number): Promise<{
        success: true;
        response: Action;
    } | {
        success: false;
        response: APIError;
    }>;
}

interface ListIsosResponse {
    isos: Isos$1[];
    meta: Meta;
}
interface Isos$1 {
    id: number;
    name: string | null;
    description: string;
    type: "public" | "private" | null;
    deprecation?: {
        unavailable_after: string;
        announced: string;
    } | null;
    architecture: "x86" | "arm64" | null;
}

interface ListIsosParams {
    name?: string;
    include_architecture_wildcard?: boolean;
    architecture?: "x86" | "arm64";
    page?: number;
    per_page?: number;
}
/**
 * Isos API
 *
 * Isos are used to create servers.
 * https://docs.hetzner.cloud/#isos
 */
declare class Isos extends BaseAPI {
    /**
     * List all isos with optional filtering and pagination
     * @param params Optional parameters for filtering and pagination
     */
    getAll(params?: ListIsosParams): Promise<{
        success: true;
        response: ListIsosResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get an iso by id
     * @param id The id of the iso
     */
    get(id: number): Promise<{
        success: true;
        response: {
            iso: Isos;
        };
    } | {
        success: false;
        response: APIError;
    }>;
}

type MetricTypes = "cpu" | "disk" | "network";
interface Metrics {
    start: string;
    end: string;
    step: number;
    time_series: {
        [key: string]: {
            values: Array<[number | string]>;
        };
    };
}
interface IPv6DNSPtr {
    ip: string;
    dns_ptr: string;
}
interface IPv4 {
    id: number;
    ip: string;
    blocked: boolean;
    dns_ptr: string;
}
interface IPv6 {
    id: number;
    ip: string;
    blocked: boolean;
    dns_ptr: IPv6DNSPtr[];
}
interface PublicNetFirewall {
    id: number;
    status: string;
}
interface PublicNet {
    ipv4: IPv4;
    ipv6: IPv6;
    floating_ips: number[];
    firewalls: PublicNetFirewall[];
}
interface PrivateNet {
    network: number;
    ip: string;
    alias_ips: string[];
    mac_address: string;
}
interface Price$1 {
    net: string;
    gross: string;
}
interface ServerTypePrice {
    location: string;
    price_hourly: Price$1;
    price_monthly: Price$1;
    included_traffic?: number;
    price_per_tb_traffic?: Price$1;
}
interface DeprecationInfo$1 {
    unavailable_after: string;
    announced: string;
}
interface ServerType$1 {
    id: number;
    name: string;
    description: string;
    cores: number;
    memory: number;
    disk: number;
    deprecated: boolean;
    prices: ServerTypePrice[];
    storage_type: string;
    cpu_type: string;
    architecture: string;
    deprecation: DeprecationInfo$1 | null;
}
interface DatacenterLocation {
    id: number;
    name: string;
    description: string;
    country: string;
    city: string;
    latitude: number;
    longitude: number;
    network_zone: string;
}
interface ServerTypesSupportedAvailable {
    supported: number[];
    available: number[];
    available_for_migration: number[];
}
interface Datacenter {
    id: number;
    name: string;
    description: string;
    location: DatacenterLocation;
    server_types: ServerTypesSupportedAvailable;
}
interface ImageCreatedFrom {
    id: number;
    name: string;
}
interface ImageProtection {
    delete: boolean;
}
interface Image {
    id: number;
    type: string;
    status: string;
    name: string;
    description: string;
    image_size: number | null;
    disk_size: number;
    created: string;
    created_from: ImageCreatedFrom | null;
    bound_to: number | null;
    os_flavor: string;
    os_version: string | null;
    rapid_deploy: boolean;
    protection: ImageProtection;
    deprecated: string | null;
    deleted: string | null;
    labels: Record<string, string>;
    architecture: string;
}
interface ISO {
    id: number;
    name: string;
    description: string;
    type: string;
    deprecation: DeprecationInfo$1 | null;
    architecture: string | null;
}
interface ServerProtection {
    delete: boolean;
    rebuild: boolean;
}
interface PlacementGroup {
    id: number;
    name: string;
    labels: Record<string, string>;
    type: string;
    created: string;
    servers: number[];
}
interface Server {
    id: number;
    name: string;
    status: string;
    created: string;
    public_net: PublicNet;
    private_net: PrivateNet[];
    server_type: ServerType$1;
    datacenter: Datacenter;
    image: Image | null;
    iso: ISO | null;
    rescue_enabled: boolean;
    locked: boolean;
    backup_window: string | null;
    outgoing_traffic: number | null;
    ingoing_traffic: number | null;
    included_traffic: number | null;
    protection: ServerProtection;
    labels: Record<string, string>;
    volumes: number[] | null;
    load_balancers: number[] | null;
    primary_disk_size: number;
    placement_group: PlacementGroup | null;
}
interface ServersResponse {
    servers: Server[];
    meta?: Meta;
}

interface Price {
    location: string;
    price_hourly: {
        net: string;
        gross: string;
    };
    price_monthly: {
        net: string;
        gross: string;
    };
    included_traffic: number;
    price_per_tb_traffic: {
        net: string;
        gross: string;
    };
}
interface DeprecationInfo {
    unavailable_after: string;
    announced: string;
}
interface ServerType {
    id: number;
    name: string;
    description: string;
    cores: number;
    memory: number;
    disk: number;
    deprecated: boolean;
    prices: Price[];
    storage_type: "local" | "network";
    cpu_type: "shared" | "dedicated";
    architecture: "x86" | "arm64";
    deprecation: DeprecationInfo | null;
}
interface ServerTypesResponse {
    server_types: ServerType[];
    meta: Meta;
}

interface ListServerTypesParams {
    name?: string;
    page?: number;
    per_page?: number;
}
declare class ServerTypes extends BaseAPI {
    /**
     * List all servers with optional filtering and pagination
     * @param params Optional parameters for filtering and pagination
     */
    getAll(params?: ListServerTypesParams): Promise<{
        success: true;
        response: ServerTypesResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    get(id: number): Promise<{
        success: true;
        response: {
            server_type: ServerType;
        };
    } | {
        success: false;
        response: APIError;
    }>;
}

interface ServerActionsResponse {
    actions: BaseAction[];
    meta?: Meta;
}
interface ListServerActionsParams {
    sort?: "id" | "id:asc" | "id:desc" | "command" | "command:asc" | "command:desc" | "status" | "status:asc" | "status:desc" | "progress" | "progress:asc" | "progress:desc" | "started" | "started:asc" | "started:desc" | "finished" | "finished:asc" | "finished:desc";
    status?: "available" | "creating";
    name?: string;
    label_selector?: string;
    page?: number;
    per_page?: number;
}

/**
 * Server Actions API
 *
 * Actions are the individual operations that can be performed on a server.
 * https://docs.hetzner.cloud/#server-actions
 */
declare class ServerActions extends BaseAPI {
    /**
     * List all actions for Server (globally, not for a specific volume)
     * @param params Optional parameters for filtering and pagination
     */
    getAll(params?: ListServerActionsParams): Promise<{
        success: true;
        response: ServerActionsResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get a specific action by ID
     * @param id The ID of the action to get
     */
    get(id: number): Promise<{
        success: true;
        response: {
            action: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * List all actions for a server
     * @param serverId The ID of the server to list actions for
     * @param params Optional parameters for filtering and pagination
     */
    getAllByServer(serverId: number, params?: ListServerActionsParams): Promise<{
        success: true;
        response: ServerActionsResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Add a server to a placement group
     * @param serverId The ID of the server to add to the placement group
     * @param placementGroupId The ID of the placement group to add the server to
     */
    addServerToPlacementGroup(serverId: number, placementGroupId: number): Promise<{
        success: true;
        response: {
            action: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Attach an ISO to a server
     * @param serverId The ID of the server to attach the ISO to
     * @param iso The ID or name of ISO to attach to the Server
     */
    attachIsoToServer(serverId: number, iso: string): Promise<{
        success: true;
        response: {
            action: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Attach a server to a network
     * @param serverId The ID of the server to attach to the network
     * @param networkId The ID of the network to attach the server to
     * @param ip Optional IP to assign to the server
     * @param aliasIps Optional array of alias IPs to assign to the server
     */
    attachServerToNetwork(serverId: number, networkId: number, ip?: string, aliasIps?: string[]): Promise<{
        success: true;
        response: {
            action: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Change alias IP of network
     * @param serverId The ID of the server to change the alias IP of
     * @param networkId The ID of the network to change the alias IP of
     * @param aliasIps The new alias IPs to assign to the server
     */
    changeAliasIpOfNetwork(serverId: number, networkId: number, aliasIps: string[]): Promise<{
        success: true;
        response: {
            action: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Change reverse DNS entry for this Server
     * @param serverId The ID of the server to change the reverse DNS entry of
     * @param ip The IP to change the reverse DNS entry of
     * @param dnsPtr The new reverse DNS entry to assign to the server
     */
    changeReverseDnsEntryForServer(serverId: number, ip: string, dnsPtr: string | null): Promise<{
        success: true;
        response: {
            action: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Change Server Protection
     * @param serverId The ID of the server to change the protection of
     * @param protect Whether to protect the server or not
     * @param deleteProtection Whether to delete the protection of the server or not
     */
    changeServerProtection(serverId: number, protect?: boolean, rebuild?: boolean): Promise<{
        success: true;
        response: {
            action: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Change the Type of a Server
     * @param serverId The ID of the server to change the type of
     * @param serverType The new server type to change to
     * @param upgradeDisk Whether to upgrade the disk during type change
     */
    changeServerType(serverId: number, serverType: string, upgradeDisk: boolean): Promise<{
        success: true;
        response: {
            action: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Create Image from Server
     * @param serverId The ID of the server to create an image from
     * @param name The name of the image to create
     * @param description The description of the image to create
     */
    createImageFromServer(serverId: number, type?: "snapshot" | "backup", description?: string, labels?: Record<string, string>): Promise<{
        success: true;
        response: {
            action: BaseAction;
            image: Image$1;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Detach a server from a network
     * @param serverId The ID of the server to detach from the network
     * @param networkId The ID of the network to detach the server from
     */
    detachServerFromNetwork(serverId: number, networkId: number): Promise<{
        success: true;
        response: {
            action: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Detach an ISO from a Server
     * @param serverId The ID of the server to detach the ISO from
     * @param isoId The ID of the ISO to detach from the server
     */
    detachIsoFromServer(serverId: number): Promise<{
        success: true;
        response: {
            action: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Disable Backups for a Server
     * @param serverId The ID of the server to disable backups for
     */
    disableBackupsForServer(serverId: number): Promise<{
        success: true;
        response: {
            action: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Disable Rescue Mode for a Server
     * @param serverId The ID of the server to disable rescue mode for
     */
    disableRescueModeForServer(serverId: number): Promise<{
        success: true;
        response: {
            action: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Enables and configures the automatic daily backup option
     * @param serverId The ID of the server to enable and configure backups for
     */
    enableBackupsForServer(serverId: number): Promise<{
        success: true;
        response: {
            action: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Enable Rescue Mode for a Server
     * @param serverId The ID of the server to enable rescue mode for
     */
    enableRescueModeForServer(serverId: number, type?: "linux64", sshKeys?: number[]): Promise<{
        success: true;
        response: {
            action: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Power off a server
     * @param serverId The ID of the server to power off
     */
    powerOff(serverId: number): Promise<{
        success: true;
        response: {
            action: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Power on a server
     * @param serverId The ID of the server to power on
     */
    powerOn(serverId: number): Promise<{
        success: true;
        response: {
            action: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Soft reboot a server
     * @param serverId The ID of the server to soft reboot
     */
    softReboot(serverId: number): Promise<{
        success: true;
        response: {
            action: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Rebuild a Server from an Image
     * @param serverId The ID of the server to rebuild
     * @param image The ID or name of the image to rebuild the server from
     */
    rebuildFromImage(serverId: number, image: string): Promise<{
        success: true;
        response: {
            action: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Remove from placement group
     * @param serverId The ID of the server to remove from the placement group
     */
    removeFromPlacementGroup(serverId: number): Promise<{
        success: true;
        response: {
            action: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Request Console for a Server
     * @param serverId The ID of the server to request the console for
     */
    requestConsoleForServer(serverId: number): Promise<{
        success: true;
        response: {
            action: BaseAction;
            wss_url: string;
            password: string;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Reset a server
     * @param serverId The ID of the server to reset
     */
    resetServer(serverId: number): Promise<{
        success: true;
        response: {
            action: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Reset Root Password
     * @param serverId The ID of the server to reset the root password for
     */
    resetServerPassword(serverId: number): Promise<{
        success: true;
        response: {
            action: BaseAction;
            root_password: string;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Shutdown a server
     * @param serverId The ID of the server to shutdown
     */
    shutdownServer(serverId: number): Promise<{
        success: true;
        response: {
            action: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    /**
     * Get an action for a server
     * @param serverId The ID of the server to get the action for
     * @param actionId The ID of the action to get
     */
    getActionForServer(serverId: number, actionId: number): Promise<{
        success: true;
        response: {
            action: BaseAction;
        };
    } | {
        success: false;
        response: APIError;
    }>;
}

interface ListServersParams {
    name?: string;
    fingerprint?: string;
    label_selector?: string;
    sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc";
    page?: number;
    per_page?: number;
}
interface CreateServerParams {
    name: string;
    server_type: string;
    image: string;
    location?: string;
    datacenter?: string;
    start_after_create?: boolean;
    placement_group?: string;
    ssh_keys?: string[];
    volumes?: number[];
    networks?: number[];
    firewall?: [{
        id: number;
    }];
    user_data?: string;
    labels?: Record<string, string>;
    automount?: boolean;
    public_net?: {
        enable_ipv4?: boolean;
        enable_ipv6?: boolean;
        ipv4?: string;
        ipv6?: string;
    };
}
declare class Servers extends BaseAPI {
    private _primaryIP;
    private _images;
    private _placementGroups;
    private _isos;
    private _serverTypes;
    private _actions;
    /**
     * List all servers with optional filtering and pagination
     * @param params Optional parameters for filtering and pagination
     */
    get primaryIP(): PrimaryIP;
    get images(): Images;
    get placementGroups(): PlacementGroup$1;
    get isos(): Isos;
    get serverTypes(): ServerTypes;
    get actions(): ServerActions;
    getAll(params?: ListServersParams): Promise<{
        success: true;
        response: ServersResponse;
    } | {
        success: false;
        response: APIError;
    }>;
    get(id: number): Promise<{
        success: true;
        response: {
            server: Server;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    create(params: CreateServerParams): Promise<{
        success: true;
        response: {
            server: Server;
            action: Action;
        };
    } | {
        success: false;
        response: APIError;
    }>;
    delete(id: number): Promise<{
        success: true;
        response: Action;
    } | {
        success: false;
        response: APIError;
    }>;
    getMetrics(id: number, type: MetricTypes, start: string, end: string, step?: number): Promise<{
        success: true;
        response: {
            metrics: Metrics;
        };
    } | {
        success: false;
        response: APIError;
    }>;
}

declare class HetznerAPI extends BaseAPI {
    get actions(): Actions;
    get billing(): Billing;
    get certificates(): Certificates;
    get datacenters(): Datacenters;
    get firewalls(): Firewalls;
    get floatingIps(): FloatingIPs;
    get loadBalancers(): LoadBalancers;
    get locations(): Locations;
    get networks(): Networks;
    get servers(): Servers;
    get sshKeys(): SSHKeys;
    get volumes(): Volumes;
}

export { HetznerAPI };
