UNPKG

507 BTypeScriptView Raw
1import { OpConfig } from '../interfaces';
2import { DataEntity, DataArrayInput } from '@terascope/utils';
3import FetcherCore from './core/fetcher-core';
4/**
5 * The simpliest varient of "Fetcher"
6 */
7export 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}