From 22ef4c33075c71b417d33a3f7206f22bada47aec Mon Sep 17 00:00:00 2001 From: Filip Swiatczak Date: Thu, 30 Sep 2021 09:22:15 +0100 Subject: [PATCH] exporting bitbucket types Signed-off-by: Filip Swiatczak --- packages/app/src/identityProviders.ts | 2 +- plugins/auth-backend/api-report.md | 54 ++++++++++++++++++- .../src/providers/bitbucket/index.ts | 6 ++- plugins/auth-backend/src/providers/index.ts | 1 + 4 files changed, 59 insertions(+), 4 deletions(-) diff --git a/packages/app/src/identityProviders.ts b/packages/app/src/identityProviders.ts index 24e02f61b0..49204d2b5e 100644 --- a/packages/app/src/identityProviders.ts +++ b/packages/app/src/identityProviders.ts @@ -85,7 +85,7 @@ export const providers = [ { id: 'bitbucket-auth-provider', title: 'Bitbucket', - message: 'Sign In using Bitbucket Cloud', + message: 'Sign In using Bitbucket', apiRef: bitbucketAuthApiRef, }, ]; diff --git a/plugins/auth-backend/api-report.md b/plugins/auth-backend/api-report.md index 5dfdd3df16..34a0d5c559 100644 --- a/plugins/auth-backend/api-report.md +++ b/plugins/auth-backend/api-report.md @@ -84,6 +84,57 @@ export type BackstageIdentity = { entity?: Entity; }; +// Warning: (ae-forgotten-export) The symbol "SignInResolver" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "bitbucketEmailSignInResolver" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const bitbucketEmailSignInResolver: SignInResolver; + +// Warning: (ae-missing-release-tag) "BitbucketOAuthResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type BitbucketOAuthResult = { + fullProfile: BitbucketPassportProfile; + params: { + id_token?: string; + scope: string; + expires_in: number; + }; + accessToken: string; + refreshToken?: string; +}; + +// Warning: (ae-missing-release-tag) "BitbucketPassportProfile" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type BitbucketPassportProfile = Profile & { + avatarUrl?: string; + _json?: { + links?: { + avatar?: { + href?: string; + }; + }; + }; +}; + +// Warning: (ae-missing-release-tag) "BitbucketProviderOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type BitbucketProviderOptions = { + authHandler?: AuthHandler; + signIn: { + resolver: SignInResolver; + }; +}; + +// Warning: (ae-missing-release-tag) "createBitbucketProvider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const createBitbucketProvider: ( + options?: BitbucketProviderOptions | undefined, +) => AuthProviderFactory; + // Warning: (ae-missing-release-tag) "createGithubProvider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) @@ -468,8 +519,7 @@ export type WebMessageResponse = // // src/identity/types.d.ts:25:5 - (ae-forgotten-export) The symbol "TokenParams" needs to be exported by the entry point index.d.ts // src/identity/types.d.ts:31:9 - (ae-forgotten-export) The symbol "AnyJWK" needs to be exported by the entry point index.d.ts -// src/providers/github/provider.d.ts:50:5 - (ae-forgotten-export) The symbol "AuthHandler" needs to be exported by the entry point index.d.ts -// src/providers/github/provider.d.ts:58:9 - (ae-forgotten-export) The symbol "SignInResolver" needs to be exported by the entry point index.d.ts +// src/providers/bitbucket/provider.d.ts:57:5 - (ae-forgotten-export) The symbol "AuthHandler" needs to be exported by the entry point index.d.ts // src/providers/types.d.ts:109:5 - (ae-forgotten-export) The symbol "AuthProviderConfig" needs to be exported by the entry point index.d.ts // src/providers/types.d.ts:115:5 - (ae-forgotten-export) The symbol "ExperimentalIdentityResolver" needs to be exported by the entry point index.d.ts // src/providers/types.d.ts:132:8 - (tsdoc-missing-deprecation-message) The @deprecated block must include a deprecation message, e.g. describing the recommended alternative diff --git a/plugins/auth-backend/src/providers/bitbucket/index.ts b/plugins/auth-backend/src/providers/bitbucket/index.ts index d9fcdf3a68..f39fc5e65b 100644 --- a/plugins/auth-backend/src/providers/bitbucket/index.ts +++ b/plugins/auth-backend/src/providers/bitbucket/index.ts @@ -18,4 +18,8 @@ export { createBitbucketProvider, bitbucketEmailSignInResolver, } from './provider'; -export type { BitbucketProviderOptions } from './provider'; +export type { + BitbucketProviderOptions, + BitbucketPassportProfile, + BitbucketOAuthResult, +} from './provider'; diff --git a/plugins/auth-backend/src/providers/index.ts b/plugins/auth-backend/src/providers/index.ts index 1f879b311b..90466a8094 100644 --- a/plugins/auth-backend/src/providers/index.ts +++ b/plugins/auth-backend/src/providers/index.ts @@ -20,6 +20,7 @@ export * from './google'; export * from './microsoft'; export * from './oauth2'; export * from './okta'; +export * from './bitbucket'; export { factories as defaultAuthProviderFactories } from './factories';