Return CSP trusted sites for the SubscriberPackageVersion.
The CSP trusted sites.
Get the SubscriberPackageVersion SObject data for this SubscriberPackageVersion.
Optionalforce?: booleanOptionalincludeSObject data.
Return dependencies for the SubscriberPackageVersion.
The dependencies.
Get the installation validation status for the SubscriberPackageVersion.
The installation validation status.
Get the package type for this SubscriberPackageVersion.
The package type ("Managed" or "Unlocked") for this SubscriberPackageVersion.
Return remote site settings for the SubscriberPackageVersion.
The remote site settings.
Get a VersionNumber instance for this SubscriberPackageVersion.
The version number.
Installs a package version in a subscriber org.
Package Version install emits the following events:
Uninstalls a package version from a subscriber org.
Wait for the subscriber package version to be replicated across instances and available to be queried against
Optionalinstallationthe installation key for the package version
how often to check for the package version to be published
how long to wait for the package version to be published
StaticgetRetrieves the package version create request.
Staticinstalledlist the packages installed in the org
StaticinstallFetches the status of a package version install request and will wait for the install to complete, if requested Package Version install emits the following events:
OptionalinstallationKey: Nullable<string>Optionaloptions: PackageInstallOptionsStaticresolveResolve fields from a packageDirectories entry to a SubscriberPackageVersionId (04t).
Specifically uses the versionNumber and packageId fields, as well as an optional
branch field.
A connection object to the org
Fields from a packageDirectories entry in sfdx-project.json.
The versionNumber and packageId fields are required. Optionally, the branch and
package fields can be passed.
the SubscriberPackageVersionId (04t)
StaticuninstallReports on the progress of a package version uninstall.
the 06y package version uninstall request id
Provides the ability to get, list, install, and uninstall 2nd generation subscriber package versions.
Examples
List all 2GP installed packages in the org:
const installedPkgs = await SubscriberPackageVersion.installedList(connection);Install a 2GP subscriber package version:
const installStatus = await new SubscriberPackageVersion(options).install(request, options);