import { AgentScopeConfig, ProjectScopeConfig, SubAgentScopeConfig } from "../../db/manage/scope-definitions.js";
import { PaginationConfig } from "../../types/utility.js";
import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
import { SkillApiInsert, SkillApiUpdate, SkillFileApiInsert, SkillFileSelect, SkillSelect, SubAgentSkillWithIndex } from "../../types/entities.js";

//#region src/data-access/manage/skills.d.ts
interface SkillRecordWithFiles extends SkillSelect {
  files: SkillFileSelect[];
}
declare const getSkillFilesBySkillIds: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  skillIds: string[];
}) => Promise<Record<string, SkillFileSelect[]>>;
declare const getSkillById: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  skillId: string;
}) => Promise<{
  id: string;
  name: string;
  description: string;
  createdAt: string;
  updatedAt: string;
  tenantId: string;
  projectId: string;
  metadata: Record<string, string> | null;
  content: string;
} | null>;
declare const getSkillByIdWithFiles: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  skillId: string;
}) => Promise<SkillRecordWithFiles | null>;
declare const getSkillFileById: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  skillId: string;
  fileId: string;
}) => Promise<SkillFileSelect | null>;
declare const createSkillFileById: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  skillId: string;
  data: SkillFileApiInsert;
}) => Promise<SkillFileSelect | null>;
declare const updateSkillFileById: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  skillId: string;
  fileId: string;
  content: string;
}) => Promise<SkillFileSelect | null>;
declare const deleteSkillFileById: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  skillId: string;
  fileId: string;
}) => Promise<boolean | null>;
declare const listSkills: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  pagination?: PaginationConfig;
}) => Promise<{
  data: {
    createdAt: string;
    updatedAt: string;
    id: string;
    name: string;
    description: string;
    content: string;
    metadata: Record<string, string> | null;
    projectId: string;
    tenantId: string;
  }[];
  pagination: {
    page: number;
    limit: number;
    total: number;
    pages: number;
  };
}>;
declare const listSkillsWithFiles: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  pagination?: PaginationConfig;
}) => Promise<{
  data: {
    files: {
      createdAt: string;
      updatedAt: string;
      skillId: string;
      filePath: string;
      content: string;
      projectId: string;
      tenantId: string;
      id: string;
    }[];
    createdAt: string;
    updatedAt: string;
    id: string;
    name: string;
    description: string;
    content: string;
    metadata: Record<string, string> | null;
    projectId: string;
    tenantId: string;
  }[];
  pagination: {
    page: number;
    limit: number;
    total: number;
    pages: number;
  };
}>;
interface WithTenantIdProjectId {
  tenantId: string;
  projectId: string;
}
declare const createSkill: (db: AgentsManageDatabaseClient) => (data: SkillApiInsert & WithTenantIdProjectId) => Promise<SkillRecordWithFiles>;
declare const upsertSkill: (db: AgentsManageDatabaseClient) => (data: SkillApiInsert & WithTenantIdProjectId) => Promise<{
  id: string;
  name: string;
  description: string;
  createdAt: string;
  updatedAt: string;
  tenantId: string;
  projectId: string;
  metadata: Record<string, string> | null;
  content: string;
}>;
declare const updateSkill: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  skillId: string;
  data: SkillApiUpdate;
}) => Promise<SkillRecordWithFiles | null>;
declare const deleteSkill: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  skillId: string;
}) => Promise<boolean>;
declare const getSkillsForSubAgents: (db: AgentsManageDatabaseClient) => (params: {
  scopes: AgentScopeConfig;
  subAgentIds: string[];
}) => Promise<SubAgentSkillWithIndex[]>;
declare const upsertSubAgentSkill: (db: AgentsManageDatabaseClient) => (params: {
  scopes: SubAgentScopeConfig;
  skillId: string;
  index: number;
  alwaysLoaded?: boolean;
}) => Promise<{
  id: string;
  createdAt: string;
  updatedAt: string;
  tenantId: string;
  projectId: string;
  agentId: string;
  subAgentId: string;
  index: number;
  alwaysLoaded: boolean;
  skillId: string;
}>;
declare const deleteSubAgentSkill: (db: AgentsManageDatabaseClient) => (params: {
  scopes: AgentScopeConfig;
  subAgentSkillId: string;
}) => Promise<boolean>;
//#endregion
export { createSkill, createSkillFileById, deleteSkill, deleteSkillFileById, deleteSubAgentSkill, getSkillById, getSkillByIdWithFiles, getSkillFileById, getSkillFilesBySkillIds, getSkillsForSubAgents, listSkills, listSkillsWithFiles, updateSkill, updateSkillFileById, upsertSkill, upsertSubAgentSkill };