import { User, UserAPI } from "../types/user.types.js";
import { Organization, OrganizationAPI, OrganizationCreationData } from "../types/organization.types.js";
import { ResponseWithSession } from "../middlewares/sessionAuth.middleware.js";
import { FiltersAndPagination } from "../utils/filtersAndPagination/getFiltersAndPaginationFromBody.js";
import { PaginatedResponse, ResponseData } from "../utils/responseData.js";
import { OrganizationFiltersParams } from "../utils/filtersAndPagination/getOrganizationFiltersAndPagination.js";
import { Types } from "mongoose";
import { NextFunction, Request } from "express";

//#region src/controllers/organization.controller.d.ts
type GetOrganizationsParams = FiltersAndPagination<OrganizationFiltersParams>;
type GetOrganizationsResult = PaginatedResponse<OrganizationAPI>;
/**
 * Retrieves a list of organizations based on filters and pagination.
 */
declare const getOrganizations: (req: Request<GetOrganizationsParams>, res: ResponseWithSession<GetOrganizationsResult>, _next: NextFunction) => Promise<void>;
type GetOrganizationParam = {
  organizationId: string;
};
type GetOrganizationResult = ResponseData<OrganizationAPI>;
/**
 * Retrieves an organization by its ID.
 */
declare const getOrganization: (req: Request<GetOrganizationParam, any, any>, res: ResponseWithSession<GetOrganizationResult>, _next: NextFunction) => Promise<void>;
type AddOrganizationBody = OrganizationCreationData;
type AddOrganizationResult = ResponseData<OrganizationAPI>;
/**
 * Adds a new organization to the database.
 */
declare const addOrganization: (req: Request<any, any, AddOrganizationBody>, res: ResponseWithSession<AddOrganizationResult>, _next: NextFunction) => Promise<void>;
type UpdateOrganizationBody = Partial<Organization>;
type UpdateOrganizationResult = ResponseData<OrganizationAPI>;
/**
 * Updates an existing organization in the database.
 */
declare const updateOrganization: (req: Request<undefined, undefined, UpdateOrganizationBody>, res: ResponseWithSession<UpdateOrganizationResult>, _next: NextFunction) => Promise<void>;
type AddOrganizationMemberBody = {
  userEmail: string;
};
type AddOrganizationMemberResult = ResponseData<OrganizationAPI>;
/**
 * Add member to the organization in the database.
 */
declare const addOrganizationMember: (req: Request<any, any, AddOrganizationMemberBody>, res: ResponseWithSession<AddOrganizationMemberResult>, _next: NextFunction) => Promise<void>;
type UpdateOrganizationMembersBody = Partial<{
  membersIds: (User | UserAPI)['id'][];
  adminsIds: (User | UserAPI)['id'][];
}>;
type UpdateOrganizationMembersResult = ResponseData<OrganizationAPI>;
/**
 * Update members to the organization in the database.
 */
declare const updateOrganizationMembers: (req: Request<any, any, UpdateOrganizationMembersBody>, res: ResponseWithSession<UpdateOrganizationMembersResult>, _next: NextFunction) => Promise<void>;
type UpdateOrganizationMembersByIdParams = {
  organizationId: string;
};
type UpdateOrganizationMembersByIdBody = Partial<{
  membersIds: (User | UserAPI)['id'][];
  adminsIds: (User | UserAPI)['id'][];
}>;
type UpdateOrganizationMembersByIdResult = ResponseData<OrganizationAPI>;
/**
 * Admin-only: Update members of any organization by ID
 */
declare const updateOrganizationMembersById: (req: Request<UpdateOrganizationMembersByIdParams, any, UpdateOrganizationMembersByIdBody>, res: ResponseWithSession<UpdateOrganizationMembersByIdResult>, _next: NextFunction) => Promise<void>;
type DeleteOrganizationResult = ResponseData<OrganizationAPI>;
/**
 * Deletes an organization from the database by its ID.
 */
declare const deleteOrganization: (_req: Request, res: ResponseWithSession, _next: NextFunction) => Promise<void>;
type SelectOrganizationParam = {
  organizationId: string | Types.ObjectId;
};
type SelectOrganizationResult = ResponseData<OrganizationAPI>;
/**
 * Select an organization.
 */
declare const selectOrganization: (req: Request<SelectOrganizationParam>, res: ResponseWithSession<SelectOrganizationResult>, _next: NextFunction) => Promise<void>;
type UnselectOrganizationResult = ResponseData<null>;
/**
 * Unselect an organization.
 */
declare const unselectOrganization: (_req: Request, res: ResponseWithSession<UnselectOrganizationResult>, _next: NextFunction) => Promise<void>;
//#endregion
export { AddOrganizationBody, AddOrganizationMemberBody, AddOrganizationMemberResult, AddOrganizationResult, DeleteOrganizationResult, GetOrganizationParam, GetOrganizationResult, GetOrganizationsParams, GetOrganizationsResult, SelectOrganizationParam, SelectOrganizationResult, UnselectOrganizationResult, UpdateOrganizationBody, UpdateOrganizationMembersBody, UpdateOrganizationMembersByIdBody, UpdateOrganizationMembersByIdParams, UpdateOrganizationMembersByIdResult, UpdateOrganizationMembersResult, UpdateOrganizationResult, addOrganization, addOrganizationMember, deleteOrganization, getOrganization, getOrganizations, selectOrganization, unselectOrganization, updateOrganization, updateOrganizationMembers, updateOrganizationMembersById };
//# sourceMappingURL=organization.controller.d.ts.map