/**
 * GitHub webhook event shapes used by the ingestion connector.
 * Spec: https://docs.github.com/en/webhooks/webhook-events-and-payloads
 *
 * V1 cares about four event types: issues, issue_comment, pull_request,
 * pull_request_review_comment. Each guard is gated on the X-GitHub-Event
 * header value so a malicious or misrouted payload cannot satisfy a guard
 * for the wrong event type.
 */
/**
 * Codex P1 #7: `private` MUST be optional, not required. The Slack-style
 * fail-safe in scope.ts requires an envelope with `private: undefined` to
 * map to private; a strict boolean type would reject the payload before
 * scope can fail closed.
 */
export interface GitHubRepository {
    full_name: string;
    private?: boolean;
    owner: {
        login: string;
    };
    name: string;
    id?: number;
}
export interface GitHubSender {
    login: string;
    id: number;
}
export interface GitHubInstallation {
    id: number;
}
export interface GitHubWebhookEnvelope {
    action?: string;
    repository?: GitHubRepository;
    sender?: GitHubSender;
    installation?: GitHubInstallation;
}
export interface GitHubIssueEvent extends GitHubWebhookEnvelope {
    action: 'opened' | 'edited' | 'closed' | 'reopened' | 'deleted';
    issue: {
        number: number;
        title: string;
        body: string | null;
        user: GitHubSender;
        updated_at?: string;
    };
}
export interface GitHubIssueCommentEvent extends GitHubWebhookEnvelope {
    action: 'created' | 'edited' | 'deleted';
    issue: {
        number: number;
    };
    comment: {
        id: number;
        body: string | null;
        user: GitHubSender;
        updated_at?: string;
    };
}
export interface GitHubPullRequestEvent extends GitHubWebhookEnvelope {
    action: 'opened' | 'edited' | 'closed' | 'reopened' | 'synchronize' | 'ready_for_review';
    pull_request: {
        number: number;
        title: string;
        body: string | null;
        user: GitHubSender;
        updated_at?: string;
    };
}
export interface GitHubPullRequestReviewCommentEvent extends GitHubWebhookEnvelope {
    action: 'created' | 'edited' | 'deleted';
    pull_request: {
        number: number;
    };
    comment: {
        id: number;
        body: string | null;
        user: GitHubSender;
        updated_at?: string;
    };
}
export declare function isGitHubWebhookEnvelope(x: unknown): x is GitHubWebhookEnvelope;
export declare function isGitHubIssueEvent(x: unknown, evtHeader: string): x is GitHubIssueEvent;
export declare function isGitHubIssueCommentEvent(x: unknown, evtHeader: string): x is GitHubIssueCommentEvent;
export declare function isGitHubPullRequestEvent(x: unknown, evtHeader: string): x is GitHubPullRequestEvent;
export declare function isGitHubPullRequestReviewCommentEvent(x: unknown, evtHeader: string): x is GitHubPullRequestReviewCommentEvent;
//# sourceMappingURL=types.d.ts.map