Do not edit this file. It is a report generated by API Extractor.
import { Config } from '@backstage/config';
import { RestEndpointMethodTypes } from '@octokit/rest';
// @public
export class AwsS3Integration implements ScmIntegration {
constructor(integrationConfig: AwsS3IntegrationConfig);
// (undocumented)
get config(): AwsS3IntegrationConfig;
// (undocumented)
static factory: ScmIntegrationsFactory<AwsS3Integration>;
// (undocumented)
resolveEditUrl(url: string): string;
// (undocumented)
resolveUrl(options: {
url: string;
base: string;
lineNumber?: number | undefined;
}): string;
// (undocumented)
get title(): string;
// (undocumented)
get type(): string;
}
// @public
export type AwsS3IntegrationConfig = {
host: string;
endpoint?: string;
s3ForcePathStyle?: boolean;
accessKeyId?: string;
secretAccessKey?: string;
roleArn?: string;
externalId?: string;
};
// @public
export type AzureCredential = ClientSecret | ManagedIdentity;
// @public
export class AzureIntegration implements ScmIntegration {
constructor(integrationConfig: AzureIntegrationConfig);
// (undocumented)
get config(): AzureIntegrationConfig;
// (undocumented)
static factory: ScmIntegrationsFactory<AzureIntegration>;
// (undocumented)
resolveEditUrl(url: string): string;
// (undocumented)
resolveUrl(options: {
url: string;
base: string;
lineNumber?: number;
}): string;
// (undocumented)
get title(): string;
// (undocumented)
get type(): string;
}
// @public
export type AzureIntegrationConfig = {
host: string;
token?: string;
credential?: AzureCredential;
};
// @public
export class BitbucketCloudIntegration implements ScmIntegration {
constructor(integrationConfig: BitbucketCloudIntegrationConfig);
// (undocumented)
get config(): BitbucketCloudIntegrationConfig;
// (undocumented)
static factory: ScmIntegrationsFactory<BitbucketCloudIntegration>;
// (undocumented)
resolveEditUrl(url: string): string;
// (undocumented)
resolveUrl(options: {
url: string;
base: string;
lineNumber?: number;
}): string;
// (undocumented)
get title(): string;
// (undocumented)
get type(): string;
}
// @public
export type BitbucketCloudIntegrationConfig = {
host: string;
apiBaseUrl: string;
username?: string;
appPassword?: string;
};
// @public @deprecated
export class BitbucketIntegration implements ScmIntegration {
constructor(integrationConfig: BitbucketIntegrationConfig);
// (undocumented)
get config(): BitbucketIntegrationConfig;
// (undocumented)
static factory: ScmIntegrationsFactory<BitbucketIntegration>;
// (undocumented)
resolveEditUrl(url: string): string;
// (undocumented)
resolveUrl(options: {
url: string;
base: string;
lineNumber?: number;
}): string;
// (undocumented)
get title(): string;
// (undocumented)
get type(): string;
}
// @public @deprecated
export type BitbucketIntegrationConfig = {
host: string;
apiBaseUrl: string;
token?: string;
username?: string;
appPassword?: string;
};
// @public
export class BitbucketServerIntegration implements ScmIntegration {
constructor(integrationConfig: BitbucketServerIntegrationConfig);
// (undocumented)
get config(): BitbucketServerIntegrationConfig;
// (undocumented)
static factory: ScmIntegrationsFactory<BitbucketServerIntegration>;
// (undocumented)
resolveEditUrl(url: string): string;
// (undocumented)
resolveUrl(options: {
url: string;
base: string;
lineNumber?: number;
}): string;
// (undocumented)
get title(): string;
// (undocumented)
get type(): string;
}
// @public
export type BitbucketServerIntegrationConfig = {
host: string;
apiBaseUrl: string;
token?: string;
username?: string;
password?: string;
};
// @public
export type ClientSecret = {
tenantId: string;
clientId: string;
clientSecret: string;
};
// @public
export class DefaultGithubCredentialsProvider
implements GithubCredentialsProvider
{
// (undocumented)
static fromIntegrations(
integrations: ScmIntegrationRegistry,
): DefaultGithubCredentialsProvider;
getCredentials(opts: { url: string }): Promise<GithubCredentials>;
}
// @public
export function defaultScmResolveUrl(options: {
url: string;
base: string;
lineNumber?: number;
}): string;
// @public
export class GerritIntegration implements ScmIntegration {
constructor(integrationConfig: GerritIntegrationConfig);
// (undocumented)
get config(): GerritIntegrationConfig;
// (undocumented)
static factory: ScmIntegrationsFactory<GerritIntegration>;
// (undocumented)
resolveEditUrl(url: string): string;
// (undocumented)
resolveUrl(options: {
url: string;
base: string;
lineNumber?: number;
}): string;
// (undocumented)
get title(): string;
// (undocumented)
get type(): string;
}
// @public
export type GerritIntegrationConfig = {
host: string;
baseUrl?: string;
cloneUrl?: string;
gitilesBaseUrl?: string;
username?: string;
password?: string;
};
// @public
export function getAzureCommitsUrl(url: string): string;
// @public
export function getAzureDownloadUrl(url: string): string;
// @public
export function getAzureFileFetchUrl(url: string): string;
// @public
export function getAzureRequestOptions(
config: AzureIntegrationConfig,
additionalHeaders?: Record<string, string>,
): Promise<{
headers: Record<string, string>;
}>;
// @public
export function getBitbucketCloudDefaultBranch(
url: string,
config: BitbucketCloudIntegrationConfig,
): Promise<string>;
// @public
export function getBitbucketCloudDownloadUrl(
url: string,
config: BitbucketCloudIntegrationConfig,
): Promise<string>;
// @public
export function getBitbucketCloudFileFetchUrl(
url: string,
config: BitbucketCloudIntegrationConfig,
): string;
// @public
export function getBitbucketCloudRequestOptions(
config: BitbucketCloudIntegrationConfig,
): {
headers: Record<string, string>;
};
// @public @deprecated
export function getBitbucketDefaultBranch(
url: string,
config: BitbucketIntegrationConfig,
): Promise<string>;
// @public @deprecated
export function getBitbucketDownloadUrl(
url: string,
config: BitbucketIntegrationConfig,
): Promise<string>;
// @public @deprecated
export function getBitbucketFileFetchUrl(
url: string,
config: BitbucketIntegrationConfig,
): string;
// @public @deprecated
export function getBitbucketRequestOptions(
config: BitbucketIntegrationConfig,
): {
headers: Record<string, string>;
};
// @public
export function getBitbucketServerDefaultBranch(
url: string,
config: BitbucketServerIntegrationConfig,
): Promise<string>;
// @public
export function getBitbucketServerDownloadUrl(
url: string,
config: BitbucketServerIntegrationConfig,
): Promise<string>;
// @public
export function getBitbucketServerFileFetchUrl(
url: string,
config: BitbucketServerIntegrationConfig,
): string;
// @public
export function getBitbucketServerRequestOptions(
config: BitbucketServerIntegrationConfig,
): {
headers: Record<string, string>;
};
// @public
export function getGerritBranchApiUrl(
config: GerritIntegrationConfig,
url: string,
): string;
// @public
export function getGerritCloneRepoUrl(
config: GerritIntegrationConfig,
url: string,
): string;
// @public
export function getGerritFileContentsApiUrl(
config: GerritIntegrationConfig,
url: string,
): string;
// @public
export function getGerritProjectsApiUrl(
config: GerritIntegrationConfig,
): string;
// @public
export function getGerritRequestOptions(config: GerritIntegrationConfig): {
headers?: Record<string, string>;
};
// @public
export function getGiteaFileContentsUrl(
config: GiteaIntegrationConfig,
url: string,
): string;
// @public
export function getGiteaRequestOptions(config: GiteaIntegrationConfig): {
headers?: Record<string, string>;
};
// @public @deprecated (undocumented)
export const getGitHubFileFetchUrl: typeof getGithubFileFetchUrl;
// @public
export function getGithubFileFetchUrl(
url: string,
config: GithubIntegrationConfig,
credentials: GithubCredentials,
): string;
// @public @deprecated
export function getGitHubRequestOptions(
config: GithubIntegrationConfig,
credentials: GithubCredentials,
): {
headers: Record<string, string>;
};
// @public
export function getGitLabFileFetchUrl(
url: string,
config: GitLabIntegrationConfig,
): Promise<string>;
// @public
export function getGitLabIntegrationRelativePath(
config: GitLabIntegrationConfig,
): string;
// @public
export function getGitLabRequestOptions(config: GitLabIntegrationConfig): {
headers: Record<string, string>;
};
// @public
export class GiteaIntegration implements ScmIntegration {
constructor(config: GiteaIntegrationConfig);
// (undocumented)
readonly config: GiteaIntegrationConfig;
// (undocumented)
static factory: ScmIntegrationsFactory<GiteaIntegration>;
// (undocumented)
resolveEditUrl(url: string): string;
// (undocumented)
resolveUrl(options: {
url: string;
base: string;
lineNumber?: number | undefined;
}): string;
// (undocumented)
get title(): string;
// (undocumented)
get type(): string;
}
// @public
export type GiteaIntegrationConfig = {
host: string;
baseUrl?: string;
username?: string;
password?: string;
};
// @public
export type GithubAppConfig = {
appId: number;
privateKey: string;
webhookSecret: string;
clientId: string;
clientSecret: string;
allowedInstallationOwners?: string[];
};
// @public
export class GithubAppCredentialsMux {
constructor(config: GithubIntegrationConfig);
// (undocumented)
getAllInstallations(): Promise<
RestEndpointMethodTypes['apps']['listInstallations']['response']['data']
>;
// (undocumented)
getAppToken(owner: string, repo?: string): Promise<string | undefined>;
}
// @public
export type GithubCredentials = {
headers?: {
[name: string]: string;
};
token?: string;
type: GithubCredentialType;
};
// @public
export interface GithubCredentialsProvider {
// (undocumented)
getCredentials(opts: { url: string }): Promise<GithubCredentials>;
}
// @public
export type GithubCredentialType = 'app' | 'token';
// @public @deprecated (undocumented)
export class GitHubIntegration extends GithubIntegration {
constructor(integrationConfig: GitHubIntegrationConfig);
// (undocumented)
get config(): GitHubIntegrationConfig;
// (undocumented)
static factory: ScmIntegrationsFactory<GitHubIntegration>;
}
// @public
export class GithubIntegration implements ScmIntegration {
constructor(integrationConfig: GithubIntegrationConfig);
// (undocumented)
get config(): GithubIntegrationConfig;
// (undocumented)
static factory: ScmIntegrationsFactory<GithubIntegration>;
// (undocumented)
resolveEditUrl(url: string): string;
// (undocumented)
resolveUrl(options: {
url: string;
base: string;
lineNumber?: number;
}): string;
// (undocumented)
get title(): string;
// (undocumented)
get type(): string;
}
// @public @deprecated (undocumented)
export type GitHubIntegrationConfig = GithubIntegrationConfig;
// @public
export type GithubIntegrationConfig = {
host: string;
apiBaseUrl?: string;
rawBaseUrl?: string;
token?: string;
apps?: GithubAppConfig[];
};
// @public
export class GitLabIntegration implements ScmIntegration {
constructor(integrationConfig: GitLabIntegrationConfig);
// (undocumented)
get config(): GitLabIntegrationConfig;
// (undocumented)
static factory: ScmIntegrationsFactory<GitLabIntegration>;
// (undocumented)
resolveEditUrl(url: string): string;
// (undocumented)
resolveUrl(options: {
url: string;
base: string;
lineNumber?: number;
}): string;
// (undocumented)
get title(): string;
// (undocumented)
get type(): string;
}
// @public
export type GitLabIntegrationConfig = {
host: string;
apiBaseUrl: string;
token?: string;
baseUrl: string;
};
// @public
export type GoogleGcsIntegrationConfig = {
clientEmail?: string;
privateKey?: string;
};
// @public
export interface IntegrationsByType {
// (undocumented)
awsS3: ScmIntegrationsGroup<AwsS3Integration>;
// (undocumented)
azure: ScmIntegrationsGroup<AzureIntegration>;
// @deprecated (undocumented)
bitbucket: ScmIntegrationsGroup<BitbucketIntegration>;
// (undocumented)
bitbucketCloud: ScmIntegrationsGroup<BitbucketCloudIntegration>;
// (undocumented)
bitbucketServer: ScmIntegrationsGroup<BitbucketServerIntegration>;
// (undocumented)
gerrit: ScmIntegrationsGroup<GerritIntegration>;
// (undocumented)
gitea: ScmIntegrationsGroup<GiteaIntegration>;
// (undocumented)
github: ScmIntegrationsGroup<GithubIntegration>;
// (undocumented)
gitlab: ScmIntegrationsGroup<GitLabIntegration>;
}
// @public
export type ManagedIdentity = {
clientId: string;
};
// @public
export function parseGerritGitilesUrl(
config: GerritIntegrationConfig,
url: string,
): {
branch: string;
filePath: string;
project: string;
};
// @public
export function parseGerritJsonResponse(response: Response): Promise<unknown>;
// @public
export function readAwsS3IntegrationConfig(
config: Config,
): AwsS3IntegrationConfig;
// @public
export function readAwsS3IntegrationConfigs(
configs: Config[],
): AwsS3IntegrationConfig[];
// @public
export function readAzureIntegrationConfig(
config: Config,
): AzureIntegrationConfig;
// @public
export function readAzureIntegrationConfigs(
configs: Config[],
): AzureIntegrationConfig[];
// @public
export function readBitbucketCloudIntegrationConfig(
config: Config,
): BitbucketCloudIntegrationConfig;
// @public
export function readBitbucketCloudIntegrationConfigs(
configs: Config[],
): BitbucketCloudIntegrationConfig[];
// @public @deprecated
export function readBitbucketIntegrationConfig(
config: Config,
): BitbucketIntegrationConfig;
// @public @deprecated
export function readBitbucketIntegrationConfigs(
configs: Config[],
): BitbucketIntegrationConfig[];
// @public
export function readBitbucketServerIntegrationConfig(
config: Config,
): BitbucketServerIntegrationConfig;
// @public
export function readBitbucketServerIntegrationConfigs(
configs: Config[],
): BitbucketServerIntegrationConfig[];
// @public
export function readGerritIntegrationConfig(
config: Config,
): GerritIntegrationConfig;
// @public
export function readGerritIntegrationConfigs(
configs: Config[],
): GerritIntegrationConfig[];
// @public
export function readGiteaConfig(config: Config): GiteaIntegrationConfig;
// @public @deprecated (undocumented)
export const readGitHubIntegrationConfig: typeof readGithubIntegrationConfig;
// @public
export function readGithubIntegrationConfig(
config: Config,
): GithubIntegrationConfig;
// @public @deprecated (undocumented)
export const readGitHubIntegrationConfigs: typeof readGithubIntegrationConfigs;
// @public
export function readGithubIntegrationConfigs(
configs: Config[],
): GithubIntegrationConfig[];
// @public
export function readGitLabIntegrationConfig(
config: Config,
): GitLabIntegrationConfig;
// @public
export function readGitLabIntegrationConfigs(
configs: Config[],
): GitLabIntegrationConfig[];
// @public
export function readGoogleGcsIntegrationConfig(
config: Config,
): GoogleGcsIntegrationConfig;
// @public @deprecated (undocumented)
export const replaceGitHubUrlType: typeof replaceGithubUrlType;
// @public
export function replaceGithubUrlType(
url: string,
type: 'blob' | 'tree' | 'edit',
): string;
// @public
export function replaceGitLabUrlType(
url: string,
type: 'blob' | 'tree' | 'edit',
): string;
// @public
export interface ScmIntegration {
resolveEditUrl(url: string): string;
resolveUrl(options: {
url: string;
base: string;
lineNumber?: number;
}): string;
title: string;
type: string;
}
// @public
export interface ScmIntegrationRegistry
extends ScmIntegrationsGroup<ScmIntegration> {
// (undocumented)
awsS3: ScmIntegrationsGroup<AwsS3Integration>;
// (undocumented)
azure: ScmIntegrationsGroup<AzureIntegration>;
// @deprecated (undocumented)
bitbucket: ScmIntegrationsGroup<BitbucketIntegration>;
// (undocumented)
bitbucketCloud: ScmIntegrationsGroup<BitbucketCloudIntegration>;
// (undocumented)
bitbucketServer: ScmIntegrationsGroup<BitbucketServerIntegration>;
// (undocumented)
gerrit: ScmIntegrationsGroup<GerritIntegration>;
// (undocumented)
gitea: ScmIntegrationsGroup<GiteaIntegration>;
// (undocumented)
github: ScmIntegrationsGroup<GithubIntegration>;
// (undocumented)
gitlab: ScmIntegrationsGroup<GitLabIntegration>;
resolveEditUrl(url: string): string;
resolveUrl(options: {
url: string;
base: string;
lineNumber?: number;
}): string;
}
// @public
export class ScmIntegrations implements ScmIntegrationRegistry {
constructor(integrationsByType: IntegrationsByType);
// (undocumented)
get awsS3(): ScmIntegrationsGroup<AwsS3Integration>;
// (undocumented)
get azure(): ScmIntegrationsGroup<AzureIntegration>;
// @deprecated (undocumented)
get bitbucket(): ScmIntegrationsGroup<BitbucketIntegration>;
// (undocumented)
get bitbucketCloud(): ScmIntegrationsGroup<BitbucketCloudIntegration>;
// (undocumented)
get bitbucketServer(): ScmIntegrationsGroup<BitbucketServerIntegration>;
// (undocumented)
byHost(host: string): ScmIntegration | undefined;
// (undocumented)
byUrl(url: string | URL): ScmIntegration | undefined;
// (undocumented)
static fromConfig(config: Config): ScmIntegrations;
// (undocumented)
get gerrit(): ScmIntegrationsGroup<GerritIntegration>;
// (undocumented)
get gitea(): ScmIntegrationsGroup<GiteaIntegration>;
// (undocumented)
get github(): ScmIntegrationsGroup<GithubIntegration>;
// (undocumented)
get gitlab(): ScmIntegrationsGroup<GitLabIntegration>;
// (undocumented)
list(): ScmIntegration[];
// (undocumented)
resolveEditUrl(url: string): string;
// (undocumented)
resolveUrl(options: {
url: string;
base: string;
lineNumber?: number;
}): string;
}
// @public
export type ScmIntegrationsFactory<T extends ScmIntegration> = (options: {
config: Config;
}) => ScmIntegrationsGroup<T>;
// @public
export interface ScmIntegrationsGroup<T extends ScmIntegration> {
byHost(host: string): T | undefined;
byUrl(url: string | URL): T | undefined;
list(): T[];
}
// @public
export class SingleInstanceGithubCredentialsProvider
implements GithubCredentialsProvider
{
// (undocumented)
static create: (config: GithubIntegrationConfig) => GithubCredentialsProvider;
getCredentials(opts: { url: string }): Promise<GithubCredentials>;
}