@kushki/js 1.29.0-alpha.13215.7 → 1.29.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.
Files changed (37) hide show
  1. package/lib/Kushki.d.ts +6 -0
  2. package/lib/Kushki.js +7 -0
  3. package/lib/constant/CreditCardEspecifications.d.ts +1 -0
  4. package/lib/constant/CreditCardEspecifications.js +1 -0
  5. package/lib/constant/Identifiers.d.ts +1 -0
  6. package/lib/constant/Identifiers.js +1 -0
  7. package/lib/gateway/KushkiGateway.d.ts +2 -0
  8. package/lib/gateway/KushkiGateway.js +12 -0
  9. package/lib/gateway/SiftScience.d.ts +5 -1
  10. package/lib/gateway/SiftScience.js +36 -12
  11. package/lib/infrastructure/Container.js +4 -0
  12. package/lib/infrastructure/EnvironmentEnum.d.ts +1 -1
  13. package/lib/infrastructure/EnvironmentEnum.js +1 -1
  14. package/lib/infrastructure/ErrorEnum.d.ts +4 -1
  15. package/lib/infrastructure/ErrorEnum.js +18 -0
  16. package/lib/infrastructure/PathEnum.d.ts +2 -1
  17. package/lib/infrastructure/PathEnum.js +1 -0
  18. package/lib/repository/IAntiFraud.d.ts +3 -1
  19. package/lib/repository/ICardService.d.ts +10 -0
  20. package/lib/repository/IKushkiGateway.d.ts +9 -0
  21. package/lib/repository/ISiftScienceService.d.ts +16 -0
  22. package/lib/repository/ISiftScienceService.js +2 -0
  23. package/lib/service/CardService.d.ts +6 -0
  24. package/lib/service/CardService.js +42 -7
  25. package/lib/service/SiftScienceService.d.ts +16 -0
  26. package/lib/service/SiftScienceService.js +47 -0
  27. package/lib/service/UtilsService.d.ts +1 -0
  28. package/lib/service/UtilsService.js +6 -1
  29. package/lib/types/cash_token_request.d.ts +16 -100
  30. package/lib/types/get_user_id.d.ts +6 -0
  31. package/lib/types/get_user_id_response.d.ts +6 -0
  32. package/lib/types/secure_init_request.d.ts +8 -0
  33. package/lib/types/secure_init_response.d.ts +6 -0
  34. package/lib/types/sift_science_session.d.ts +6 -0
  35. package/lib/types/subscription_token_kpay_request.d.ts +1 -1
  36. package/lib/types/token_kpay_request.d.ts +1 -1
  37. package/package.json +1 -1
package/lib/Kushki.d.ts CHANGED
@@ -30,8 +30,11 @@ import { TokenResponse } from "./../lib/types/remote/token_response";
30
30
  import { TransferTokenRequest } from "./../lib/types/remote/transfer_token_request";
31
31
  import { ResponseStatusValidator } from "./../lib/types/response_status_validator";
32
32
  import { SavedPaymentMethodRequest } from "./../lib/types/saved_payment_data_request";
33
+ import { SecureInitRequest } from "./../lib/types/secure_init_request";
34
+ import { SecureInitResponse } from "./../lib/types/secure_init_response";
33
35
  import { SecureOtpRequest } from "./../lib/types/secure_otp_request";
34
36
  import { SecureOtpResponse } from "./../lib/types/secure_otp_response";
37
+ import { SiftScienceAntiFraudSessionResponse } from "./../lib/types/sift_science_session";
35
38
  import { SubscriptionCardAsyncTokenRequest } from "./../lib/types/subscription_card_async_token_request";
36
39
  import { SubscriptionCardAsyncTokenResponse } from "./../lib/types/subscription_card_async_token_response";
37
40
  import { SubscriptionTokenKPayRequest } from "./../lib/types/subscription_token_kpay_request";
