import type { ApiError } from './types'; /** * Error thrown when the AgentCall API returns a non-2xx response. * * @example * ```typescript * try { * await client.numbers.provision({ type: 'tollfree' }) * } catch (err) { * if (err instanceof AgentCallError) { * console.error(err.code) // 'plan_limit' * console.error(err.statusCode) // 403 * } * } * ``` */ export declare class AgentCallError extends Error { /** Machine-readable error code (e.g. `plan_limit_voice_ai`, `not_found`, `rate_limited`). */ code: string; /** HTTP status code from the API response. */ statusCode: number; /** * On plan-gate errors: absolute URL where a human can upgrade to Pro. * Undefined on every other error. */ upgradeUrl?: string; /** * On plan-gate errors: the MCP tool (`upgrade_to_pro`) an agent can run to * get a checkout link. The SDK equivalent is `client.account.upgrade()`. */ upgradeToolName?: string; constructor(error: ApiError); } /** @internal Send an authenticated HTTP request to the AgentCall API with automatic retry. */ export declare function request(baseUrl: string, apiKey: string, method: string, path: string, body?: unknown, timeout?: number): Promise; //# sourceMappingURL=http.d.ts.map