import { User, UserAPI, UserDocument } from "../types/user.types.js";
import { UserFilters } from "../utils/filtersAndPagination/getUserFiltersAndPagination.js";
import { Types } from "mongoose";

//#region src/services/user.service.d.ts
/**
 * Creates a new user with password in the database and hashes the password.
 * @param user - User object with password not hashed.
 * @returns Created user object.
 */
declare const createUser: (user: Partial<User>) => Promise<UserDocument>;
/**
 * Retrieves a user by email.
 * @param email - User's email.
 * @returns User object or null if no user was found.
 */
declare const getUserByEmail: (email: string) => Promise<UserDocument | null>;
/**
 * Retrieves users list by email.
 * @param emails - Users email.
 * @returns User object or null if no user was found.
 */
declare const getUsersByEmails: (emails: string[]) => Promise<UserDocument[] | null>;
/**
 * Checks if a user exists by email.
 * @param email - User's email.
 * @returns True if the user exists, false otherwise.
 */
declare const checkUserExists: (email: string) => Promise<boolean>;
/**
 * Retrieves a user by ID.
 * @param userId - User's ID.
 * @returns User object or null if no user was found.
 */
declare const getUserById: (userId: string | Types.ObjectId) => Promise<UserDocument | null>;
/**
 * Retrieves a user by ID.
 * @param userId - User's ID.
 * @returns User object or null if no user was found.
 */
declare const getUsersByIds: (userIds: (string | Types.ObjectId)[]) => Promise<UserDocument[] | null>;
/**
 * Finds users based on filters and pagination options.
 * @param filters - MongoDB filter query.
 * @param skip - Number of documents to skip.
 * @param limit - Number of documents to limit.
 * @param sortOptions - Sorting options.
 * @returns List of users matching the filters.
 */
declare const findUsers: (filters: UserFilters, skip: number, limit: number, sortOptions?: Record<string, 1 | -1>) => Promise<UserDocument[]>;
/**
 * Counts the total number of users that match the filters.
 * @param filters - MongoDB filter query.
 * @returns Total number of users.
 */
declare const countUsers: (filters: UserFilters) => Promise<number>;
/**
 * Updates a user's information.
 * @param user - The user object.
 * @param updates - The updates to apply to the user.
 * @returns The updated user.
 */
declare const updateUserById: (userId: string | Types.ObjectId, updates: Partial<UserAPI>) => Promise<UserDocument>;
/**
 * Deletes a user from the database.
 * @param userId - The user object.
 * @returns
 */
declare const deleteUser: (userId: string | Types.ObjectId) => Promise<UserDocument>;
//#endregion
export { checkUserExists, countUsers, createUser, deleteUser, findUsers, getUserByEmail, getUserById, getUsersByEmails, getUsersByIds, updateUserById };
//# sourceMappingURL=user.service.d.ts.map