import { n as User, r as UserAPI } from "./user.types-BcSU0sts.js";
import { t as ResponseWithSession } from "./sessionAuth.middleware-WaGE5Tk0.js";
import { t as FiltersAndPagination } from "./getFiltersAndPaginationFromBody--L3RVBYl.js";
import { n as ResponseData, t as PaginatedResponse } from "./responseData-U7Jr-usN.js";
import { RootFilterQuery } from "mongoose";
import { FastifyReply, FastifyRequest } from "fastify";
import { Request } from "express";

//#region src/utils/filtersAndPagination/getUserFiltersAndPagination.d.ts
type UserFiltersParam = {
  ids?: string | string[];
  firstName?: string;
  lastName?: string;
  email?: string;
  emailVerified?: string;
  role?: string;
  search?: string;
  sortBy?: string;
  sortOrder?: string;
  /**
   * For admin users, if true, will fetch all users without filtering by organization
   */
  fetchAll?: 'true' | 'false';
};
type UserFilters = RootFilterQuery<User>;
/**
 * 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 getUserFiltersAndPagination: (req: Request<FiltersAndPagination<UserFiltersParam>> | FastifyRequest<{
  Querystring: FiltersAndPagination<UserFiltersParam>;
}>, res?: ResponseWithSession<GetUsersResult>) => {
  page: number;
  skip: number;
  pageSize: number;
  getNumberOfPages: (totalItems: number) => number;
  filters: {};
  sortOptions: Record<string, 1 | -1>;
};
//#endregion
//#region src/controllers/user.controller.d.ts
type CreateUserBody = {
  email: string;
  password?: string;
};
type CreateUserResult = ResponseData<UserAPI>;
/**
 * Creates a new user.
 */
declare const createUser: (request: FastifyRequest<{
  Body: User;
}>, reply: FastifyReply) => Promise<void>;
type GetUsersParams = FiltersAndPagination<UserFiltersParam>;
type GetUsersResult = PaginatedResponse<UserAPI>;
/**
 * Retrieves a list of users based on filters and pagination.
 */
declare const getUsers: (request: FastifyRequest<{
  Querystring: GetUsersParams;
}>, reply: FastifyReply) => Promise<void>;
type GetUserByIdParams = {
  userId: UserAPI['id'];
};
type GetUserByIdResult = ResponseData<UserAPI>;
declare const getUserById: (request: FastifyRequest<{
  Params: GetUserByIdParams;
}>, reply: FastifyReply) => Promise<void>;
type GetUserByEmailParams = {
  email: string;
};
type GetUserByEmailResult = ResponseData<UserAPI>;
declare const getUserByEmail: (request: FastifyRequest<{
  Params: GetUserByEmailParams;
}>, reply: FastifyReply) => Promise<void>;
type UpdateUserBody = Partial<UserAPI>;
type UpdateUserResult = ResponseData<UserAPI>;
/**
 * Updates user information (phone number, date of birth).
 */
declare const updateUser: (request: FastifyRequest<{
  Body: UpdateUserBody;
}>, reply: FastifyReply) => Promise<void>;
type DeleteUserParams = {
  userId: string;
};
type DeleteUserResult = ResponseData<UserAPI>;
/**
 * Deletes a user based on the provided ID.
 */
declare const deleteUser: (request: FastifyRequest<{
  Params: DeleteUserParams;
}>, reply: FastifyReply) => Promise<void>;
declare const sendVerificationUpdate: (user: User) => void;
type VerifyEmailStatusSSEParams = {
  userId: string;
};
/**
 * SSE to check the email verification status
 */
declare const verifyEmailStatusSSE: (request: FastifyRequest<{
  Params: VerifyEmailStatusSSEParams;
}>, reply: FastifyReply) => Promise<void>;
//#endregion
export { UserFiltersParam as C, UserFilters as S, getUserById as _, GetUserByEmailParams as a, updateUser as b, GetUserByIdResult as c, UpdateUserBody as d, UpdateUserResult as f, getUserByEmail as g, deleteUser as h, DeleteUserResult as i, GetUsersParams as l, createUser as m, CreateUserResult as n, GetUserByEmailResult as o, VerifyEmailStatusSSEParams as p, DeleteUserParams as r, GetUserByIdParams as s, CreateUserBody as t, GetUsersResult as u, getUsers as v, getUserFiltersAndPagination as w, verifyEmailStatusSSE as x, sendVerificationUpdate as y };
//# sourceMappingURL=user.controller-BZeUf89d.d.ts.map