import type { Db } from "@rudderhq/db";
import { agentCustomIntegrationBindings, customIntegrationTools, customIntegrations } from "@rudderhq/db";
import type { CreateCustomIntegration, CreateCustomIntegrationToolCall, CustomIntegrationSummary, UpdateCustomIntegrationBinding } from "@rudderhq/shared";
type Actor = {
    userId?: string | null;
    agentId?: string | null;
};
type CustomIntegrationRow = typeof customIntegrations.$inferSelect;
type CustomIntegrationToolRow = typeof customIntegrationTools.$inferSelect;
type AgentCustomIntegrationBindingRow = typeof agentCustomIntegrationBindings.$inferSelect;
export declare function summarizeCustomIntegration(integration: CustomIntegrationRow, binding: AgentCustomIntegrationBindingRow | null, tools: CustomIntegrationToolRow[]): CustomIntegrationSummary;
export declare function customIntegrationService(db: Db): {
    listForAgent: (orgId: string, agentId: string) => Promise<CustomIntegrationSummary[]>;
    createForAgent: (orgId: string, agentId: string, input: CreateCustomIntegration, actor?: Actor) => Promise<CustomIntegrationSummary>;
    updateBindingForAgent: (orgId: string, agentId: string, integrationId: string, input: UpdateCustomIntegrationBinding) => Promise<CustomIntegrationSummary>;
    revokeForAgent: (orgId: string, agentId: string, integrationId: string, actor?: Actor) => Promise<CustomIntegrationSummary | null>;
    listRuntimeToolsForAgent: (orgId: string, agentId: string) => Promise<{
        integrationId: string;
        integrationName: string;
        kind: "custom_api" | "mcp_server";
        scope: "organization" | "agent";
        toolName: string;
        externalToolName: string;
        description: string | null;
    }[]>;
    recordToolCall: (orgId: string, agentId: string, integrationId: string, input: CreateCustomIntegrationToolCall) => Promise<{
        conversationId: string | null;
        issueId: string | null;
        id: string;
        orgId: string;
        status: string;
        createdAt: Date;
        toolId: string;
        runId: string | null;
        agentId: string;
        startedAt: Date;
        completedAt: Date | null;
        errorCode: string | null;
        integrationId: string;
        sanitizedInput: Record<string, unknown>;
        sanitizedResult: Record<string, unknown> | null;
        errorMessage: string | null;
    }>;
};
export {};
//# sourceMappingURL=custom-integrations.d.ts.map