shortcuts

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-08-19 11:56:16 +02:00
parent eec0b15d3b
commit 77a9d2f6cf
6 changed files with 7 additions and 13 deletions
-12
View File
@@ -12,8 +12,6 @@ import { Observable } from '@backstage/types';
import { default as Observable_2 } from 'zen-observable';
import { StorageApi } from '@backstage/core-plugin-api';
// Warning: (ae-missing-release-tag) "LocalStoredShortcuts" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export class LocalStoredShortcuts implements ShortcutApi {
constructor(storageApi: StorageApi);
@@ -31,8 +29,6 @@ export class LocalStoredShortcuts implements ShortcutApi {
update(shortcut: Shortcut): Promise<void>;
}
// Warning: (ae-missing-release-tag) "Shortcut" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type Shortcut = {
id: string;
@@ -40,8 +36,6 @@ export type Shortcut = {
title: string;
};
// Warning: (ae-missing-release-tag) "ShortcutApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface ShortcutApi {
add(shortcut: Omit<Shortcut, 'id'>): Promise<void>;
@@ -52,18 +46,12 @@ export interface ShortcutApi {
update(shortcut: Shortcut): Promise<void>;
}
// Warning: (ae-missing-release-tag) "Shortcuts" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const Shortcuts: (props: ShortcutsProps) => JSX.Element;
// Warning: (ae-missing-release-tag) "shortcutsApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const shortcutsApiRef: ApiRef<ShortcutApi>;
// Warning: (ae-missing-release-tag) "shortcutsPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const shortcutsPlugin: BackstagePlugin<{}, {}, {}>;
@@ -23,6 +23,8 @@ import Observable from 'zen-observable';
/**
* Implementation of the ShortcutApi that uses the StorageApi to store shortcuts.
*
* @public
*/
export class LocalStoredShortcuts implements ShortcutApi {
constructor(private readonly storageApi: StorageApi) {}
+2
View File
@@ -18,10 +18,12 @@ import { Shortcut } from '../types';
import { createApiRef } from '@backstage/core-plugin-api';
import { Observable } from '@backstage/types';
/** @public */
export const shortcutsApiRef = createApiRef<ShortcutApi>({
id: 'plugin.shortcuts.api',
});
/** @public */
export interface ShortcutApi {
/**
* Returns an Observable that will subscribe to changes.
+2
View File
@@ -22,6 +22,7 @@ import {
storageApiRef,
} from '@backstage/core-plugin-api';
/** @public */
export const shortcutsPlugin = createPlugin({
id: 'shortcuts',
apis: [
@@ -34,6 +35,7 @@ export const shortcutsPlugin = createPlugin({
],
});
/** @public */
export const Shortcuts = shortcutsPlugin.provide(
createComponentExtension({
name: 'Shortcuts',
+1
View File
@@ -14,6 +14,7 @@
* limitations under the License.
*/
/** @public */
export type Shortcut = {
id: string;
url: string;
-1
View File
@@ -232,7 +232,6 @@ const ALLOW_WARNINGS = [
'plugins/newrelic-dashboard',
'plugins/pagerduty',
'plugins/search-backend-module-pg',
'plugins/shortcuts',
'plugins/splunk-on-call',
'plugins/tech-radar',
'plugins/user-settings',