import { ObjectId } from "mongoose";
import { FastifyRequest } from "fastify";
import { Request } from "express";

//#region src/utils/filtersAndPagination/getFiltersAndPaginationFromBody.d.ts
type Filters = Record<string, string | string[] | ObjectId | ObjectId[]>;
type FiltersAndPagination<T extends Filters> = ({
  page?: string | number;
  pageSize?: string | number;
} & T) | undefined;
type FiltersAndPaginationResult<T extends Filters> = {
  filters: T;
  page: number;
  skip: number;
  pageSize: number;
  getNumberOfPages: (totalItems: number) => number;
};
type RequestLike<T extends Filters> = Request<FiltersAndPagination<T>> | FastifyRequest<{
  Querystring: FiltersAndPagination<T>;
}>;
/**
 * Extracts filters and pagination information from the request body.
 * @param req - Express or Fastify request object.
 * @returns Object containing filters, page, pageSize, and getNumberOfPages functions.
 */
declare const getFiltersAndPaginationFromBody: <T extends Filters>(req: RequestLike<T>) => FiltersAndPaginationResult<T>;
//#endregion
export { FiltersAndPagination, FiltersAndPaginationResult, getFiltersAndPaginationFromBody };
//# sourceMappingURL=getFiltersAndPaginationFromBody.d.ts.map