import { type ApiVersion } from "../config/index.js"; import { type GetCredentialsOptions, type MeritCredentials } from "./auth.js"; export interface MeritCallOptions { /** Override the default API version for this endpoint ("v1" | "v2"). */ version?: ApiVersion; /** HTTP method. Defaults to POST (Merit takes a JSON body even for queries). */ method?: "GET" | "POST"; /** Request payload. Serialized to compact JSON, signed, and sent verbatim. */ body?: unknown; } export declare class MeritClient { private readonly creds; private readonly baseUrl; constructor(creds: MeritCredentials, baseUrl?: string); /** * Call a Merit endpoint by its bare path (e.g. "getinvoices"). Returns the * parsed JSON response, the raw string for non-JSON bodies, or null for an * empty body. Throws RateLimitError / ApiError on failure. */ call(apiPath: string, opts?: MeritCallOptions): Promise; } /** Resolve credentials and return a process-cached MeritClient. */ export declare function getClient(opts?: GetCredentialsOptions): Promise; /** * Resolve Merit Palk credentials and return a process-cached MeritClient pointed * at the Palk host. Palk is v1-only and Estonia-only, so version/localization * are fixed; the signing scheme is identical to Aktiva, so MeritClient is reused. */ export declare function getPalkClient(opts?: GetCredentialsOptions): Promise;