import { Config } from '@backstage/config'; /** * The configuration parameters for a single Azure provider. * * @public */ export type AzureIntegrationConfig = { /** * The host of the target that this matches on, e.g. "dev.azure.com". * * Currently only "dev.azure.com" is supported. */ host: string; /** * The authorization token to use for requests. * * If no token is specified, anonymous access is used. * * @deprecated Use `credentials` instead. */ token?: string; /** * The credential to use for requests. * * If no credential is specified anonymous access is used. * * @deprecated Use `credentials` instead. */ credential?: AzureDevOpsCredential; /** * The credentials to use for requests. If multiple credentials are specified the first one that matches the organization is used. * If not organization matches the first credential without an organization is used. * * If no credentials are specified at all, either a default credential (for Azure DevOps) or anonymous access (for Azure DevOps Server) is used. */ credentials?: AzureDevOpsCredential[]; }; /** * The kind of Azure DevOps credential. * @public */ export type AzureDevOpsCredentialKind = 'PersonalAccessToken' | 'ClientSecret' | 'ManagedIdentity'; /** * Common fields for the Azure DevOps credentials. * @public */ export type AzureCredentialBase = { /** * The kind of credential. */ kind: AzureDevOpsCredentialKind; /** * The Azure DevOps organizations for which to use this credential. */ organizations?: string[]; }; /** * A client secret credential that was generated for an App Registration. * @public */ export type AzureClientSecretCredential = AzureCredentialBase & { kind: 'ClientSecret'; /** * The Entra ID tenant */ tenantId: string; /** * The client id */ clientId: string; /** * The client secret */ clientSecret: string; }; /** * A managed identity credential. * @public */ export type AzureManagedIdentityCredential = AzureCredentialBase & { kind: 'ManagedIdentity'; /** * The clientId */ clientId: string; }; /** * A personal access token credential. * @public */ export type PersonalAccessTokenCredential = AzureCredentialBase & { kind: 'PersonalAccessToken'; personalAccessToken: string; }; /** * The general shape of a credential that can be used to authenticate to Azure DevOps. * @public */ export type AzureDevOpsCredentialLike = Omit & Partial & Partial, 'kind'>; /** * Credential used to authenticate to Azure DevOps. * @public */ export type AzureDevOpsCredential = AzureClientSecretCredential | AzureManagedIdentityCredential | PersonalAccessTokenCredential; /** * Reads a single Azure integration config. * * @param config - The config object of a single integration * @public */ export declare function readAzureIntegrationConfig(config: Config): AzureIntegrationConfig; /** * Reads a set of Azure integration configs, and inserts some defaults for * public Azure if not specified. * * @param configs - All of the integration config objects * @public */ export declare function readAzureIntegrationConfigs(configs: Config[]): AzureIntegrationConfig[];