import { AgentScopeConfig } from "../../db/manage/scope-definitions.js";
import { ContextFetchDefinition, PaginationConfig } from "../../types/utility.js";
import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
import "../../index.js";
import { ContextConfigInsert, ContextConfigUpdate } from "../../types/entities.js";

//#region src/data-access/manage/contextConfigs.d.ts
declare const getContextConfigById: (db: AgentsManageDatabaseClient) => (params: {
  scopes: AgentScopeConfig;
  id: string;
}) => Promise<{
  id: string;
  createdAt: string;
  updatedAt: string;
  tenantId: string;
  projectId: string;
  agentId: string;
  headersSchema: unknown;
  contextVariables: Record<string, ContextFetchDefinition> | null;
} | undefined>;
declare const listContextConfigs: (db: AgentsManageDatabaseClient) => (params: {
  scopes: AgentScopeConfig;
}) => Promise<{
  id: string;
  createdAt: string;
  updatedAt: string;
  tenantId: string;
  projectId: string;
  agentId: string;
  headersSchema: unknown;
  contextVariables: Record<string, ContextFetchDefinition> | null;
}[]>;
declare const listContextConfigsPaginated: (db: AgentsManageDatabaseClient) => (params: {
  scopes: AgentScopeConfig;
  pagination?: PaginationConfig;
}) => Promise<{
  data: any[];
  pagination: {
    page: number;
    limit: number;
    total: number;
    pages: number;
  };
}>;
declare const createContextConfig: (db: AgentsManageDatabaseClient) => (params: ContextConfigInsert) => Promise<{
  id: string;
  createdAt: string;
  updatedAt: string;
  tenantId: string;
  projectId: string;
  agentId: string;
  headersSchema: unknown;
  contextVariables: Record<string, ContextFetchDefinition> | null;
}>;
declare const updateContextConfig: (db: AgentsManageDatabaseClient) => (params: {
  scopes: AgentScopeConfig;
  id: string;
  data: Partial<ContextConfigUpdate>;
}) => Promise<{
  createdAt: string;
  updatedAt: string;
  headersSchema: unknown;
  contextVariables: Record<string, ContextFetchDefinition> | null;
  agentId: string;
  projectId: string;
  tenantId: string;
  id: string;
}>;
declare const deleteContextConfig: (db: AgentsManageDatabaseClient) => (params: {
  scopes: AgentScopeConfig;
  id: string;
}) => Promise<boolean>;
declare const hasContextConfig: (db: AgentsManageDatabaseClient) => (params: {
  scopes: AgentScopeConfig;
  id: string;
}) => Promise<boolean>;
declare const countContextConfigs: (db: AgentsManageDatabaseClient) => (params: {
  scopes: AgentScopeConfig;
}) => Promise<number>;
/**
 * Upsert a context config (create if it doesn't exist, update if it does)
 */
declare const upsertContextConfig: (db: AgentsManageDatabaseClient) => (params: {
  data: ContextConfigInsert;
}) => Promise<{
  id: string;
  createdAt: string;
  updatedAt: string;
  tenantId: string;
  projectId: string;
  agentId: string;
  headersSchema: unknown;
  contextVariables: Record<string, ContextFetchDefinition> | null;
}>;
//#endregion
export { countContextConfigs, createContextConfig, deleteContextConfig, getContextConfigById, hasContextConfig, listContextConfigs, listContextConfigsPaginated, updateContextConfig, upsertContextConfig };