export declare const GITHUB_OBSERVATION_KINDS: readonly ["issue", "comment", "label", "branch", "pull_request", "review", "check"]; export type GithubObservationKind = (typeof GITHUB_OBSERVATION_KINDS)[number]; export declare const GITHUB_SYNC_STREAMS: readonly ["issues", "branches", "pull_requests"]; export type GithubSyncStream = (typeof GITHUB_SYNC_STREAMS)[number]; export interface GithubObservationBase> { readonly schema_version: 1; readonly observation_key: string; readonly kind: Kind; readonly repository: string; readonly source_id_sha256: string; readonly source_version: string; readonly change: "present" | "removed"; readonly presence_generation: number; readonly observed_at: string; readonly payload_sha256: string; readonly snapshot: Snapshot | GithubRemovalSnapshot; } export interface GithubRemovalSnapshot extends Record { readonly removed: true; readonly previous_payload_sha256: string; readonly presence_generation: number; } export interface GithubIssueSnapshot extends Record { readonly number: number; readonly issue_node_id: string; readonly title: string; readonly body: string; readonly labels: readonly string[]; readonly url: string; readonly state: "OPEN" | "CLOSED"; readonly updated_at: string; } export interface GithubCommentSnapshot extends Record { readonly issue_number: number; readonly body: string; readonly url: string; readonly author: string | null; readonly created_at: string; readonly updated_at: string; } export interface GithubLabelSnapshot extends Record { readonly issue_number: number; readonly name: string; readonly color: string; readonly description: string | null; readonly updated_at: string | null; } export interface GithubBranchSnapshot extends Record { readonly name: string; readonly head_oid: string; } export interface GithubPullRequestSnapshot extends Record { readonly number: number; readonly title: string; readonly body: string; readonly url: string; readonly state: "OPEN" | "CLOSED" | "MERGED"; readonly is_draft: boolean; readonly head_ref_name: string; readonly head_oid: string; readonly base_ref_name: string; readonly updated_at: string; } export interface GithubReviewSnapshot extends Record { readonly pull_request_number: number; readonly state: string; readonly body: string; readonly url: string; readonly author: string | null; readonly submitted_at: string | null; readonly updated_at: string; } export interface GithubCheckSnapshot extends Record { readonly pull_request_number: number; readonly commit_oid: string; readonly check_type: "check_run" | "status_context"; readonly name: string; readonly status: string; readonly conclusion: string | null; readonly url: string | null; readonly started_at: string | null; readonly completed_at: string | null; readonly updated_at: string | null; } export interface GithubSnapshotByKind { readonly issue: GithubIssueSnapshot; readonly comment: GithubCommentSnapshot; readonly label: GithubLabelSnapshot; readonly branch: GithubBranchSnapshot; readonly pull_request: GithubPullRequestSnapshot; readonly review: GithubReviewSnapshot; readonly check: GithubCheckSnapshot; } export type GithubObservationFor = GithubObservationBase; export type GithubIssueObservation = GithubObservationFor<"issue">; export type GithubCommentObservation = GithubObservationFor<"comment">; export type GithubLabelObservation = GithubObservationFor<"label">; export type GithubBranchObservation = GithubObservationFor<"branch">; export type GithubPullRequestObservation = GithubObservationFor<"pull_request">; export type GithubReviewObservation = GithubObservationFor<"review">; export type GithubCheckObservation = GithubObservationFor<"check">; export type GithubObservation = GithubIssueObservation | GithubCommentObservation | GithubLabelObservation | GithubBranchObservation | GithubPullRequestObservation | GithubReviewObservation | GithubCheckObservation; export interface GithubStreamWatermark { readonly page_count: number; readonly terminal_cursor_sha256: string | null; } export interface GithubWatermark { readonly schema_version: 1; readonly repository: string; readonly generation: number; readonly completed_at: string; readonly observation_count: number; readonly batch_sha256: string; readonly streams: Readonly>; readonly inventory: readonly GithubInventoryEntry[]; } export interface GithubInventoryEntry { readonly observation_key: string; readonly kind: GithubObservationKind; readonly source_id_sha256: string; readonly payload_sha256: string; readonly presence_generation: number; } export interface GithubSyncBatch { readonly repository: string; readonly previous_watermark: GithubWatermark | null; readonly proposed_watermark: GithubWatermark; readonly observations: readonly GithubObservation[]; } export interface GithubSyncResult { readonly watermark: GithubWatermark; readonly observations: readonly GithubObservation[]; readonly watermark_path: string; }