1 | import { Stream } from 'stream';
|
2 |
|
3 | import { RecordResult } from './record-result';
|
4 | import { Connection } from './connection';
|
5 | import { SalesforceId } from './salesforce-id';
|
6 |
|
7 | export class RecordReference<T = any> {
|
8 | constructor(conn: Connection, type: string, id: SalesforceId);
|
9 |
|
10 | blob(fieldName: string): Stream;
|
11 | del(options?: Object, callback?: (err: Error, result: RecordResult) => void): Promise<RecordResult>;
|
12 | delete(options?: Object, callback?: (err: Error, result: RecordResult) => void): Promise<RecordResult>;
|
13 | destroy(options?: Object, callback?: (err: Error, result: RecordResult) => void): Promise<RecordResult>;
|
14 | retrieve(options?: Object, callback?: (err: Error, record: Record<T>) => void): Promise<Record<T>>;
|
15 | update(record: Partial<T>, options?: Object, callback?: (err: Error, result: RecordResult) => void): Promise<RecordResult>;
|
16 | }
|
17 |
|
18 | export interface RecordAttributes {
|
19 | type: string;
|
20 | url: string;
|
21 | }
|
22 |
|
23 | export type Record<T = any> = {
|
24 | Id?: SalesforceId | undefined;
|
25 | attributes?: RecordAttributes | undefined
|
26 | } & T;
|