import { t as Organization } from "./organization.types-BSBYM52i.js";
import { t as ResponseWithSession } from "./sessionAuth.middleware-WaGE5Tk0.js";
import { t as FiltersAndPagination } from "./getFiltersAndPaginationFromBody--L3RVBYl.js";
import { RootFilterQuery } from "mongoose";
import { FastifyRequest } from "fastify";
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 or Fastify request object.
 * @param res - Express or Fastify response object (optional, for Express compatibility).
 * @returns Object containing filters, page, pageSize, and getNumberOfPages functions.
 */
declare const getOrganizationFiltersAndPagination: (req: Request<FiltersAndPagination<OrganizationFiltersParams>> | FastifyRequest<{
  Querystring: FiltersAndPagination<OrganizationFiltersParams>;
}>, res?: ResponseWithSession) => {
  page: number;
  skip: number;
  pageSize: number;
  getNumberOfPages: (totalItems: number) => number;
  filters: RootFilterQuery<Organization>;
  sortOptions: Record<string, 1 | -1>;
};
//#endregion
export { OrganizationFiltersParams as n, getOrganizationFiltersAndPagination as r, OrganizationFilters as t };
//# sourceMappingURL=getOrganizationFiltersAndPagination-BF9cDxKP.d.ts.map