search: move DocumentTypeInfo to search-common

Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
MT Lewis
2022-01-24 14:46:11 +00:00
parent 1887a857c4
commit 634abc1a41
11 changed files with 29 additions and 28 deletions
+7
View File
@@ -25,6 +25,13 @@ export interface DocumentDecorator {
readonly types?: string[];
}
// Warning: (ae-missing-release-tag) "DocumentTypeInfo" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type DocumentTypeInfo = {
visibilityPermission?: Permission;
};
// Warning: (ae-missing-release-tag) "IndexableDocument" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
+13
View File
@@ -68,6 +68,19 @@ export interface IndexableDocument {
};
}
/**
* Information about a specific document type. Intended to be used in the
* {@link @backstage/search-backend-node#IndexBuilder} to collect information
* about the types stored in the index.
*/
export type DocumentTypeInfo = {
/**
* The {@link @backstage/plugin-permission-common#Permission} that controls
* visibility of resources associated with this collator's documents.
*/
visibilityPermission?: Permission;
};
/**
* Interface that must be implemented in order to expose new documents to
* search.