@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.
Files changed (76) hide show
  1. package/lib/Kushki.d.ts +17 -2
  2. package/lib/Kushki.js +132 -113
  3. package/lib/KushkiInfo.js +11 -14
  4. package/lib/constant/CreditCardEspecifications.js +2 -2
  5. package/lib/constant/Identifiers.js +21 -21
  6. package/lib/gateway/KushkiGateway.js +161 -276
  7. package/lib/gateway/SiftScience.js +42 -45
  8. package/lib/generic/AurusError.js +12 -28
  9. package/lib/generic/KushkiError.js +15 -33
  10. package/lib/infrastructure/BinCardTypeEnum.js +1 -1
  11. package/lib/infrastructure/CardBrandsEnum.d.ts +5 -0
  12. package/lib/infrastructure/CardBrandsEnum.js +8 -0
  13. package/lib/infrastructure/CognitoErrorEnum.js +1 -1
  14. package/lib/infrastructure/Container.js +41 -75
  15. package/lib/infrastructure/EnvironmentEnum.js +1 -1
  16. package/lib/infrastructure/ErrorEnum.d.ts +2 -1
  17. package/lib/infrastructure/ErrorEnum.js +42 -37
  18. package/lib/infrastructure/HeadersEnum.js +1 -1
  19. package/lib/infrastructure/KPayUserPoolEnum.js +1 -1
  20. package/lib/infrastructure/KpayPaymentKind.js +1 -1
  21. package/lib/infrastructure/PathEnum.js +1 -1
  22. package/lib/infrastructure/PlatformCodeEnum.js +15 -15
  23. package/lib/infrastructure/SiftScienceEnum.js +1 -1
  24. package/lib/infrastructure/StatusCodeEnum.js +1 -1
  25. package/lib/infrastructure/ThreeDSEnum.js +1 -1
  26. package/lib/infrastructure/VisaBrandingResourceUrlEnum.d.ts +2 -2
  27. package/lib/infrastructure/VisaBrandingResourceUrlEnum.js +3 -3
  28. package/lib/lib.js +1 -1
  29. package/lib/libs/MCSensoryBranding/mastercard-sensory-branding.d.ts +21 -0
  30. package/lib/libs/MCSensoryBranding/mastercard-sensory-branding.js +781 -0
  31. package/lib/libs/VisaSensoryBranding/visa-sensory-branding.d.ts +1 -1
  32. package/lib/libs/VisaSensoryBranding/visa-sensory-branding.js +630 -158
  33. package/lib/libs/cardinal/prod.js +10 -10
  34. package/lib/libs/cardinal/staging.js +9 -9
  35. package/lib/repository/IAntiFraud.js +1 -1
  36. package/lib/repository/IAuthService.js +1 -1
  37. package/lib/repository/ICardAsyncService.js +1 -1
  38. package/lib/repository/ICardDynamicService.js +1 -1
  39. package/lib/repository/ICardService.js +1 -1
  40. package/lib/repository/ICardSubscriptionDynamicService.js +1 -1
  41. package/lib/repository/ICashService.js +1 -1
  42. package/lib/repository/ICommissionService.js +1 -1
  43. package/lib/repository/IKPayService.js +1 -1
  44. package/lib/repository/IKushkiGateway.js +1 -1
  45. package/lib/repository/IKushkiService.d.ts +9 -2
  46. package/lib/repository/IKushkiService.js +1 -1
  47. package/lib/repository/IMobileProcessorService.js +1 -1
  48. package/lib/repository/IMultiMerchantService.js +1 -1
  49. package/lib/repository/IPayoutsCashService.js +1 -1
  50. package/lib/repository/IPayoutsTransferService.js +1 -1
  51. package/lib/repository/ISecureService.js +1 -1
  52. package/lib/repository/ISiftScienceService.js +1 -1
  53. package/lib/repository/ITransferService.js +1 -1
  54. package/lib/repository/ITransferSubscriptionService.js +1 -1
  55. package/lib/service/AuthService.js +99 -161
  56. package/lib/service/CardAsyncService.js +19 -26
  57. package/lib/service/CardDynamicService.js +32 -43
  58. package/lib/service/CardService.js +271 -382
  59. package/lib/service/CardSubscriptionDynamicService.js +31 -40
  60. package/lib/service/CashService.js +15 -16
  61. package/lib/service/CommissionService.js +13 -14
  62. package/lib/service/KPayService.js +19 -23
  63. package/lib/service/KushkiService.d.ts +2 -1
  64. package/lib/service/KushkiService.js +48 -33
  65. package/lib/service/MobileProcessorService.js +59 -70
  66. package/lib/service/MultiMerchantService.js +13 -14
  67. package/lib/service/PayoutsCashService.js +15 -16
  68. package/lib/service/PayoutsTransferService.js +17 -18
  69. package/lib/service/SecureService.js +13 -14
  70. package/lib/service/SiftScienceService.js +16 -20
  71. package/lib/service/TransferService.js +21 -36
  72. package/lib/service/TransferSubscriptionsService.js +16 -17
  73. package/lib/service/UtilsService.js +51 -57
  74. package/lib/types/card_branding_request.d.ts +40 -0
  75. package/package.json +2 -2
  76. 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.__esModule = true;
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.CardAsyncService = void 0;
16
16
  /**
17
17
  * CardAsync Service file
18
18
  */
