add api reports

Signed-off-by: Emma Indal <emma.indahl@gmail.com>
This commit is contained in:
Emma Indal
2022-03-04 14:29:58 +01:00
parent 7c13bcbc30
commit 140cf15341
8 changed files with 160 additions and 7 deletions
+10 -1
View File
@@ -13,9 +13,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Stack Overflow frontend plugin
*
* @packageDocumentation
*/
export {
stackOverflowPlugin,
StackOverflowSearchResultListItem,
HomePageStackOverflowQuestions,
} from './plugin';
export type {
StackOverflowQuestion,
StackOverflowQuestionsContentProps,
StackOverflowQuestionsRequestParams,
} from './types';
+6 -1
View File
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {
createPlugin,
createComponentExtension,
@@ -20,6 +21,11 @@ import {
import { createCardExtension } from '@backstage/plugin-home';
import { StackOverflowQuestionsContentProps } from './types';
/**
* The Backstage plugin that holds stack overflow specific components
*
* @public
*/
export const stackOverflowPlugin = createPlugin({
id: 'stack-overflow',
});
@@ -29,7 +35,6 @@ export const stackOverflowPlugin = createPlugin({
*
* @public
*/
export const StackOverflowSearchResultListItem = stackOverflowPlugin.provide(
createComponentExtension({
name: 'StackOverflowResultListItem',
+15
View File
@@ -14,6 +14,11 @@
* limitations under the License.
*/
/**
* Type representing a stack overflow question
*
* @public
*/
export type StackOverflowQuestion = {
title: string;
link: string;
@@ -22,10 +27,20 @@ export type StackOverflowQuestion = {
answer_count: number;
};
/**
* Props for HomePageStackOverflowQuestions
*
* @public
*/
export type StackOverflowQuestionsContentProps = {
requestParams: StackOverflowQuestionsRequestParams;
};
/**
* Type representing the request parameters accepted by the HomePageStackOverflowQuestions component
*
* @public
*/
export type StackOverflowQuestionsRequestParams = {
[key: string]: string | string[] | number;
};