import { ProjectScopeConfig } from "../../db/manage/scope-definitions.js";
import { PaginationConfig, PaginationResult, ProjectInfo, ProjectResourceCounts } from "../../types/utility.js";
import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
import { ProjectInsert, ProjectSelect, ProjectUpdate } from "../../types/entities.js";

//#region src/data-access/manage/projects.d.ts

/**
 * List all unique project IDs within a tenant by scanning all resource tables
 * @param projectIds - Optional array of project IDs to filter by. If undefined, returns all projects.
 */
declare const listProjects: (db: AgentsManageDatabaseClient) => (params: {
  tenantId: string;
  projectIds?: string[];
}) => Promise<ProjectInfo[]>;
/**
 * List all unique project IDs within a tenant with pagination
 * Optionally filter by a list of project IDs (for access control)
 */
declare const listProjectsPaginated: (db: AgentsManageDatabaseClient) => (params: {
  tenantId: string;
  pagination?: PaginationConfig;
  projectIds?: string[];
}) => Promise<{
  data: ProjectSelect[];
  pagination: PaginationResult;
}>;
/**
 * Get resource counts for a specific project
 */
declare const getProjectResourceCounts: (db: AgentsManageDatabaseClient) => (params: ProjectScopeConfig) => Promise<ProjectResourceCounts>;
/**
 * Check if a project exists (has any resources)
 */
declare const projectExists: (db: AgentsManageDatabaseClient) => (params: ProjectScopeConfig) => Promise<boolean>;
/**
 * Count total projects for a tenant
 */
declare const countProjects: (db: AgentsManageDatabaseClient) => (params: {
  tenantId: string;
}) => Promise<number>;
/**
 * Get a single project by ID
 */
declare const getProject: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
}) => Promise<ProjectSelect | null>;
/**
 * Create a new project
 */
declare const createProject: (db: AgentsManageDatabaseClient) => (params: ProjectInsert) => Promise<ProjectSelect>;
/**
 * Update an existing project
 */
declare const updateProject: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  data: ProjectUpdate;
}) => Promise<ProjectSelect | null>;
/**
 * Check if a project exists in the projects table
 */
declare const projectExistsInTable: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
}) => Promise<boolean>;
/**
 * Check if a project has any resources (used before deletion)
 */
declare const projectHasResources: (db: AgentsManageDatabaseClient) => (params: ProjectScopeConfig) => Promise<boolean>;
/**
 * Delete a project (with validation for existing resources)
 */
declare const deleteProject: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
}) => Promise<boolean>;
//#endregion
export { countProjects, createProject, deleteProject, getProject, getProjectResourceCounts, listProjects, listProjectsPaginated, projectExists, projectExistsInTable, projectHasResources, updateProject };