import { ProjectAPI, ProjectConfiguration, ProjectCreationData } from "../types/project.types.js";
import { FiltersAndPagination } from "../utils/filtersAndPagination/getFiltersAndPaginationFromBody.js";
import { PaginatedResponse, ResponseData } from "../utils/responseData.js";
import { CIStatus } from "../services/ci.service.js";
import { ProjectFiltersParams } from "../utils/filtersAndPagination/getProjectFiltersAndPagination.js";
import { Types } from "mongoose";
import { FastifyReply, FastifyRequest } from "fastify";

//#region src/controllers/project.controller.d.ts
type GetProjectsParams = FiltersAndPagination<ProjectFiltersParams>;
type GetProjectsResult = PaginatedResponse<ProjectAPI>;
/**
 * Retrieves a list of projects based on filters and pagination.
 */
declare const getProjects: (request: FastifyRequest<{
  Querystring: GetProjectsParams;
}>, reply: FastifyReply) => Promise<void>;
type AddProjectBody = ProjectCreationData;
type AddProjectResult = ResponseData<ProjectAPI>;
/**
 * Adds a new project to the database.
 */
declare const addProject: (request: FastifyRequest<{
  Body: AddProjectBody;
}>, reply: FastifyReply) => Promise<void>;
type UpdateProjectBody = Partial<ProjectAPI>;
type UpdateProjectResult = ResponseData<ProjectAPI>;
/**
 * Updates an existing project in the database.
 */
declare const updateProject: (request: FastifyRequest<{
  Body: UpdateProjectBody;
}>, reply: FastifyReply) => Promise<void>;
type ProjectMemberByIdOption = {
  userId: string | Types.ObjectId;
  isAdmin?: boolean;
};
type UpdateProjectMembersBody = Partial<{
  membersIds: ProjectMemberByIdOption[];
}>;
type UpdateProjectMembersResult = ResponseData<ProjectAPI>;
/**
 * Update members to the dictionary in the database.
 */
declare const updateProjectMembers: (request: FastifyRequest<{
  Body: UpdateProjectMembersBody;
}>, reply: FastifyReply) => Promise<void>;
type PushProjectConfigurationBody = ProjectConfiguration;
type PushProjectConfigurationResult = ResponseData<ProjectConfiguration>;
/**
 * Pushes a project configuration to the database.
 */
declare const pushProjectConfiguration: (request: FastifyRequest<{
  Body: PushProjectConfigurationBody;
}>, reply: FastifyReply) => Promise<void>;
type TriggerBuildResult = ResponseData<{
  results: Array<{
    target: string;
    success: boolean;
    message?: string;
  }>;
}>;
type TriggerWebhookBody = {
  webhookIndex: number;
};
type TriggerWebhookResult = ResponseData<{
  target: string;
  success: boolean;
  message?: string;
}>;
/**
 * Triggers CI builds for a project (Git provider pipelines and webhooks)
 */
declare const triggerBuild: (request: FastifyRequest, reply: FastifyReply) => Promise<void>;
/**
 * Triggers a single webhook by index
 */
declare const triggerWebhook: (request: FastifyRequest<{
  Body: TriggerWebhookBody;
}>, reply: FastifyReply) => Promise<void>;
type DeleteProjectResult = ResponseData<ProjectAPI>;
/**
 * Deletes a project from the database by its ID.
 */
declare const deleteProject: (_request: FastifyRequest, reply: FastifyReply) => Promise<void>;
type SelectProjectParam = {
  projectId: string | Types.ObjectId;
};
type SelectProjectResult = ResponseData<ProjectAPI>;
/**
 * Select a project.
 */
declare const selectProject: (request: FastifyRequest<{
  Params: SelectProjectParam;
}>, reply: FastifyReply) => Promise<void>;
type UnselectProjectResult = ResponseData<null>;
/**
 * Unselect a project.
 */
declare const unselectProject: (_request: FastifyRequest, reply: FastifyReply) => Promise<void>;
type GetCIConfigurationResult = ResponseData<CIStatus>;
/**
 * Get CI configuration status for the current project
 */
declare const getCIConfiguration: (request: FastifyRequest, reply: FastifyReply) => Promise<void>;
type PushCIConfigurationResult = ResponseData<{
  success: boolean;
}>;
/**
 * Push CI configuration file to the repository
 */
declare const pushCIConfiguration: (request: FastifyRequest, reply: FastifyReply) => Promise<void>;
//#endregion
export { AddProjectBody, AddProjectResult, DeleteProjectResult, GetCIConfigurationResult, GetProjectsParams, GetProjectsResult, ProjectMemberByIdOption, PushCIConfigurationResult, PushProjectConfigurationBody, PushProjectConfigurationResult, SelectProjectParam, SelectProjectResult, TriggerBuildResult, TriggerWebhookBody, TriggerWebhookResult, UnselectProjectResult, UpdateProjectBody, UpdateProjectMembersBody, UpdateProjectMembersResult, UpdateProjectResult, addProject, deleteProject, getCIConfiguration, getProjects, pushCIConfiguration, pushProjectConfiguration, selectProject, triggerBuild, triggerWebhook, unselectProject, updateProject, updateProjectMembers };
//# sourceMappingURL=project.controller.d.ts.map