import { AgentScopeConfig, SubAgentScopeConfig } from "../../db/manage/scope-definitions.js";
import { ConversationHistoryConfig, PaginationConfig } from "../../types/utility.js";
import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
import "../../index.js";
import { SubAgentExternalAgentRelationInsert } from "../../types/entities.js";

//#region src/data-access/manage/subAgentExternalAgentRelations.d.ts
declare const getSubAgentExternalAgentRelationById: (db: AgentsManageDatabaseClient) => (params: {
  scopes: SubAgentScopeConfig;
  relationId: string;
}) => Promise<{
  id: string;
  createdAt: string;
  updatedAt: string;
  tenantId: string;
  projectId: string;
  agentId: string;
  headers: Record<string, string> | null;
  externalAgentId: string;
  subAgentId: string;
} | undefined>;
declare const listSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
  scopes: SubAgentScopeConfig;
  pagination?: PaginationConfig;
}) => Promise<{
  data: {
    createdAt: string;
    updatedAt: string;
    externalAgentId: string;
    headers: Record<string, string> | null;
    subAgentId: string;
    agentId: string;
    projectId: string;
    tenantId: string;
    id: string;
  }[];
  pagination: {
    page: number;
    limit: number;
    total: number;
    pages: number;
  };
}>;
declare const getSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
  scopes: SubAgentScopeConfig;
}) => Promise<{
  id: string;
  createdAt: string;
  updatedAt: string;
  tenantId: string;
  projectId: string;
  agentId: string;
  headers: Record<string, string> | null;
  externalAgentId: string;
  subAgentId: string;
}[]>;
declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
  scopes: AgentScopeConfig;
}) => Promise<{
  id: string;
  createdAt: string;
  updatedAt: string;
  tenantId: string;
  projectId: string;
  agentId: string;
  headers: Record<string, string> | null;
  externalAgentId: string;
  subAgentId: string;
}[]>;
declare const getSubAgentExternalAgentRelationsByExternalAgent: (db: AgentsManageDatabaseClient) => (params: {
  scopes: AgentScopeConfig;
  externalAgentId: string;
  pagination?: PaginationConfig;
}) => Promise<{
  data: {
    createdAt: string;
    updatedAt: string;
    externalAgentId: string;
    headers: Record<string, string> | null;
    subAgentId: string;
    agentId: string;
    projectId: string;
    tenantId: string;
    id: string;
  }[];
  pagination: {
    page: number;
    limit: number;
    total: number;
    pages: number;
  };
}>;
declare const getExternalAgentsForSubAgent: (db: AgentsManageDatabaseClient) => (params: {
  scopes: SubAgentScopeConfig;
  pagination?: PaginationConfig;
}) => Promise<{
  data: {
    id: string;
    tenantId: string;
    projectId: string;
    agentId: string;
    subAgentId: string;
    externalAgentId: string;
    headers: Record<string, string> | null;
    createdAt: string;
    updatedAt: string;
    externalAgent: {
      id: string;
      name: string;
      description: string | null;
      baseUrl: string;
      credentialReferenceId: string | null;
      tenantId: string;
      projectId: string;
      createdAt: string;
      updatedAt: string;
    };
  }[];
  pagination: {
    page: number;
    limit: number;
    total: number;
    pages: number;
  };
}>;
declare const getSubAgentsForExternalAgent: (db: AgentsManageDatabaseClient) => (params: {
  scopes: AgentScopeConfig;
  externalAgentId: string;
  pagination?: PaginationConfig;
}) => Promise<{
  data: {
    id: string;
    tenantId: string;
    projectId: string;
    agentId: string;
    subAgentId: string;
    externalAgentId: string;
    headers: Record<string, string> | null;
    createdAt: string;
    updatedAt: string;
    subAgent: {
      id: string;
      name: string;
      description: string | null;
      prompt: string | null;
      conversationHistoryConfig: ConversationHistoryConfig | null;
      models: {
        base?: {
          model?: string | undefined;
          providerOptions?: Record<string, unknown> | undefined;
          fallbackModels?: string[] | undefined;
          allowedProviders?: string[] | undefined;
        } | undefined;
        structuredOutput?: {
          model?: string | undefined;
          providerOptions?: Record<string, unknown> | undefined;
          fallbackModels?: string[] | undefined;
          allowedProviders?: string[] | undefined;
        } | undefined;
        summarizer?: {
          model?: string | undefined;
          providerOptions?: Record<string, unknown> | undefined;
          fallbackModels?: string[] | undefined;
          allowedProviders?: string[] | undefined;
        } | undefined;
      } | null;
      stopWhen: {
        stepCountIs?: number | undefined;
      } | null;
      createdAt: string;
      updatedAt: string;
    };
  }[];
  pagination: {
    page: number;
    limit: number;
    total: number;
    pages: number;
  };
}>;
declare const createSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
  scopes: SubAgentScopeConfig;
  relationId?: string;
  data: {
    externalAgentId: string;
    headers?: Record<string, string> | null;
  };
}) => Promise<{
  id: string;
  createdAt: string;
  updatedAt: string;
  tenantId: string;
  projectId: string;
  agentId: string;
  headers: Record<string, string> | null;
  externalAgentId: string;
  subAgentId: string;
}>;
/**
 * Check if sub-agent external agent relation exists by params
 */
