import type * as Types from "@gitbeaker/rest"; import { Env } from "../../ci_source/ci_source"; import { RepoMetaData } from "../../dsl/RepoMetaData"; export type GitLabAPIToken = string; export type GitLabOAuthToken = string; export interface RootGitLabAPICredentials { host: string; } export interface GitLabAPICredentialsOptionsWithAccessToken extends RootGitLabAPICredentials { token: GitLabAPIToken; } export interface GitLabAPICredentialsOptionsWithOAuthToken extends RootGitLabAPICredentials { oauthToken: GitLabOAuthToken; } export type GitLabAPICredentials = GitLabAPICredentialsOptionsWithAccessToken | GitLabAPICredentialsOptionsWithOAuthToken; export declare function getGitLabHostFromEnv(env: Env): string; export declare function getGitLabAPICredentialsFromEnv(env: Env): GitLabAPICredentials; declare class GitLabAPI { readonly repoMetadata: RepoMetaData; readonly repoCredentials: GitLabAPICredentials; private readonly api; private readonly hostURL; private readonly d; private readonly repoSlug; private readonly prId; constructor(repoMetadata: RepoMetaData, repoCredentials: GitLabAPICredentials); get projectURL(): string; get mergeRequestURL(): string; get apiInstance(): import("@gitbeaker/core").Gitlab; getUser: () => Promise; getMergeRequestInfo: () => Promise; updateMergeRequestInfo: (changes: Types.EditMergeRequestOptions) => Promise; getMergeRequestApprovals: () => Promise; getMergeRequestDiffs: () => Promise; getMergeRequestCommits: () => Promise; getMergeRequestDiscussions: () => Promise; getMergeRequestNotes: () => Promise; createMergeRequestDiscussion: (content: string, options?: { position?: Types.DiscussionNotePositionOptions; }) => Promise; createMergeRequestNote: (body: string) => Promise; updateMergeRequestDiscussionNote: (discussionId: string, noteId: number, body: string) => Promise; updateMergeRequestNote: (id: number, body: string) => Promise; deleteMergeRequestDiscussionNote: (discussionId: string, noteId: number) => Promise; deleteMergeRequestNote: (id: number) => Promise; getFileContents: (path: string, slug?: string, ref?: string) => Promise; getCompareChanges: (base?: string, head?: string) => Promise; addLabels: (...labels: string[]) => Promise; removeLabels: (...labels: string[]) => Promise; } export default GitLabAPI;