Matcher used to match embedded records without matching key against org data; used by the delta check to avoid deleting and recreating embedded records that are already in sync with the target org.
Private OptionalcancelPrivate ReadonlyconnectionPrivate OptionaldeltaPrivate OptionaldeltaPrivate OptionaldeltaPrivate ReadonlydeployedPrivate ReadonlyerrorsPrivateisPrivate ReadonlyloggerPrivate ReadonlylookupReadonlyoptionsPrivate ReadonlyorgPrivate ReadonlyrecordPrivate ReadonlyrecordReadonlyrecordMatcher used to match embedded records without matching key against org data; used by the delta check to avoid deleting and recreating embedded records that are already in sync with the target org.
Private ReadonlyrecordsPrivate ReadonlysalesforcePrivatetimerPrivate Static ReadonlynonRecord error status codes that are deterministic and will fail again when retried with the
same data; retrying these only slows down the deployment. All other record errors (such as
UNABLE_TO_LOCK_ROW) may be transient or caused by records deployed later in the same
deployment and are retried up to DatapackDeploymentOptions.maxRetries times.
Private Static ReadonlyrecordPrivate Static ReadonlyrecordGets the total number of datapacks in this deployment. Each datapack can contain multiple records. Use totalRecordCount to get the total number of records.
The total number of datapacks.
Gets the total record count in this deployment. Each record is a part of a datapack.
The total number of records.
Add a Datapack level error to the deployment. This is used to add errors that are not related to a specific record but to a whole datapack, or to add errors that are related to a datapack for which the records could not added to the deployment.
Group key of the datapack to which the error belongs
Error to add to the deployment
PrivatecreateCompared the to be deployed records to the records in the org
Records to deploy
OptionalcancelToken: CancellationTokenCancellation token to signal the process if a cancellation is initiated
Returns an array of keys from the datapacks in this deployment. The keys returned by this method can be used to retrieve deployment records using getRecords.
An array containing all datapack keys.
PrivatedeltaMatch the pending dependents of the specified purge parents against the org data and skip dependents that are already in sync with the target org; a deployment would otherwise delete and recreate these records with identical data. Matching walks down the datapack tree: the dependents of a matched (preserved) record are matched against the org records under the preserved record.
Deployed or skipped records whose dependents are about to be purged
Pending records indexed by the source keys they depend on
Predicate that selects which dependents are purged
The dependent records that were matched to an in-sync org record and skipped
PrivatedeployOptionalcancelToken: CancellationTokenSupport for clearing the event listeners
Emit an event and await the event completion
event type that is emptied
parameters matching the event type
Optionaloptions: EventEmitOptionsPrivateformatPrivategetRetrieves all datapack deployment records as DatapackDeploymentRecordGroup objects. The return groups can be manipulated when the deployment hasn't started yet.
An array of DatapackDeploymentRecordGroup objects.
Gets the deployment status of a Datapack by it's source key.
undefined if the datapack is not part of the deployment.Datapack key to get the deployment status for
PrivategetGet all records that can be deployed; i.e records that do not have any pending dependencies.
Retrieves the deployment messages for the datapack deployment.
Optionaloptions: { includeCascadeFailures?: boolean }An optional object that specifies additional options for retrieving the messages.
OptionalincludeCascadeFailures?: booleanA boolean indicating whether to include cascade failures in the messages. Default is false.
An array of DatapackDeploymentRecordMessage objects representing the deployment messages.
Optionaloptions: { includeCascadeFailures?: boolean }Get all records related a specific datapack, includes main record and any child records originating from the same datapack.
Key of the datapack
Gets the deployment status of a record by source key
Record source key to get the deployment status for
PrivategetBuild the per record status detail included in getStatus describing which org record a datapack record was matched against and the action the deployment took (or will take) for it.
PrivategetCompared the to be deployed records to the records in the org
Records
OptionalcancelToken: CancellationTokenCancellation token to signal the process if a cancellation is initiated
Retrieves all datapack deployment records as DatapackDeploymentRecordGroup objects. The return groups can be manipulated when the deployment hasn't started yet.
An array of DatapackDeploymentRecordGroup objects.
PrivatehandlePrivatehandlePrivatehasDetect whether the dependency chain of a record loops back on itself. Returns the dependency
path from the record into the detected cycle, or false when the chain is cycle free.
Results are memoized in resolved so repeated checks (and shared sub-chains) resolve in
constant time; pass the same map across calls to keep the overall complexity linear in the
number of records and dependencies instead of exponential in the number of distinct paths.
Record to check
Memoized results per record source key; a string[] is the path into a cycle
Source keys on the current DFS path used to detect when a chain loops back
PrivatehasCheck if a record has pending dependencies that are not yet deployed as part of the current deployment
Check if a datapack has any pending records
Key of the datapack
PrivateisChecks if there is a circular dependency between two datapacks.
The key of the first datapack.
The key of the second datapack.
True if there is a circular dependency, false otherwise.
PrivateisRegister an event listener to trigger on an event.
Listener to register
ProtectedonHandles the error that occurs when emitting a callback event.
The error that occurred.
The name of the event.
The failed callback event receiver.
Register an event listener to trigger once on event.
Listener to register
PrivatepurgePrivatepurgePurge all records that depend on any of the records just deployed through their matching record key. Records that depend on other records from within the same Datapack have a relation to the parent datapack through Matching source key. This function will delete all child records that have a relationship parent record through a Matching source key
Note this function will only delete records for parents that have been update and are deployed successfully
Records
Removes all listeners, or those of the specified event.
It is bad practice to remove listeners added elsewhere in the code, particularly when the EventEmitter instance was created by some other component or module (e.g. sockets or file streams).
Returns a reference to the EventEmitter, so that calls can be chained.
Optionalevent: Kevent type to remove listeners for if not specified all listeners are removed
Removes the specified listener from the listener array for the event named event.
removeListener() will remove, at most, one instance of a listener from the listener array.
If any single listener has been added multiple times to the listener array for the specified eventName,
then removeListener() must be called multiple times to remove each instance.
event type to remove listener from
listener to remove
PrivatereportPrivateresolveOptionalcancelToken: CancellationTokenResolve the dependencies either based on the records we are deploying -or- pass them on to the lookup resolver.
Dependency resolution requests to resolve
Resolve a dependency either based on the records we are deploying -or- pass it on to the lookup resolver.
Dependency to resolve
Datapack record that owns the dependency
PrivateresolveResolve the existing org record IDs for the specified records using the matching key configuration and update the deployment action of each record accordingly: records that match an existing org record are updated (DeploymentAction.Update) and records without a match are inserted (DeploymentAction.Insert). Records with DatapackDeploymentRecord.skipLookup set are excluded from the lookup.
Records for which to resolve the existing org record IDs
OptionalcancelToken: CancellationTokenAn optional cancellation token to abort the org lookups
InternalConfigure the comparison provider used to prepare a delta deployment. Datapack deployments created through DatapackDeployer receive a provider that runs the bulk comparer against this deployment's already-converted records.
Deploy deployment records part of this deployment task to Salesforce.
OptionalcancelToken: CancellationTokenAn optional cancellation token to stop the deployment
Use an existing datapack comparison as the input for this delta deployment. Comparison records are matched to deployment records by source key; missing or unknown results automatically fall back to the regular deployment lookups.
Result produced by DatapackComparer.compare or DatapackComparer.compareDeployment
PrivatevalidatePrivatewrite
A datapack deployment task/job