Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rhoas/kafka-management-sdk

Package Overview
Dependencies
Maintainers
5
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rhoas/kafka-management-sdk - npm Package Compare versions

Comparing version 0.20.0 to 0.20.1-dev1

dist/errorHelpers.d.ts

86

dist/errors.d.ts

@@ -8,3 +8,3 @@ /**

}).catch((err) => {
if(APIErrorCodes.ERROR_5 == err.code) {
if(APIErrorCodes.ERROR_5 == err.response?.data.code) {
// Handle error

@@ -15,83 +15,83 @@ }

*/
export declare enum APIErrorCodes {
export declare const APIErrorCodes: {
/** Forbidden to perform this action*/
ERROR_4 = "KAFKAS-MGMT-4",
ERROR_4: string;
/** Forbidden to create more instances than the maximum allowed*/
ERROR_5 = "KAFKAS-MGMT-5",
ERROR_5: string;
/** An entity with the specified unique values already exists*/
ERROR_6 = "KAFKAS-MGMT-6",
ERROR_6: string;
/** Resource not found*/
ERROR_7 = "KAFKAS-MGMT-7",
ERROR_7: string;
/** General validation failure*/
ERROR_8 = "KAFKAS-MGMT-8",
ERROR_8: string;
/** Unspecified error*/
ERROR_9 = "KAFKAS-MGMT-9",
ERROR_9: string;
/** HTTP Method not implemented for this endpoint*/
ERROR_10 = "KAFKAS-MGMT-10",
ERROR_10: string;
/** Account is unauthorized to perform this action*/
ERROR_11 = "KAFKAS-MGMT-11",
ERROR_11: string;
/** Required terms have not been accepted*/
ERROR_12 = "KAFKAS-MGMT-12",
ERROR_12: string;
/** Account authentication could not be verified*/
ERROR_15 = "KAFKAS-MGMT-15",
ERROR_15: string;
/** Unable to read request body*/
ERROR_17 = "KAFKAS-MGMT-17",
ERROR_17: string;
/** Bad request*/
ERROR_21 = "KAFKAS-MGMT-21",
ERROR_21: string;
/** Failed to parse search query*/
ERROR_23 = "KAFKAS-MGMT-23",
ERROR_23: string;
/** The maximum number of allowed kafka instances has been reached*/
ERROR_24 = "KAFKAS-MGMT-24",
ERROR_24: string;
/** Resource gone*/
ERROR_25 = "KAFKAS-MGMT-25",
ERROR_25: string;
/** Provider not supported*/
ERROR_30 = "KAFKAS-MGMT-30",
ERROR_30: string;
/** Region not supported*/
ERROR_31 = "KAFKAS-MGMT-31",
ERROR_31: string;
/** Kafka cluster name is invalid*/
ERROR_32 = "KAFKAS-MGMT-32",
ERROR_32: string;
/** Minimum field length not reached*/
ERROR_33 = "KAFKAS-MGMT-33",
ERROR_33: string;
/** Maximum field length has been depassed*/
ERROR_34 = "KAFKAS-MGMT-34",
ERROR_34: string;
/** Only multiAZ Kafkas are supported, use multi_az=true*/
ERROR_35 = "KAFKAS-MGMT-35",
ERROR_35: string;
/** Kafka cluster name is already used*/
ERROR_36 = "KAFKAS-MGMT-36",
ERROR_36: string;
/** Field validation failed*/
ERROR_37 = "KAFKAS-MGMT-37",
ERROR_37: string;
/** Service account name is invalid*/
ERROR_38 = "KAFKAS-MGMT-38",
ERROR_38: string;
/** Service account desc is invalid*/
ERROR_39 = "KAFKAS-MGMT-39",
ERROR_39: string;
/** Service account id is invalid*/
ERROR_40 = "KAFKAS-MGMT-40",
ERROR_40: string;
/** Instance Type not supported*/
ERROR_41 = "KAFKAS-MGMT-41",
ERROR_41: string;
/** Synchronous action is not supported, use async=true parameter*/
ERROR_103 = "KAFKAS-MGMT-103",
ERROR_103: string;
/** Failed to create kafka client in the mas sso*/
ERROR_106 = "KAFKAS-MGMT-106",
ERROR_106: string;
/** Failed to get kafka client secret from the mas sso*/
ERROR_107 = "KAFKAS-MGMT-107",
ERROR_107: string;
/** Failed to get kafka client from the mas sso*/
ERROR_108 = "KAFKAS-MGMT-108",
ERROR_108: string;
/** Failed to delete kafka client from the mas sso*/
ERROR_109 = "KAFKAS-MGMT-109",
ERROR_109: string;
/** Failed to create service account*/
ERROR_110 = "KAFKAS-MGMT-110",
ERROR_110: string;
/** Failed to get service account*/
ERROR_111 = "KAFKAS-MGMT-111",
ERROR_111: string;
/** Failed to delete service account*/
ERROR_112 = "KAFKAS-MGMT-112",
ERROR_112: string;
/** Failed to find service account*/
ERROR_113 = "KAFKAS-MGMT-113",
ERROR_113: string;
/** Insufficient quota*/
ERROR_120 = "KAFKAS-MGMT-120",
ERROR_120: string;
/** Failed to check quota*/
ERROR_121 = "KAFKAS-MGMT-121",
ERROR_121: string;
/** Too Many requests*/
ERROR_429 = "KAFKAS-MGMT-429",
ERROR_429: string;
/** An unexpected error happened, please check the log of the service for details*/
ERROR_1000 = "KAFKAS-MGMT-1000"
}
ERROR_1000: string;
};

