import { PlatformApiClient } from '../platform/api-client.js'; export declare const GITLAB_PROJECTS_PAGE_SIZE = 100; export declare const GITLAB_ISSUES_PAGE_SIZE = 30; export declare const GITLAB_NOTES_PAGE_SIZE = 100; export declare const GITLAB_MIN_ACCESS_LEVEL = 20; export declare const GITLAB_MERGE_REQUESTS_PAGE_SIZE = 30; export declare const GITLAB_DISCUSSIONS_PAGE_SIZE = 100; export type GitLabApiErrorCode = 'gitlab_auth_failed' | 'gitlab_request_failed'; export declare class GitLabApiError extends Error { readonly status: number | null; readonly code: GitLabApiErrorCode; constructor(message: string, status: number | null); } export interface GitLabProject { id: number; name: string; path_with_namespace: string; web_url: string; default_branch?: string | null; } export interface GitLabUser { id?: number; name?: string | null; username: string; } export interface GitLabLabelDetail { name: string; color: string; text_color?: string; } export interface GitLabIssue { id: number; iid: number; project_id: number; title: string; description?: string | null; state: 'opened' | 'closed'; web_url: string; author?: GitLabUser | null; assignee?: GitLabUser | null; assignees?: GitLabUser[]; labels?: string[]; labelDetails?: GitLabLabelDetail[]; weight?: number | null; user_notes_count?: number; created_at: string; updated_at: string; } export interface GitLabNote { id: number; body: string; type?: string | null; author?: GitLabUser | null; created_at: string; updated_at?: string; system?: boolean; } export interface GitLabDiffRefs { base_sha: string; start_sha: string; head_sha: string; } export interface GitLabMergeRequest { id: number; iid: number; project_id: number; title: string; description?: string | null; state: 'opened' | 'closed' | 'merged' | 'locked'; web_url: string; author?: GitLabUser | null; assignees?: GitLabUser[]; reviewers?: GitLabUser[]; labels?: string[]; source_branch: string; target_branch: string; sha: string; merge_commit_sha?: string | null; squash_commit_sha?: string | null; diff_refs?: GitLabDiffRefs | null; merge_status?: string; detailed_merge_status?: string; draft?: boolean; work_in_progress?: boolean; merged_at?: string | null; user_notes_count?: number; created_at: string; updated_at: string; } export interface GitLabMergeResult extends GitLabMergeRequest { message?: string; } export interface GitLabDiscussionPosition { position_type: 'text'; base_sha: string; start_sha: string; head_sha: string; old_path: string; new_path: string; old_line?: number | null; new_line?: number | null; line_range?: { start: GitLabDiscussionLine; end: GitLabDiscussionLine; }; } export interface GitLabDiscussionLine { line_code: string; type: 'old' | 'new'; old_line?: number | null; new_line?: number | null; } export interface GitLabDiscussionNote extends GitLabNote { position?: GitLabDiscussionPosition | null; resolvable?: boolean; resolved?: boolean; } export interface GitLabDiscussion { id: string; individual_note?: boolean; notes: GitLabDiscussionNote[]; } export interface GitLabMergeRequestApprovals { approved: boolean; approvals_required?: number; approvals_left?: number; approved_by?: Array<{ user: GitLabUser; }>; } export interface GitLabMember { id: number; username: string; name?: string | null; state?: string; access_level?: number; } export interface GitLabApiClientConfig { baseUrl: string; accessToken: string; fetchImpl?: typeof fetch; } export interface PlatformGitLabApiClientConfig { client: PlatformApiClient; connectionId: string; } export declare class GitLabApiClient { #private; constructor(config: GitLabApiClientConfig | PlatformGitLabApiClientConfig); getCurrentUser(): Promise; getProject(projectId: string): Promise; listProjects(options?: { page?: number; }): Promise; listIssues(projectId: string, options?: { page?: number; labels?: string[]; }): Promise; getIssue(projectId: string, issueIid: number): Promise; listNotes(projectId: string, issueIid: number, options?: { page?: number; }): Promise; createNote(projectId: string, issueIid: number, body: string): Promise; updateIssueState(projectId: string, issueIid: number, stateEvent: 'close' | 'reopen'): Promise; listMergeRequests(projectId: string, options?: { page?: number; state?: 'opened' | 'closed' | 'merged' | 'all'; }): Promise; getMergeRequest(projectId: string, mergeRequestIid: number): Promise; createMergeRequest(projectId: string, input: { sourceBranch: string; targetBranch: string; title: string; description?: string; removeSourceBranch?: boolean; squash?: boolean; }): Promise; updateMergeRequest(projectId: string, mergeRequestIid: number, input: { title?: string; description?: string; targetBranch?: string; stateEvent?: 'close' | 'reopen'; removeSourceBranch?: boolean; squash?: boolean; reviewerIds?: number[]; }): Promise; mergeMergeRequest(projectId: string, mergeRequestIid: number, options?: { squash?: boolean; mergeCommitMessage?: string; squashCommitMessage?: string; shouldRemoveSourceBranch?: boolean; }): Promise; listMergeRequestNotes(projectId: string, mergeRequestIid: number, options?: { page?: number; }): Promise; createMergeRequestNote(projectId: string, mergeRequestIid: number, body: string): Promise; getMergeRequestNote(projectId: string, mergeRequestIid: number, noteId: number): Promise; updateMergeRequestNote(projectId: string, mergeRequestIid: number, noteId: number, body: string): Promise; deleteMergeRequestNote(projectId: string, mergeRequestIid: number, noteId: number): Promise; listMergeRequestDiscussions(projectId: string, mergeRequestIid: number, options?: { page?: number; }): Promise; getMergeRequestDiscussion(projectId: string, mergeRequestIid: number, discussionId: string): Promise; resolveMergeRequestDiscussion(projectId: string, mergeRequestIid: number, discussionId: string, resolved: boolean): Promise; createMergeRequestDiscussion(projectId: string, mergeRequestIid: number, input: { body: string; commitId?: string; position?: GitLabDiscussionPosition; }): Promise; addMergeRequestDiscussionNote(projectId: string, mergeRequestIid: number, discussionId: string, body: string): Promise; updateMergeRequestDiscussionNote(projectId: string, mergeRequestIid: number, discussionId: string, noteId: number, body: string): Promise; deleteMergeRequestDiscussionNote(projectId: string, mergeRequestIid: number, discussionId: string, noteId: number): Promise; getMergeRequestApprovals(projectId: string, mergeRequestIid: number): Promise; approveMergeRequest(projectId: string, mergeRequestIid: number, sha?: string): Promise; unapproveMergeRequest(projectId: string, mergeRequestIid: number): Promise; setMergeRequestReviewers(projectId: string, mergeRequestIid: number, reviewerIds: number[]): Promise; listProjectMembers(projectId: string, options?: { query?: string; page?: number; }): Promise; } //# sourceMappingURL=api.d.ts.map