import type { Readable } from "node:stream"; import { AccessKey, AuthToken } from "../../credentials"; type HttpMethod = "GET" | "POST" | "PUT" | "DELETE"; /** @internal */ export type BaseURL = { secure: boolean; hostname: string; port: number; }; /** @internal */ export type ClientResponse = { statusCode: number; body: any; headers: Record; }; export type BrowserMultiPartFile = File; export type NodeMultiPartFile = Readable | string; export type MultiPartFile = BrowserMultiPartFile | NodeMultiPartFile; /** @internal */ export declare abstract class LaraClient { private readonly crypto; private readonly extraHeaders; private readonly accessKey?; private authToken?; protected token?: string; protected refreshToken?: string; private authenticationPromise?; private refreshPromise?; protected constructor(auth: AccessKey | AuthToken); setExtraHeader(name: string, value: string): void; get(path: string, queryParams?: Record, headers?: Record): Promise; delete(path: string, queryParams?: Record, body?: Record, headers?: Record): Promise; post(path: string, body?: Record, files?: Record, headers?: Record, streamResponse?: boolean): Promise; postAndGetStream(path: string, body?: Record, files?: Record, headers?: Record): AsyncGenerator; put(path: string, body?: Record, files?: Record, headers?: Record): Promise; protected request(method: HttpMethod, path: string, body?: Record, files?: Record, headers?: Record, retryCount?: number, streamResponse?: boolean): Promise; protected requestStream(method: HttpMethod, path: string, body?: Record, files?: Record, headers?: Record, retryCount?: number): AsyncGenerator; private isTokenExpired; private ensureAuthenticated; private performAuthentication; private refreshOrReauthenticate; private doRefreshOrReauthenticate; private refreshTokens; private authenticateWithAccessKey; private buildPathWithQuery; private buildRequestHeaders; private buildRequestBody; private filterNullish; private isSuccessResponse; private handleAuthResponse; private createApiError; private sign; protected abstract send(method: HttpMethod, path: string, headers: Record, body?: Record, stream?: boolean): Promise; protected abstract sendAndGetStream(method: HttpMethod, path: string, headers: Record, body?: Record): AsyncGenerator; protected abstract wrapMultiPartFile(file: MultiPartFile): any; } export {};