import { User, UserAPI } from "../types/user.types.js";
import { Organization, OrganizationAPI, OrganizationCreationData } from "../types/organization.types.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 { FastifyReply, FastifyRequest } from "fastify";

//#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: (request: FastifyRequest<{
  Querystring: GetOrganizationsParams;
}>, reply: FastifyReply) => Promise<void>;
type GetOrganizationParam = {
  organizationId: string;
};
type GetOrganizationResult = ResponseData<OrganizationAPI>;
/**
 * Retrieves an organization by its ID.
 */
declare const getOrganization: (request: FastifyRequest<{
  Params: GetOrganizationParam;
}>, reply: FastifyReply) => Promise<void>;
type AddOrganizationBody = OrganizationCreationData;
type AddOrganizationResult = ResponseData<OrganizationAPI>;
/**
 * Adds a new organization to the database.
 */
declare const addOrganization: (request: FastifyRequest<{
  Body: AddOrganizationBody;
}>, reply: FastifyReply) => Promise<void>;
type UpdateOrganizationBody = Partial<Organization>;
type UpdateOrganizationResult = ResponseData<OrganizationAPI>;
/**
 * Updates an existing organization in the database.
 */
declare const updateOrganization: (request: FastifyRequest<{
  Body: UpdateOrganizationBody;
}>, reply: FastifyReply) => Promise<void>;
type AddOrganizationMemberBody = {
  userEmail: string;
};
type AddOrganizationMemberResult = ResponseData<OrganizationAPI>;
/**
 * Add member to the organization in the database.
 */
declare const addOrganizationMember: (request: FastifyRequest<{
  Body: AddOrganizationMemberBody;
}>, reply: FastifyReply) => 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: (request: FastifyRequest<{
  Body: UpdateOrganizationMembersBody;
}>, reply: FastifyReply) => 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: (request: FastifyRequest<{
  Params: UpdateOrganizationMembersByIdParams;
  Body: UpdateOrganizationMembersByIdBody;
}>, reply: FastifyReply) => Promise<void>;
type DeleteOrganizationResult = ResponseData<OrganizationAPI>;
/**
 * Deletes an organization from the database by its ID.
 */
declare const deleteOrganization: (_request: FastifyRequest, reply: FastifyReply) => Promise<void>;
type SelectOrganizationParam = {
  organizationId: string | Types.ObjectId;
};
type SelectOrganizationResult = ResponseData<OrganizationAPI>;
/**
 * Select an organization.
 */
declare const selectOrganization: (request: FastifyRequest<{
  Params: SelectOrganizationParam;
}>, reply: FastifyReply) => Promise<void>;
type UnselectOrganizationResult = ResponseData<null>;
/**
 * Unselect an organization.
 */
declare const unselectOrganization: (_request: FastifyRequest, reply: FastifyReply) => 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