diff --git a/types/jsforce/connection.d.ts b/types/jsforce/connection.d.ts index e58e13a2cd..a8cdf7fe25 100644 --- a/types/jsforce/connection.d.ts +++ b/types/jsforce/connection.d.ts @@ -50,6 +50,7 @@ export interface ConnectionOptions extends PartialOAuth2Options { proxyUrl?: string; redirectUri?: string; refreshToken?: string; + refreshFn?: (conn: Connection, callback: Callback) => Promise; serverUrl?: string; sessionId?: string; signedRequest?: string | Object; diff --git a/types/jsforce/index.d.ts b/types/jsforce/index.d.ts index 598a456f2c..2effe7b423 100644 --- a/types/jsforce/index.d.ts +++ b/types/jsforce/index.d.ts @@ -8,13 +8,14 @@ // Borys Kupar // Andrés Catalán // Ken Human +// Doug Ayers // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 export * from './api/analytics'; +export * from './api/apex'; export * from './api/chatter'; export * from './api/metadata'; -export * from './api/apex'; export * from './batch'; export * from './bulk'; export * from './cache'; @@ -23,6 +24,7 @@ export * from './connection'; export * from './date-enum'; export * from './describe-result'; export * from './job'; +export * from './limits-info'; export * from './oauth2'; export * from './promise'; export * from './query'; @@ -32,4 +34,3 @@ export * from './salesforce-id'; export * from './salesforce-object'; export * from './streaming'; export * from './topic'; -export * from './limits-info'; diff --git a/types/jsforce/jsforce-tests.ts b/types/jsforce/jsforce-tests.ts index 45442b91dc..296b4c9518 100644 --- a/types/jsforce/jsforce-tests.ts +++ b/types/jsforce/jsforce-tests.ts @@ -15,6 +15,9 @@ const salesforceConnection: sf.Connection = new sf.Connection({ clientId: '', clientSecret: '', }, + refreshFn: (conn: sf.Connection, callback?: sf.Callback): Promise => { + return conn.login('username', 'password', callback); + }, }); async function testSObject(connection: sf.Connection) { diff --git a/types/jsforce/tslint.json b/types/jsforce/tslint.json index 12201695b9..92aba6124a 100644 --- a/types/jsforce/tslint.json +++ b/types/jsforce/tslint.json @@ -1,7 +1,6 @@ { "extends": "dtslint/dt.json", "rules": { - // TODOs "array-type": false, "await-promise": [true, "Request"], "ban-types": false,