jack-registry-management-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.5.0-beta1 • Public • Published

Service Registry Management SDK

RHOAS Service Registry Management TypeScript/JavaScript SDK.

Getting Started

Install Package

npm install @rhoas/registry-management-sdk --save

Usage

import { Configuration, DefaultApi, getErrorCode, isServiceApiError, APIErrorCodes } from "@rhoas/registry-management-sdk";

const accessToken = process.env.CLOUD_API_TOKEN;
const basePath = "https://api.openshift.com";

const apiConfig = new Configuration({
  accessToken,
  basePath,
});

const registryApi = new DefaultApi(apiConfig)

registryApi.getRegistries().then((data) => {
    console.log(data?.data)
}).catch((err) => {
    if(isServiceApiError(err)){
        console.error("Invalid JSON format", getErrorCode(err) == APIErrorCodes.ERROR_5)
    }
   
})

See ./examples for full example

Security

API is using https://sso.redhat.com for OAuth Authentication. Provided token needs to be AccessToken returned from library like keycloak.js

/jack-registry-management-sdk/

    Package Sidebar

    Install

    npm i jack-registry-management-sdk

    Weekly Downloads

    2

    Version

    1.5.0-beta1

    License

    Apache-2.0

    Unpacked Size

    193 kB

    Total Files

    92

    Last publish

    Collaborators

    • jackdelahunt