import { ProjectScopeConfig } from "../../db/manage/scope-definitions.js";
import { PaginationConfig } from "../../types/utility.js";
import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
import { FunctionApiInsert } from "../../types/entities.js";

//#region src/data-access/manage/functions.d.ts
/**
 * Create or update a function (project-scoped)
 */
declare const upsertFunction: (db: AgentsManageDatabaseClient) => (params: {
  data: FunctionApiInsert;
  scopes: ProjectScopeConfig;
}) => Promise<void>;
/**
 * Get a function by ID (project-scoped)
 */
declare const getFunction: (db: AgentsManageDatabaseClient) => (params: {
  functionId: string;
  scopes: ProjectScopeConfig;
}) => Promise<FunctionApiInsert | null>;
/**
 * List all functions for a project
 */
declare const listFunctions: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
}) => Promise<FunctionApiInsert[]>;
/**
 * List all functions for a project with pagination
 */
declare const listFunctionsPaginated: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  pagination?: PaginationConfig;
}) => Promise<{
  data: {
    createdAt: string;
    updatedAt: string;
    inputSchema: Record<string, unknown> | null;
    executeCode: string;
    dependencies: Record<string, string> | null;
    projectId: string;
    tenantId: string;
    id: string;
  }[];
  pagination: {
    page: number;
    limit: number;
    total: number;
    pages: number;
  };
}>;
/**
 * Delete a function (project-scoped)
 */
declare const deleteFunction: (db: AgentsManageDatabaseClient) => (params: {
  functionId: string;
  scopes: ProjectScopeConfig;
}) => Promise<void>;
//#endregion
export { deleteFunction, getFunction, listFunctions, listFunctionsPaginated, upsertFunction };