mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-01-12 22:46:38 +08:00
[jsforce] Add LimitsInfo, Fix logout (#29435)
This commit is contained in:
5
types/jsforce/connection.d.ts
vendored
5
types/jsforce/connection.d.ts
vendored
@@ -12,6 +12,7 @@ import { Bulk } from './bulk';
|
||||
import { Cache } from './cache'
|
||||
import { OAuth2, Streaming } from '.';
|
||||
import { HttpApiOptions } from './http-api'
|
||||
import { LimitsInfo } from './limits-info';
|
||||
|
||||
export type Callback<T> = (err: Error | null, result: T) => void;
|
||||
// The type for these options was determined by looking at the usage
|
||||
@@ -160,9 +161,13 @@ export class Connection extends BaseConnection {
|
||||
login(user: string, password: string, callback?: (err: Error, res: UserInfo) => void): Promise<UserInfo>;
|
||||
loginByOAuth2(user: string, password: string, callback?: (err: Error, res: UserInfo) => void): Promise<UserInfo>;
|
||||
loginBySoap(user: string, password: string, callback?: (err: Error, res: UserInfo) => void): Promise<UserInfo>;
|
||||
logout(revoke: boolean, callback?: (err: Error, res: undefined) => void): Promise<void>;
|
||||
logout(callback?: (err: Error, res: undefined) => void): Promise<void>;
|
||||
logoutByOAuth2(revoke: boolean, callback?: (err: Error, res: undefined) => void): Promise<void>;
|
||||
logoutByOAuth2(callback?: (err: Error, res: undefined) => void): Promise<void>;
|
||||
logoutBySoap(revoke: boolean, callback?: (err: Error, res: undefined) => void): Promise<void>;
|
||||
logoutBySoap(callback?: (err: Error, res: undefined) => void): Promise<void>;
|
||||
limits(callback?: (err: Error, res: undefined) => void): Promise<LimitsInfo>;
|
||||
}
|
||||
|
||||
export class Tooling extends BaseConnection {
|
||||
|
||||
1
types/jsforce/index.d.ts
vendored
1
types/jsforce/index.d.ts
vendored
@@ -30,3 +30,4 @@ export * from './salesforce-id';
|
||||
export * from './salesforce-object';
|
||||
export * from './streaming';
|
||||
export * from './topic';
|
||||
export * from './limits-info';
|
||||
|
||||
48
types/jsforce/limits-info.d.ts
vendored
Normal file
48
types/jsforce/limits-info.d.ts
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
export interface Limit {
|
||||
Max: number;
|
||||
Remaining: number;
|
||||
}
|
||||
|
||||
export interface PermissionSets extends Limit {
|
||||
CreateCustom: Limit;
|
||||
}
|
||||
|
||||
export interface DailyApiRequests extends Limit {
|
||||
'Chatter Desktop': Limit;
|
||||
'Chatter Mobile for BlackBerry': Limit;
|
||||
'Salesforce Files': Limit;
|
||||
'Salesforce Marketing Cloud': Limit;
|
||||
'Salesforce for Android': Limit;
|
||||
'Salesforce for iOS': Limit;
|
||||
'SalesforceA': Limit;
|
||||
}
|
||||
|
||||
export interface LimitsInfo {
|
||||
ConcurrentAsyncGetReportInstances: Limit;
|
||||
ConcurrentSyncReportRuns: Limit;
|
||||
DailyAnalyticsDataflowJobExecutions: Limit;
|
||||
DailyApiRequests: DailyApiRequests;
|
||||
DailyAsyncApexExecutions: Limit;
|
||||
DailyBulkApiRequests: DailyApiRequests;
|
||||
DailyDurableGenericStreamingApiEvents: Limit;
|
||||
DailyDurableStreamingApiEvents: Limit;
|
||||
DailyGenericStreamingApiEvents: DailyApiRequests;
|
||||
DailyStreamingApiEvents: DailyApiRequests;
|
||||
DailyWorkflowEmails: Limit;
|
||||
DataStorageMB: Limit;
|
||||
DurableStreamingApiConcurrentClients: Limit;
|
||||
FileStorageMB: Limit;
|
||||
HourlyAsyncReportRuns: Limit;
|
||||
HourlyDashboardRefreshes: Limit;
|
||||
HourlyDashboardResults: Limit;
|
||||
HourlyDashboardStatuses: Limit;
|
||||
HourlyODataCallout: Limit;
|
||||
HourlySyncReportRuns: Limit;
|
||||
HourlyTimeBasedWorkflow: Limit;
|
||||
MassEmail: Limit;
|
||||
MonthlyPlatformEvents: Limit;
|
||||
Package2VersionCreates: Limit;
|
||||
PermissionSets: PermissionSets;
|
||||
SingleEmail: Limit;
|
||||
StreamingApiConcurrentClients: Limit;
|
||||
}
|
||||
Reference in New Issue
Block a user