/**
 * GitHub webhook types and signature verification utilities.
 *
 * Provides pure-function signature verification (HMAC-SHA256 with timing-safe
 * comparison) and header extraction helpers for GitHub webhook payloads.
 *
 * @see https://docs.github.com/en/webhooks/using-webhooks/validating-webhook-deliveries
 */
/** Header containing the event type (e.g., 'push', 'pull_request', 'issues'). */
export declare const GITHUB_EVENT_HEADER = "x-github-event";
/** Header containing the HMAC-SHA256 signature: 'sha256=<hex>'. */
export declare const GITHUB_SIGNATURE_HEADER = "x-hub-signature-256";
/** Header containing the unique delivery ID (UUID). */
export declare const GITHUB_DELIVERY_HEADER = "x-github-delivery";
/** Extracted GitHub-specific headers from an incoming webhook request. */
export interface GitHubWebhookHeaders {
    /** Event type (e.g., 'push', 'pull_request', 'issues'). Defaults to 'unknown'. */
    event: string;
    /** HMAC-SHA256 signature value from X-Hub-Signature-256 header. */
    signature?: string;
    /** Unique delivery ID from X-GitHub-Delivery header. */
    deliveryId?: string;
}
/**
 * Verify a GitHub webhook signature (HMAC-SHA256).
 *
 * Computes HMAC-SHA256 of the raw body using the shared secret and compares
 * it against the signature from the X-Hub-Signature-256 header using
 * timing-safe comparison to prevent timing attacks.
 *
 * @param rawBody - The raw request body as a Buffer.
 * @param signatureHeader - The value of X-Hub-Signature-256 (e.g., 'sha256=abc123...').
 * @param secret - The webhook secret configured in GitHub.
 * @returns true if the signature is valid, false otherwise.
 */
export declare function verifyGitHubSignature(rawBody: Buffer, signatureHeader: string, secret: string): boolean;
/**
 * Extract GitHub-specific headers from an Express request headers object.
 *
 * Returns a clean typed object with the event type, optional signature,
 * and optional delivery ID. Defaults event to 'unknown' if the header
 * is missing.
 */
export declare function extractGitHubHeaders(headers: Record<string, string | string[] | undefined>): GitHubWebhookHeaders;
//# sourceMappingURL=github-types.d.ts.map