1 | import { OpConfig } from '../interfaces';
|
2 | import { DataEntity, DataArrayInput } from '@terascope/utils';
|
3 | import FetcherCore from './core/fetcher-core';
|
4 | /**
|
5 | * The simpliest varient of "Fetcher"
|
6 | */
|
7 | export default abstract class Fetcher<T = OpConfig> extends FetcherCore<T> {
|
8 | /**
|
9 | * A method called by {@link Fetcher#handle}
|
10 | * @returns a DataEntity compatible array
|
11 | */
|
12 | abstract fetch(sliceRequest?: any): Promise<DataArrayInput>;
|
13 | handle(sliceRequest?: any): Promise<DataEntity[]>;
|
14 | }
|