The consumer key of the Connected App used to connect.
Executes a custom REST API request to the specified endpoint.
Typically, every Salesforce REST API data endpoint must include the REST API version that is being requested. However, when calling the executeApiRequest
function you can either explicitly set the REST API version to call or simply use "vXX.X" to default to the REST API version set by the API.
For POST
/PATCH
requests, Content-Type
header is set to "application/json" by default and so data
parameter can simply be set to an object.
Note: depending on which REST API endpoint you attempt to request, you may need to add additional OAuth scopes to your Connected App.
An interface defining the expected data returned from Salesforce for the given query.
The relative Salesforce REST API endpoint being requested (e.g. /services/data/vXX.X/sobjects/Contact
).
The HTTP Method to use when making the request (defaults to GET
).
Optional data to pass with the request (for POST
/PATCH
requests).
Optional headers to include with the request. Do not set the Authorization
header as this will be added automatically.
A promise resolving to a response object containing the status code and response data (if provided). The data is expected to be of the given generic type, but this is not enforced.
Retrieves the the Salesforce object with the given ID and type, including all field values.
The type of the Salesforce object being retrieved (will be inferred from the objectType
parameter).
The ID of the Salesforce object to retrieve.
The type of object being retrieved (e.g. Account
/Contact
/etc. Prefer SalesforceObjectType enum to string for known types).
A promise resolving to the object with the requested ID, or null if it can not be found. If the objectType
parameter is a known object type, a more detailed return type will be used that better describes the object (see SalesforceAccount, SalesforceContact, SalesforceOpportunity and SalesforceTask).
The URL of the connected Salesforce org.
If only text
is provided, or emailAddress
and/or phoneNumber
is provided with text
then the query will search all fields. If only emailAddress
or phoneNumber
is provided then the query will search email or phone number fields respectively.
Optionally, provide a limit
to restrict the number of search results returned (defaults to 10).
A {@link SalesforceSearchQuery} describing the search to be performed.
A promise resolving to an array of {@link SalesforceSearchResult} which is a discriminated union of {@link SalesforceAccountSearchResult} and {@link SalesforceContactSearchResult}, with the discriminator being the objectType
property.
Closes the connection with the currently connected Salesforce org. Stored auth keys are expired and removed.
Generated using TypeDoc
Defines a connection to a Salesforce org.