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

//#region src/data-access/manage/webhookDestinations.d.ts
declare const getWebhookDestinationById: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  webhookDestinationId: string;
}) => Promise<WebhookDestinationSelect | undefined>;
declare const listWebhookDestinationsPaginated: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  pagination?: PaginationConfig;
  agentId?: string;
}) => Promise<{
  data: {
    createdAt: string;
    updatedAt: string;
    enabled: boolean;
    url: string | null;
    slackChannelId: string | null;
    eventTypes: string[];
    headers: Record<string, string> | null;
    name: string;
    description: string | null;
    projectId: string;
    tenantId: string;
    id: string;
  }[];
  pagination: {
    page: number;
    limit: number;
    total: number;
    pages: number;
  };
}>;
type WebhookDestinationWithScoping = WebhookDestinationSelect & {
  agentIds: string[];
  evaluatorIds: string[];
};
/** @deprecated Use {@link WebhookDestinationWithScoping} instead. */
type WebhookDestinationWithAgents = WebhookDestinationWithScoping;
declare const listEnabledWebhookDestinations: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  agentId: string;
}) => Promise<WebhookDestinationWithScoping[]>;
declare const createWebhookDestination: (db: AgentsManageDatabaseClient) => (params: WebhookDestinationInsert) => Promise<WebhookDestinationSelect>;
declare const updateWebhookDestination: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  webhookDestinationId: string;
  data: WebhookDestinationUpdate;
}) => Promise<WebhookDestinationSelect | undefined>;
declare const deleteWebhookDestination: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  webhookDestinationId: string;
}) => Promise<boolean>;
declare const getWebhookDestinationAgentIds: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  webhookDestinationId: string;
}) => Promise<string[]>;
declare const setWebhookDestinationAgentIds: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  webhookDestinationId: string;
  agentIds: string[];
}) => Promise<void>;
declare const getWebhookDestinationEvaluatorIds: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  webhookDestinationId: string;
}) => Promise<string[]>;
declare const setWebhookDestinationEvaluatorIds: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  webhookDestinationId: string;
  evaluatorIds: string[];
}) => Promise<void>;
//#endregion
export { WebhookDestinationWithAgents, WebhookDestinationWithScoping, createWebhookDestination, deleteWebhookDestination, getWebhookDestinationAgentIds, getWebhookDestinationById, getWebhookDestinationEvaluatorIds, listEnabledWebhookDestinations, listWebhookDestinationsPaginated, setWebhookDestinationAgentIds, setWebhookDestinationEvaluatorIds, updateWebhookDestination };