/**
 * Admin API routes for webhook source management.
 *
 * Provides CRUD endpoints for managing webhook sources (GitHub Apps, etc.)
 * through the admin API. Source secrets (private keys, webhook secrets) are
 * stored via PgSecretStore and never exposed in list/get responses.
 *
 * All routes are mounted under /api/v1/admin/sources and protected by
 * the admin auth middleware in admin.ts.
 */
import { Hono } from 'hono';
import type { SourceStore } from '../sources/source-store.js';
import type { Role } from '../secrets/rbac.js';
interface SourceRouteDeps {
    sourceStore: SourceStore;
    /**
     * Resolve the public webhook URL for a freshly added source so the CLI can
     * print it. Platform/hybrid mode registers the source with the Platform and
     * reads the URL from the `source.register.ack`; independent mode returns a
     * null URL with an explanatory `webhookNote`. Omitted in deployments with no
     * resolver wired (the route then returns `webhookUrl: null`).
     */
    resolveSourceWebhookUrl?: (params: {
        routingKey: string;
        provider: string;
        sourceId: string;
    }) => Promise<{
        webhookUrl: string | null;
        webhookNote?: string;
    }>;
}
type AdminSourcesEnv = {
    Variables: {
        role: Role;
        userId: string;
        routingKey: string | null;
    };
};
export declare function createSourceRoutes(deps: SourceRouteDeps): Hono<AdminSourcesEnv>;
export {};
//# sourceMappingURL=admin-sources.d.ts.map