import type { ApiContext } from "./context.js"; export type CommentState = "OPEN" | "PENDING" | "RESOLVED"; export type CommentSeverity = "NORMAL" | "BLOCKER"; export type LineType = "ADDED" | "REMOVED" | "CONTEXT"; export type DiffType = "EFFECTIVE" | "RANGE" | "COMMIT"; export type FileType = "TO" | "FROM"; interface CommentTarget { project?: string; repository: string; prId: number; } export interface CreateCommentParams extends CommentTarget { text?: string; parentId?: number; state?: CommentState; severity?: CommentSeverity; filePath?: string; line?: number; lineType?: LineType; diffType?: DiffType; fileType?: FileType; } export interface UpdateCommentParams extends CommentTarget { commentId?: number; text?: string; version?: number; severity?: CommentSeverity; state?: CommentState; threadResolved?: boolean; } export interface DeleteCommentParams extends CommentTarget { commentId?: number; version?: number; } export interface ReactionParams extends CommentTarget { commentId?: number; emoticon?: string; } export declare function commentsApi(ctx: ApiContext): { create(params: CreateCommentParams): Promise>; update(params: UpdateCommentParams): Promise>; delete(params: DeleteCommentParams): Promise<{ deleted: true; commentId?: number; }>; react(params: ReactionParams): Promise<{ react: true; commentId?: number; emoticon?: string; }>; unreact(params: ReactionParams): Promise<{ unreact: true; commentId?: number; emoticon?: string; }>; }; export type CommentsApi = ReturnType; export {};