@types/jsforce
- Version 1.11.5
- Published
- 70.4 kB
- 1 dependency
- MIT license
Install
npm i @types/jsforce
yarn add @types/jsforce
pnpm add @types/jsforce
Overview
TypeScript definitions for jsforce
Index
Classes
SObject
- approvalLayouts()
- approvalLayouts$
- bulkload()
- compactLayouts()
- compactLayouts$
- count()
- create()
- createBulk()
- del()
- delete()
- deleteBulk()
- deleted()
- deleteHardBulk()
- describe()
- describe$
- destroy()
- destroyBulk()
- destroyHardBulk()
- find()
- findOne()
- insert()
- insertBulk()
- layouts()
- layouts$
- listview()
- listviews()
- quickAction()
- quickActions()
- recent()
- record()
- retrieve()
- select()
- update()
- updateBulk()
- updated()
- upsert()
- upsertBulk()
Interfaces
DescribeSObjectResult
- actionOverrides
- activateable
- childRelationships
- compactLayoutable
- createable
- custom
- customSetting
- deletable
- deprecatedAndHidden
- feedEnabled
- fields
- keyPrefix
- label
- labelPlural
- layoutable
- listviewable
- lookupLayoutable
- mergeable
- mruEnabled
- name
- namedLayoutInfos
- networkScopeFieldName
- queryable
- recordTypeInfos
- replicateable
- retrieveable
- searchable
- searchLayoutable
- supportedScopes
- triggerable
- undeletable
- updateable
- urlDetail
- urlEdit
- urlNew
- urls
Field
- aggregatable
- aiPredictionField
- autoNumber
- byteLength
- calculated
- calculatedFormula
- cascadeDelete
- caseSensitive
- compoundFieldName
- controllerName
- createable
- custom
- defaultedOnCreate
- defaultValue
- defaultValueFormula
- dependentPicklist
- deprecatedAndHidden
- digits
- displayLocationInDecimal
- encrypted
- externalId
- extraTypeInfo
- filterable
- filteredLookupInfo
- formula
- formulaTreatNullNumberAsZero
- groupable
- highScaleNumber
- htmlFormatted
- idLookup
- inlineHelpText
- label
- length
- mask
- maskType
- name
- nameField
- namePointing
- nillable
- permissionable
- picklistValues
- polymorphicForeignKey
- precision
- queryByDistance
- referenceTargetField
- referenceTo
- relationshipName
- relationshipOrder
- restrictedDelete
- restrictedPicklist
- scale
- searchPrefilterable
- soapType
- sortable
- type
- unique
- updateable
- writeRequiresMasterRead
IdentityInfo
- active
- addr_city
- addr_country
- addr_state
- addr_street
- addr_zip
- asserted_user
- display_name
- email_verified
- first_name
- id
- is_app_installed
- is_lightning_login_user
- language
- last_modified_date
- last_name
- locale
- mobile_phone
- mobile_phone_verified
- nick_name
- organization_id
- photos
- status
- timezone
- urls
- user_id
- user_type
- username
- utcOffset
LimitsInfo
- ConcurrentAsyncGetReportInstances
- ConcurrentSyncReportRuns
- DailyAnalyticsDataflowJobExecutions
- DailyApiRequests
- DailyAsyncApexExecutions
- DailyBulkApiRequests
- DailyDurableGenericStreamingApiEvents
- DailyDurableStreamingApiEvents
- DailyGenericStreamingApiEvents
- DailyStreamingApiEvents
- DailyWorkflowEmails
- DataStorageMB
- DurableStreamingApiConcurrentClients
- FileStorageMB
- HourlyAsyncReportRuns
- HourlyDashboardRefreshes
- HourlyDashboardResults
- HourlyDashboardStatuses
- HourlyODataCallout
- HourlySyncReportRuns
- HourlyTimeBasedWorkflow
- MassEmail
- MonthlyPlatformEvents
- Package2VersionCreates
- PermissionSets
- SingleEmail
- StreamingApiConcurrentClients
UserInfoResult
- accessibilityMode
- currencySymbol
- organizationId
- organizationMultiCurrency
- organizationName
- orgAttachmentFileSizeLimit
- orgDefaultCurrencyIsoCode
- orgDisallowHtmlAttachments
- orgHasPersonAccounts
- profileId
- roleId
- sessionSecondsValid
- userDefaultCurrencyIsoCode
- userEmail
- userFullName
- userId
- userLanguage
- userLocale
- userName
- userTimeZone
- userType
- userUiSkin
Enums
Date
- LAST_90_DAYS
- LAST_FISCAL_QUARTER
- LAST_FISCAL_YEAR
- LAST_MONTH
- LAST_N_DAYS
- LAST_N_FISCAL_QUARTERS
- LAST_N_FISCAL_YEARS
- LAST_N_MONTHS
- LAST_N_QUARTERS
- LAST_N_WEEKS
- LAST_N_YEARS
- LAST_QUARTER
- LAST_WEEK
- LAST_YEAR
- NEXT_90_DAYS
- NEXT_FISCAL_QUARTER
- NEXT_FISCAL_YEAR
- NEXT_MONTH
- NEXT_N_DAYS
- NEXT_N_FISCAL_QUARTERS
- NEXT_N_FISCAL_YEARS
- NEXT_N_MONTHS
- NEXT_N_QUARTERS
- NEXT_N_WEEKS
- NEXT_N_YEARS
- NEXT_QUARTER
- NEXT_WEEK
- NEXT_YEAR
- THIS_FISCAL_QUARTER
- THIS_FISCAL_YEAR
- THIS_MONTH
- THIS_QUARTER
- THIS_WEEK
- THIS_YEAR
- TODAY
- TOMORROW
- YESTERDAY
Type Aliases
Namespaces
Classes
class Analytics
class Analytics {}
method dashboard
dashboard: (id: string) => Promise<Dashboard>;
method dashboards
dashboards: (callback?: Callback<DashboardInfo[]>) => Promise<DashboardInfo[]>;
method report
report: (id: string) => Promise<Report>;
method reports
reports: (callback?: Callback<ReportInfo[]>) => Promise<ReportInfo[]>;
class Apex
class Apex {}
constructor
constructor(conn: Connection);
method del
del: { <T>( path: string, options: RestApiOptions, callback?: Callback<T> ): Promise<T>; <T>(path: string, callback?: Callback<T>): Promise<T>;};
method delete
delete: { <T>( path: string, options: RestApiOptions, callback?: Callback<T> ): Promise<T>; <T>(path: string, callback?: Callback<T>): Promise<T>;};
method get
get: { <T>( path: string, options: RestApiOptions, callback?: Callback<T> ): Promise<T>; <T>(path: string, callback?: Callback<T>): Promise<T>;};
method patch
patch: { <T>( path: string, body: object, options: RestApiOptions, callback?: Callback<T> ): Promise<T>; <T>(path: string, body: object, callback?: Callback<T>): Promise<T>; <T>(path: string, callback?: Callback<T>): Promise<T>;};
method post
post: { <T>( path: string, body: object, options: RestApiOptions, callback?: Callback<T> ): Promise<T>; <T>(path: string, body: object, callback?: Callback<T>): Promise<T>; <T>(path: string, callback?: Callback<T>): Promise<T>;};
method put
put: { <T>( path: string, body: object, options: RestApiOptions, callback?: Callback<T> ): Promise<T>; <T>(path: string, body: object, callback?: Callback<T>): Promise<T>; <T>(path: string, callback?: Callback<T>): Promise<T>;};
class AsyncResultLocator
class AsyncResultLocator<T> extends EventEmitter implements PromiseLike<T> {}
method check
check: (callback?: Callback<T>) => Promise<T>;
method complete
complete: (callback?: Callback<T>) => Promise<T>;
method finally
finally: (onfinally?: () => void) => Promise<T>;
method poll
poll: (interval: number, timeout: number) => void;
method then
then: <TResult1, TResult2>( onfulfilled?: (value: T) => PromiseLike<TResult1> | TResult1, onrejected?: (reason: any) => PromiseLike<TResult2> | TResult2) => Promise<TResult1 | TResult2>;
class BaseConnection
abstract class BaseConnection extends EventEmitter {}
the methods exposed here are done so that a client can use 'declaration augmentation' to get intellisense on their own projects. for example, given a type
interface Foo { thing: string; yes: boolean; }
you can write
declare module "jsforce" { interface Connection { sobject(type: 'Foo'): SObject } }
to ensure that you have the correct data types for the various collection names.
property describe$
describe$: { ( type: string | DescribeSObjectOptions, callback?: (err: Error, result: DescribeSObjectResult) => void ): DescribeSObjectResult; clear(): void;};
property describeGlobal$
describeGlobal$: { ( callback?: (err: Error, result: DescribeGlobalResult) => void ): DescribeGlobalResult; clear(): void;};
method batchDescribe
batchDescribe: ( options: BatchDescribeSObjectOptions, callback?: (err: Error, result: DescribeSObjectResult[]) => void) => Promise<DescribeSObjectResult[]>;
method create
create: { <T>( type: string, records: Record<T> | Array<Record<T>>, options?: RestApiOptions, callback?: (err: Error, result: RecordResult | RecordResult[]) => void ): Promise<RecordResult | RecordResult[]>; <T>( records: Record<T> | Record<T>[], options?: RestApiOptions, callback?: (err: Error, result: RecordResult | RecordResult[]) => void ): Promise<RecordResult | RecordResult[]>;};
method del
del: <T>( type: string, ids: string | string[], options?: RestApiOptions, callback?: (err: Error, result: RecordResult | RecordResult[]) => void) => Promise<RecordResult | RecordResult[]>;
method delete
delete: <T>( type: string, ids: string | string[], options?: RestApiOptions, callback?: (err: Error, result: RecordResult | RecordResult[]) => void) => Promise<RecordResult | RecordResult[]>;
method describe
describe: ( type: string | DescribeSObjectOptions, callback?: (err: Error, result: DescribeSObjectResult) => void) => Promise<DescribeSObjectResult>;
method describeGlobal
describeGlobal: <T>( callback?: (err: Error, result: DescribeGlobalResult) => void) => Promise<DescribeGlobalResult>;
method destroy
destroy: <T>( type: string, ids: string | string[], options?: RestApiOptions, callback?: (err: Error, result: RecordResult | RecordResult[]) => void) => Promise<RecordResult | RecordResult[]>;
method insert
insert: <T>( type: string, records: Record<T> | Array<Record<T>>, options?: RestApiOptions, callback?: (err: Error, result: RecordResult | RecordResult[]) => void) => Promise<RecordResult | RecordResult[]>;
method query
query: <T>( soql: string, options?: ExecuteOptions, callback?: (err: Error, result: QueryResult<T>) => void) => Query<QueryResult<T>>;
method queryMore
queryMore: <T>( locator: string, options?: ExecuteOptions, callback?: (err: Error, result: QueryResult<T>) => void) => Promise<QueryResult<T>>;
method recent
recent: { (callback?: (err: Error, result: RecordResult[]) => void): Promise< RecordResult[] >; ( param: string | number, callback?: (err: Error, result: RecordResult[]) => void ): Promise<RecordResult[]>; ( type: string, limit: number, callback?: (err: Error, result: RecordResult[]) => void ): Promise<RecordResult[]>;};
method request
request: <T = object>( info: RequestInfo | string, options?: HttpApiOptions, callback?: (err: Error, Object: T) => void) => Promise<T>;
method retrieve
retrieve: <T>( type: string, ids: string | string[], options?: RestApiOptions, callback?: (err: Error, result: Record<T> | Array<Record<T>>) => void) => Promise<Record<T> | Array<Record<T>>>;
method search
search: <T>( sosl: string, callback?: (err: Error, result: SearchResult<T>) => void) => Promise<SearchResult<T>>;
method sobject
sobject: <T = object>(resource: string) => SObject<T>;
method update
update: { <T>( type: string, records: Record<T> | Array<Record<T>>, options?: RestApiOptions, callback?: (err: Error, result: RecordResult | Array<Record<T>>) => void ): Promise<RecordResult | RecordResult[]>; <T>( records: Record<T> | Record<T>[], options?: RestApiOptions, callback?: (err: Error, result: RecordResult | Record<T>[]) => void ): Promise<RecordResult | RecordResult[]>;};
method upsert
upsert: { <T>( type: string, records: Record<T> | Array<Record<T>>, extIdField: string, options?: RestApiOptions, callback?: (err: Error, result: RecordResult | RecordResult[]) => void ): Promise<RecordResult | RecordResult[]>; <T>( records: Record<T> | Record<T>[], extIdField: string, options?: RestApiOptions, callback?: (err: Error, result: RecordResult | RecordResult[]) => void ): Promise<RecordResult | RecordResult[]>;};
class Batch
class Batch extends Writable {}
method check
check: (callback?: (batchInfo: BatchInfo) => void) => Promise<BatchInfo>;
method execute
execute: ( input?: Record[] | Stream | string, callback?: (err: Error, result: RecordResult[] | BatchResultInfo[]) => void) => Batch;
method poll
poll: (interval: number, timeout: number) => void;
method result
result: (resultId: string) => Parsable<any>;
method retrieve
retrieve: ( callback?: (batchInfo: BatchInfo) => void) => Promise<RecordResult[] | BatchResultInfo[]>;
method then
then: () => Promise<any>;
method thenAll
thenAll: (callback: (data: any) => void) => void;
class Bulk
class Bulk {}
constructor
constructor(connection: Connection);
property pollInterval
pollInterval: number;
property pollTimeout
pollTimeout: number;
method createJob
createJob: (type: string, operation: string, options?: BulkOptions) => Job;
method job
job: (id: string) => Job;
method load
load: ( type: string, operation: BulkLoadOperation, options?: BulkOptions, input?: Record[] | Stream | string, callback?: (err: Error, result: RecordResult[] | BatchResultInfo[]) => void) => Batch;
method query
query: (soql: string) => any;
class Cache
class Cache {}
class CacheEntry
class CacheEntry<T> extends EventEmitter {}
class Channel
class Channel {}
constructor
constructor(streaming: Streaming, name: string);
class Chatter
class Chatter {}
constructor
constructor(conn: Connection);
method batch
batch: ( callback?: Callback<BatchRequestResults>) => Promise<BatchRequestResults>;
method request
request: ( params: RequestParams, callback?: Callback<Request<RequestResult>>) => Request<RequestResult>;
method resource
resource: (url: string, queryParams?: object) => Resource<RequestResult>;
class Connection
class Connection extends BaseConnection {}
constructor
constructor(params: ConnectionOptions);
property accessToken
accessToken: string;
property analytics
analytics: Analytics;
property apex
apex: Apex;
property bulk
bulk: Bulk;
property cache
cache: Cache;
property chatter
chatter: Chatter;
property instanceUrl
instanceUrl: string;
property limitInfo
limitInfo?: LimitInfo;
property metadata
metadata: Metadata;
property oauth2
oauth2: OAuth2;
property refreshToken
refreshToken?: string;
property soap
soap: SoapApi;
property streaming
streaming: Streaming;
property tooling
tooling: Tooling;
property userInfo
userInfo?: UserInfo;
property version
version: string;
method authorize
authorize: ( code: string, callback?: (err: Error, res: UserInfo) => void) => Promise<UserInfo>;
method identity
identity: ( callback?: (err: Error, res: IdentityInfo) => void) => Promise<IdentityInfo>;
method initialize
initialize: (options?: ConnectionOptions) => void;
method limits
limits: (callback?: (err: Error, res: undefined) => void) => Promise<LimitsInfo>;
method login
login: ( user: string, password: string, callback?: (err: Error, res: UserInfo) => void) => Promise<UserInfo>;
method loginByOAuth2
loginByOAuth2: ( user: string, password: string, callback?: (err: Error, res: UserInfo) => void) => Promise<UserInfo>;
method loginBySoap
loginBySoap: ( user: string, password: string, callback?: (err: Error, res: UserInfo) => void) => Promise<UserInfo>;
method logout
logout: { ( revoke: boolean, callback?: (err: Error, res: undefined) => void ): Promise<void>; (callback?: (err: Error, res: undefined) => void): Promise<void>;};
method logoutByOAuth2
logoutByOAuth2: { ( revoke: boolean, callback?: (err: Error, res: undefined) => void ): Promise<void>; (callback?: (err: Error, res: undefined) => void): Promise<void>;};
method logoutBySoap
logoutBySoap: { ( revoke: boolean, callback?: (err: Error, res: undefined) => void ): Promise<void>; (callback?: (err: Error, res: undefined) => void): Promise<void>;};
method queryAll
queryAll: <T>( soql: string, options?: object, callback?: (err: Error, result: QueryResult<T>) => void) => Query<QueryResult<T>>;
method requestPost
requestPost: { <T = object>( url: string, body: object, options_callback?: HttpApiOptions | ((err: Error, Object: T) => void) ): Promise<T>; <T = object>( url: string, body: object, options?: HttpApiOptions, callback?: (err: Error, Object: T) => void ): Promise<T>;};
class Dashboard
class Dashboard {}
method clone
clone: ( name: string | object, folderid: string, callback?: Callback<object>) => Promise<any>;
method components
components: ( componentIds: string[] | string | Callback<object>, callback?: Callback<object>) => Promise<any>;
method del
del: (callback?: Callback<object>) => Promise<any>;
method delete
delete: (callback?: Callback<object>) => Promise<any>;
method describe
describe: (callback?: Callback<object>) => Promise<any>;
method destory
destory: (callback?: Callback<object>) => Promise<any>;
method refresh
refresh: (callback?: Callback<object>) => Promise<any>;
method status
status: (callback?: Callback<object>) => Promise<any>;
class DeployResultLocator
class DeployResultLocator<T> extends AsyncResultLocator<T> {}
class ExplainInfo
class ExplainInfo {}
class Job
class Job extends EventEmitter {}
constructor
constructor( bulk: Bulk, type?: string, operation?: string, options?: BulkOptions, jobId?: string);
method abort
abort: (callback?: (err: Error, jobInfo: JobInfo) => void) => Promise<any>;
method batch
batch: (batchId: string) => Batch;
method check
check: (callback?: (err: Error, jobInfo: JobInfo) => void) => Promise<JobInfo>;
method close
close: (callback?: (err: Error, jobInfo: JobInfo) => void) => Promise<JobInfo>;
method createBatch
createBatch: () => Batch;
method info
info: (callback?: (err: Error, jobInfo: JobInfo) => void) => Promise<JobInfo>;
method list
list: ( callback?: (err: Error, jobInfo: BatchInfo) => void) => Promise<BatchInfo[]>;
method open
open: (callback?: (err: Error, jobInfo: JobInfo) => void) => Promise<JobInfo>;
class ListView
class ListView {}
constructor
constructor(connection: Connection, type: string, id: string);
class ListViewsInfo
class ListViewsInfo {}
class Metadata
class Metadata {}
constructor
constructor(conn: Connection);
property pollInterval
pollInterval: number;
property pollTimeout
pollTimeout: number;
method checkDeployStatus
checkDeployStatus: ( id: string, includeDetails?: boolean, callback?: Callback<DeployResult>) => Promise<DeployResult>;
method checkRetrieveStatus
checkRetrieveStatus: ( id: string, callback?: Callback<RetrieveResult>) => Promise<RetrieveResult>;
method checkStatus
checkStatus: ( ids: string | string[], callback?: Callback<AsyncResult | AsyncResult[]>) => AsyncResultLocator<AsyncResult | AsyncResult[]>;
method create
create: ( type: string, metadata: MetadataInfo | MetadataInfo[], callback?: Callback<SaveResult | SaveResult[]>) => Promise<SaveResult | SaveResult[]>;
method createAsync
createAsync: ( type: string, metadata: MetadataInfo | MetadataInfo[], callback?: Callback<SaveResult | SaveResult[]>) => Promise<SaveResult | SaveResult[]>;
method createSync
createSync: ( type: string, metadata: MetadataInfo | MetadataInfo[], callback?: Callback<SaveResult | SaveResult[]>) => Promise<SaveResult | SaveResult[]>;
method delete
delete: ( type: string, fullNames: string | string[], callback?: Callback<SaveResult | SaveResult[]>) => Promise<SaveResult | SaveResult[]>;
method deleteAsync
deleteAsync: ( type: string, metadata: string | string[] | MetadataInfo | MetadataInfo[], callback?: Callback<AsyncResult | AsyncResult[]>) => AsyncResultLocator<AsyncResult | AsyncResult[]>;
method deleteSync
deleteSync: ( type: string, fullNames: string | string[], callback?: Callback<SaveResult | SaveResult[]>) => Promise<SaveResult | SaveResult[]>;
method deploy
deploy: ( zipInput: Stream | Buffer | string, options: DeployOptions, callback?: Callback<AsyncResult>) => DeployResultLocator<AsyncResult>;
method describe
describe: ( version?: string, callback?: Callback<DescribeMetadataResult>) => Promise<DescribeMetadataResult>;
method list
list: ( queries: ListMetadataQuery | ListMetadataQuery[], version?: string, callback?: Callback<FileProperties[]>) => Promise<FileProperties[]>;
method read
read: ( type: string, fullNames: string | string[], callback?: Callback<MetadataInfo | MetadataInfo[]>) => Promise<MetadataInfo | MetadataInfo[]>;
method readSync
readSync: ( type: string, fullNames: string | string[], callback?: Callback<MetadataInfo | MetadataInfo[]>) => Promise<MetadataInfo | MetadataInfo[]>;
method rename
rename: ( type: string, oldFullName: string, newFullName: string, callback?: Callback<SaveResult>) => Promise<SaveResult>;
method retrieve
retrieve: ( request: RetrieveRequest, callback?: Callback<AsyncResult>) => RetrieveResultLocator<AsyncResult>;
method update
update: ( type: string, updateMetadata: MetadataInfo | MetadataInfo[], callback?: Callback<SaveResult | SaveResult[]>) => Promise<SaveResult | SaveResult[]>;
method updateAsync
updateAsync: ( type: string, updateMetadata: MetadataInfo, callback?: Callback<AsyncResult | AsyncResult[]>) => AsyncResultLocator<AsyncResult | AsyncResult[]>;
method updateSync
updateSync: ( type: string, updateMetadata: MetadataInfo | MetadataInfo[], callback?: Callback<SaveResult | SaveResult[]>) => Promise<SaveResult | SaveResult[]>;
method upsert
upsert: ( type: string, metadata: MetadataInfo | MetadataInfo[], callback?: Callback<UpsertResult | UpsertResult[]>) => Promise<UpsertResult | UpsertResult[]>;
class OAuth2
class OAuth2 {}
constructor
constructor(options?: OAuth2Options);
property authzServiceUrl
authzServiceUrl: string;
property clientId
clientId: string;
property clientSecret
clientSecret: string;
property loginUrl
loginUrl: string;
property redirectUri
redirectUri: string;
property revokeServiceUrl
revokeServiceUrl: string;
property tokenServiceUrl
tokenServiceUrl: string;
method authenticate
authenticate: ( username: string, password: string, callback?: (err: Error, tokenResponse: TokenResponse) => void) => Promise<TokenResponse>;
method getAuthorizationUrl
getAuthorizationUrl: (params: { scope?: string | undefined; state?: string | undefined;}) => string;
method refreshToken
refreshToken: ( code: string, callback?: (err: Error, tokenResponse: TokenResponse) => void) => Promise<TokenResponse>;
method requestToken
requestToken: ( code: string, callback?: (err: Error, tokenResponse: TokenResponse) => void) => Promise<TokenResponse>;
method revokeToken
revokeToken: ( accessToken: string, callback?: (err: Error) => void) => Promise<undefined>;
class Parsable
class Parsable<T> extends RecordStream<T> {}
method stream
stream: (type?: string) => Readable;
class Query
class Query<T> extends Readable implements Promise<T> {}
property [Symbol.toStringTag]
[Symbol.toStringTag]: string;
method catch
catch: <TResult>( onrejected?: (reason: any) => PromiseLike<TResult> | TResult) => Promise<T | TResult>;
method del
del: { (type?: string, callback?: (err: Error, ret: RecordResult) => void): any; (callback?: (err: Error, ret: RecordResult) => void): any;};
method delete
delete: { (type?: string, callback?: (err: Error, ret: RecordResult) => void): any; (callback?: (err: Error, ret: RecordResult) => void): any;};
method destroy
destroy: { (type?: string, callback?: (err: Error, ret: RecordResult) => void): Promise< RecordResult[] >; (callback?: (err: Error, ret: RecordResult) => void): Promise< RecordResult[] >; (error?: Error): this;};
method end
end: () => Query<T>;
method exec
exec: ( options?: ExecuteOptions, callback?: (err: Error, records: T[]) => void) => Query<T>;
method execute
execute: ( options?: ExecuteOptions, callback?: (err: Error, records: T[]) => void) => Query<T>;
method explain
explain: ( callback?: (err: Error, info: ExplainInfo) => void) => Promise<ExplainInfo>;
method filter
filter: (filter: Object) => Query<T>;
method finally
finally: () => Promise<T>;
method hint
hint: (hint: Object) => Query<T>;
method include
include: (include: string) => Query<T>;
method limit
limit: (value: number) => Query<T>;
method map
map: (callback: (currentValue: Object) => void) => Promise<any>;
method maxFetch
maxFetch: (value: number) => Query<T>;
method offset
offset: (value: number) => Query<T>;
method run
run: ( options?: ExecuteOptions, callback?: (err: Error, records: T[]) => void) => Query<T>;
method scanAll
scanAll: (value: boolean) => Query<T>;
method select
select: (fields: Object | string[] | string) => Query<T>;
method skip
skip: (value: number) => Query<T>;
method sort
sort: ( keyOrList: string | Object[] | Object, direction?: 'ASC' | 'DESC' | number) => Query<T>;
method then
then: <TResult1, TResult2>( onfulfilled?: (value: T) => PromiseLike<TResult1> | TResult1, onrejected?: (reason: any) => PromiseLike<TResult2> | TResult2) => Promise<TResult1 | TResult2>;
method thenCall
thenCall: (callback?: (err: Error, records: T) => void) => Query<T>;
method toSOQL
toSOQL: (callback: (err: Error, soql: string) => void) => Promise<string>;
method update
update: { ( mapping: any, type: string, callback?: (err: Error, records: RecordResult[]) => void ): Promise<RecordResult[]>; ( mapping: any, callback?: (err: Error, records: RecordResult[]) => void ): Promise<RecordResult[]>;};
method where
where: (conditions: Object | string) => Query<T>;
class QuickAction
class QuickAction {}
method defaultValues
defaultValues: { (contextId: string, callback?: Callback<Record>): Promise<Record>; (callback?: Callback<any>): Promise<any>;};
Retrieve default field values in the action for the given record
Parameter contextId
Id of record
Parameter callback
Callback function
Retrieve default field values in the action
method describe
describe: ( callback?: Callback<QuickActionDescribeInfo>) => Promise<QuickActionDescribeInfo>;
Describe the action's information (including layout, etc.)
Parameter callback
Callback function
method execute
execute: <T>( contextId: string, record: Record<T>, callback?: Callback<QuickActionResult>) => Promise<QuickActionResult>;
Execute the action for given context id and record information
Parameter contextId
Context record ID of the action
Parameter record
Input record information for the action
Parameter callback
Callback function
class RecordReference
class RecordReference<T = any> {}
constructor
constructor(conn: Connection, type: string, id: string);
method blob
blob: (fieldName: string) => Stream;
method del
del: ( options?: Object, callback?: (err: Error, result: RecordResult) => void) => Promise<RecordResult>;
method delete
delete: ( options?: Object, callback?: (err: Error, result: RecordResult) => void) => Promise<RecordResult>;
method destroy
destroy: ( options?: Object, callback?: (err: Error, result: RecordResult) => void) => Promise<RecordResult>;
method retrieve
retrieve: ( options?: Object, callback?: (err: Error, record: Record<T>) => void) => Promise<Record<T>>;
method update
update: ( record: Partial<T>, options?: Object, callback?: (err: Error, result: RecordResult) => void) => Promise<RecordResult>;
class RecordStream
class RecordStream<T> extends Transform {}
constructor
constructor();
method filter
filter: { (fn: (record: Record<T>) => boolean): Serializable<T>; (fn: (record: Record<T>) => boolean): RecordStream<T>;};
method map
map: { (fn: (record: Record<T>) => Record<T>): Serializable<T>; (fn: (record: Record<T>) => Record<T>): RecordStream<T>;};
method recordMapStream
recordMapStream: (record: Record<T>, noeval?: boolean) => Serializable<T>;
class Report
class Report {}
method clone
clone: ( name: string, callback?: Callback<ReportResult>) => Promise<ReportResult>;
method del
del: (callback?: Callback<ReportResult>) => Promise<ReportResult>;
method delete
delete: (callback?: Callback<ReportResult>) => Promise<ReportResult>;
method describe
describe: (callback?: Callback<ReportMetadata>) => Promise<ReportMetadata>;
method destory
destory: (callback?: Callback<ReportResult>) => Promise<ReportResult>;
method exec
exec: ( options: object | Callback<ReportResult>, callback?: Callback<ReportResult>) => Promise<ReportResult>;
method execute
execute: ( options: object | Callback<ReportResult>, callback?: Callback<ReportResult>) => Promise<ReportResult>;
method executeAsync
executeAsync: ( options: object | Callback<ReportInstanceAttrs>, callback?: Callback<ReportInstanceAttrs>) => Promise<ReportInstanceAttrs>;
method explain
explain: (callback?: Callback<ExplainInfo>) => Promise<ExplainInfo>;
method instance
instance: (id: string) => ReportInstance;
method instances
instances: (callback?: Callback<ReportInstance[]>) => Promise<ReportInstance[]>;
method run
run: ( options: object | Callback<ReportResult>, callback?: Callback<ReportResult>) => Promise<ReportResult>;
class ReportInstance
class ReportInstance {}
constructor
constructor(report: Report, id: string);
method retrieve
retrieve: (callback: Callback<ReportResult>) => Promise<ReportResult>;
class Request
class Request<T> implements PromiseLike<T> {}
constructor
constructor(chatter: Chatter, params: RequestParams);
method batchParams
batchParams: () => BatchRequestParams;
method finally
finally: (onfinally?: () => void) => Promise<T>;
method promise
promise: () => Promise<T>;
method stream
stream: () => Stream;
method then
then: <TResult1, TResult2>( onfulfilled?: (value: T) => PromiseLike<TResult1> | TResult1, onrejected?: (reason: any) => PromiseLike<TResult2> | TResult2) => Promise<TResult1 | TResult2>;
method thenCall
thenCall: (callback?: (err: Error, records: T) => void) => Query<T>;
class RequestResult
class RequestResult {}
class Resource
class Resource<T> extends Request<T> {}
constructor
constructor(chatter: Chatter, url: string, queryParams?: {});
method create
create: (data: object | string, callback?: Callback<T>) => Request<T>;
method del
del: (callback?: Callback<T>) => Request<T>;
method delete
delete: (callback?: Callback<T>) => Request<T>;
method retrieve
retrieve: (callback?: Callback<T>) => Request<T>;
method update
update: (data: object, callback?: Callback<T>) => Request<T>;
class RestApi
abstract class RestApi {}
method del
del: (path: string, options: object, callback: () => object) => Promise<object>;
method get
get: (path: string, options: object, callback: () => object) => Promise<object>;
method patch
patch: ( path: string, body: object, options: object, callback: () => object) => Promise<object>;
method post
post: ( path: string, body: object, options: object, callback: () => object) => Promise<object>;
method put
put: ( path: string, body: object, options: object, callback: () => object) => Promise<object>;
class RetrieveResultLocator
class RetrieveResultLocator<T> extends AsyncResultLocator<T> {}
class Serializable
class Serializable<T> extends RecordStream<T> {}
method stream
stream: (type?: string, options?: SerializeOptions) => Readable;
class SfDate
class SfDate {}
constructor
constructor(str: string);
method parseDate
static parseDate: (str: string) => Date;
method toDateLiteral
static toDateLiteral: (date: Date | string | number) => SfDate;
method toDateTimeLiteral
static toDateTimeLiteral: (date: Date | string | number) => SfDate;
class SoapApi
class SoapApi {}
constructor
constructor(conn: Connection);
method convertLead
convertLead: ( leadConverts: LeadConvert | LeadConvert[], callback?: Callback<LeadConvertResult | LeadConvertResult[]>) => Promise<LeadConvertResult | LeadConvertResult[]>;
method create
create: ( sObjects: Object[], callback?: Callback<SoapSaveResult>) => Promise<SoapSaveResult>;
method delete
delete: ( ids: Object[], callback?: Callback<SoapDeleteResult>) => Promise<SoapDeleteResult>;
method describeTabs
describeTabs: ( callback?: Callback<DescribeTabSetResult[]>) => Promise<DescribeTabSetResult[]>;
method emptyRecycleBin
emptyRecycleBin: ( ids: string[], callback?: Callback<EmptyRecycleBinResult[]>) => Promise<EmptyRecycleBinResult[]>;
method getServerTimestamp
getServerTimestamp: ( callback?: Callback<ServerTimestampResult>) => Promise<ServerTimestampResult>;
method getUserInfo
getUserInfo: (callback?: Callback<UserInfoResult>) => Promise<UserInfoResult>;
method merge
merge: ( mergeRequests: MergeRequest | MergeRequest[], callback?: Callback<MergeResult | MergeResult[]>) => Promise<MergeResult | MergeResult[]>;
method setPassword
setPassword: ( userId: string, password: string, callback?: Callback<string>) => Promise<ResetPasswordResult>;
method update
update: ( sObjects: Object[], callback?: Callback<SoapSaveResult>) => Promise<SoapSaveResult>;
method upsert
upsert: ( externalIdFieldName: string, sObjects: Object[], callback?: Callback<SoapUpsertResult>) => Promise<SoapUpsertResult>;
class SObject
class SObject<T> {}
property approvalLayouts$
approvalLayouts$: { (callback?: Callback<ApprovalLayoutInfo>): ApprovalLayoutInfo; clear(): void;};
property compactLayouts$
compactLayouts$: { (callback?: Callback<CompactLayoutInfo>): CompactLayoutInfo; clear(): void;};
property describe$
describe$: { (callback?: Callback<DescribeSObjectResult>): DescribeSObjectResult; clear(): void;};
property layouts$
layouts$: { (layoutName?: string, callback?: Callback<LayoutInfo>): LayoutInfo; clear(): void;};
Returns a value from the cache if it exists, otherwise calls SObject.layouts
method approvalLayouts
approvalLayouts: ( callback?: Callback<ApprovalLayoutInfo>) => Promise<ApprovalLayoutInfo>;
method bulkload
bulkload: ( operation: string, options?: { extIdField?: string | undefined }, input?: Array<Record<T>> | stream.Stream | string, callback?: Callback<RecordResult[]>) => Batch;
method compactLayouts
compactLayouts: ( callback?: Callback<CompactLayoutInfo>) => Promise<CompactLayoutInfo>;
method count
count: ( conditions?: object | string, callback?: Callback<number>) => Query<number>;
method create
create: { ( record: T, options?: RestApiOptions, callback?: Callback<RecordResult> ): Promise<RecordResult>; (record: T, callback?: Callback<RecordResult>): Promise<RecordResult>; ( record: T[], options?: RestApiOptions, callback?: Callback<RecordResult[]> ): Promise<RecordResult[]>; (record: T[], callback?: Callback<RecordResult[]>): Promise<RecordResult[]>;};
method createBulk
createBulk: ( input?: Array<Record<T>> | stream.Stream | string, callback?: Callback<RecordResult[]>) => Batch;
method del
del: { (id: string, callback?: Callback<RecordResult>): Promise<RecordResult>; (ids: string[], callback?: Callback<RecordResult[]>): Promise< RecordResult[] >;};
method delete
delete: { (id: string, callback?: Callback<RecordResult>): Promise<RecordResult>; (ids: string[], callback?: Callback<RecordResult[]>): Promise< RecordResult[] >;};
method deleteBulk
deleteBulk: ( input?: Array<Record<T>> | stream.Stream | string, callback?: Callback<RecordResult[]>) => Batch;
method deleted
deleted: ( start: Date | string, end: Date | string, callback?: Callback<DeletedRecordsInfo>) => Promise<DeletedRecordsInfo>;
method deleteHardBulk
deleteHardBulk: ( input?: Array<Record<T>> | stream.Stream | string, callback?: Callback<RecordResult[]>) => Batch;
method describe
describe: ( callback?: Callback<DescribeSObjectResult>) => Promise<DescribeSObjectResult>;
method destroy
destroy: { (id: string, callback?: Callback<RecordResult>): Promise<RecordResult>; (ids: string[], callback?: Callback<RecordResult[]>): Promise< RecordResult[] >;};
method destroyBulk
destroyBulk: ( input?: Array<Record<T>> | stream.Stream | string, callback?: Callback<RecordResult[]>) => Batch;
method destroyHardBulk
destroyHardBulk: ( input?: Array<Record<T>> | stream.Stream | string, callback?: Callback<RecordResult[]>) => Batch;
method find
find: { <T>(query?: object | string, callback?: Callback<Array<Record<T>>>): Query< Array<Record<T>> >; <T>( query?: string | object, fields?: string | Object | string[], callback?: Callback<Record<T>[]> ): Query<Record<T>[]>; <T>( query?: string | object, fields?: string | Object | string[], options?: FindOptions, callback?: Callback<Record<T>[]> ): Query<Record<T>[]>;};
method findOne
findOne: { <T>( query?: object | string, callback?: Callback<Record<T>> ): Query<Record<T> | null>; <T>( query?: string | object, fields?: string | Object | string[], callback?: Callback<Record<T>> ): Query<Record<T>>; <T>( query?: string | object, fields?: string | Object | string[], options?: FindOptions, callback?: Callback<Record<T>> ): Query<Record<T>>;};
method insert
insert: { ( record: Record<T>, callback?: Callback<RecordResult> ): Promise<RecordResult>; (records: Record<T>[], callback?: Callback<RecordResult[]>): Promise< RecordResult[] >;};
method insertBulk
insertBulk: ( input?: Array<Record<T>> | stream.Stream | string, callback?: Callback<RecordResult[]>) => Batch;
method layouts
layouts: ( layoutName?: string, callback?: Callback<LayoutInfo>) => Promise<LayoutInfo>;
method listview
listview: (id: string) => ListView;
method listviews
listviews: (callback?: Callback<ListViewsInfo>) => Promise<ListViewsInfo>;
method quickAction
quickAction: (actionName: string) => QuickAction;
method quickActions
quickActions: ( callback?: Callback<QuickActionInfo[]>) => Promise<QuickActionInfo[]>;
method recent
recent: (callback?: Callback<RecordResult[]>) => Promise<RecordResult[]>;
method record
record: (id: SalesforceId) => RecordReference<T>;
method retrieve
retrieve: { (id: SalesforceId, callback?: Callback<Record<T>>): Promise<Record<T>>; (id: string, options?: object, callback?: Callback<Record<T>>): Promise< Record<T> >; (ids: string[], callback?: Callback<Record<T>[]>): Promise<Record<T>[]>; (ids: string[], options?: object, callback?: Callback<Record<T>[]>): Promise< Record<T>[] >;};
method select
select: { (callback?: Callback<T[]>): Query<T[]>; ( fields?: { [P in keyof T]: boolean } | keyof T | (keyof T)[], callback?: Callback<Partial<T>[]> ): Query<Partial<T>[]>;};
method update
update: { ( record: Partial<T>, callback?: Callback<RecordResult> ): Promise<RecordResult>; ( record: Partial<T>, options?: RestApiOptions, callback?: Callback<RecordResult> ): Promise<RecordResult>; (records: Partial<T>[], callback?: Callback<RecordResult[]>): Promise< RecordResult[] >; ( records: Partial<T>[], options?: RestApiOptions, callback?: Callback<RecordResult[]> ): Promise<RecordResult[]>;};
method updateBulk
updateBulk: ( input?: Record[] | stream.Stream | string, callback?: Callback<RecordResult[]>) => Batch;
method updated
updated: ( start: string | Date, end: string | Date, callback?: Callback<UpdatedRecordsInfo>) => Promise<UpdatedRecordsInfo>;
method upsert
upsert: { ( records: Record<T>, extIdField: string, callback?: Callback<RecordResult> ): Promise<RecordResult>; ( records: Record<T>, extIdField: string, options?: RestApiOptions, callback?: Callback<RecordResult> ): Promise<RecordResult>; ( records: Record<T>[], extIdField: string, callback?: Callback<RecordResult[]> ): Promise<RecordResult[]>; ( records: Record<T>[], extIdField: string, options?: RestApiOptions, callback?: Callback<RecordResult[]> ): Promise<RecordResult[]>;};
method upsertBulk
upsertBulk: ( input?: Array<Record<T>> | stream.Stream | string, callback?: Callback<RecordResult[] | BatchResultInfo[]>) => Batch;
class Streaming
class Streaming extends EventEmitter {}
constructor
constructor(connection: Connection);
method channel
channel: (channelId: string) => Channel;
method createClient
createClient: (extensions?: any[]) => any;
method subscribe
subscribe: (name: string, listener: StreamingMessage) => any;
method topic
topic: (name: string) => Topic;
method unsubscribe
unsubscribe: (name: string, listener: StreamingMessage) => Streaming;
class Tooling
class Tooling extends BaseConnection {}
method executeAnonymous
executeAnonymous: ( body: string, callback?: (err: Error, res: any) => void) => Promise<ExecuteAnonymousResult>;
class Topic
class Topic {}
constructor
constructor(streaming: Streaming, name: string);
method subscribe
subscribe: (listener: (streamingMessage: StreamingMessage) => void) => any;
method unsubscribe
unsubscribe: (listener: (streamingMessage: StreamingMessage) => void) => Topic;
Interfaces
interface ActionOverride
interface ActionOverride {}
property formFactor
formFactor: string;
property isAvailableInTouch
isAvailableInTouch: boolean;
property name
name: string;
property pageId
pageId: string;
property url
url?: maybe<string> | undefined;
interface ApprovalLayoutInfo
interface ApprovalLayoutInfo {}
property approvalLayouts
approvalLayouts: Object[];
interface AsyncResult
interface AsyncResult {}
property done
done: boolean;
property id
id: string;
property message
message?: string | undefined;
property state
state: string;
property statusCode
statusCode?: string | undefined;
interface BatchDescribeSObjectOptions
interface BatchDescribeSObjectOptions {}
property autofetch
autofetch?: boolean | undefined;
property maxConcurrentRequests
maxConcurrentRequests?: number | undefined;
property types
types: string[];
interface BatchInfo
interface BatchInfo {}
property id
id: string;
property jobId
jobId: string;
property numberRecordsFailed
numberRecordsFailed: string;
property numberRecordsProcessed
numberRecordsProcessed: string;
property state
state: string;
property stateMessage
stateMessage: string;
property totalProcessingTime
totalProcessingTime: string;
interface BatchRequestParams
interface BatchRequestParams extends RequestParams {}
interface BatchRequestResult
interface BatchRequestResult {}
property result
result: RequestResult;
property statusCode
statusCode: string;
interface BatchRequestResults
interface BatchRequestResults {}
interface BatchResultInfo
interface BatchResultInfo {}
interface BulkOptions
interface BulkOptions {}
property concurrencyMode
concurrencyMode?: 'Serial' | 'Parallel' | undefined;
property extIdField
extIdField: string;
interface ChildRelationship
interface ChildRelationship {}
property cascadeDelete
cascadeDelete: boolean;
property childSObject
childSObject: string;
property deprecatedAndHidden
deprecatedAndHidden: boolean;
property field
field: string;
property junctionIdListNames
junctionIdListNames: string[];
property junctionReferenceTo
junctionReferenceTo: string[];
property relationshipName
relationshipName?: maybe<string> | undefined;
property restrictedDelete
restrictedDelete: boolean;
interface CompactLayoutInfo
interface CompactLayoutInfo {}
property compactLayouts
compactLayouts: Object[];
property defaultCompactLayoutId
defaultCompactLayoutId: string;
property recordTypeCompactLayoutMappings
recordTypeCompactLayoutMappings: Object[];
interface ConnectionOptions
interface ConnectionOptions extends PartialOAuth2Options {}
property accessToken
accessToken?: string | undefined;
property callOptions
callOptions?: Object | undefined;
property httpProxy
httpProxy?: string | undefined;
property instanceUrl
instanceUrl?: string | undefined;
property loginUrl
loginUrl?: string | undefined;
property logLevel
logLevel?: string | undefined;
property maxRequest
maxRequest?: number | undefined;
property oauth2
oauth2?: Partial<PartialOAuth2Options> | undefined;
property proxyUrl
proxyUrl?: string | undefined;
property redirectUri
redirectUri?: string | undefined;
property refreshFn
refreshFn?: | (( conn: Connection, callback: ( err: Error | null, accessToken: string, res?: unknown ) => void ) => unknown) | undefined;
property refreshToken
refreshToken?: string | undefined;
property serverUrl
serverUrl?: string | undefined;
property sessionId
sessionId?: string | undefined;
property signedRequest
signedRequest?: string | Object | undefined;
property version
version?: string | undefined;
interface CSVStreamConverterOptions
interface CSVStreamConverterOptions {}
interface DailyApiRequests
interface DailyApiRequests extends Limit {}
property "Chatter Desktop"
'Chatter Desktop': Limit;
property "Chatter Mobile for BlackBerry"
'Chatter Mobile for BlackBerry': Limit;
property "Salesforce Files"
'Salesforce Files': Limit;
property "Salesforce for Android"
'Salesforce for Android': Limit;
property "Salesforce for iOS"
'Salesforce for iOS': Limit;
property "Salesforce Marketing Cloud"
'Salesforce Marketing Cloud': Limit;
property "SalesforceA"
SalesforceA: Limit;
interface DashboardInfo
interface DashboardInfo {}
interface DeletedRecord
interface DeletedRecord {}
property deletedDate
deletedDate: string;
property id
id: string;
interface DeletedRecordsInfo
interface DeletedRecordsInfo {}
property deletedRecords
deletedRecords: DeletedRecord[];
property earliestDateAvailable
earliestDateAvailable: string;
property latestDateCovered
latestDateCovered: string;
interface DeployOptions