Get the Package2Version SObject data for this PackageVersion.
force a refresh of the package version data.
Package2Version
Get the package type for this PackageVersion.
The PackageType (Managed, Unlocked).
Reports details about this PackageVersion.
Whether to get a detailed version of the report, at the expense of performance.
Static
createSends a request to create a new package version and optionally polls for the status of the request until the package version is created or the polling timeout is reached.
PackageVersionCreateOptions
frequency and timeout Durations to be used in polling
PackageVersionCreateRequestResult
Static
getGets current state of a package version create request.
Static
getGets current state of a package version create request.
Static
getFetch a list of package version create requests based on the given options.
connection to an org
Optional
options: PackageVersionCreateRequestQueryOptionsPackageVersionCreateRequestQueryOptions
the list of package version create requests.
Static
pollConvenience function that will wait for a package version to be created.
This function emits LifeCycle events, "enqueued", "in-progress", "success", "error" and "timed-out" to progress and current status. Events also carry a payload of type PackageVersionCreateRequestResult.
Connection to the org
SfProject to read/write aliases from
frequency and timeout Durations to be used in polling
Static
queryQuery the Package2Version SObject and return data with the provided type.
NOTE: There is a limit of 2000 records that can be returned, otherwise a GACK might be thrown. If more than 2000 records are desired you should filter the query by date and aggregate all results.
jsForce Connection to the org.
Package2Version query options
Results from querying the Package2Version SObject.
Static
waitConvenience function that will wait for a package version to be created.
This function emits LifeCycle events, "enqueued", "in-progress", "success", "error" and "timed-out" to progress and current status. Events also carry a payload of type PackageVersionCreateRequestResult.
frequency and timeout Durations to be used in polling
Provides the ability to create, update, delete, and promote 2nd generation package versions.
Examples
Create a new instance and get the ID (05i):
const id = new PackageVersion({connection, project, idOrAlias}).getId();
Create a new package version in the org:
const myPkgVersion = await PackageVersion.create(options, pollingOptions);
Promote a package version:
new PackageVersion({connection, project, idOrAlias}).promote();