fixed API report errors and regenerated the reports
Signed-off-by: Katharina Sick <katharina.sick@dynatrace.com>
This commit is contained in:
@@ -22,6 +22,7 @@ import { BackstageIdentityApi } from '@backstage/core-plugin-api';
|
||||
import { BackstageIdentityResponse } from '@backstage/core-plugin-api';
|
||||
import { BackstagePlugin } from '@backstage/core-plugin-api';
|
||||
import { bitbucketAuthApiRef } from '@backstage/core-plugin-api';
|
||||
import { bitbucketServerAuthApiRef } from '@backstage/core-plugin-api';
|
||||
import { ComponentType } from 'react';
|
||||
import { Config } from '@backstage/config';
|
||||
import { ConfigReader } from '@backstage/config';
|
||||
@@ -280,6 +281,25 @@ export class BitbucketAuth {
|
||||
static create(options: OAuthApiCreateOptions): typeof bitbucketAuthApiRef.T;
|
||||
}
|
||||
|
||||
// @public
|
||||
export class BitbucketServerAuth {
|
||||
// (undocumented)
|
||||
static create(
|
||||
options: OAuthApiCreateOptions,
|
||||
): typeof bitbucketServerAuthApiRef.T;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type BitbucketServerSession = {
|
||||
providerInfo: {
|
||||
accessToken: string;
|
||||
scopes: Set<string>;
|
||||
expiresAt?: Date;
|
||||
};
|
||||
profile: ProfileInfo;
|
||||
backstageIdentity: BackstageIdentityResponse;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type BitbucketSession = {
|
||||
providerInfo: {
|
||||
|
||||
@@ -241,6 +241,11 @@ export const bitbucketAuthApiRef: ApiRef<
|
||||
OAuthApi & ProfileInfoApi & BackstageIdentityApi & SessionApi
|
||||
>;
|
||||
|
||||
// @public
|
||||
export const bitbucketServerAuthApiRef: ApiRef<
|
||||
OAuthApi & ProfileInfoApi & BackstageIdentityApi & SessionApi
|
||||
>;
|
||||
|
||||
// @public
|
||||
export type BootErrorPageProps = {
|
||||
step: 'load-config' | 'load-chunk';
|
||||
|
||||
@@ -16,7 +16,6 @@ import { GetEntitiesRequest } from '@backstage/catalog-client';
|
||||
import { IncomingHttpHeaders } from 'http';
|
||||
import { JsonValue } from '@backstage/types';
|
||||
import { Logger } from 'winston';
|
||||
import passport from 'passport';
|
||||
import { PluginDatabaseManager } from '@backstage/backend-common';
|
||||
import { PluginEndpointDiscovery } from '@backstage/backend-common';
|
||||
import { Profile } from 'passport';
|
||||
@@ -133,11 +132,9 @@ export type BitbucketPassportProfile = Profile & {
|
||||
};
|
||||
};
|
||||
|
||||
// Warning: (ae-missing-release-tag) "BitbucketServerOAuthResult" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export type BitbucketServerOAuthResult = {
|
||||
fullProfile: PassportProfile;
|
||||
fullProfile: Profile;
|
||||
params: {
|
||||
scope: string;
|
||||
access_token?: string;
|
||||
@@ -763,8 +760,4 @@ export type WebMessageResponse =
|
||||
type: 'authorization_response';
|
||||
error: Error;
|
||||
};
|
||||
|
||||
// Warnings were encountered during analysis:
|
||||
//
|
||||
// src/providers/bitbucketServer/provider.d.ts:6:5 - (ae-forgotten-export) The symbol "PassportProfile" needs to be exported by the entry point index.d.ts
|
||||
```
|
||||
|
||||
@@ -40,13 +40,14 @@ import {
|
||||
} from '../types';
|
||||
import express from 'express';
|
||||
import { createAuthProviderIntegration } from '../createAuthProviderIntegration';
|
||||
import { PassportProfile } from '../../lib/passport/types';
|
||||
import { Profile as PassportProfile } from 'passport';
|
||||
import { commonByEmailResolver } from '../resolvers';
|
||||
|
||||
type PrivateInfo = {
|
||||
refreshToken: string;
|
||||
};
|
||||
|
||||
/** @public */
|
||||
export type BitbucketServerOAuthResult = {
|
||||
fullProfile: PassportProfile;
|
||||
params: {
|
||||
@@ -216,7 +217,7 @@ export class BitbucketServerAuthProvider implements OAuthHandlers {
|
||||
|
||||
const user = await userResponse.json();
|
||||
|
||||
return {
|
||||
const passportProfile = {
|
||||
provider: 'bitbucketServer',
|
||||
id: user.id.toString(),
|
||||
displayName: user.displayName,
|
||||
@@ -226,10 +227,15 @@ export class BitbucketServerAuthProvider implements OAuthHandlers {
|
||||
value: user.emailAddress,
|
||||
},
|
||||
],
|
||||
avatarUrl: user.avatarUrl
|
||||
? `https://${this.host}${user.avatarUrl}`
|
||||
: undefined,
|
||||
};
|
||||
} as PassportProfile;
|
||||
|
||||
if (user.avatarUrl) {
|
||||
passportProfile.photos = [
|
||||
{ value: `https://${this.host}${user.avatarUrl}` },
|
||||
];
|
||||
}
|
||||
|
||||
return passportProfile;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user