import { SDKConfig } from "./Config"; /** * HTTP client aligned with Adhere backend contract. * * Two auth modes: * - request() → Authorization: Bearer (session creation) * - sessionRequest() → x-access-token: (all other endpoints) * - uploadWithSession() → multipart + x-access-token (file uploads) */ export declare class HttpClient { private baseUrl; private apiKey; private timeout; private sessionToken; constructor(config: SDKConfig); setSessionToken(token: string): void; /** * API-key authenticated request (used for session creation only). * Header: Authorization: Bearer */ request(method: string, path: string, body?: unknown): Promise; /** * Session-token authenticated request (used for all endpoints after session creation). * Header: x-access-token: */ sessionRequest(method: string, path: string, body?: unknown): Promise; /** * Multipart file upload with session-token auth. * Header: x-access-token: * NOTE: Do NOT set Content-Type — browser sets it with boundary automatically. */ uploadWithSession(path: string, formData: FormData): Promise; /** * GET for endpoints that work without auth (status polling still works after * session revoke) but return additional fields when a live session token is * presented — e.g. sdk-result/ only includes OCR/PII fields for the session * that owns the entry. Attaches the token opportunistically when we still * have one; the backend falls back to the public (non-PII) response if it's * missing, invalid, or already revoked. */ publicGet(path: string): Promise; /** * Legacy upload with API key (kept for backward compatibility if needed). */ upload(path: string, formData: FormData): Promise; private requireToken; private _fetch; } //# sourceMappingURL=HttpClient.d.ts.map