declare const getSubAgentExternalAgentRelationByParams: (db: AgentsManageDatabaseClient) => (params: {
  scopes: SubAgentScopeConfig;
  externalAgentId: string;
}) => Promise<{
  id: string;
  createdAt: string;
  updatedAt: string;
  tenantId: string;
  projectId: string;
  agentId: string;
  headers: Record<string, string> | null;
  externalAgentId: string;
  subAgentId: string;
} | undefined>;
/**
 * Upsert sub-agent external agent relation (create if it doesn't exist, update if it does)
 */
declare const upsertSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
  scopes: SubAgentScopeConfig;
  relationId?: string;
  data: {
    externalAgentId: string;
    headers?: Record<string, string> | null;
  };
}) => Promise<{
  id: string;
  createdAt: string;
  updatedAt: string;
  tenantId: string;
  projectId: string;
  agentId: string;
  headers: Record<string, string> | null;
  externalAgentId: string;
  subAgentId: string;
}>;
declare const updateSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
  scopes: SubAgentScopeConfig;
  relationId: string;
  data: Partial<SubAgentExternalAgentRelationInsert>;
}) => Promise<{
  createdAt: string;
  updatedAt: string;
  externalAgentId: string;
  headers: Record<string, string> | null;
  subAgentId: string;
  agentId: string;
  projectId: string;
  tenantId: string;
  id: string;
}>;
declare const deleteSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
  scopes: SubAgentScopeConfig;
  relationId: string;
}) => Promise<boolean>;
declare const deleteSubAgentExternalAgentRelationsBySubAgent: (db: AgentsManageDatabaseClient) => (params: {
  scopes: SubAgentScopeConfig;
}) => Promise<boolean>;
declare const deleteSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
  scopes: AgentScopeConfig;
}) => Promise<boolean>;
//#endregion
export { createSubAgentExternalAgentRelation, deleteSubAgentExternalAgentRelation, deleteSubAgentExternalAgentRelationsByAgent, deleteSubAgentExternalAgentRelationsBySubAgent, getExternalAgentsForSubAgent, getSubAgentExternalAgentRelationById, getSubAgentExternalAgentRelationByParams, getSubAgentExternalAgentRelations, getSubAgentExternalAgentRelationsByAgent, getSubAgentExternalAgentRelationsByExternalAgent, getSubAgentsForExternalAgent, listSubAgentExternalAgentRelations, updateSubAgentExternalAgentRelation, upsertSubAgentExternalAgentRelation };