@@ -11,3 +11,3 @@ "use strict";

}).catch((err) => {
if(APIErrorCodes.ERROR_5 == err.code) {
if(APIErrorCodes.ERROR_5 == err.response?.data.code) {
// Handle error

@@ -18,84 +18,83 @@ }

*/
var APIErrorCodes;
(function (APIErrorCodes) {
exports.APIErrorCodes = {
/** Forbidden to perform this action*/
APIErrorCodes["ERROR_4"] = "KAFKAS-MGMT-4";
ERROR_4: "KAFKAS-MGMT-4",
/** Forbidden to create more instances than the maximum allowed*/
APIErrorCodes["ERROR_5"] = "KAFKAS-MGMT-5";
ERROR_5: "KAFKAS-MGMT-5",
/** An entity with the specified unique values already exists*/
APIErrorCodes["ERROR_6"] = "KAFKAS-MGMT-6";
ERROR_6: "KAFKAS-MGMT-6",
/** Resource not found*/
APIErrorCodes["ERROR_7"] = "KAFKAS-MGMT-7";
ERROR_7: "KAFKAS-MGMT-7",
/** General validation failure*/
APIErrorCodes["ERROR_8"] = "KAFKAS-MGMT-8";
ERROR_8: "KAFKAS-MGMT-8",
/** Unspecified error*/
APIErrorCodes["ERROR_9"] = "KAFKAS-MGMT-9";
ERROR_9: "KAFKAS-MGMT-9",
/** HTTP Method not implemented for this endpoint*/
APIErrorCodes["ERROR_10"] = "KAFKAS-MGMT-10";
ERROR_10: "KAFKAS-MGMT-10",
/** Account is unauthorized to perform this action*/
APIErrorCodes["ERROR_11"] = "KAFKAS-MGMT-11";
ERROR_11: "KAFKAS-MGMT-11",
/** Required terms have not been accepted*/
APIErrorCodes["ERROR_12"] = "KAFKAS-MGMT-12";
ERROR_12: "KAFKAS-MGMT-12",
/** Account authentication could not be verified*/
APIErrorCodes["ERROR_15"] = "KAFKAS-MGMT-15";
ERROR_15: "KAFKAS-MGMT-15",
/** Unable to read request body*/
APIErrorCodes["ERROR_17"] = "KAFKAS-MGMT-17";
ERROR_17: "KAFKAS-MGMT-17",
/** Bad request*/
APIErrorCodes["ERROR_21"] = "KAFKAS-MGMT-21";
ERROR_21: "KAFKAS-MGMT-21",
/** Failed to parse search query*/
APIErrorCodes["ERROR_23"] = "KAFKAS-MGMT-23";
ERROR_23: "KAFKAS-MGMT-23",
/** The maximum number of allowed kafka instances has been reached*/
APIErrorCodes["ERROR_24"] = "KAFKAS-MGMT-24";
ERROR_24: "KAFKAS-MGMT-24",
/** Resource gone*/
APIErrorCodes["ERROR_25"] = "KAFKAS-MGMT-25";
ERROR_25: "KAFKAS-MGMT-25",
/** Provider not supported*/
APIErrorCodes["ERROR_30"] = "KAFKAS-MGMT-30";
ERROR_30: "KAFKAS-MGMT-30",
/** Region not supported*/
APIErrorCodes["ERROR_31"] = "KAFKAS-MGMT-31";
ERROR_31: "KAFKAS-MGMT-31",
/** Kafka cluster name is invalid*/
APIErrorCodes["ERROR_32"] = "KAFKAS-MGMT-32";
ERROR_32: "KAFKAS-MGMT-32",
/** Minimum field length not reached*/
APIErrorCodes["ERROR_33"] = "KAFKAS-MGMT-33";
ERROR_33: "KAFKAS-MGMT-33",
/** Maximum field length has been depassed*/
APIErrorCodes["ERROR_34"] = "KAFKAS-MGMT-34";
ERROR_34: "KAFKAS-MGMT-34",
/** Only multiAZ Kafkas are supported, use multi_az=true*/
APIErrorCodes["ERROR_35"] = "KAFKAS-MGMT-35";
ERROR_35: "KAFKAS-MGMT-35",
/** Kafka cluster name is already used*/
APIErrorCodes["ERROR_36"] = "KAFKAS-MGMT-36";
ERROR_36: "KAFKAS-MGMT-36",
/** Field validation failed*/
APIErrorCodes["ERROR_37"] = "KAFKAS-MGMT-37";
ERROR_37: "KAFKAS-MGMT-37",
/** Service account name is invalid*/
APIErrorCodes["ERROR_38"] = "KAFKAS-MGMT-38";
ERROR_38: "KAFKAS-MGMT-38",
/** Service account desc is invalid*/
APIErrorCodes["ERROR_39"] = "KAFKAS-MGMT-39";
ERROR_39: "KAFKAS-MGMT-39",
/** Service account id is invalid*/
APIErrorCodes["ERROR_40"] = "KAFKAS-MGMT-40";
ERROR_40: "KAFKAS-MGMT-40",
/** Instance Type not supported*/
APIErrorCodes["ERROR_41"] = "KAFKAS-MGMT-41";
ERROR_41: "KAFKAS-MGMT-41",
/** Synchronous action is not supported, use async=true parameter*/
APIErrorCodes["ERROR_103"] = "KAFKAS-MGMT-103";
ERROR_103: "KAFKAS-MGMT-103",
/** Failed to create kafka client in the mas sso*/
APIErrorCodes["ERROR_106"] = "KAFKAS-MGMT-106";
ERROR_106: "KAFKAS-MGMT-106",
/** Failed to get kafka client secret from the mas sso*/
APIErrorCodes["ERROR_107"] = "KAFKAS-MGMT-107";
ERROR_107: "KAFKAS-MGMT-107",
/** Failed to get kafka client from the mas sso*/
APIErrorCodes["ERROR_108"] = "KAFKAS-MGMT-108";
ERROR_108: "KAFKAS-MGMT-108",
/** Failed to delete kafka client from the mas sso*/
APIErrorCodes["ERROR_109"] = "KAFKAS-MGMT-109";
ERROR_109: "KAFKAS-MGMT-109",
/** Failed to create service account*/
APIErrorCodes["ERROR_110"] = "KAFKAS-MGMT-110";
ERROR_110: "KAFKAS-MGMT-110",
/** Failed to get service account*/
APIErrorCodes["ERROR_111"] = "KAFKAS-MGMT-111";
ERROR_111: "KAFKAS-MGMT-111",
/** Failed to delete service account*/
APIErrorCodes["ERROR_112"] = "KAFKAS-MGMT-112";
ERROR_112: "KAFKAS-MGMT-112",
/** Failed to find service account*/
APIErrorCodes["ERROR_113"] = "KAFKAS-MGMT-113";
ERROR_113: "KAFKAS-MGMT-113",
/** Insufficient quota*/
APIErrorCodes["ERROR_120"] = "KAFKAS-MGMT-120";
ERROR_120: "KAFKAS-MGMT-120",
/** Failed to check quota*/
APIErrorCodes["ERROR_121"] = "KAFKAS-MGMT-121";
ERROR_121: "KAFKAS-MGMT-121",
/** Too Many requests*/
APIErrorCodes["ERROR_429"] = "KAFKAS-MGMT-429";
ERROR_429: "KAFKAS-MGMT-429",
/** An unexpected error happened, please check the log of the service for details*/
APIErrorCodes["ERROR_1000"] = "KAFKAS-MGMT-1000";
})(APIErrorCodes = exports.APIErrorCodes || (exports.APIErrorCodes = {}));
ERROR_1000: "KAFKAS-MGMT-1000",
};
export * from "./generated";
export * from "./errors";
export * from "./errorHelpers";

@@ -16,1 +16,2 @@ "use strict";

__exportStar(require("./errors"), exports);
__exportStar(require("./errorHelpers"), exports);
{
"name": "@rhoas/kafka-management-sdk",
"version": "0.20.0",
"version": "0.20.1-dev1",
"description": "RHOAS Kafka Management SDK",

@@ -27,8 +27,8 @@ "author": "Red Hat Developers",

"dependencies": {
"axios": "0.24.0"
"axios": "0.25.0"
},
"devDependencies": {
"@types/node": "16.11.20",
"@types/node": "16.11.21",
"typescript": "4.5.4"
}
}

@@ -16,3 +16,3 @@ ## Kafka Management SDK

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

@@ -35,3 +35,5 @@ const accessToken = process.env.CLOUD_API_TOKEN;

.catch((err) => {
console.error(err.message);
if(isServiceApiError(err)){
console.error("Validation issue", getErrorCode(err) == APIErrorCodes.ERROR_8)
}
});

@@ -38,0 +40,0 @@ ```

@@ -9,3 +9,3 @@

}).catch((err) => {
if(APIErrorCodes.ERROR_5 == err.code) {
if(APIErrorCodes.ERROR_5 == err.response?.data.code) {
// Handle error

@@ -16,123 +16,123 @@ }

*/
export enum APIErrorCodes {
export const APIErrorCodes = {
/** Forbidden to perform this action*/
ERROR_4 = "KAFKAS-MGMT-4",
ERROR_4 : "KAFKAS-MGMT-4",
/** Forbidden to create more instances than the maximum allowed*/
ERROR_5 = "KAFKAS-MGMT-5",
ERROR_5 : "KAFKAS-MGMT-5",
/** An entity with the specified unique values already exists*/
ERROR_6 = "KAFKAS-MGMT-6",
ERROR_6 : "KAFKAS-MGMT-6",
/** Resource not found*/
ERROR_7 = "KAFKAS-MGMT-7",
ERROR_7 : "KAFKAS-MGMT-7",
/** General validation failure*/
ERROR_8 = "KAFKAS-MGMT-8",
ERROR_8 : "KAFKAS-MGMT-8",
/** Unspecified error*/
ERROR_9 = "KAFKAS-MGMT-9",
ERROR_9 : "KAFKAS-MGMT-9",
/** HTTP Method not implemented for this endpoint*/
ERROR_10 = "KAFKAS-MGMT-10",
ERROR_10 : "KAFKAS-MGMT-10",
/** Account is unauthorized to perform this action*/
ERROR_11 = "KAFKAS-MGMT-11",
ERROR_11 : "KAFKAS-MGMT-11",
/** Required terms have not been accepted*/
ERROR_12 = "KAFKAS-MGMT-12",
ERROR_12 : "KAFKAS-MGMT-12",
/** Account authentication could not be verified*/
ERROR_15 = "KAFKAS-MGMT-15",
ERROR_15 : "KAFKAS-MGMT-15",
/** Unable to read request body*/
ERROR_17 = "KAFKAS-MGMT-17",
ERROR_17 : "KAFKAS-MGMT-17",
/** Bad request*/
ERROR_21 = "KAFKAS-MGMT-21",
ERROR_21 : "KAFKAS-MGMT-21",
/** Failed to parse search query*/
ERROR_23 = "KAFKAS-MGMT-23",
ERROR_23 : "KAFKAS-MGMT-23",
/** The maximum number of allowed kafka instances has been reached*/
ERROR_24 = "KAFKAS-MGMT-24",
ERROR_24 : "KAFKAS-MGMT-24",
/** Resource gone*/
ERROR_25 = "KAFKAS-MGMT-25",
ERROR_25 : "KAFKAS-MGMT-25",
/** Provider not supported*/
ERROR_30 = "KAFKAS-MGMT-30",
ERROR_30 : "KAFKAS-MGMT-30",
/** Region not supported*/
ERROR_31 = "KAFKAS-MGMT-31",
ERROR_31 : "KAFKAS-MGMT-31",
/** Kafka cluster name is invalid*/
ERROR_32 = "KAFKAS-MGMT-32",
ERROR_32 : "KAFKAS-MGMT-32",
/** Minimum field length not reached*/
ERROR_33 = "KAFKAS-MGMT-33",
ERROR_33 : "KAFKAS-MGMT-33",
/** Maximum field length has been depassed*/
ERROR_34 = "KAFKAS-MGMT-34",
ERROR_34 : "KAFKAS-MGMT-34",
/** Only multiAZ Kafkas are supported, use multi_az=true*/
ERROR_35 = "KAFKAS-MGMT-35",
ERROR_35 : "KAFKAS-MGMT-35",
/** Kafka cluster name is already used*/
ERROR_36 = "KAFKAS-MGMT-36",
ERROR_36 : "KAFKAS-MGMT-36",
/** Field validation failed*/
ERROR_37 = "KAFKAS-MGMT-37",
ERROR_37 : "KAFKAS-MGMT-37",
/** Service account name is invalid*/
ERROR_38 = "KAFKAS-MGMT-38",
ERROR_38 : "KAFKAS-MGMT-38",
/** Service account desc is invalid*/
ERROR_39 = "KAFKAS-MGMT-39",
ERROR_39 : "KAFKAS-MGMT-39",
/** Service account id is invalid*/
ERROR_40 = "KAFKAS-MGMT-40",
ERROR_40 : "KAFKAS-MGMT-40",
/** Instance Type not supported*/
ERROR_41 = "KAFKAS-MGMT-41",
ERROR_41 : "KAFKAS-MGMT-41",
/** Synchronous action is not supported, use async=true parameter*/
ERROR_103 = "KAFKAS-MGMT-103",
ERROR_103 : "KAFKAS-MGMT-103",
/** Failed to create kafka client in the mas sso*/
ERROR_106 = "KAFKAS-MGMT-106",
ERROR_106 : "KAFKAS-MGMT-106",
/** Failed to get kafka client secret from the mas sso*/
ERROR_107 = "KAFKAS-MGMT-107",
ERROR_107 : "KAFKAS-MGMT-107",
/** Failed to get kafka client from the mas sso*/
ERROR_108 = "KAFKAS-MGMT-108",
ERROR_108 : "KAFKAS-MGMT-108",
/** Failed to delete kafka client from the mas sso*/
ERROR_109 = "KAFKAS-MGMT-109",
ERROR_109 : "KAFKAS-MGMT-109",
/** Failed to create service account*/
ERROR_110 = "KAFKAS-MGMT-110",
ERROR_110 : "KAFKAS-MGMT-110",
/** Failed to get service account*/
ERROR_111 = "KAFKAS-MGMT-111",
ERROR_111 : "KAFKAS-MGMT-111",
/** Failed to delete service account*/
ERROR_112 = "KAFKAS-MGMT-112",
ERROR_112 : "KAFKAS-MGMT-112",
/** Failed to find service account*/
ERROR_113 = "KAFKAS-MGMT-113",
ERROR_113 : "KAFKAS-MGMT-113",
/** Insufficient quota*/
ERROR_120 = "KAFKAS-MGMT-120",
ERROR_120 : "KAFKAS-MGMT-120",
/** Failed to check quota*/
ERROR_121 = "KAFKAS-MGMT-121",
ERROR_121 : "KAFKAS-MGMT-121",
/** Too Many requests*/
ERROR_429 = "KAFKAS-MGMT-429",
ERROR_429 : "KAFKAS-MGMT-429",
/** An unexpected error happened, please check the log of the service for details*/
ERROR_1000 = "KAFKAS-MGMT-1000",
ERROR_1000 : "KAFKAS-MGMT-1000",
}
// Export generated API
export * from "./generated"
export * from "./errors";
export * from "./errors";
export * from "./errorHelpers";
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc