mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
[@types/jsforce] Add ConnectionOptions.refreshFn (#38925)
* Add refreshFn option * update tests * sort imports, add Doug Ayers * remove "// TODOS" comment * (lint) MAJOR.MINOR (patch version not allowed)
This commit is contained in:
parent
6f83edcabb
commit
300c8e7c23
1
types/jsforce/connection.d.ts
vendored
1
types/jsforce/connection.d.ts
vendored
@ -50,6 +50,7 @@ export interface ConnectionOptions extends PartialOAuth2Options {
|
||||
proxyUrl?: string;
|
||||
redirectUri?: string;
|
||||
refreshToken?: string;
|
||||
refreshFn?: (conn: Connection, callback: Callback<UserInfo>) => Promise<UserInfo>;
|
||||
serverUrl?: string;
|
||||
sessionId?: string;
|
||||
signedRequest?: string | Object;
|
||||
|
||||
5
types/jsforce/index.d.ts
vendored
5
types/jsforce/index.d.ts
vendored
@ -8,13 +8,14 @@
|
||||
// Borys Kupar <https://github.com/borys-kupar>
|
||||
// Andrés Catalán <https://github.com/catalandres>
|
||||
// Ken Human <https://github.com/kenhuman>
|
||||
// Doug Ayers <https://github.com/douglascayers>
|
||||
// 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';
|
||||
|
||||
@ -15,6 +15,9 @@ const salesforceConnection: sf.Connection = new sf.Connection({
|
||||
clientId: '',
|
||||
clientSecret: '',
|
||||
},
|
||||
refreshFn: (conn: sf.Connection, callback?: sf.Callback<sf.UserInfo>): Promise<sf.UserInfo> => {
|
||||
return conn.login('username', 'password', callback);
|
||||
},
|
||||
});
|
||||
|
||||
async function testSObject(connection: sf.Connection) {
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
// TODOs
|
||||
"array-type": false,
|
||||
"await-promise": [true, "Request"],
|
||||
"ban-types": false,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user