@kushki/js 1.36.0 → 1.37.1
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/package.json +2 -2
- package/lib/types/visa_branding_request.d.ts +0 -10
|
@@ -11,40 +11,33 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
13
|
};
|
|
14
|
-
exports
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.CardAsyncService = void 0;
|
|
16
16
|
/**
|
|
17
17
|
* CardAsync Service file
|
|
18
18
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
const Identifiers_1 = require("./../../lib/constant/Identifiers");
|
|
20
|
+
const inversify_1 = require("inversify");
|
|
21
21
|
require("reflect-metadata");
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
const rxjs_1 = require("rxjs");
|
|
23
|
+
const operators_1 = require("rxjs/operators");
|
|
24
24
|
/**
|
|
25
25
|
* Implementation
|
|
26
26
|
*/
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
let CardAsyncService = class CardAsyncService {
|
|
28
|
+
constructor(gateway) {
|
|
29
29
|
this._gateway = gateway;
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
CardAsyncService = __decorate([
|
|
44
|
-
inversify_1.injectable(),
|
|
45
|
-
__param(0, inversify_1.inject(Identifiers_1.IDENTIFIERS.KushkiGateway)),
|
|
46
|
-
__metadata("design:paramtypes", [Object])
|
|
47
|
-
], CardAsyncService);
|
|
48
|
-
return CardAsyncService;
|
|
49
|
-
}());
|
|
31
|
+
requestCardAsyncToken(request, mid, isTest, regional) {
|
|
32
|
+
return rxjs_1.of(1).pipe(operators_1.switchMap(() => this._gateway.requestCardAsyncToken(request, mid, isTest, regional)));
|
|
33
|
+
}
|
|
34
|
+
requestCardSubscriptionAsyncToken(request, mid, isTest, regional) {
|
|
35
|
+
return rxjs_1.of(1).pipe(operators_1.mergeMap(() => this._gateway.requestSubscriptionCardAsyncToken(request, mid, isTest, regional)));
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
CardAsyncService = __decorate([
|
|
39
|
+
inversify_1.injectable(),
|
|
40
|
+
__param(0, inversify_1.inject(Identifiers_1.IDENTIFIERS.KushkiGateway)),
|
|
41
|
+
__metadata("design:paramtypes", [Object])
|
|
42
|
+
], CardAsyncService);
|
|
50
43
|
exports.CardAsyncService = CardAsyncService;
|
|
@@ -11,69 +11,58 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
13
|
};
|
|
14
|
-
exports
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.CardDynamicService = void 0;
|
|
16
16
|
/**
|
|
17
17
|
* CardDynamic Service
|
|
18
18
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
const Identifiers_1 = require("./../../lib/constant/Identifiers");
|
|
20
|
+
const BinCardTypeEnum_1 = require("./../../lib/infrastructure/BinCardTypeEnum");
|
|
21
|
+
const inversify_1 = require("inversify");
|
|
22
|
+
const rxjs_1 = require("rxjs");
|
|
23
|
+
const operators_1 = require("rxjs/operators");
|
|
24
|
+
const Kushki_1 = require("./../../lib/Kushki");
|
|
25
25
|
/**
|
|
26
26
|
* Implementation
|
|
27
27
|
*/
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
let CardDynamicService = class CardDynamicService {
|
|
29
|
+
constructor(cardService, cardAsyncService) {
|
|
30
30
|
this._cardService = cardService;
|
|
31
31
|
this._cardAsyncService = cardAsyncService;
|
|
32
32
|
}
|
|
33
33
|
// istanbul ignore next
|
|
34
|
-
|
|
35
|
-
var _this = this;
|
|
34
|
+
requestCardDynamicToken(bin, body, mid, testEnv, regional, callback) {
|
|
36
35
|
rxjs_1.of(1)
|
|
37
|
-
.pipe(operators_1.concatMap(
|
|
38
|
-
return _this._cardService.requestBinInfo(bin, mid, testEnv, regional);
|
|
39
|
-
}))
|
|
36
|
+
.pipe(operators_1.concatMap(() => this._cardService.requestBinInfo(bin, mid, testEnv, regional)))
|
|
40
37
|
.subscribe({
|
|
41
|
-
error:
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
next: function (binInfo) {
|
|
38
|
+
error: (err) => Kushki_1.Kushki.callbackError(err, callback),
|
|
39
|
+
next: (binInfo) => {
|
|
45
40
|
if (binInfo.cardType === BinCardTypeEnum_1.BinCardTypeEnum.debit)
|
|
46
|
-
|
|
41
|
+
this._requestCardAsyncToken(body, mid, testEnv, regional, callback);
|
|
47
42
|
else
|
|
48
|
-
|
|
49
|
-
}
|
|
43
|
+
this._requestToken(body, mid, testEnv, regional, callback);
|
|
44
|
+
},
|
|
50
45
|
});
|
|
51
|
-
}
|
|
46
|
+
}
|
|
52
47
|
// istanbul ignore next
|
|
53
|
-
|
|
54
|
-
var _this = this;
|
|
48
|
+
_requestCardAsyncToken(body, mid, testEnv, regional, callback) {
|
|
55
49
|
rxjs_1.of(1)
|
|
56
|
-
.pipe(operators_1.mergeMap(
|
|
57
|
-
return _this._cardAsyncService.requestCardAsyncToken(body, mid, testEnv, regional);
|
|
58
|
-
}))
|
|
50
|
+
.pipe(operators_1.mergeMap(() => this._cardAsyncService.requestCardAsyncToken(body, mid, testEnv, regional)))
|
|
59
51
|
.subscribe({
|
|
60
|
-
error:
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
next: function (token) {
|
|
52
|
+
error: (err) => Kushki_1.Kushki.callbackError(err, callback),
|
|
53
|
+
next: (token) => {
|
|
64
54
|
callback(token);
|
|
65
|
-
}
|
|
55
|
+
},
|
|
66
56
|
});
|
|
67
|
-
}
|
|
68
|
-
|
|
57
|
+
}
|
|
58
|
+
_requestToken(body, mid, testEnv, regional, callback) {
|
|
69
59
|
this._cardService.requestToken(body, mid, testEnv, regional, callback);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}());
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
CardDynamicService = __decorate([
|
|
63
|
+
inversify_1.injectable(),
|
|
64
|
+
__param(0, inversify_1.inject(Identifiers_1.IDENTIFIERS.CardService)),
|
|
65
|
+
__param(1, inversify_1.inject(Identifiers_1.IDENTIFIERS.CardAsyncService)),
|
|
66
|
+
__metadata("design:paramtypes", [Object, Object])
|
|
67
|
+
], CardDynamicService);
|
|
79
68
|
exports.CardDynamicService = CardDynamicService;
|