@swp/ledger-sdk
Advanced tools
Comparing version 0.0.5 to 0.0.6
export declare enum ErrorCode { | ||
Unauthorized = "unauthorized", | ||
InternalServerError = "internal_server_error", | ||
ValidationError = "validation_error", | ||
NotFound = "not_found" | ||
Unauthorized = "UNAUTHORIZED", | ||
InternalServerError = "INTERNAL_SERVER_ERROR", | ||
ValidationError = "BAD_REQUEST_BODY", | ||
NotFound = "NOT_FOUND" | ||
} | ||
export declare enum SubErrorCode { | ||
InvalidToken = "invalid_token", | ||
InvalidId = "invalid_id", | ||
AssetCodeAlreadyExists = "ast_code_already_exists", | ||
TransferFromNotFound = "transfer_from_not_found", | ||
TransferToNotFound = "transfer_to_not_found", | ||
TransferAssetNotFound = "transfer_asset_not_found", | ||
TransferUnderfunded = "transfer_underfunded", | ||
InvalidActionType = "invalid_action_type" | ||
InvalidToken = "INVALID_TOKEN", | ||
InvalidId = "INVALID_ID", | ||
AssetCodeAlreadyExists = "ASSET_CODE_ALREADY_EXISTS", | ||
TransferFromNotFound = "TRANSFER_FROM_NOT_FOUND", | ||
TransferToNotFound = "TRANSFER_TO_NOT_FOUND", | ||
TransferAssetNotFound = "TRANSFER_ASSET_NOT_FOUND", | ||
TransferUnderfunded = "TRANSFER_UNDERFUNDED", | ||
InvalidActionType = "INVALID_ACTION_TYPE", | ||
BatchLimitExceeded = "BATCH_LIMIT_EXCEEDED" | ||
} | ||
@@ -17,0 +18,0 @@ export interface SubError { |
@@ -5,18 +5,19 @@ "use strict"; | ||
(function (ErrorCode) { | ||
ErrorCode["Unauthorized"] = "unauthorized"; | ||
ErrorCode["InternalServerError"] = "internal_server_error"; | ||
ErrorCode["ValidationError"] = "validation_error"; | ||
ErrorCode["NotFound"] = "not_found"; | ||
ErrorCode["Unauthorized"] = "UNAUTHORIZED"; | ||
ErrorCode["InternalServerError"] = "INTERNAL_SERVER_ERROR"; | ||
ErrorCode["ValidationError"] = "BAD_REQUEST_BODY"; | ||
ErrorCode["NotFound"] = "NOT_FOUND"; | ||
})(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {})); | ||
var SubErrorCode; | ||
(function (SubErrorCode) { | ||
SubErrorCode["InvalidToken"] = "invalid_token"; | ||
SubErrorCode["InvalidId"] = "invalid_id"; | ||
SubErrorCode["AssetCodeAlreadyExists"] = "ast_code_already_exists"; | ||
SubErrorCode["TransferFromNotFound"] = "transfer_from_not_found"; | ||
SubErrorCode["TransferToNotFound"] = "transfer_to_not_found"; | ||
SubErrorCode["TransferAssetNotFound"] = "transfer_asset_not_found"; | ||
SubErrorCode["TransferUnderfunded"] = "transfer_underfunded"; | ||
SubErrorCode["InvalidActionType"] = "invalid_action_type"; | ||
SubErrorCode["InvalidToken"] = "INVALID_TOKEN"; | ||
SubErrorCode["InvalidId"] = "INVALID_ID"; | ||
SubErrorCode["AssetCodeAlreadyExists"] = "ASSET_CODE_ALREADY_EXISTS"; | ||
SubErrorCode["TransferFromNotFound"] = "TRANSFER_FROM_NOT_FOUND"; | ||
SubErrorCode["TransferToNotFound"] = "TRANSFER_TO_NOT_FOUND"; | ||
SubErrorCode["TransferAssetNotFound"] = "TRANSFER_ASSET_NOT_FOUND"; | ||
SubErrorCode["TransferUnderfunded"] = "TRANSFER_UNDERFUNDED"; | ||
SubErrorCode["InvalidActionType"] = "INVALID_ACTION_TYPE"; | ||
SubErrorCode["BatchLimitExceeded"] = "BATCH_LIMIT_EXCEEDED"; | ||
})(SubErrorCode = exports.SubErrorCode || (exports.SubErrorCode = {})); | ||
//# sourceMappingURL=dto.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var http2_1 = require("http2"); | ||
var codes_1 = require("./codes"); | ||
function apiResponse(res) { | ||
@@ -15,4 +15,4 @@ return { | ||
status: data | ||
? http2_1.constants.HTTP_STATUS_OK | ||
: http2_1.constants.HTTP_STATUS_NO_CONTENT, | ||
? codes_1.HttpCodes.OK | ||
: codes_1.HttpCodes.NO_CONTENT, | ||
data: (data | ||
@@ -19,0 +19,0 @@ ? (data instanceof Array) |
{ | ||
"name": "@swp/ledger-sdk", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "", | ||
@@ -11,3 +11,4 @@ "private": false, | ||
"build": "tsc", | ||
"prepublishOnly": "npm run build" | ||
"prepublishOnly": "npm run build", | ||
"test": "mocha -r ts-node/register './{,!(node_modules)/**}/*.test.ts'" | ||
}, | ||
@@ -41,6 +42,11 @@ "keywords": [ | ||
"devDependencies": { | ||
"@types/chai": "^4.2.0", | ||
"@types/crypto-js": "^3.1.43", | ||
"@types/jsonwebtoken": "^8.3.3", | ||
"@types/mocha": "^5.2.7", | ||
"@types/node": "^12.7.2", | ||
"@types/jsonwebtoken": "^8.3.3", | ||
"@types/node-fetch": "^2.5.0", | ||
"chai": "^4.2.0", | ||
"mocha": "^6.2.0", | ||
"ts-node": "^8.3.0", | ||
"typescript": "^3.5.3" | ||
@@ -47,0 +53,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 3 instances in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
0
2
81544
10
75
1254
2
0