open-index/open-npm huggingface dataset:
npm package: @rhoas/connector-management-sdk
Description: RHOAS Connector Management SDK
Author: Red Hat Developers
Latest version: 1.0.3

## Connector Management SDK

RHOAS Connector Management TypeScript SDK

### Getting Started

#### Install Package

```
npm install @rhoas/connector-management-sdk --save
```

#### Usage

```ts
import { Configuration, ConnectorsApi, getErrorCode, isServiceApiError, APIErrorCodes } from "@rhoas/connector-management-sdk";

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

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

const connectorsApi = new ConnectorsApi(apiConfig)

connectorsApi.getConnector("id", "kafka-id").then((data) => {
    console.log(data?.data)
}).catch((err) => {
    if(isServiceApiError(err)){
        console.error("Validation issue", getErrorCode(err) == APIErrorCodes.ERROR_8)
    }
})
```


See [./examples](https://github.com/redhat-developer/app-services-sdk-core/app-services-sdk-js/tree/main/examples) for full example
npm package: @rhoas/kafka-instance-sdk
Description: RHOAS Kafka Instance Adminstration SDK
Author: Red Hat Developers
Latest version: 1.0.3

## Kafka Instance Admin SDK

RHOAS Kafka Instance Admin SDK TypeScript SDK
Provides SDK for interacting with Kafka instances 

> NOTE: This SDK requires different authentication than management APIs

### Getting Started

#### Install Package

```
npm install @rhoas/kafka-instance-sdk --save
```

#### Usage

```ts
import { Configuration, DefaultApi } from "@rhoas/kafka-instance-sdk";

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

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

const kafkaInstance = new DefaultApi(apiConfig)

kafkaInstance.getTopics().then((data) => {
    console.log(data?.data)
}).catch((err) => {
    console.error(err.message)
})
```

See [./examples](https://github.com/redhat-developer/app-services-sdk-core/app-services-sdk-js/tree/main/examples) for full example
npm package: @rhoas/kafka-management-sdk
Description: RHOAS Kafka Management SDK
Author: Red Hat Developers
Latest version: 1.0.2

## Kafka Management SDK

RHOAS Kafka Management TypeScript SDK

### Getting Started

#### Install Package

```
npm install @rhoas/kafka-management-sdk --save
```

#### Usage

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

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

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

const kafkaApi = new DefaultApi(apiConfig);

kafkaApi
  .getKafkas()
  .then((data) => {
    console.log(data?.data.items);
  })
  .catch((err) => {
    if(isServiceApiError(err)){
        console.error("Validation issue", getErrorCode(err) == APIErrorCodes.ERROR_8)
    }
  });
```

See [./examples](https://github.com/redhat-developer/app-services-sdk-core/app-services-sdk-js/tree/main/examples) for full example

### Service Accounts SDK

SDK will help you to create Service Account to Access Kafka and other services

> NOTE: This SDK is currently included into Kafka SDK as Alpha feature. It will be moved out of the SDK in near future.

See [./examples](https://github.com/redhat-developer/app-services-sdk-coreapp-services-sdk-js//tree/main/examples/src/serviceAccount.ts) for full example
npm package: @rhoas/registry-instance-sdk
Description: RHOAS Service Registry Instance Adminstration SDK
Author: Red Hat Developers
Latest version: 1.0.2

## Service Registry Instance SDK

Service Registry (Apicurio Registry) instance SDK

> NOTE: SDK is designed to work with Managed version of APIcurio Registry but it can be also consumed upstream

### Getting Started

#### Install Package

```
npm install @rhoas/registry-instance-sdk --save
```

#### Usage

```ts
import { Configuration, DefaultApi } from "@rhoas/registry-instance-sdk";

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

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

const instance = new DefaultApi(apiConfig)

instance.getArtifacts().then((data) => {
    console.log(data?.data)
}).catch((err) => {
    console.error(err.message)
})
```
npm package: @rhoas/registry-management-sdk
Description: RHOAS Service Registry Management SDK
Author: Red Hat Developers
Latest version: 1.0.2

## Service Registry Management SDK

RHOAS Service Registry Management TypeScript SDK.

### Getting Started

#### Install Package

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

#### Usage

```ts
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](https://github.com/redhat-developer/app-services-sdk-core/app-services-sdk-js/tree/main/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
npm package: @rhoas/service-accounts-sdk
Description: RHOAS Service Accounts SDK
Author: Red Hat Developers
Latest version: 1.0.2

## Service Accounts SDK

RHOAS Service Accounts TypeScript SDK.

Service accounts are a special type of non-human privileged account used to execute applications and run automated services. Service accounts typically will allow you to connect to the services from your applications.

> NOTE: Creation of the service account doesn't automatically gives developers priviledge to 
use it with the service. Please refer to individual service API to see how to add permissions. 
For example for kafka-instance-sdk check "access-management" APIs.

### Getting Started

#### Install Package

```
npm install @rhoas/service-accounts-sdk --save
```

#### Usage

```ts
import { Configuration, DefaultApi} from "@rhoas/service-accounts-sdk";

const accessToken = process.env.CLOUD_API_TOKEN;
const basePath = "https://sso.redhat.com/auth/realms/redhat-external/";

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

const serviceAccountAPI = new ServiceAccountsApi(apiConfig)

serviceAccountAPI.getServiceAccounts().then((data) => {
    console.log(data?.data)
}).catch((err) => {
    console.error(err.message)
})
```

See [./examples](https://github.com/redhat-developer/app-services-sdk-core/app-services-sdk-js/tree/main/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