import { NotFrontDataSource, NotFrontDataSourceRest } from '../types/componentsCore.type'; type NotFrontHttpMethod = NotFrontDataSourceRest['method']; /** * Normalizes HTTP method strings from backend JSON (often uppercase, e.g. * `"POST"`) to the lowercase literals consumed by the axios helpers. * Unknown values fall back to `"get"` (same as the previous switch default). */ export declare const normalizeHttpMethod: (method: string | undefined) => NotFrontHttpMethod; /** * Constructs a complete URL with query parameters for REST data sources. * Handles pagination, search, and additional params internally. * * @param dataSource - The REST data source configuration. * @param page - The current pagination page number. * @param search - Optional search term to include as a query parameter. * @param pageSize - Optional page size to include as a query parameter. * @returns {string} The complete URL with all query parameters combined. */ export declare const buildQueryParams: (dataSource: NotFrontDataSourceRest, page: number, search?: string, pageSize?: number) => string; /** * Utility to build a normalized NotFrontDataSource object for REST or GraphQL requests. * * This function abstracts the construction of the request payload for dynamic data sources, * supporting both REST and GraphQL APIs. It handles pagination, search, and parameter merging, * ensuring the resulting object is ready to be consumed by fetchDataSource or similar data-fetching utilities. * * * @param dataSource - The original dataSource configuration (REST or GraphQL) * @param page - The page number for pagination (default: 1) * @param search - Optional search string (used for filtering, e.g., in selects) * @param cursorPayload - Optional cursor object built from the previous response; merged into the REST request `data` after the flow's original `data`. * @param pageSize - Optional page size sent with pagination requests. * @returns A NotFrontDataSource object ready for fetchDataSource * @throws If the dataSource type is not supported */ export declare const buildRequestDataSource: (dataSource: NotFrontDataSource, page: number, search?: string, cursorPayload?: Record | null, pageSize?: number) => NotFrontDataSource; export {};