import { Organization } from "../../types/organization.types.js";
import { ResponseWithSession } from "../../middlewares/sessionAuth.middleware.js";
import { FiltersAndPagination } from "./getFiltersAndPaginationFromBody.js";
import * as mongoose97 from "mongoose";
import { RootFilterQuery } from "mongoose";
import { Request } from "express";

//#region src/utils/filtersAndPagination/getOrganizationFiltersAndPagination.d.ts
type OrganizationFiltersParams = {
  /**
   * Comma separated list of ids
   *
   * ```
   * GET /organizations?ids=5f8d9f1d8a1e4f0e8c0c,5f8d9f1d8a1e4f0e8d1
   * -> ids: "5f8d9f1d8a1e4f0e8c0c,5f8d9f1d8a1e4f0e8d1"
   * ```
   */
  ids?: string | string[];
  name?: string;
  search?: string;
  membersIds?: string[];
  sortBy?: string;
  sortOrder?: string;
  /**
   * For admin users, if true, will fetch all organizations without filtering by members
   */
  fetchAll?: 'true' | 'false';
};
type OrganizationFilters = RootFilterQuery<Organization>;
/**
 * Extracts filters and pagination information from the request body.
 * @param req - Express request object.
 * @returns Object containing filters, page, pageSize, and getNumberOfPages functions.
 */
declare const getOrganizationFiltersAndPagination: (req: Request<FiltersAndPagination<OrganizationFiltersParams>>, res: ResponseWithSession) => {
  page: number;
  skip: number;
  pageSize: number;
  getNumberOfPages: (totalItems: number) => number;
  filters: mongoose97.FilterQuery<Organization>;
  sortOptions: Record<string, 1 | -1>;
};
//#endregion
export { OrganizationFilters, OrganizationFiltersParams, getOrganizationFiltersAndPagination };
//# sourceMappingURL=getOrganizationFiltersAndPagination.d.ts.map