@@ -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) {}
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/** @public */
|
||||
export type Shortcut = {
|
||||
id: string;
|
||||
url: string;
|
||||
|
||||
Reference in New Issue
Block a user