scripts/api-extractor: generate reports for core-*-api
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -0,0 +1,398 @@
|
||||
## API Report File for "@backstage/core-app-api"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
|
||||
import { AlertApi } from '@backstage/core-plugin-api';
|
||||
import { AlertMessage } from '@backstage/core-plugin-api';
|
||||
import { AnyApiFactory } from '@backstage/core-plugin-api';
|
||||
import { AnyApiRef } from '@backstage/core-plugin-api';
|
||||
import { ApiFactory } from '@backstage/core-plugin-api';
|
||||
import { ApiHolder } from '@backstage/core-plugin-api';
|
||||
import { ApiRef } from '@backstage/core-plugin-api';
|
||||
import { AppConfig } from '@backstage/config';
|
||||
import { AppTheme } from '@backstage/core-plugin-api';
|
||||
import { AppThemeApi } from '@backstage/core-plugin-api';
|
||||
import { auth0AuthApiRef } from '@backstage/core-plugin-api';
|
||||
import { AuthProvider } from '@backstage/core-plugin-api';
|
||||
import { AuthRequester } from '@backstage/core-plugin-api';
|
||||
import { AuthRequesterOptions } from '@backstage/core-plugin-api';
|
||||
import { AuthRequestOptions } from '@backstage/core-plugin-api';
|
||||
import { BackstageIdentity } from '@backstage/core-plugin-api';
|
||||
import { BackstageIdentityApi } from '@backstage/core-plugin-api';
|
||||
import { BackstagePlugin } from '@backstage/core-plugin-api';
|
||||
import { ComponentType } from 'react';
|
||||
import { ConfigReader } from '@backstage/config';
|
||||
import { DiscoveryApi } from '@backstage/core-plugin-api';
|
||||
import { ErrorApi } from '@backstage/core-plugin-api';
|
||||
import { ErrorContext } from '@backstage/core-plugin-api';
|
||||
import { ExternalRouteRef } from '@backstage/core-plugin-api';
|
||||
import { FeatureFlag } from '@backstage/core-plugin-api';
|
||||
import { FeatureFlagsApi } from '@backstage/core-plugin-api';
|
||||
import { FeatureFlagsSaveOptions } from '@backstage/core-plugin-api';
|
||||
import { gitlabAuthApiRef } from '@backstage/core-plugin-api';
|
||||
import { googleAuthApiRef } from '@backstage/core-plugin-api';
|
||||
import { IconComponent } from '@backstage/core-plugin-api';
|
||||
import { microsoftAuthApiRef } from '@backstage/core-plugin-api';
|
||||
import { OAuthApi } from '@backstage/core-plugin-api';
|
||||
import { OAuthRequestApi } from '@backstage/core-plugin-api';
|
||||
import { Observable } from '@backstage/core-plugin-api';
|
||||
import { oktaAuthApiRef } from '@backstage/core-plugin-api';
|
||||
import { oneloginAuthApiRef } from '@backstage/core-plugin-api';
|
||||
import { OpenIdConnectApi } from '@backstage/core-plugin-api';
|
||||
import { PendingAuthRequest } from '@backstage/core-plugin-api';
|
||||
import { ProfileInfo } from '@backstage/core-plugin-api';
|
||||
import { ProfileInfoApi } from '@backstage/core-plugin-api';
|
||||
import { PropsWithChildren } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { ReactNode } from 'react';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
import { SessionApi } from '@backstage/core-plugin-api';
|
||||
import { SessionState } from '@backstage/core-plugin-api';
|
||||
import { StorageApi } from '@backstage/core-plugin-api';
|
||||
import { StorageValueChange } from '@backstage/core-plugin-api';
|
||||
import { SubRouteRef } from '@backstage/core-plugin-api';
|
||||
|
||||
// @public
|
||||
export class AlertApiForwarder implements AlertApi {
|
||||
// (undocumented)
|
||||
alert$(): Observable<AlertMessage>;
|
||||
// (undocumented)
|
||||
post(alert: AlertMessage): void;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type ApiFactoryHolder = {
|
||||
get<T>(api: ApiRef<T>): ApiFactory<T, T, {
|
||||
[key in string]: unknown;
|
||||
}> | undefined;
|
||||
};
|
||||
|
||||
// @public
|
||||
export class ApiFactoryRegistry implements ApiFactoryHolder {
|
||||
// (undocumented)
|
||||
get<T>(api: ApiRef<T>): ApiFactory<T, T, {
|
||||
[x: string]: unknown;
|
||||
}> | undefined;
|
||||
// (undocumented)
|
||||
getAllApis(): Set<AnyApiRef>;
|
||||
register<Api, Impl extends Api, Deps extends {
|
||||
[name in string]: unknown;
|
||||
}>(scope: ApiFactoryScope, factory: ApiFactory<Api, Impl, Deps>): boolean;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export const ApiProvider: {
|
||||
({ apis, children, }: PropsWithChildren<ApiProviderProps>): JSX.Element;
|
||||
propTypes: {
|
||||
apis: PropTypes.Validator<PropTypes.InferProps<{
|
||||
get: PropTypes.Validator<(...args: any[]) => any>;
|
||||
}>>;
|
||||
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
||||
};
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export class ApiRegistry implements ApiHolder {
|
||||
constructor(apis: Map<string, unknown>);
|
||||
// (undocumented)
|
||||
static builder(): ApiRegistryBuilder;
|
||||
// (undocumented)
|
||||
static from(apis: ApiImpl[]): ApiRegistry;
|
||||
// (undocumented)
|
||||
get<T>(api: ApiRef<T>): T | undefined;
|
||||
static with<T>(api: ApiRef<T>, impl: T): ApiRegistry;
|
||||
with<T>(api: ApiRef<T>, impl: T): ApiRegistry;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export class ApiResolver implements ApiHolder {
|
||||
constructor(factories: ApiFactoryHolder);
|
||||
// (undocumented)
|
||||
get<T>(ref: ApiRef<T>): T | undefined;
|
||||
static validateFactories(factories: ApiFactoryHolder, apis: Iterable<AnyApiRef>): void;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type AppComponents = {
|
||||
NotFoundErrorPage: ComponentType<{}>;
|
||||
BootErrorPage: ComponentType<BootErrorPageProps>;
|
||||
Progress: ComponentType<{}>;
|
||||
Router: ComponentType<{}>;
|
||||
SignInPage?: ComponentType<SignInPageProps>;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type AppConfigLoader = () => Promise<AppConfig[]>;
|
||||
|
||||
// @public (undocumented)
|
||||
export type AppContext = {
|
||||
getPlugins(): BackstagePlugin<any, any>[];
|
||||
getSystemIcon(key: string): IconComponent | undefined;
|
||||
getComponents(): AppComponents;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type AppOptions = {
|
||||
apis?: Iterable<AnyApiFactory>;
|
||||
icons?: AppIcons & {
|
||||
[key in string]: IconComponent;
|
||||
};
|
||||
plugins?: BackstagePlugin<any, any>[];
|
||||
components?: Partial<AppComponents>;
|
||||
themes?: AppTheme[];
|
||||
configLoader?: AppConfigLoader;
|
||||
bindRoutes?(context: {
|
||||
bind: AppRouteBinder;
|
||||
}): void;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type AppRouteBinder = <ExternalRoutes extends {
|
||||
[name: string]: ExternalRouteRef;
|
||||
}>(externalRoutes: ExternalRoutes, targetRoutes: PartialKeys<TargetRouteMap<ExternalRoutes>, KeysWithType<ExternalRoutes, ExternalRouteRef<any, true>>>) => void;
|
||||
|
||||
// @public (undocumented)
|
||||
export class AppThemeSelector implements AppThemeApi {
|
||||
constructor(themes: AppTheme[]);
|
||||
// (undocumented)
|
||||
activeThemeId$(): Observable<string | undefined>;
|
||||
// (undocumented)
|
||||
static createWithStorage(themes: AppTheme[]): AppThemeSelector;
|
||||
// (undocumented)
|
||||
getActiveThemeId(): string | undefined;
|
||||
// (undocumented)
|
||||
getInstalledThemes(): AppTheme[];
|
||||
// (undocumented)
|
||||
setActiveThemeId(themeId?: string): void;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export class Auth0Auth {
|
||||
// (undocumented)
|
||||
static create({ discoveryApi, environment, provider, oauthRequestApi, defaultScopes, }: OAuthApiCreateOptions): typeof auth0AuthApiRef.T;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type BackstageApp = {
|
||||
getPlugins(): BackstagePlugin<any, any>[];
|
||||
getSystemIcon(key: string): IconComponent | undefined;
|
||||
getProvider(): ComponentType<{}>;
|
||||
getRouter(): ComponentType<{}>;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type BootErrorPageProps = {
|
||||
step: 'load-config' | 'load-chunk';
|
||||
error: Error;
|
||||
};
|
||||
|
||||
export { ConfigReader }
|
||||
|
||||
// @public
|
||||
export function createApp(options?: AppOptions): PrivateAppImpl;
|
||||
|
||||
// @public
|
||||
export class ErrorAlerter implements ErrorApi {
|
||||
constructor(alertApi: AlertApi, errorApi: ErrorApi);
|
||||
// (undocumented)
|
||||
error$(): Observable<{
|
||||
error: {
|
||||
name: string;
|
||||
message: string;
|
||||
stack?: string | undefined;
|
||||
};
|
||||
context?: ErrorContext | undefined;
|
||||
}>;
|
||||
// (undocumented)
|
||||
post(error: Error, context?: ErrorContext): void;
|
||||
}
|
||||
|
||||
// @public
|
||||
export class ErrorApiForwarder implements ErrorApi {
|
||||
// (undocumented)
|
||||
error$(): Observable<{
|
||||
error: Error;
|
||||
context?: ErrorContext;
|
||||
}>;
|
||||
// (undocumented)
|
||||
post(error: Error, context?: ErrorContext): void;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export const FlatRoutes: (props: FlatRoutesProps) => JSX.Element | null;
|
||||
|
||||
// @public (undocumented)
|
||||
export class GithubAuth implements OAuthApi, SessionApi {
|
||||
constructor(sessionManager: SessionManager<GithubSession>);
|
||||
// (undocumented)
|
||||
static create({ discoveryApi, environment, provider, oauthRequestApi, defaultScopes, }: OAuthApiCreateOptions): GithubAuth;
|
||||
// (undocumented)
|
||||
getAccessToken(scope?: string, options?: AuthRequestOptions): Promise<string>;
|
||||
// (undocumented)
|
||||
getBackstageIdentity(options?: AuthRequestOptions): Promise<BackstageIdentity | undefined>;
|
||||
// (undocumented)
|
||||
getProfile(options?: AuthRequestOptions): Promise<ProfileInfo | undefined>;
|
||||
// (undocumented)
|
||||
static normalizeScope(scope?: string): Set<string>;
|
||||
// (undocumented)
|
||||
sessionState$(): Observable<SessionState>;
|
||||
// (undocumented)
|
||||
signIn(): Promise<void>;
|
||||
// (undocumented)
|
||||
signOut(): Promise<void>;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type GithubSession = {
|
||||
providerInfo: {
|
||||
accessToken: string;
|
||||
scopes: Set<string>;
|
||||
expiresAt: Date;
|
||||
};
|
||||
profile: ProfileInfo;
|
||||
backstageIdentity: BackstageIdentity;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export class GitlabAuth {
|
||||
// (undocumented)
|
||||
static create({ discoveryApi, environment, provider, oauthRequestApi, defaultScopes, }: OAuthApiCreateOptions): typeof gitlabAuthApiRef.T;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export class GoogleAuth {
|
||||
// (undocumented)
|
||||
static create({ discoveryApi, oauthRequestApi, environment, provider, defaultScopes, }: OAuthApiCreateOptions): typeof googleAuthApiRef.T;
|
||||
}
|
||||
|
||||
// @public
|
||||
export class LocalStorageFeatureFlags implements FeatureFlagsApi {
|
||||
// (undocumented)
|
||||
getRegisteredFlags(): FeatureFlag[];
|
||||
// (undocumented)
|
||||
isActive(name: string): boolean;
|
||||
// (undocumented)
|
||||
registerFlag(flag: FeatureFlag): void;
|
||||
// (undocumented)
|
||||
save(options: FeatureFlagsSaveOptions): void;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export class MicrosoftAuth {
|
||||
// (undocumented)
|
||||
static create({ environment, provider, oauthRequestApi, discoveryApi, defaultScopes, }: OAuthApiCreateOptions): typeof microsoftAuthApiRef.T;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export class OAuth2 implements OAuthApi, OpenIdConnectApi, ProfileInfoApi, BackstageIdentityApi, SessionApi {
|
||||
constructor(options: Options);
|
||||
// (undocumented)
|
||||
static create({ discoveryApi, environment, provider, oauthRequestApi, defaultScopes, scopeTransform, }: CreateOptions): OAuth2;
|
||||
// (undocumented)
|
||||
getAccessToken(scope?: string | string[], options?: AuthRequestOptions): Promise<string>;
|
||||
// (undocumented)
|
||||
getBackstageIdentity(options?: AuthRequestOptions): Promise<BackstageIdentity | undefined>;
|
||||
// (undocumented)
|
||||
getIdToken(options?: AuthRequestOptions): Promise<string>;
|
||||
// (undocumented)
|
||||
getProfile(options?: AuthRequestOptions): Promise<ProfileInfo | undefined>;
|
||||
// (undocumented)
|
||||
sessionState$(): Observable<SessionState>;
|
||||
// (undocumented)
|
||||
signIn(): Promise<void>;
|
||||
// (undocumented)
|
||||
signOut(): Promise<void>;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type OAuth2Session = {
|
||||
providerInfo: {
|
||||
idToken: string;
|
||||
accessToken: string;
|
||||
scopes: Set<string>;
|
||||
expiresAt: Date;
|
||||
};
|
||||
profile: ProfileInfo;
|
||||
backstageIdentity: BackstageIdentity;
|
||||
};
|
||||
|
||||
// @public
|
||||
export class OAuthRequestManager implements OAuthRequestApi {
|
||||
// (undocumented)
|
||||
authRequest$(): Observable<PendingAuthRequest[]>;
|
||||
// (undocumented)
|
||||
createAuthRequester<T>(options: AuthRequesterOptions<T>): AuthRequester<T>;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export class OktaAuth {
|
||||
// (undocumented)
|
||||
static create({ discoveryApi, environment, provider, oauthRequestApi, defaultScopes, }: OAuthApiCreateOptions): typeof oktaAuthApiRef.T;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export class OneLoginAuth {
|
||||
// (undocumented)
|
||||
static create({ discoveryApi, environment, provider, oauthRequestApi, }: CreateOptions_2): typeof oneloginAuthApiRef.T;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export class SamlAuth implements ProfileInfoApi, BackstageIdentityApi, SessionApi {
|
||||
constructor(sessionManager: SessionManager<SamlSession>);
|
||||
// (undocumented)
|
||||
static create({ discoveryApi, environment, provider, }: AuthApiCreateOptions): SamlAuth;
|
||||
// (undocumented)
|
||||
getBackstageIdentity(options?: AuthRequestOptions): Promise<BackstageIdentity | undefined>;
|
||||
// (undocumented)
|
||||
getProfile(options?: AuthRequestOptions): Promise<ProfileInfo | undefined>;
|
||||
// (undocumented)
|
||||
sessionState$(): Observable<SessionState>;
|
||||
// (undocumented)
|
||||
signIn(): Promise<void>;
|
||||
// (undocumented)
|
||||
signOut(): Promise<void>;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type SignInPageProps = {
|
||||
onResult(result: SignInResult): void;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type SignInResult = {
|
||||
userId: string;
|
||||
profile: ProfileInfo;
|
||||
getIdToken?: () => Promise<string>;
|
||||
signOut?: () => Promise<void>;
|
||||
};
|
||||
|
||||
// @public
|
||||
export class UrlPatternDiscovery implements DiscoveryApi {
|
||||
static compile(pattern: string): UrlPatternDiscovery;
|
||||
// (undocumented)
|
||||
getBaseUrl(pluginId: string): Promise<string>;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export class WebStorage implements StorageApi {
|
||||
constructor(namespace: string, errorApi: ErrorApi);
|
||||
// (undocumented)
|
||||
static create(options: CreateStorageApiOptions): WebStorage;
|
||||
// (undocumented)
|
||||
forBucket(name: string): WebStorage;
|
||||
// (undocumented)
|
||||
get<T>(key: string): T | undefined;
|
||||
// (undocumented)
|
||||
observe$<T>(key: string): Observable<StorageValueChange<T>>;
|
||||
// (undocumented)
|
||||
remove(key: string): Promise<void>;
|
||||
// (undocumented)
|
||||
set<T>(key: string, data: T): Promise<void>;
|
||||
}
|
||||
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
|
||||
```
|
||||
@@ -0,0 +1,529 @@
|
||||
## API Report File for "@backstage/core-plugin-api"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
|
||||
import { BackstageTheme } from '@backstage/theme';
|
||||
import { ComponentType } from 'react';
|
||||
import { Config } from '@backstage/config';
|
||||
import { default as React_2 } from 'react';
|
||||
import { ReactNode } from 'react';
|
||||
|
||||
// @public
|
||||
export type AlertApi = {
|
||||
post(alert: AlertMessage): void;
|
||||
alert$(): Observable<AlertMessage>;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export const alertApiRef: ApiRef<AlertApi>;
|
||||
|
||||
// @public (undocumented)
|
||||
export type AlertMessage = {
|
||||
message: string;
|
||||
severity?: 'success' | 'info' | 'warning' | 'error';
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type AnyApiFactory = ApiFactory<unknown, unknown, {
|
||||
[key in string]: unknown;
|
||||
}>;
|
||||
|
||||
// @public (undocumented)
|
||||
export type AnyApiRef = ApiRef<unknown>;
|
||||
|
||||
// @public (undocumented)
|
||||
export type ApiFactory<Api, Impl extends Api, Deps extends {
|
||||
[name in string]: unknown;
|
||||
}> = {
|
||||
api: ApiRef<Api>;
|
||||
deps: TypesToApiRefs<Deps>;
|
||||
factory(deps: Deps): Impl;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type ApiHolder = {
|
||||
get<T>(api: ApiRef<T>): T | undefined;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type ApiRef<T> = {
|
||||
id: string;
|
||||
T: T;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type ApiRefsToTypes<T extends {
|
||||
[key in string]: ApiRef<unknown>;
|
||||
}> = {
|
||||
[key in keyof T]: ApiRefType<T[key]>;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type ApiRefType<T> = T extends ApiRef<infer U> ? U : never;
|
||||
|
||||
// @public (undocumented)
|
||||
export type AppComponents = {
|
||||
NotFoundErrorPage: ComponentType<{}>;
|
||||
BootErrorPage: ComponentType<BootErrorPageProps>;
|
||||
Progress: ComponentType<{}>;
|
||||
Router: ComponentType<{}>;
|
||||
SignInPage?: ComponentType<SignInPageProps>;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type AppContext = {
|
||||
getPlugins(): BackstagePlugin<any, any>[];
|
||||
getSystemIcon(key: string): IconComponent | undefined;
|
||||
getComponents(): AppComponents;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type AppTheme = {
|
||||
id: string;
|
||||
title: string;
|
||||
variant: 'light' | 'dark';
|
||||
theme: BackstageTheme;
|
||||
icon?: React.ReactElement;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type AppThemeApi = {
|
||||
getInstalledThemes(): AppTheme[];
|
||||
activeThemeId$(): Observable<string | undefined>;
|
||||
getActiveThemeId(): string | undefined;
|
||||
setActiveThemeId(themeId?: string): void;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export const appThemeApiRef: ApiRef<AppThemeApi>;
|
||||
|
||||
// @public (undocumented)
|
||||
export function attachComponentData<P>(component: ComponentType<P>, type: string, data: unknown): void;
|
||||
|
||||
// @public
|
||||
export const auth0AuthApiRef: ApiRef<OpenIdConnectApi & ProfileInfoApi & BackstageIdentityApi & SessionApi>;
|
||||
|
||||
// @public
|
||||
export type AuthProvider = {
|
||||
title: string;
|
||||
icon: IconComponent;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type AuthRequester<AuthResponse> = (scopes: Set<string>) => Promise<AuthResponse>;
|
||||
|
||||
// @public
|
||||
export type AuthRequesterOptions<AuthResponse> = {
|
||||
provider: AuthProvider;
|
||||
onAuthRequest(scopes: Set<string>): Promise<AuthResponse>;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type AuthRequestOptions = {
|
||||
optional?: boolean;
|
||||
instantPopup?: boolean;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type BackstageIdentity = {
|
||||
id: string;
|
||||
idToken: string;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type BackstageIdentityApi = {
|
||||
getBackstageIdentity(options?: AuthRequestOptions): Promise<BackstageIdentity | undefined>;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type BackstagePlugin<Routes extends AnyRoutes = {}, ExternalRoutes extends AnyExternalRoutes = {}> = {
|
||||
getId(): string;
|
||||
output(): PluginOutput[];
|
||||
getApis(): Iterable<AnyApiFactory>;
|
||||
provide<T>(extension: Extension<T>): T;
|
||||
routes: Routes;
|
||||
externalRoutes: ExternalRoutes;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type BootErrorPageProps = {
|
||||
step: 'load-config' | 'load-chunk';
|
||||
error: Error;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type ConfigApi = Config;
|
||||
|
||||
// @public (undocumented)
|
||||
export const configApiRef: ApiRef<ConfigApi>;
|
||||
|
||||
// @public
|
||||
export function createApiFactory<Api, Impl extends Api, Deps extends {
|
||||
[name in string]: unknown;
|
||||
}>(factory: ApiFactory<Api, Impl, Deps>): ApiFactory<Api, Impl, Deps>;
|
||||
|
||||
// @public (undocumented)
|
||||
export function createApiFactory<Api, Impl extends Api>(api: ApiRef<Api>, instance: Impl): ApiFactory<Api, Impl, {}>;
|
||||
|
||||
// @public (undocumented)
|
||||
export function createApiRef<T>(config: ApiRefConfig): ApiRef<T>;
|
||||
|
||||
// @public (undocumented)
|
||||
export function createComponentExtension<T extends (props: any) => JSX.Element>(options: {
|
||||
component: ComponentLoader<T>;
|
||||
}): Extension<T>;
|
||||
|
||||
// @public (undocumented)
|
||||
export function createExternalRouteRef<Params extends {
|
||||
[param in ParamKey]: string;
|
||||
}, Optional extends boolean = false, ParamKey extends string = never>(options: {
|
||||
id: string;
|
||||
params?: ParamKey[];
|
||||
optional?: Optional;
|
||||
}): ExternalRouteRef<OptionalParams<Params>, Optional>;
|
||||
|
||||
// @public (undocumented)
|
||||
export function createPlugin<Routes extends AnyRoutes = {}, ExternalRoutes extends AnyExternalRoutes = {}>(config: PluginConfig<Routes, ExternalRoutes>): BackstagePlugin<Routes, ExternalRoutes>;
|
||||
|
||||
// @public (undocumented)
|
||||
export function createReactExtension<T extends (props: any) => JSX.Element>(options: {
|
||||
component: ComponentLoader<T>;
|
||||
data?: Record<string, unknown>;
|
||||
}): Extension<T>;
|
||||
|
||||
// @public (undocumented)
|
||||
export function createRoutableExtension<T extends (props: any) => JSX.Element>(options: {
|
||||
component: () => Promise<T>;
|
||||
mountPoint: RouteRef;
|
||||
}): Extension<T>;
|
||||
|
||||
// @public (undocumented)
|
||||
export function createRouteRef<Params extends {
|
||||
[param in ParamKey]: string;
|
||||
}, ParamKey extends string = never>(config: {
|
||||
id?: string;
|
||||
params?: ParamKey[];
|
||||
path?: string;
|
||||
icon?: IconComponent;
|
||||
title?: string;
|
||||
}): RouteRef<OptionalParams<Params>>;
|
||||
|
||||
// @public (undocumented)
|
||||
export function createSubRouteRef<Path extends string, ParentParams extends AnyParams = never>(config: {
|
||||
id: string;
|
||||
path: Path;
|
||||
parent: RouteRef<ParentParams>;
|
||||
}): MakeSubRouteRef<PathParams<Path>, ParentParams>;
|
||||
|
||||
// @public
|
||||
export type DiscoveryApi = {
|
||||
getBaseUrl(pluginId: string): Promise<string>;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export const discoveryApiRef: ApiRef<DiscoveryApi>;
|
||||
|
||||
// @public
|
||||
export type ErrorApi = {
|
||||
post(error: Error_2, context?: ErrorContext): void;
|
||||
error$(): Observable<{
|
||||
error: Error_2;
|
||||
context?: ErrorContext;
|
||||
}>;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export const errorApiRef: ApiRef<ErrorApi>;
|
||||
|
||||
// @public
|
||||
export type ErrorContext = {
|
||||
hidden?: boolean;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type Extension<T> = {
|
||||
expose(plugin: BackstagePlugin<any, any>): T;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type ExternalRouteRef<Params extends AnyParams = any, Optional extends boolean = any> = {
|
||||
readonly [routeRefType]: 'external';
|
||||
params: ParamKeys<Params>;
|
||||
optional?: Optional;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type FeatureFlag = {
|
||||
name: string;
|
||||
pluginId: string;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type FeatureFlagOutput = {
|
||||
type: 'feature-flag';
|
||||
name: string;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export interface FeatureFlagsApi {
|
||||
getRegisteredFlags(): FeatureFlag[];
|
||||
isActive(name: string): boolean;
|
||||
registerFlag(flag: FeatureFlag): void;
|
||||
save(options: FeatureFlagsSaveOptions): void;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export const featureFlagsApiRef: ApiRef<FeatureFlagsApi>;
|
||||
|
||||
// @public (undocumented)
|
||||
export type FeatureFlagsHooks = {
|
||||
register(name: string): void;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type FeatureFlagsSaveOptions = {
|
||||
states: Record<string, FeatureFlagState>;
|
||||
merge?: boolean;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export enum FeatureFlagState {
|
||||
// (undocumented)
|
||||
Active = 1,
|
||||
// (undocumented)
|
||||
None = 0
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export function getComponentData<T>(node: ReactNode, type: string): T | undefined;
|
||||
|
||||
// @public
|
||||
export const githubAuthApiRef: ApiRef<OAuthApi & ProfileInfoApi & BackstageIdentityApi & SessionApi>;
|
||||
|
||||
// @public
|
||||
export const gitlabAuthApiRef: ApiRef<OAuthApi & ProfileInfoApi & BackstageIdentityApi & SessionApi>;
|
||||
|
||||
// @public
|
||||
export const googleAuthApiRef: ApiRef<OAuthApi & OpenIdConnectApi & ProfileInfoApi & BackstageIdentityApi & SessionApi>;
|
||||
|
||||
// @public
|
||||
export type IconComponent = ComponentType<{
|
||||
fontSize?: 'default' | 'small' | 'large';
|
||||
}>;
|
||||
|
||||
// @public
|
||||
export type IdentityApi = {
|
||||
getUserId(): string;
|
||||
getProfile(): ProfileInfo;
|
||||
getIdToken(): Promise<string | undefined>;
|
||||
signOut(): Promise<void>;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export const identityApiRef: ApiRef<IdentityApi>;
|
||||
|
||||
// @public
|
||||
export const microsoftAuthApiRef: ApiRef<OAuthApi & OpenIdConnectApi & ProfileInfoApi & BackstageIdentityApi & SessionApi>;
|
||||
|
||||
// @public
|
||||
export const oauth2ApiRef: ApiRef<OAuthApi & OpenIdConnectApi & ProfileInfoApi & BackstageIdentityApi & SessionApi>;
|
||||
|
||||
// @public
|
||||
export type OAuthApi = {
|
||||
getAccessToken(scope?: OAuthScope, options?: AuthRequestOptions): Promise<string>;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type OAuthRequestApi = {
|
||||
createAuthRequester<AuthResponse>(options: AuthRequesterOptions<AuthResponse>): AuthRequester<AuthResponse>;
|
||||
authRequest$(): Observable<PendingAuthRequest[]>;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export const oauthRequestApiRef: ApiRef<OAuthRequestApi>;
|
||||
|
||||
// @public
|
||||
export type OAuthScope = string | string[];
|
||||
|
||||
// @public
|
||||
export type Observable<T> = {
|
||||
[Symbol.observable](): Observable<T>;
|
||||
subscribe(observer: Observer<T>): Subscription;
|
||||
subscribe(onNext?: (value: T) => void, onError?: (error: Error) => void, onComplete?: () => void): Subscription;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type Observer<T> = {
|
||||
next?(value: T): void;
|
||||
error?(error: Error): void;
|
||||
complete?(): void;
|
||||
};
|
||||
|
||||
// @public
|
||||
export const oidcAuthApiRef: ApiRef<OAuthApi & OpenIdConnectApi & ProfileInfoApi & BackstageIdentityApi & SessionApi>;
|
||||
|
||||
// @public
|
||||
export const oktaAuthApiRef: ApiRef<OAuthApi & OpenIdConnectApi & ProfileInfoApi & BackstageIdentityApi & SessionApi>;
|
||||
|
||||
// @public (undocumented)
|
||||
export const oneloginAuthApiRef: ApiRef<OAuthApi & OpenIdConnectApi & ProfileInfoApi & BackstageIdentityApi & SessionApi>;
|
||||
|
||||
// @public
|
||||
export type OpenIdConnectApi = {
|
||||
getIdToken(options?: AuthRequestOptions): Promise<string>;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type PendingAuthRequest = {
|
||||
provider: AuthProvider;
|
||||
reject: () => void;
|
||||
trigger(): Promise<void>;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type PluginConfig<Routes extends AnyRoutes, ExternalRoutes extends AnyExternalRoutes> = {
|
||||
id: string;
|
||||
apis?: Iterable<AnyApiFactory>;
|
||||
register?(hooks: PluginHooks): void;
|
||||
routes?: Routes;
|
||||
externalRoutes?: ExternalRoutes;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type PluginHooks = {
|
||||
featureFlags: FeatureFlagsHooks;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type PluginOutput = FeatureFlagOutput;
|
||||
|
||||
// @public
|
||||
export type ProfileInfo = {
|
||||
email?: string;
|
||||
displayName?: string;
|
||||
picture?: string;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type ProfileInfoApi = {
|
||||
getProfile(options?: AuthRequestOptions): Promise<ProfileInfo | undefined>;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type RouteOptions = {
|
||||
exact?: boolean;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type RoutePath = string;
|
||||
|
||||
// @public (undocumented)
|
||||
export type RouteRef<Params extends AnyParams = any> = {
|
||||
readonly [routeRefType]: 'absolute';
|
||||
params: ParamKeys<Params>;
|
||||
path: string;
|
||||
icon?: IconComponent;
|
||||
title?: string;
|
||||
};
|
||||
|
||||
// @public
|
||||
export const samlAuthApiRef: ApiRef<ProfileInfoApi & BackstageIdentityApi & SessionApi>;
|
||||
|
||||
// @public
|
||||
export type SessionApi = {
|
||||
signIn(): Promise<void>;
|
||||
signOut(): Promise<void>;
|
||||
sessionState$(): Observable<SessionState>;
|
||||
};
|
||||
|
||||
// @public
|
||||
export enum SessionState {
|
||||
// (undocumented)
|
||||
SignedIn = "SignedIn",
|
||||
// (undocumented)
|
||||
SignedOut = "SignedOut"
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type SignInPageProps = {
|
||||
onResult(result: SignInResult): void;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type SignInResult = {
|
||||
userId: string;
|
||||
profile: ProfileInfo;
|
||||
getIdToken?: () => Promise<string>;
|
||||
signOut?: () => Promise<void>;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export interface StorageApi {
|
||||
forBucket(name: string): StorageApi;
|
||||
get<T>(key: string): T | undefined;
|
||||
observe$<T>(key: string): Observable<StorageValueChange<T>>;
|
||||
remove(key: string): Promise<void>;
|
||||
set(key: string, data: any): Promise<void>;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export const storageApiRef: ApiRef<StorageApi>;
|
||||
|
||||
// @public (undocumented)
|
||||
export type StorageValueChange<T = any> = {
|
||||
key: string;
|
||||
newValue?: T;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type SubRouteRef<Params extends AnyParams = any> = {
|
||||
readonly [routeRefType]: 'sub';
|
||||
parent: RouteRef;
|
||||
path: string;
|
||||
params: ParamKeys<Params>;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type Subscription = {
|
||||
unsubscribe(): void;
|
||||
readonly closed: boolean;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type TypesToApiRefs<T> = {
|
||||
[key in keyof T]: ApiRef<T[key]>;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export function useApi<T>(apiRef: ApiRef<T>): T;
|
||||
|
||||
// @public (undocumented)
|
||||
export function useApiHolder(): ApiHolder;
|
||||
|
||||
// @public (undocumented)
|
||||
export const useApp: () => AppContext;
|
||||
|
||||
// @public (undocumented)
|
||||
export type UserFlags = {};
|
||||
|
||||
// @public (undocumented)
|
||||
export function useRouteRef<Optional extends boolean, Params extends AnyParams>(routeRef: ExternalRouteRef<Params, Optional>): Optional extends true ? RouteFunc<Params> | undefined : RouteFunc<Params>;
|
||||
|
||||
// @public (undocumented)
|
||||
export function useRouteRef<Params extends AnyParams>(routeRef: RouteRef<Params> | SubRouteRef<Params>): RouteFunc<Params>;
|
||||
|
||||
// @public (undocumented)
|
||||
export function useRouteRefParams<Params extends AnyParams>(_routeRef: RouteRef<Params> | SubRouteRef<Params>): Params;
|
||||
|
||||
// @public (undocumented)
|
||||
export function withApis<T>(apis: TypesToApiRefs<T>): <P extends T>(WrappedComponent: React_2.ComponentType<P>) => {
|
||||
(props: React_2.PropsWithChildren<Omit<P, keyof T>>): JSX.Element;
|
||||
displayName: string;
|
||||
};
|
||||
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
|
||||
```
|
||||
@@ -67,9 +67,10 @@ const DOCUMENTED_PACKAGES = [
|
||||
'packages/cli-common',
|
||||
'packages/config',
|
||||
'packages/config-loader',
|
||||
'packages/core-app-api',
|
||||
// TODO(Rugvip): Enable these once `import * as ...` and `import()` PRs have landed, #1796 & #1916.
|
||||
// 'packages/core',
|
||||
// 'packages/core-api',
|
||||
// 'packages/core-components',
|
||||
'packages/core-plugin-api',
|
||||
'packages/dev-utils',
|
||||
'packages/errors',
|
||||
'packages/integration',
|
||||
|
||||
Reference in New Issue
Block a user