@kushki/js 1.36.0 → 1.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Kushki.d.ts +17 -2
- package/lib/Kushki.js +132 -113
- package/lib/KushkiInfo.js +11 -14
- package/lib/constant/CreditCardEspecifications.js +2 -2
- package/lib/constant/Identifiers.js +21 -21
- package/lib/gateway/KushkiGateway.js +161 -276
- package/lib/gateway/SiftScience.js +42 -45
- package/lib/generic/AurusError.js +12 -28
- package/lib/generic/KushkiError.js +15 -33
- package/lib/infrastructure/BinCardTypeEnum.js +1 -1
- package/lib/infrastructure/CardBrandsEnum.d.ts +5 -0
- package/lib/infrastructure/CardBrandsEnum.js +8 -0
- package/lib/infrastructure/CognitoErrorEnum.js +1 -1
- package/lib/infrastructure/Container.js +41 -75
- package/lib/infrastructure/EnvironmentEnum.js +1 -1
- package/lib/infrastructure/ErrorEnum.d.ts +2 -1
- package/lib/infrastructure/ErrorEnum.js +42 -37
- package/lib/infrastructure/HeadersEnum.js +1 -1
- package/lib/infrastructure/KPayUserPoolEnum.js +1 -1
- package/lib/infrastructure/KpayPaymentKind.js +1 -1
- package/lib/infrastructure/PathEnum.js +1 -1
- package/lib/infrastructure/PlatformCodeEnum.js +15 -15
- package/lib/infrastructure/SiftScienceEnum.js +1 -1
- package/lib/infrastructure/StatusCodeEnum.js +1 -1
- package/lib/infrastructure/ThreeDSEnum.js +1 -1
- package/lib/infrastructure/VisaBrandingResourceUrlEnum.d.ts +2 -2
- package/lib/infrastructure/VisaBrandingResourceUrlEnum.js +3 -3
- package/lib/lib.js +1 -1
- package/lib/libs/MCSensoryBranding/mastercard-sensory-branding.d.ts +21 -0
- package/lib/libs/MCSensoryBranding/mastercard-sensory-branding.js +781 -0
- package/lib/libs/VisaSensoryBranding/visa-sensory-branding.d.ts +1 -1
- package/lib/libs/VisaSensoryBranding/visa-sensory-branding.js +630 -158
- package/lib/libs/cardinal/prod.js +10 -10
- package/lib/libs/cardinal/staging.js +9 -9
- package/lib/repository/IAntiFraud.js +1 -1
- package/lib/repository/IAuthService.js +1 -1
- package/lib/repository/ICardAsyncService.js +1 -1
- package/lib/repository/ICardDynamicService.js +1 -1
- package/lib/repository/ICardService.js +1 -1
- package/lib/repository/ICardSubscriptionDynamicService.js +1 -1
- package/lib/repository/ICashService.js +1 -1
- package/lib/repository/ICommissionService.js +1 -1
- package/lib/repository/IKPayService.js +1 -1
- package/lib/repository/IKushkiGateway.js +1 -1
- package/lib/repository/IKushkiService.d.ts +9 -2
- package/lib/repository/IKushkiService.js +1 -1
- package/lib/repository/IMobileProcessorService.js +1 -1
- package/lib/repository/IMultiMerchantService.js +1 -1
- package/lib/repository/IPayoutsCashService.js +1 -1
- package/lib/repository/IPayoutsTransferService.js +1 -1
- package/lib/repository/ISecureService.js +1 -1
- package/lib/repository/ISiftScienceService.js +1 -1
- package/lib/repository/ITransferService.js +1 -1
- package/lib/repository/ITransferSubscriptionService.js +1 -1
- package/lib/service/AuthService.js +99 -161
- package/lib/service/CardAsyncService.js +19 -26
- package/lib/service/CardDynamicService.js +32 -43
- package/lib/service/CardService.js +271 -382
- package/lib/service/CardSubscriptionDynamicService.js +31 -40
- package/lib/service/CashService.js +15 -16
- package/lib/service/CommissionService.js +13 -14
- package/lib/service/KPayService.js +19 -23
- package/lib/service/KushkiService.d.ts +2 -1
- package/lib/service/KushkiService.js +48 -33
- package/lib/service/MobileProcessorService.js +59 -70
- package/lib/service/MultiMerchantService.js +13 -14
- package/lib/service/PayoutsCashService.js +15 -16
- package/lib/service/PayoutsTransferService.js +17 -18
- package/lib/service/SecureService.js +13 -14
- package/lib/service/SiftScienceService.js +16 -20
- package/lib/service/TransferService.js +21 -36
- package/lib/service/TransferSubscriptionsService.js +16 -17
- package/lib/service/UtilsService.js +51 -57
- package/lib/types/card_branding_request.d.ts +40 -0
- package/lib/types/visa_branding_request.d.ts +25 -3
- package/package.json +2 -2
|
@@ -2,40 +2,24 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Generic Aurus Error Class resolver
|
|
4
4
|
*/
|
|
5
|
-
|
|
6
|
-
var extendStatics = function (d, b) {
|
|
7
|
-
extendStatics = Object.setPrototypeOf ||
|
|
8
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
9
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
10
|
-
return extendStatics(d, b);
|
|
11
|
-
};
|
|
12
|
-
return function (d, b) {
|
|
13
|
-
extendStatics(d, b);
|
|
14
|
-
function __() { this.constructor = d; }
|
|
15
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
16
|
-
};
|
|
17
|
-
})();
|
|
18
|
-
exports.__esModule = true;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
6
|
exports.AurusError = void 0;
|
|
20
7
|
/**
|
|
21
8
|
* AurusError Generic captured error.
|
|
22
9
|
*/
|
|
23
|
-
|
|
24
|
-
__extends(AurusError, _super);
|
|
10
|
+
class AurusError extends Error {
|
|
25
11
|
// istanbul ignore next
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
Object.setPrototypeOf(
|
|
31
|
-
return _this;
|
|
12
|
+
constructor(code, message) {
|
|
13
|
+
super(`AURUS${code}`) /* istanbul ignore next: TODO: reporter is failing */;
|
|
14
|
+
this.code = code;
|
|
15
|
+
this._message = message;
|
|
16
|
+
Object.setPrototypeOf(this, AurusError.prototype);
|
|
32
17
|
}
|
|
33
|
-
|
|
18
|
+
getMessage() {
|
|
34
19
|
return this._message;
|
|
35
|
-
}
|
|
36
|
-
|
|
20
|
+
}
|
|
21
|
+
getStatusCode() {
|
|
37
22
|
return 400;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
}(Error));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
41
25
|
exports.AurusError = AurusError;
|
|
@@ -1,44 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
|
-
exports.__esModule = true;
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
3
|
exports.KushkiError = void 0;
|
|
17
4
|
/**
|
|
18
5
|
* KushkiError Generic captured error.
|
|
19
6
|
*/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
_this._customMessage = message;
|
|
30
|
-
_this._error = error;
|
|
31
|
-
Object.setPrototypeOf(_this, KushkiError.prototype);
|
|
32
|
-
return _this;
|
|
7
|
+
class KushkiError extends Error {
|
|
8
|
+
constructor(error, message = null) {
|
|
9
|
+
const prefix = "K";
|
|
10
|
+
const code = `${prefix}${error.code.replace("E", "")}`;
|
|
11
|
+
/* istanbul ignore next: TODO: reporter is failing */ super(code);
|
|
12
|
+
this.code = code;
|
|
13
|
+
this._customMessage = message;
|
|
14
|
+
this._error = error;
|
|
15
|
+
Object.setPrototypeOf(this, KushkiError.prototype);
|
|
33
16
|
}
|
|
34
|
-
|
|
17
|
+
getMessage() {
|
|
35
18
|
if (this._customMessage !== null)
|
|
36
19
|
return this._customMessage;
|
|
37
20
|
return this._error.message;
|
|
38
|
-
}
|
|
39
|
-
|
|
21
|
+
}
|
|
22
|
+
getStatusCode() {
|
|
40
23
|
return this._error.statusCode;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
}(Error));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
44
26
|
exports.KushkiError = KushkiError;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CardBrandsEnum = void 0;
|
|
4
|
+
var CardBrandsEnum;
|
|
5
|
+
(function (CardBrandsEnum) {
|
|
6
|
+
CardBrandsEnum["VISA"] = "visa";
|
|
7
|
+
CardBrandsEnum["MASTERCARD"] = "mastercard";
|
|
8
|
+
})(CardBrandsEnum = exports.CardBrandsEnum || (exports.CardBrandsEnum = {}));
|
|
@@ -1,84 +1,50 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
exports
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CONTAINER = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Container
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
7
|
+
const Identifiers_1 = require("./../../lib/constant/Identifiers");
|
|
8
|
+
const KushkiGateway_1 = require("./../../lib/gateway/KushkiGateway");
|
|
9
|
+
const SiftScience_1 = require("./../../lib/gateway/SiftScience");
|
|
10
|
+
const inversify_1 = require("inversify");
|
|
11
|
+
const AuthService_1 = require("./../../lib/service/AuthService");
|
|
12
|
+
const CardAsyncService_1 = require("./../../lib/service/CardAsyncService");
|
|
13
|
+
const CardDynamicService_1 = require("./../../lib/service/CardDynamicService");
|
|
14
|
+
const CardService_1 = require("./../../lib/service/CardService");
|
|
15
|
+
const CardSubscriptionDynamicService_1 = require("./../../lib/service/CardSubscriptionDynamicService");
|
|
16
|
+
const CashService_1 = require("./../../lib/service/CashService");
|
|
17
|
+
const CommissionService_1 = require("./../../lib/service/CommissionService");
|
|
18
|
+
const KPayService_1 = require("./../../lib/service/KPayService");
|
|
19
|
+
const KushkiService_1 = require("./../../lib/service/KushkiService");
|
|
20
|
+
const MobileProcessorService_1 = require("./../../lib/service/MobileProcessorService");
|
|
21
|
+
const MultiMerchantService_1 = require("./../../lib/service/MultiMerchantService");
|
|
22
|
+
const PayoutsCashService_1 = require("./../../lib/service/PayoutsCashService");
|
|
23
|
+
const PayoutsTransferService_1 = require("./../../lib/service/PayoutsTransferService");
|
|
24
|
+
const SecureService_1 = require("./../../lib/service/SecureService");
|
|
25
|
+
const SiftScienceService_1 = require("./../../lib/service/SiftScienceService");
|
|
26
|
+
const TransferService_1 = require("./../../lib/service/TransferService");
|
|
27
|
+
const TransferSubscriptionsService_1 = require("./../../lib/service/TransferSubscriptionsService");
|
|
28
|
+
const CONTAINER = new inversify_1.Container();
|
|
29
29
|
exports.CONTAINER = CONTAINER;
|
|
30
30
|
// Service
|
|
31
|
-
CONTAINER.bind(Identifiers_1.IDENTIFIERS.AuthService).toFactory(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
CONTAINER.bind(Identifiers_1.IDENTIFIERS.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
CONTAINER.bind(Identifiers_1.IDENTIFIERS.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
CONTAINER.bind(Identifiers_1.IDENTIFIERS.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
CONTAINER.bind(Identifiers_1.IDENTIFIERS.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
CONTAINER.bind(Identifiers_1.IDENTIFIERS.
|
|
47
|
-
|
|
48
|
-
}; });
|
|
49
|
-
CONTAINER.bind(Identifiers_1.IDENTIFIERS.KushkiService).toFactory(function (context) { return function (_regional) {
|
|
50
|
-
return new KushkiService_1.KushkiService(context.container.get(Identifiers_1.IDENTIFIERS.KushkiGateway));
|
|
51
|
-
}; });
|
|
52
|
-
CONTAINER.bind(Identifiers_1.IDENTIFIERS.TransferService).toFactory(function (context) { return function (regional) {
|
|
53
|
-
return new TransferService_1.TransferService(context.container.get(Identifiers_1.IDENTIFIERS.KushkiGateway), context.container.get(Identifiers_1.IDENTIFIERS.AntiFraud)(regional));
|
|
54
|
-
}; });
|
|
55
|
-
CONTAINER.bind(Identifiers_1.IDENTIFIERS.SecureService).toFactory(function (context) { return function () {
|
|
56
|
-
return new SecureService_1.SecureService(context.container.get(Identifiers_1.IDENTIFIERS.KushkiGateway));
|
|
57
|
-
}; });
|
|
58
|
-
CONTAINER.bind(Identifiers_1.IDENTIFIERS.MultiMerchantService).toFactory(function (context) { return function () {
|
|
59
|
-
return new MultiMerchantService_1.MultiMerchantService(context.container.get(Identifiers_1.IDENTIFIERS.KushkiGateway));
|
|
60
|
-
}; });
|
|
61
|
-
CONTAINER.bind(Identifiers_1.IDENTIFIERS.CommissionService).toFactory(function (context) { return function () {
|
|
62
|
-
return new CommissionService_1.CommissionService(context.container.get(Identifiers_1.IDENTIFIERS.KushkiGateway));
|
|
63
|
-
}; });
|
|
64
|
-
CONTAINER.bind(Identifiers_1.IDENTIFIERS.CardAsyncService).toFactory(function (context) { return function () {
|
|
65
|
-
return new CardAsyncService_1.CardAsyncService(context.container.get(Identifiers_1.IDENTIFIERS.KushkiGateway));
|
|
66
|
-
}; });
|
|
67
|
-
CONTAINER.bind(Identifiers_1.IDENTIFIERS.PayoutsCashService).toFactory(function (context) { return function (regional) {
|
|
68
|
-
return new PayoutsCashService_1.PayoutsCashService(context.container.get(Identifiers_1.IDENTIFIERS.KushkiGateway), context.container.get(Identifiers_1.IDENTIFIERS.AntiFraud)(regional));
|
|
69
|
-
}; });
|
|
70
|
-
CONTAINER.bind(Identifiers_1.IDENTIFIERS.TransferSubscriptionService).toFactory(function (context) { return function (regional) {
|
|
71
|
-
return new TransferSubscriptionsService_1.TransferSubscriptionsService(context.container.get(Identifiers_1.IDENTIFIERS.AntiFraud)(regional), context.container.get(Identifiers_1.IDENTIFIERS.KushkiGateway));
|
|
72
|
-
}; });
|
|
73
|
-
CONTAINER.bind(Identifiers_1.IDENTIFIERS.PayoutsTransferService).toFactory(function (context) { return function (regional) {
|
|
74
|
-
return new PayoutsTransferService_1.PayoutsTransferService(context.container.get(Identifiers_1.IDENTIFIERS.AntiFraud)(regional), context.container.get(Identifiers_1.IDENTIFIERS.KushkiGateway));
|
|
75
|
-
}; });
|
|
76
|
-
CONTAINER.bind(Identifiers_1.IDENTIFIERS.KPayService).toFactory(function (context) { return function (regional) {
|
|
77
|
-
return new KPayService_1.KPayService(context.container.get(Identifiers_1.IDENTIFIERS.KushkiGateway), context.container.get(Identifiers_1.IDENTIFIERS.AuthService)(regional));
|
|
78
|
-
}; });
|
|
79
|
-
CONTAINER.bind(Identifiers_1.IDENTIFIERS.SiftScienceService).toFactory(function (context) { return function (regional) {
|
|
80
|
-
return new SiftScienceService_1.SiftScienceService(context.container.get(Identifiers_1.IDENTIFIERS.KushkiGateway), context.container.get(Identifiers_1.IDENTIFIERS.AntiFraud)(regional));
|
|
81
|
-
}; });
|
|
31
|
+
CONTAINER.bind(Identifiers_1.IDENTIFIERS.AuthService).toFactory((context) => () => new AuthService_1.AuthService(context.container.get(Identifiers_1.IDENTIFIERS.KushkiGateway)));
|
|
32
|
+
CONTAINER.bind(Identifiers_1.IDENTIFIERS.CardService).toFactory((context) => (regional) => new CardService_1.CardService(context.container.get(Identifiers_1.IDENTIFIERS.KushkiGateway), context.container.get(Identifiers_1.IDENTIFIERS.AuthService)(regional), context.container.get(Identifiers_1.IDENTIFIERS.AntiFraud)(regional)));
|
|
33
|
+
CONTAINER.bind(Identifiers_1.IDENTIFIERS.CashService).toFactory((context) => (regional) => new CashService_1.CashService(context.container.get(Identifiers_1.IDENTIFIERS.KushkiGateway), context.container.get(Identifiers_1.IDENTIFIERS.AntiFraud)(regional)));
|
|
34
|
+
CONTAINER.bind(Identifiers_1.IDENTIFIERS.CardDynamicService).toFactory((context) => () => new CardDynamicService_1.CardDynamicService(context.container.get(Identifiers_1.IDENTIFIERS.CardService)(), context.container.get(Identifiers_1.IDENTIFIERS.CardAsyncService)()));
|
|
35
|
+
CONTAINER.bind(Identifiers_1.IDENTIFIERS.CardSubscriptionDynamicService).toFactory((context) => () => new CardSubscriptionDynamicService_1.CardSubscriptionDynamicService(context.container.get(Identifiers_1.IDENTIFIERS.CardService)(), context.container.get(Identifiers_1.IDENTIFIERS.CardAsyncService)()));
|
|
36
|
+
CONTAINER.bind(Identifiers_1.IDENTIFIERS.MobileProcessorService).toFactory((context) => () => new MobileProcessorService_1.MobileProcessorService(context.container.get(Identifiers_1.IDENTIFIERS.KushkiGateway)));
|
|
37
|
+
CONTAINER.bind(Identifiers_1.IDENTIFIERS.KushkiService).toFactory((context) => (_regional) => new KushkiService_1.KushkiService(context.container.get(Identifiers_1.IDENTIFIERS.KushkiGateway)));
|
|
38
|
+
CONTAINER.bind(Identifiers_1.IDENTIFIERS.TransferService).toFactory((context) => (regional) => new TransferService_1.TransferService(context.container.get(Identifiers_1.IDENTIFIERS.KushkiGateway), context.container.get(Identifiers_1.IDENTIFIERS.AntiFraud)(regional)));
|
|
39
|
+
CONTAINER.bind(Identifiers_1.IDENTIFIERS.SecureService).toFactory((context) => () => new SecureService_1.SecureService(context.container.get(Identifiers_1.IDENTIFIERS.KushkiGateway)));
|
|
40
|
+
CONTAINER.bind(Identifiers_1.IDENTIFIERS.MultiMerchantService).toFactory((context) => () => new MultiMerchantService_1.MultiMerchantService(context.container.get(Identifiers_1.IDENTIFIERS.KushkiGateway)));
|
|
41
|
+
CONTAINER.bind(Identifiers_1.IDENTIFIERS.CommissionService).toFactory((context) => () => new CommissionService_1.CommissionService(context.container.get(Identifiers_1.IDENTIFIERS.KushkiGateway)));
|
|
42
|
+
CONTAINER.bind(Identifiers_1.IDENTIFIERS.CardAsyncService).toFactory((context) => () => new CardAsyncService_1.CardAsyncService(context.container.get(Identifiers_1.IDENTIFIERS.KushkiGateway)));
|
|
43
|
+
CONTAINER.bind(Identifiers_1.IDENTIFIERS.PayoutsCashService).toFactory((context) => (regional) => new PayoutsCashService_1.PayoutsCashService(context.container.get(Identifiers_1.IDENTIFIERS.KushkiGateway), context.container.get(Identifiers_1.IDENTIFIERS.AntiFraud)(regional)));
|
|
44
|
+
CONTAINER.bind(Identifiers_1.IDENTIFIERS.TransferSubscriptionService).toFactory((context) => (regional) => new TransferSubscriptionsService_1.TransferSubscriptionsService(context.container.get(Identifiers_1.IDENTIFIERS.AntiFraud)(regional), context.container.get(Identifiers_1.IDENTIFIERS.KushkiGateway)));
|
|
45
|
+
CONTAINER.bind(Identifiers_1.IDENTIFIERS.PayoutsTransferService).toFactory((context) => (regional) => new PayoutsTransferService_1.PayoutsTransferService(context.container.get(Identifiers_1.IDENTIFIERS.AntiFraud)(regional), context.container.get(Identifiers_1.IDENTIFIERS.KushkiGateway)));
|
|
46
|
+
CONTAINER.bind(Identifiers_1.IDENTIFIERS.KPayService).toFactory((context) => (regional) => new KPayService_1.KPayService(context.container.get(Identifiers_1.IDENTIFIERS.KushkiGateway), context.container.get(Identifiers_1.IDENTIFIERS.AuthService)(regional)));
|
|
47
|
+
CONTAINER.bind(Identifiers_1.IDENTIFIERS.SiftScienceService).toFactory((context) => (regional) => new SiftScienceService_1.SiftScienceService(context.container.get(Identifiers_1.IDENTIFIERS.KushkiGateway), context.container.get(Identifiers_1.IDENTIFIERS.AntiFraud)(regional)));
|
|
82
48
|
// Gateway
|
|
83
49
|
CONTAINER.bind(Identifiers_1.IDENTIFIERS.KushkiGateway).to(KushkiGateway_1.KushkiGateway);
|
|
84
|
-
CONTAINER.bind(Identifiers_1.IDENTIFIERS.AntiFraud).toFactory(
|
|
50
|
+
CONTAINER.bind(Identifiers_1.IDENTIFIERS.AntiFraud).toFactory(() => (regional) => new SiftScience_1.SiftScience(regional));
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
3
|
exports.ERRORS = exports.ErrorCode = void 0;
|
|
5
|
-
|
|
4
|
+
const StatusCodeEnum_1 = require("./../../lib/infrastructure/StatusCodeEnum");
|
|
6
5
|
var ErrorCode;
|
|
7
6
|
(function (ErrorCode) {
|
|
8
7
|
ErrorCode["E001"] = "E001";
|
|
@@ -21,86 +20,92 @@ var ErrorCode;
|
|
|
21
20
|
ErrorCode["E014"] = "E014";
|
|
22
21
|
ErrorCode["E015"] = "E015";
|
|
23
22
|
ErrorCode["E016"] = "E016";
|
|
23
|
+
ErrorCode["E017"] = "E017";
|
|
24
24
|
})(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {}));
|
|
25
|
-
exports.ERRORS =
|
|
26
|
-
|
|
25
|
+
exports.ERRORS = {
|
|
26
|
+
[ErrorCode.E001]: {
|
|
27
27
|
code: ErrorCode.E001,
|
|
28
28
|
message: "El cuerpo de la petición es inválido.",
|
|
29
|
-
statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest
|
|
29
|
+
statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest,
|
|
30
30
|
},
|
|
31
|
-
|
|
31
|
+
[ErrorCode.E002]: {
|
|
32
32
|
code: ErrorCode.E002,
|
|
33
33
|
message: "Ha ocurrido un error inesperado.",
|
|
34
|
-
statusCode: StatusCodeEnum_1.StatusCodeEnum.InternalServerError
|
|
34
|
+
statusCode: StatusCodeEnum_1.StatusCodeEnum.InternalServerError,
|
|
35
35
|
},
|
|
36
|
-
|
|
36
|
+
[ErrorCode.E003]: {
|
|
37
37
|
code: ErrorCode.E003,
|
|
38
38
|
message: "La tarjeta no permite realizar pagos diferidos.",
|
|
39
|
-
statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest
|
|
39
|
+
statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest,
|
|
40
40
|
},
|
|
41
|
-
|
|
41
|
+
[ErrorCode.E004]: {
|
|
42
42
|
code: ErrorCode.E004,
|
|
43
43
|
message: "Id de comercio no válido.",
|
|
44
|
-
statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest
|
|
44
|
+
statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest,
|
|
45
45
|
},
|
|
46
|
-
|
|
46
|
+
[ErrorCode.E005]: {
|
|
47
47
|
code: ErrorCode.E005,
|
|
48
48
|
message: "El número de tarjeta no es válido.",
|
|
49
|
-
statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest
|
|
49
|
+
statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest,
|
|
50
50
|
},
|
|
51
|
-
|
|
51
|
+
[ErrorCode.E006]: {
|
|
52
52
|
code: ErrorCode.E006,
|
|
53
53
|
message: "Error de validación apple pay.",
|
|
54
|
-
statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest
|
|
54
|
+
statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest,
|
|
55
55
|
},
|
|
56
|
-
|
|
56
|
+
[ErrorCode.E007]: {
|
|
57
57
|
code: ErrorCode.E007,
|
|
58
58
|
message: "Error al iniciar sesión.",
|
|
59
|
-
statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest
|
|
59
|
+
statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest,
|
|
60
60
|
},
|
|
61
|
-
|
|
61
|
+
[ErrorCode.E008]: {
|
|
62
62
|
code: ErrorCode.E008,
|
|
63
63
|
message: "Código incorrecto, ingresar nuevamente.",
|
|
64
|
-
statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest
|
|
64
|
+
statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest,
|
|
65
65
|
},
|
|
66
|
-
|
|
66
|
+
[ErrorCode.E009]: {
|
|
67
67
|
code: ErrorCode.E009,
|
|
68
68
|
message: "Error al validar sesión.",
|
|
69
|
-
statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest
|
|
69
|
+
statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest,
|
|
70
70
|
},
|
|
71
|
-
|
|
71
|
+
[ErrorCode.E010]: {
|
|
72
72
|
code: ErrorCode.E010,
|
|
73
73
|
message: "Es necesaria la verificación de autenticación del usuario.",
|
|
74
|
-
statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest
|
|
74
|
+
statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest,
|
|
75
75
|
},
|
|
76
|
-
|
|
76
|
+
[ErrorCode.E011]: {
|
|
77
77
|
code: ErrorCode.E011,
|
|
78
78
|
message: "Sesión no disponible.",
|
|
79
|
-
statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest
|
|
79
|
+
statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest,
|
|
80
80
|
},
|
|
81
|
-
|
|
81
|
+
[ErrorCode.E012]: {
|
|
82
82
|
code: ErrorCode.E012,
|
|
83
83
|
message: "Campos 3DS inválidos",
|
|
84
|
-
statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest
|
|
84
|
+
statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest,
|
|
85
85
|
},
|
|
86
|
-
|
|
86
|
+
[ErrorCode.E013]: {
|
|
87
87
|
code: ErrorCode.E013,
|
|
88
88
|
message: "Comercio no tiene activo 3DS",
|
|
89
|
-
statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest
|
|
89
|
+
statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest,
|
|
90
90
|
},
|
|
91
|
-
|
|
91
|
+
[ErrorCode.E014]: {
|
|
92
92
|
code: ErrorCode.E014,
|
|
93
93
|
message: "Longitud de tarjeta inválida",
|
|
94
|
-
statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest
|
|
94
|
+
statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest,
|
|
95
95
|
},
|
|
96
|
-
|
|
96
|
+
[ErrorCode.E015]: {
|
|
97
97
|
code: ErrorCode.E015,
|
|
98
98
|
message: "Configuración de credenciales Sift inválidas",
|
|
99
|
-
statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest
|
|
99
|
+
statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest,
|
|
100
100
|
},
|
|
101
|
-
|
|
101
|
+
[ErrorCode.E016]: {
|
|
102
102
|
code: ErrorCode.E016,
|
|
103
103
|
message: "Error al generar animación.",
|
|
104
|
-
statusCode: StatusCodeEnum_1.StatusCodeEnum.InternalServerError
|
|
104
|
+
statusCode: StatusCodeEnum_1.StatusCodeEnum.InternalServerError,
|
|
105
105
|
},
|
|
106
|
-
|
|
106
|
+
[ErrorCode.E017]: {
|
|
107
|
+
code: ErrorCode.E017,
|
|
108
|
+
message: "Marca de tarjeta inválida.",
|
|
109
|
+
statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest,
|
|
110
|
+
},
|
|
111
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
exports
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PLATFORMS = exports.PlatformCodeEnum = void 0;
|
|
4
4
|
var PlatformCodeEnum;
|
|
5
5
|
(function (PlatformCodeEnum) {
|
|
@@ -20,54 +20,54 @@ var PlatformCodeEnum;
|
|
|
20
20
|
exports.PLATFORMS = {
|
|
21
21
|
KP001: {
|
|
22
22
|
platformId: "KP001",
|
|
23
|
-
platformName: "API"
|
|
23
|
+
platformName: "API",
|
|
24
24
|
},
|
|
25
25
|
KP002: {
|
|
26
26
|
platformId: "KP002",
|
|
27
|
-
platformName: "KUSHKIJS"
|
|
27
|
+
platformName: "KUSHKIJS",
|
|
28
28
|
},
|
|
29
29
|
KP003: {
|
|
30
30
|
platformId: "KP003",
|
|
31
|
-
platformName: "ANDROID"
|
|
31
|
+
platformName: "ANDROID",
|
|
32
32
|
},
|
|
33
33
|
KP004: {
|
|
34
34
|
platformId: "KP004",
|
|
35
|
-
platformName: "IOS"
|
|
35
|
+
platformName: "IOS",
|
|
36
36
|
},
|
|
37
37
|
KP005: {
|
|
38
38
|
platformId: "KP005",
|
|
39
|
-
platformName: "SMARTLINKS"
|
|
39
|
+
platformName: "SMARTLINKS",
|
|
40
40
|
},
|
|
41
41
|
KP006: {
|
|
42
42
|
platformId: "KP006",
|
|
43
|
-
platformName: "KAJITA"
|
|
43
|
+
platformName: "KAJITA",
|
|
44
44
|
},
|
|
45
45
|
KP007: {
|
|
46
46
|
platformId: "KP007",
|
|
47
|
-
platformName: "CAJITA"
|
|
47
|
+
platformName: "CAJITA",
|
|
48
48
|
},
|
|
49
49
|
KP008: {
|
|
50
50
|
platformId: "KP008",
|
|
51
|
-
platformName: "VTEX"
|
|
51
|
+
platformName: "VTEX",
|
|
52
52
|
},
|
|
53
53
|
KP009: {
|
|
54
54
|
platformId: "KP009",
|
|
55
|
-
platformName: "MAGENTO"
|
|
55
|
+
platformName: "MAGENTO",
|
|
56
56
|
},
|
|
57
57
|
KP010: {
|
|
58
58
|
platformId: "KP010",
|
|
59
|
-
platformName: "PRESTASHOP"
|
|
59
|
+
platformName: "PRESTASHOP",
|
|
60
60
|
},
|
|
61
61
|
KP011: {
|
|
62
62
|
platformId: "KP011",
|
|
63
|
-
platformName: "WOOCOMERCE"
|
|
63
|
+
platformName: "WOOCOMERCE",
|
|
64
64
|
},
|
|
65
65
|
KP012: {
|
|
66
66
|
platformId: "KP012",
|
|
67
|
-
platformName: "SHOPIFY"
|
|
67
|
+
platformName: "SHOPIFY",
|
|
68
68
|
},
|
|
69
69
|
KP013: {
|
|
70
70
|
platformId: "KP013",
|
|
71
|
-
platformName: "WEBCHECKOUT"
|
|
72
|
-
}
|
|
71
|
+
platformName: "WEBCHECKOUT",
|
|
72
|
+
},
|
|
73
73
|
};
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
* VisaBrandingResourceUrlEnum enum file
|
|
4
4
|
*/
|
|
5
5
|
export declare enum VisaBrandingResourceUrlEnum {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
DEV = "https://kushki-static-dev.s3.amazonaws.com/visa-sensory-branding/v2",
|
|
7
|
+
PROD = "https://kushki-static.s3.amazonaws.com/visa-sensory-branding/v2"
|
|
8
8
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
exports
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VisaBrandingResourceUrlEnum = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* VisaBrandingResourceUrlEnum enum file
|
|
6
6
|
*/
|
|
7
7
|
var VisaBrandingResourceUrlEnum;
|
|
8
8
|
(function (VisaBrandingResourceUrlEnum) {
|
|
9
|
-
VisaBrandingResourceUrlEnum["
|
|
10
|
-
VisaBrandingResourceUrlEnum["
|
|
9
|
+
VisaBrandingResourceUrlEnum["DEV"] = "https://kushki-static-dev.s3.amazonaws.com/visa-sensory-branding/v2";
|
|
10
|
+
VisaBrandingResourceUrlEnum["PROD"] = "https://kushki-static.s3.amazonaws.com/visa-sensory-branding/v2";
|
|
11
11
|
})(VisaBrandingResourceUrlEnum = exports.VisaBrandingResourceUrlEnum || (exports.VisaBrandingResourceUrlEnum = {}));
|
package/lib/lib.js
CHANGED
|
@@ -14,5 +14,5 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
14
14
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
15
|
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
16
16
|
};
|
|
17
|
-
exports
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
__exportStar(require("./Kushki"), exports);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* tslint:disable:all */
|
|
2
|
+
export declare class MCSonic extends HTMLElement {
|
|
3
|
+
constructor();
|
|
4
|
+
connectedCallback(): void;
|
|
5
|
+
disconnectedCallback(): void;
|
|
6
|
+
static get observedAttributes(): string[];
|
|
7
|
+
set type(value: string | null);
|
|
8
|
+
get type(): string | null;
|
|
9
|
+
set clearBackground(value: boolean);
|
|
10
|
+
get clearBackground(): boolean;
|
|
11
|
+
attributeChangedCallback(name: any, oldValue: any, newValue: any): void;
|
|
12
|
+
play(): void;
|
|
13
|
+
_updateRendering(): void;
|
|
14
|
+
_createDOMStructure(): void;
|
|
15
|
+
_loadAudio(): void;
|
|
16
|
+
_playAudio(): void;
|
|
17
|
+
_addStyle(): void;
|
|
18
|
+
_setBackground(): void;
|
|
19
|
+
_resize(): void;
|
|
20
|
+
_updateAnimation(): void;
|
|
21
|
+
}
|