refactor: apply review suggestions
Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
@@ -3,39 +3,12 @@
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
/// <reference types="node" />
|
||||
|
||||
import { BackstageCredentials } from '@backstage/backend-plugin-api';
|
||||
import { DocumentTypeInfo } from '@backstage/plugin-search-common';
|
||||
import { ExtensionPoint } from '@backstage/backend-plugin-api';
|
||||
import { IndexableResultSet } from '@backstage/plugin-search-common';
|
||||
import { RegisterCollatorParameters } from '@backstage/plugin-search-backend-node';
|
||||
import { RegisterDecoratorParameters } from '@backstage/plugin-search-backend-node';
|
||||
import { SearchQuery } from '@backstage/plugin-search-common';
|
||||
import { SearchEngine } from '@backstage/plugin-search-backend-node';
|
||||
import { ServiceRef } from '@backstage/backend-plugin-api';
|
||||
import { Writable } from 'stream';
|
||||
|
||||
// @public
|
||||
export type QueryRequestOptions =
|
||||
| {
|
||||
token?: string;
|
||||
}
|
||||
| {
|
||||
credentials: BackstageCredentials;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type QueryTranslator = (query: SearchQuery) => unknown;
|
||||
|
||||
// @public
|
||||
export interface SearchEngine {
|
||||
getIndexer(type: string): Promise<Writable>;
|
||||
query(
|
||||
query: SearchQuery,
|
||||
options?: QueryRequestOptions,
|
||||
): Promise<IndexableResultSet>;
|
||||
setTranslator(translator: QueryTranslator): void;
|
||||
}
|
||||
|
||||
// @alpha
|
||||
export interface SearchEngineRegistryExtensionPoint {
|
||||
|
||||
@@ -30,14 +30,10 @@ import {
|
||||
RegisterDecoratorParameters,
|
||||
} from '@backstage/plugin-search-backend-node';
|
||||
|
||||
import { SearchEngine } from './types';
|
||||
import { IndexBuilder } from './IndexBuilder';
|
||||
|
||||
export type {
|
||||
import {
|
||||
SearchEngine,
|
||||
QueryRequestOptions,
|
||||
QueryTranslator,
|
||||
} from './types';
|
||||
IndexBuilder,
|
||||
} from '@backstage/plugin-search-backend-node';
|
||||
|
||||
/**
|
||||
* @alpha
|
||||
|
||||
Reference in New Issue
Block a user