Finalize exports for search-backend-node module

Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
Eric Peterson
2022-02-26 18:25:34 +01:00
parent c87be57d3a
commit a151cf2a88
3 changed files with 80 additions and 7 deletions
+73 -5
View File
@@ -3,16 +3,50 @@
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
import { DocumentCollator } from '@backstage/search-common';
import { DocumentDecorator } from '@backstage/search-common';
/// <reference types="node" />
import { DocumentCollatorFactory } from '@backstage/search-common';
import { DocumentDecoratorFactory } from '@backstage/search-common';
import { DocumentTypeInfo } from '@backstage/search-common';
import { IndexableDocument } from '@backstage/search-common';
import { Logger as Logger_2 } from 'winston';
import { default as lunr_2 } from 'lunr';
import { QueryTranslator } from '@backstage/search-common';
import { Readable } from 'stream';
import { SearchEngine } from '@backstage/search-common';
import { SearchQuery } from '@backstage/search-common';
import { SearchResultSet } from '@backstage/search-common';
import { Transform } from 'stream';
import { Writable } from 'stream';
// Warning: (ae-missing-release-tag) "BatchSearchEngineIndexer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export abstract class BatchSearchEngineIndexer extends Writable {
constructor(options: BatchSearchEngineOptions);
abstract finalize(): Promise<void>;
abstract index(documents: IndexableDocument[]): Promise<void>;
abstract initialize(): Promise<void>;
}
// Warning: (ae-missing-release-tag) "BatchSearchEngineOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type BatchSearchEngineOptions = {
batchSize: number;
};
// Warning: (ae-missing-release-tag) "DecoratorBase" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export abstract class DecoratorBase extends Transform {
constructor();
abstract decorate(
document: IndexableDocument,
): Promise<IndexableDocument | IndexableDocument[] | undefined>;
abstract finalize(): Promise<void>;
abstract initialize(): Promise<void>;
}
// Warning: (ae-missing-release-tag) "IndexBuilder" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
@@ -22,11 +56,11 @@ export class IndexBuilder {
constructor({ logger, searchEngine }: IndexBuilderOptions);
// Warning: (ae-forgotten-export) The symbol "RegisterCollatorParameters" needs to be exported by the entry point index.d.ts
addCollator({
collator,
factory,
defaultRefreshIntervalSeconds,
}: RegisterCollatorParameters): void;
// Warning: (ae-forgotten-export) The symbol "RegisterDecoratorParameters" needs to be exported by the entry point index.d.ts
addDecorator({ decorator }: RegisterDecoratorParameters): void;
addDecorator({ factory }: RegisterDecoratorParameters): void;
build(): Promise<{
scheduler: Scheduler;
}>;
@@ -44,7 +78,7 @@ export class LunrSearchEngine implements SearchEngine {
// (undocumented)
protected docStore: Record<string, IndexableDocument>;
// (undocumented)
index(type: string, documents: IndexableDocument[]): Promise<void>;
getIndexer(type: string): Promise<LunrSearchEngineIndexer>;
// (undocumented)
protected logger: Logger_2;
// (undocumented)
@@ -59,6 +93,23 @@ export class LunrSearchEngine implements SearchEngine {
protected translator: QueryTranslator;
}
// Warning: (ae-missing-release-tag) "LunrSearchEngineIndexer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class LunrSearchEngineIndexer extends BatchSearchEngineIndexer {
constructor();
// (undocumented)
buildIndex(): lunr_2.Index;
// (undocumented)
finalize(): Promise<void>;
// (undocumented)
getDocumentStore(): Record<string, IndexableDocument>;
// (undocumented)
index(documents: IndexableDocument[]): Promise<void>;
// (undocumented)
initialize(): Promise<void>;
}
// Warning: (ae-missing-release-tag) "Scheduler" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
@@ -70,4 +121,21 @@ export class Scheduler {
}
export { SearchEngine };
// Warning: (ae-missing-release-tag) "TestPipeline" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export class TestPipeline {
execute(): Promise<TestPipelineResult>;
withDocuments(documents: IndexableDocument[]): TestPipeline;
static withSubject(subject: Readable | Transform | Writable): TestPipeline;
}
// Warning: (ae-missing-release-tag) "TestPipelineResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type TestPipelineResult = {
error: unknown;
documents: IndexableDocument[];
};
```
+4 -2
View File
@@ -23,10 +23,12 @@
"clean": "backstage-cli package clean"
},
"dependencies": {
"@backstage/errors": "^0.2.2",
"@backstage/search-common": "^0.2.4",
"winston": "^3.2.1",
"@types/lunr": "^2.3.3",
"lodash": "^4.17.21",
"lunr": "^2.3.9",
"@types/lunr": "^2.3.3"
"winston": "^3.2.1"
},
"devDependencies": {
"@backstage/backend-common": "^0.11.0",
+3
View File
@@ -23,6 +23,9 @@
export { IndexBuilder } from './IndexBuilder';
export { Scheduler } from './Scheduler';
export { LunrSearchEngine } from './engines';
export type { LunrSearchEngineIndexer } from './engines';
export * from './indexing';
export * from './test-utils';
/**
* @deprecated Import from @backstage/search-common instead