Class NpmPackageClient

java.lang.Object
ca.cdr.test.app.clients.NpmPackageClient

public class NpmPackageClient extends Object
NpmPackageClient is a client for the NPM Package Registry API of the CDR. It currently supports anonymous and http-basic authentication. This client provides access to package installation operations through Smile CDR's package registry endpoint, typically running on port 8002.
  • Method Details

    • build

      public static NpmPackageClient build(String theBaseUrl, String theUsername, String thePassword)
      Build an NpmPackageClient with authentication
      Parameters:
      theBaseUrl - The base URL of the package registry
      theUsername - Username for authentication
      thePassword - Password for authentication
      Returns:
      Configured NpmPackageClient
    • buildAnonymous

      public static NpmPackageClient buildAnonymous(String theBaseUrl)
      Build an anonymous NpmPackageClient
      Parameters:
      theBaseUrl - The base URL of the package registry
      Returns:
      Configured NpmPackageClient
    • installPackageBySpec

      @Nonnull public ca.uhn.fhir.jpa.packages.PackageInstallOutcomeJson installPackageBySpec(ca.uhn.fhir.jpa.packages.PackageInstallationSpec theSpec)
      Install a package using the provided specification
      Parameters:
      theSpec - The package installation specification
      Returns:
      The installation outcome
    • installPackageBySpec

      @Nonnull public ca.uhn.fhir.jpa.packages.PackageInstallOutcomeJson installPackageBySpec(String theSpecJson)
      Install a package using the provided specification as a JSON string
      Parameters:
      theSpecJson - The package installation specification as JSON string
      Returns:
      The installation outcome