/// <reference types="react" />
import * as _backstage_core_components from '@backstage/core-components';
import * as _backstage_catalog_model from '@backstage/catalog-model';
import { Entity } from '@backstage/catalog-model';
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
import { DiscoveryApi } from '@backstage/core-plugin-api';

declare const gitlabPlugin: _backstage_core_plugin_api.BackstagePlugin<{}, {}, {}>;
declare const EntityGitlabContent: () => JSX.Element;
declare const EntityGitlabLanguageCard: ({}: {}) => JSX.Element;
declare const EntityGitlabPeopleCard: ({}: {}) => JSX.Element;
declare const EntityGitlabMergeRequestsTable: ({}: {}) => JSX.Element;
declare const EntityGitlabMergeRequestStatsCard: (props: {
    entity?: _backstage_catalog_model.Entity | undefined;
    variant?: _backstage_core_components.InfoCardVariants | undefined;
}) => JSX.Element;
declare const EntityGitlabPipelinesTable: ({}: {}) => JSX.Element;
declare const EntityGitlabIssuesTable: ({}: {}) => JSX.Element;

declare type PersonData = {
    name: string;
    email: string;
    avatar_url: string;
    id: number;
    state: string;
    username: string;
    web_url: string;
};
declare type MergeRequest = {
    id: string;
    iid: string;
    project_id: string;
    state: string;
    created_date: string;
    author: {
        username: string;
    };
    title: string;
    created_at: string;
    merged_at: string;
    updated_at: string;
    closed_at: string;
    web_url: string;
};
declare type PipelineObject = {
    id: string;
    project_id: string;
    ref: string;
    status: string;
    web_url: string;
    project_name: string;
    onRestartClick: () => void;
    created_at: string;
    updated_at: string;
};
declare type IssueObject = {
    id: string;
    project_name: string;
    project_id: string;
    title: string;
    state: IssueState;
    type: IssueType;
    description: string;
    created_at: string;
    updated_at: string;
    author: Author;
    web_url: string;
};
declare type Author = {
    id: string;
    username: string;
    name: string;
    avatar_url: string;
    web_url: string;
};
declare type IssueState = 'opened' | 'closed';
declare type IssueType = 'issue' | 'incident' | 'test_case';

interface PipelineSummary {
    getPipelinesData: PipelineObject[];
}
interface ContributorsSummary {
    getContributorsData: PersonData[];
}
interface MergeRequestsSummary {
    getMergeRequestsData: MergeRequest[];
}
interface MergeRequestsStatusSummary {
    getMergeRequestsStatusData: MergeRequest[];
}
interface LanguagesSummary {
    getLanguagesData: any;
}
interface IssuesSummary {
    getIssuesData: IssueObject[];
}
declare const GitlabCIApiRef: _backstage_core_plugin_api.ApiRef<GitlabCIApi>;
declare type GitlabCIApi = {
    getPipelineSummary(projectID: string): Promise<PipelineSummary | undefined>;
    getContributorsSummary(projectID: string): Promise<ContributorsSummary | undefined>;
    getMergeRequestsSummary(projectID: string): Promise<MergeRequestsSummary | undefined>;
    getMergeRequestsStatusSummary(projectID: string, count: number): Promise<MergeRequestsStatusSummary | undefined>;
    getProjectName(projectID: string): Promise<string | undefined>;
    getLanguagesSummary(projectID: string): Promise<LanguagesSummary | undefined>;
    retryPipelineBuild(projectID: string, pipelineID: string): Promise<Record<string, unknown> | undefined>;
    getProjectDetails(projectSlug: string): Promise<Record<string, unknown> | undefined>;
    getIssuesSummary(projectID: string): Promise<IssuesSummary | undefined>;
    getCodeOwners(projectID?: string, branch?: string, filePath?: string): Promise<PersonData[]>;
    getContributorsLink(projectWebUrl: string | undefined, projectDefaultBranch: string | undefined): string;
    getOwnersLink(projectWebUrl: string | undefined, projectDefaultBranch: string | undefined, codeOwnersPath: string): string;
};

declare class GitlabCIClient implements GitlabCIApi {
    discoveryApi: DiscoveryApi;
    baseUrl: string;
    proxyPath: string;
    codeOwnersPath: string;
    constructor({ discoveryApi, baseUrl, proxyPath, codeOwnersPath, }: {
        discoveryApi: DiscoveryApi;
        baseUrl?: string;
        proxyPath?: string;
        codeOwnersPath?: string;
    });
    protected callApi<T>(path: string, query: {
        [key in string]: any;
    }): Promise<T | null>;
    getPipelineSummary(projectID?: string): Promise<PipelineSummary | undefined>;
    getIssuesSummary(projectId: string): Promise<IssuesSummary | undefined>;
    getProjectName(projectID?: string): Promise<string | undefined>;
    private getUserProfilesData;
    private getUserDetail;
    getMergeRequestsSummary(projectID?: string): Promise<MergeRequestsSummary | undefined>;
    getMergeRequestsStatusSummary(projectID?: string, count?: number): Promise<MergeRequestsStatusSummary | undefined>;
    getContributorsSummary(projectID?: string): Promise<ContributorsSummary | undefined>;
    getLanguagesSummary(projectID?: string): Promise<LanguagesSummary | undefined>;
    getProjectDetails(projectSlug?: string): Promise<any | undefined>;
    retryPipelineBuild(projectID?: string, pipelineID?: string): Promise<any | undefined>;
    getCodeOwners(projectID?: string, branch?: string, filePath?: string): Promise<PersonData[]>;
    getContributorsLink(projectWebUrl: string | undefined, projectDefaultBranch: string | undefined): string;
    getOwnersLink(projectWebUrl: string | undefined, projectDefaultBranch: string | undefined, codeOwnersPath: string): string;
}

declare const isGitlabAvailable: (entity: Entity) => boolean;

export { ContributorsSummary, EntityGitlabContent, EntityGitlabIssuesTable, EntityGitlabLanguageCard, EntityGitlabMergeRequestStatsCard, EntityGitlabMergeRequestsTable, EntityGitlabPeopleCard, EntityGitlabPipelinesTable, GitlabCIApi, GitlabCIApiRef, GitlabCIClient, IssuesSummary, LanguagesSummary, MergeRequestsStatusSummary, MergeRequestsSummary, PipelineSummary, gitlabPlugin, isGitlabAvailable };
