import { HetznerCloudClient } from "./client.js"; export interface CloudActionOptions { json?: boolean; token?: string; yes?: boolean; } /** * Parse a comma-separated "key=value,key2=value2" string into a labels object. */ export declare function parseLabels(val: string): Record; /** * Read and parse a JSON file, returning the parsed content. */ export declare function readJsonFile(path: string): T; /** * Resolve a numeric ID string or a resource name to a numeric ID. * If the input is purely digits, returns it directly without any API call. * Otherwise, calls the resolver to look up the name and expects exactly one match. */ export declare function resolveIdOrName(idOrName: string, resourceType: string, resolver: (name: string) => Promise<{ id: number; name: string | null; }[]>): Promise; /** * Wrap a cloud API action with token resolution and error handling. */ export declare function cloudAction(fn: (client: HetznerCloudClient, ...args: T) => Promise): (...args: [...T, CloudActionOptions]) => Promise;