import type { CommentAuthorAssociation } from "../types/github.mts"; import type { RawPrMergeFields } from "./batch-raw-rules.mts"; export interface RawBatchResponse { viewer?: { login: string | null; } | null; repository: { viewerPermission: string | null; viewerCanAdminister: boolean; pullRequest: RawPr | null; } | null; } export interface RawPr extends RawPrMergeFields { id: string; number: number; updatedAt?: string; state: string; isDraft: boolean; viewerDidAuthor: boolean; viewerCanUpdate: boolean; viewerCanEnableAutoMerge: boolean; viewerCanEditFiles: boolean; mergeable: string; mergeStateStatus: string; reviewDecision: string | null; headRefOid: string; headRefName: string; headRepository: { nameWithOwner: string; viewerPermission: string | null; } | null; baseRefName: string; baseRef: import("./batch-raw-rules.mts").RawBaseRef | null; reviewRequests: { nodes: Array<{ requestedReviewer: { login?: string; name?: string; } | null; }>; }; latestReviews: { nodes: Array<{ author: RawAuthor | null; state: string; }>; }; reviewThreads: { totalCount?: number; pageInfo: { hasPreviousPage: boolean; startCursor: string | null; }; nodes: RawThread[]; }; comments: { totalCount?: number; pageInfo: { hasPreviousPage: boolean; startCursor: string | null; }; nodes: RawComment[]; }; changesRequestedReviews: { pageInfo: { hasPreviousPage: boolean; startCursor: string | null; }; nodes: RawReview[]; }; reviewSummaries: { pageInfo: { hasPreviousPage: boolean; startCursor: string | null; }; nodes: RawReviewSummary[]; }; allReviews?: { totalCount: number; nodes?: Array<{ id: string; updatedAt?: string; }>; }; approvedReviews: { pageInfo: { hasPreviousPage: boolean; startCursor: string | null; }; nodes: RawReviewSummary[]; }; commits: { totalCount?: number; nodes: Array<{ commit: { oid: string; committedDate?: string; checkSuites?: RawCheckSuites; statusCheckRollup: { state?: string | null; contexts: { pageInfo: { hasNextPage: boolean; endCursor: string | null; }; nodes: Array; }; } | null; }; }>; }; } interface RawCheckSuites { pageInfo: { hasNextPage: boolean; }; nodes: Array<{ id?: string; conclusion: string | null; workflowRun: { databaseId: number | null; event: string | null; url: string | null; workflow: { name: string | null; } | null; } | null; }>; } interface RawAuthor { __typename?: string; login: string; } export interface RawThreadComment { id: string; isMinimized: boolean; url: string; authorAssociation?: CommentAuthorAssociation; viewerDidAuthor?: boolean; author: RawAuthor | null; pullRequestReview?: { id: string; } | null; body: string; path: string | null; line: number | null; startLine: number | null; createdAt?: string; updatedAt?: string; } export interface RawThread { id: string; isResolved: boolean; isOutdated: boolean; viewerCanReply: boolean; viewerCanResolve: boolean; path?: string | null; line?: number | null; startLine?: number | null; comments: { pageInfo?: { hasNextPage: boolean; endCursor: string | null; }; nodes: RawThreadComment[]; }; } export interface RawReviewThreadCommentsResponse { node: { __typename?: string; comments: { pageInfo: { hasNextPage: boolean; endCursor: string | null; }; nodes: RawThreadComment[]; } | null; } | null; } export interface RawComment { id: string; isMinimized: boolean; viewerCanMinimize: boolean; url: string; authorAssociation?: CommentAuthorAssociation; author: RawAuthor | null; body: string; createdAt?: string; updatedAt?: string; } export interface RawReview { id: string; authorAssociation?: CommentAuthorAssociation; author: RawAuthor | null; body: string; createdAt?: string; commit?: { oid: string; }; } export interface RawReviewSummary { id: string; isMinimized: boolean; viewerCanMinimize: boolean; authorAssociation?: CommentAuthorAssociation; author: RawAuthor | null; body: string; createdAt?: string; } export type RawContextNode = { __typename: "CheckRun"; id: string; name: string; status: string; conclusion: string | null; detailsUrl: string | null; completedAt?: string | null; startedAt?: string | null; title: string | null; summary: string | null; annotations?: { nodes: Array<{ message: string; }>; }; checkSuite: { createdAt?: string; updatedAt?: string; workflowRun: { event: string; createdAt?: string; updatedAt?: string; workflow?: { name: string; databaseId?: number | null; } | null; } | null; } | null; } | { __typename: "StatusContext"; context: string; state: string; createdAt?: string; targetUrl: string | null; description: string | null; }; export {};