import { QueryParams } from "./get-query-params.js"; import { APIResponse, ERPApiConfig } from "../types.js"; /** * RestAPIService is a utility class for making REST API requests to an ERP system. * Provides methods for GET, PATCH, and POST requests, with built-in pagination support. * * @param config - Configuration for the ERP API connection * @param retryAttempts - Optional number of retry attempts for failed requests. Defaults to 0 (no retries) * @param paginationLimit - Optional default limit for paginated requests. Defaults to 100 items per page * * NOTE: assumes bearertoken-based authentication. */ export declare class RestAPIService { private client; private config; private paginationLimit; constructor(config: ERPApiConfig, retryAttempts?: number, paginationLimit?: number, timeoutSeconds?: number); private getHeaders; private buildQueryParams; /** * Builds pagination metadata for API responses * @param limit - Optional limit for this specific request. If not provided, uses the service's default pagination limit * @param nextPage - Optional next page token * @param previousPage - Optional previous page token * @param dataLength - Number of items in the current response * @param totalCount - Total number of items available * @returns Pagination metadata including count, limit, and page tokens */ private buildPagination; private buildUrl; get(endpoint: string, query?: QueryParams): Promise>; patch(endpoint: string, id: string, data: Partial): Promise>; post(endpoint: string, data: TRequest): Promise>; /** * Cleanup all HTTP connections and resources * Call this when the service is no longer needed */ destroy(): Promise; } //# sourceMappingURL=rest-api-service.d.ts.map