import { CoreResponse } from '../core_node/index.js'; import type { HttpMethod, ResponseType, FormField } from './types/common.js'; import { type TPaginationConfig, type OffsetPaginationConfig, type CursorPaginationConfig, type CustomPaginationConfig, type TPaginatedResponse } from './types/pagination.js'; /** * Modern fluent client for making HTTP requests */ export declare class SmartRequestClient { private _url; private _options; private _retries; private _queryParams; private _paginationConfig?; /** * Create a new SmartRequestClient instance */ static create(): SmartRequestClient; /** * Set the URL for the request */ url(url: string): this; /** * Set the HTTP method */ method(method: HttpMethod): this; /** * Set JSON body for the request */ json(data: any): this; /** * Set form data for the request */ formData(data: FormField[]): this; /** * Set request timeout in milliseconds */ timeout(ms: number): this; /** * Set number of retry attempts */ retry(count: number): this; /** * Set HTTP headers */ headers(headers: Record): this; /** * Set a single HTTP header */ header(name: string, value: string): this; /** * Set query parameters */ query(params: Record): this; /** * Set the Accept header to indicate what content type is expected */ accept(type: ResponseType): this; /** * Configure pagination for requests */ pagination(config: TPaginationConfig): this; /** * Configure offset-based pagination (page & limit) */ withOffsetPagination(config?: Omit): this; /** * Configure cursor-based pagination */ withCursorPagination(config?: Omit): this; /** * Configure Link header-based pagination */ withLinkPagination(): this; /** * Configure custom pagination */ withCustomPagination(config: Omit): this; /** * Make a GET request */ get(): Promise>; /** * Make a POST request */ post(): Promise>; /** * Make a PUT request */ put(): Promise>; /** * Make a DELETE request */ delete(): Promise>; /** * Make a PATCH request */ patch(): Promise>; /** * Get paginated response */ getPaginated(): Promise>; /** * Get all pages at once (use with caution for large datasets) */ getAllPages(): Promise; /** * Execute the HTTP request */ private execute; }