clean up api report

Signed-off-by: Emma Indal <emma.indahl@gmail.com>
This commit is contained in:
Emma Indal
2022-02-21 12:02:50 +01:00
parent 60c97f6707
commit 81b6d0fabe
3 changed files with 29 additions and 28 deletions
+3 -21
View File
@@ -18,25 +18,17 @@ import { PublisherBase } from '@backstage/techdocs-common';
import { TechDocsDocument } from '@backstage/techdocs-common';
import { TokenManager } from '@backstage/backend-common';
// Warning: (ae-missing-release-tag) "createRouter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
// @public
export function createRouter(options: RouterOptions): Promise<express.Router>;
// Warning: (ae-missing-release-tag) "DefaultTechDocsCollator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
// @public
export class DefaultTechDocsCollator implements DocumentCollator {
// @deprecated
constructor(options: TechDocsCollatorOptions);
// (undocumented)
protected applyArgsToFormat(
format: string,
args: Record<string, string>,
): string;
// (undocumented)
protected discovery: PluginEndpointDiscovery;
// (undocumented)
execute(): Promise<TechDocsDocument[]>;
// (undocumented)
static fromConfig(
@@ -44,15 +36,11 @@ export class DefaultTechDocsCollator implements DocumentCollator {
options: TechDocsCollatorOptions,
): DefaultTechDocsCollator;
// (undocumented)
protected locationTemplate: string;
// (undocumented)
readonly type: string;
// (undocumented)
readonly visibilityPermission: Permission;
}
// Warning: (ae-missing-release-tag) "OutOfTheBoxDeploymentOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type OutOfTheBoxDeploymentOptions = {
preparers: PreparerBuilder;
@@ -65,8 +53,6 @@ export type OutOfTheBoxDeploymentOptions = {
cache: PluginCacheManager;
};
// Warning: (ae-missing-release-tag) "RecommendedDeploymentOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type RecommendedDeploymentOptions = {
publisher: PublisherBase;
@@ -76,16 +62,12 @@ export type RecommendedDeploymentOptions = {
cache: PluginCacheManager;
};
// Warning: (ae-missing-release-tag) "RouterOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type RouterOptions =
| RecommendedDeploymentOptions
| OutOfTheBoxDeploymentOptions;
// Warning: (ae-missing-release-tag) "TechDocsCollatorOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
// @public
export type TechDocsCollatorOptions = {
discovery: PluginEndpointDiscovery;
logger: Logger_2;
@@ -39,6 +39,11 @@ interface MkSearchIndexDoc {
location: string;
}
/**
* Options to configure the TechDocs collator
*
* @public
*/
export type TechDocsCollatorOptions = {
discovery: PluginEndpointDiscovery;
logger: Logger;
@@ -55,6 +60,11 @@ type EntityInfo = {
kind: string;
};
/**
* A search collator responsible for gather and transform TechDocs document to index.
*
* @public
*/
export class DefaultTechDocsCollator implements DocumentCollator {
protected discovery: PluginEndpointDiscovery;
protected locationTemplate: string;
+16 -7
View File
@@ -37,8 +37,10 @@ import { createCacheMiddleware, TechDocsCache } from '../cache';
import { CachedEntityLoader } from './CachedEntityLoader';
/**
* All of the required dependencies for running TechDocs in the "out-of-the-box"
* Required dependencies for running TechDocs in the "out-of-the-box"
* deployment configuration (prepare/generate/publish all in the Backend).
*
* @public
*/
export type OutOfTheBoxDeploymentOptions = {
preparers: PreparerBuilder;
@@ -54,6 +56,8 @@ export type OutOfTheBoxDeploymentOptions = {
/**
* Required dependencies for running TechDocs in the "recommended" deployment
* configuration (prepare/generate handled externally in CI/CD).
*
* @public
*/
export type RecommendedDeploymentOptions = {
publisher: PublisherBase;
@@ -65,6 +69,8 @@ export type RecommendedDeploymentOptions = {
/**
* One of the two deployment configurations must be provided.
*
* @public
*/
export type RouterOptions =
| RecommendedDeploymentOptions
@@ -73,6 +79,8 @@ export type RouterOptions =
/**
* Typeguard to help createRouter() understand when we are in a "recommended"
* deployment vs. when we are in an out-of-the-box deployment configuration.
*
* * @public
*/
function isOutOfTheBoxOption(
opt: RouterOptions,
@@ -80,6 +88,11 @@ function isOutOfTheBoxOption(
return (opt as OutOfTheBoxDeploymentOptions).preparers !== undefined;
}
/**
* Creates a techdocs router.
*
* @public
*/
export async function createRouter(
options: RouterOptions,
): Promise<express.Router> {
@@ -323,12 +336,8 @@ export function createEventStream(
}
/**
* Create a HTTP response. This is used for the legacy non-event-stream implementation of the sync endpoint.
*
* @param res - the response to write the event-stream to
* @returns A tuple of <log, error, finish> callbacks to emit messages. A call to 'error' or 'finish'
* will close the event-stream.
*/
* @deprecated use event-stream implementation of the sync endpoint
* */
export function createHttpResponse(
res: Response<any, any>,
): DocsSynchronizerSyncOpts {