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);

Constructors

Methods

  • Returns an array of RSS and CSP external sites for the package.

    Returns Promise<Optional<string[]>>

    an array of RSS and CSP site URLs, or undefined if the package doesn't have any.

  • Get the subscriber package Id (033) for this SubscriberPackageVersion.

    Returns Promise<string>

    The subscriber package Id.

  • Is the SubscriberPackageVersion password protected?

    Returns Promise<boolean>

    True if the SubscriberPackageVersion is password protected.

  • Wait for the subscriber package version to be replicated across instances and available to be queried against

    Parameters

    • options: {
          installationKey?: string;
          publishFrequency: Duration;
          publishTimeout: Duration;
      } = ...
      • Optional installationKey?: string

        the installation key for the package version

      • publishFrequency: Duration

        how often to check for the package version to be published

      • publishTimeout: Duration

        how long to wait for the package version to be published

    Returns Promise<void>