API Report and document types.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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[]>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user