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
@@ -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 {