diff --git a/plugins/search-common/api-report.md b/plugins/search-common/api-report.md index 495d77ed26..bb049742f7 100644 --- a/plugins/search-common/api-report.md +++ b/plugins/search-common/api-report.md @@ -11,46 +11,46 @@ import { Readable } from 'stream'; import { Transform } from 'stream'; import { Writable } from 'stream'; -// @beta +// @public export interface DocumentCollatorFactory { getCollator(): Promise; readonly type: string; readonly visibilityPermission?: Permission; } -// @beta +// @public export interface DocumentDecoratorFactory { getDecorator(): Promise; readonly types?: string[]; } -// @beta +// @public export type DocumentTypeInfo = { visibilityPermission?: Permission; }; -// @beta +// @public export type IndexableDocument = SearchDocument & { authorization?: { resourceRef: string; }; }; -// @beta (undocumented) +// @public (undocumented) export type IndexableResult = Result; -// @beta (undocumented) +// @public (undocumented) export type IndexableResultSet = ResultSet; -// @beta +// @public export type QueryRequestOptions = { token?: string; }; -// @beta +// @public export type QueryTranslator = (query: SearchQuery) => unknown; -// @beta (undocumented) +// @public (undocumented) export interface Result { // (undocumented) document: TDocument; @@ -60,7 +60,7 @@ export interface Result { type: string; } -// @beta +// @public export interface ResultHighlight { // (undocumented) fields: { @@ -70,7 +70,7 @@ export interface ResultHighlight { preTag: string; } -// @beta (undocumented) +// @public (undocumented) export interface ResultSet { // (undocumented) nextPageCursor?: string; @@ -80,14 +80,14 @@ export interface ResultSet { results: Result[]; } -// @beta +// @public export interface SearchDocument { location: string; text: string; title: string; } -// @beta +// @public export interface SearchEngine { getIndexer(type: string): Promise; query( @@ -97,7 +97,7 @@ export interface SearchEngine { setTranslator(translator: QueryTranslator): void; } -// @beta (undocumented) +// @public (undocumented) export interface SearchQuery { // (undocumented) filters?: JsonObject; @@ -109,9 +109,9 @@ export interface SearchQuery { types?: string[]; } -// @beta (undocumented) +// @public (undocumented) export type SearchResult = Result; -// @beta (undocumented) +// @public (undocumented) export type SearchResultSet = ResultSet; ``` diff --git a/plugins/search-common/src/types.ts b/plugins/search-common/src/types.ts index f77e819364..fdcc06287c 100644 --- a/plugins/search-common/src/types.ts +++ b/plugins/search-common/src/types.ts @@ -19,7 +19,7 @@ import { JsonObject } from '@backstage/types'; import { Readable, Transform, Writable } from 'stream'; /** - * @beta + * @public */ export interface SearchQuery { term: string; @@ -29,10 +29,10 @@ export interface SearchQuery { } /** - * @beta * Metadata for result relevant document fields with matched terms highlighted * via wrapping in associated pre/post tags. The UI is expected to parse these * field excerpts by replacing wrapping tags with applicable UI elements for rendering. + * @public */ export interface ResultHighlight { /** @@ -53,7 +53,7 @@ export interface ResultHighlight { } /** - * @beta + * @public */ export interface Result { type: string; @@ -62,7 +62,7 @@ export interface Result { } /** - * @beta + * @public */ export interface ResultSet { results: Result[]; @@ -71,28 +71,28 @@ export interface ResultSet { } /** - * @beta + * @public */ export type SearchResult = Result; /** - * @beta + * @public */ export type SearchResultSet = ResultSet; /** - * @beta + * @public */ export type IndexableResult = Result; /** - * @beta + * @public */ export type IndexableResultSet = ResultSet; /** * Base properties that all search documents must include. - * @beta + * @public */ export interface SearchDocument { /** @@ -117,7 +117,7 @@ export interface SearchDocument { * backends working directly with documents being inserted or retrieved from * search indexes. When dealing with documents in the frontend, use * {@link SearchDocument}. - * @beta + * @public */ export type IndexableDocument = SearchDocument & { /** @@ -136,7 +136,7 @@ export type IndexableDocument = SearchDocument & { * Information about a specific document type. Intended to be used in the * {@link @backstage/plugin-search-backend-node#IndexBuilder} to collect information * about the types stored in the index. - * @beta + * @public */ export type DocumentTypeInfo = { /** @@ -148,7 +148,7 @@ export type DocumentTypeInfo = { /** * Factory class for instantiating collators. - * @beta + * @public */ export interface DocumentCollatorFactory { /** @@ -171,7 +171,7 @@ export interface DocumentCollatorFactory { /** * Factory class for instantiating decorators. - * @beta + * @public */ export interface DocumentDecoratorFactory { /** @@ -190,13 +190,13 @@ export interface DocumentDecoratorFactory { /** * A type of function responsible for translating an abstract search query into * a concrete query relevant to a particular search engine. - * @beta + * @public */ export type QueryTranslator = (query: SearchQuery) => unknown; /** * Options when querying a search engine. - * @beta + * @public */ export type QueryRequestOptions = { token?: string; @@ -206,7 +206,7 @@ export type QueryRequestOptions = { * Interface that must be implemented by specific search engines, responsible * for performing indexing and querying and translating abstract queries into * concrete, search engine-specific queries. - * @beta + * @public */ export interface SearchEngine { /**