import { ResponseWithSession } from "../../middlewares/sessionAuth.middleware.js";
import { Discussion } from "../../types/discussion.types.js";
import { FiltersAndPagination } from "./getFiltersAndPaginationFromBody.js";
import { RootFilterQuery } from "mongoose";
import { FastifyRequest } from "fastify";
import { Request } from "express";

//#region src/utils/filtersAndPagination/getDiscussionFiltersAndPagination.d.ts
type DiscussionFiltersParams = {
  ids?: string | string[];
  userId?: string;
  userIds?: string[];
  discussionId?: string;
  search?: string;
  isArchived?: 'true' | 'false';
  sortBy?: string;
  sortOrder?: string;
  /**
   * For admin users only: if true, will not restrict to current user
   */
  fetchAll?: 'true' | 'false';
};
type DiscussionFilters = RootFilterQuery<Discussion>;
/**
 * Extracts filters and pagination information for discussions.
 * Enforces that non-admin users can only see their own discussions.
 */
declare const getDiscussionFiltersAndPagination: (req: Request<FiltersAndPagination<DiscussionFiltersParams>> | FastifyRequest<{
  Querystring: FiltersAndPagination<DiscussionFiltersParams>;
}>, res?: ResponseWithSession) => {
  page: number;
  skip: number;
  pageSize: number;
  getNumberOfPages: (totalItems: number) => number;
  filters: RootFilterQuery<Discussion>;
  sortOptions: Record<string, 1 | -1>;
};
//#endregion
export { DiscussionFilters, DiscussionFiltersParams, getDiscussionFiltersAndPagination };
//# sourceMappingURL=getDiscussionFiltersAndPagination.d.ts.map