-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathjob.d.ts
More file actions
24 lines (20 loc) · 923 Bytes
/
job.d.ts
File metadata and controls
24 lines (20 loc) · 923 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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<any>;
batch(batchId: string): Batch;
check(callback?: (err: Error, jobInfo: JobInfo) => void): Promise<JobInfo>;
close(callback?: (err: Error, jobInfo: JobInfo) => void): Promise<JobInfo>;
createBatch(): Batch;
info(callback?: (err: Error, jobInfo: JobInfo) => void): Promise<JobInfo>;
list(callback?: (err: Error, jobInfo: BatchInfo) => void): Promise<BatchInfo[]>;
open(callback?: (err: Error, jobInfo: JobInfo) => void): Promise<JobInfo>;
}