@@ -68,12 +71,14 @@ export declare class Kushki {
68
71
  private readonly _authService;
69
72
  private readonly _cardDynamicService;
70
73
  private readonly _cardSubscriptionDynamicService;
74
+ private readonly _siftScience;
71
75
  constructor(body: {
72
76
  merchantId: string;
73
77
  inTestEnvironment?: boolean;
74
78
  regional?: boolean;
75
79
  });
76
80
  requestToken(body: TokenRequest | TokenKPayRequest, callback: (value: TokenResponse | ErrorResponse) => void): void;
81
+ requestInitAntiFraud(userId: string, callback: (value: SiftScienceAntiFraudSessionResponse | ErrorResponse) => void): void;
77
82
  /**
78
83
  * @deprecated use requestDeviceToken instead
79
84
  * @param {Function} body with value
@@ -115,6 +120,7 @@ export declare class Kushki {
115
120
  requestVerifyAuth(body: VerifyAuthRequest, callback: (value: VerifyAuthResponse | ErrorResponse) => void): void;
116
121
  validateSession(callback: (value: ValidateSessionResponse | ErrorResponse) => void): void;
117
122
  requestValidate3DS(body: Validate3DSRequest, callback: (value: Validate3DsResponse | ErrorResponse) => void): void;
123
+ requestSecureInit(body: SecureInitRequest, callback: (value: SecureInitResponse | ErrorResponse) => void): void;
118
124
  static callbackError(err: ErrorResponse | KushkiError | AxiosError, callback: (value: ErrorResponse) => void): void;
119
125
  private _requestBankList;
120
126
  private _requestDeviceToken;
package/lib/Kushki.js CHANGED
@@ -19,6 +19,7 @@ var Kushki = /** @class */ (function () {
19
19
  this._inTestEnvironment = body.inTestEnvironment;
20
20
  this._regional = body.regional;
21
21
  this._cardService = Container_1.CONTAINER.get(Identifiers_1.IDENTIFIERS.CardService)(this._regional);
22
+ this._siftScience = Container_1.CONTAINER.get(Identifiers_1.IDENTIFIERS.SiftScienceService)(this._regional);
22
23
  this._transferService = Container_1.CONTAINER.get(Identifiers_1.IDENTIFIERS.TransferService)(this._regional);
23
24
  this._cashService = Container_1.CONTAINER.get(Identifiers_1.IDENTIFIERS.CashService)(this._regional);
24
25
  this._multiMerchantInfoService = Container_1.CONTAINER.get(Identifiers_1.IDENTIFIERS.MultiMerchantService)(this._regional);
@@ -38,6 +39,9 @@ var Kushki = /** @class */ (function () {
38
39
  Kushki.prototype.requestToken = function (body, callback) {
39
40
  this._resolve(this._cardService.requestToken(body, this._merchantId, this._inTestEnvironment, this._regional), callback);
40
41
  };
42
+ Kushki.prototype.requestInitAntiFraud = function (userId, callback) {
43
+ this._resolve(this._siftScience.requestInitAntiFraud(userId, this._merchantId, this._inTestEnvironment, this._regional), callback);
44
+ };
41
45
  /**
42
46
  * @deprecated use requestDeviceToken instead
43
47
  * @param {Function} body with value
@@ -157,6 +161,9 @@ var Kushki = /** @class */ (function () {
157
161
  Kushki.prototype.requestValidate3DS = function (body, callback) {
158
162
  this._cardService.validate3DS(body, this._merchantId, this._inTestEnvironment, this._regional, callback);
159
163
  };
164
+ Kushki.prototype.requestSecureInit = function (body, callback) {
165
+ this._resolve(this._cardService.requestSecureInit(body, this._merchantId, this._inTestEnvironment, this._regional), callback);
166
+ };
160
167
  Kushki.callbackError = function (err, callback) {
161
168
  if (err instanceof KushkiError_1.KushkiError)
162
169
  callback({
@@ -1,6 +1,7 @@
1
1
  /* tslint:disable:all */
2
2
  export declare type CreditCardEspecificationsType = {
3
3
  cardInitialBinPlace: number;
4
+ cardFinalBinPlaceSift: number;
4
5
  cardFinalBinPlace: number;
5
6
  };
6
7
  export declare const CREDIT_CARD_ESPECIFICATIONS: CreditCardEspecificationsType;
@@ -3,5 +3,6 @@ exports.__esModule = true;
3
3
  exports.CREDIT_CARD_ESPECIFICATIONS = void 0;
4
4
  exports.CREDIT_CARD_ESPECIFICATIONS = {
5
5
  cardFinalBinPlace: 8,
6
+ cardFinalBinPlaceSift: 6,
6
7
  cardInitialBinPlace: 0
7
8
  };
@@ -19,6 +19,7 @@ export declare type containerSymbol = {
19
19
  CommissionService: symbol;
20
20
  TransferSubscriptionService: symbol;
21
21
  PayoutsTransferService: symbol;
22
+ SiftScienceService: symbol;
22
23
  KPayService: symbol;
23
24
  AuthService: symbol;
24
25
  };
@@ -21,6 +21,7 @@ var IDENTIFIERS = {
21
21
  PayoutsCashService: Symbol["for"]("PayoutsCashService"),
22
22
  PayoutsTransferService: Symbol["for"]("PayoutsTransferService"),
23
23
  SecureService: Symbol["for"]("SecureService"),
24
+ SiftScienceService: Symbol["for"]("SiftScienceService"),
24
25
  TransferService: Symbol["for"]("TransferService"),
25
26
  TransferSubscriptionService: Symbol["for"]("TransferSubscriptionsService")
26
27
  };
@@ -9,6 +9,7 @@ import { CardAsyncTokenResponse } from "./../../lib/types/card_async_token_respo
9
9
  import { CashTokenRequest } from "./../../lib/types/cash_token_request";
10
10
  import { DeferredOptionsResponse } from "./../../lib/types/deferred_options_response";
11
11
  import { DeletePaymentMethodRequest } from "./../../lib/types/delete_payment_method_request";
12
+ import { GetUserId } from "./../../lib/types/get_user_id";
12
13
  import { KushkiSubscriptionTokensRequest } from "./../../lib/types/kushki_subscription_tokens_request";
13
14
  import { KushkiTokensRequest } from "./../../lib/types/kushki_tokens_request";
14
15
  import { MerchantSettingsResponse } from "./../../lib/types/merchant_settings_response";
@@ -73,6 +74,7 @@ export declare class KushkiGateway implements IKushkiGateway {
73
74
  deletePaymentMethod(body: DeletePaymentMethodRequest, testEnv: boolean, regional: boolean, mid: string, authorization: string): Observable<boolean>;
74
75
  requestSavedPaymentMethods(body: SavedPaymentMethodRequest, testEnv: boolean, regional: boolean, mid: string): Observable<PaymentDataResponse[]>;
75
76
  cybersourceJwt(mid: string, testEnv: boolean, regional: boolean): Observable<string>;
77
+ getUserId(subscriptionId: string, mid: string, testEnv: boolean, regional: boolean): Observable<GetUserId>;
76
78
  private _assignChannel;
77
79
  private _buildHeader;
78
80
  }
@@ -254,6 +254,18 @@ var KushkiGateway = /** @class */ (function () {
254
254
  return _this.requestGet(PathEnum_1.PathEnum.cybersource_jwt, testEnv, regional, mid);
255
255
  }), operators_1.map(function (response) { return response.jwt; }));
256
256
  };
257
+ KushkiGateway.prototype.getUserId = function (subscriptionId, mid, testEnv, regional) {
258
+ var _this = this;
259
+ return rxjs_1.of(1).pipe(operators_1.map(function () { return "" + PathEnum_1.PathEnum.get_user_id + subscriptionId + "/user"; }), operators_1.concatMap(function (path) {
260
+ var _a;
261
+ return _this.request({}, (_a = {},
262
+ _a[_this._publicHeader] = mid,
263
+ _a[_this._contentHeader] = _this._contentJSON,
264
+ _a), path, testEnv, regional);
265
+ }), operators_1.map(function (response) { return ({
266
+ userId: response.userId
267
+ }); }));
268
+ };
257
269
  KushkiGateway.prototype._assignChannel = function (regional, path) {
258
270
  if (!regional) {
259
271
  this._uatUrl = "" + EnvironmentEnum_1.EnvironmentEnum.uat + path;
@@ -7,6 +7,7 @@ import { IAntiFraud } from "./../../lib/repository/IAntiFraud";
7
7
  import { Observable } from "rxjs";
8
8
  import { MerchantSettingsResponse } from "./../../lib/types/merchant_settings_response";
9
9
  import { SiftScienceObject } from "./../../lib/types/sift_science_object";
10
+ import { SiftScienceAntiFraudSessionResponse } from "./../../lib/types/sift_science_session";
10
11
  /**
11
12
  * Kushki SiftScience Implementation
12
13
  */
@@ -14,6 +15,9 @@ export declare class SiftScience implements IAntiFraud {
14
15
  private readonly _siftProperty;
15
16
  private _sift;
16
17
  constructor(regional: boolean);
17
- createSiftScienceSession(processor: string, clientIdentification: string, mid: string, isTest: boolean, merchantSettingsResponse: MerchantSettingsResponse): Observable<SiftScienceObject>;
18
+ createSiftScienceSession(processor: string, clientIdentification: string, mid: string, isTest: boolean, merchantSettingsResponse: MerchantSettingsResponse, userId?: string): Observable<SiftScienceObject>;
19
+ createSiftScienceAntiFraudSession(userId: string, mid: string, isTest: boolean, merchantSettingsResponse: MerchantSettingsResponse): Observable<SiftScienceAntiFraudSessionResponse>;
20
+ private _validateMerchantSettings;
21
+ private _setSiftProperties;
18
22
  private _initSiftScience;
19
23
  }
@@ -13,6 +13,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
13
13
  };
14
14
  exports.__esModule = true;
15
15
  exports.SiftScience = void 0;
16
+ var KushkiError_1 = require("./../../lib/generic/KushkiError");
17
+ var ErrorEnum_1 = require("./../../lib/infrastructure/ErrorEnum");
16
18
  var SiftScienceEnum_1 = require("./../../lib/infrastructure/SiftScienceEnum");
17
19
  var inversify_1 = require("inversify");
18
20
  require("reflect-metadata");
@@ -29,34 +31,56 @@ var SiftScience = /** @class */ (function () {
29
31
  this._sift = [];
30
32
  this._initSiftScience(regional);
31
33
  }
32
- SiftScience.prototype.createSiftScienceSession = function (processor, clientIdentification, mid, isTest, merchantSettingsResponse) {
34
+ SiftScience.prototype.createSiftScienceSession = function (processor, clientIdentification, mid, isTest, merchantSettingsResponse, userId) {
33
35
  var _this = this;
34
36
  return rxjs_1.of(merchantSettingsResponse).pipe(operators_1.map(function (merchantSettings) {
35
37
  var sift_environment = isTest
36
38
  ? SiftScienceEnum_1.SiftScienceEnum.siftScienceTest
37
39
  : SiftScienceEnum_1.SiftScienceEnum.siftScienceProd;
38
- if (merchantSettings[sift_environment] === "" ||
39
- merchantSettings[sift_environment] === null)
40
+ if (_this._validateMerchantSettings(sift_environment, merchantSettings))
40
41
  return {
41
42
  sessionId: null,
42
43
  userId: null
43
44
  };
44
- var user_id = "" + mid + processor + clientIdentification;
45
+ var user_id = userId || "" + mid + processor + clientIdentification;
45
46
  var session_id = uuid_1.v4();
46
- _this._sift =
47
- window[_this._siftProperty] === undefined
48
- ? []
49
- : window[_this._siftProperty];
50
- _this._sift.push(["_setAccount", merchantSettings[sift_environment]]);
51
- _this._sift.push(["_setUserId", user_id]);
52
- _this._sift.push(["_setSessionId", session_id]);
53
- _this._sift.push(["_trackPageview"]);
47
+ _this._setSiftProperties(merchantSettings, sift_environment, user_id, session_id);
54
48
  return {
55
49
  sessionId: session_id,
56
50
  userId: user_id
57
51
  };
58
52
  }));
59
53
  };
54
+ SiftScience.prototype.createSiftScienceAntiFraudSession = function (userId, mid, isTest, merchantSettingsResponse) {
55
+ var _this = this;
56
+ return rxjs_1.of(merchantSettingsResponse).pipe(operators_1.map(function (merchantSettings) {
57
+ var sift_environment = isTest
58
+ ? SiftScienceEnum_1.SiftScienceEnum.siftScienceTest
59
+ : SiftScienceEnum_1.SiftScienceEnum.siftScienceProd;
60
+ if (_this._validateMerchantSettings(sift_environment, merchantSettings))
61
+ throw new KushkiError_1.KushkiError(ErrorEnum_1.ERRORS.E013);
62
+ var user_id = "" + userId + mid;
63
+ var session_id = uuid_1.v4();
64
+ _this._setSiftProperties(merchantSettings, sift_environment, user_id, session_id);
65
+ return {
66
+ sessionId: session_id
67
+ };
68
+ }));
69
+ };
70
+ SiftScience.prototype._validateMerchantSettings = function (siftEnvironment, merchantSettings) {
71
+ return (merchantSettings[siftEnvironment] === "" ||
72
+ merchantSettings[siftEnvironment] === null);
73
+ };
74
+ SiftScience.prototype._setSiftProperties = function (merchantSettings, siftEnvironment, userId, sessionId) {
75
+ this._sift =
76
+ window[this._siftProperty] === undefined
77
+ ? []
78
+ : window[this._siftProperty];
79
+ this._sift.push(["_setAccount", merchantSettings[siftEnvironment]]);
80
+ this._sift.push(["_setUserId", userId]);
81
+ this._sift.push(["_setSessionId", sessionId]);
82
+ this._sift.push(["_trackPageview"]);
83
+ };
60
84
  SiftScience.prototype._initSiftScience = function (regional) {
61
85
  try {
62
86
  if (!UtilsService_1.UtilsService.sIsEmpty(window)) {
@@ -22,6 +22,7 @@ var MultiMerchantService_1 = require("./../../lib/service/MultiMerchantService")
22
22
  var PayoutsCashService_1 = require("./../../lib/service/PayoutsCashService");
23
23
  var PayoutsTransferService_1 = require("./../../lib/service/PayoutsTransferService");
24
24
  var SecureService_1 = require("./../../lib/service/SecureService");
25
+ var SiftScienceService_1 = require("./../../lib/service/SiftScienceService");
25
26
  var TransferService_1 = require("./../../lib/service/TransferService");
26
27
  var TransferSubscriptionsService_1 = require("./../../lib/service/TransferSubscriptionsService");
27
28
  var CONTAINER = new inversify_1.Container();
@@ -75,6 +76,9 @@ CONTAINER.bind(Identifiers_1.IDENTIFIERS.PayoutsTransferService).toFactory(funct
75
76
  CONTAINER.bind(Identifiers_1.IDENTIFIERS.KPayService).toFactory(function (context) { return function (regional) {
76
77
  return new KPayService_1.KPayService(context.container.get(Identifiers_1.IDENTIFIERS.KushkiGateway), context.container.get(Identifiers_1.IDENTIFIERS.AuthService)(regional));
77
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
+ }; });
78
82
  // Gateway
79
83
  CONTAINER.bind(Identifiers_1.IDENTIFIERS.KushkiGateway).to(KushkiGateway_1.KushkiGateway);
80
84
  CONTAINER.bind(Identifiers_1.IDENTIFIERS.AntiFraud).toFactory(function () { return function (regional) { return new SiftScience_1.SiftScience(regional); }; });
@@ -3,7 +3,7 @@
3
3
  * Environment enum file
4
4
  */
5
5
  export declare enum EnvironmentEnum {
6
- uat = "https://api-qa.kushkipagos.blue/",
6
+ uat = "https://api-uat.kushkipagos.com/",
7
7
  prod = "https://api.kushkipagos.com/",
8
8
  regionalUat = "https://regional-uat.kushkipagos.com/",
9
9
  regionalProd = "https://regional.kushkipagos.com/"
@@ -6,7 +6,7 @@ exports.EnvironmentEnum = void 0;
6
6
  */
7
7
  var EnvironmentEnum;
8
8
  (function (EnvironmentEnum) {
9
- EnvironmentEnum["uat"] = "https://api-qa.kushkipagos.blue/";
9
+ EnvironmentEnum["uat"] = "https://api-uat.kushkipagos.com/";
10
10
  EnvironmentEnum["prod"] = "https://api.kushkipagos.com/";
11
11
  EnvironmentEnum["regionalUat"] = "https://regional-uat.kushkipagos.com/";
12
12
  EnvironmentEnum["regionalProd"] = "https://regional.kushkipagos.com/";
@@ -15,6 +15,9 @@ export declare enum ErrorCode {
15
15
  E009 = "E009",
16
16
  E010 = "E010",
17
17
  E011 = "E011",
18
- E012 = "E012"
18
+ E012 = "E012",
19
+ E013 = "E013",
20
+ E014 = "E014",
21
+ E015 = "E015"
19
22
  }
20
23
  export declare const ERRORS: KushkiErrors;
@@ -17,6 +17,9 @@ var ErrorCode;
17
17
  ErrorCode["E010"] = "E010";
18
18
  ErrorCode["E011"] = "E011";
19
19
  ErrorCode["E012"] = "E012";
20
+ ErrorCode["E013"] = "E013";
21
+ ErrorCode["E014"] = "E014";
22
+ ErrorCode["E015"] = "E015";
20
23
  })(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {}));
21
24
  exports.ERRORS = (_a = {},
22
25
  _a[ErrorCode.E001] = {
@@ -79,4 +82,19 @@ exports.ERRORS = (_a = {},
79
82
  message: "Campos 3DS inválidos",
80
83
  statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest
81
84
  },
85
+ _a[ErrorCode.E013] = {
86
+ code: ErrorCode.E013,
87
+ message: "Comercio no tiene activo 3DS",
88
+ statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest
89
+ },
90
+ _a[ErrorCode.E014] = {
91
+ code: ErrorCode.E014,
92
+ message: "Longitud de tarjeta inválida",
93
+ statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest
94
+ },
95
+ _a[ErrorCode.E015] = {
96
+ code: ErrorCode.E015,
97
+ message: "Configuración de credenciales Sift inválidas",
98
+ statusCode: StatusCodeEnum_1.StatusCodeEnum.BadRequest
99
+ },
82
100
  _a);
@@ -29,5 +29,6 @@ export declare enum PathEnum {
29
29
  cybersource_jwt = "card/v1/authToken",
30
30
  savedPaymentMethods = "/personal-wallet/v1/payment-data/",
31
31
  kpay_delete_payment_method = "personal-wallet/v1/walletSubscription",
32
- kpay_get_saved_payment_methods = "personal-wallet/v1/payment-data"
32
+ kpay_get_saved_payment_methods = "personal-wallet/v1/payment-data",
33
+ get_user_id = "v1/subscriptions/"
33
34
  }
@@ -33,4 +33,5 @@ var PathEnum;
33
33
  PathEnum["savedPaymentMethods"] = "/personal-wallet/v1/payment-data/";
34
34
  PathEnum["kpay_delete_payment_method"] = "personal-wallet/v1/walletSubscription";
35
35
  PathEnum["kpay_get_saved_payment_methods"] = "personal-wallet/v1/payment-data";
36
+ PathEnum["get_user_id"] = "v1/subscriptions/";
36
37
  })(PathEnum = exports.PathEnum || (exports.PathEnum = {}));
@@ -5,9 +5,11 @@
5
5
  import { Observable } from "rxjs";
6
6
  import { MerchantSettingsResponse } from "./../../lib/types/merchant_settings_response";
7
7
  import { SiftScienceObject } from "./../../lib/types/sift_science_object";
8
+ import { SiftScienceAntiFraudSessionResponse } from "./../../lib/types/sift_science_session";
8
9
  export interface IAntiFraud {
9
10
  /**
10
11
  * create anti-fraud identification
11
12
  */
12
- createSiftScienceSession(processor: string, clientIdentification: string, mid: string, isTest: boolean, merchantSettingsResponse: MerchantSettingsResponse): Observable<SiftScienceObject>;
13
+ createSiftScienceSession(processor: string, clientIdentification: string, mid: string, isTest: boolean, merchantSettingsResponse: MerchantSettingsResponse, userId?: string): Observable<SiftScienceObject>;
14
+ createSiftScienceAntiFraudSession(userId: string, mid: string, isTest: boolean, merchantSettingsResponse: MerchantSettingsResponse): Observable<SiftScienceAntiFraudSessionResponse>;
13
15
  }
@@ -8,6 +8,8 @@ import { BinInfoResponse } from "./../../lib/types/bin_info_response";
8
8
  import { ErrorResponse } from "./../../lib/types/error_response";
9
9
  import { IDeferredResponse } from "./../../lib/types/remote/deferred_response";
10
10
  import { TokenResponse } from "./../../lib/types/remote/token_response";
11
+ import { SecureInitRequest } from "./../../lib/types/secure_init_request";
12
+ import { SecureInitResponse } from "./../../lib/types/secure_init_response";
11
13
  import { SubscriptionTokenKPayRequest } from "./../../lib/types/subscription_token_kpay_request";
12
14
  import { SubscriptionTokenRequest } from "./../../lib/types/subscription_token_request";
13
15
  import { SubscriptionIdRequest } from "./../../lib/types/subscriptionId_request";
@@ -66,4 +68,12 @@ export interface ICardService {
66
68
  * @param callback - Define callback function to response
67
69
  */
68
70
  validate3DS(body: Validate3DSRequest, mid: string, isTest: boolean, regional: boolean, callback: (value: Validate3DsResponse | ErrorResponse) => void): void;
71
+ /**
72
+ * requestSecureInit
73
+ * @param body - Card number
74
+ * @param mid - public merchant id
75
+ * @param isTest - is test environment
76
+ * @param regional - Define if endpoint used regional URL
77
+ */
78
+ requestSecureInit(body: SecureInitRequest, mid: string, isTest: boolean, regional: boolean): Observable<SecureInitResponse>;
69
79
  }
@@ -10,6 +10,7 @@ import { CardAsyncTokenResponse } from "./../../lib/types/card_async_token_respo
10
10
  import { CashTokenRequest } from "./../../lib/types/cash_token_request";
11
11
  import { DeferredOptionsResponse } from "./../../lib/types/deferred_options_response";
12
12
  import { DeletePaymentMethodRequest } from "./../../lib/types/delete_payment_method_request";
13
+ import { GetUserId } from "./../../lib/types/get_user_id";
13
14
  import { KushkiSubscriptionTokensRequest } from "./../../lib/types/kushki_subscription_tokens_request";
14
15
  import { KushkiTokensRequest } from "./../../lib/types/kushki_tokens_request";
15
16
  import { MerchantSettingsResponse } from "./../../lib/types/merchant_settings_response";
@@ -161,4 +162,12 @@ export interface IKushkiGateway {
161
162
  * @param regional - Define if endpoint used regional URL
162
163
  */
163
164
  cybersourceJwt(mid: string, testEnv: boolean, regional: boolean): Observable<string>;
165
+ /**
166
+ * Get userId
167
+ * @param subscriptionId subscription id for the request
168
+ * @param mid public credential for request
169
+ * @param testEnv - is test environment
170
+ * @param regional - Define if endpoint used regional URL
171
+ */
172
+ getUserId(subscriptionId: string, mid: string, testEnv: boolean, regional: boolean): Observable<GetUserId>;
164
173
  }
@@ -0,0 +1,16 @@
1
+ /* tslint:disable:all */
2
+ /**
3
+ * Interface Sift Science Service file.
4
+ */
5
+ import { Observable } from "rxjs";
6
+ import { SiftScienceAntiFraudSessionResponse } from "./../../lib/types/sift_science_session";
7
+ export interface ISiftScienceService {
8
+ /**
9
+ * Sift Science session id
10
+ * @param userId - id user
11
+ * @param mid - public merchant id
12
+ * @param isTest - is test environment
13
+ * @param regional - Define if endpoint used regional URL
14
+ */
15
+ requestInitAntiFraud(userId: string, mid: string, isTest: boolean, regional: boolean): Observable<SiftScienceAntiFraudSessionResponse>;
16
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ exports.__esModule = true;
@@ -13,6 +13,8 @@ import { BinInfoResponse } from "./../../lib/types/bin_info_response";
13
13
  import { ErrorResponse } from "./../../lib/types/error_response";
14
14
  import { IDeferredResponse } from "./../../lib/types/remote/deferred_response";
15
15
  import { TokenResponse } from "./../../lib/types/remote/token_response";
16
+ import { SecureInitRequest } from "./../../lib/types/secure_init_request";
17
+ import { SecureInitResponse } from "./../../lib/types/secure_init_response";
16
18
  import { SubscriptionTokenKPayRequest } from "./../../lib/types/subscription_token_kpay_request";
17
19
  import { SubscriptionTokenRequest } from "./../../lib/types/subscription_token_request";
18
20
  import { SubscriptionIdRequest } from "./../../lib/types/subscriptionId_request";
@@ -44,8 +46,11 @@ export declare class CardService implements ICardService {
44
46
  requestDeferred(binBody: BinBody, mid: string, isTest: boolean, regional: boolean): Observable<IDeferredResponse[]>;
45
47
  requestBinInfo(binBody: BinBody, mid: string, isTest: boolean, regional: boolean): Observable<BinInfoResponse>;
46
48
  validate3DS(body: Validate3DSRequest, mid: string, isTest: boolean, regional: boolean, callback: (value: Validate3DsResponse | ErrorResponse) => void): void;
49
+ requestSecureInit(request: SecureInitRequest, mid: string, isTest: boolean, regional: boolean): Observable<SecureInitResponse>;
50
+ private _getMerchantSettings;
47
51
  private _validateParameters;
48
52
  private _getDeviceTokenSiftScienceObject;
53
+ private _createSubscriptionSiftScienceSession;
49
54
  private _checkCardLength;
50
55
  private _getScienceSession;
51
56
  private _checkCurrency;
@@ -61,4 +66,5 @@ export declare class CardService implements ICardService {
61
66
  private _setSandboxEnable;
62
67
  private _initCybersourceSandbox;
63
68
  private _ccaSandbox;
69
+ private _getUserId;
64
70
  }
@@ -136,10 +136,13 @@ var CardService = /** @class */ (function () {
136
136
  };
137
137
  CardService.prototype.requestDeviceToken = function (request, mid, isTest, regional) {
138
138
  var _this = this;
139
- return this._gateway.requestMerchantSettings(mid, isTest, regional).pipe(operators_1.switchMap(function (merchant) {
139
+ return rxjs_1.of(1).pipe(operators_1.switchMap(function () {
140
+ return rxjs_1.forkJoin([_this._gateway.requestMerchantSettings(mid, isTest, regional)]);
141
+ }), operators_1.switchMap(function (_a) {
142
+ var merchant = _a[0];
140
143
  _this._setSandboxEnable(!!merchant.sandboxEnable);
141
144
  return rxjs_1.forkJoin([
142
- _this._getDeviceTokenSiftScienceObject(request, mid, isTest, merchant),
145
+ _this._getDeviceTokenSiftScienceObject(request, mid, isTest, merchant, regional),
143
146
  _this._getCybersourceJwt(merchant, mid, isTest, regional, Object.prototype.hasOwnProperty.call(request, "cardNumber")
144
147
  ? request.cardNumber
145
148
  : undefined),
@@ -223,30 +226,56 @@ var CardService = /** @class */ (function () {
223
226
  });
224
227
  }
225
228
  };
229
+ CardService.prototype.requestSecureInit = function (request, mid, isTest, regional) {
230
+ var _this = this;
231
+ return rxjs_1.of(1).pipe(operators_1.map(function () { return _this._checkCardLength(request, ErrorEnum_1.ErrorCode.E014); }), operators_1.switchMap(function () { return _this._getMerchantSettings(mid, isTest, regional); }), operators_1.switchMap(function (merchantSettings) {
232
+ return rxjs_1.iif(function () { return merchantSettings[_this._3Dsecure] === true; }, rxjs_1.of(merchantSettings), rxjs_1.throwError(new KushkiError_1.KushkiError(ErrorEnum_1.ERRORS.E013)));
233
+ }), operators_1.switchMap(function (merchant) {
234
+ return _this._getCybersourceJwt(merchant, mid, isTest, regional, request.card.number);
235
+ }), operators_1.map(function (jwt) { return ({
236
+ jwt: jwt
237
+ }); }));
238
+ };
239
+ CardService.prototype._getMerchantSettings = function (mid, isTest, regional) {
240
+ var _this = this;
241
+ return this._gateway.requestMerchantSettings(mid, isTest, regional).pipe(operators_1.map(function (merchant) {
242
+ _this._setSandboxEnable(!!merchant.sandboxEnable);
243
+ return merchant;
244
+ }));
245
+ };
226
246
  CardService.prototype._validateParameters = function (body) {
227
247
  return (body.security.acsURL === undefined ||
228
248
  body.security.paReq === undefined ||
229
249
  body.security.authenticationTransactionId === undefined);
230
250
  };
231
- CardService.prototype._getDeviceTokenSiftScienceObject = function (request, mid, isTest, merchant) {
251
+ CardService.prototype._getDeviceTokenSiftScienceObject = function (request, mid, isTest, merchant, regional) {
232
252
  var _this = this;
233
253
  return rxjs_1.of(1).pipe(operators_1.switchMap(function () {
234
254
  return rxjs_1.iif(function () {
235
255
  return request.sessionId !== undefined &&
236
256
  request.sessionId !== null &&
237
257
  (request.userId !== undefined && request.userId !== null);
238
- }, _this._getRequestSiftObject(request.userId, request.sessionId), _this._antiFraud.createSiftScienceSession(request.subscriptionId, "", mid, isTest, merchant));
258
+ }, _this._getRequestSiftObject(request.userId, request.sessionId), _this._createSubscriptionSiftScienceSession(request.subscriptionId, mid, isTest, merchant, regional, request));
259
+ }));
260
+ };
261
+ CardService.prototype._createSubscriptionSiftScienceSession = function (subscriptionId, mid, isTest, merchantSettingsResponse, regional, request) {
262
+ var _this = this;
263
+ return rxjs_1.of(1).pipe(operators_1.switchMap(function () {
264
+ return _this._getUserId(subscriptionId, mid, isTest, regional, request.userId);
265
+ }), operators_1.switchMap(function (getUserIdResponse) {
266
+ return _this._antiFraud.createSiftScienceSession(subscriptionId, "", mid, isTest, merchantSettingsResponse, UtilsService_1.UtilsService.sGet(getUserIdResponse, "userId"));
239
267
  }));
240
268
  };
241
- CardService.prototype._checkCardLength = function (request) {
269
+ CardService.prototype._checkCardLength = function (request, errorCode) {
270
+ if (errorCode === void 0) { errorCode = ErrorEnum_1.ErrorCode.E005; }
242
271
  if (request.card.number.length < 14 || request.card.number.length > 19)
243
- throw new KushkiError_1.KushkiError(ErrorEnum_1.ERRORS.E005);
272
+ throw new KushkiError_1.KushkiError(ErrorEnum_1.ERRORS[errorCode]);
244
273
  };
245
274
  CardService.prototype._getScienceSession = function (request, mid, isTest, merchant) {
246
275
  var _this = this;
247
276
  return rxjs_1.of(1).pipe(operators_1.switchMap(function () {
248
277
  if (request.card && request.card.number !== undefined)
249
- return _this._antiFraud.createSiftScienceSession(UtilsService_1.getBinFromCreditCardNumber(request.card.number), request.card.number.slice(-4), mid, isTest, merchant);
278
+ return _this._antiFraud.createSiftScienceSession(UtilsService_1.getBinFromCreditCardNumberSift(request.card.number), request.card.number.slice(-4), mid, isTest, merchant);
250
279
  return rxjs_1.of({
251
280
  sessionId: null,
252
281
  userId: null
@@ -394,6 +423,12 @@ var CardService = /** @class */ (function () {
394
423
  });
395
424
  }); });
396
425
  };
426
+ CardService.prototype._getUserId = function (subscriptionId, mid, testEnv, regional, userId) {
427
+ var _this = this;
428
+ return rxjs_1.of(1).pipe(operators_1.switchMap(function () {
429
+ return rxjs_1.iif(function () { return UtilsService_1.UtilsService.sIsEmpty(userId); }, _this._gateway.getUserId(subscriptionId, mid, testEnv, regional), rxjs_1.of(undefined));
430
+ }), operators_1.catchError(function () { return rxjs_1.of(undefined); }));
431
+ };
397
432
  var CardService_1;
398
433
  CardService = CardService_1 = __decorate([
399
434
  inversify_1.injectable(),
@@ -0,0 +1,16 @@
1
+ /* tslint:disable:all */
2
+ import "reflect-metadata";
3
+ import { IAntiFraud } from "./../../lib/repository/IAntiFraud";
4
+ import { IKushkiGateway } from "./../../lib/repository/IKushkiGateway";
5
+ import { ISiftScienceService } from "./../../lib/repository/ISiftScienceService";
6
+ import { Observable } from "rxjs";
7
+ import { SiftScienceAntiFraudSessionResponse } from "./../../lib/types/sift_science_session";
8
+ /**
9
+ * Implementation
10
+ */
11
+ export declare class SiftScienceService implements ISiftScienceService {
12
+ private readonly _gateway;
13
+ private readonly _antiFraud;
14
+ constructor(gateway: IKushkiGateway, antiFraud: IAntiFraud);
15
+ requestInitAntiFraud(userId: string, mid: string, isTest: boolean, regional: boolean): Observable<SiftScienceAntiFraudSessionResponse>;
16
+ }
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ exports.__esModule = true;
15
+ exports.SiftScienceService = void 0;
16
+ /**
17
+ * SiftScience Service file
18
+ */
19
+ var Identifiers_1 = require("./../../lib/constant/Identifiers");
20
+ var inversify_1 = require("inversify");
21
+ require("reflect-metadata");
22
+ var operators_1 = require("rxjs/operators");
23
+ /**
24
+ * Implementation
25
+ */
26
+ var SiftScienceService = /** @class */ (function () {
27
+ function SiftScienceService(gateway, antiFraud) {
28
+ this._gateway = gateway;
29
+ this._antiFraud = antiFraud;
30
+ }
31
+ SiftScienceService.prototype.requestInitAntiFraud = function (userId, mid, isTest, regional) {
32
+ var _this = this;
33
+ return this._gateway
34
+ .requestMerchantSettings(mid, isTest, regional)
35
+ .pipe(operators_1.switchMap(function (merchant) {
36
+ return _this._antiFraud.createSiftScienceAntiFraudSession(userId, mid, isTest, merchant);
37
+ }));
38
+ };
39
+ SiftScienceService = __decorate([
40
+ inversify_1.injectable(),
41
+ __param(0, inversify_1.inject(Identifiers_1.IDENTIFIERS.KushkiGateway)),
42
+ __param(1, inversify_1.inject(Identifiers_1.IDENTIFIERS.AntiFraud)),
43
+ __metadata("design:paramtypes", [Object, Object])
44
+ ], SiftScienceService);
45
+ return SiftScienceService;
46
+ }());
47
+ exports.SiftScienceService = SiftScienceService;
@@ -24,3 +24,4 @@ export declare class UtilsService {
24
24
  static sIsEmpty: (obj: any) => boolean;
25
25
  }
26
26
  export declare function getBinFromCreditCardNumber(value: string): string;
27
+ export declare function getBinFromCreditCardNumberSift(value: string): string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  exports.__esModule = true;
3
- exports.getBinFromCreditCardNumber = exports.UtilsService = void 0;
3
+ exports.getBinFromCreditCardNumberSift = exports.getBinFromCreditCardNumber = exports.UtilsService = void 0;
4
4
  /**
5
5
  * UtilsService Class
6
6
  */
@@ -64,3 +64,8 @@ function getBinFromCreditCardNumber(value) {
64
64
  return card_value.slice(CreditCardEspecifications_1.CREDIT_CARD_ESPECIFICATIONS.cardInitialBinPlace, CreditCardEspecifications_1.CREDIT_CARD_ESPECIFICATIONS.cardFinalBinPlace);
65
65
  }
66
66
  exports.getBinFromCreditCardNumber = getBinFromCreditCardNumber;
67
+ function getBinFromCreditCardNumberSift(value) {
68
+ var card_value = value.replace(/\D/g, "");
69
+ return card_value.slice(CreditCardEspecifications_1.CREDIT_CARD_ESPECIFICATIONS.cardInitialBinPlace, CreditCardEspecifications_1.CREDIT_CARD_ESPECIFICATIONS.cardFinalBinPlaceSift);
70
+ }
71
+ exports.getBinFromCreditCardNumberSift = getBinFromCreditCardNumberSift;
@@ -1,18 +1,7 @@
1
1
  /* tslint:disable:all */
2
2
  /* tslint:disable:all */
3
3
 
4
- export type CashTokenRequest =
5
- | PeruvianTokenRequest
6
- | BrazilianTokenRequest
7
- | MexicanTokenRequest
8
- | ColombianTokenRequest
9
- | CostaRicanTokenRequest
10
- | GuatemalanTokenRequest
11
- | PanamanianRequest
12
- | NicaraguanRequest
13
- | HonduranRequest
14
- | SalvadoranRequest
15
- | GenericTokenRequest;
4
+ export type CashTokenRequest = GenericTokenRequest | PeruvianTokenRequest | BrazilianTokenRequest | MexicanTokenRequest;
16
5
  export type Name = string;
17
6
  export type LastName = string;
18
7
  export type Identification = string;
@@ -20,6 +9,18 @@ export type TotalAmount = number;
20
9
  export type Email = string;
21
10
  export type Description = string;
22
11
 
12
+ export interface GenericTokenRequest {
13
+ name: Name;
14
+ lastName: LastName;
15
+ identification: Identification;
16
+ totalAmount: TotalAmount;
17
+ email?: Email;
18
+ description?: Description;
19
+ currency: "COP" | "USD" | "CLP" | "CRC" | "UF";
20
+ documentType?: "CC" | "NIT" | "CE" | "TI" | "PP" | "RUC" | "RUT" | "CI";
21
+ savePaymentData?: boolean;
22
+ [k: string]: any;
23
+ }
23
24
  export interface PeruvianTokenRequest {
24
25
  name: Name;
25
26
  lastName: LastName;
@@ -31,6 +32,7 @@ export interface PeruvianTokenRequest {
31
32
  documentType?: "DNI" | "CE" | "PAS" | "RUC";
32
33
  phonePrefix?: string;
33
34
  phoneNumber?: string;
35
+ savePaymentData?: boolean;
34
36
  [k: string]: any;
35
37
  }
36
38
  export interface BrazilianTokenRequest {
@@ -43,6 +45,7 @@ export interface BrazilianTokenRequest {
43
45
  currency: "BRL";
44
46
  documentType?: "CPF" | "CNPJ" | "RG" | "DNI" | "CI" | "CP" | "RNE";
45
47
  userType?: string;
48
+ savePaymentData?: boolean;
46
49
  [k: string]: any;
47
50
  }
48
51
  export interface MexicanTokenRequest {
@@ -54,93 +57,6 @@ export interface MexicanTokenRequest {
54
57
  description?: Description;
55
58
  currency: "MXN";
56
59
  documentType?: "PP" | "RFC" | "CURP";
57
- [k: string]: any;
58
- }
59
- export interface ColombianTokenRequest {
60
- name: Name;
61
- lastName: LastName;
62
- identification: Identification;
63
- totalAmount: TotalAmount;
64
- email?: Email;
65
- description?: Description;
66
- currency: "COP";
67
- documentType?: "CC" | "NIT" | "CE" | "TI" | "PP" | "RUT";
68
- [k: string]: any;
69
- }
70
- export interface CostaRicanTokenRequest {
71
- name: Name;
72
- lastName: LastName;
73
- identification: Identification;
74
- totalAmount: TotalAmount;
75
- email?: Email;
76
- description?: Description;
77
- currency: "CRC";
78
- documentType: "CI" | "NITE";
79
- [k: string]: any;
80
- }
81
- export interface GuatemalanTokenRequest {
82
- name: Name;
83
- lastName: LastName;
84
- totalAmount: TotalAmount;
85
- email?: Email;
86
- description?: Description;
87
- currency: "GTQ";
88
- documentType: "DPI" | "NIT";
89
- identification: string;
90
- [k: string]: any;
91
- }
92
- export interface PanamanianRequest {
93
- name: Name;
94
- lastName: LastName;
95
- totalAmount: TotalAmount;
96
- email?: Email;
97
- description?: Description;
98
- currency: "PAB" | "USD";
99
- documentType: "CIP" | "RUC";
100
- identification: string;
101
- [k: string]: any;
102
- }
103
- export interface NicaraguanRequest {
104
- name: Name;
105
- lastName: LastName;
106
- totalAmount: TotalAmount;
107
- email?: Email;
108
- description?: Description;
109
- currency: "NIO";
110
- documentType: "CI" | "RUC";
111
- identification: string;
112
- [k: string]: any;
113
- }
114
- export interface HonduranRequest {
115
- name: Name;
116
- lastName: LastName;
117
- totalAmount: TotalAmount;
118
- email?: Email;
119
- description?: Description;
120
- currency: "HNL";
121
- documentType: "RNP" | "RTN";
122
- identification: string;
123
- [k: string]: any;
124
- }
125
- export interface SalvadoranRequest {
126
- name: Name;
127
- lastName: LastName;
128
- totalAmount: TotalAmount;
129
- email?: Email;
130
- description?: Description;
131
- currency: "USD";
132
- documentType: "DUI" | "NIT";
133
- identification: string;
134
- [k: string]: any;
135
- }
136
- export interface GenericTokenRequest {
137
- name: Name;
138
- lastName: LastName;
139
- identification: Identification;
140
- totalAmount: TotalAmount;
141
- email?: Email;
142
- description?: Description;
143
- currency: "USD" | "CLP" | "UF";
144
- documentType?: "CC" | "CE" | "TI" | "PP" | "RUC" | "RUT" | "CI";
60
+ savePaymentData?: boolean;
145
61
  [k: string]: any;
146
62
  }
@@ -0,0 +1,6 @@
1
+ /* tslint:disable:all */
2
+ /* tslint:disable:all */
3
+
4
+ export interface GetUserId {
5
+ userId: string;
6
+ }
@@ -0,0 +1,6 @@
1
+ /* tslint:disable:all */
2
+ /* tslint:disable:all */
3
+
4
+ export interface GetUserIDResponse {
5
+ userId: string;
6
+ }
@@ -0,0 +1,8 @@
1
+ /* tslint:disable:all */
2
+ /* tslint:disable:all */
3
+
4
+ export interface SecureInitRequest {
5
+ card: {
6
+ number: string;
7
+ };
8
+ }
@@ -0,0 +1,6 @@
1
+ /* tslint:disable:all */
2
+ /* tslint:disable:all */
3
+
4
+ export interface SecureInitResponse {
5
+ jwt: string;
6
+ }
@@ -0,0 +1,6 @@
1
+ /* tslint:disable:all */
2
+ /* tslint:disable:all */
3
+
4
+ export interface SiftScienceAntiFraudSessionResponse {
5
+ sessionId: string | null;
6
+ }
@@ -3,7 +3,7 @@
3
3
 
4
4
  export interface SubscriptionTokenKPayRequest {
5
5
  walletId: string;
6
- currency?: "USD" | "COP" | "CLP" | "UF" | "PEN" | "MXN" | "CRC" | "GTQ" | "HNL" | "NIO" | "PAB";
6
+ currency?: "USD" | "COP" | "CLP" | "UF" | "PEN" | "MXN" | "CRC" | "GTQ" | "HNL" | "NIO";
7
7
  userId?: string;
8
8
  sessionId?: string;
9
9
  card?: {
@@ -3,7 +3,7 @@
3
3
 
4
4
  export interface TokenKPayRequest {
5
5
  walletId: string;
6
- currency?: "USD" | "COP" | "CLP" | "UF" | "PEN" | "MXN" | "BRL" | "CRC" | "GTQ" | "HNL" | "NIO" | "PAB";
6
+ currency?: "USD" | "COP" | "CLP" | "UF" | "PEN" | "MXN" | "BRL" | "CRC" | "GTQ" | "HNL" | "NIO";
7
7
  isDeferred?: boolean;
8
8
  amount: number | string;
9
9
  months?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kushki/js",
3
- "version": "1.29.0-alpha.13215.7",
3
+ "version": "1.29.0",
4
4
  "description": "kushki-js",
5
5
  "main": "lib/lib.js",
6
6
  "types": "lib/lib.d.ts",