1 | import { ExecutionConfig, Context, OpConfig, APIConfig, WorkerContext } from '../interfaces';
|
2 | import FetcherCore from './core/fetcher-core';
|
3 | import SchemaCore, { OpType } from './core/schema-core';
|
4 | import SlicerCore from './core/slicer-core';
|
5 | import APICore from './core/api-core';
|
6 | import ProcessorCore from './core/processor-core';
|
7 | import Slicer from './slicer';
|
8 | import ParallelSlicer from './parallel-slicer';
|
9 | import OperationAPI from './operation-api';
|
10 | export declare type APICoreConstructor<U> = {
|
11 | new (context: WorkerContext, apiConfig: APIConfig, executionConfig: ExecutionConfig): U;
|
12 | };
|
13 | export declare type OperationCoreConstructor<U> = {
|
14 | new <T = OpConfig>(context: WorkerContext, opConfig: OpConfig & T, executionConfig: ExecutionConfig): U;
|
15 | };
|
16 | export declare type SlicerCoreConstructor<U> = {
|
17 | new <T = OpConfig>(context: WorkerContext, opConfig: OpConfig & T, executionConfig: ExecutionConfig): U;
|
18 | };
|
19 | export declare type SchemaConstructor<T = any> = {
|
20 | type(): string;
|
21 | new (context: Context, opType?: OpType): SchemaCore<T>;
|
22 | };
|
23 | export declare type OperationAPIConstructor = APICoreConstructor<OperationAPI>;
|
24 | export declare type ObserverConstructor = APICoreConstructor<APICore>;
|
25 | export declare type APIConstructor = APICoreConstructor<APICore>;
|
26 | export declare type SlicerConstructor = SlicerCoreConstructor<SlicerCore>;
|
27 | export declare type SingleSlicerConstructor = SlicerCoreConstructor<Slicer>;
|
28 | export declare type ParallelSlicerConstructor = SlicerCoreConstructor<ParallelSlicer>;
|
29 | export declare type FetcherConstructor = OperationCoreConstructor<FetcherCore>;
|
30 | export declare type ProcessorConstructor = OperationCoreConstructor<ProcessorCore>;
|
31 | export declare type CoreOperation = FetcherCore | SlicerCore | ProcessorCore;
|
32 | export interface OperationModule {
|
33 | Schema: SchemaConstructor;
|
34 | API?: OperationAPIConstructor;
|
35 | }
|
36 | export interface SchemaModule {
|
37 | Schema: SchemaConstructor;
|
38 | }
|
39 | export interface APIModule extends SchemaModule {
|
40 | API: OperationAPIConstructor | ObserverConstructor;
|
41 | type: 'api' | 'observer';
|
42 | }
|
43 | export interface ReaderModule extends OperationModule {
|
44 | Slicer: SlicerConstructor;
|
45 | Fetcher: FetcherConstructor;
|
46 | }
|
47 | export interface ProcessorModule extends OperationModule {
|
48 | Processor: ProcessorConstructor;
|
49 | }
|