Regenerate api reports

Signed-off-by: Robert Bunning <rbunning@webstaurantstore.com>
This commit is contained in:
Robert Bunning
2022-12-27 09:13:14 -05:00
parent 1dd782056d
commit 0d514d6e10
4 changed files with 55 additions and 17 deletions
+11 -1
View File
@@ -7,6 +7,7 @@
import { AdrDocument } from '@backstage/plugin-adr-common';
import { AdrFilePathFilterFn } from '@backstage/plugin-adr-common';
import { CacheClient } from '@backstage/backend-common';
import { CatalogApi } from '@backstage/catalog-client';
import { Config } from '@backstage/config';
import { DocumentCollatorFactory } from '@backstage/plugin-search-common';
@@ -42,11 +43,20 @@ export type AdrParserContext = {
path: string;
};
// @public (undocumented)
export type AdrRouterOptions = {
reader: UrlReader;
cacheClient: CacheClient;
logger: Logger;
};
// @public
export const createMadrParser: (options?: MadrParserOptions) => AdrParser;
// @public (undocumented)
export function createRouter(reader: UrlReader): Promise<express.Router>;
export function createRouter(
options: AdrRouterOptions,
): Promise<express.Router>;
// @public
export class DefaultAdrCollatorFactory implements DocumentCollatorFactory {
+1
View File
@@ -15,3 +15,4 @@
*/
export { createRouter } from './router';
export type { AdrRouterOptions } from './router';
@@ -20,6 +20,7 @@ import { Logger } from 'winston';
import express from 'express';
import Router from 'express-promise-router';
/** @public */
export type AdrRouterOptions = {
reader: UrlReader;
cacheClient: CacheClient;
+42 -16
View File
@@ -7,11 +7,37 @@
import { AdrDocument } from '@backstage/plugin-adr-common';
import { AdrFilePathFilterFn } from '@backstage/plugin-adr-common';
import { ApiRef } from '@backstage/core-plugin-api';
import { BackstagePlugin } from '@backstage/core-plugin-api';
import { DiscoveryApi } from '@backstage/core-plugin-api';
import { isAdrAvailable } from '@backstage/plugin-adr-common';
import { ResultHighlight } from '@backstage/plugin-search-common';
import { RouteRef } from '@backstage/core-plugin-api';
// @public
export interface AdrApi {
listAdrs(url: string): Promise<AdrListResult>;
readAdr(url: string): Promise<AdrReadResult>;
}
// @public
export const adrApiRef: ApiRef<AdrApi>;
// @public
export class AdrClient implements AdrApi {
constructor(options: AdrClientOptions);
// (undocumented)
listAdrs(url: string): Promise<AdrListResult>;
// (undocumented)
readAdr(url: string): Promise<AdrReadResult>;
}
// @public
export interface AdrClientOptions {
// (undocumented)
discoveryApi: DiscoveryApi;
}
// @public
export type AdrContentDecorator = (adrInfo: {
baseUrl: string;
@@ -21,10 +47,16 @@ export type AdrContentDecorator = (adrInfo: {
};
// @public
export interface AdrFileFetcher {
useGetAdrFilesAtUrl: (url: string) => any;
useReadAdrFileAtUrl: (url: string) => any;
}
export type AdrFileInfo = {
type: string;
path: string;
name: string;
};
// @public
export type AdrListResult = {
data: AdrFileInfo[];
};
// @public
export const adrPlugin: BackstagePlugin<
@@ -37,17 +69,18 @@ export const adrPlugin: BackstagePlugin<
// @public
export const AdrReader: {
(props: {
adr: string;
decorators?: AdrContentDecorator[];
adrFileFetcher?: AdrFileFetcher;
}): JSX.Element;
(props: { adr: string; decorators?: AdrContentDecorator[] }): JSX.Element;
decorators: Readonly<{
createRewriteRelativeLinksDecorator(): AdrContentDecorator;
createRewriteRelativeEmbedsDecorator(): AdrContentDecorator;
}>;
};
// @public
export type AdrReadResult = {
data: string;
};
// @public
export function AdrSearchResultListItem(props: {
lineClamp?: number;
@@ -60,14 +93,7 @@ export function AdrSearchResultListItem(props: {
export const EntityAdrContent: (props: {
contentDecorators?: AdrContentDecorator[] | undefined;
filePathFilterFn?: AdrFilePathFilterFn | undefined;
adrFileFetcher?: AdrFileFetcher | undefined;
}) => JSX.Element;
export { isAdrAvailable };
// @public
export const octokitAdrFileFetcher: AdrFileFetcher;
// @public
export const urlReaderAdrFileFetcher: AdrFileFetcher;
```