import { IPayment } from '@ulixee/platform-specification'; import { IDatastoreQueryMetadata, IDatastoreQueryResult } from '@ulixee/platform-specification/datastore/DatastoreApis'; import { ExtractSchemaType } from '@ulixee/schema'; import ICrawlerOutputSchema from '../interfaces/ICrawlerOutputSchema'; import IDatastoreMetadata from '../interfaces/IDatastoreMetadata'; import IExtractorContext from '../interfaces/IExtractorContext'; import IExtractorSchema from '../interfaces/IExtractorSchema'; import IQueryOptions from '../interfaces/IQueryOptions'; import Crawler from './Crawler'; import DatastoreInternal, { IQueryInternalCallbacks } from './DatastoreInternal'; import Extractor from './Extractor'; import ExtractorInternal from './ExtractorInternal'; import ResultIterable from './ResultIterable'; import Table from './Table'; export default class ExtractorContext = ExtractorInternal> implements IExtractorContext { #private; datastoreMetadata: IDatastoreMetadata; datastoreAffiliateId: string; callerAffiliateId: string; extraOptions: Record; get authentication(): IDatastoreQueryMetadata['authentication']; get queryId(): string; get payment(): IPayment; get input(): TExtractorInternal['input']; get outputs(): TExtractorInternal['outputs']; get Output(): TExtractorInternal['Output']; get schema(): ISchema; get onQueryResult(): (result: IDatastoreQueryResult) => Promise | void; get onCacheUpdated(): (sessionId: string, crawler: string, action: 'cached' | 'evicted') => Promise | void; constructor(extractorInternal: ExtractorInternal, datastoreInternal: DatastoreInternal, callbacks?: IQueryInternalCallbacks); fetch(extractor: T, options: T['runArgsType']): ResultIterable>; fetch(table: T, options: any): ResultIterable>; run(extractor: T, options: T['runArgsType']): ResultIterable>; run(table: T, options: any): ResultIterable>; crawl(crawler: T, options?: T['runArgsType']): Promise; query(sql: string, boundValues: any[], options: IQueryOptions): Promise; private getMergedOptions; }