New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@swp/ledger-sdk

Package Overview
Dependencies
Maintainers
2
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@swp/ledger-sdk - npm Package Compare versions

Comparing version 0.0.31 to 0.0.32

1

.build/common/constants.d.ts

@@ -6,3 +6,2 @@ export declare const HTTP: {

Signature: string;
BackofficeKey: string;
ContentType: string;

@@ -9,0 +8,0 @@ };

@@ -8,3 +8,2 @@ "use strict";

Signature: "x-swp-signature",
BackofficeKey: "x-swp-back-office-key",
ContentType: "content-type"

@@ -11,0 +10,0 @@ },

@@ -124,3 +124,2 @@ export interface Model<DTO> {

export declare enum WebHookType {
UpdateBoletoStatusToCustomer = "UpdateBoletoStatusToCustomer",
NotifyTransfer = "NotifyTransfer"

@@ -127,0 +126,0 @@ }

@@ -24,5 +24,4 @@ "use strict";

(function (WebHookType) {
WebHookType["UpdateBoletoStatusToCustomer"] = "UpdateBoletoStatusToCustomer";
WebHookType["NotifyTransfer"] = "NotifyTransfer";
})(WebHookType = exports.WebHookType || (exports.WebHookType = {}));
//# sourceMappingURL=dto.js.map

7

.build/common/http/dto.d.ts

@@ -18,7 +18,8 @@ export declare enum ErrorCode {

FieldNotFound = "FIELD_NOT_FOUND",
BoletoInvalidAmount = "BOLETO_INVALID_AMOUNT",
WebHookUrlAlreadyExists = "WEBHOOK_URL_ALREADY_EXISTS",
WebHookAlreadyExists = "WEBHOOK_ALREADY_EXISTS",
WebHookFailureOnReceive = "WEBHOOK_FAILURE_ON_RECEIVE",
WebHookInvalidType = "WEBHOOK_INVALID_TYPE",
AccountAlreadyHasCredential = "ACCOUNT_ALREADY_HAS_CREDENTIAL",
PermissionDenied = "PERMISSION_DENIED"
PermissionDenied = "PERMISSION_DENIED",
InvalidAmount = "INVALID_AMOUNT"
}

@@ -25,0 +26,0 @@ export interface SubError {

@@ -22,8 +22,9 @@ "use strict";

SubErrorCode["FieldNotFound"] = "FIELD_NOT_FOUND";
SubErrorCode["BoletoInvalidAmount"] = "BOLETO_INVALID_AMOUNT";
SubErrorCode["WebHookUrlAlreadyExists"] = "WEBHOOK_URL_ALREADY_EXISTS";
SubErrorCode["WebHookAlreadyExists"] = "WEBHOOK_ALREADY_EXISTS";
SubErrorCode["WebHookFailureOnReceive"] = "WEBHOOK_FAILURE_ON_RECEIVE";
SubErrorCode["WebHookInvalidType"] = "WEBHOOK_INVALID_TYPE";
SubErrorCode["AccountAlreadyHasCredential"] = "ACCOUNT_ALREADY_HAS_CREDENTIAL";
SubErrorCode["PermissionDenied"] = "PERMISSION_DENIED";
SubErrorCode["InvalidAmount"] = "INVALID_AMOUNT";
})(SubErrorCode = exports.SubErrorCode || (exports.SubErrorCode = {}));
//# sourceMappingURL=dto.js.map

@@ -16,6 +16,7 @@ import { ErrorCode, SubError, SwpError, SwpResponse } from "./dto";

export declare const newFieldNotFound: (field: string) => SwpError;
export declare const newWebHookUrlAlreadyExists: () => SwpError;
export declare const newWebHookAlreadyExists: () => SwpError;
export declare const newWebHookInvalidType: () => SwpError;
export declare const newInvalidAmount: () => SwpError;
export declare const newWebHookFailureOnReceive: () => SwpError;
export declare const newNotFound: (subErrors?: SubError[] | undefined) => SwpError;
export declare const newBoletoInvalidAmount: () => SwpError;
export declare const newBatchLimitExceeded: () => SwpError;

@@ -22,0 +23,0 @@ export declare const newAccountAlreadyHasCredential: () => SwpError;

@@ -104,10 +104,26 @@ "use strict";

};
exports.newWebHookUrlAlreadyExists = function () {
exports.newWebHookAlreadyExists = function () {
return exports.newValidationError([
{
code: dto_1.SubErrorCode.WebHookUrlAlreadyExists,
msg: "Já existe um WebHook cadastrado para essa URL",
code: dto_1.SubErrorCode.WebHookAlreadyExists,
msg: "Já existe um WebHook cadastrado para essa Conta",
}
]);
};
exports.newWebHookInvalidType = function () {
return exports.newValidationError([
{
code: dto_1.SubErrorCode.WebHookInvalidType,
msg: "Tipo de WebHook inválido"
}
]);
};
exports.newInvalidAmount = function () {
return exports.newValidationError([
{
code: dto_1.SubErrorCode.InvalidAmount,
msg: "Valor inválido especificado"
}
]);
};
exports.newWebHookFailureOnReceive = function () {

@@ -124,8 +140,2 @@ return exports.newValidationError([

};
exports.newBoletoInvalidAmount = function () {
return exports.newValidationError([{
code: dto_1.SubErrorCode.BoletoInvalidAmount,
msg: "Valor inválido para gerar o Boleto",
}]);
};
exports.newBatchLimitExceeded = function () {

@@ -132,0 +142,0 @@ return exports.newValidationError([{

@@ -167,8 +167,8 @@ "use strict";

});
describe("newWebhookUrlAlreadyExists", function () { return __awaiter(_this, void 0, void 0, function () {
describe("newWebhookAlreadyExists", function () { return __awaiter(_this, void 0, void 0, function () {
return __generator(this, function (_a) {
it("should return correctly", function () {
var error = error_1.newWebHookUrlAlreadyExists();
var error = error_1.newWebHookAlreadyExists();
chai_1.expect(error.code).to.equal(dto_1.ErrorCode.ValidationError);
chai_1.expect(error.subErrors[0].code).to.equal(dto_1.SubErrorCode.WebHookUrlAlreadyExists);
chai_1.expect(error.subErrors[0].code).to.equal(dto_1.SubErrorCode.WebHookAlreadyExists);
chai_1.expect(error.subErrors.length).to.equal(1);

@@ -201,13 +201,2 @@ });

}); });
describe("newBoletoInvalidAmount", function () { return __awaiter(_this, void 0, void 0, function () {
return __generator(this, function (_a) {
it("should return correctly", function () {
var error = error_1.newBoletoInvalidAmount();
chai_1.expect(error.code).to.equal(dto_1.ErrorCode.ValidationError);
chai_1.expect(error.subErrors[0].code).to.equal(dto_1.SubErrorCode.BoletoInvalidAmount);
chai_1.expect(error.subErrors.length).to.equal(1);
});
return [2 /*return*/];
});
}); });
describe("newBatchLimitExceeded", function () { return __awaiter(_this, void 0, void 0, function () {

@@ -214,0 +203,0 @@ return __generator(this, function (_a) {

{
"name": "@swp/ledger-sdk",
"version": "0.0.31",
"version": "0.0.32",
"description": "",

@@ -5,0 +5,0 @@ "private": false,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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