-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path@types__jsforce@1.9.42.patch
75 lines (70 loc) · 4.08 KB
/
@types__jsforce@1.9.42.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
diff --git a/api/metadata.d.ts b/api/metadata.d.ts
index 808c6d5edbc75ae7bf4a4aa7f4ccc8b6dc00b086..d14412ea3da3681c00f8461a5c36ac0e10f398b1 100644
--- a/api/metadata.d.ts
+++ b/api/metadata.d.ts
@@ -185,6 +185,8 @@ export class Metadata {
checkRetrieveStatus(id: string, callback?: Callback<RetrieveResult>): Promise<RetrieveResult>;
+ cancelDeploy(id: string, callback?: Callback<AsyncResult>) : Promise<AsyncResult>;
+
checkStatus(
ids: string | string[],
callback?: Callback<AsyncResult | Array<AsyncResult>>,
diff --git a/connection.d.ts b/connection.d.ts
index f2b9e853f21b18f7e04ddcb197d97b8d2337fd92..5443c3cc87d26b17a1d8a8046194e6cafc86d3dd 100644
--- a/connection.d.ts
+++ b/connection.d.ts
@@ -31,6 +31,13 @@ export interface RestApiOptions {
allOrNone?: boolean | undefined;
}
+export interface RetrieveOptions extends RestApiOptions {
+ /**
+ * Fetching field names in retrieving record
+ */
+ fields?: Array<string>;
+}
+
// These are pulled out because according to http://jsforce.github.io/jsforce/doc/connection.js.html#line49
// the oauth options can either be in the `oauth2` property OR spread across the main connection
export interface PartialOAuth2Options {
diff --git a/record-result.d.ts b/record-result.d.ts
index df77ef26d36f3222683b3dcee7261559ffe47acf..05d4dff020f659e93351e846b570060a588f1cd2 100644
--- a/record-result.d.ts
+++ b/record-result.d.ts
@@ -1,7 +1,7 @@
import { SalesforceId } from './salesforce-id';
interface ErrorResult {
- errors: string[];
+ errors: { fields: string[], message: string, statusCode: string }[];
success: false;
}
diff --git a/salesforce-object.d.ts b/salesforce-object.d.ts
index 319931119788e0b304d78d91489de2fac4a68fce..d8715611967785457eb6cc02231a53932fc18a6c 100644
--- a/salesforce-object.d.ts
+++ b/salesforce-object.d.ts
@@ -5,7 +5,7 @@ import { DescribeSObjectResult } from './describe-result';
import { Query } from './query';
import { Record, RecordReference } from './record';
import { RecordResult } from './record-result';
-import { Connection, RestApiOptions, Callback } from './connection';
+import { Connection, RetrieveOptions, RestApiOptions, Callback } from './connection';
import { SalesforceId } from './salesforce-id';
import { Batch, BatchResultInfo } from './batch';
import { QuickAction, QuickActionInfo } from './quick-action';
@@ -58,11 +58,17 @@ export class SObject<T> {
create(record: Array<T>, callback?: Callback<RecordResult[]>): Promise<RecordResult[]>;
createBulk(input?: Array<Record<T>> | stream.Stream | string, callback?: Callback<RecordResult[]>): Batch;
del(id: string, callback?: Callback<RecordResult>): Promise<RecordResult>;
+ del(id: string, options?: RestApiOptions, callback?: Callback<RecordResult>): Promise<RecordResult>;
del(ids: string[], callback?: Callback<RecordResult[]>): Promise<RecordResult[]>;
+ del(ids: string[], options?: RestApiOptions, callback?: Callback<RecordResult[]>): Promise<RecordResult[]>;
destroy(id: string, callback?: Callback<RecordResult>): Promise<RecordResult>;
+ destroy(id: string, options?: RestApiOptions, callback?: Callback<RecordResult>): Promise<RecordResult>;
destroy(ids: string[], callback?: Callback<RecordResult[]>): Promise<RecordResult[]>;
+ destroy(ids: string[], options?: RestApiOptions, callback?: Callback<RecordResult[]>): Promise<RecordResult[]>;
delete(id: string, callback?: Callback<RecordResult>): Promise<RecordResult>;
+ delete(id: string, options?: RestApiOptions, callback?: Callback<RecordResult>): Promise<RecordResult>;
delete(ids: string[], callback?: Callback<RecordResult[]>): Promise<RecordResult[]>;
+ delete(ids: string[], options?: RestApiOptions, callback?: Callback<RecordResult[]>): Promise<RecordResult[]>;
deleteBulk(input?: Array<Record<T>> | stream.Stream | string, callback?: Callback<RecordResult[]>): Batch;
destroyBulk(input?: Array<Record<T>> | stream.Stream | string, callback?: Callback<RecordResult[]>): Batch;
destroyHardBulk(input?: Array<Record<T>> | stream.Stream | string, callback?: Callback<RecordResult[]>): Batch;