import GitLabAPI from "./gitlab/GitLabAPI"; import { Comment, Platform } from "./platform"; import { GitDSL, GitJSONDSL } from "../dsl/GitDSL"; import { GitLabDSL, GitLabJSONDSL } from "../dsl/GitLabDSL"; import type * as Types from "@gitbeaker/rest"; declare class GitLab implements Platform { readonly api: GitLabAPI; readonly name: string; constructor(api: GitLabAPI); getReviewInfo: () => Promise; getPlatformReviewDSLRepresentation: () => Promise; getPlatformGitRepresentation: () => Promise; getInlineComments: (dangerID: string) => Promise; supportsCommenting(): boolean; supportsInlineComments(): boolean; updateOrCreateComment: (dangerID: string, newComment: string) => Promise; createComment: (_dangerID: string, comment: string) => Promise; createInlineComment: (git: GitDSL, comment: string, path: string, line: number) => Promise; updateInlineComment: (comment: string, id: string) => Promise; deleteInlineComment: (id: string) => Promise; /** * Attempts to delete the "main" Danger comment. If the "main" Danger * comment has any comments on it then that comment will not be deleted. */ deleteMainComment: (dangerID: string) => Promise; deleteDiscussions: (discussions: Types.DiscussionSchema[]) => Promise; deleteDiscussion: (discussion: Types.DiscussionSchema) => Promise; /** * Only fetches the discussions where danger owns the top note */ getDangerDiscussions: (dangerID: string) => Promise; isDangerDiscussionSystemResolved: (discussion: Types.DiscussionSchema) => boolean; getDiffNotesFromDiscussions: (discussions: Types.DiscussionSchema[]) => Types.DiscussionNoteSchema[]; /** * Attempts to find the "main" Danger note and should return at most * one item. If the "main" Danger note has any comments on it then that * note will not be returned. */ getMainDangerNotes: (dangerID: string) => Promise; /** * Filters a note to determine if it was created by Danger. */ getDangerDiscussionNoteFilter: (dangerID: string) => Promise<(note: Types.DiscussionNoteSchema) => boolean>; /** * Filters a note to the "main" Danger note. If that note has any * comments on it then it will not be found. */ getDangerMainNoteFilter: (dangerID: string) => Promise<(note: Types.MergeRequestNoteSchema) => boolean>; updateStatus: () => Promise; getFileContents: (path: string, slug?: string | undefined, ref?: string | undefined) => Promise; } export default GitLab; export declare const gitlabJSONToGitLabDSL: (gl: GitLabDSL, api: GitLabAPI) => GitLabDSL;