search-common: add optional visibilityPermission property to DocumentCollator type
Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/search-common': patch
|
||||
---
|
||||
|
||||
Add optional visibilityPermission property to DocumentCollator type
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
```ts
|
||||
import { JsonObject } from '@backstage/types';
|
||||
import { Permission } from '@backstage/plugin-permission-common';
|
||||
|
||||
// Warning: (ae-missing-release-tag) "DocumentCollator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
@@ -12,6 +13,7 @@ export interface DocumentCollator {
|
||||
// (undocumented)
|
||||
execute(): Promise<IndexableDocument[]>;
|
||||
readonly type: string;
|
||||
readonly visibilityPermission?: Permission;
|
||||
}
|
||||
|
||||
// Warning: (ae-missing-release-tag) "DocumentDecorator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
"url": "https://github.com/backstage/backstage/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/types": "^0.1.1"
|
||||
"@backstage/types": "^0.1.1",
|
||||
"@backstage/plugin-permission-common": "^0.4.0-next.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.12.0-next.0"
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Permission } from '@backstage/plugin-permission-common';
|
||||
import { JsonObject } from '@backstage/types';
|
||||
|
||||
export interface SearchQuery {
|
||||
@@ -76,6 +78,13 @@ export interface DocumentCollator {
|
||||
* index name by Search Engines.
|
||||
*/
|
||||
readonly type: string;
|
||||
|
||||
/**
|
||||
* The {@link @backstage/plugin-permission-common#Permission} that controls
|
||||
* visibility of resources associated with this collator's documents.
|
||||
*/
|
||||
readonly visibilityPermission?: Permission;
|
||||
|
||||
execute(): Promise<IndexableDocument[]>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user