update API reports for core/frontend inversion

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2025-11-22 18:07:09 +01:00
parent 5fc53cb298
commit ebe5538d55
14 changed files with 791 additions and 782 deletions
+613 -158
View File
@@ -3,103 +3,41 @@
> 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 { alertApiRef } 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 { AnyRouteRefParams as AnyRouteRefParams_2 } from '@backstage/frontend-plugin-api';
import { ApiFactory } from '@backstage/core-plugin-api';
import { ApiHolder } from '@backstage/core-plugin-api';
import { ApiRef } from '@backstage/core-plugin-api';
import { ApiRefConfig } from '@backstage/core-plugin-api';
import { AppTheme } from '@backstage/core-plugin-api';
import { AppThemeApi } from '@backstage/core-plugin-api';
import { appThemeApiRef } from '@backstage/core-plugin-api';
import { atlassianAuthApiRef } from '@backstage/core-plugin-api';
import { AuthProviderInfo } from '@backstage/core-plugin-api';
import { AuthRequestOptions } from '@backstage/core-plugin-api';
import { BackstageIdentityApi } from '@backstage/core-plugin-api';
import { BackstageIdentityResponse } from '@backstage/core-plugin-api';
import { BackstageUserIdentity } from '@backstage/core-plugin-api';
import { bitbucketAuthApiRef } from '@backstage/core-plugin-api';
import { bitbucketServerAuthApiRef } from '@backstage/core-plugin-api';
import { ComponentType } from 'react';
import { ConfigApi } from '@backstage/core-plugin-api';
import { configApiRef } from '@backstage/core-plugin-api';
import { Config } from '@backstage/config';
import { ConfigurableExtensionDataRef as ConfigurableExtensionDataRef_2 } from '@backstage/frontend-plugin-api';
import { createApiFactory } from '@backstage/core-plugin-api';
import { createApiRef } from '@backstage/core-plugin-api';
import { createTranslationMessages } from '@backstage/core-plugin-api/alpha';
import { createTranslationRef } from '@backstage/core-plugin-api/alpha';
import { createTranslationResource } from '@backstage/core-plugin-api/alpha';
import { DiscoveryApi } from '@backstage/core-plugin-api';
import { discoveryApiRef } from '@backstage/core-plugin-api';
import { ErrorApi } from '@backstage/core-plugin-api';
import { ErrorApiError } from '@backstage/core-plugin-api';
import { ErrorApiErrorContext } from '@backstage/core-plugin-api';
import { errorApiRef } from '@backstage/core-plugin-api';
import { Expand } from '@backstage/types';
import { ExpandRecursive } from '@backstage/types';
import { ExtensionBlueprint as ExtensionBlueprint_2 } from '@backstage/frontend-plugin-api';
import { ExtensionDataRef as ExtensionDataRef_2 } from '@backstage/frontend-plugin-api';
import { FeatureFlag } from '@backstage/core-plugin-api';
import { FeatureFlagsApi } from '@backstage/core-plugin-api';
import { featureFlagsApiRef } from '@backstage/core-plugin-api';
import { FeatureFlagsSaveOptions } from '@backstage/core-plugin-api';
import { FeatureFlagState } from '@backstage/core-plugin-api';
import { FetchApi } from '@backstage/core-plugin-api';
import { fetchApiRef } from '@backstage/core-plugin-api';
import { githubAuthApiRef } from '@backstage/core-plugin-api';
import { gitlabAuthApiRef } from '@backstage/core-plugin-api';
import { googleAuthApiRef } from '@backstage/core-plugin-api';
import { IconComponent as IconComponent_2 } from '@backstage/frontend-plugin-api';
import { IconComponent as IconComponent_3 } from '@backstage/core-plugin-api';
import { IdentityApi } from '@backstage/core-plugin-api';
import { identityApiRef } from '@backstage/core-plugin-api';
import { JsonObject } from '@backstage/types';
import { JsonValue } from '@backstage/types';
import { JSX as JSX_2 } from 'react/jsx-runtime';
import { JSX as JSX_3 } from 'react';
import { microsoftAuthApiRef } from '@backstage/core-plugin-api';
import { OAuthApi } from '@backstage/core-plugin-api';
import { OAuthRequestApi } from '@backstage/core-plugin-api';
import { oauthRequestApiRef } from '@backstage/core-plugin-api';
import { OAuthRequester } from '@backstage/core-plugin-api';
import { OAuthRequesterOptions } from '@backstage/core-plugin-api';
import { OAuthScope } 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 { openshiftAuthApiRef } from '@backstage/core-plugin-api';
import { PendingOAuthRequest } from '@backstage/core-plugin-api';
import { ProfileInfo } from '@backstage/core-plugin-api';
import { ProfileInfoApi } from '@backstage/core-plugin-api';
import { Observable } from '@backstage/types';
import { PropsWithChildren } from 'react';
import { ReactNode } from 'react';
import { RouteRef as RouteRef_2 } from '@backstage/frontend-plugin-api';
import { SessionApi } from '@backstage/core-plugin-api';
import { SessionState } from '@backstage/core-plugin-api';
import { SignInPageProps } from '@backstage/core-plugin-api';
import { StorageApi } from '@backstage/core-plugin-api';
import { storageApiRef } from '@backstage/core-plugin-api';
import { StorageValueSnapshot } from '@backstage/core-plugin-api';
import { TranslationMessages } from '@backstage/core-plugin-api/alpha';
import { TranslationMessagesOptions } from '@backstage/core-plugin-api/alpha';
import { TranslationRef } from '@backstage/core-plugin-api/alpha';
import { TranslationRefOptions } from '@backstage/core-plugin-api/alpha';
import { TranslationResource } from '@backstage/core-plugin-api/alpha';
import { TranslationResourceOptions } from '@backstage/core-plugin-api/alpha';
import { TypesToApiRefs } from '@backstage/core-plugin-api';
import { useApi } from '@backstage/core-plugin-api';
import { useApiHolder } from '@backstage/core-plugin-api';
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
import { vmwareCloudAuthApiRef } from '@backstage/core-plugin-api';
import { withApis } from '@backstage/core-plugin-api';
import { z } from 'zod';
export { AlertApi };
// @public
export type AlertApi = {
post(alert: AlertMessage): void;
alert$(): Observable<AlertMessage>;
};
export { alertApiRef };
// @public
export const alertApiRef: ApiRef<AlertApi>;
export { AlertMessage };
// @public
export type AlertMessage = {
message: string;
severity?: 'success' | 'info' | 'warning' | 'error';
display?: 'permanent' | 'transient';
};
// @public
export type AnalyticsApi = {
@@ -187,9 +125,17 @@ export type AnalyticsTracker = {
) => void;
};
export { AnyApiFactory };
// @public
export type AnyApiFactory = ApiFactory<
unknown,
unknown,
{
[key in string]: unknown;
}
>;
export { AnyApiRef };
// @public
export type AnyApiRef = ApiRef<unknown>;
// @public @deprecated (undocumented)
export type AnyExtensionDataRef = ExtensionDataRef;
@@ -224,13 +170,51 @@ export const ApiBlueprint: ExtensionBlueprint<{
};
}>;
export { ApiFactory };
// @public
export type ApiFactory<
Api,
Impl extends Api,
Deps extends {
[name in string]: unknown;
},
> = {
api: ApiRef<Api>;
deps: TypesToApiRefs<Deps>;
factory(deps: Deps): Impl;
};
export { ApiHolder };
// @public
export type ApiHolder = {
get<T>(api: ApiRef<T>): T | undefined;
};
export { ApiRef };
// @public
export type ApiRef<T> = {
id: string;
T: T;
};
export { ApiRefConfig };
// @public
export type ApiRefConfig = {
id: string;
};
// @public (undocumented)
export type AppLanguageApi = {
getAvailableLanguages(): {
languages: string[];
};
setLanguage(language?: string): void;
getLanguage(): {
language: string;
};
language$(): Observable<{
language: string;
}>;
};
// @public (undocumented)
export const appLanguageApiRef: ApiRef<AppLanguageApi>;
// @public
export interface AppNode {
@@ -278,7 +262,7 @@ export const AppRootElementBlueprint: ExtensionBlueprint<{
params: {
element: JSX.Element;
};
output: ExtensionDataRef<JSX_3.Element, 'core.reactElement', {}>;
output: ExtensionDataRef<JSX_3, 'core.reactElement', {}>;
inputs: {};
config: {};
configInput: {};
@@ -309,11 +293,25 @@ export const AppRootWrapperBlueprint: ExtensionBlueprint<{
};
}>;
export { AppTheme };
// @public
export type AppTheme = {
id: string;
title: string;
variant: 'light' | 'dark';
icon?: React.ReactElement;
Provider(props: { children: ReactNode }): JSX.Element | null;
};
export { AppThemeApi };
// @public
export type AppThemeApi = {
getInstalledThemes(): AppTheme[];
activeThemeId$(): Observable<string | undefined>;
getActiveThemeId(): string | undefined;
setActiveThemeId(themeId?: string): void;
};
export { appThemeApiRef };
// @public
export const appThemeApiRef: ApiRef<AppThemeApi>;
// @public
export interface AppTree {
@@ -335,25 +333,61 @@ export interface AppTreeApi {
// @public
export const appTreeApiRef: ApiRef<AppTreeApi>;
export { atlassianAuthApiRef };
// @public
export const atlassianAuthApiRef: ApiRef<
OAuthApi & ProfileInfoApi & BackstageIdentityApi & SessionApi
>;
export { AuthProviderInfo };
// @public
export type AuthProviderInfo = {
id: string;
title: string;
icon: IconComponent;
message?: string;
};
export { AuthRequestOptions };
// @public
export type AuthRequestOptions = {
optional?: boolean;
instantPopup?: boolean;
};
export { BackstageIdentityApi };
// @public
export type BackstageIdentityApi = {
getBackstageIdentity(
options?: AuthRequestOptions,
): Promise<BackstageIdentityResponse | undefined>;
};
export { BackstageIdentityResponse };
// @public
export type BackstageIdentityResponse = {
token: string;
expiresAt?: Date;
identity: BackstageUserIdentity;
};
export { BackstageUserIdentity };
// @public
export type BackstageUserIdentity = {
type: 'user';
userEntityRef: string;
ownershipEntityRefs: string[];
};
export { bitbucketAuthApiRef };
// @public
export const bitbucketAuthApiRef: ApiRef<
OAuthApi & ProfileInfoApi & BackstageIdentityApi & SessionApi
>;
export { bitbucketServerAuthApiRef };
// @public
export const bitbucketServerAuthApiRef: ApiRef<
OAuthApi & ProfileInfoApi & BackstageIdentityApi & SessionApi
>;
export { ConfigApi };
// @public
export type ConfigApi = Config;
export { configApiRef };
// @public
export const configApiRef: ApiRef<ConfigApi>;
// @public (undocumented)
export interface ConfigurableExtensionDataRef<
@@ -391,9 +425,23 @@ export const coreExtensionData: {
>;
};
export { createApiFactory };
// @public
export function createApiFactory<
Api,
Impl extends Api,
Deps extends {
[name in string]: unknown;
},
>(factory: ApiFactory<Api, Impl, Deps>): ApiFactory<Api, Impl, Deps>;
export { createApiRef };
// @public
export function createApiFactory<Api, Impl extends Api>(
api: ApiRef<Api>,
instance: Impl,
): ApiFactory<Api, Impl, {}>;
// @public
export function createApiRef<T>(config: ApiRefConfig): ApiRef<T>;
// @public
export function createExtension<
@@ -769,11 +817,50 @@ export type CreateSwappableComponentOptions<
transformProps?: (props: TExternalComponentProps) => TInnerComponentProps;
};
export { createTranslationMessages };
// @public
export function createTranslationMessages<
TId extends string,
TMessages extends {
[key in string]: string;
},
TFull extends boolean,
>(
options: TranslationMessagesOptions<TId, TMessages, TFull>,
): TranslationMessages<TId, TMessages, TFull>;
export { createTranslationRef };
// @public (undocumented)
export function createTranslationRef<
TId extends string,
const TNestedMessages extends AnyNestedMessages,
TTranslations extends {
[language in string]: () => Promise<{
default: {
[key in keyof FlattenedMessages<TNestedMessages>]: string | null;
};
}>;
},
>(
config: TranslationRefOptions<TId, TNestedMessages, TTranslations>,
): TranslationRef<TId, FlattenedMessages<TNestedMessages>>;
export { createTranslationResource };
// @public (undocumented)
export function createTranslationResource<
TId extends string,
TMessages extends {
[key in string]: string;
},
TTranslations extends {
[language in string]: () => Promise<{
default:
| TranslationMessages<TId>
| {
[key in keyof TMessages]: string | null;
};
}>;
},
>(
options: TranslationResourceOptions<TId, TMessages, TTranslations>,
): TranslationResource<TId>;
// @public
export interface DialogApi {
@@ -807,17 +894,37 @@ export interface DialogApiDialog<TResult = void> {
// @public
export const dialogApiRef: ApiRef<DialogApi>;
export { DiscoveryApi };
// @public
export type DiscoveryApi = {
getBaseUrl(pluginId: string): Promise<string>;
};
export { discoveryApiRef };
// @public
export const discoveryApiRef: ApiRef<DiscoveryApi>;
export { ErrorApi };
// @public
export type ErrorApi = {
post(error: ErrorApiError, context?: ErrorApiErrorContext): void;
error$(): Observable<{
error: ErrorApiError;
context?: ErrorApiErrorContext;
}>;
};
export { ErrorApiError };
// @public
export type ErrorApiError = {
name: string;
message: string;
stack?: string;
};
export { ErrorApiErrorContext };
// @public
export type ErrorApiErrorContext = {
hidden?: boolean;
};
export { errorApiRef };
// @public
export const errorApiRef: ApiRef<ErrorApi>;
// @public (undocumented)
export const ErrorDisplay: {
@@ -1201,24 +1308,60 @@ export interface ExternalRouteRef<
readonly T: TParams;
}
export { FeatureFlag };
// @public
export type FeatureFlag = {
name: string;
pluginId: string;
description?: string;
};
// @public
export type FeatureFlagConfig = {
name: string;
};
export { FeatureFlagsApi };
// @public
export interface FeatureFlagsApi {
getRegisteredFlags(): FeatureFlag[];
isActive(name: string): boolean;
registerFlag(flag: FeatureFlag): void;
save(options: FeatureFlagsSaveOptions): void;
}
export { featureFlagsApiRef };
// @public
export const featureFlagsApiRef: ApiRef<FeatureFlagsApi>;
export { FeatureFlagsSaveOptions };
// @public
export type FeatureFlagsSaveOptions = {
states: Record<string, FeatureFlagState>;
merge?: boolean;
};
export { FeatureFlagState };
// @public
export const FeatureFlagState: {
readonly None: 0;
readonly Active: 1;
};
export { FetchApi };
// @public (undocumented)
export type FeatureFlagState =
(typeof FeatureFlagState)[keyof typeof FeatureFlagState];
export { fetchApiRef };
// @public (undocumented)
export namespace FeatureFlagState {
// (undocumented)
export type Active = typeof FeatureFlagState.Active;
// (undocumented)
export type None = typeof FeatureFlagState.None;
}
// @public
export type FetchApi = {
fetch: typeof fetch;
};
// @public
export const fetchApiRef: ApiRef<FetchApi>;
// @public (undocumented)
export type FrontendFeature = FrontendPlugin | FrontendModule;
@@ -1283,11 +1426,28 @@ export type FrontendPluginInfoOptions = {
manifest?: () => Promise<JsonObject>;
};
export { githubAuthApiRef };
// @public
export const githubAuthApiRef: ApiRef<
OAuthApi & ProfileInfoApi & BackstageIdentityApi & SessionApi
>;
export { gitlabAuthApiRef };
// @public
export const gitlabAuthApiRef: ApiRef<
OAuthApi &
OpenIdConnectApi &
ProfileInfoApi &
BackstageIdentityApi &
SessionApi
>;
export { googleAuthApiRef };
// @public
export const googleAuthApiRef: ApiRef<
OAuthApi &
OpenIdConnectApi &
ProfileInfoApi &
BackstageIdentityApi &
SessionApi
>;
// @public (undocumented)
export const IconBundleBlueprint: ExtensionBlueprint<{
@@ -1332,11 +1492,27 @@ export interface IconsApi {
// @public
export const iconsApiRef: ApiRef<IconsApi>;
export { IdentityApi };
// @public
export type IdentityApi = {
getProfileInfo(): Promise<ProfileInfo>;
getBackstageIdentity(): Promise<BackstageUserIdentity>;
getCredentials(): Promise<{
token?: string;
}>;
signOut(): Promise<void>;
};
export { identityApiRef };
// @public
export const identityApiRef: ApiRef<IdentityApi>;
export { microsoftAuthApiRef };
// @public
export const microsoftAuthApiRef: ApiRef<
OAuthApi &
OpenIdConnectApi &
ProfileInfoApi &
BackstageIdentityApi &
SessionApi
>;
// @public
export const NavContentBlueprint: ExtensionBlueprint_2<{
@@ -1382,13 +1558,13 @@ export const NavItemBlueprint: ExtensionBlueprint<{
kind: 'nav-item';
params: {
title: string;
icon: IconComponent_3;
icon: IconComponent;
routeRef: RouteRef<undefined>;
};
output: ExtensionDataRef<
{
title: string;
icon: IconComponent_3;
icon: IconComponent;
routeRef: RouteRef<undefined>;
},
'core.nav-item.target',
@@ -1401,7 +1577,7 @@ export const NavItemBlueprint: ExtensionBlueprint<{
target: ConfigurableExtensionDataRef<
{
title: string;
icon: IconComponent_3;
icon: IconComponent;
routeRef: RouteRef<undefined>;
},
'core.nav-item.target',
@@ -1421,25 +1597,66 @@ export type NotFoundErrorPageProps = {
children?: ReactNode;
};
export { OAuthApi };
// @public
export type OAuthApi = {
getAccessToken(
scope?: OAuthScope,
options?: AuthRequestOptions,
): Promise<string>;
};
export { OAuthRequestApi };
// @public
export type OAuthRequestApi = {
createAuthRequester<OAuthResponse>(
options: OAuthRequesterOptions<OAuthResponse>,
): OAuthRequester<OAuthResponse>;
authRequest$(): Observable<PendingOAuthRequest[]>;
};
export { oauthRequestApiRef };
// @public
export const oauthRequestApiRef: ApiRef<OAuthRequestApi>;
export { OAuthRequester };
// @public
export type OAuthRequester<TAuthResponse> = (
scopes: Set<string>,
) => Promise<TAuthResponse>;
export { OAuthRequesterOptions };
// @public
export type OAuthRequesterOptions<TOAuthResponse> = {
provider: AuthProviderInfo;
onAuthRequest(scopes: Set<string>): Promise<TOAuthResponse>;
};
export { OAuthScope };
// @public
export type OAuthScope = string | string[];
export { oktaAuthApiRef };
// @public
export const oktaAuthApiRef: ApiRef<
OAuthApi &
OpenIdConnectApi &
ProfileInfoApi &
BackstageIdentityApi &
SessionApi
>;
export { oneloginAuthApiRef };
// @public
export const oneloginAuthApiRef: ApiRef<
OAuthApi &
OpenIdConnectApi &
ProfileInfoApi &
BackstageIdentityApi &
SessionApi
>;
export { OpenIdConnectApi };
// @public
export type OpenIdConnectApi = {
getIdToken(options?: AuthRequestOptions): Promise<string>;
};
export { openshiftAuthApiRef };
// @public
export const openshiftAuthApiRef: ApiRef<
OAuthApi & ProfileInfoApi & BackstageIdentityApi & SessionApi
>;
// @public (undocumented)
export interface OverridableExtensionDefinition<
@@ -1593,7 +1810,7 @@ export const PageBlueprint: ExtensionBlueprint<{
};
output:
| ExtensionDataRef<string, 'core.routing.path', {}>
| ExtensionDataRef<JSX_3.Element, 'core.reactElement', {}>
| ExtensionDataRef<JSX_3, 'core.reactElement', {}>
| ExtensionDataRef<
RouteRef<AnyRouteRefParams>,
'core.routing.ref',
@@ -1611,7 +1828,12 @@ export const PageBlueprint: ExtensionBlueprint<{
dataRefs: never;
}>;
export { PendingOAuthRequest };
// @public
export type PendingOAuthRequest = {
provider: AuthProviderInfo;
reject(): void;
trigger(): Promise<void>;
};
// @public (undocumented)
export interface PluginOptions<
@@ -1644,9 +1866,17 @@ export type PortableSchema<TOutput, TInput = TOutput> = {
schema: JsonObject;
};
export { ProfileInfo };
// @public
export type ProfileInfo = {
email?: string;
displayName?: string;
picture?: string;
};
export { ProfileInfoApi };
// @public
export type ProfileInfoApi = {
getProfile(options?: AuthRequestOptions): Promise<ProfileInfo | undefined>;
};
// @public (undocumented)
export const Progress: {
@@ -1736,9 +1966,29 @@ export interface RouteResolutionApi {
// @public
export const routeResolutionApiRef: ApiRef<RouteResolutionApi>;
export { SessionApi };
// @public
export type SessionApi = {
signIn(): Promise<void>;
signOut(): Promise<void>;
sessionState$(): Observable<SessionState>;
};
export { SessionState };
// @public
export const SessionState: {
readonly SignedIn: 'SignedIn';
readonly SignedOut: 'SignedOut';
};
// @public (undocumented)
export type SessionState = (typeof SessionState)[keyof typeof SessionState];
// @public (undocumented)
export namespace SessionState {
// (undocumented)
export type SignedIn = typeof SessionState.SignedIn;
// (undocumented)
export type SignedOut = typeof SessionState.SignedOut;
}
// @public
export const SignInPageBlueprint: ExtensionBlueprint<{
@@ -1763,11 +2013,32 @@ export const SignInPageBlueprint: ExtensionBlueprint<{
};
}>;
export { StorageApi };
// @public
export interface StorageApi {
forBucket(name: string): StorageApi;
observe$<T extends JsonValue>(
key: string,
): Observable<StorageValueSnapshot<T>>;
remove(key: string): Promise<void>;
set<T extends JsonValue>(key: string, data: T): Promise<void>;
snapshot<T extends JsonValue>(key: string): StorageValueSnapshot<T>;
}
export { storageApiRef };
// @public
export const storageApiRef: ApiRef<StorageApi>;
export { StorageValueSnapshot };
// @public
export type StorageValueSnapshot<TValue extends JsonValue> =
| {
key: string;
presence: 'unknown' | 'absent';
value?: undefined;
}
| {
key: string;
presence: 'present';
value: TValue;
};
// @public
export interface SubRouteRef<
@@ -1880,6 +2151,27 @@ export const ThemeBlueprint: ExtensionBlueprint<{
};
}>;
// @public (undocumented)
export type TranslationApi = {
getTranslation<
TMessages extends {
[key in string]: string;
},
>(
translationRef: TranslationRef<string, TMessages>,
): TranslationSnapshot<TMessages>;
translation$<
TMessages extends {
[key in string]: string;
},
>(
translationRef: TranslationRef<string, TMessages>,
): Observable<TranslationSnapshot<TMessages>>;
};
// @public (undocumented)
export const translationApiRef: ApiRef<TranslationApi>;
// @public
export const TranslationBlueprint: ExtensionBlueprint<{
kind: 'translation';
@@ -1917,26 +2209,169 @@ export const TranslationBlueprint: ExtensionBlueprint<{
};
}>;
export { TranslationMessages };
// @public (undocumented)
export type TranslationFunction<
TMessages extends {
[key in string]: string;
},
> = CollapsedMessages<TMessages> extends infer IMessages extends {
[key in string]: string;
}
? {
<TKey extends keyof IMessages>(
key: TKey,
...[args]: TranslationFunctionOptions<
NestedMessageKeys<TKey, IMessages>,
PluralKeys<TMessages>,
IMessages,
string
>
): IMessages[TKey];
<TKey extends keyof IMessages>(
key: TKey,
...[args]: TranslationFunctionOptions<
NestedMessageKeys<TKey, IMessages>,
PluralKeys<TMessages>,
IMessages,
string | JSX_3.Element
>
): JSX_3.Element;
}
: never;
export { TranslationMessagesOptions };
// @public
export interface TranslationMessages<
TId extends string = string,
TMessages extends {
[key in string]: string;
} = {
[key in string]: string;
},
TFull extends boolean = boolean,
> {
// (undocumented)
$$type: '@backstage/TranslationMessages';
full: TFull;
id: TId;
messages: TMessages;
}
export { TranslationRef };
// @public
export interface TranslationMessagesOptions<
TId extends string,
TMessages extends {
[key in string]: string;
},
TFull extends boolean,
> {
// (undocumented)
full?: TFull;
// (undocumented)
messages: false extends TFull
? {
[key in keyof TMessages]?: string | null;
}
: {
[key in keyof TMessages]: string | null;
};
// (undocumented)
ref: TranslationRef<TId, TMessages>;
}
export { TranslationRefOptions };
// @public (undocumented)
export interface TranslationRef<
TId extends string = string,
TMessages extends {
[key in string]: string;
} = {
[key in string]: string;
},
> {
// (undocumented)
$$type: '@backstage/TranslationRef';
// (undocumented)
id: TId;
// (undocumented)
T: TMessages;
}
export { TranslationResource };
// @public (undocumented)
export interface TranslationRefOptions<
TId extends string,
TNestedMessages extends AnyNestedMessages,
TTranslations extends {
[language in string]: () => Promise<{
default: {
[key in keyof FlattenedMessages<TNestedMessages>]: string | null;
};
}>;
},
> {
// (undocumented)
id: TId;
// (undocumented)
messages: TNestedMessages;
// (undocumented)
translations?: TTranslations;
}
export { TranslationResourceOptions };
// @public (undocumented)
export interface TranslationResource<TId extends string = string> {
// (undocumented)
$$type: '@backstage/TranslationResource';
// (undocumented)
id: TId;
}
export { TypesToApiRefs };
// @public (undocumented)
export interface TranslationResourceOptions<
TId extends string,
TMessages extends {
[key in string]: string;
},
TTranslations extends {
[language in string]: () => Promise<{
default:
| TranslationMessages<TId>
| {
[key in keyof TMessages]: string | null;
};
}>;
},
> {
// (undocumented)
ref: TranslationRef<TId, TMessages>;
// (undocumented)
translations: TTranslations;
}
// @public (undocumented)
export type TranslationSnapshot<
TMessages extends {
[key in string]: string;
},
> =
| {
ready: false;
}
| {
ready: true;
t: TranslationFunction<TMessages>;
};
// @public
export type TypesToApiRefs<T> = {
[key in keyof T]: ApiRef<T[key]>;
};
// @public
export function useAnalytics(): AnalyticsTracker;
export { useApi };
// @public
export function useApi<T>(apiRef: ApiRef<T>): T;
export { useApiHolder };
// @public
export function useApiHolder(): ApiHolder;
// @public
export function useAppNode(): AppNode | undefined;
@@ -1954,9 +2389,29 @@ export function useRouteRefParams<Params extends AnyRouteRefParams>(
_routeRef: RouteRef<Params> | SubRouteRef<Params>,
): Params;
export { useTranslationRef };
// @public (undocumented)
export const useTranslationRef: <TMessages extends { [key in string]: string }>(
translationRef: TranslationRef<string, TMessages>,
) => {
t: TranslationFunction<TMessages>;
};
export { vmwareCloudAuthApiRef };
// @public
export const vmwareCloudAuthApiRef: ApiRef<
OAuthApi &
OpenIdConnectApi &
ProfileInfoApi &
BackstageIdentityApi &
SessionApi
>;
export { withApis };
// @public
export function withApis<T extends {}>(
apis: TypesToApiRefs<T>,
): <TProps extends T>(
WrappedComponent: ComponentType<TProps>,
) => {
(props: PropsWithChildren<Omit<TProps, keyof T>>): JSX_2.Element;
displayName: string;
};
```