@@ -0,0 +1,52 @@
|
||||
## API Report File for "@backstage/plugin-stack-overflow-backend"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
/// <reference types="node" />
|
||||
|
||||
import { Config } from '@backstage/config';
|
||||
import { DocumentCollatorFactory } from '@backstage/search-common';
|
||||
import { IndexableDocument } from '@backstage/search-common';
|
||||
import { Logger as Logger_2 } from 'winston';
|
||||
import { Readable } from 'stream';
|
||||
|
||||
// @public
|
||||
export interface StackOverflowDocument extends IndexableDocument {
|
||||
// (undocumented)
|
||||
answers: number;
|
||||
// (undocumented)
|
||||
tags: string[];
|
||||
}
|
||||
|
||||
// @public
|
||||
export class StackOverflowQuestionsCollatorFactory
|
||||
implements DocumentCollatorFactory
|
||||
{
|
||||
// (undocumented)
|
||||
execute(): AsyncGenerator<StackOverflowDocument>;
|
||||
// (undocumented)
|
||||
static fromConfig(
|
||||
config: Config,
|
||||
options: StackOverflowQuestionsCollatorFactoryOptions,
|
||||
): StackOverflowQuestionsCollatorFactory;
|
||||
// (undocumented)
|
||||
getCollator(): Promise<Readable>;
|
||||
// (undocumented)
|
||||
protected requestParams: StackOverflowQuestionsRequestParams;
|
||||
// (undocumented)
|
||||
readonly type: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type StackOverflowQuestionsCollatorFactoryOptions = {
|
||||
baseUrl?: string;
|
||||
requestParams: StackOverflowQuestionsRequestParams;
|
||||
logger: Logger_2;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type StackOverflowQuestionsRequestParams = {
|
||||
[key: string]: string | string[] | number;
|
||||
};
|
||||
```
|
||||
@@ -14,4 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export { StackOverflowQuestionsCollatorFactory } from './search';
|
||||
/**
|
||||
* Stack Overflow backend plugin
|
||||
*
|
||||
* @packageDocumentation
|
||||
*/
|
||||
|
||||
export * from './search';
|
||||
|
||||
@@ -24,21 +24,41 @@ import fetch from 'cross-fetch';
|
||||
import qs from 'qs';
|
||||
import { Logger } from 'winston';
|
||||
|
||||
interface StackOverflowDocument extends IndexableDocument {
|
||||
/**
|
||||
* Extended IndexableDocument with stack overflow specific properties
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export interface StackOverflowDocument extends IndexableDocument {
|
||||
answers: number;
|
||||
tags: string[];
|
||||
}
|
||||
|
||||
type StackOverflowQuestionsRequestParams = {
|
||||
/**
|
||||
* Type representing the request parameters accepted by the {@link StackOverflowQuestionsCollatorFactory}
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export type StackOverflowQuestionsRequestParams = {
|
||||
[key: string]: string | string[] | number;
|
||||
};
|
||||
|
||||
type StackOverflowQuestionsCollatorFactoryOptions = {
|
||||
/**
|
||||
* Options for {@link StackOverflowQuestionsCollatorFactory}
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export type StackOverflowQuestionsCollatorFactoryOptions = {
|
||||
baseUrl?: string;
|
||||
requestParams: StackOverflowQuestionsRequestParams;
|
||||
logger: Logger;
|
||||
};
|
||||
|
||||
/**
|
||||
* Search collator responsible for collecting stack overflow questions to index.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export class StackOverflowQuestionsCollatorFactory
|
||||
implements DocumentCollatorFactory
|
||||
{
|
||||
|
||||
@@ -14,4 +14,4 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export { StackOverflowQuestionsCollatorFactory } from './StackOverflowQuestionsCollatorFactory';
|
||||
export * from './StackOverflowQuestionsCollatorFactory';
|
||||
|
||||
Reference in New Issue
Block a user