Private OptionalcancelPrivate ReadonlyconnectionPrivate ReadonlydeployedPrivate ReadonlyerrorsPrivateisPrivate ReadonlyloggerPrivate ReadonlylookupReadonlyoptionsPrivate ReadonlyorgPrivate ReadonlyrecordPrivate ReadonlyrecordPrivate ReadonlyrecordsPrivate ReadonlysalesforcePrivate ReadonlyschemaPrivatetimerGets 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.
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: EventEmitOptionsPrivateformatRetrieves 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
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.
PrivatehandlePrivatehandlePrivatehasPrivatehasCheck 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
PrivateresolvePrivateresolveOptionalcancelToken: CancellationTokenDeploy deployment records part of this deployment task to Salesforce.
OptionalcancelToken: CancellationTokenAn optional cancellation token to stop the deployment
PrivatevalidatePrivatewrite
A datapack deployment task/job