19
- var Identifiers_1 = require("./../../lib/constant/Identifiers");
20
- var inversify_1 = require("inversify");
19
+ const Identifiers_1 = require("./../../lib/constant/Identifiers");
20
+ const inversify_1 = require("inversify");
21
21
  require("reflect-metadata");
22
- var rxjs_1 = require("rxjs");
23
- var operators_1 = require("rxjs/operators");
22
+ const rxjs_1 = require("rxjs");
23
+ const operators_1 = require("rxjs/operators");
24
24
  /**
25
25
  * Implementation
26
26
  */
27
- var CardAsyncService = /** @class */ (function () {
28
- function CardAsyncService(gateway) {
27
+ let CardAsyncService = class CardAsyncService {
28
+ constructor(gateway) {
29
29
  this._gateway = gateway;
30
30
  }
31
- CardAsyncService.prototype.requestCardAsyncToken = function (request, mid, isTest, regional) {
32
- var _this = this;
33
- return rxjs_1.of(1).pipe(operators_1.switchMap(function () {
34
- return _this._gateway.requestCardAsyncToken(request, mid, isTest, regional);
35
- }));
36
- };
37
- CardAsyncService.prototype.requestCardSubscriptionAsyncToken = function (request, mid, isTest, regional) {
38
- var _this = this;
39
- return rxjs_1.of(1).pipe(operators_1.mergeMap(function () {
40
- return _this._gateway.requestSubscriptionCardAsyncToken(request, mid, isTest, regional);
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.__esModule = true;
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.CardDynamicService = void 0;
16
16
  /**
17
17
  * CardDynamic Service
18
18
  */
19
- var Identifiers_1 = require("./../../lib/constant/Identifiers");
20
- var BinCardTypeEnum_1 = require("./../../lib/infrastructure/BinCardTypeEnum");
21
- var inversify_1 = require("inversify");
22
- var rxjs_1 = require("rxjs");
23
- var operators_1 = require("rxjs/operators");
24
- var Kushki_1 = require("./../../lib/Kushki");
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
- var CardDynamicService = /** @class */ (function () {
29
- function CardDynamicService(cardService, cardAsyncService) {
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
- CardDynamicService.prototype.requestCardDynamicToken = function (bin, body, mid, testEnv, regional, callback) {
35
- var _this = this;
34
+ requestCardDynamicToken(bin, body, mid, testEnv, regional, callback) {
36
35
  rxjs_1.of(1)
37
- .pipe(operators_1.concatMap(function () {
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: function (err) {
42
- return Kushki_1.Kushki.callbackError(err, callback);
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
- _this._requestCardAsyncToken(body, mid, testEnv, regional, callback);
41
+ this._requestCardAsyncToken(body, mid, testEnv, regional, callback);
47
42
  else
48
- _this._requestToken(body, mid, testEnv, regional, callback);
49
- }
43
+ this._requestToken(body, mid, testEnv, regional, callback);
44
+ },
50
45
  });
51
- };
46
+ }
52
47
  // istanbul ignore next
53
- CardDynamicService.prototype._requestCardAsyncToken = function (body, mid, testEnv, regional, callback) {
54
- var _this = this;
48
+ _requestCardAsyncToken(body, mid, testEnv, regional, callback) {
55
49
  rxjs_1.of(1)
56
- .pipe(operators_1.mergeMap(function () {
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: function (err) {
61
- return Kushki_1.Kushki.callbackError(err, callback);
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
- CardDynamicService.prototype._requestToken = function (body, mid, testEnv, regional, callback) {
57
+ }
58
+ _requestToken(body, mid, testEnv, regional, callback) {
69
59
  this._cardService.requestToken(body, mid, testEnv, regional, callback);
70
- };
71
- CardDynamicService = __decorate([
72
- inversify_1.injectable(),
73
- __param(0, inversify_1.inject(Identifiers_1.IDENTIFIERS.CardService)),
74
- __param(1, inversify_1.inject(Identifiers_1.IDENTIFIERS.CardAsyncService)),
75
- __metadata("design:paramtypes", [Object, Object])
76
- ], CardDynamicService);
77
- return CardDynamicService;
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;