API Report and document types.

Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
Eric Peterson
2021-06-01 12:13:36 +02:00
parent db1c8f93b3
commit d0d2bf79c8
2 changed files with 12 additions and 1 deletions
+3 -1
View File
@@ -10,12 +10,14 @@ import { JsonObject } from '@backstage/config';
export interface DocumentCollator {
// (undocumented)
execute(): Promise<IndexableDocument[]>;
readonly type: string;
}
// @public
export interface DocumentDecorator {
// (undocumented)
execute(type: string, documents: IndexableDocument[]): Promise<IndexableDocument[]>;
execute(documents: IndexableDocument[]): Promise<IndexableDocument[]>;
readonly types?: string[];
}
// @public
+9
View File
@@ -58,6 +58,10 @@ export interface IndexableDocument {
* search.
*/
export interface DocumentCollator {
/**
* The type or name of the document set returned by this collator. Used as an
* index name by Search Engines.
*/
readonly type: string;
execute(): Promise<IndexableDocument[]>;
}
@@ -67,6 +71,11 @@ export interface DocumentCollator {
* additional metadata.
*/
export interface DocumentDecorator {
/**
* An optional array of document/index types on which this decorator should
* be applied. If no types are provided, this decorator will be applied to
* all document/index types.
*/
readonly types?: string[];
execute(documents: IndexableDocument[]): Promise<IndexableDocument[]>;
}