core-app-api: api report

Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
This commit is contained in:
Vincenzo Scamporlino
2023-10-09 16:10:19 +02:00
parent 2dd349cbef
commit 9e85c9bc9f
2 changed files with 109 additions and 3 deletions
+94
View File
@@ -0,0 +1,94 @@
## 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 { AppLanguageApi } from '@backstage/core-plugin-api/alpha';
import { AppTheme } from '@backstage/core-plugin-api';
import { AppThemeApi } from '@backstage/core-plugin-api';
import { Observable } from '@backstage/types';
import { TranslationApi } from '@backstage/core-plugin-api/alpha';
import { TranslationMessages } from '@backstage/core-plugin-api/alpha';
import { TranslationRef } from '@backstage/core-plugin-api/alpha';
import { TranslationResource } from '@backstage/core-plugin-api/alpha';
import { TranslationSnapshot } from '@backstage/core-plugin-api/alpha';
// @alpha
export class AppLanguageSelector implements AppLanguageApi {
// (undocumented)
static create(options?: AppLanguageSelectorOptions): AppLanguageSelector;
// (undocumented)
static createWithStorage(
options?: AppLanguageSelectorOptions,
): AppLanguageSelector;
// (undocumented)
getAvailableLanguages(): {
languages: string[];
};
// (undocumented)
getLanguage(): {
language: string;
};
// (undocumented)
language$(): Observable<{
language: string;
}>;
// (undocumented)
setLanguage(language?: string | undefined): void;
}
// @alpha (undocumented)
export interface AppLanguageSelectorOptions {
// (undocumented)
availableLanguages?: string[];
// (undocumented)
defaultLanguage?: string;
}
// @public
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;
}
// @alpha (undocumented)
export class I18nextTranslationApi implements TranslationApi {
// (undocumented)
static create(options: I18nextTranslationApiOptions): I18nextTranslationApi;
// (undocumented)
getTranslation<
TMessages extends {
[key in string]: string;
},
>(
translationRef: TranslationRef<string, TMessages>,
): TranslationSnapshot<TMessages>;
// (undocumented)
translation$<
TMessages extends {
[key in string]: string;
},
>(
translationRef: TranslationRef<string, TMessages>,
): Observable<TranslationSnapshot<TMessages>>;
}
// @alpha (undocumented)
export interface I18nextTranslationApiOptions {
// (undocumented)
languageApi: AppLanguageApi;
// (undocumented)
resources?: Array<TranslationMessages | TranslationResource>;
}
// (No @packageDocumentation comment for this package)
```
+15 -3
View File
@@ -14,7 +14,19 @@
* limitations under the License.
*/
import { AppThemeSelector } from './apis';
import { AppLanguageSelector } from './apis/implementations/AppLanguageApi';
import { I18nextTranslationApi } from './apis/implementations/TranslationApi';
import {
AppLanguageSelector,
AppLanguageSelectorOptions,
} from './apis/implementations/AppLanguageApi';
import {
I18nextTranslationApi,
I18nextTranslationApiOptions,
} from './apis/implementations/TranslationApi';
export { AppLanguageSelector, AppThemeSelector, I18nextTranslationApi };
export {
type AppLanguageSelectorOptions,
type I18nextTranslationApiOptions,
AppLanguageSelector,
AppThemeSelector,
I18nextTranslationApi,
};