Add todo-list api docs
Signed-off-by: Vincenzo Scamporlino <me@vinzscam.dev>
This commit is contained in:
committed by
Joon Park
parent
172e5c58b6
commit
f813a0ff51
@@ -0,0 +1,22 @@
|
||||
## API Report File for "@internal/plugin-todo-list-backend"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
import express from 'express';
|
||||
import { IdentityClient } from '@backstage/plugin-auth-node';
|
||||
import { Logger } from 'winston';
|
||||
|
||||
// @public
|
||||
export function createRouter(options: RouterOptions): Promise<express.Router>;
|
||||
|
||||
// @public
|
||||
export interface RouterOptions {
|
||||
// (undocumented)
|
||||
identity: IdentityClient;
|
||||
// (undocumented)
|
||||
logger: Logger;
|
||||
}
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
```
|
||||
@@ -25,11 +25,25 @@ import {
|
||||
import { add, getAll, update } from './todos';
|
||||
import { InputError } from '@backstage/errors';
|
||||
|
||||
/**
|
||||
* Dependencies of the todo-list router
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export interface RouterOptions {
|
||||
logger: Logger;
|
||||
identity: IdentityClient;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an express.Router with some endpoints
|
||||
* for creating, editing and deleting todo items.
|
||||
*
|
||||
* @public
|
||||
* @param options - the dependencies of the router
|
||||
* @returns an express.Router
|
||||
*
|
||||
*/
|
||||
export async function createRouter(
|
||||
options: RouterOptions,
|
||||
): Promise<express.Router> {
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
## API Report File for "@internal/plugin-todo-list-common"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
import { BasicPermission } from '@backstage/plugin-permission-common';
|
||||
|
||||
// @public
|
||||
export const tempExamplePermission: BasicPermission;
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
```
|
||||
@@ -16,6 +16,11 @@
|
||||
|
||||
import { createPermission } from '@backstage/plugin-permission-common';
|
||||
|
||||
/**
|
||||
* An example of a permission.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export const tempExamplePermission = createPermission({
|
||||
name: 'temp.example.noop',
|
||||
attributes: {},
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
## API Report File for "@internal/plugin-todo-list"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
/// <reference types="react" />
|
||||
|
||||
import { BackstagePlugin } from '@backstage/core-plugin-api';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
|
||||
// @public
|
||||
export const TodoListPage: () => JSX.Element;
|
||||
|
||||
// @public
|
||||
export const todoListPlugin: BackstagePlugin<
|
||||
{
|
||||
root: RouteRef<undefined>;
|
||||
},
|
||||
{}
|
||||
>;
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
```
|
||||
@@ -20,6 +20,11 @@ import {
|
||||
|
||||
import { rootRouteRef } from './routes';
|
||||
|
||||
/**
|
||||
* The todo-list plugin instance
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export const todoListPlugin = createPlugin({
|
||||
id: 'todolist',
|
||||
routes: {
|
||||
@@ -27,6 +32,11 @@ export const todoListPlugin = createPlugin({
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
* The Router and main entrypoint to the todo-list plugin.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export const TodoListPage = todoListPlugin.provide(
|
||||
createRoutableExtension({
|
||||
name: 'TodoListPage',
|
||||
|
||||
Reference in New Issue
Block a user