import { AgentScopeConfig, ProjectScopeConfig, SubAgentScopeConfig } from "../../db/manage/scope-definitions.js";
import { PaginationConfig } from "../../types/utility.js";
import { JsonSchemaProperty } from "../../validation/json-schemas.js";
import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
import { ArtifactComponentInsert, ArtifactComponentSelect, ArtifactComponentUpdate } from "../../types/entities.js";

//#region src/data-access/manage/artifactComponents.d.ts
declare const getArtifactComponentById: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  id: string;
}) => Promise<{
  id: string;
  name: string;
  description: string | null;
  createdAt: string;
  updatedAt: string;
  tenantId: string;
  projectId: string;
  props: {
    [x: string]: unknown;
    type: "object";
    properties: Record<string, JsonSchemaProperty>;
    required?: string[] | undefined;
    additionalProperties?: boolean | undefined;
    description?: string | undefined;
  } | null;
  render: {
    component: string;
    mockData: Record<string, unknown>;
  } | null;
} | undefined>;
declare const listArtifactComponents: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
}) => Promise<{
  createdAt: string;
  updatedAt: string;
  props: {
    [x: string]: unknown;
    type: "object";
    properties: Record<string, JsonSchemaProperty>;
    required?: string[] | undefined;
    additionalProperties?: boolean | undefined;
    description?: string | undefined;
  } | null;
  render: {
    component: string;
    mockData: Record<string, unknown>;
  } | null;
  name: string;
  description: string | null;
  projectId: string;
  tenantId: string;
  id: string;
}[]>;
declare const listArtifactComponentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  pagination?: PaginationConfig;
}) => Promise<{
  data: ArtifactComponentSelect[];
  pagination: {
    page: number;
    limit: number;
    total: number;
    pages: number;
  };
}>;
declare const createArtifactComponent: (db: AgentsManageDatabaseClient) => (params: ArtifactComponentInsert) => Promise<{
  id: string;
  name: string;
  description: string | null;
  createdAt: string;
  updatedAt: string;
  tenantId: string;
  projectId: string;
  props: {
    [x: string]: unknown;
    type: "object";
    properties: Record<string, JsonSchemaProperty>;
    required?: string[] | undefined;
    additionalProperties?: boolean | undefined;
    description?: string | undefined;
  } | null;
  render: {
    component: string;
    mockData: Record<string, unknown>;
  } | null;
}>;
declare const updateArtifactComponent: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  id: string;
  data: ArtifactComponentUpdate;
}) => Promise<{
  createdAt: string;
  updatedAt: string;
  props: {
    [x: string]: unknown;
    type: "object";
    properties: Record<string, JsonSchemaProperty>;
    required?: string[] | undefined;
    additionalProperties?: boolean | undefined;
    description?: string | undefined;
  } | null;
  render: {
    component: string;
    mockData: Record<string, unknown>;
  } | null;
  name: string;
  description: string | null;
  projectId: string;
  tenantId: string;
  id: string;
}>;
declare const deleteArtifactComponent: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  id: string;
}) => Promise<boolean>;
declare const getArtifactComponentsForAgent: (db: AgentsManageDatabaseClient) => (params: {
  scopes: SubAgentScopeConfig;
}) => Promise<{
  id: string;
  tenantId: string;
  projectId: string;
  name: string;
  description: string | null;
  props: {
    [x: string]: unknown;
    type: "object";
    properties: Record<string, JsonSchemaProperty>;
    required?: string[] | undefined;
    additionalProperties?: boolean | undefined;
    description?: string | undefined;
  } | null;
  render: {
    component: string;
    mockData: Record<string, unknown>;
  } | null;
  createdAt: string;
  updatedAt: string;
}[]>;
declare const associateArtifactComponentWithAgent: (db: AgentsManageDatabaseClient) => (params: {
  scopes: SubAgentScopeConfig;
  artifactComponentId: string;
}) => Promise<{
  id: string;
  createdAt: string;
  tenantId: string;
  projectId: string;
  agentId: string;
  subAgentId: string;
  artifactComponentId: string;
}>;
declare const removeArtifactComponentFromAgent: (db: AgentsManageDatabaseClient) => (params: {
  scopes: SubAgentScopeConfig;
  artifactComponentId: string;
}) => Promise<boolean>;
declare const deleteAgentArtifactComponentRelationByAgent: (db: AgentsManageDatabaseClient) => (params: {
  scopes: SubAgentScopeConfig;
}) => Promise<boolean>;
declare const getAgentsUsingArtifactComponent: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  artifactComponentId: string;
}) => Promise<{
  agentId: string;
  subAgentId: string;
  createdAt: string;
}[]>;
declare const isArtifactComponentAssociatedWithAgent: (db: AgentsManageDatabaseClient) => (params: {
  scopes: SubAgentScopeConfig;
  artifactComponentId: string;
}) => Promise<boolean>;
declare const agentHasArtifactComponents: (db: AgentsManageDatabaseClient) => (params: {
  scopes: AgentScopeConfig;
}) => Promise<boolean>;
declare const countArtifactComponents: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
}) => Promise<number>;
declare const countArtifactComponentsForAgent: (db: AgentsManageDatabaseClient) => (params: {
  scopes: SubAgentScopeConfig;
}) => Promise<number>;
/**
 * Upsert agent-artifact component relation (create if it doesn't exist, no-op if it does)
 */
declare const upsertAgentArtifactComponentRelation: (db: AgentsManageDatabaseClient) => (params: {
  scopes: SubAgentScopeConfig;
  artifactComponentId: string;
}) => Promise<{
  id: string;
  createdAt: string;
  tenantId: string;
  projectId: string;
  agentId: string;
  subAgentId: string;
  artifactComponentId: string;
} | null>;
/**
 * Upsert an artifact component (create if it doesn't exist, update if it does)
 */
declare const upsertArtifactComponent: (db: AgentsManageDatabaseClient) => (params: {
  data: ArtifactComponentInsert;
}) => Promise<ArtifactComponentSelect>;
//#endregion
export { agentHasArtifactComponents, associateArtifactComponentWithAgent, countArtifactComponents, countArtifactComponentsForAgent, createArtifactComponent, deleteAgentArtifactComponentRelationByAgent, deleteArtifactComponent, getAgentsUsingArtifactComponent, getArtifactComponentById, getArtifactComponentsForAgent, isArtifactComponentAssociatedWithAgent, listArtifactComponents, listArtifactComponentsPaginated, removeArtifactComponentFromAgent, updateArtifactComponent, upsertAgentArtifactComponentRelation, upsertArtifactComponent };