UNPKG

sf-composite-call

Version:

Support for making Salesforce composite call requests with integration for JSforce.

62 lines (61 loc) 3.57 kB
import { CompositeSubrequest, CompositeSubrequestBody } from './CompositeSubrequest'; /** * @description Class for SObject Composite Subrequests. * @augments CompositeSubrequest * @param {string} sobject - A valid built-in or custom SObject name. * @param {string} [referenceId] - The reference ID of the query subrequest. * @param {string} [version] - The version of the Salesforce API to use. */ export declare class CompositeSubrequestSObject extends CompositeSubrequest { constructor(sobject: string, referenceId?: string, version?: string); sobject: string; url(): string; delete(body?: any, operation?: string, httpHeaders?: any): CompositeSubrequestBody; /** * @description Method to delete an SObject record. * @param {string} id - The ID of the SObject resource to destory. * @param {object} [httpHeaders] - **Optional.** Additional HTTP headers to include in the request. * @returns {CompositeSubrequestBody} - A subrequest object. */ destroy(id: string, httpHeaders?: any): CompositeSubrequestBody; get(body?: any, operation?: string, httpHeaders?: any): CompositeSubrequestBody; /** * @description Method to describe an SObject type. * @param {object} [httpHeaders] - **Optional.** Additional HTTP headers to include in the request. * @returns {CompositeSubrequestBody} - A subrequest object. */ describe(httpHeaders?: any): CompositeSubrequestBody; /** * @description Method to retrieve an SObject record. * @param {string} id - The ID of the SObject resource to retrieve. * @param {object} [httpHeaders] - **Optional.** Additional HTTP headers to include in the request. * @returns {CompositeSubrequestBody} - A subrequest object. */ retrieve(id: string, httpHeaders?: any): CompositeSubrequestBody; patch(body?: any, operation?: string, httpHeaders?: any): CompositeSubrequestBody; /** * @description Method to update an SObject record. * @param {object} record - An object with valid fields for the SObject record. * @param {string} [record.Id] - The ID of the SObject resource to update. * @param {string} [externalId='Id'] - The field name to use as the Id of the object. * @param {object} [httpHeaders] - **Optional.** Additional HTTP headers to include in the request. * @returns {CompositeSubrequestBody} - A subrequest object. */ update(record: any, externalId: string, httpHeaders: any): CompositeSubrequestBody; post(body?: any, operation?: string, httpHeaders?: any): CompositeSubrequestBody; /** * @description Method to create an SObject record. * @param {object} record - An object with valid fields for the SObject record; do not include an Id field. * @param {object} [httpHeaders] - **Optional.** Additional HTTP headers to include in the request. * @returns {CompositeSubrequestBody} - A subrequest object. */ create(record: any, httpHeaders?: any): CompositeSubrequestBody; /** * @description Synonym of `create()`. * @param {object} record - An object with valid fields for the SObject record; do not include an Id field. * @param {object} [httpHeaders] - **Optional.** Additional HTTP headers to include in the request. * @returns {CompositeSubrequestBody} - A subrequest object. */ insert(record: any, httpHeaders?: any): CompositeSubrequestBody; put(body?: any, operation?: string, httpHeaders?: any): CompositeSubrequestBody; }