import type { ControlPlaneOperation, ControlPlaneStore } from '../control-plane';
import type { SourceConnectionStore } from './store';
import type { SourceProvider, SourceWebhook } from './types';
export interface NormalizedSourceEvent {
    event: 'push' | 'pull_request';
    action?: string;
    repository: string;
    ref?: string;
    branch?: string;
    tag?: string;
    commitSha: string;
    changedPaths: string[];
    pullRequestNumber?: number;
    fork?: boolean;
    deleted?: boolean;
}
export interface ProcessSourceWebhookResult {
    accepted: boolean;
    duplicate: boolean;
    status: 'rejected' | 'ignored' | 'enqueued' | 'duplicate';
    operations: ControlPlaneOperation[];
    message: string;
}
export declare function normalizeSourceEvent(_provider: SourceProvider, _headers: Headers | Record<string, string | undefined>, _body: Record<string, any>): NormalizedSourceEvent | undefined;
export declare function processSourceWebhook(input: {
    sources: SourceConnectionStore;
    controlPlane: ControlPlaneStore;
    endpointToken: string;
    headers: Headers | Record<string, string | undefined>;
    rawBody: Uint8Array;
    now?: Date;
}): Promise<ProcessSourceWebhookResult>;
export declare function webhookEndpoint(baseUrl: string, webhook: SourceWebhook): string;
