import { EventEmitter } from 'events'; import { Bulk, BulkOptions } from './bulk'; import { Batch, BatchInfo } from './batch'; export interface JobInfo { id: string; object: string; operation: string; state: string; } export class Job extends EventEmitter { constructor(bulk: Bulk, type?: string, operation?: string, options?: BulkOptions, jobId?: string); abort(callback?: (err: Error, jobInfo: JobInfo) => void): Promise; batch(batchId: string): Batch; check(callback?: (err: Error, jobInfo: JobInfo) => void): Promise; close(callback?: (err: Error, jobInfo: JobInfo) => void): Promise; createBatch(): Batch; info(callback?: (err: Error, jobInfo: JobInfo) => void): Promise; list(callback?: (err: Error, jobInfo: BatchInfo) => void): Promise; open(callback?: (err: Error, jobInfo: JobInfo) => void): Promise; }