1 | import { Stream } from 'stream';
|
2 |
|
3 | import { Connection } from './connection';
|
4 | import { RecordResult } from './record-result';
|
5 | import { Record } from './record';
|
6 | import { Job } from './job';
|
7 | import { Batch, BatchResultInfo } from './batch';
|
8 |
|
9 | export interface BulkOptions {
|
10 | extIdField: string;
|
11 | concurrencyMode?: 'Serial' | 'Parallel' | undefined;
|
12 | }
|
13 |
|
14 | type BulkLoadOperation =
|
15 | | 'insert'
|
16 | | 'update'
|
17 | | 'upsert'
|
18 | | 'delete'
|
19 | | 'hardDelete';
|
20 |
|
21 | export class Bulk {
|
22 | constructor(connection: Connection);
|
23 |
|
24 | pollInterval: number;
|
25 | pollTimeout: number;
|
26 |
|
27 | createJob(type: string, operation: string, options?: BulkOptions): Job;
|
28 | job(id: string): Job;
|
29 | load(type: string, operation: BulkLoadOperation, options?: BulkOptions, input?: Record[] | Stream | string, callback?: (err: Error, result: RecordResult[] | BatchResultInfo[]) => void): Batch;
|
30 | query(soql: string): any;
|
31 | }
|